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', '-');
|
||||
const PNT pnt = { 0, 0 };
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -98,9 +98,12 @@ 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)
|
||||
{
|
||||
TFirm_isamfile file(lf, codditta);
|
||||
if (file.last() == NOERR)
|
||||
return file.get(field);
|
||||
if (prefix_valid())
|
||||
{
|
||||
TFirm_isamfile file(lf, codditta);
|
||||
if (file.last() == NOERR)
|
||||
return file.get(field);
|
||||
}
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
|
||||
@ -109,6 +112,9 @@ static int is_active_firm(long codditta)
|
||||
if (main_app().get_firm() == codditta)
|
||||
return 2;
|
||||
|
||||
if (!prefix_valid()) // Non posso scartare nulla a priori
|
||||
return codditta > 0;
|
||||
|
||||
if (prefix().exist(codditta))
|
||||
{
|
||||
int anno = 0;
|
||||
@ -154,26 +160,25 @@ bool save_campo_xml()
|
||||
xvt_sys_get_version(host, NULL, sizeof(host));
|
||||
system.SetAttr("O.S.", host);
|
||||
|
||||
if (prefix_valid())
|
||||
TXmlItem& study = find_or_create_child(root, "study", true);
|
||||
TArray ditte; TPrefix::firms(ditte);
|
||||
FOR_EACH_ARRAY_ITEM(ditte, i, obj)
|
||||
{
|
||||
TXmlItem& study = find_or_create_child(root, "study", true);
|
||||
TRecordset* recset = create_recordset("USE NDITTE");
|
||||
for (bool ok = recset->move_first(); ok; ok = recset->move_next())
|
||||
TAssoc_array& ass = *(TAssoc_array*)obj;
|
||||
const TString* cod = (TString*)ass.objptr(NDT_CODDITTA);
|
||||
const int flag = cod ? is_active_firm(atol(*cod)) : 0;
|
||||
if (flag != 0)
|
||||
{
|
||||
const long codditta = recset->get(NDT_CODDITTA).as_int();
|
||||
const int flag = is_active_firm(codditta);
|
||||
if (flag != 0)
|
||||
TXmlItem& firm = study.AddChild("firm");
|
||||
FOR_EACH_ASSOC_STRING(ass, h, k, s)
|
||||
{
|
||||
TXmlItem& firm = study.AddChild("firm");
|
||||
firm.SetAttr(NDT_CODDITTA, codditta);
|
||||
firm.SetAttr(NDT_RAGSOC, recset->get(NDT_RAGSOC).as_string());
|
||||
firm.SetAttr("Current", flag == 2);
|
||||
if (strlen(s) >= 4) // Scarto codici e flag inutili
|
||||
firm.SetAttr(k, s);
|
||||
}
|
||||
firm.SetAttr("Current", flag == 2);
|
||||
}
|
||||
delete recset;
|
||||
}
|
||||
|
||||
TXmlItem& study = find_or_create_child(root, "study");
|
||||
xvt_sys_get_host_name(host, sizeof(host));
|
||||
study.SetAttr("DataPath", firm2dir(-1));
|
||||
study.SetAttr("ExePath", main_app().argv(0));
|
||||
@ -218,26 +223,19 @@ bool save_campo_xml()
|
||||
// Aggiorna il file xml coi dati di installazione e lo spedisce qua
|
||||
bool send_campo_xml()
|
||||
{
|
||||
bool ok = is_power_station();
|
||||
|
||||
if (!ok) // Non salvare attivazioni di prova interne
|
||||
TWait_cursor waiter;
|
||||
bool ok = save_campo_xml();
|
||||
if (ok && (xvt_net_get_status() & 0x7) && !is_power_station())
|
||||
{
|
||||
TWait_cursor waiter;
|
||||
if (save_campo_xml())
|
||||
TSocketClient aga;
|
||||
CONNID id = aga.QueryConnection("21", "www.aga.it");
|
||||
if (id > 0)
|
||||
{
|
||||
if (xvt_net_get_status() & 0x7)
|
||||
{
|
||||
TSocketClient aga;
|
||||
CONNID id = aga.QueryConnection("21", "www.aga.it");
|
||||
if (id > 0)
|
||||
{
|
||||
TFilename local, remote;
|
||||
build_xml_filename(local, false);
|
||||
build_xml_filename(remote, true);
|
||||
ok = aga.FtpSendFile(id, remote, local, "attivazioni", "viagra");
|
||||
aga.RemoveConnection(id);
|
||||
}
|
||||
}
|
||||
TFilename local, remote;
|
||||
build_xml_filename(local, false);
|
||||
build_xml_filename(remote, true);
|
||||
ok = aga.FtpSendFile(id, remote, local, "attivazioni", "viagra");
|
||||
aga.RemoveConnection(id);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
|
Loading…
x
Reference in New Issue
Block a user