diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Main.cc | 20 | ||||
-rw-r--r-- | src/paq.cc | 4 |
2 files changed, 19 insertions, 5 deletions
diff --git a/src/Main.cc b/src/Main.cc index 6566193..22534c1 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -104,6 +104,18 @@ class ad_t : public Action { }; Action * ad = new ad_t(); +class dostop_t : public Action { + public: + dostop_t() : Action("dostop") { } + virtual ~dostop_t() { } + virtual String GetTitle() { return "Arret du serveur"; } + virtual Task * Do(Variables * v, Variables * hds, Handle * h) { + TaskMan::Stop(); + return 0; + } +}; +Action * dostop = new dostop_t(); + String Noms[] = {"Champ1", "Champ2", "Champ3"}; String Defaults[] = {"Default1", "Default2", 0}; String Invites[] = {"Champ 1:", "Champ 2:", "Champ 3:"}; @@ -138,13 +150,15 @@ Send this file: <INPUT NAME=\"userfile\" TYPE=\"file\"> </FORM> ", "upload"); -Action * Liste[] = {a1, a2, a3, a4, a5, ad, java, up}; -String Labels[] = {"Action 1", "Action 2", "Action 3", "Action 4", "Action 5", "Action dynamique", "Essai de java", "Test d'upload"}; +Action * stop = new Confirm("Stopper", "Stopper le serveur?", "stop", dostop, 0); + +Action * Liste[] = {a1, a2, a3, a4, a5, ad, java, up, stop}; +String Labels[] = {"Action 1", "Action 2", "Action 3", "Action 4", "Action 5", "Action dynamique", "Essai de java", "Test d'upload", "Stop"}; CODE_BEGINS Action * buildmenu(void) { - Action * m = new Menu("Menu Principal", "start", Labels, Liste, 8); + Action * m = new Menu("Menu Principal", "start", Labels, Liste, 9); return m; } @@ -116,7 +116,7 @@ void process_directory(const String & dirname) throw (GeneralException) { fname = dirname + "/" + namelist[i]->d_name; stat(fname.to_charp(), &fstats); if (S_ISDIR(fstats.st_mode)) { - if (!Regex("^\.{1,2}$").Match(namelist[i]->d_name)) { + if (!Regex("^\\.{1,2}$").Match(namelist[i]->d_name)) { t = strlen(namelist[i]->d_name); Archive->write(&t, 1); Archive->write(namelist[i]->d_name, t); @@ -130,7 +130,7 @@ void process_directory(const String & dirname) throw (GeneralException) { process_directory(dirname + "/" + namelist[i]->d_name); } } else { - if (!Regex("\.gz$").Match(namelist[i]->d_name)) { + if (!Regex("\\.gz$").Match(namelist[i]->d_name)) { t = strlen(namelist[i]->d_name); Archive->write(&t, 1); Archive->write(namelist[i]->d_name, t); |