From 7fdac301801bc44f6fdb343187413bdfd2d5366c Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sun, 8 May 2011 15:23:09 +0000 Subject: h-source:added the driver entry for 3g-cards --- .../Application/Controllers/DownloadController.php | 2 +- .../Controllers/ThreegcardsController.php | 8 ++- h-source/Application/Include/license.php | 4 ++ h-source/Application/Models/ThreegcardsModel.php | 1 + h-source/Application/Models/WikiModel.php | 4 +- h-source/Application/Views/Threegcards/form.php | 5 ++ h-source/Application/Views/Threegcards/page.php | 5 ++ h-source/Examples/Controllers/TestController.php | 9 ---- h-source/Examples/Tables/mysql/admin_session.txt | 52 ------------------ h-source/Examples/Tables/mysql/reg_session.txt | 63 ---------------------- h-source/Examples/Views/footer.php | 3 -- h-source/Examples/Views/post/form.php | 28 ---------- h-source/Examples/Views/post/form_associate.php | 19 ------- h-source/Examples/Views/post/header.php | 16 ------ h-source/Examples/Views/post/modify.php | 1 - h-source/Examples/Views/post/popup.php | 3 -- h-source/Examples/Views/post/view.php | 1 - h-source/Examples/Views/post2/form.php | 28 ---------- h-source/Examples/Views/post2/header.php | 30 ----------- h-source/Examples/Views/post2/modify.php | 1 - h-source/Examples/Views/post2/view.php | 1 - h-source/Examples/articles.txt | 8 --- h-source/Examples/boxes.txt | 5 -- h-source/Examples/index.html | 1 - h-source/Library/Call.php | 32 +++++------ 25 files changed, 40 insertions(+), 290 deletions(-) delete mode 100644 h-source/Examples/Controllers/TestController.php delete mode 100755 h-source/Examples/Tables/mysql/admin_session.txt delete mode 100755 h-source/Examples/Tables/mysql/reg_session.txt delete mode 100755 h-source/Examples/Views/footer.php delete mode 100755 h-source/Examples/Views/post/form.php delete mode 100644 h-source/Examples/Views/post/form_associate.php delete mode 100755 h-source/Examples/Views/post/header.php delete mode 100755 h-source/Examples/Views/post/modify.php delete mode 100755 h-source/Examples/Views/post/popup.php delete mode 100755 h-source/Examples/Views/post/view.php delete mode 100755 h-source/Examples/Views/post2/form.php delete mode 100755 h-source/Examples/Views/post2/header.php delete mode 100755 h-source/Examples/Views/post2/modify.php delete mode 100755 h-source/Examples/Views/post2/view.php delete mode 100755 h-source/Examples/articles.txt delete mode 100644 h-source/Examples/boxes.txt delete mode 100644 h-source/Examples/index.html (limited to 'h-source') diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php index bfc4346..d55f5ad 100644 --- a/h-source/Application/Controllers/DownloadController.php +++ b/h-source/Application/Controllers/DownloadController.php @@ -51,7 +51,7 @@ class DownloadController extends BaseController $xml .= "\t\n"; $xml .= "\t\th-node project\n"; $xml .= "\t\twww.h-node.com\n"; - $xml .= "\t\t".date("Y-m-d H:m:s")."\n"; + $xml .= "\t\t".date("Y-m-d H:i:s")."\n"; $xml .= "\t\t".License::getInsideXml()."\n"; $xml .= "\t\n"; diff --git a/h-source/Application/Controllers/ThreegcardsController.php b/h-source/Application/Controllers/ThreegcardsController.php index 69484cd..c535005 100644 --- a/h-source/Application/Controllers/ThreegcardsController.php +++ b/h-source/Application/Controllers/ThreegcardsController.php @@ -65,18 +65,22 @@ class ThreegcardsController extends GenericController ); $this->m['HardwareModel']->softConditions['update'] = array( - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the kernel entry", + "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the kernel entry", "checkLength|20000" => "description", "+checkLength|49" => "kernel", + "++checkLength|49" => "driver", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the driver entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", ); $this->m['HardwareModel']->softConditions['insert'] = array( "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the kernel entry", "checkLength|20000" => "description", "+checkLength|49" => "kernel", + "++checkLength|49" => "driver", + "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the driver entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]", ); - $this->m['HardwareModel']->setFields('model,kernel,description,distribution,comm_year,wifi_works,pci_id,interface','sanitizeAll'); + $this->m['HardwareModel']->setFields('model,kernel,description,distribution,comm_year,wifi_works,pci_id,interface,driver','sanitizeAll'); $argKeys = array( 'page:forceNat' => 1, diff --git a/h-source/Application/Include/license.php b/h-source/Application/Include/license.php index 72c25da..08a6a2c 100644 --- a/h-source/Application/Include/license.php +++ b/h-source/Application/Include/license.php @@ -28,6 +28,7 @@ class License 'en' => "The contents of this page are in the Public Domain. (see the CC0 page for detailed information). Anyone is free to copy, modify, publish, use, sell, or distribute the text for any purpose, commercial or non-commercial, and by any means.", 'it' => "I contenuti di questa pagina sono di Pubblico Dominio. (leggi la pagina CC0 per informazioni dettagliate). Chiunque è libero di copiare, modificare, pubblicare, usare, vendere, o distribuire tale contenuto per qualsiasi fine, commerciale o non commerciale, e con ogni mezzo.", 'es' => "El contenido de esta página está en Dominio Público. (vea la página CC0 para información detallada). Cualquiera es libre de copiar, modificar, publicar, usar, vender o distribuir el texto para cualquier propósito, comercial o no comercial, y por cualquier medio.", + 'fr' => "Le contenu de cette page est dans le Domaine Public (voir la page CC0 pour plus d'informations). Quiquonque est libre de copier, modifier, publier, utiliser, vendre ou distribuer le texte , quelques soit le but et le moyen.", ); //license notice that does appear inside the xml download page @@ -35,6 +36,7 @@ class License 'en' => "The contents of this page are in the Public Domain. (see the CC0 page at http://creativecommons.org/publicdomain/zero/1.0/ for detailed information). Anyone is free to copy, modify, publish, use, sell, or distribute the text for any purpose, commercial or non-commercial, and by any means.", 'it' => "I contenuti di questa pagina sono di Pubblico Dominio. (leggi la pagina CC0 all'indirizzo http://creativecommons.org/publicdomain/zero/1.0/deed.it per informazioni dettagliate). Chiunque è libero di copiare, modificare, pubblicare, usare, vendere, o distribuire tale contenuto per qualsiasi fine, commerciale o non commerciale, e con ogni mezzo.", 'es' => "El contenido de esta página está en Dominio Público. (vea la página CC0 http://creativecommons.org/publicdomain/zero/1.0/deed.es_ES para información detallada). Cualquiera es libre de copiar, modificar, publicar, usar, vender o distribuir el texto para cualquier propósito, comercial o no comercial, y por cualquier medio.", + 'fr' => "Le contenu de cette page est dans le Domaine Public (voir la page CC0 http://creativecommons.org/publicdomain/zero/1.0/deed.fr pour plus d'informations). Quiquonque est libre de copier, modifier, publier, utiliser, vendre ou distribuer le texte , quelques soit le but et le moyen.", ); //license notice that does appear before the submission of each hardware and wiki page @@ -42,6 +44,7 @@ class License 'en' => "Any text submitted by you will be put in the Public Domain (see the CC0 page for detailed information).", 'it' => "Ogni testo da te inviato diventerà di Pubblico Dominio. (leggi la pagina CC0 per informazioni dettagliate).", 'es' => "Cualquier texto agregado por usted será colocado en el Dominio Público (vea la página CC0 para información detallada).", + 'fr' => "Chaque texte que vous soumettrez seront placés dans le Domaine Public (voir la page CC0 pour plus d'informations)" ); //license notice that does appear before the submission of each hardware page from the h-node client (h-client) @@ -49,6 +52,7 @@ class License 'en' => "Any text submitted by you will be put in the Public Domain (see the CC0 page at \nhttp://creativecommons.org/publicdomain/zero/1.0/ for detailed information).", 'it' => "Ogni testo da te inviato diventerà di Pubblico Dominio. (leggi la pagina CC0 all'indirizzo \nhttp://creativecommons.org/publicdomain/zero/1.0/deed.it per informazioni dettagliate).", 'es' => "Cualquier texto agregado por usted será colocado en el Dominio Público (vea la página CC0 \nhttp://creativecommons.org/publicdomain/zero/1.0/deed.es_ES para información detallada).", + 'fr' => "Chaque texte que vous soumettrez seront placés dans le Domaine Public (voir la page CC0 \nhttp://creativecommons.org/publicdomain/zero/1.0/deed.fr pour plus d'informations)" ); public static function getNotice($noticeArray) diff --git a/h-source/Application/Models/ThreegcardsModel.php b/h-source/Application/Models/ThreegcardsModel.php index 6bde5c8..3579e01 100644 --- a/h-source/Application/Models/ThreegcardsModel.php +++ b/h-source/Application/Models/ThreegcardsModel.php @@ -63,6 +63,7 @@ class ThreegcardsModel extends GenericModel 'distribution' => gtext('GNU/Linux distribution used for the test'), 'kernel' => gtext('tested with the following kernel libre'), 'wifi_works' => gtext("does it work with free software?"), + 'driver' => gtext("free driver used"), 'description' => gtext('Description'), ); diff --git a/h-source/Application/Models/WikiModel.php b/h-source/Application/Models/WikiModel.php index bfbc4ad..9cb4f6f 100644 --- a/h-source/Application/Models/WikiModel.php +++ b/h-source/Application/Models/WikiModel.php @@ -55,14 +55,14 @@ class WikiModel extends Model_Map { "checkNotEmpty" => 'title', "checkLength|99" => 'title|'.gtext('title is too long'), "+checkNotEmpty" => 'page', - "+checkLength|9000" => 'page|'.gtext('the page text is too long'), + "+checkLength|29900" => 'page|'.gtext('the page text is too long'), ); $this->strongConditions['update'] = array( "checkNotEmpty" => 'title', "checkLength|99" => 'title|'.gtext('title is too long'), "+checkNotEmpty" => 'page', - "+checkLength|9000" => 'page|'.gtext('the page text is too long'), + "+checkLength|29900" => 'page|'.gtext('the page text is too long'), ); $this->databaseConditions['insert'] = array( diff --git a/h-source/Application/Views/Threegcards/form.php b/h-source/Application/Views/Threegcards/form.php index 075333e..fd80f5a 100644 --- a/h-source/Application/Views/Threegcards/form.php +++ b/h-source/Application/Views/Threegcards/form.php @@ -75,6 +75,11 @@
+ +
+ + +
diff --git a/h-source/Application/Views/Threegcards/page.php b/h-source/Application/Views/Threegcards/page.php index 61752d8..ef79898 100644 --- a/h-source/Application/Views/Threegcards/page.php +++ b/h-source/Application/Views/Threegcards/page.php @@ -77,6 +77,11 @@
+ +
+
:
+
+
:
diff --git a/h-source/Examples/Controllers/TestController.php b/h-source/Examples/Controllers/TestController.php deleted file mode 100644 index 9372e71..0000000 --- a/h-source/Examples/Controllers/TestController.php +++ /dev/null @@ -1,9 +0,0 @@ -It works!'; - } - -} \ No newline at end of file diff --git a/h-source/Examples/Tables/mysql/admin_session.txt b/h-source/Examples/Tables/mysql/admin_session.txt deleted file mode 100755 index 8e5f604..0000000 --- a/h-source/Examples/Tables/mysql/admin_session.txt +++ /dev/null @@ -1,52 +0,0 @@ -tables: - -#default admin session tables - -create table adminusers ( - id_user INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - username VARCHAR(80) binary NOT NULL, - password CHAR(40) binary NOT NULL, - last_failure INT UNSIGNED NOT NULL, - has_confirmed INT UNSIGNED NOT NULL, - unique(username), - index(username, password) -)engine=innodb; - -create table admingroups ( - id_group INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - name VARCHAR(30) binary NOT NULL, - unique(name) -)engine=innodb; - -create table adminusers_groups ( - id_user int(11) UNSIGNED not null, - id_group int(11) UNSIGNED not null, - index group_indx(id_group), - index user_indx(id_user), - foreign key group_fky(id_group) references admingroups (id_group), - foreign key user_fky(id_user) references adminusers (id_user), - unique (id_group,id_user) -)engine=innodb; - - -insert into adminusers (username,password) values ('admin',sha1('admin')); - - -CREATE TABLE adminsessions ( - uid CHAR(32) NOT NULL, - token CHAR(32) NOT NULL, - id_user INT UNSIGNED NOT NULL, - creation_date INT UNSIGNED NOT NULL, - user_agent CHAR(32) NOT NULL, - INDEX(uid) -)engine=innodb; - - -create table accesses ( - id int(12) not null auto_increment primary key, - ip char(20) not null,data char(10) not null, - ora char(8) not null, - username varchar(30) not null -); - - diff --git a/h-source/Examples/Tables/mysql/reg_session.txt b/h-source/Examples/Tables/mysql/reg_session.txt deleted file mode 100755 index f5c4713..0000000 --- a/h-source/Examples/Tables/mysql/reg_session.txt +++ /dev/null @@ -1,63 +0,0 @@ -tables: - -#default registered session tables - -create table regusers ( - id_user INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - username VARCHAR(80) binary NOT NULL, - password CHAR(40) binary NOT NULL, - last_failure INT UNSIGNED NOT NULL, - has_confirmed INT UNSIGNED NOT NULL, - - e_mail VARCHAR(60) binary NOT NULL, - confirmation_token CHAR(32) NOT NULL, - creation_date timestamp default CURRENT_TIMESTAMP, - creation_time INT UNSIGNED NOT NULL, - temp_field CHAR(32) NOT NULL, - deleted CHAR(4) NOT NULL default 'no', - - forgot_token CHAR(32) NOT NULL, - forgot_time INT UNSIGNED NOT NULL, - - unique(username), - index(username, password) -)engine=innodb; - -create table reggroups ( - id_group INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - name VARCHAR(30) binary NOT NULL, - unique(name) -)engine=innodb; - -create table regusers_groups ( - id_user int(11) UNSIGNED not null, - id_group int(11) UNSIGNED not null, - index group_indx(id_group), - index user_indx(id_user), - foreign key group_fky(id_group) references reggroups (id_group), - foreign key user_fky(id_user) references regusers (id_user), - unique (id_group,id_user) -)engine=innodb; - - -insert into regusers (username,password) values ('user',sha1('user')); - - -CREATE TABLE regsessions ( - uid CHAR(32) NOT NULL, - token CHAR(32) NOT NULL, - id_user INT UNSIGNED NOT NULL, - creation_date INT UNSIGNED NOT NULL, - user_agent CHAR(32) NOT NULL, - INDEX(uid) -)engine=innodb; - - -create table regaccesses ( - id int(12) not null auto_increment primary key, - ip char(20) not null,data char(10) not null, - ora char(8) not null, - username varchar(30) not null -); - - diff --git a/h-source/Examples/Views/footer.php b/h-source/Examples/Views/footer.php deleted file mode 100755 index 42e09f0..0000000 --- a/h-source/Examples/Views/footer.php +++ /dev/null @@ -1,3 +0,0 @@ -
- - diff --git a/h-source/Examples/Views/post/form.php b/h-source/Examples/Views/post/form.php deleted file mode 100755 index 5ef5aff..0000000 --- a/h-source/Examples/Views/post/form.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - -
-
- - - - - - - - - - - - - - - - - -
Titolo:'>
Autore:'>
Titolo:
-
-
diff --git a/h-source/Examples/Views/post/form_associate.php b/h-source/Examples/Views/post/form_associate.php deleted file mode 100644 index 5794153..0000000 --- a/h-source/Examples/Views/post/form_associate.php +++ /dev/null @@ -1,19 +0,0 @@ - - - - -
-
- - -
- - -
-
\ No newline at end of file diff --git a/h-source/Examples/Views/post/header.php b/h-source/Examples/Views/post/header.php deleted file mode 100755 index 606de2e..0000000 --- a/h-source/Examples/Views/post/header.php +++ /dev/null @@ -1,16 +0,0 @@ - - -
- -prova - - - - - -
- - - -
- diff --git a/h-source/Examples/Views/post/modify.php b/h-source/Examples/Views/post/modify.php deleted file mode 100755 index dc948e1..0000000 --- a/h-source/Examples/Views/post/modify.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/h-source/Examples/Views/post/popup.php b/h-source/Examples/Views/post/popup.php deleted file mode 100755 index ba543a4..0000000 --- a/h-source/Examples/Views/post/popup.php +++ /dev/null @@ -1,3 +0,0 @@ -
- -
\ No newline at end of file diff --git a/h-source/Examples/Views/post/view.php b/h-source/Examples/Views/post/view.php deleted file mode 100755 index 3f67f2f..0000000 --- a/h-source/Examples/Views/post/view.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/h-source/Examples/Views/post2/form.php b/h-source/Examples/Views/post2/form.php deleted file mode 100755 index 5ef5aff..0000000 --- a/h-source/Examples/Views/post2/form.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - -
-
- - - - - - - - - - - - - - - - - -
Titolo:'>
Autore:'>
Titolo:
-
-
diff --git a/h-source/Examples/Views/post2/header.php b/h-source/Examples/Views/post2/header.php deleted file mode 100755 index 0d9a131..0000000 --- a/h-source/Examples/Views/post2/header.php +++ /dev/null @@ -1,30 +0,0 @@ - - -
- -prova - - - - - - - -
- - - -
- diff --git a/h-source/Examples/Views/post2/modify.php b/h-source/Examples/Views/post2/modify.php deleted file mode 100755 index dc948e1..0000000 --- a/h-source/Examples/Views/post2/modify.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/h-source/Examples/Views/post2/view.php b/h-source/Examples/Views/post2/view.php deleted file mode 100755 index 3f67f2f..0000000 --- a/h-source/Examples/Views/post2/view.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/h-source/Examples/articles.txt b/h-source/Examples/articles.txt deleted file mode 100755 index db3f022..0000000 --- a/h-source/Examples/articles.txt +++ /dev/null @@ -1,8 +0,0 @@ -create table articles ( - id int(5) not null auto_increment primary key, - title varchar(100) not null, - author varchar(100) not null, - category varchar(100) not null, - abstract text CHARACTER SET utf8 not null, - content text CHARACTER SET utf8 not null -); \ No newline at end of file diff --git a/h-source/Examples/boxes.txt b/h-source/Examples/boxes.txt deleted file mode 100644 index f27d7b1..0000000 --- a/h-source/Examples/boxes.txt +++ /dev/null @@ -1,5 +0,0 @@ -create table boxes ( - id int(5) not null auto_increment primary key, - title varchar(100) not null, - xml text CHARACTER SET utf8 not null -); diff --git a/h-source/Examples/index.html b/h-source/Examples/index.html deleted file mode 100644 index 8d1c8b6..0000000 --- a/h-source/Examples/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/h-source/Library/Call.php b/h-source/Library/Call.php index e89b3b0..a2c7e68 100755 --- a/h-source/Library/Call.php +++ b/h-source/Library/Call.php @@ -72,10 +72,10 @@ function callHook() } //rewrite the URL -// if (Route::$rewrite === 'yes') -// { -// $url = rewrite($url); -// } + if (Route::$rewrite === 'yes') + { + $url = rewrite($url); + } // echo $url; @@ -212,18 +212,18 @@ function callHook() } -// //rewrite the URL -// function rewrite($url) -// { -// foreach (Route::$map as $key => $address) -// { -// if (preg_match('/^'.$key.'/',$url)) -// { -// return preg_replace('/^'.$key.'/',$address,$url); -// } -// } -// return ERROR_CONTROLLER.'/'.ERROR_ACTION; -// } +//rewrite the URL +function rewrite($url) +{ + foreach (Route::$map as $key => $address) + { + if (preg_match('/^'.$key.'/',$url)) + { + return preg_replace('/^'.$key.'/',$address,$url); + } + } + return $url; +} function getQueryString() { -- cgit v1.2.3