Patch level : 10.0
Files correlati : 272 Ricompilazione Demo : [ ] Commento : Migliorata notifica via FTP delle installazioni git-svn-id: svn://10.65.10.50/trunk@18611 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									07ec330067
								
							
						
					
					
						commit
						bb7f2cdb42
					
				@ -119,6 +119,21 @@ void TBook_window::update()
 | 
				
			|||||||
        _logo.draw(win(), rctw, 'C', 'B', '-');
 | 
					        _logo.draw(win(), rctw, 'C', 'B', '-');
 | 
				
			||||||
      const PNT pnt = { 0, 0 };
 | 
					      const PNT pnt = { 0, 0 };
 | 
				
			||||||
      draw_spider(win(), 0x3, pnt);
 | 
					      draw_spider(win(), 0x3, pnt);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      const TDate oggi(TODAY);
 | 
				
			||||||
 | 
					      if (oggi.day() == 1 && oggi.month() == 4)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        hide_brush();
 | 
				
			||||||
 | 
					        RCT r = rctw;
 | 
				
			||||||
 | 
					        r.left = rctw.right/16;
 | 
				
			||||||
 | 
					        r.top = rctw.bottom / 2 - rctw.right/8;
 | 
				
			||||||
 | 
					        r.bottom = rctw.bottom / 2 + rctw.right/8;
 | 
				
			||||||
 | 
					        set_pen(COLOR_RED, 3);
 | 
				
			||||||
 | 
					        xvt_dwin_draw_oval(win(), &r);
 | 
				
			||||||
 | 
					        r.right = r.left;
 | 
				
			||||||
 | 
					        r.left = -r.left;
 | 
				
			||||||
 | 
					        xvt_dwin_draw_arc(win(), &r, (r.left+r.right)/2, r.bottom, (r.left+r.right)/2, r.top);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -97,10 +97,13 @@ static TXmlItem& find_or_create_child(TXmlItem& root, const char* tag, bool rese
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const TString& get_last(long codditta, int lf, const char* field)
 | 
					static const TString& get_last(long codditta, int lf, const char* field)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  if (prefix_valid())
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    TFirm_isamfile file(lf, codditta);
 | 
					    TFirm_isamfile file(lf, codditta);
 | 
				
			||||||
    if (file.last() == NOERR)
 | 
					    if (file.last() == NOERR)
 | 
				
			||||||
      return file.get(field);
 | 
					      return file.get(field);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  return EMPTY_STRING;
 | 
					  return EMPTY_STRING;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -109,6 +112,9 @@ static int is_active_firm(long codditta)
 | 
				
			|||||||
  if (main_app().get_firm() == codditta)
 | 
					  if (main_app().get_firm() == codditta)
 | 
				
			||||||
    return 2;
 | 
					    return 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (!prefix_valid()) // Non posso scartare nulla a priori
 | 
				
			||||||
 | 
					    return codditta > 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (prefix().exist(codditta))
 | 
					  if (prefix().exist(codditta))
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    int anno = 0;
 | 
					    int anno = 0;
 | 
				
			||||||
@ -154,26 +160,25 @@ bool save_campo_xml()
 | 
				
			|||||||
  xvt_sys_get_version(host, NULL, sizeof(host));
 | 
					  xvt_sys_get_version(host, NULL, sizeof(host));
 | 
				
			||||||
  system.SetAttr("O.S.", host);
 | 
					  system.SetAttr("O.S.", host);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (prefix_valid())
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
  TXmlItem& study = find_or_create_child(root, "study", true);
 | 
					  TXmlItem& study = find_or_create_child(root, "study", true);
 | 
				
			||||||
    TRecordset* recset = create_recordset("USE NDITTE");
 | 
					  TArray ditte; TPrefix::firms(ditte);
 | 
				
			||||||
    for (bool ok = recset->move_first(); ok; ok = recset->move_next())
 | 
					  FOR_EACH_ARRAY_ITEM(ditte, i, obj)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
      const long codditta = recset->get(NDT_CODDITTA).as_int();
 | 
					    TAssoc_array& ass = *(TAssoc_array*)obj;
 | 
				
			||||||
      const int flag = is_active_firm(codditta);
 | 
					    const TString* cod = (TString*)ass.objptr(NDT_CODDITTA);
 | 
				
			||||||
 | 
					    const int flag = cod ? is_active_firm(atol(*cod)) : 0;
 | 
				
			||||||
    if (flag != 0)
 | 
					    if (flag != 0)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      TXmlItem& firm = study.AddChild("firm");
 | 
					      TXmlItem& firm = study.AddChild("firm");
 | 
				
			||||||
        firm.SetAttr(NDT_CODDITTA, codditta);
 | 
					      FOR_EACH_ASSOC_STRING(ass, h, k, s)
 | 
				
			||||||
        firm.SetAttr(NDT_RAGSOC, recset->get(NDT_RAGSOC).as_string());
 | 
					      {
 | 
				
			||||||
 | 
					        if (strlen(s) >= 4) // Scarto codici e flag inutili
 | 
				
			||||||
 | 
					          firm.SetAttr(k, s);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      firm.SetAttr("Current", flag == 2);
 | 
					      firm.SetAttr("Current", flag == 2);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
    delete recset;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  TXmlItem& study = find_or_create_child(root, "study");
 | 
					 | 
				
			||||||
  xvt_sys_get_host_name(host, sizeof(host));
 | 
					  xvt_sys_get_host_name(host, sizeof(host));
 | 
				
			||||||
  study.SetAttr("DataPath", firm2dir(-1));
 | 
					  study.SetAttr("DataPath", firm2dir(-1));
 | 
				
			||||||
  study.SetAttr("ExePath", main_app().argv(0)); 
 | 
					  study.SetAttr("ExePath", main_app().argv(0)); 
 | 
				
			||||||
@ -217,15 +222,10 @@ bool save_campo_xml()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Aggiorna il file xml coi dati di installazione e lo spedisce qua
 | 
					// Aggiorna il file xml coi dati di installazione e lo spedisce qua
 | 
				
			||||||
bool send_campo_xml()
 | 
					bool send_campo_xml()
 | 
				
			||||||
{ 
 | 
					 | 
				
			||||||
  bool ok = is_power_station();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (!ok) // Non salvare attivazioni di prova interne
 | 
					 | 
				
			||||||
{ 
 | 
					{ 
 | 
				
			||||||
  TWait_cursor waiter;
 | 
					  TWait_cursor waiter;
 | 
				
			||||||
    if (save_campo_xml())
 | 
					  bool ok = save_campo_xml();
 | 
				
			||||||
    {
 | 
					  if (ok && (xvt_net_get_status() & 0x7) && !is_power_station())
 | 
				
			||||||
      if (xvt_net_get_status() & 0x7)
 | 
					 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    TSocketClient aga;
 | 
					    TSocketClient aga;
 | 
				
			||||||
    CONNID id = aga.QueryConnection("21", "www.aga.it");
 | 
					    CONNID id = aga.QueryConnection("21", "www.aga.it");
 | 
				
			||||||
@ -238,7 +238,5 @@ bool send_campo_xml()
 | 
				
			|||||||
      aga.RemoveConnection(id);
 | 
					      aga.RemoveConnection(id);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  return ok;
 | 
					  return ok;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user