Migliorato supporto per protezione SSA remota

git-svn-id: svn://10.65.10.50/branches/R_10_00@22638 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2012-04-13 15:06:05 +00:00
parent 9326843c87
commit 9f287b3844
3 changed files with 449 additions and 446 deletions

View File

@ -1,445 +1,448 @@
#include <about.h> #include <about.h>
#include <applicat.h> #include <applicat.h>
#include <colors.h> #include <colors.h>
#include <config.h> #include <config.h>
#include <dongle.h> #include <dongle.h>
#include <prefix.h> #include <prefix.h>
#include <sqlset.h> #include <sqlset.h>
#include <toolfld.h> #include <toolfld.h>
#include <urldefid.h> #include <urldefid.h>
#include <utility.h> #include <utility.h>
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// TAdavnced_property sheet // TAdavnced_property sheet
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
class TAdvanced_property_sheet : public TMask class TAdvanced_property_sheet : public TMask
{ {
TProp_field* _pf; TProp_field* _pf;
protected: protected:
virtual long handler(WINDOW win, EVENT* e); virtual long handler(WINDOW win, EVENT* e);
void edit(); void edit();
void esporta(); void esporta();
public: public:
void freeze(bool on) { _pf->freeze(on); } void freeze(bool on) { _pf->freeze(on); }
void add_cat(const char* prompt); void add_cat(const char* prompt);
void add_prop(const char* prompt, const char* value); void add_prop(const char* prompt, const char* value);
void add_prop(const char* prompt, long value); void add_prop(const char* prompt, long value);
bool curr_prop(TString& prop, TVariant& value); bool curr_prop(TString& prop, TVariant& value);
void set_read_only(bool ro = true); void set_read_only(bool ro = true);
TAdvanced_property_sheet(const char* title = "", int width = 78, int height = 20); TAdvanced_property_sheet(const char* title = "", int width = 78, int height = 20);
}; };
long TAdvanced_property_sheet::handler(WINDOW win, EVENT* e) long TAdvanced_property_sheet::handler(WINDOW win, EVENT* e)
{ {
if (_pf != NULL) if (_pf != NULL)
{ {
switch (e->type) switch (e->type)
{ {
case E_SIZE: case E_SIZE:
if (win == _pf->win().parent()) if (win == _pf->win().parent())
_pf->win().maximize(); _pf->win().maximize();
break; break;
case E_CONTROL: case E_CONTROL:
switch(e->v.ctl.id) switch(e->v.ctl.id)
{ {
case DLG_EDIT: edit(); return 0L; case DLG_EDIT: edit(); return 0L;
case DLG_EXPORT: esporta(); return 0L; case DLG_EXPORT: esporta(); return 0L;
default: break; default: break;
} }
break; break;
default: default:
break; break;
} }
} }
return TMask::handler(win, e); return TMask::handler(win, e);
} }
void TAdvanced_property_sheet::add_cat(const char* prompt) void TAdvanced_property_sheet::add_cat(const char* prompt)
{ {
_pf->set_property(prompt, (const char*)NULL, prompt); _pf->set_property(prompt, (const char*)NULL, prompt);
} }
void TAdvanced_property_sheet::add_prop(const char* prompt, const char* value) void TAdvanced_property_sheet::add_prop(const char* prompt, const char* value)
{ {
_pf->set_property(prompt, value, prompt); _pf->set_property(prompt, value, prompt);
} }
void TAdvanced_property_sheet::add_prop(const char* prompt, long value) void TAdvanced_property_sheet::add_prop(const char* prompt, long value)
{ {
_pf->set_property(prompt, value, prompt); _pf->set_property(prompt, value, prompt);
} }
static BOOLEAN export_cb(WINDOW pg, XVT_TREEVIEW_NODE node, void* jolly) static BOOLEAN export_cb(WINDOW pg, XVT_TREEVIEW_NODE node, void* jolly)
{ {
char name[_MAX_PATH]; char name[_MAX_PATH];
if (xvt_prop_get_string(pg, node, name, sizeof(name))) if (xvt_prop_get_string(pg, node, name, sizeof(name)))
{ {
ostream& out = *(ostream*)jolly; ostream& out = *(ostream*)jolly;
char value[_MAX_PATH]; char value[_MAX_PATH];
if (xvt_prop_get_data(pg, node, value, sizeof(value))) if (xvt_prop_get_data(pg, node, value, sizeof(value)))
out << '\t' << name << '\t' << value << endl; // Property out << '\t' << name << '\t' << value << endl; // Property
else else
out << name << endl; // Category out << name << endl; // Category
} }
return TRUE; return TRUE;
} }
void TAdvanced_property_sheet::edit() void TAdvanced_property_sheet::edit()
{ {
TString name; TString name;
TVariant value; TVariant value;
if (_pf->current_property(name, value)) if (_pf->current_property(name, value))
{ {
TFilename n = value.as_string(); TFilename n = value.as_string();
if (n.exist()) if (n.exist())
{ {
if (n.ends_with(".msk", true) || n.ends_with(".ini", true)) if (n.ends_with(".msk", true) || n.ends_with(".ini", true))
{ {
n.insert("notepad "); n.insert("notepad ");
xvt_sys_execute(n, FALSE, FALSE); xvt_sys_execute(n, FALSE, FALSE);
} else } else
xvt_sys_goto_url(n, "open"); xvt_sys_goto_url(n, "open");
} }
} }
} }
void TAdvanced_property_sheet::esporta() void TAdvanced_property_sheet::esporta()
{ {
TString cap; get_caption(cap); TString cap; get_caption(cap);
for (char* buf = cap.get_buffer(); *buf; buf++) for (char* buf = cap.get_buffer(); *buf; buf++)
{ {
switch (*buf) switch (*buf)
{ {
case '?': case '?':
case '(': case '(':
case ')': case ')':
case '/': case '/':
case '\\': case '\\':
case '*': *buf = ' '; break; case '*': *buf = ' '; break;
default : break; default : break;
} }
} }
cap.strip_spaces(); cap.strip_spaces();
if (cap.blank()) if (cap.blank())
cap = "export"; cap = "export";
TFilename name; TFilename name;
name.tempdir(); name.add(cap); name.ext("xls"); name.tempdir(); name.add(cap); name.ext("xls");
if (name.full()) // Dummy test if (name.full()) // Dummy test
{ {
ofstream xls(name); ofstream xls(name);
_pf->for_each_property(export_cb, &xls); _pf->for_each_property(export_cb, &xls);
} }
if (name.exist()) if (name.exist())
xvt_sys_goto_url(name, "open"); xvt_sys_goto_url(name, "open");
} }
void TAdvanced_property_sheet::set_read_only(bool ro) void TAdvanced_property_sheet::set_read_only(bool ro)
{ {
xvt_prop_set_read_only(_pf->win().win(), NULL, ro); xvt_prop_set_read_only(_pf->win().win(), NULL, ro);
} }
TAdvanced_property_sheet::TAdvanced_property_sheet(const char* title, int width, int height) TAdvanced_property_sheet::TAdvanced_property_sheet(const char* title, int width, int height)
: TMask(title && *title ? title : TR("Proprieta'"), 1, width, height), _pf(NULL) : TMask(title && *title ? title : TR("Proprietà"), 1, width, height), _pf(NULL)
{ {
add_button_tool(DLG_CANCEL, TR("Ritorna"), TOOL_CANCEL); add_button_tool(DLG_CANCEL, TR("Ritorna"), TOOL_CANCEL);
add_button_tool(DLG_EXPORT, TR("Esporta"), TOOL_EXCEL); add_button_tool(DLG_EXPORT, TR("Esporta"), TOOL_EXCEL);
if (is_power_reseller(true)) if (is_power_reseller(true))
add_button_tool(DLG_EDIT, TR("Edit"), TOOL_EDIT); add_button_tool(DLG_EDIT, TR("Edit"), TOOL_EDIT);
add_button_tool(DLG_HELP, TR("Help"), TOOL_HELP); add_button_tool(DLG_HELP, TR("Help"), TOOL_HELP);
_pf = new TProp_field(this); _pf = new TProp_field(this);
_pf->create(DLG_USER, 0, 0, 0, 0, page_win(0)); _pf->create(DLG_USER, 0, 0, 0, 0, page_win(0));
} }
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// TBasic_property sheet // TBasic_property sheet
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
class TBasic_property_sheet : public TArray_sheet class TBasic_property_sheet : public TArray_sheet
{ {
protected: protected:
virtual bool get_cell_colors(int row, int col, COLOR& fore, COLOR& back) const; virtual bool get_cell_colors(int row, int col, COLOR& fore, COLOR& back) const;
public: public:
void add_cat(const char* cat); void add_cat(const char* cat);
void add_prop(const char* prop, const char* val); void add_prop(const char* prop, const char* val);
void add_prop(const char* prop, long val); void add_prop(const char* prop, long val);
TBasic_property_sheet(const char* title, int width, int height); TBasic_property_sheet(const char* title, int width, int height);
}; };
bool TBasic_property_sheet::get_cell_colors(int r, int col, COLOR& fore, COLOR& back) const bool TBasic_property_sheet::get_cell_colors(int r, int col, COLOR& fore, COLOR& back) const
{ {
const TToken_string& riga = ((TBasic_property_sheet*)this)->row(r); const TToken_string& riga = ((TBasic_property_sheet*)this)->row(r);
const bool changed = riga.items() == 1; const bool changed = riga.items() == 1;
if (changed) if (changed)
{ {
fore = FOCUS_COLOR; fore = FOCUS_COLOR;
back = REQUIRED_BACK_COLOR; back = REQUIRED_BACK_COLOR;
return true; return true;
} }
return changed; return changed;
} }
void TBasic_property_sheet::add_cat(const char* cat) void TBasic_property_sheet::add_cat(const char* cat)
{ {
add(cat); add(cat);
} }
void TBasic_property_sheet::add_prop(const char* prop, const char* val) void TBasic_property_sheet::add_prop(const char* prop, const char* val)
{ {
TToken_string r; TToken_string r;
r = prop; r = prop;
r.add(val); r.add(val);
add(r); add(r);
} }
void TBasic_property_sheet::add_prop(const char* prop, long val) void TBasic_property_sheet::add_prop(const char* prop, long val)
{ {
add_prop(prop, format("%ld", val)); add_prop(prop, format("%ld", val));
} }
TBasic_property_sheet::TBasic_property_sheet(const char* title, int width, int height) TBasic_property_sheet::TBasic_property_sheet(const char* title, int width, int height)
: TArray_sheet(-1, -1, width, height, title, format("@%d|@%d", width/4-2, 3*width/4-2)) : TArray_sheet(-1, -1, width, height, title, format("@%d|@%d", width/4-2, 3*width/4-2))
{ } { }
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// TProperty sheet // TProperty sheet
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
void TProperty_sheet::add_cat(const char* cat) void TProperty_sheet::add_cat(const char* cat)
{ {
if (_power) if (_power)
((TAdvanced_property_sheet*)_ps)->add_cat(cat); ((TAdvanced_property_sheet*)_ps)->add_cat(cat);
else else
((TBasic_property_sheet*)_ps)->add_cat(cat); ((TBasic_property_sheet*)_ps)->add_cat(cat);
} }
void TProperty_sheet::add_prop(const char* prop, const char* val) void TProperty_sheet::add_prop(const char* prop, const char* val)
{ {
if (_power) if (_power)
((TAdvanced_property_sheet*)_ps)->add_prop(prop, val); ((TAdvanced_property_sheet*)_ps)->add_prop(prop, val);
else else
((TBasic_property_sheet*)_ps)->add_prop(prop, val); ((TBasic_property_sheet*)_ps)->add_prop(prop, val);
} }
void TProperty_sheet::add_prop(const char* prop, long val) void TProperty_sheet::add_prop(const char* prop, long val)
{ {
if (_power) if (_power)
((TAdvanced_property_sheet*)_ps)->add_prop(prop, val); ((TAdvanced_property_sheet*)_ps)->add_prop(prop, val);
else else
((TBasic_property_sheet*)_ps)->add_prop(prop, val); ((TBasic_property_sheet*)_ps)->add_prop(prop, val);
} }
void TProperty_sheet::freeze(bool f) void TProperty_sheet::freeze(bool f)
{ {
if (_power) if (_power)
((TAdvanced_property_sheet*)_ps)->freeze(f); ((TAdvanced_property_sheet*)_ps)->freeze(f);
} }
void TProperty_sheet::set_read_only(bool ro) void TProperty_sheet::set_read_only(bool ro)
{ {
if (_power) if (_power)
((TAdvanced_property_sheet*)_ps)->set_read_only(ro); ((TAdvanced_property_sheet*)_ps)->set_read_only(ro);
} }
KEY TProperty_sheet::run() KEY TProperty_sheet::run()
{ return _ps->run(); } { return _ps->run(); }
TProperty_sheet::TProperty_sheet(const char* title, int width, int height) TProperty_sheet::TProperty_sheet(const char* title, int width, int height)
{ {
const int nAssYear = xvt_vobj_get_attr(NULL_WIN, ATTR_APPL_VERSION_YEAR); const int nAssYear = xvt_vobj_get_attr(NULL_WIN, ATTR_APPL_VERSION_YEAR);
_power = nAssYear >= 2121; _power = nAssYear >= 2121;
if (_power) if (_power)
_ps = new TAdvanced_property_sheet(title, width, height); _ps = new TAdvanced_property_sheet(title, width, height);
else else
_ps = new TBasic_property_sheet(title, width, height); _ps = new TBasic_property_sheet(title, width, height);
} }
TProperty_sheet::~TProperty_sheet() TProperty_sheet::~TProperty_sheet()
{ {
delete _ps; delete _ps;
} }
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// Finestra informazioni // Finestra informazioni
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
class TInfo_mask : public TProperty_sheet class TInfo_mask : public TProperty_sheet
{ {
public: public:
TInfo_mask(); TInfo_mask();
}; };
TInfo_mask::TInfo_mask() : TProperty_sheet(TR("Informazioni")) TInfo_mask::TInfo_mask() : TProperty_sheet(TR("Informazioni"))
{ {
freeze(true); freeze(true);
const word ser_no = dongle().number(); const word ser_no = dongle().number();
int year = 2091, release = 10, tag = 0, patch = 1; int year = 2121, release = 11, tag = 0, patch = 1;
TString80 versione = "2091.10.00"; TString80 versione = "2121.11.00";
if (main_app().get_version_info(year, release, tag, patch)) if (main_app().get_version_info(year, release, tag, patch))
versione.format("%d.%02d.%02d Patch %d", year, release, tag, patch); versione.format("%d.%02d.%02d Patch %d", year, release, tag, patch);
TString16 datamod; TString16 datamod;
TFilename cmdline = main_app().argv(0); TFilename cmdline = main_app().argv(0);
cmdline.ext("exe"); cmdline.ext("exe");
if (cmdline.exist()) if (cmdline.exist())
{ {
const time_t mtime = xvt_fsys_file_attr(cmdline, XVT_FILE_ATTR_MTIME); const time_t mtime = xvt_fsys_file_attr(cmdline, XVT_FILE_ATTR_MTIME);
struct tm data; localtime_s(&data, &mtime); struct tm data; localtime_s(&data, &mtime);
datamod.format("%02d-%02d-%04d", data.tm_mday, data.tm_mon+1, data.tm_year+1900); datamod.format("%02d-%02d-%04d", data.tm_mday, data.tm_mon+1, data.tm_year+1900);
} }
TString80 stros, strwx, strcpu; TString80 stros, strwx, strcpu;
xvt_sys_get_version(stros.get_buffer(), strwx.get_buffer(), stros.size()); xvt_sys_get_version(stros.get_buffer(), strwx.get_buffer(), stros.size());
xvt_sys_get_host_name(strcpu.get_buffer(), strcpu.size()); xvt_sys_get_host_name(strcpu.get_buffer(), strcpu.size());
TString arg; TString arg;
for (int a = 0; a < main_app().argc(); a++) for (int a = 0; a < main_app().argc(); a++)
arg << main_app().argv(a) << ' '; arg << main_app().argv(a) << ' ';
arg.trim(); arg.trim();
TConfig campoini(CONFIG_INSTALL, "Main"); TConfig campoini(CONFIG_INSTALL, "Main");
TConfig userini(CONFIG_GUI, "Printer"); TConfig userini(CONFIG_GUI, "Printer");
TString prot; TString prot;
const TDongleHardware dhw = dongle().hardware(); const TDongleHardware dhw = dongle().hardware();
switch (dhw) switch (dhw)
{ {
case _dongle_hardlock: prot = "Hardlock"; break; case _dongle_hardlock: prot = "Hardlock"; break;
case _dongle_eutron : prot = "Eutron"; break; case _dongle_eutron : prot = "Eutron"; break;
case _dongle_network : prot = dongle().server_name(); break; case _dongle_network : prot = dongle().server_name(); break;
case _dongle_ssa : prot = "SSA"; break; case _dongle_ssa : prot = "SSA";
default : prot = TR("Nessuna"); break; if (fexist("ssa.ini"))
} prot << '@' << ini_get_string("ssa.ini", "", "SSA-PORT");
break;
int type = campoini.get_int("Type", "Main"); default : prot = TR("Nessuna"); break;
const char* tipo = NULL; }
switch (type)
{ int type = campoini.get_int("Type", "Main");
case 1: tipo = TR("Postazione singola"); break; const char* tipo = NULL;
case 2: tipo = TR("Server"); break; switch (type)
case 3: tipo = TR("Client"); break; {
default: case 1: tipo = TR("Postazione singola"); break;
if (campoini.get_bool("TestDatabase")) case 2: tipo = TR("Server"); break;
{ case 3: tipo = TR("Client"); break;
if (dhw == _dongle_network) default:
{ if (campoini.get_bool("TestDatabase"))
tipo = TR("Server"); {
campoini.set("Type", type = 2); if (dhw == _dongle_network)
} {
else tipo = TR("Server");
tipo = TR("Server o Postazione singola"); campoini.set("Type", type = 2);
} }
else else
{ tipo = TR("Server o Postazione singola");
tipo = TR("Client"); }
campoini.set("Type", type = 3); else
} {
break; tipo = TR("Client");
} campoini.set("Type", type = 3);
}
TFilename temp; temp.tempdir(); break;
TString strdb, strsql; }
{
TISAM_recordset rs(""); TFilename temp; temp.tempdir();
strdb = rs.driver_version(); TString strdb, strsql;
} {
{ TISAM_recordset rs("");
TSQL_recordset rs(""); strdb = rs.driver_version();
strsql = rs.driver_version(); }
} {
TSQL_recordset rs("");
add_cat(TR("Programma")); strsql = rs.driver_version();
add_prop(TR("Versione"), versione); }
add_prop(TR("Data"), datamod);
add_prop(TR("Linea di Comando"), arg); add_cat(TR("Programma"));
add_prop(TR("Utente"), user()); add_prop(TR("Versione"), versione);
add_prop(TR("Data"), datamod);
add_cat(TR("Licenza")); add_prop(TR("Linea di Comando"), arg);
add_prop(TR("Installazione"), tipo); add_prop(TR("Utente"), user());
add_prop(TR("Protezione"), prot);
add_prop(TR("N. di serie"), ser_no); add_cat(TR("Licenza"));
if (ser_no > 0) add_prop(TR("Installazione"), tipo);
{ add_prop(TR("Protezione"), prot);
add_prop(TR("Assistenza"), dongle().year_assist()); add_prop(TR("N. di serie"), ser_no);
Tdninst dninst; if (ser_no > 0)
add_prop(TR("Controllo"), dninst.assist_year()); {
} add_prop(TR("Assistenza"), dongle().year_assist());
Tdninst dninst;
add_cat(TR("Area dati")); add_prop(TR("Controllo"), dninst.assist_year());
TFilename study = firm2dir(-1); }
add_prop(TR("Studio"), study);
const long codditta = campoini.get_long("Firm", "Main"); add_cat(TR("Area dati"));
add_prop(TR("Ditta"), codditta); TFilename study = firm2dir(-1);
if (prefix_valid()) add_prop(TR("Studio"), study);
{ const long codditta = campoini.get_long("Firm", "Main");
const TFirm& f = prefix().firm(); add_prop(TR("Ditta"), codditta);
add_prop(TR("Ragione Sociale"), f.ragione_sociale()); if (prefix_valid())
add_prop(TR("Valuta"), f.codice_valuta()); {
} const TFirm& f = prefix().firm();
else add_prop(TR("Ragione Sociale"), f.ragione_sociale());
add_prop(TR("Ragione Sociale"), campoini.get("Company")); add_prop(TR("Valuta"), f.codice_valuta());
}
add_cat(TR("Dati Stazione")); else
add_prop(TR("Sistema Operativo"), stros); add_prop(TR("Ragione Sociale"), campoini.get("Company"));
add_prop(TR("Utente"), user());
add_prop(TR("Computer"), strcpu); add_cat(TR("Dati Stazione"));
add_prop(TR("Sistema Operativo"), stros);
TString16 strfree; add_prop(TR("Utente"), user());
const long mbfree = xvt_fsys_get_disk_free_space(study, 'M'); add_prop(TR("Computer"), strcpu);
if (mbfree > 8192)
strfree.format("%ld Gb", mbfree/1024); TString16 strfree;
else const long mbfree = xvt_fsys_get_disk_free_space(study, 'M');
strfree.format("%ld Mb", mbfree); if (mbfree > 8192)
add_prop(TR("Spazio su disco"), strfree); strfree.format("%ld Gb", mbfree/1024);
add_prop(TR("File temporanei"), temp); else
strfree.format("%ld Mb", mbfree);
TString printer; add_prop(TR("Spazio su disco"), strfree);
printer = userini.get("Name", "Printer"); add_prop(TR("File temporanei"), temp);
if (printer.blank())
printer = TR("Nessuna"); TString printer;
add_prop(TR("Stampante"), printer); printer = userini.get("Name", "Printer");
if (printer.blank())
add_cat(TR("Configurazioni")); printer = TR("Nessuna");
add_prop(TR("Config locale"), campoini.name()); add_prop(TR("Stampante"), printer);
add_prop(TR("Config studio"), study.add("studio.ini"));
if (codditta > 0) add_cat(TR("Configurazioni"));
{ add_prop(TR("Config locale"), campoini.name());
study = firm2dir(codditta); add_prop(TR("Config studio"), study.add("studio.ini"));
add_prop(TR("Config ditta"), study.add("ditta.ini")); if (codditta > 0)
} {
add_prop(TR("Config utente"), userini.name()); study = firm2dir(codditta);
study = firm2dir(-1); study.add("config"); study.add(strcpu); study.ext("ini"); add_prop(TR("Config ditta"), study.add("ditta.ini"));
add_prop(TR("Config stazione"), study), }
add_prop(TR("Config utente"), userini.name());
add_cat(TR("Librerie di supporto")); study = firm2dir(-1); study.add("config"); study.add(strcpu); study.ext("ini");
xvt_print_pdf_version(printer.get_buffer(), printer.size()); add_prop(TR("Config stazione"), study),
add_prop(TR("Libreria DB"), strdb);
add_prop(TR("Libreria GUI"), strwx); add_cat(TR("Librerie di supporto"));
add_prop(TR("Libreria PDF"), printer); xvt_print_pdf_version(printer.get_buffer(), printer.size());
add_prop(TR("Libreria SQL"), strsql); add_prop(TR("Libreria DB"), strdb);
#ifdef _MSC_VER add_prop(TR("Libreria GUI"), strwx);
const int cver = _MSC_VER / 100 - 6; add_prop(TR("Libreria PDF"), printer);
const int csub = _MSC_VER % 100; add_prop(TR("Libreria SQL"), strsql);
add_prop(TR("Libreria C++"), format("Microsoft Visual Studio %d.%d", cver, csub)); #ifdef _MSC_VER
#endif const int cver = _MSC_VER / 100 - 6;
const int csub = _MSC_VER % 100;
set_read_only(); add_prop(TR("Libreria C++"), format("Microsoft Visual Studio %d.%d", cver, csub));
freeze(false); #endif
}
set_read_only();
// About box: risposta alla opzione Informazioni del menu File freeze(false);
void about() }
{
TInfo_mask info; // About box: risposta alla opzione Informazioni del menu File
info.run(); void about()
} {
TInfo_mask info;
info.run();
}

View File

@ -333,7 +333,7 @@ const char* TApplication::get_module_name() const
const word aut = d.module_name2code(modname); const word aut = d.module_name2code(modname);
module = d.module_code2desc(aut); module = d.module_code2desc(aut);
bool ok = module.full(); bool ok = module.full();
if (ok && check_autorization()) if (ok && aut > 0 && check_autorization())
ok = dongle().login(modname); ok = dongle().login(modname);
if (!ok) if (!ok)

View File

@ -565,7 +565,7 @@ long daytime()
// DON'T cache this bool because hostname can be local or server // DON'T cache this bool because hostname can be local or server
static bool is_aga_station(const char* hostname) static bool is_aga_station(const char* hostname)
{ {
const char* const ranger[] = { "BATMOBILE", "KIRK", "MOBILE", "SPOCK", NULL }; const char* const ranger[] = { "BATMOBILE", "KIRK", "MOBILE", "PCTRUFFELLI", "SPOCK", NULL };
for (int i = 0; ranger[i]; i++) for (int i = 0; ranger[i]; i++)
if (xvt_str_compare_ignoring_case(hostname, ranger[i]) == 0) if (xvt_str_compare_ignoring_case(hostname, ranger[i]) == 0)
return true; return true;