aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application')
-rw-r--r--h-source/Application/Controllers/BaseController.php171
-rw-r--r--h-source/Application/Controllers/ContactController.php41
-rw-r--r--h-source/Application/Controllers/CreditsController.php41
-rw-r--r--h-source/Application/Controllers/DownloadController.php199
-rw-r--r--h-source/Application/Controllers/GenericController.php658
-rw-r--r--h-source/Application/Controllers/HardwareController.php41
-rw-r--r--h-source/Application/Controllers/HelpController.php40
-rw-r--r--h-source/Application/Controllers/HistoryController.php185
-rw-r--r--h-source/Application/Controllers/HomeController.php58
-rw-r--r--h-source/Application/Controllers/ImageController.php39
-rw-r--r--h-source/Application/Controllers/IssuesController.php171
-rw-r--r--h-source/Application/Controllers/MyController.php209
-rw-r--r--h-source/Application/Controllers/NewsController.php65
-rw-r--r--h-source/Application/Controllers/NotebooksController.php162
-rw-r--r--h-source/Application/Controllers/PrintersController.php158
-rw-r--r--h-source/Application/Controllers/ProjectController.php38
-rw-r--r--h-source/Application/Controllers/ScannersController.php158
-rw-r--r--h-source/Application/Controllers/SearchController.php90
-rw-r--r--h-source/Application/Controllers/UsersController.php428
-rw-r--r--h-source/Application/Controllers/VideocardsController.php152
-rw-r--r--h-source/Application/Controllers/WifiController.php154
-rw-r--r--h-source/Application/Hooks/AfterInitialization.php10
-rw-r--r--h-source/Application/Hooks/BeforeChecks.php16
-rw-r--r--h-source/Application/Hooks/BeforeInitialization.php10
-rw-r--r--h-source/Application/Hooks/index.html1
-rw-r--r--h-source/Application/Include/distributions.php86
-rw-r--r--h-source/Application/Include/hardware.php216
-rw-r--r--h-source/Application/Include/languages.php322
-rw-r--r--h-source/Application/Include/myFunctions.php330
-rw-r--r--h-source/Application/Include/params.php143
-rw-r--r--h-source/Application/Models/BaseModel.php66
-rw-r--r--h-source/Application/Models/BoxesModel.php40
-rw-r--r--h-source/Application/Models/DeletionModel.php51
-rw-r--r--h-source/Application/Models/HardwareModel.php198
-rw-r--r--h-source/Application/Models/HistoryModel.php48
-rw-r--r--h-source/Application/Models/IssuesModel.php131
-rw-r--r--h-source/Application/Models/MessagesModel.php56
-rw-r--r--h-source/Application/Models/NewsModel.php42
-rw-r--r--h-source/Application/Models/NotebooksModel.php69
-rw-r--r--h-source/Application/Models/ParamsModel.php41
-rw-r--r--h-source/Application/Models/PrintersModel.php68
-rw-r--r--h-source/Application/Models/ProfileModel.php70
-rw-r--r--h-source/Application/Models/RevisionsModel.php48
-rw-r--r--h-source/Application/Models/ScannersModel.php68
-rw-r--r--h-source/Application/Models/TalkModel.php52
-rwxr-xr-xh-source/Application/Models/UsersModel.php221
-rw-r--r--h-source/Application/Models/VideocardsModel.php64
-rw-r--r--h-source/Application/Models/WifiModel.php67
-rw-r--r--h-source/Application/Modules/ModBase.php41
-rw-r--r--h-source/Application/Modules/ModImage.php45
-rw-r--r--h-source/Application/Modules/ModLink.php18
-rw-r--r--h-source/Application/Modules/ModLinkimage.php18
-rw-r--r--h-source/Application/Modules/ModRaw.php18
-rw-r--r--h-source/Application/Modules/index.html1
-rw-r--r--h-source/Application/Strings/Lang/It/DbCondStrings.php17
-rw-r--r--h-source/Application/Strings/Lang/It/ModelStrings.php19
-rw-r--r--h-source/Application/Strings/Lang/It/UploadStrings.php26
-rw-r--r--h-source/Application/Strings/Lang/It/ValCondStrings.php69
-rw-r--r--h-source/Application/Strings/Lang/It/index.html1
-rw-r--r--h-source/Application/Strings/Lang/index.html1
-rw-r--r--h-source/Application/Strings/index.html1
-rw-r--r--h-source/Application/Views/Contact/index.php29
-rw-r--r--h-source/Application/Views/Contact/index_es.php29
-rw-r--r--h-source/Application/Views/Contact/index_it.php29
-rw-r--r--h-source/Application/Views/Credits/index.php63
-rw-r--r--h-source/Application/Views/Credits/index_es.php63
-rw-r--r--h-source/Application/Views/Credits/index_it.php64
-rw-r--r--h-source/Application/Views/Download/index.php68
-rw-r--r--h-source/Application/Views/Download/index_es.php68
-rw-r--r--h-source/Application/Views/Download/index_it.php68
-rw-r--r--h-source/Application/Views/Download/xml.php20
-rw-r--r--h-source/Application/Views/Hardware/left.php47
-rw-r--r--h-source/Application/Views/Help/index.php361
-rw-r--r--h-source/Application/Views/Help/index_es.php361
-rw-r--r--h-source/Application/Views/Help/index_fr.php352
-rw-r--r--h-source/Application/Views/Help/index_it.php378
-rw-r--r--h-source/Application/Views/History/viewall.php38
-rw-r--r--h-source/Application/Views/Home/left.php34
-rw-r--r--h-source/Application/Views/Home/left_es.php31
-rw-r--r--h-source/Application/Views/Home/left_fr.php30
-rw-r--r--h-source/Application/Views/Home/left_it.php30
-rw-r--r--h-source/Application/Views/Issues/view.php202
-rw-r--r--h-source/Application/Views/Issues/viewall.php118
-rw-r--r--h-source/Application/Views/My/email.php31
-rw-r--r--h-source/Application/Views/My/goodbye.php61
-rw-r--r--h-source/Application/Views/My/panel.php35
-rw-r--r--h-source/Application/Views/My/password.php31
-rw-r--r--h-source/Application/Views/My/profile.php31
-rw-r--r--h-source/Application/Views/News/index.php49
-rw-r--r--h-source/Application/Views/Notebooks/catalogue.php80
-rw-r--r--h-source/Application/Views/Notebooks/form.php114
-rw-r--r--h-source/Application/Views/Notebooks/page.php92
-rw-r--r--h-source/Application/Views/Printers/catalogue.php80
-rw-r--r--h-source/Application/Views/Printers/form.php104
-rw-r--r--h-source/Application/Views/Printers/page.php92
-rw-r--r--h-source/Application/Views/Project/index.php29
-rw-r--r--h-source/Application/Views/Project/index_es.php29
-rw-r--r--h-source/Application/Views/Project/index_it.php29
-rw-r--r--h-source/Application/Views/Scanners/catalogue.php80
-rw-r--r--h-source/Application/Views/Scanners/form.php104
-rw-r--r--h-source/Application/Views/Scanners/page.php92
-rw-r--r--h-source/Application/Views/Search/form.php72
-rw-r--r--h-source/Application/Views/Search/form_es.php72
-rw-r--r--h-source/Application/Views/Search/form_it.php72
-rw-r--r--h-source/Application/Views/Search/results.php66
-rwxr-xr-xh-source/Application/Views/Users/add.php70
-rw-r--r--h-source/Application/Views/Users/change.php28
-rw-r--r--h-source/Application/Views/Users/confirmation.php42
-rw-r--r--h-source/Application/Views/Users/contributions.php50
-rw-r--r--h-source/Application/Views/Users/forgot.php55
-rwxr-xr-xh-source/Application/Views/Users/login.php57
-rwxr-xr-xh-source/Application/Views/Users/logout.php25
-rw-r--r--h-source/Application/Views/Users/meet.php89
-rw-r--r--h-source/Application/Views/Users/notice.php94
-rw-r--r--h-source/Application/Views/Videocards/catalogue.php79
-rw-r--r--h-source/Application/Views/Videocards/form.php98
-rw-r--r--h-source/Application/Views/Videocards/page.php87
-rw-r--r--h-source/Application/Views/Wifi/catalogue.php80
-rw-r--r--h-source/Application/Views/Wifi/form.php98
-rw-r--r--h-source/Application/Views/Wifi/page.php87
-rw-r--r--h-source/Application/Views/bottom_left.php27
-rw-r--r--h-source/Application/Views/climb.php35
-rw-r--r--h-source/Application/Views/dialog.php100
-rw-r--r--h-source/Application/Views/differences.php43
-rw-r--r--h-source/Application/Views/footer.php38
-rw-r--r--h-source/Application/Views/header.php78
-rw-r--r--h-source/Application/Views/history.php53
-rw-r--r--h-source/Application/Views/if_page_deleted.php49
-rw-r--r--h-source/Application/Views/license_notice.php24
-rw-r--r--h-source/Application/Views/moderator_dialog.php62
-rw-r--r--h-source/Application/Views/right.php118
-rw-r--r--h-source/Application/Views/suggest_dialog.php41
-rw-r--r--h-source/Application/Views/talk.php140
-rw-r--r--h-source/Application/Views/top_left.php142
-rw-r--r--h-source/Application/index.html1
135 files changed, 11985 insertions, 0 deletions
diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php
new file mode 100644
index 0000000..b201165
--- /dev/null
+++ b/h-source/Application/Controllers/BaseController.php
@@ -0,0 +1,171 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class BaseController extends Controller
+{
+
+ protected $lang;
+ protected $ismoderator;
+ protected $querySanitized = true;
+
+ protected $_topMenuClasses = array(
+ "home" => null,
+ "hardware" => null,
+ "credits" => null,
+ "issues" => null,
+ "contact" => null,
+ "search" => null,
+ "news" => null,
+ "download" => null,
+ "help" => null,
+ );
+
+ public function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ header("Cache-Control: no-cache");
+
+ $this->model('BoxesModel');
+
+ $this->load('header');
+ $this->load('footer','last');
+
+ $this->session('registered');
+ $this->s['registered']->checkStatus();
+
+ $data['username'] = null;
+ $data['islogged'] = 'no';
+ $data['token'] = 'token';
+ $data['ismoderator'] = false;
+ $this->ismoderator = false;
+
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ $data['username'] = $this->s['registered']->status['user'];
+ $data['islogged'] = 'yes';
+ $data['token'] = $this->s['registered']->status['token'];
+ $data['ismoderator'] = in_array('moderator',$this->s['registered']->status['groups']) ? true : false;
+ $this->ismoderator = $data['ismoderator'];
+ }
+
+ $data['lang'] = 'en';
+ $this->lang = 'en';
+
+ if (isset($this->_queryString[0]))
+ {
+ $lang = (strcmp($this->_queryString[0],'') !== 0) ? $this->_queryString[0] : 'en';
+ $data['lang'] = Lang::sanitize($lang);
+ $this->lang = $data['lang'];
+ Lang::$current = $data['lang'];
+ }
+
+ $data['tm'] = $this->_topMenuClasses;
+
+// print_r($this->_queryString);
+ $this->_queryString = $this->sanitizeQueryString($this->_queryString);
+
+ $this->append($data);
+
+ }
+
+ protected function right($lang = 'en')
+ {
+ $hard = new HardwareModel();
+
+ $data['stat'] = $hard->clear()->select('type,count(*) AS numb')->where(array('-deleted'=>'no'))->groupBy('type')->toList('type','aggregate.numb')->send();
+
+ $logged = $this->s['registered']->getUsersLogged();
+
+ $data['numbLogged'] = count($logged);
+
+ // get the right column container
+ $this->m['BoxesModel']->setWhereQueryClause(array('title'=>'right_bottom'));
+ $boxes = $this->m['BoxesModel']->getAll('boxes');
+
+ if (count($boxes) > 0)
+ {
+ $xml = htmlspecialchars_decode($boxes[0]['boxes']['message'],ENT_QUOTES);
+
+ $box_news = new BoxParser($xml);
+ $data['htmlRightBox'] = $box_news->render();
+ }
+ else
+ {
+ $data['htmlRightBox'] = null;
+ }
+
+ $data['language_links'] = $this->buildLanguageLinks($this->lang);
+
+// print_r($this->_queryString);
+
+ $this->append($data);
+ $this->load('right');
+ }
+
+ protected function sanitizeQueryString($queryArray)
+ {
+ $resArray = array();
+ foreach ($queryArray as $item)
+ {
+ if (preg_match('/^[a-zA-Z0-9\-\_\.\+\s]+$/',$item))
+ {
+ $resArray[] = sanitizeAll($item);
+ }
+ else
+ {
+ $this->querySanitized = false;
+ return array('en');
+ }
+ }
+ return $resArray;
+ }
+
+ protected function buildLanguageLinks($lang)
+ {
+ $status = $this->_queryString;
+ $cPage = $this->querySanitized ? $this->currPage : $this->baseUrl."/home/index";
+ $link = "<ul class='languages_link_box'>\n";
+ foreach (Lang::$complete as $abbr => $fullName)
+ {
+ $linkClass = (strcmp($abbr,$lang) === 0) ? "class='current_lang'" : null;
+ $status[0] = $abbr;
+ $href = Url::createUrl($status);
+ $fullNameArray = explode(',',$fullName);
+ $text = "<img src='".$this->baseUrl."/Public/Img/Famfamfam/".$fullNameArray[0]."'><span>".$fullNameArray[1]."</span>";
+ $link .= "\t<li><a $linkClass href='".$cPage.$href."'>$text</a></li>\n";
+ }
+ $link .= "</ul>\n";
+ return $link;
+ }
+
+ protected function cleverLoad($file)
+ {
+ $fileInt = $file."_".$this->lang;
+ if (file_exists(ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . ucwords($this->controller) . DS . $fileInt . '.php'))
+ {
+ $this->load($fileInt);
+ }
+ else
+ {
+ $this->load($file);
+ }
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/ContactController.php b/h-source/Application/Controllers/ContactController.php
new file mode 100644
index 0000000..f1fe89e
--- /dev/null
+++ b/h-source/Application/Controllers/ContactController.php
@@ -0,0 +1,41 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class ContactController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['contact'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ $data['title'] = 'contact - '.Website::$generalName;
+ $this->append($data);
+ }
+
+ public function index($lang = 'en')
+ {
+ $this->cleverLoad('index');
+ $this->right();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/CreditsController.php b/h-source/Application/Controllers/CreditsController.php
new file mode 100644
index 0000000..ba19624
--- /dev/null
+++ b/h-source/Application/Controllers/CreditsController.php
@@ -0,0 +1,41 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class CreditsController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['credits'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ $data['title'] = 'credits - '.Website::$generalName;
+ $this->append($data);
+ }
+
+ public function index($lang = 'en')
+ {
+ $this->cleverLoad('index');
+ $this->right();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php
new file mode 100644
index 0000000..4952456
--- /dev/null
+++ b/h-source/Application/Controllers/DownloadController.php
@@ -0,0 +1,199 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class DownloadController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['download'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ $this->model('HardwareModel');
+
+ $data['title'] = 'download - '.Website::$generalName;
+ $this->append($data);
+ }
+
+ public function index($lang = 'en')
+ {
+ $this->cleverLoad('index');
+ $this->right($lang);
+ }
+
+ //get the xml of the archive
+ private function getXml($res)
+ {
+ $xml = null;
+ $xml = "<?xml version='1.0' encoding='UTF-8'?>\n";
+ $xml .= "<hardware>\n";
+ $xml .= "\t<general_informations>\n";
+ $xml .= "\t\t<credits>h-node project</credits>\n";
+ $xml .= "\t\t<link>www.h-node.com</link>\n";
+ $xml .= "\t\t<date>".date("Y-m-d h:m:s")."</date>\n";
+ $xml .= "\t\t<license>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.</license>\n";
+ $xml .= "\t</general_informations>\n";
+
+ foreach ($res as $row)
+ {
+ $type = $row['hardware']['type'];
+ $xml .= "\t<device>\n";
+
+ $xml .= "\t\t<id>".$row['hardware']['id_hard']."</id>\n";
+ $xml .= "\t\t<type>".$row['hardware']['type']."</type>\n";
+
+ if ($type === 'notebook')
+ {
+ $xml .= "\t\t<subtype>".$row['hardware']['subtype']."</subtype>\n";
+ }
+
+ $xml .= "\t\t<model_name>".$row['hardware']['model']."</model_name>\n";
+
+ if ($type !== 'notebook')
+ {
+ $xml .= "\t\t<vendorid_productid>".$row['hardware']['pci_id']."</vendorid_productid>\n";
+ }
+
+ $xml .= "\t\t<vendor>".$row['hardware']['vendor']."</vendor>\n";
+ $xml .= "\t\t<kernel_libre>".$row['hardware']['kernel']."</kernel_libre>\n";
+ $xml .= "\t\t<distribution>".$row['hardware']['distribution']."</distribution>\n";
+ $xml .= "\t\t<year>".$row['hardware']['comm_year']."</year>\n";
+ if ($type !== 'notebook')
+ {
+ $xml .= "\t\t<interface>".$row['hardware']['interface']."</interface>\n";
+ }
+
+ if ($type === 'notebook' or $type === 'printer' or $type === 'scanner')
+ {
+ $xml .= "\t\t<compatibility>".$row['hardware']['compatibility']."</compatibility>\n";
+ }
+
+ if ($type === 'notebook')
+ {
+ $xml .= "\t\t<wifi_card>".$row['hardware']['wifi_type']."</wifi_card>\n";
+ $xml .= "\t\t<videocard>".$row['hardware']['video_card_type']."</videocard>\n";
+ }
+
+ if ($type === 'notebook' or $type === 'wifi')
+ {
+ $xml .= "\t\t<wifi_works>".$row['hardware']['wifi_works']."</wifi_works>\n";
+ }
+
+ if ($type === 'notebook' or $type === 'videocard')
+ {
+ $xml .= "\t\t<videocard_works>".$row['hardware']['video_card_works']."</videocard_works>\n";
+ }
+ if ($type === 'printer' or $type === 'scanner')
+ {
+ $xml .= "\t\t<driver>".$row['hardware']['driver']."</driver>\n";
+ }
+ $xml .= "\t\t<description><![CDATA[".$row['hardware']['description']."]]></description>\n";
+
+ $xml .= "\t\t<link>".$this->baseUrl."/".MyStrings::$reverse[$type]."/view/".$this->lang."/".$row['hardware']['id_hard']."/".encodeUrl($row['hardware']['model'])."</link>\n";
+ $xml .= "\t\t<created_by>".$this->baseUrl."/".MyStrings::$reverse[$type]."/history/".$this->lang."/".$row['hardware']['id_hard']."</created_by>\n";
+
+ $xml .= "\t</device>\n";
+ }
+
+ $xml .= "</hardware>\n";
+
+ return $xml;
+ }
+
+ public function all($lang = 'en')
+ {
+ header ("Content-Type:text/xml");
+
+ $res = $this->m['HardwareModel']->clear()->select()->where(array('-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send();
+
+ $data['xml'] = $this->getXml($res);
+
+ $this->append($data);
+ $this->clean();
+ $this->load('xml');
+ }
+
+ public function notebooks($lang = 'en')
+ {
+ header ("Content-Type:text/xml");
+
+ $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'notebook','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send();
+
+ $data['xml'] = $this->getXml($res);
+
+ $this->append($data);
+ $this->clean();
+ $this->load('xml');
+ }
+
+ public function wifi($lang = 'en')
+ {
+ header ("Content-Type:text/xml");
+
+ $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'wifi','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send();
+
+ $data['xml'] = $this->getXml($res);
+
+ $this->append($data);
+ $this->clean();
+ $this->load('xml');
+ }
+
+ public function videocards($lang = 'en')
+ {
+ header ("Content-Type:text/xml");
+
+ $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'videocard','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send();
+
+ $data['xml'] = $this->getXml($res);
+
+ $this->append($data);
+ $this->clean();
+ $this->load('xml');
+ }
+
+ public function printers($lang = 'en')
+ {
+ header ("Content-Type:text/xml");
+
+ $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'printer','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send();
+
+ $data['xml'] = $this->getXml($res);
+
+ $this->append($data);
+ $this->clean();
+ $this->load('xml');
+ }
+
+ public function scanners($lang = 'en')
+ {
+ header ("Content-Type:text/xml");
+
+ $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'scanner','-deleted'=>'no'))->orderBy("type,hardware.id_hard")->send();
+
+ $data['xml'] = $this->getXml($res);
+
+ $this->append($data);
+ $this->clean();
+ $this->load('xml');
+ }
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php
new file mode 100644
index 0000000..a08956e
--- /dev/null
+++ b/h-source/Application/Controllers/GenericController.php
@@ -0,0 +1,658 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class GenericController extends BaseController
+{
+
+ protected $_controllerName = null; //as in the URL
+
+ public $orderPopup;
+
+ public function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ $popup = new Popup();
+ $popup->name = gtext('sort by');
+ switch ($this->controller)
+ {
+ case 'wifi':
+ $popup->itemsName = array('last inserted','alphabetically','alphabetically desc');
+ $popup->itemsValue = array('last-inserted','alphabetically','alphabetically-desc');
+ break;
+ case 'videocards':
+ $popup->itemsName = array('last inserted','alphabetically','alphabetically desc');
+ $popup->itemsValue = array('last-inserted','alphabetically','alphabetically-desc');
+ break;
+ default:
+ $popup->itemsName = array('last inserted','alphabetically','alphabetically desc','compatibility');
+ $popup->itemsValue = array('last-inserted','alphabetically','alphabetically-desc','compatibility');
+ break;
+ }
+
+ $this->orderPopup = $popup;
+
+ }
+
+ protected function insert($lang = 'en', $token = '')
+ {
+ $this->shift(2);
+
+ $clean['token'] = sanitizeAlphanum($token);
+
+ $data['notice'] = null;
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . " <span class='last_tree_element'>insert</span>";
+
+ $this->s['registered']->checkStatus();
+
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..');
+
+ if (isset($_POST['insertAction']))
+ {
+ if ($this->checkDist())
+ {
+ $pci_id = $this->request->post('pci_id','','sanitizeAll');
+ if (strcmp($pci_id,'') !== 0)
+ {
+ $this->m['HardwareModel']->databaseConditions['insert']['+checkUnique'] = 'pci_id|<i>VendorID:ProductID</i> is already present in the database. This means that the device you are trying to insert is already in the database';
+ }
+
+ //insert the new device
+ $this->m['HardwareModel']->updateTable('insert');
+
+ if ($this->m['HardwareModel']->queryResult)
+ {
+ if (strcmp($this->controller,'notebooks') === 0)
+ {
+ session_start();
+ $_SESSION['notebook_inserted'] = 'yes';
+ }
+ }
+
+ $this->viewRedirect($this->m['HardwareModel']->lastId);
+ }
+ }
+
+ $data['notice'] = $this->m['HardwareModel']->notice;
+
+ $data['submitName'] = "insertAction";
+ $data['hiddenInput'] = null;
+
+ $data['values'] = $this->m['HardwareModel']->getFormValues('insert','sanitizeHtml');
+ $this->append($data);
+
+ $this->load('top_left');
+ $this->load('license_notice');
+ $this->load('form');
+ $this->load('bottom_left');
+ $this->right();
+ }
+ else
+ {
+ $this->redirect('users/login/'.$this->lang.'/'.$this->controller.'/catalogue',0);
+ }
+ }
+
+ public function del($lang = 'en', $token = '')
+ {
+ header('Content-type: text/html; charset=UTF-8');
+
+ $this->shift(2);
+
+ $this->clean();
+
+ $clean['token'] = sanitizeAlphanum($token);
+
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if (!$this->s['registered']->checkCsrf($clean['token'])) die("wrong token");
+
+ $clean['id_user'] = (int)$this->s['registered']->status['id_user'];
+ $clean['id_hard'] = $this->request->post('id_hard',0,'forceInt');
+
+ $this->model("DeletionModel");
+
+ $numb = $this->m['DeletionModel']->where(array("id_hard"=>$clean['id_hard'],"created_by"=>$clean['id_user']))->rowNumber();
+
+ if ($numb === 0)
+ {
+ $id_dup = $this->request->post('id_duplicate',0,'forceInt');
+ $object = $this->request->post('object','','sanitizeAll');
+
+ if ($id_dup === 0 and strcmp($object,'duplication') === 0)
+ {
+ echo "you have no specified the device duplicated by this model";
+ }
+ else
+ {
+ $this->m['DeletionModel']->setFields('id_hard:forceInt,object,message,id_duplicate:forceInt','sanitizeAll');
+ $this->m['DeletionModel']->values['created_by'] = $clean['id_user'];
+
+ $this->m['DeletionModel']->updateTable('insert');
+ if ($this->m['DeletionModel']->queryResult)
+ {
+ $hard = new HardwareModel();
+ $c = $hard->where(array('id_hard'=>$clean['id_hard'],'ask_for_del'=>'yes'))->rowNumber();
+ if ($c < 1)
+ {
+ $hard->db->update('hardware','ask_for_del',array('yes'),'id_hard='.$clean['id_hard']);
+ }
+ echo "operation executed";
+ }
+ else
+ {
+ echo "one error occurred, please try later";
+ }
+ }
+ }
+ else
+ {
+ echo "you have already asked for the deletion of this device";
+ }
+ }
+ }
+
+ protected function update($lang = 'en', $token = '')
+ {
+ $this->shift(2);
+
+ $clean['token'] = sanitizeAlphanum($token);
+
+ $data['notice'] = null;
+ $this->s['registered']->checkStatus();
+
+ if (isset($_POST['id_hard']))
+ {
+ //get the id
+ $clean['id_hard'] = isset($_POST['id_hard']) ? (int)$_POST['id_hard'] : 0;
+
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..');
+
+ $deleted = $this->m['HardwareModel']->select("hardware.deleted")->where(array("id_hard"=>$clean['id_hard']))->limit(1)->toList('deleted')->send();
+
+ if (strcmp($deleted[0],'no') === 0)
+ {
+ $ne_name = $this->m['HardwareModel']->getTheModelName($clean['id_hard']);
+ $name = encodeUrl($ne_name);
+ $data['name'] = $name;
+ $data['ne_name'] = $ne_name;
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($clean['id_hard'],$name) . " &raquo; <span class='last_tree_element'>edit</span>";
+
+ if (isset($_POST['updateAction']))
+ {
+ if ($this->checkDist())
+ {
+ $pci_id = $this->request->post('pci_id','','sanitizeAll');
+ if (strcmp($pci_id,'') !== 0)
+ {
+ $this->m['HardwareModel']->databaseConditions['update']['+checkUniqueCompl'] = 'pci_id|<i>VendorID:ProductID</i> is already present in the database. This means that the device you are trying to insert is already in the database';
+ }
+
+ //carry out the update database action
+ $this->m['HardwareModel']->updateTable('update');
+
+ $this->viewRedirect($this->m['HardwareModel']->lastId);
+ }
+ }
+
+ $data['notice'] = $this->m['HardwareModel']->notice;
+
+ $data['id_hard'] = $clean['id_hard'];
+ $data['submitName'] = "updateAction";
+ // echo $this->m['HardwareModel']->fields;
+ $data['values'] = $this->m['HardwareModel']->getFormValues('update','sanitizeHtml');
+ $data['hiddenInput'] = "<input type='hidden' name='id_hard' value='".$clean['id_hard']."'>\n";
+
+ $this->append($data);
+
+ $this->load('top_left');
+ $this->load('license_notice');
+ $this->load('form');
+ $this->load('bottom_left');
+ $this->right();
+ }
+ else
+ {
+ $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'deleted..');
+ }
+ }
+ else
+ {
+ $this->redirect('users/login/'.$this->lang.'/'.$this->controller.'/view/'.$clean['id_hard'],0);
+ }
+ }
+ else
+ {
+ $this->redirect($this->controller.'/catalogue/'.$this->lang);
+ }
+ }
+
+ protected function checkDist()
+ {
+ if (array_key_exists('distribution',$_POST))
+ {
+ if (strcmp($_POST['distribution'],"") !== 0)
+ {
+ if (Distributions::check($_POST['distribution']))
+ {
+ return true;
+ }
+ else
+ {
+ $this->m['HardwareModel']->result = false;
+ $this->m['HardwareModel']->notice = "<div class='alert'>Distribution not allowed..</div>\n";
+ return false;
+ }
+ }
+ else
+ {
+ $this->m['HardwareModel']->result = false;
+ $this->m['HardwareModel']->notice = "<div class='alert'>Distribution not defined..</div>\n";
+ return false;
+ }
+ }
+ $this->m['HardwareModel']->result = false;
+ return false;
+ }
+
+ protected function viewRedirect($id)
+ {
+ $clean['id'] = (int)$id;
+
+ if ($this->m['HardwareModel']->queryResult)
+ {
+ $name = encodeUrl($this->m['HardwareModel']->getTheModelName($clean['id']));
+ $this->redirect($this->controller.'/view/'.$this->lang.'/'.$clean['id'].'/'.$name.$this->viewStatus);
+ }
+ }
+
+ //load the view files
+ protected function loadViewAll($viewName = null)
+ {
+ $this->load('top_left');
+ $viewArray = explode(',',$viewName);
+ foreach ($viewArray as $viewFile)
+ {
+ $this->load($viewFile);
+ }
+ $this->load('bottom_left');
+ $this->right();
+ }
+
+ protected function catalogue($lang = 'en')
+ {
+ $data['title'] = $this->controller.' - '.Website::$generalName;
+
+ Params::$nullQueryValue = 'undef';
+
+ $data['tree'] = $this->controller;
+
+ $this->mod->aWhere(array("deleted"=>"no"));
+
+ $this->mod->popupBuild();
+ $popup = $this->mod->popupArray;
+ $popup['sort-by'] = $this->orderPopup;
+
+ $this->helper('Popup',$this->controller.'/catalogue/'.$this->lang,$popup,'inclusive','page');
+ //create the HTML of the popup
+ $data['popup'] = $this->h['Popup']->render();
+
+ $this->mod->orderBy = getOrderByClause($this->viewArgs['sort-by']);
+ $recordNumber = $this->mod->rowNumber();
+
+ $data['recordNumber'] = $recordNumber;
+
+ //load the Pages helper
+ $this->helper('Pages',$this->controller.'/catalogue/'.$this->lang,'page');
+ $page = $this->viewArgs['page'];
+ //set the limit clause
+ $this->mod->limit = $this->h['Pages']->getLimit($page,$recordNumber,10);
+
+ $data['table'] = $this->mod->getAll();
+// echo $this->mod->getQuery();
+
+ $data['pageList'] = $this->h['Pages']->render($page-3,7);
+
+ $this->append($data);
+
+ $this->loadViewAll('catalogue');
+ }
+
+ protected function view($lang = 'en', $id_hard = 0, $name = null)
+ {
+ $this->shift(3);
+
+ //set the history_page to 1 in the viewStatus
+ $this->viewArgs['history_page'] = 1;
+ $this->buildStatus();
+
+ $clean['id_hard'] = (int)$id_hard;
+ $data['id_hard'] = $clean['id_hard'];
+ $data['ne_name'] = null;
+ $data['name'] = null;
+ $data['tree'] = null;
+ $data['isDeleted'] = 'no';
+
+ if ($this->mod->checkType($clean['id_hard']))
+ {
+ $this->mod->setWhereQueryClause(array("id_hard" => $clean['id_hard']));
+ $data['table'] = $this->mod->getAll();
+
+ if (count($data['table']) > 0)
+ {
+
+ $data['talk_number'] = $this->m['TalkModel']->select('count(*) as numb,id_hard')->where(array('id_hard'=>$clean['id_hard']))->rowNumber();
+
+ $data['ne_name'] = $data['table'][0]['hardware']['model'];
+ $data['name'] = encodeUrl($data['ne_name']);
+ $data['title'] = $data['ne_name'].' - '.Website::$generalName;
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; <span class='last_tree_element'>".$data['ne_name']."</span>";
+ $data['isDeleted'] = $data['table'][0]['hardware']['deleted'];
+
+ if (strcmp($data['isDeleted'],'yes') === 0)
+ {
+ $deletion = new DeletionModel();
+ $data['deletion'] = $deletion->select()->where(array('id_hard'=>$clean['id_hard']))->send();
+ $data['deletionUsers'] = $deletion->getList($data['deletion'],'created_by');
+ }
+ }
+
+ $this->append($data);
+
+ session_start();
+ if ( isset($_SESSION['notebook_inserted']) and strcmp($this->controller,'notebooks') === 0 )
+ {
+ $viewFilesList = 'suggest_dialog,dialog,page,if_page_deleted';
+ unset($_SESSION['notebook_inserted']);
+ }
+ else
+ {
+ $viewFilesList = 'dialog,page,if_page_deleted';
+ }
+
+ $this->loadViewAll($viewFilesList);
+ }
+ else
+ {
+// $this->redirect($this->_controller.'/'.);
+ }
+ }
+
+ protected function history($lang = 'en', $id = 0)
+ {
+ $this->shift(2);
+ $clean['id'] = (int)$id;
+ $data['id'] = $clean['id'];
+ $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($clean['id']);
+ $data['name'] = encodeUrl($data['ne_name']);
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($clean['id'],$data['name'])." &raquo; <span class='last_tree_element'>history</span>";
+
+ $data['title'] = 'history - '.Website::$generalName;
+
+ //get the first revision
+ $res = $this->m['RevisionsModel']->db->select('revisions','id_rev','id_hard='.$clean['id'],null,'id_rev',1);
+ if (count($res) > 0)
+ {
+ $data['firstRev'] = $res[0]['revisions']['id_rev'];
+ }
+
+ $res1 = $this->m['HardwareModel']->db->select('hardware','update_date,updated_by','id_hard='.$clean['id']);
+
+ $this->m['RevisionsModel']->setWhereQueryClause(array('id_hard' => $clean['id']));
+
+ //load the Pages helper
+ $this->helper('Pages',$this->controller.'/history/'.$this->lang.'/'.$clean['id'],'history_page');
+ //get the number of records
+ $recordNumber = $this->m['RevisionsModel']->rowNumber();
+ $page = $this->viewArgs['history_page'];
+ //set the limit clause
+ $this->m['RevisionsModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,20);
+ $res2 = $this->m['RevisionsModel']->getFields('update_date,updated_by,id_rev');
+
+ $data['pageList'] = $this->h['Pages']->render($page-3,7);
+
+
+ $data['rev1'] = $res1;
+ $data['rev2'] = $res2;
+
+ $this->append($data);
+ $this->loadViewAll('history');
+ }
+
+ protected function revision($lang = 'en', $id_rev = 0)
+ {
+ $this->shift(2);
+ $clean['id_rev'] = (int)$id_rev;
+
+ $this->m['RevisionsModel']->setWhereQueryClause(array("id_rev" => $clean['id_rev']));
+ $data['table'] = $this->m['RevisionsModel']->getAll();
+
+ $data['id_hard'] = 0;
+ $data['updated_by'] = null;
+ $data['update_date'] = null;
+ $data['name'] = null;
+ $data['ne_name'] = null;
+ $data['tree'] = null;
+ $data['isDeleted'] = 'no';
+
+ if (count($data['table']) > 0)
+ {
+ $data['id_hard'] = (int)$data['table'][0]['revisions']['id_hard'];
+ $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($data['id_hard']);
+ $data['name'] = encodeUrl($data['ne_name']);
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($data['id_hard'],$data['name'])." &raquo; " . $this->getHistoryLink($data['id_hard']) . " &raquo; <span class='last_tree_element'>revision</span>";
+
+ $data['title'] = 'revision - '.Website::$generalName;
+
+ $data['updated_by'] = $data['table'][0]['revisions']['updated_by'];
+ $data['update_date'] = $data['table'][0]['revisions']['update_date'];
+ }
+
+ $this->append($data);
+ $this->loadViewAll('page');
+ }
+
+ protected function differences($lang = 'en', $id_hard = 0, $id_rev = 0)
+ {
+ $this->shift(3);
+
+ $data['title'] = 'differences - '.Website::$generalName;
+
+ $clean['id_hard'] = (int)$id_hard;
+ $clean['id_rev'] = (int)$id_rev;
+
+ $data['id_hard'] = $clean['id_hard'];
+ $data['name'] = encodeUrl($this->m['HardwareModel']->getTheModelName((int)$data['id_hard']));
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($data['id_hard'],$data['name'])." &raquo; " . $this->getHistoryLink($clean['id_hard']) . " &raquo; <span class='last_tree_element'>differences</span>";
+
+ $data['showDiff'] = false;
+
+ $diffArray = array();
+
+ if (strcmp($clean['id_hard'],0) !== 0 and strcmp($clean['id_rev'],0) !== 0)
+ {
+ $this->m['RevisionsModel']->setWhereQueryClause(array('id_hard' => $clean['id_hard'],'id_rev' => '<='.$clean['id_rev']));
+ $this->m['RevisionsModel']->limit = 2;
+ $res = $this->m['RevisionsModel']->getAll();
+ if (count($res) > 1)
+ {
+ $newArray = $res[0]['revisions'];
+ $oldArray = $res[1]['revisions'];
+
+ $data['update_new'] = $newArray['update_date'];
+ $data['update_old'] = $oldArray['update_date'];
+ $data['updated_by'] = $newArray['updated_by'];
+
+ $diffArray = $this->mod->getDiffArray($oldArray, $newArray);
+
+ $data['showDiff'] = true;
+ }
+ }
+ else if (strcmp($clean['id_hard'],0) !== 0 and strcmp($clean['id_rev'],0) === 0)
+ {
+ $this->mod->setWhereQueryClause(array('id_hard' => $clean['id_hard']));
+ $lastRes = $this->mod->getAll();
+
+ if (count($lastRes) > 0)
+ {
+ $this->m['RevisionsModel']->setWhereQueryClause(array('id_hard' => $clean['id_hard']));
+ $this->m['RevisionsModel']->limit = 1;
+ $revRes = $this->m['RevisionsModel']->getAll();
+
+ if (count($revRes) > 0)
+ {
+ $newArray = $lastRes[0]['hardware'];
+ $oldArray = $revRes[0]['revisions'];
+
+ $data['update_new'] = $newArray['update_date'];
+ $data['update_old'] = $oldArray['update_date'];
+ $data['updated_by'] = $newArray['updated_by'];
+
+ $diffArray = $this->mod->getDiffArray($oldArray, $newArray);
+
+ $data['showDiff'] = true;
+ }
+ }
+
+ }
+
+ $data['fieldsWithBreaks'] = $this->mod->fieldsWithBreaks;
+ $data['diffArray'] = $diffArray;
+
+ $this->append($data);
+ $this->loadViewAll('differences');
+ }
+
+ protected function climb($lang = 'en', $id_rev = 0, $token = '')
+ {
+ $this->shift(3);
+
+ $data['title'] = 'make current - '.Website::$generalName;
+
+ $clean['token'] = sanitizeAlphanum($token);
+
+ $clean['id_rev'] = (int)$id_rev;
+ $clean['id_hard'] = (int)$this->m['RevisionsModel']->getIdHard($clean['id_rev']);
+
+ if ($clean['id_hard'] !== 0)
+ {
+ $deleted = $this->m['HardwareModel']->select("hardware.deleted")->where(array("id_hard"=>$clean['id_hard']))->limit(1)->toList('deleted')->send();
+
+ $data['isDeleted'] = $deleted[0];
+
+ $data['id_rev'] = $clean['id_rev'];
+ $data['id_hard'] = $clean['id_hard'];
+ $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($clean['id_hard']);
+ $data['name'] = encodeUrl($data['ne_name']);
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($data['id_hard'],$data['name'])." &raquo; " . $this->getHistoryLink($clean['id_hard']) . " &raquo; <span class='last_tree_element'>make current</span>";
+
+ $data['notice'] = null;
+ $this->s['registered']->checkStatus();
+
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..');
+
+ if (isset($_POST['confirmAction']))
+ {
+ if (strcmp($deleted[0],'no') === 0)
+ {
+ $this->m['HardwareModel']->makeCurrent($clean['id_rev']);
+
+ $this->viewRedirect($this->m['HardwareModel']->lastId);
+
+ $data['notice'] = $this->m['HardwareModel']->notice;
+ }
+ else
+ {
+ $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'deleted..');
+ }
+ }
+
+ $this->append($data);
+ $this->loadViewAll('climb');
+ }
+ else
+ {
+ $this->redirect('users/login/'.$this->lang.'/'.$this->controller.'/view/'.$clean['id_hard'],0);
+ }
+ }
+ }
+
+ protected function talk($lang = 'en', $id_hard = 0, $token = 'token')
+ {
+ $this->shift(3);
+
+ $this->m['TalkModel']->setFields('title,message','sanitizeAll');
+
+ $data['title'] = 'talk - '.Website::$generalName;
+
+ $clean['token'] = sanitizeAlphanum($token);
+ $clean['id_hard'] = (int)$id_hard;
+ $data['id_hard'] = $clean['id_hard'];
+ $data['ne_name'] = $this->m['HardwareModel']->getTheModelName($clean['id_hard']);
+ $data['name'] = encodeUrl($data['ne_name']);
+ $data['tree'] = $this->getSpecHardLink() . " &raquo; " . $this->getViewLink($clean['id_hard'],$data['name'])." &raquo; <span class='last_tree_element'>talk</span>";
+
+ if (isset($_POST['insertAction']))
+ {
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..');
+
+ $this->m['TalkModel']->values['created_by'] = $this->s['registered']->status['id_user'];
+ $this->m['TalkModel']->values['id_hard'] = $clean['id_hard'];
+
+ $this->m['TalkModel']->updateTable('insert');
+ }
+ }
+
+ $data['table'] = $this->m['TalkModel']->select()->where(array('id_hard'=>$clean['id_hard']))->orderBy('id_talk')->send();
+
+ $data['values'] = $this->m['TalkModel']->getFormValues('insert','sanitizeHtml');
+ $data['notice'] = $this->m['TalkModel']->notice;
+
+// javascript for moderator
+ $data['md_javascript'] = "moderator_dialog(\"hide\",\"talk\");moderator_dialog(\"show\",\"talk\");";
+ $data['go_to'] = $this->currPage."/".$this->lang."/".$clean['id_hard'];
+
+ $this->append($data);
+ $this->loadViewAll('talk,moderator_dialog');
+ }
+
+ protected function getViewLink($id,$name)
+ {
+ return "<a href='".$this->baseUrl.'/'.$this->controller.'/view/'.$this->lang.'/'.$id.'/'.$name.$this->viewStatus."'>".urldecode($name)."</a>";
+ }
+
+ protected function getHistoryLink($id)
+ {
+ return "<a href='".$this->baseUrl.'/'.$this->controller.'/history/'.$this->lang.'/'.$id.'/'.$this->viewStatus."'>history</a>";
+ }
+
+ protected function getSpecHardLink()
+ {
+ return "<a href='".$this->baseUrl.'/'.$this->controller.'/catalogue/'.$this->lang.$this->viewStatus."'>".$this->controller."</a>";
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/HardwareController.php b/h-source/Application/Controllers/HardwareController.php
new file mode 100644
index 0000000..6a189ed
--- /dev/null
+++ b/h-source/Application/Controllers/HardwareController.php
@@ -0,0 +1,41 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class HardwareController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['hardware'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ $data['title'] = 'hardware - '.Website::$generalName;
+ $this->append($data);
+ }
+
+ public function catalogue($lang = 'en')
+ {
+ $this->load('left');
+ $this->right();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/HelpController.php b/h-source/Application/Controllers/HelpController.php
new file mode 100644
index 0000000..40908cf
--- /dev/null
+++ b/h-source/Application/Controllers/HelpController.php
@@ -0,0 +1,40 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class HelpController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['help'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ $data['title'] = 'help index - '.Website::$generalName;
+ $this->append($data);
+ }
+
+ public function index($lang = 'en')
+ {
+ $this->cleverLoad('index');
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/HistoryController.php b/h-source/Application/Controllers/HistoryController.php
new file mode 100644
index 0000000..2d965ac
--- /dev/null
+++ b/h-source/Application/Controllers/HistoryController.php
@@ -0,0 +1,185 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class HistoryController extends BaseController
+{
+
+ protected $strings = array(
+
+ 'hide' => array(
+
+ 'action' => 'hide',
+ 'check_status' => 'no',
+ 'to_status' => 'yes',
+ 'exec_string' => 'The message has been hidden. Just reload the page',
+ 'error_string' => 'Error: the message is already hidden',
+
+ ),
+
+ 'show' => array(
+
+ 'action' => 'show',
+ 'check_status' => 'yes',
+ 'to_status' => 'no',
+ 'exec_string' => 'The message is no more hidden. Just reload the page',
+ 'error_string' => 'Error: the message is already visible',
+
+ ),
+
+ );
+
+ protected $types = array(
+
+ 'message' => array(
+
+ 'clean_type' => 'message',
+ 'model_name' => 'MessagesModel',
+ 'id_name' => 'id_mes',
+
+ ),
+
+ 'talk' => array(
+
+ 'clean_type' => 'talk',
+ 'model_name' => 'TalkModel',
+ 'id_name' => 'id_talk',
+
+ ),
+
+ );
+
+ public function __construct($model, $controller, $queryString)
+ {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->model('HistoryModel');
+
+ }
+
+ public function hide($lang = 'en', $token = '')
+ {
+ $this->generic($lang, $token, 'hide');
+ }
+
+ public function show($lang = 'en', $token = '')
+ {
+ $this->generic($lang, $token, 'show');
+ }
+
+ protected function generic($lang = 'en', $token = '', $action = 'hide')
+ {
+ header('Content-type: text/html; charset=UTF-8');
+
+ $this->shift(2);
+
+ $this->clean();
+
+ $clean['token'] = sanitizeAlphanum($token);
+
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if ($this->ismoderator)
+ {
+ if (!$this->s['registered']->checkCsrf($clean['token'])) die("wrong token");
+
+ $clean['id_user'] = (int)$this->s['registered']->status['id_user'];
+ $clean['id'] = $this->request->post('id',0,'forceInt');
+ $type = $this->request->post('type',0,'sanitizeAll');
+ $message = $this->request->post('message','');
+
+ $modelName = 'error';
+
+ if (array_key_exists($type,$this->types))
+ {
+ $modelName = $this->types[$type]['model_name'];
+ $clean['type'] = $this->types[$type]['clean_type'];
+ $clean['id_name'] = $this->types[$type]['id_name'];
+
+ //load the right model
+ $this->model($modelName);
+ $model = $this->m[$modelName];
+
+ $count = $model->select()->where(array($clean['id_name'] => $clean['id'],'deleted' => $this->strings[$action]['check_status']))->rowNumber();
+
+ if ($count > 0)
+ {
+ if (eg_strlen($message) < 500)
+ {
+ //hide the message
+ $model->values = array('deleted' => $this->strings[$action]['to_status']);
+ $model->update($clean['id']);
+
+ if ($model->queryResult)
+ {
+ $this->m['HistoryModel']->setFields('id:forceInt,type,message','sanitizeAll');
+ $this->m['HistoryModel']->values['created_by'] = $clean['id_user'];
+ $this->m['HistoryModel']->values['action'] = $this->strings[$action]['action'];
+ $this->m['HistoryModel']->updateTable('insert');
+
+ echo $this->strings[$action]['exec_string'];
+ }
+ else
+ {
+ echo "error: one error occurred, please retry later";
+ }
+ }
+ else
+ {
+ echo "error: the message has too many characters or wrong type";
+ }
+ }
+ else
+ {
+ echo $this->strings[$action]['error_string'];
+ }
+ }
+ }
+ }
+ }
+
+ public function viewall($lang = 'en', $type = 'message', $id = 0)
+ {
+ header('Content-type: text/html; charset=UTF-8');
+
+ $this->shift(3);
+
+ $this->clean();
+
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if ($this->ismoderator)
+ {
+ $clean['id'] = (int)$id;
+ if (array_key_exists($type,$this->types))
+ {
+ $clean['type'] = $this->types[$type]['clean_type'];
+
+ $data['res'] = $this->m['HistoryModel']->select()->where(array('id'=>$clean['id'],'type'=>$clean['type']))->send();
+
+ $data['md_action'] = array('hide'=>'hidden','show'=>'restored');
+
+ $this->append($data);
+ $this->load('viewall');
+ }
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/HomeController.php b/h-source/Application/Controllers/HomeController.php
new file mode 100644
index 0000000..593d7b0
--- /dev/null
+++ b/h-source/Application/Controllers/HomeController.php
@@ -0,0 +1,58 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class HomeController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['home'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ $data['title'] = 'home - '.Website::$generalName;
+ $this->append($data);
+ }
+
+ public function index($lang = 'en')
+ {
+// get the news container
+ $this->m['BoxesModel']->setWhereQueryClause(array('title'=>'home_news'));
+ $boxes = $this->m['BoxesModel']->getAll('boxes');
+
+ if (count($boxes) > 0)
+ {
+ $xml = htmlspecialchars_decode($boxes[0]['boxes']['message'],ENT_QUOTES);
+
+ $box_news = new BoxParser($xml);
+ $data['htmlNewsBox'] = $box_news->render();
+ }
+ else
+ {
+ $data['htmlNewsBox'] = null;
+ }
+
+ $this->append($data);
+ $this->cleverLoad('left');
+ $this->right($lang);
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/ImageController.php b/h-source/Application/Controllers/ImageController.php
new file mode 100644
index 0000000..471c634
--- /dev/null
+++ b/h-source/Application/Controllers/ImageController.php
@@ -0,0 +1,39 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class ImageController extends Controller {
+
+ public function captcha()
+ {
+ session_start();
+
+ $params = array(
+ 'fontPath' => ROOT.'/External/Fonts/FreeFont/FreeMono.ttf',
+ 'boxHeight' => 100,
+ 'boxWidth' => 200,
+ 'undulation'=> true,
+ 'align' => false
+ );
+
+ $captcha = new Image_Gd_Captcha($params);
+ $captcha->render();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/IssuesController.php b/h-source/Application/Controllers/IssuesController.php
new file mode 100644
index 0000000..02f6499
--- /dev/null
+++ b/h-source/Application/Controllers/IssuesController.php
@@ -0,0 +1,171 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class IssuesController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['issues'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ $this->model('IssuesModel');
+ $this->model('MessagesModel');
+
+ $argKeys = array(
+ 'page:forceNat' => 1,
+ 'token:sanitizeAlphanum' => 'token'
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $this->m['IssuesModel']->setFields('title,topic,priority,message','sanitizeAll');
+
+ $data['title'] = 'issues - '.Website::$generalName;
+ $this->append($data);
+ }
+
+ public function viewall($lang = 'en')
+ {
+ $this->shift(1);
+
+ $data['preview_message'] = null;
+
+ if (isset($_POST['insertAction']))
+ {
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index'.$this->lang,2,'wrong token..');
+
+ //set the page to 1 in the viewStatus
+ $this->viewArgs['page'] = 1;
+ $this->buildStatus();
+
+ $this->m['IssuesModel']->values['created_by'] = (int)$this->s['registered']->status['id_user'];
+ $this->m['IssuesModel']->values['status'] = 'opened';
+
+ $this->m['IssuesModel']->updateTable('insert');
+ }
+ }
+
+ //if preview
+ if (isset($_POST['previewAction']))
+ {
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index'.$this->lang,2,'wrong token..');
+
+ $data['preview_message'] = $this->request->post('message','','sanitizeHtml');
+ $this->m['IssuesModel']->result = false;
+ }
+ }
+
+ $data['notice'] = $this->m['IssuesModel']->notice;
+
+ $this->m['IssuesModel']->setForm('issues/viewall/'.$this->lang.$this->viewStatus."#form",array('previewAction'=>'preview','insertAction'=>'submit'));
+
+ $values = $this->m['IssuesModel']->getFormValues('insert','sanitizeHtml');
+
+ $data['form'] = $this->m['IssuesModel']->form->render($values);
+
+ //load the Pages helper
+ $this->helper('Pages',$this->controller.'/viewall/'.$this->lang,'page');
+ //get the number of records
+ $this->m['IssuesModel']->from('issues left join messages')->using('id_issue')->aWhere(array('deleted'=>'no'))->groupBy('issues.id_issue');
+
+ $recordNumber = $this->m['IssuesModel']->rowNumber();
+ $page = $this->viewArgs['page'];
+ //set the limit clause
+ $this->m['IssuesModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,20);
+// $data['table'] = $this->m['IssuesModel']->getFields('id_issue,created_by,title,status,creation_date,topic,priority');
+ $data['table'] = $this->m['IssuesModel']->getFields('issues.*,messages.message,count(*) as numb_mess');
+
+ $data['pageList'] = $this->h['Pages']->render($page-3,7);
+
+ $this->append($data);
+ $this->load('viewall');
+ $this->right();
+ }
+
+ public function view($lang = 'en', $id_issue = 0)
+ {
+ $this->m['MessagesModel']->setFields('message','sanitizeAll');
+
+ $this->shift(2);
+
+ $clean['id_issue'] = (int)$id_issue;
+ $data['id_issue'] = $clean['id_issue'];
+ $data['preview_message'] = null;
+
+ //if submit
+ if (isset($_POST['insertAction']))
+ {
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index'.$this->lang,2,'wrong token..');
+
+ $this->m['MessagesModel']->values['created_by'] = (int)$this->s['registered']->status['id_user'];
+ $this->m['MessagesModel']->values['id_issue'] = $clean['id_issue'];
+ $this->m['MessagesModel']->updateTable('insert');
+ }
+ }
+
+ //if preview
+ if (isset($_POST['previewAction']))
+ {
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index'.$this->lang,2,'wrong token..');
+
+ $data['preview_message'] = $this->request->post('message','','sanitizeHtml');
+ $this->m['MessagesModel']->result = false;
+ }
+ }
+
+ $data['notice'] = $this->m['MessagesModel']->notice;
+
+ //create the form
+ $this->m['MessagesModel']->setForm('issues/view/'.$this->lang."/".$clean['id_issue'].$this->viewStatus."#form",array('previewAction'=>'preview','insertAction'=>'submit'));
+
+ $values = $this->m['MessagesModel']->getFormValues('insert','sanitizeHtml');
+
+ $data['form'] = $this->m['MessagesModel']->form->render($values);
+
+ //retrieve the values from the table
+ $data['table'] = $this->m['IssuesModel']->select('id_issue,created_by,title,status,creation_date,topic,priority,message,notice')->where(array('id_issue'=>$clean['id_issue'],'deleted'=>'no'))->send();
+
+// javascript for moderator
+ $data['md_javascript'] = "moderator_dialog(\"hide\",\"message\");moderator_dialog(\"show\",\"message\");";
+ $data['go_to'] = $this->currPage."/".$this->lang."/".$clean['id_issue'];
+
+ if (count($data['table']) > 0)
+ {
+ $data['messages'] = $this->m['MessagesModel']->select()->where(array('id_issue'=>$clean['id_issue']))->send();
+
+ $this->append($data);
+ $this->load('view');
+ $this->load('moderator_dialog');
+ $this->right();
+ }
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/MyController.php b/h-source/Application/Controllers/MyController.php
new file mode 100644
index 0000000..75cf794
--- /dev/null
+++ b/h-source/Application/Controllers/MyController.php
@@ -0,0 +1,209 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class MyController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString) {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->model('UsersModel');
+ $this->model('ProfileModel');
+
+ $argKeys = array(
+ 'token:sanitizeAlphanum' => 'token'
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $data['title'] = 'my panel';
+ $this->append($data);
+ }
+
+ public function home($lang = 'en')
+ {
+ $this->shift(1);
+
+ $data['title'] = 'my panel - '.Website::$generalName;
+
+ $this->s['registered']->check();
+ $clean['id_user'] = (int)$this->s['registered']->status['id_user'];
+ $data['username'] = $this->m['UsersModel']->getUser($clean['id_user']);
+
+ $this->append($data);
+ $this->load('panel');
+ $this->right($this->lang);
+ }
+
+ public function password($lang = 'en')
+ {
+ $this->shift(1);
+
+ $data['title'] = 'password - '.Website::$generalName;
+
+ $this->s['registered']->check();
+
+ if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect($this->controller.'/home/'.$this->lang,2,'wrong token..');
+
+ $this->m['UsersModel']->setFields('password:sha1','none');
+
+ $this->m['UsersModel']->strongConditions['update'] = array('checkEqual'=>'password,confirmation');
+
+ $data['notice'] = null;
+
+ $clean['id_user'] = (int)$this->s['registered']->status['id_user'];
+
+ if (isset($_POST['updateAction'])) {
+ $pass = $this->s['registered']->getPassword();
+ if (sha1($_POST['old']) === $pass)
+ {
+ $this->m['UsersModel']->updateTable('update',$clean['id_user']);
+ $data['notice'] = $this->m['UsersModel']->notice;
+ if ($this->m['UsersModel']->queryResult)
+ {
+ $this->s['registered']->logout();
+ $this->redirect('home/index/'.$this->lang,2,'logout');
+ }
+ }
+ else
+ {
+ $data['notice'] = "<div class='alert'>The old password is wrong</div>\n";
+ }
+ }
+
+ $values = $this->m['UsersModel']->selectId($clean['id_user']);
+ $values['old'] = '';
+ $values['confirmation'] = '';
+
+ $action = array('updateAction'=>'save');
+ $form = new Form_Form('my/password/'.$this->lang.$this->viewStatus,$action);
+ $form->setEntry('old','Password');
+ $form->entry['old']->labelString = 'old password:';
+ $form->setEntry('password','Password');
+ $form->setEntry('confirmation','Password');
+ $data['form'] = $form->render($values,'old,password,confirmation');
+
+ $this->append($data);
+
+ $this->load('password');
+ $this->right();
+ }
+
+ public function email($lang = 'en')
+ {
+ $this->shift(1);
+
+ $data['title'] = 'email - '.Website::$generalName;
+
+ $this->s['registered']->check();
+
+ if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect($this->controller.'/home/'.$this->lang,2,'wrong token..');
+
+ $this->m['UsersModel']->setFields('e_mail','sanitizeAll');
+
+ $this->m['UsersModel']->strongConditions['update'] = array('checkMail'=>'e_mail');
+
+ $this->m['UsersModel']->databaseConditions['update'] = array('checkUniqueCompl'=>'e_mail');
+
+ $data['notice'] = null;
+
+ $clean['id_user'] = (int)$this->s['registered']->status['id_user'];
+
+ $this->m['UsersModel']->updateTable('update',$clean['id_user']);
+ $data['notice'] = $this->m['UsersModel']->notice;
+
+ $values = $this->m['UsersModel']->selectId($clean['id_user']);
+
+ $action = array('updateAction'=>'save');
+ $form = new Form_Form('my/email/'.$this->lang.$this->viewStatus,$action);
+ $form->setEntry('e_mail','InputText');
+ $form->entry['e_mail']->labelString = 'your e-mail address:';
+ $data['form'] = $form->render($values,'e_mail');
+
+ $this->append($data);
+
+ $this->load('email');
+ $this->right();
+ }
+
+ public function profile($lang = 'en')
+ {
+ $this->shift(1);
+
+ $data['title'] = 'profile - '.Website::$generalName;
+
+ $this->s['registered']->check();
+
+ if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect($this->controller.'/home/'.$this->lang,2,'wrong token..');
+
+ $this->m['ProfileModel']->setFields('real_name,website,where_you_are,birth_date,fav_distro,projects,publish_mail,description','sanitizeAll');
+
+ $clean['id_user'] = (int)$this->s['registered']->status['id_user'];
+
+ $res = $this->m['ProfileModel']->db->select('profile','id_prof','created_by='.$clean['id_user']);
+ $clean['id_prof'] = (int)$res[0]['profile']['id_prof'];
+
+ $this->m['ProfileModel']->values['update_date'] = date('Y-m-d H:i:s');
+ $this->m['ProfileModel']->updateTable('update',$clean['id_prof']);
+ $data['notice'] = $this->m['ProfileModel']->notice;
+
+ $values = $this->m['ProfileModel']->getFormValues('update','sanitizeHtml',$clean['id_prof']);
+
+ $this->m['ProfileModel']->setForm('my/profile/'.$this->lang.$this->viewStatus,array('updateAction'=>'save'),'POST');
+ $data['form'] = $this->m['ProfileModel']->form->render($values);
+
+ $this->append($data);
+
+ $this->load('profile');
+ $this->right();
+ }
+
+ public function goodbye($lang = 'en')
+ {
+ $data['title'] = 'delete - '.Website::$generalName;
+
+ session_start();
+
+ $this->shift(1);
+
+ $this->s['registered']->check();
+
+ if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect($this->controller.'/home/'.$this->lang,2,'wrong token..');
+
+ $clean['id_user'] = (int)$this->s['registered']->status['id_user'];
+
+ if (isset($_POST['closeAction']))
+ {
+ $this->s['registered']->logout();
+ $this->m['UsersModel']->close($clean['id_user']);
+
+ if ($this->m['UsersModel']->queryResult)
+ {
+ $this->redirect('users/notice/'.$this->lang);
+ }
+
+ }
+
+ $this->append($data);
+ $this->load('goodbye');
+ $this->right();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/NewsController.php b/h-source/Application/Controllers/NewsController.php
new file mode 100644
index 0000000..5b7d0e4
--- /dev/null
+++ b/h-source/Application/Controllers/NewsController.php
@@ -0,0 +1,65 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class NewsController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['news'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ $this->model('NewsModel');
+
+ $data['title'] = 'news - '.Website::$generalName;
+ $this->append($data);
+ }
+
+ public function index($lang = 'en')
+ {
+ $argKeys = array(
+ 'page:forceNat' => 1,
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $this->shift(1);
+
+ $this->helper('Pages',$this->controller.'/index/'.$this->lang,'page');
+ $this->h['Pages']->nextString = 'older news';
+ $this->h['Pages']->previousString = 'latest news';
+ $page = $this->viewArgs['page'];
+ $recordNumber = $this->m['NewsModel']->rowNumber();
+ $data['recordNumber'] = $recordNumber;
+
+ //set the limit clause
+ $limit = $this->h['Pages']->getLimit($page,$recordNumber,10);
+
+ $data['table'] = $this->m['NewsModel']->select()->limit($limit)->send();
+ $data['pageList'] = $this->h['Pages']->render($page,0);
+
+ $this->append($data);
+ $this->load('index');
+ $this->right($lang);
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/NotebooksController.php b/h-source/Application/Controllers/NotebooksController.php
new file mode 100644
index 0000000..4a40612
--- /dev/null
+++ b/h-source/Application/Controllers/NotebooksController.php
@@ -0,0 +1,162 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class NotebooksController extends GenericController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['hardware'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ //load the model
+ $this->model('HardwareModel');
+ $this->model('RevisionsModel');
+ $this->model('NotebooksModel');
+ $this->model('TalkModel');
+
+ $this->mod = $this->m['NotebooksModel'];
+
+ $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user'];
+ $this->m['HardwareModel']->type = 'notebook';
+
+ //hardware conditions
+ $this->m['HardwareModel']->strongConditions['update'] = array(
+ "checkIsStrings|".Notebooks::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "+checkIsStrings|".Notebooks::compatibilityList() => "compatibility",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "++checkIsStrings|".Notebooks::$commYear => "comm_year",
+ "+++checkIsStrings|".Notebooks::$subtypeSelect => "subtype",
+ "++++checkIsStrings|".Notebooks::wifiList() => "wifi_works",
+ "+++++checkIsStrings|".Notebooks::videoList() => "video_card_works",
+ );
+
+ $this->m['HardwareModel']->strongConditions['insert'] = array(
+ "checkIsStrings|".Notebooks::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "+checkIsStrings|".Notebooks::compatibilityList() => "compatibility",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "++checkIsStrings|".Notebooks::$commYear => "comm_year",
+ "+++checkIsStrings|".Notebooks::$subtypeSelect => "subtype",
+ "++++checkIsStrings|".Notebooks::wifiList() => "wifi_works",
+ "+++++checkIsStrings|".Notebooks::videoList() => "video_card_works",
+ );
+
+ $this->m['HardwareModel']->softConditions['update'] = array(
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "++checkLength|99" => "video_card_type,wifi_type",
+ "+++checkLength|49" => "kernel",
+ "+checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "video_card_type|only the following characters are allowed for the <i>videocard</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
+ "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the <i>wifi</i> 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 <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "++checkLength|99" => "video_card_type,wifi_type",
+ "+++checkLength|49" => "kernel",
+ "+checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "video_card_type|only the following characters are allowed for the <i>videocard</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
+ "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the <i>wifi</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
+ );
+
+ $this->m['HardwareModel']->setFields('vendor,model,compatibility,kernel,description,distribution,video_card_type,video_card_works,wifi_type,wifi_works,comm_year,subtype','sanitizeAll');
+
+ $argKeys = array(
+ 'page:forceNat' => 1,
+ 'history_page:forceNat' => 1,
+ 'vendor:sanitizeString' => 'undef',
+ 'compatibility:sanitizeString' => 'undef',
+ 'comm_year:sanitizeString' => 'undef',
+ 'subtype:sanitizeString' => 'undef',
+ 'sort-by:sanitizeString' => 'undef'
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $data['title'] = 'Notebooks';
+ $this->append($data);
+ }
+
+ public function catalogue($lang = 'en')
+ {
+ $this->shift(1);
+
+ $whereArray = array(
+ 'type' => $this->mod->type,
+ 'vendor' => $this->viewArgs['vendor'],
+ 'comm_year' => $this->viewArgs['comm_year'],
+ 'subtype' => $this->viewArgs['subtype'],
+ 'compatibility' => $this->viewArgs['compatibility']
+ );
+
+ $this->mod->setWhereQueryClause($whereArray);
+
+ parent::catalogue($lang);
+ }
+
+ public function view($lang = 'en', $id = 0, $name = null)
+ {
+ parent::view($lang, $id, $name);
+ }
+
+ public function history($lang = 'en', $id = 0)
+ {
+ parent::history($lang, $id);
+ }
+
+ public function revision($lang = 'en', $id_rev = 0)
+ {
+ parent::revision($lang, $id_rev);
+ }
+
+ public function insert($lang = 'en', $token = '')
+ {
+ parent::insert($lang, $token);
+ }
+
+ public function update($lang = 'en', $token = '')
+ {
+ parent::update($lang, $token);
+ }
+
+ public function differences($lang = 'en', $id_hard = 0, $id_rev = 0)
+ {
+ parent::differences($lang, $id_hard, $id_rev);
+ }
+
+ public function climb($lang = 'en', $id_rev = 0, $token = '')
+ {
+ parent::climb($lang, $id_rev, $token);
+ }
+
+ public function talk($lang = 'en', $id_hard = 0, $token = '')
+ {
+ parent::talk($lang, $id_hard, $token);
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/PrintersController.php b/h-source/Application/Controllers/PrintersController.php
new file mode 100644
index 0000000..50da908
--- /dev/null
+++ b/h-source/Application/Controllers/PrintersController.php
@@ -0,0 +1,158 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class PrintersController extends GenericController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['hardware'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ //load the model
+ $this->model('HardwareModel');
+ $this->model('RevisionsModel');
+ $this->model('PrintersModel');
+ $this->model('TalkModel');
+
+ $this->mod = $this->m['PrintersModel'];
+
+ $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user'];
+ $this->m['HardwareModel']->type = 'printer';
+
+ //hardware conditions
+ $this->m['HardwareModel']->strongConditions['update'] = array(
+ "checkIsStrings|".Printer::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "+checkIsStrings|".Printer::compatibilityList() => "compatibility",
+ "++checkIsStrings|".Printer::$commYear => "comm_year",
+ "+++checkIsStrings|".Printer::$interface => "interface",
+ );
+
+ $this->m['HardwareModel']->strongConditions['insert'] = array(
+ "checkIsStrings|".Printer::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "+checkIsStrings|".Printer::compatibilityList() => "compatibility",
+ "++checkIsStrings|".Printer::$commYear => "comm_year",
+ "+++checkIsStrings|".Printer::$interface => "interface",
+ );
+
+ $this->m['HardwareModel']->softConditions['update'] = array(
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "driver",
+ "++checkLength|49" => "kernel",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> 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 <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "driver",
+ "++checkLength|49" => "kernel",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
+ );
+
+ $this->m['HardwareModel']->setFields('vendor,model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface','sanitizeAll');
+
+ $argKeys = array(
+ 'page:forceNat' => 1,
+ 'history_page:forceNat' => 1,
+ 'vendor:sanitizeString' => 'undef',
+ 'compatibility:sanitizeString' => 'undef',
+ 'comm_year:sanitizeString' => 'undef',
+ 'interface:sanitizeString' => 'undef',
+ 'sort-by:sanitizeString' => 'undef',
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $data['title'] = 'printers';
+ $this->append($data);
+ }
+
+ public function catalogue($lang = 'en')
+ {
+ $this->shift(1);
+
+ $whereArray = array(
+ 'type' => $this->mod->type,
+ 'vendor' => $this->viewArgs['vendor'],
+ 'compatibility' => $this->viewArgs['compatibility'],
+ 'comm_year' => $this->viewArgs['comm_year'],
+ 'interface' => $this->viewArgs['interface'],
+ );
+
+ $this->mod->setWhereQueryClause($whereArray);
+
+ parent::catalogue($lang);
+ }
+
+ public function view($lang = 'en', $id = 0, $name = null)
+ {
+ parent::view($lang, $id, $name);
+ }
+
+ public function history($lang = 'en', $id = 0)
+ {
+ parent::history($lang, $id);
+ }
+
+ public function revision($lang = 'en', $id_rev = 0)
+ {
+ parent::revision($lang, $id_rev);
+ }
+
+ public function insert($lang = 'en', $token = '')
+ {
+ parent::insert($lang, $token);
+ }
+
+ public function update($lang = 'en', $token = '')
+ {
+ parent::update($lang, $token);
+ }
+
+ public function differences($lang = 'en', $id_hard = 0, $id_rev = 0)
+ {
+ parent::differences($lang, $id_hard, $id_rev);
+ }
+
+ public function climb($lang = 'en', $id_rev = 0, $token = '')
+ {
+ parent::climb($lang, $id_rev, $token);
+ }
+
+ public function talk($lang = 'en', $id_hard = 0, $token = '')
+ {
+ parent::talk($lang, $id_hard, $token);
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/ProjectController.php b/h-source/Application/Controllers/ProjectController.php
new file mode 100644
index 0000000..e114f75
--- /dev/null
+++ b/h-source/Application/Controllers/ProjectController.php
@@ -0,0 +1,38 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class ProjectController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+ parent::__construct($model, $controller, $queryString);
+
+ $data['title'] = 'project - '.Website::$generalName;
+ $this->append($data);
+ }
+
+ public function index($lang = 'en')
+ {
+ $this->cleverLoad('index');
+ $this->right();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/ScannersController.php b/h-source/Application/Controllers/ScannersController.php
new file mode 100644
index 0000000..f4206d5
--- /dev/null
+++ b/h-source/Application/Controllers/ScannersController.php
@@ -0,0 +1,158 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class ScannersController extends GenericController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['hardware'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ //load the model
+ $this->model('HardwareModel');
+ $this->model('RevisionsModel');
+ $this->model('ScannersModel');
+ $this->model('TalkModel');
+
+ $this->mod = $this->m['ScannersModel'];
+
+ $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user'];
+ $this->m['HardwareModel']->type = 'scanner';
+
+ //hardware conditions
+ $this->m['HardwareModel']->strongConditions['update'] = array(
+ "checkIsStrings|".Printer::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "+checkIsStrings|".Printer::compatibilityList() => "compatibility",
+ "++checkIsStrings|".Printer::$commYear => "comm_year",
+ "+++checkIsStrings|".Printer::$interface => "interface",
+ );
+
+ $this->m['HardwareModel']->strongConditions['insert'] = array(
+ "checkIsStrings|".Printer::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "+checkIsStrings|".Printer::compatibilityList() => "compatibility",
+ "++checkIsStrings|".Printer::$commYear => "comm_year",
+ "+++checkIsStrings|".Printer::$interface => "interface",
+ );
+
+ $this->m['HardwareModel']->softConditions['update'] = array(
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "driver",
+ "++checkLength|49" => "kernel",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> 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 <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "driver",
+ "++checkLength|49" => "kernel",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
+ );
+
+ $this->m['HardwareModel']->setFields('vendor,model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface','sanitizeAll');
+
+ $argKeys = array(
+ 'page:forceNat' => 1,
+ 'history_page:forceNat' => 1,
+ 'vendor:sanitizeString' => 'undef',
+ 'compatibility:sanitizeString' => 'undef',
+ 'comm_year:sanitizeString' => 'undef',
+ 'interface:sanitizeString' => 'undef',
+ 'sort-by:sanitizeString' => 'undef',
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $data['title'] = 'scanners';
+ $this->append($data);
+ }
+
+ public function catalogue($lang = 'en')
+ {
+ $this->shift(1);
+
+ $whereArray = array(
+ 'type' => $this->mod->type,
+ 'vendor' => $this->viewArgs['vendor'],
+ 'compatibility' => $this->viewArgs['compatibility'],
+ 'comm_year' => $this->viewArgs['comm_year'],
+ 'interface' => $this->viewArgs['interface'],
+ );
+
+ $this->mod->setWhereQueryClause($whereArray);
+
+ parent::catalogue($lang);
+ }
+
+ public function view($lang = 'en', $id = 0, $name = null)
+ {
+ parent::view($lang, $id, $name);
+ }
+
+ public function history($lang = 'en', $id = 0)
+ {
+ parent::history($lang, $id);
+ }
+
+ public function revision($lang = 'en', $id_rev = 0)
+ {
+ parent::revision($lang, $id_rev);
+ }
+
+ public function insert($lang = 'en', $token = '')
+ {
+ parent::insert($lang, $token);
+ }
+
+ public function update($lang = 'en', $token = '')
+ {
+ parent::update($lang, $token);
+ }
+
+ public function differences($lang = 'en', $id_hard = 0, $id_rev = 0)
+ {
+ parent::differences($lang, $id_hard, $id_rev);
+ }
+
+ public function climb($lang = 'en', $id_rev = 0, $token = '')
+ {
+ parent::climb($lang, $id_rev, $token);
+ }
+
+ public function talk($lang = 'en', $id_hard = 0, $token = '')
+ {
+ parent::talk($lang, $id_hard, $token);
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/SearchController.php b/h-source/Application/Controllers/SearchController.php
new file mode 100644
index 0000000..2d8a1a8
--- /dev/null
+++ b/h-source/Application/Controllers/SearchController.php
@@ -0,0 +1,90 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class SearchController extends BaseController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['search'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ $this->model('HardwareModel');
+
+ $data['title'] = 'search - '.Website::$generalName;
+ $this->append($data);
+ }
+
+ public function form($lang = 'en')
+ {
+ $this->cleverLoad('form');
+ $this->right();
+ }
+
+ public function results($lang = 'en')
+ {
+ Params::$nullQueryValue = 'undef';
+
+ $argKeys = array(
+ 'page:forceNat' => 1,
+ 'action:sanitizeAlphanum' => 'search',
+ 'type:sanitizeAlphanum' => 'notebook',
+ 'model:sanitizeString' => 'undef',
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $this->shift(1);
+
+ if (strcmp($this->viewArgs['action'],'search') === 0)
+ {
+ Params::$whereClauseSymbolArray = array('like');
+
+ $whereClause = array(
+ 'type' => $this->viewArgs['type'],
+ 'model' => "like '%".$this->viewArgs['model']."%'",
+ '-deleted' => "no",
+ );
+
+ $recordNumber = $this->m['HardwareModel']->clear()->where($whereClause)->orderBy("id_hard desc")->rowNumber();
+
+ $data['recordNumber'] = $recordNumber;
+
+ //load the Pages helper
+ $this->helper('Pages',$this->controller.'/results/'.$this->lang,'page');
+ $page = $this->viewArgs['page'];
+ //set the limit clause
+ $limit = $this->h['Pages']->getLimit($page,$recordNumber,10);
+
+ $data['table'] = $this->m['HardwareModel']->clear()->select('id_hard,model,type,comm_year')->where($whereClause)->limit($limit)->orderBy("id_hard desc")->send();
+// echo $this->m['HardwareModel']->getQuery();
+
+ $data['pageList'] = $this->h['Pages']->render($page-3,7);
+
+ $this->append($data);
+ $this->cleverLoad('results');
+ $this->right();
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/UsersController.php b/h-source/Application/Controllers/UsersController.php
new file mode 100644
index 0000000..6e760ba
--- /dev/null
+++ b/h-source/Application/Controllers/UsersController.php
@@ -0,0 +1,428 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class UsersController extends BaseController
+{
+
+ private $_updating;
+
+ public function __construct($model, $controller, $queryString)
+ {
+ parent::__construct($model, $controller, $queryString);
+
+ $this->model('UsersModel');
+ $this->model('ProfileModel');
+ $this->model('HardwareModel');
+ $this->model('ParamsModel');
+
+ $updating = $this->m['ParamsModel']->select('updating')->where(array('id_par'=>1))->toList('updating')->send();
+ $data['updating_flag'] = $updating[0];
+ $this->_updating = $data['updating_flag'];
+
+ $data['title'] = 'Login';
+ $this->append($data);
+ }
+
+ public function login($lang = 'en', $type = null,$the_action = null,$the_id = null)
+ {
+ $data = array();
+
+ if ( strcmp($this->_updating,'no') === 0 )
+ {
+ $data['flag'] = isset($type) ? 'setted' : null;
+ $html['type'] = in_array($type,Hardware::$controllers) ? sanitizeAll($type) : 'notebooks';
+ $html['the_action'] = sanitizeAlphanum($the_action);
+ $html['the_id'] = (int)$the_id;
+ $html['lang'] = Lang::sanitize($lang);
+
+ $data['title'] = 'Login - '.Website::$generalName;
+
+ if (isset($type))
+ {
+ $data['action'] = Url::getRoot("users/login/".$html['lang']."/".$html['type']."/".$html['the_action']."/".$html['the_id']);
+ }
+ else
+ {
+ $data['action'] = Url::getRoot("users/login/".$html['lang']);
+ }
+
+ $data['notice'] = null;
+
+ $this->s['registered']->checkStatus();
+
+ if ($this->s['registered']->status['status']=='logged') { //check if already logged
+ $this->s['registered']->redirect('logged');
+ }
+ if (isset($_POST['username']) and isset($_POST['password']))
+ {
+ $username = ctype_alnum($_POST['username']) ? sanitizeAll($_POST['username']) : '';
+ $choice = $this->s['registered']->login($username,$_POST['password']);
+
+ switch($choice) {
+ case 'logged':
+ $this->redirect('home/index',3,'You are already logged...');
+ break;
+ case 'accepted':
+ if (isset($type))
+ {
+ $address = strcmp($html['the_action'],'view') === 0 ? $html['type']."/view/".$html['lang']."/".$html['the_id'] : $html['type']."/catalogue/".$html['lang'];
+
+ $this->redirect($address,0);
+ }
+ else
+ {
+ $this->redirect('home/index',0);
+ }
+ break;
+ case 'login-error':
+ $data['notice'] = '<div class="alert">Wrong username or password</div>';
+ break;
+ case 'wait':
+ $data['notice'] = '<div class="alert">You have to wait 5 seconds before you can try to login another time</div>';
+ break;
+ }
+ }
+ }
+
+ $this->append($data);
+ $this->load('login');
+ }
+
+ public function logout($lang = 'en')
+ {
+ $res = $this->s['registered']->logout();
+
+ if ($res === 'not-logged')
+ {
+ $data['notice'] = "<div class='alert'>You can't logout because you are not logged..</div>\n";
+ }
+ else if ($res === 'was-logged')
+ {
+ $this->redirect('home',0);
+ }
+ else if ($res === 'error')
+ {
+
+ }
+
+ $this->append($data);
+ $this->load('logout');
+ }
+
+ public function add($lang = 'en')
+ {
+ $data['title'] = 'create account - '.Website::$generalName;
+
+ if ( strcmp($this->_updating,'no') === 0 )
+ {
+ //start session for captcha
+ session_start();
+
+ if ( isset($_SESSION['status']) ) unset($_SESSION['status']);
+
+ $this->shift(1);
+
+ $this->m['UsersModel']->strongConditions['insert'] = array(
+ "checkAlphanum" => "username",
+ "checkLength|35" => "username",
+ "checkMail" => "e_mail",
+ "+checkLength|35" => "e_mail",
+ "checkEqual" => "password,confirmation",
+ "checkMatch|/^[a-zA-Z0-9\_\-\!]+$/" => "password,confirmation|characters allowed for the password: a-z A-Z 0-9 - _ !"
+ );
+
+ $this->m['UsersModel']->databaseConditions['insert'] = array(
+ "checkUnique" => "username",
+ "+checkUnique" => "e_mail"
+ );
+
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ $this->redirect('home/index/'.$this->lang,2,'you are already logged..');
+ }
+ else
+ {
+ $data['notice'] = null;
+
+ $this->m['UsersModel']->setFields('username:sanitizeAll,e_mail:sanitizeAll,password:sha1','none');
+
+ $this->m['UsersModel']->updateTable('insert');
+
+ $data['notice'] = $this->m['UsersModel']->notice;
+
+ $values = $this->m['UsersModel']->getFormValues('insert','sanitizeHtml');
+ $values['confirmation'] = '';
+
+ $data['values'] = $values;
+
+ $this->append($data);
+
+ $this->load('add');
+ $this->right();
+ }
+ }
+ else
+ {
+ $this->redirect('users/login/'.$this->lang,0);
+ }
+ }
+
+ public function confirm($lang = 'en', $id_user = 0, $confirmation_token = '')
+ {
+ $data['title'] = 'confirm account - '.Website::$generalName;
+
+ if ( strcmp($this->_updating,'no') === 0 )
+ {
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ $this->redirect('home/index/'.$this->lang,2,'you are already logged..');
+ }
+ else
+ {
+ $clean['id_user'] = (int)$id_user;
+ $clean['confirmation_token'] = sanitizeAlphanum($confirmation_token);
+
+ $data['status_confirm'] = false;
+
+ $res = $this->m['UsersModel']->select('id_user,creation_time')->where(array("id_user"=>$clean['id_user'],"confirmation_token"=>$clean['confirmation_token'],"has_confirmed"=>1,"deleted"=>"no"))->send();
+
+ // echo $this->m['UsersModel']->getQuery();
+
+ if (count($res) > 0)
+ {
+ $now = time();
+ $checkTime = $res[0]['regusers']['creation_time'] + Account::$confirmTime;
+ if ($checkTime > $now)
+ {
+ $this->m['UsersModel']->values = array('has_confirmed' => 0, 'creation_time' => 0);
+ if ($this->m['UsersModel']->update($clean['id_user']))
+ {
+ $data['status_confirm'] = true;
+
+ //ad a record in the profile table
+ $this->m['ProfileModel']->values = array('created_by' => $clean['id_user']);
+ $this->m['ProfileModel']->insert();
+
+ }
+ }
+ }
+
+ // var_dump($data['status_confirm']);
+
+ $this->append($data);
+ $this->load('confirmation');
+ $this->right();
+ }
+ }
+ else
+ {
+ $this->redirect('users/login/'.$this->lang,0);
+ }
+ }
+
+ public function change($lang = 'en', $id_user = 0, $forgot_token = '')
+ {
+ session_start();
+
+ $data['title'] = 'change password - '.Website::$generalName;
+
+ if ( strcmp($this->_updating,'no') === 0 )
+ {
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ $this->redirect('home/index/'.$this->lang,2,'you are already logged..');
+ }
+ else
+ {
+ $clean['id_user'] = (int)$id_user;
+ $clean['forgot_token'] = sanitizeAlphanum($forgot_token);
+
+ $res = $this->m['UsersModel']->select('username,id_user,forgot_time,e_mail')->where(array("id_user"=>$clean['id_user'],"forgot_token"=>$clean['forgot_token'],"has_confirmed"=>0,"deleted"=>"no"))->send();
+
+ if (count($res) > 0)
+ {
+ $now = time();
+ $checkTime = $res[0]['regusers']['forgot_time'] + Account::$confirmTime;
+ if ($checkTime > $now)
+ {
+ $username = $res[0]['regusers']['username'];
+ $email = $res[0]['regusers']['e_mail'];
+
+ $newPassword = generateString(10);
+ $this->m['UsersModel']->values = array('password' => sha1($newPassword), 'forgot_time' => 0);
+ if ($this->m['UsersModel']->update($clean['id_user']))
+ {
+ $result = Account::sendpassword($username,$email,$newPassword);
+
+ if ($result)
+ {
+ $_SESSION['status'] = 'sent_new_password';
+ }
+ else
+ {
+ $_SESSION['status'] = 'sent_new_password_error';
+ }
+
+ $hed = new HeaderObj(DOMAIN_NAME);
+ $hed->redirect('users/notice/'.Lang::$current,1);
+
+ }
+ }
+ }
+
+ $this->append($data);
+ $this->load('change');
+ $this->right();
+ }
+ }
+ else
+ {
+ $this->redirect('users/login/'.$this->lang,0);
+ }
+ }
+
+ public function forgot($lang = 'en')
+ {
+ $data['title'] = 'request password - '.Website::$generalName;
+
+ if ( strcmp($this->_updating,'no') === 0 )
+ {
+ session_start();
+
+ if ( isset($_SESSION['status']) ) unset($_SESSION['status']);
+
+ $this->shift(1);
+
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ $this->redirect('home/index/'.$this->lang,2,'you are already logged..');
+ }
+ else
+ {
+ $data['notice'] = null;
+
+ if (isset($_POST['forgotAction']))
+ {
+ if (isset($_POST['username']))
+ {
+ $this->m['UsersModel']->forgot($_POST['username']);
+ $data['notice'] = $this->m['UsersModel']->notice;
+ }
+ }
+
+ $this->append($data);
+
+ $this->load('forgot');
+ $this->right();
+ }
+ }
+ else
+ {
+ $this->redirect('users/login/'.$this->lang,0);
+ }
+ }
+
+ public function notice($lang = 'en')
+ {
+ $data['title'] = 'notice - '.Website::$generalName;
+
+ if ( strcmp($this->_updating,'no') === 0 )
+ {
+ session_start();
+ if ($this->s['registered']->status['status'] === 'logged')
+ {
+ $this->redirect('home/index/'.$this->lang,2,'you are already logged..');
+ }
+ else
+ {
+ $this->load('notice');
+ $this->right();
+ }
+ }
+ else
+ {
+ $this->redirect('users/login/'.$this->lang,0);
+ }
+ }
+
+ public function meet($lang = 'en', $user = '')
+ {
+ $clean['user'] = ctype_alnum($user) ? sanitizeAll($user) : '';
+ $data['title'] = "meet ".$clean['user']." - ".Website::$generalName;
+
+ if (strcmp($clean['user'],'') !== 0)
+ {
+ $this->shift(2);
+
+ $res = $this->m['UsersModel']->db->select('regusers','has_confirmed,deleted,username','username="'.$clean['user'].'" and has_confirmed=0 and deleted="no"');
+// echo $this->m['UsersModel']->getQuery();
+ if (count($res) > 0)
+ {
+ $whereArray = array(
+ 'username' => $clean['user'],
+ 'has_confirmed' => 0,
+ 'deleted' => 'no'
+ );
+
+ $data['table'] = $this->m['ProfileModel']->select('regusers.e_mail,regusers.username,profile.*')->from('regusers inner join profile')->on('regusers.id_user = profile.created_by')->where($whereArray)->send();
+
+ // echo $this->m['HardwareModel']->getQuery();
+
+ $data['meet_username'] = $res[0]['regusers']['username'];
+
+ $this->append($data);
+ $this->load('meet');
+ $this->right();
+ }
+ }
+ }
+
+ public function contributions($lang = 'en', $user = '')
+ {
+ $clean['user'] = ctype_alnum($user) ? sanitizeAll($user) : '';
+ $data['title'] = $clean['user']." contributions - ".Website::$generalName;
+
+ if (strcmp($clean['user'],'') !== 0)
+ {
+ $this->shift(2);
+
+ $res = $this->m['UsersModel']->db->select('regusers','has_confirmed,deleted,username','username="'.$clean['user'].'" and has_confirmed=0 and deleted="no"');
+
+ if (count($res) > 0)
+ {
+ $whereArray = array(
+ 'username' => $clean['user'],
+ 'has_confirmed' => 0,
+ 'deleted' => 'no'
+ );
+
+ $data['table'] = $this->m['HardwareModel']->select('hardware.*,regusers.username')->where($whereArray)->send();
+ // echo $this->m['HardwareModel']->getQuery();
+
+ $data['meet_username'] = $res[0]['regusers']['username'];
+
+ $this->append($data);
+ $this->load('contributions');
+ $this->right();
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/VideocardsController.php b/h-source/Application/Controllers/VideocardsController.php
new file mode 100644
index 0000000..e95fac6
--- /dev/null
+++ b/h-source/Application/Controllers/VideocardsController.php
@@ -0,0 +1,152 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class VideocardsController extends GenericController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['hardware'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ //load the model
+ $this->model('HardwareModel');
+ $this->model('RevisionsModel');
+ $this->model('VideocardsModel');
+ $this->model('TalkModel');
+
+ $this->mod = $this->m['VideocardsModel'];
+
+ $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user'];
+ $this->m['HardwareModel']->type = 'videocard';
+
+ //hardware conditions
+ $this->m['HardwareModel']->strongConditions['update'] = array(
+ "checkIsStrings|".Videocard::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "++checkIsStrings|".Notebooks::$commYear => "comm_year",
+ "+++checkIsStrings|".Videocard::videoList() => "video_card_works",
+ "++++checkIsStrings|".Videocard::$interface => "interface",
+ );
+
+ $this->m['HardwareModel']->strongConditions['insert'] = array(
+ "checkIsStrings|".Videocard::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "++checkIsStrings|".Notebooks::$commYear => "comm_year",
+ "+++checkIsStrings|".Videocard::videoList() => "video_card_works",
+ "++++checkIsStrings|".Videocard::$interface => "interface",
+ );
+
+ $this->m['HardwareModel']->softConditions['update'] = array(
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "kernel",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ );
+
+ $this->m['HardwareModel']->softConditions['insert'] = array(
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "kernel",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ );
+
+ $this->m['HardwareModel']->setFields('vendor,model,kernel,description,distribution,video_card_works,comm_year,pci_id,interface','sanitizeAll');
+
+ $argKeys = array(
+ 'page:forceNat' => 1,
+ 'history_page:forceNat' => 1,
+ 'vendor:sanitizeString' => 'undef',
+ 'comm_year:sanitizeString' => 'undef',
+ 'interface:sanitizeString' => 'undef',
+ 'sort-by:sanitizeString' => 'undef',
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $data['title'] = 'Videocards';
+ $this->append($data);
+ }
+
+ public function catalogue($lang = 'en')
+ {
+ $this->shift(1);
+
+ $whereArray = array(
+ 'type' => $this->mod->type,
+ 'vendor' => $this->viewArgs['vendor'],
+ 'comm_year' => $this->viewArgs['comm_year'],
+ 'interface' => $this->viewArgs['interface'],
+ );
+
+ $this->mod->setWhereQueryClause($whereArray);
+
+ parent::catalogue($lang);
+ }
+
+ public function view($lang = 'en', $id = 0, $name = null)
+ {
+ parent::view($lang, $id, $name);
+ }
+
+ public function history($lang = 'en', $id = 0)
+ {
+ parent::history($lang, $id);
+ }
+
+ public function revision($lang = 'en', $id_rev = 0)
+ {
+ parent::revision($lang, $id_rev);
+ }
+
+ public function insert($lang = 'en', $token = '')
+ {
+ parent::insert($lang, $token);
+ }
+
+ public function update($lang = 'en', $token = '')
+ {
+ parent::update($lang, $token);
+ }
+
+ public function differences($lang = 'en', $id_hard = 0, $id_rev = 0)
+ {
+ parent::differences($lang, $id_hard, $id_rev);
+ }
+
+ public function climb($lang = 'en', $id_rev = 0, $token = '')
+ {
+ parent::climb($lang, $id_rev, $token);
+ }
+
+ public function talk($lang = 'en', $id_hard = 0, $token = '')
+ {
+ parent::talk($lang, $id_hard, $token);
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Controllers/WifiController.php b/h-source/Application/Controllers/WifiController.php
new file mode 100644
index 0000000..8313ffc
--- /dev/null
+++ b/h-source/Application/Controllers/WifiController.php
@@ -0,0 +1,154 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class WifiController extends GenericController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $this->_topMenuClasses['hardware'] = " class='currentitem'";
+
+ parent::__construct($model, $controller, $queryString);
+
+ //load the model
+ $this->model('HardwareModel');
+ $this->model('RevisionsModel');
+ $this->model('WifiModel');
+ $this->model('TalkModel');
+
+ $this->mod = $this->m['WifiModel'];
+
+ $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user'];
+ $this->m['HardwareModel']->type = 'wifi';
+
+ //hardware conditions
+ $this->m['HardwareModel']->strongConditions['update'] = array(
+ "checkIsStrings|".Wifi::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "++checkIsStrings|".Wifi::$commYear => "comm_year",
+ "+++checkIsStrings|".Wifi::$wifiSelect => "wifi_works",
+ "++++checkIsStrings|".Wifi::$interface => "interface",
+ );
+
+ $this->m['HardwareModel']->strongConditions['insert'] = array(
+ "checkIsStrings|".Wifi::vendorsList() => "vendor",
+ "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)]+$/" => "model|characters not allowed in the <i>model name</i> entry",
+ "checkLength|99" => "model",
+ "+checkLength|299" => "distribution",
+ "++checkIsStrings|".Wifi::$commYear => "comm_year",
+ "+++checkIsStrings|".Wifi::$wifiSelect => "wifi_works",
+ "++++checkIsStrings|".Wifi::$interface => "interface",
+ );
+
+ $this->m['HardwareModel']->softConditions['update'] = array(
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "kernel",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ );
+
+ $this->m['HardwareModel']->softConditions['insert'] = array(
+ "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
+ "checkLength|20000" => "description",
+ "+checkLength|49" => "kernel",
+ "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
+ );
+
+ $this->m['HardwareModel']->setFields('vendor,model,kernel,description,distribution,comm_year,wifi_works,pci_id,interface','sanitizeAll');
+
+ $argKeys = array(
+ 'page:forceNat' => 1,
+ 'history_page:forceNat' => 1,
+ 'vendor:sanitizeString' => 'undef',
+ 'comm_year:sanitizeString' => 'undef',
+ 'wifi_works:sanitizeString' => 'undef',
+ 'interface:sanitizeString' => 'undef',
+ 'sort-by:sanitizeString' => 'undef'
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $data['title'] = 'Wifi';
+ $this->append($data);
+ }
+
+ public function catalogue($lang = 'en')
+ {
+ $this->shift(1);
+
+ $whereArray = array(
+ 'type' => $this->mod->type,
+ 'vendor' => $this->viewArgs['vendor'],
+ 'comm_year' => $this->viewArgs['comm_year'],
+ 'wifi_works' => $this->viewArgs['wifi_works'],
+ 'interface' => $this->viewArgs['interface'],
+ );
+
+ $this->mod->setWhereQueryClause($whereArray);
+
+ parent::catalogue($lang);
+ }
+
+ public function view($lang = 'en', $id = 0, $name = null)
+ {
+ parent::view($lang, $id, $name);
+ }
+
+ public function history($lang = 'en', $id = 0)
+ {
+ parent::history($lang, $id);
+ }
+
+ public function revision($lang = 'en', $id_rev = 0)
+ {
+ parent::revision($lang, $id_rev);
+ }
+
+ public function insert($lang = 'en', $token = '')
+ {
+ parent::insert($lang, $token);
+ }
+
+ public function update($lang = 'en', $token = '')
+ {
+ parent::update($lang, $token);
+ }
+
+ public function differences($lang = 'en', $id_hard = 0, $id_rev = 0)
+ {
+ parent::differences($lang, $id_hard, $id_rev);
+ }
+
+ public function climb($lang = 'en', $id_rev = 0, $token = '')
+ {
+ parent::climb($lang, $id_rev, $token);
+ }
+
+ public function talk($lang = 'en', $id_hard = 0, $token = '')
+ {
+ parent::talk($lang, $id_hard, $token);
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Hooks/AfterInitialization.php b/h-source/Application/Hooks/AfterInitialization.php
new file mode 100644
index 0000000..a369309
--- /dev/null
+++ b/h-source/Application/Hooks/AfterInitialization.php
@@ -0,0 +1,10 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+//in this file you can write the PHP code that will be executed just after the controller initialization, after super global array have been sanitizied
+
+//you can access the whole set of classes of EasyGiant \ No newline at end of file
diff --git a/h-source/Application/Hooks/BeforeChecks.php b/h-source/Application/Hooks/BeforeChecks.php
new file mode 100644
index 0000000..03ee247
--- /dev/null
+++ b/h-source/Application/Hooks/BeforeChecks.php
@@ -0,0 +1,16 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+//in this file you can write the PHP code that will be executed at the beginning of the EasyGiant execution, before super global array have been sanitizied
+
+//this is the preferred place to create and fill log files
+
+//you can access the whole set of classes and functions of EasyGiant
+
+Params::$htmlentititiesCharset = "UTF-8";
+
+Params::$allowedSanitizeFunc .= ",sanitizeString,sanitizeAlphanum"; \ No newline at end of file
diff --git a/h-source/Application/Hooks/BeforeInitialization.php b/h-source/Application/Hooks/BeforeInitialization.php
new file mode 100644
index 0000000..6d1851b
--- /dev/null
+++ b/h-source/Application/Hooks/BeforeInitialization.php
@@ -0,0 +1,10 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+//in this file you can write the PHP code that will be executed just before the controller initialization, after super global array have been sanitizied
+
+//you can access the whole set of classes of EasyGiant \ No newline at end of file
diff --git a/h-source/Application/Hooks/index.html b/h-source/Application/Hooks/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/h-source/Application/Hooks/index.html
@@ -0,0 +1 @@
+
diff --git a/h-source/Application/Include/distributions.php b/h-source/Application/Include/distributions.php
new file mode 100644
index 0000000..6f5e1ae
--- /dev/null
+++ b/h-source/Application/Include/distributions.php
@@ -0,0 +1,86 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class Distributions
+{
+
+ public static $allowed = array(
+ 'blag_90001' => 'BLAG 90001',
+ 'blag_120000' => 'BLAG 120000',
+ 'dragora_1_1' => 'Dragora 1.1',
+ 'dynebolic_2_5_2' => 'Dynebolic 2.5.2 DHORUBA',
+ 'gnewsense_2_3' => 'gNewSense 2.3 Deltah',
+ 'gnewsense_3_0' => 'gNewSense 3.0 Metad',
+ 'musix_2_0' => 'Musix GNU+Linux 2.0 R0',
+ 'trisquel_3_5' => 'Trisquel 3.5 Awen',
+ 'trisquel_4_0' => 'Trisquel 4.0 Taranis',
+ 'ututo_xs_2009' => 'UTUTO XS 2009',
+ 'ututo_xs_2010' => 'UTUTO XS 2010',
+ 'venenux_0_8' => 'VENENUX 0.8',
+ );
+
+ public static function getName($distList = '')
+ {
+ $returnString = null;
+ $returnArray = array();
+ $distArray = explode(',',$distList);
+ foreach ($distArray as $dist)
+ {
+ $dist = trim($dist);
+ if (array_key_exists($dist,self::$allowed))
+ {
+ $returnArray[] = self::$allowed[$dist];
+ }
+ }
+ return implode(" <br /> ",$returnArray);
+ }
+
+ public static function check($distString)
+ {
+ $distArray = explode(',',$distString);
+
+ $allowedArray = array_keys(self::$allowed);
+
+ foreach ($distArray as $dist)
+ {
+ $dist = trim($dist);
+ if (!in_array($dist,$allowedArray)) return false;
+ }
+
+ return true;
+ }
+
+ public static function getFormHtml()
+ {
+ $str = "<div class='dist_checkboxes_hidden_box'>";
+ $str .= "<div class='dist_checkboxes_hidden_box_inner'>";
+ foreach (self::$allowed as $value => $label)
+ {
+ $str .= "<div class=\"hidden_box_item\"><input class=\"hidden_box_input $value\" type=\"checkbox\" name=\"$value\" value=\"$value\"/> $label</div>";
+ }
+ $str .= "</div>";
+ $str .= "<input class=\"hidden_box_distribution_submit\" type=\"submit\" value=\"apply\">";
+ $str .= "<input class=\"hidden_box_distribution_cancel\" type=\"submit\" value=\"cancel\">";
+ $str .= "</div>";
+
+ return $str;
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php
new file mode 100644
index 0000000..e711231
--- /dev/null
+++ b/h-source/Application/Include/hardware.php
@@ -0,0 +1,216 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+
+class Hardware
+{
+
+ public static $controllers = array('notebooks','wifi','videocards','printers','scanners'); //used by UsersController::login()
+
+ public static $commYear = 'not-specified,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992';
+
+}
+
+class Printer extends hardware
+{
+ public static $vendors = array(
+ "brother" => "brother",
+ "Canon" => "Canon",
+ "EPSON" => "EPSON",
+ "Lexmark" => "Lexmark",
+ "KONICA-MINOLTA" => "KONICA-MINOLTA",
+ "Hewlett-Packard" => "Hewlett-Packard",
+ "Panasonic" => "Panasonic",
+ "RICOH" => "RICOH",
+ "SAMSUNG" => "SAMSUNG",
+ "SHARP" => "SHARP",
+ "TOSHIBA" => "TOSHIBA",
+ "XEROX" => "XEROX",
+ );
+
+ public static $compatibility = array(
+ "A Full" => "A-Full",
+ "B Partial" => "B-Partial",
+ "C None" => "C-None",
+ );
+
+ public static $interface = "not-specified,USB,Serial,Parallel,Firewire,SCSI,Ethernet";
+
+ public static function vendorsList()
+ {
+ return implode(',',array_values(self::$vendors));
+ }
+
+ public static function compatibilityList()
+ {
+ return implode(',',array_values(self::$compatibility));
+ }
+
+}
+
+class Wifi extends hardware
+{
+ public static $vendors = array(
+ "A-LINK" => "A-LINK",
+ "Airlink101" => "Airlink101",
+ "Belkin" => "Belkin",
+ "Broadcom" => "Broadcom",
+ "CANYON" => "CANYON",
+ "D-Link" => "D-Link",
+ "Hawking" => "Hawking",
+ "Intel" => "Intel",
+ "LevelOne" => "LevelOne",
+ "Linksys" => "Linksys",
+ "NEC" => "NEC",
+ "Netgear" => "Netgear",
+ "Ralink" => "Ralink",
+ "TOSHIBA" => "TOSHIBA",
+ "TP-LINK" => "TP-LINK",
+ );
+
+ public static $interface = "not-specified,USB,PCI,PCI-E,mini-PCI,mini-PCI-E,ExpressCard,PC-Card";
+
+ public static $wifiSelect = 'yes,no';
+
+ public static function vendorsList()
+ {
+ return implode(',',array_values(self::$vendors));
+ }
+}
+
+class Videocard extends hardware
+{
+ public static $vendors = array(
+ "ATI" => "ATI",
+ "NVIDIA" => "NVIDIA",
+ "Intel" => "Intel",
+ );
+
+ public static $videoSelect = array(
+ "works with 3D acceleration" => "works_with_3D",
+ "works, but without 3D acceleration" => "works_without_3D",
+ );
+
+ public static $videoReverse = array(
+ "works_with_3D" => "works with 3D acceleration",
+ "works_without_3D" => "works, but without 3D acceleration",
+ );
+
+ public static $interface = "not-specified,PCI,AGP,PCI-E,ISA";
+
+ public static function vendorsList()
+ {
+ return implode(',',array_values(self::$vendors));
+ }
+
+ public static function videoList()
+ {
+ return implode(',',array_values(self::$videoSelect));
+ }
+}
+
+
+class Notebooks extends Hardware
+{
+
+ public static $vendors = array(
+ "Acer" => "Acer",
+ "Apple" => "Apple",
+ "Asus" => "Asus",
+ "Compal Electronics" => "Compal-Electronics",
+ "COMPAQ" => "COMPAQ",
+ "Dell" => "Dell",
+ "emachines" => "emachines",
+ "FUJITSU" => "FUJITSU",
+ "Gateway" => "Gateway",
+ "Hewlett Packard" => "Hewlett-Packard",
+ "IBM" => "IBM",
+ "Lenovo" => "Lenovo",
+ "LG" => "LG",
+ "Philco" => "Philco",
+ "Philips" => "Philips",
+ "Panasonic" => "Panasonic",
+ "Sony" => "Sony",
+ "SAMSUNG" => "SAMSUNG",
+ "Thomson" => "Thomson",
+ "TOSHIBA" => "TOSHIBA",
+ );
+
+ public static $compatibility = array(
+ "A Platinum" => "A-platinum",
+ "B Gold" => "B-gold",
+ "C Silver" => "C-silver",
+ "D Bronze" => "D-bronze",
+ "E Garbage" => "E-garbage"
+ );
+
+ public static $subtypeSelect = 'notebook,netbook,not-specified';
+
+ public static $videoSelect = array(
+ "not specified" => 'not-specified',
+ "yes, with 3D acceleration" => "yes_with_3D",
+ "yes, but without 3D acceleration" => "yes_without_3D",
+ "it does not work" => "no",
+ );
+
+ public static $videoReverse = array(
+ "yes_with_3D" => "works with 3D acceleration",
+ "yes_without_3D" => "works but without 3D acceleration",
+ "no" => "it does not work",
+ 'not-specified' => "not specified how it works",
+ "" => ""
+ );
+
+ public static $wifiSelect = array(
+ "not specified" => 'not-specified',
+ 'yes' => 'yes',
+ 'no' => 'no',
+ 'there is no wifi card' => 'no-wifi-card',
+ );
+
+ public static $wifiReverse = array(
+ "yes" => "it works",
+ "no" => "it does not work",
+ 'not-specified' => "not specified how it works",
+ 'no-wifi-card' => 'there is no wifi card',
+ "" => ""
+ );
+
+ public static function videoList()
+ {
+ return implode(',',array_values(self::$videoSelect));
+ }
+
+ public static function wifiList()
+ {
+ return implode(',',array_values(self::$wifiSelect));
+ }
+
+ public static function vendorsList()
+ {
+ return implode(',',array_values(self::$vendors));
+ }
+
+ public static function compatibilityList()
+ {
+ return implode(',',array_values(self::$compatibility));
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php
new file mode 100644
index 0000000..8351a88
--- /dev/null
+++ b/h-source/Application/Include/languages.php
@@ -0,0 +1,322 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class Lang
+{
+ public static $allowed = array('en','es','fr','it');
+ public static $current = 'en';
+
+ public static $complete = array(
+ 'en' => 'gb.png,English',
+ 'es' => 'es.png,Español',
+ 'fr' => 'fr.png,Français',
+ 'it' => 'it.png,Italiano',
+ );
+
+ public static $i18n = array(
+ 'it' => array
+ (
+ "List of issues" => "Lista di questioni",
+ "TITLE" => "TITOLO",
+ "TOPIC" => "ARGOMENTO",
+ "OPENED BY" => "APERTO DA",
+ "DATE" => "DATA",
+ "REPLIES" => "MESSAGGI",
+ "PRIORITY" => "PRIORITÀ",
+ "STATUS" => "STATO",
+ "You have to" => "Devi eseguire il",
+ "in order to submit an issue" => "per poter aprire una nuova questione",
+ "Description" => "Descrizione",
+ "Messages" => "Messaggi",
+ "this message has been deleted" => "questo messaggio è stato cancellato",
+ "in order to submit a message to this issue" => "per aggiungere un messaggio a questa questione",
+ "model name" => "nome del modello",
+ "model type" => "tipo di device",
+ "year of commercialization" => "anno di commercializzazione",
+ "Results of the search" => "Risultati della ricerca",
+ "page list" => "pagine",
+ "No devices found" => "Non è stato trovato alcun device",
+ "vendor" => "marca",
+ "compatibility" => "compatibilità",
+ "year" => "anno",
+ "subtype" => "sottotipo",
+ "sort by" => "ordina per",
+ "interface" => "interfaccia",
+ "does it work?" => "funziona?",
+ "preview of the message" => "anteprima del messaggio",
+ "preview of the new issue message" => "anteprima del testo della questione",
+ "Add a message to this issue" => "Aggiungi un messaggio a questa questione",
+ "Add a new issue" => "Aggiungi una nuova questione",
+ "MESSAGE" => "MESSAGGIO",
+ "there are no messages" => "non ci sono messaggi",
+ "No notebooks found" => "Non è stato trovato alcun notebook",
+ "subtype (notebook or netbook)" => "sottotipo (notebook or netbook)",
+ "compatibility with free software" => "compatibilità con il software libero",
+ "view the other specifications" => "guarda le altre specifiche",
+ "model" => "modello",
+ "model id" => "id del modello",
+ "tested on" => "testato con",
+ "tested with the following kernel libre" => "testato con il seguente kernel libre",
+ "video card model" => "modello di scheda video",
+ "wifi model" => "modello di scheda wifi",
+ "GNU/Linux distribution used for the test" => "distribuzione GNU/Linux usata per il test",
+ "does the video card work?" => "funziona la scheda video?",
+ "does the wifi card work?" => "funziona la scheda wifi?",
+ "Description: (write here all the useful information)" => "Descrizione (scrivi sotto tutte le informazioni utili)",
+ "discover all the wiki tags" => "scopri tutti i tag della wiki",
+ "Fields marked with <b>*</b> are mandatory" => "I campi marcati con <b>*</b> sono obbligatori",
+ "No printers found" => "Non è stata trovata alcuna stampante",
+ "interface" => "interfaccia",
+ "VendorID:ProductID code of the device" => "codice VendorID:ProductID del prodotto",
+ "free driver used" => "driver liberi usati",
+ "set not-specified if not sure" => "seleziona not-specified se non sei sicuro/a",
+ "see the help page or leave blank if you are not sure" => "guarda nella pagina di help o lascia vuoto se non sei sicuro/a",
+ "No scanners found" => "Non sono è stato trovato alcuno scanner",
+ "No video cards found" => "Non è stata trovata alcuna scheda grafica",
+ "how does it work with free software?" => "come funziona con il software libero?",
+ "No wifi cards found" => "Non è stata trovata alcuna scheda wifi",
+ "does it work with free software?" => "funziona con il software libero?",
+ "differences in the entry" => "differenze nel campo",
+ ),
+ 'es' => array
+ (
+ "List of issues" => "Lista de incidencias",
+ "TITLE" => "TITULO",
+ "TOPIC" => "ARGUMENTO",
+ "OPENED BY" => "ABIERTO POR",
+ "DATE" => "FECHA",
+ "REPLIES" => "RESPUESTAS",
+ "PRIORITY" => "PRIORIDAD",
+ "STATUS" => "ESTADO",
+ "You have to" => "Tiene que",
+ "in order to submit an issue" => "para poder agregar una incidencia",
+ "Description" => "Descripción",
+ "Messages" => "Mensajes",
+ "this message has been deleted" => "este mensaje ha sido borrado",
+ "in order to submit a message to this issue" => "para poder agregar un mensaje a esta incidencia",
+ "model name" => "nombre del modelo",
+ "model type" => "tipo de modelo",
+ "year of commercialization" => "año de comercialización",
+ "Results of the search" => "Resultado de la búsqueda",
+ "page list" => "página",
+ "No devices found" => "No se encontró ningún dispositivo",
+ "vendor" => "fabricante",
+ "compatibility" => "compatibilidad",
+ "year" => "año",
+ "subtype" => "subtipo",
+ "sort by" => "ordenar por",
+ "interface" => "interfaz",
+ "does it work?" => "¿funciona?",
+ "preview of the message" => "vista previa del mensaje",
+ "preview of the new issue message" => "vista previa del mensaje de la incidencia",
+ "Add a message to this issue" => "Agregue un mensaje a esta incidencia",
+ "Add a new issue" => "Agregue una nueva incidencia",
+ "MESSAGE" => "MENSAJE",
+ "there are no messages" => "no hay mensajes",
+ "No notebooks found" => "No se encontró ninguna laptop",
+ "subtype (notebook or netbook)" => "subtipo (laptop o netbook)",
+ "compatibility with free software" => "compatibilidad con software libre",
+ "view the other specifications" => "ver otras especificaciones",
+ "model" => "modelo",
+ "model id" => "id del modelo",
+ "tested on" => "probado con",
+ "tested with the following kernel libre" => "probado con el siguiente kernel libre",
+ "video card model" => "modelo de tarjeta de video",
+ "wifi model" => "modelo de tarjeta de red inalámbrica",
+ "GNU/Linux distribution used for the test" => "distribución GNU/Linux usada para la prueba",
+ "does the video card work?" => "¿funciona la tarjeta de video?",
+ "does the wifi card work?" => "¿funciona la tarjeta de red inalámbrica?",
+ "Description: (write here all the useful information)" => "Descripción (escriba aquí toda la información útil)",
+ "discover all the wiki tags" => "mostrar todas las etiquetas del wiki",
+ "Fields marked with <b>*</b> are mandatory" => "Campos marcados con <b>*</b> son obligatorios",
+ "No printers found" => "No se encontró ninguna impresora",
+ "interface" => "interfaz",
+ "VendorID:ProductID code of the device" => "código VendorID:ProductID del dispositivo",
+ "free driver used" => "driver libre usado",
+ "set not-specified if not sure" => "seleccione not-specified si no esta seguro/a",
+ "see the help page or leave blank if you are not sure" => "vea la página de ayuda o deje vacío si no esta seguro/a",
+ "No scanners found" => "No se encontró ningun escáner",
+ "No video cards found" => "No se encontró ninguna tarjeta de video",
+ "how does it work with free software?" => "¿como funciona con software libre?",
+ "No wifi cards found" => "No se encontró ninguna tarjeta de red inalámbrica",
+ "does it work with free software?" => "¿funciona con software libre?",
+ "differences in the entry" => "diferencias en el campo",
+ ),
+ );
+
+ public static function sanitize($lang = 'en')
+ {
+ return (in_array($lang,self::$allowed)) ? sanitizeAll($lang) : 'en';
+ }
+}
+
+class MyStrings
+{
+
+ public static $view = array(
+
+ 'en' => array(
+
+ 'notebooks' => array(
+
+ 'element' => 'notebook'
+
+ ),
+
+ 'wifi' => array(
+
+ 'element' => 'wifi card'
+
+ ),
+
+ 'videocards'=> array(
+
+ 'element' => 'video card'
+
+ ),
+
+ 'printers'=> array(
+
+ 'element' => 'printer'
+
+ ),
+
+ 'scanners'=> array(
+
+ 'element' => 'scanner'
+
+ ),
+ ),
+
+ 'fr' => array(
+
+ 'notebooks' => array(
+
+ 'element' => 'notebook'
+
+ ),
+
+ 'wifi' => array(
+
+ 'element' => 'wifi card'
+
+ ),
+
+ 'videocards'=> array(
+
+ 'element' => 'video card'
+
+ ),
+
+ 'printers'=> array(
+
+ 'element' => 'printer'
+
+ ),
+
+ 'scanners'=> array(
+
+ 'element' => 'scanner'
+
+ ),
+ ),
+
+ 'it' => array(
+
+ 'notebooks' => array(
+
+ 'element' => 'notebook'
+
+ ),
+
+ 'wifi' => array(
+
+ 'element' => 'wifi card'
+
+ ),
+
+ 'videocards'=> array(
+
+ 'element' => 'video card'
+
+ ),
+
+ 'printers'=> array(
+
+ 'element' => 'printer'
+
+ ),
+
+ 'scanners'=> array(
+
+ 'element' => 'scanner'
+
+ ),
+ ),
+
+ 'es' => array(
+
+ 'notebooks' => array(
+
+ 'element' => 'notebook'
+
+ ),
+
+ 'wifi' => array(
+
+ 'element' => 'wifi card'
+
+ ),
+
+ 'videocards'=> array(
+
+ 'element' => 'video card'
+
+ ),
+
+ 'printers'=> array(
+
+ 'element' => 'printer'
+
+ ),
+
+ 'scanners'=> array(
+
+ 'element' => 'scanner'
+
+ ),
+ ),
+ );
+
+ //type => controller
+ public static $reverse = array(
+ 'notebook' => 'notebooks',
+ 'wifi' => 'wifi',
+ 'videocard' => 'videocards',
+ 'printer' => 'printers',
+ 'scanner' => 'scanners',
+ );
+
+ public static function getTypes()
+ {
+ return implode(',',array_keys(self::$reverse));
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php
new file mode 100644
index 0000000..a5e3934
--- /dev/null
+++ b/h-source/Application/Include/myFunctions.php
@@ -0,0 +1,330 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+function encodeUrl($url)
+{
+ $url = str_replace(' ','-',$url);
+ $url = str_replace('[',null,$url);
+ $url = str_replace(']',null,$url);
+ $url = str_replace('(',null,$url);
+ $url = str_replace(')',null,$url);
+ $url = urlencode($url);
+// $url = html_entity_decode($url, ENT_QUOTES);
+// $url = xml_encode($url);
+ return $url;
+}
+
+
+function smartDate($uglyDate = null, $lang = 'en')
+{
+ switch ($lang)
+ {
+ case 'en':
+ $smDate = date('H:i, d F Y',strtotime($uglyDate));
+ break;
+ default:
+ $smDate = date('H:i, d F Y',strtotime($uglyDate));
+ }
+ return $smDate;
+}
+
+function sanitizeString($string)
+{
+ $string = preg_match('/^[a-zA-Z0-9\-\_\.\+\s]+$/',$string) ? sanitizeAll($string) : 'undef';
+ return $string;
+}
+
+function sanitizeAlphanum($string)
+{
+ $string = ctype_alnum($string) ? sanitizeAll($string) : 'undef';
+ return $string;
+}
+
+
+function getOrderByClause($string)
+{
+ switch ($string)
+ {
+ case 'last-inserted':
+ $orderBy = 'hardware.id_hard desc';
+ break;
+ case 'alphabetically':
+ $orderBy = 'model';
+ break;
+ case 'alphabetically-desc':
+ $orderBy = 'model desc';
+ break;
+ case 'compatibility':
+ $orderBy = 'compatibility';
+ break;
+ case 'undef':
+ $orderBy = 'hardware.id_hard desc';
+ break;
+ default:
+ $orderBy = 'hardware.id_hard desc';
+ }
+
+ return $orderBy;
+}
+
+
+// function isEqual($str1, $str2)
+// {
+// // $str1 = str_replace("\n",'',$str1);
+// // $str1 = str_replace("\r",null,$str1);
+// // $str2 = str_replace("\n",'',$str1);
+// // $str2 = str_replace("\r",null,$str1);
+//
+// return (strcmp($str1,$str2) === 0) ? true : false;
+// }
+//
+// function getNewKeys($array,$ovalue)
+// {
+// $res = array();
+// for ($i = 0; $i < count($array); $i++)
+// {
+// if (isEqual($array[$i],$ovalue)) $res[] = $i;
+// // if (strcmp($keys[$i],$ovalue) === 0) $res[] = $i;
+// }
+// return $res;
+// }
+
+function diff($old, $new){
+ $maxlen = 0;
+ foreach($old as $oindex => $ovalue){
+// $nkeys = getNewKeys($new,$ovalue);
+ $nkeys = array_keys($new, $ovalue);
+ foreach($nkeys as $nindex){
+ $matrix[$oindex][$nindex] = isset($matrix[$oindex - 1][$nindex - 1]) ?
+ $matrix[$oindex - 1][$nindex - 1] + 1 : 1;
+ if($matrix[$oindex][$nindex] > $maxlen){
+ $maxlen = $matrix[$oindex][$nindex];
+ $omax = $oindex + 1 - $maxlen;
+ $nmax = $nindex + 1 - $maxlen;
+ }
+ }
+ }
+ if($maxlen == 0) return array(array('d'=>$old, 'i'=>$new));
+ return array_merge(
+ diff(array_slice($old, 0, $omax), array_slice($new, 0, $nmax)),
+ array_slice($new, $nmax, $maxlen),
+ diff(array_slice($old, $omax + $maxlen), array_slice($new, $nmax + $maxlen)));
+}
+
+function htmlDiff($old, $new){
+ $old = str_replace("\r\n"," \r\n ",$old);
+ $new = str_replace("\r\n"," \r\n ",$new);
+
+ $ret = null;
+ $diff = diff(explode(' ', $old), explode(' ', $new));
+ foreach($diff as $k){
+ if(is_array($k))
+ $ret .= (!empty($k['d'])?"<del>".implode(' ',$k['d'])."</del> ":'').
+ (!empty($k['i'])?"<ins>".implode(' ',$k['i'])."</ins> ":'');
+ else $ret .= $k . ' ';
+ }
+ return $ret;
+}
+
+
+//a cosa serve?
+function applyBreaks($values,$fields)
+{
+ $fieldsArray = explode(',',$fields);
+
+ foreach ($fieldsArray as $field)
+ {
+ if (array_key_exists($field,$values))
+ {
+ $values[$field] = nl2br($values[$field]);
+ }
+ }
+ return $values;
+}
+
+
+function getLinkToUser($user)
+{
+ if (strstr($user,'__'))
+ {
+ return str_replace('__',null,$user);
+ }
+ else
+ {
+ return "<a href='http://".DOMAIN_NAME."/users/meet/".Lang::$current."/$user'>$user</a>";
+ }
+}
+
+
+
+//decode the text of the wiki
+function decodeWikiText($string)
+{
+
+ $string = preg_replace('/(\[hr\])/', '<hr />',$string);
+
+ $string = preg_replace_callback('/(\[a\])(.*?)(\[\/a\])/', 'linkTo',$string);
+
+ $string = preg_replace_callback('/(\[a\])(.*?)\|(.*?)(\[\/a\])/', 'linkToWithText',$string);
+
+ $string = preg_replace_callback('/(\[notebook\])([0-9]*?)(\[\/notebook\])/s', 'linkToNotebook',$string);
+
+ $string = preg_replace_callback('/(\[wifi\])([0-9]*?)(\[\/wifi\])/s', 'linkToWifi',$string);
+
+ $string = preg_replace_callback('/(\[videocard\])([0-9]*?)(\[\/videocard\])/s', 'linkToVideocard',$string);
+
+ $string = preg_replace('/(\[b\])(.*?)(\[\/b\])/s', '<b>${2}</b>',$string);
+
+ $string = preg_replace('/(\[u\])(.*?)(\[\/u\])/s', '<u>${2}</u>',$string);
+
+ $string = preg_replace('/(\[i\])(.*?)(\[\/i\])/s', '<i>${2}</i>',$string);
+
+ $string = preg_replace('/(\[del\])(.*?)(\[\/del\])/s', '<del>${2}</del>',$string);
+
+ $string = preg_replace('/(\[\*\])(.*?)(\[\/\*\])/s', '<li>${2}</li>',$string);
+
+ $string = preg_replace('/(\[list\])(.*?)(\[\/list\])/s', '<ul>${2}</ul>',$string);
+
+ $string = preg_replace('/(\[enum\])(.*?)(\[\/enum\])/s', '<ol>${2}</ol>',$string);
+
+ $string = preg_replace('/(\[code\])(.*?)(\[\/code\])/s', '<pre class="code_pre">${2}</pre>',$string);
+
+ $string = preg_replace('/(\[p\])(.*?)(\[\/p\])/s', '<p>${2}</p>',$string);
+
+ $string = preg_replace('/(\[h1\])(.*?)(\[\/h1\])/s', '<div class="div_h1">${2}</div>',$string);
+
+ $string = preg_replace('/(\[h2\])(.*?)(\[\/h2\])/s', '<div class="div_h2">${2}</div>',$string);
+
+ $string = preg_replace('/(\[h3\])(.*?)(\[\/h3\])/s', '<div class="div_h3">${2}</div>',$string);
+
+ return $string;
+}
+
+function checkUrl($url)
+{
+// $match = '/^http\:\/\/(www\.)?[a-zA-Z0-9\-\_]+(\.[a-zA-Z0-9\-\_]+)?\.(com|net|it|info|org|eu|uk)((\/[a-zA-Z0-9\_\-\+]+)+[\/]?)?(\?([a-zA-Z0-9\_\-\+\s]+\=[a-zA-Z0-9\_\-\s\+\&amp;]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/';
+
+ $match = '/^http\:\/\/(www\.)?[a-zA-Z0-9\-\_]+(\.[a-zA-Z0-9\-\_]+)?\.(com|net|it|info|org|eu|uk|ca)((\/[a-zA-Z0-9\_\-\+]+)*(\/([a-zA-Z0-9\_\-\.\+]+\.(php|html|htm|asp|aspx|jsp|cgi))?)?)?(\?([a-zA-Z0-9\_\-\+\s]+\=[a-zA-Z0-9\_\-\s\+\&amp;]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/';
+
+ if (preg_match($match,$url))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+function vitalizeUrl($string)
+{
+ if (checkUrl($string))
+ {
+ return "<a title = '".$string."' href='".$string."'>".$string."</a>";
+ }
+ return $string;
+}
+
+function linkTo($match)
+{
+ if (checkUrl($match[2]))
+ {
+ return "<a title = '".$match[2]."' href='".$match[2]."'>".$match[2]."</a>";
+ }
+ else
+ {
+ return $match[0];
+ }
+}
+
+function linkToWithText($match)
+{
+ if (checkUrl($match[2]))
+ {
+
+ return "<a title = '".$match[2]."' href='".$match[2]."'>".$match[3]."</a>";
+ }
+ else
+ {
+ return $match[0];
+ }
+}
+
+//create the link to the wiki page of the notebook
+function linkToNotebook($match)
+{
+ $hardware = new HardwareModel();
+ $clean['id_hard'] = (int)$match[2];
+ $name = encodeUrl($hardware->getTheModelName($clean['id_hard']));
+ $href = "HTTP://".DOMAIN_NAME."/notebooks/view/".Lang::$current."/".$clean['id_hard']."/$name";
+ return (strcmp($name,'') !== 0) ? "<a title = 'link to notebook $name: $href' href='$href'>".$name."</a>" : $match[0];
+}
+
+//create the link to the wiki page of the wifi
+function linkToWifi($match)
+{
+ $hardware = new HardwareModel();
+ $clean['id_hard'] = (int)$match[2];
+ $name = encodeUrl($hardware->getTheModelName($clean['id_hard']));
+ $href = "HTTP://".DOMAIN_NAME."/wifi/view/".Lang::$current."/".$clean['id_hard']."/$name";
+ return (strcmp($name,'') !== 0) ? "<a title = 'link to wifi card $name: $href' href='$href'>".$name."</a>" : $match[0];
+}
+
+//create the link to the wiki page of the videocard
+function linkToVideocard($match)
+{
+ $hardware = new HardwareModel();
+ $clean['id_hard'] = (int)$match[2];
+ $name = encodeUrl($hardware->getTheModelName($clean['id_hard']));
+ $href = "HTTP://".DOMAIN_NAME."/videocards/view/".Lang::$current."/".$clean['id_hard']."/$name";
+ return (strcmp($name,'') !== 0) ? "<a title = 'link to video card $name: $href' href='$href'>".$name."</a>" : $match[0];
+}
+
+function getUserName($id_user = 0)
+{
+ $clean['id_user'] = (int)$id_user;
+ $u = new UsersModel();
+ return $u->getUser($clean['id_user']);
+}
+
+function getMotivation($row,$controller)
+{
+ if (strcmp($row['deletion']['object'],'duplication') === 0)
+ {
+ $clean['id_hard'] = (int)$row['deletion']['id_duplicate'];
+ $hardware = new HardwareModel();
+ $name = encodeUrl($hardware->getTheModelName($clean['id_hard']));
+ return "<b>duplication</b> of the model having id <b><a href='http://".DOMAIN_NAME."/".$controller."/view/".Lang::$current."/".$clean['id_hard']."/".$name."'>".$clean['id_hard']."</a></b>";
+ }
+ else
+ {
+ return "<b>".$row['deletion']['object']."</b>";
+ }
+}
+
+//get the text in the right language
+function gtext($string)
+{
+ if (isset(Lang::$i18n[Lang::$current][$string]))
+ {
+ return Lang::$i18n[Lang::$current][$string];
+ }
+ return $string;
+} \ No newline at end of file
diff --git a/h-source/Application/Include/params.php b/h-source/Application/Include/params.php
new file mode 100644
index 0000000..d53960b
--- /dev/null
+++ b/h-source/Application/Include/params.php
@@ -0,0 +1,143 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class Website
+{
+ static public $generalMail = "";
+
+ static public $generalName = "h-node.com";
+
+ static public $projectName = "h-node";
+
+ static public $mailServer = "";
+
+ static public $mailPassword = "";
+}
+
+class Account
+{
+
+ static public $confirmTime = 3600;
+
+ static public function confirm($username,$e_mail,$id_user,$token)
+ {
+ require_once (ROOT.'/External/swiftmailer/lib/swift_required.php');
+
+ $clean['username'] = sanitizeAll($username);
+ $clean['id_user'] = (int)$id_user;
+ $clean['token'] = sanitizeAll($token);
+
+ $siteName = Website::$generalName;
+ $siteMail = Website::$generalMail;
+
+ $mess = "Hello,\n\nyou have registered an account at $siteName with the following data:\nusername: ".$clean['username']."\n\nin order to confirm the registration of the new account follow the link below\nhttp://".DOMAIN_NAME."/users/confirm/".Lang::$current."/".$clean['id_user']."/".$clean['token']."\n\nIf you don't want to confirm the account registration\nthen wait one hour and your username and e-mail will be deleted from the database\n\nIf you received this e-mail for error, please simply disregard this message";
+
+ $message = Swift_Message::newInstance()->setSubject('account registration to '.$siteName)->setFrom(array($siteMail => $siteName))->setTo(array($e_mail))->setBody($mess);
+
+ //Create the Transport
+ $transport = Swift_SmtpTransport::newInstance(Website::$mailServer, 25)->setUsername(Website::$generalMail)->setPassword(Website::$mailPassword);
+
+ //Create the Mailer using your created Transport
+ $mailer = Swift_Mailer::newInstance($transport);
+
+ //Send the message
+ $result = $mailer->send($message);
+
+ if ($result)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+
+ }
+
+ static public function sendnew($username,$e_mail,$id_user,$token)
+ {
+ require_once (ROOT.'/External/swiftmailer/lib/swift_required.php');
+
+ $clean['username'] = sanitizeAll($username);
+ $clean['id_user'] = (int)$id_user;
+ $clean['token'] = sanitizeAll($token);
+
+ $siteName = Website::$generalName;
+ $siteMail = Website::$generalMail;
+
+ $mess = "Hello,\n\nyou have requested a new password for your account at $siteName.\nYour username is:\n".$clean['username']."\n\nin order to obtain a new password for your account follow the link below\nhttp://".DOMAIN_NAME."/users/change/".Lang::$current."/".$clean['id_user']."/".$clean['token']."\n\nIf you don't want to change the password then disregard this mail\n";
+
+ $message = Swift_Message::newInstance()->setSubject('request a new password at '.$siteName)->setFrom(array($siteMail => $siteName))->setTo(array($e_mail))->setBody($mess);
+
+ //Create the Transport
+ $transport = Swift_SmtpTransport::newInstance(Website::$mailServer, 25)->setUsername(Website::$generalMail)->setPassword(Website::$mailPassword);
+
+ //Create the Mailer using your created Transport
+ $mailer = Swift_Mailer::newInstance($transport);
+
+ //Send the message
+ $result = $mailer->send($message);
+
+ if ($result)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+
+ }
+
+ static public function sendpassword($username,$e_mail,$password)
+ {
+ require_once (ROOT.'/External/swiftmailer/lib/swift_required.php');
+
+ $clean['username'] = sanitizeAll($username);
+ $clean['password'] = sanitizeAll($password);
+
+ $siteName = Website::$generalName;
+ $siteMail = Website::$generalMail;
+
+ $mess = "Hello,\n\nyou have requested a new password for your account to $siteName.\nYour username is:\n".$clean['username']."\n\nYour new password is:\n".$clean['password']."\n";
+
+ $message = Swift_Message::newInstance()->setSubject('get your new h-node.com account password ')->setFrom(array($siteMail => $siteName))->setTo(array($e_mail))->setBody($mess);
+
+ //Create the Transport
+ $transport = Swift_SmtpTransport::newInstance(Website::$mailServer, 25)->setUsername(Website::$generalMail)->setPassword(Website::$mailPassword);
+
+ //Create the Mailer using your created Transport
+ $mailer = Swift_Mailer::newInstance($transport);
+
+ //Send the message
+ $result = $mailer->send($message);
+
+ if ($result)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/BaseModel.php b/h-source/Application/Models/BaseModel.php
new file mode 100644
index 0000000..b40482e
--- /dev/null
+++ b/h-source/Application/Models/BaseModel.php
@@ -0,0 +1,66 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class BaseModel extends Model_Tree {
+
+ public $type = ''; //device type
+ public $diffFields = array();
+
+ public function __construct() {
+ $this->_tables = 'hardware';
+ $this->_idFields = 'id_hard';
+
+ $this->_where=array(
+ 'type' => 'hardware',
+ 'vendor' => 'hardware',
+ 'compatibility' => 'hardware',
+ 'comm_year' => 'hardware',
+ );
+
+ $this->orderBy = 'hardware.id_hard desc';
+ parent::__construct();
+ }
+
+ public function checkType($id_hard = 0)
+ {
+ $clean['id_hard'] = (int)$id_hard;
+ $res = $this->db->select('hardware','type','id_hard='.$clean['id_hard']);
+ if (count($res) > 0)
+ {
+ return (strcmp($this->type,$res[0]['hardware']['type']) === 0 ) ? true : false;
+ }
+ return false;
+ }
+
+ public function getDiffArray($oldArray, $newArray)
+ {
+ $diffArray = array();
+ foreach ($this->diffFields as $field => $label)
+ {
+ if (array_key_exists($field,$oldArray) and array_key_exists($field,$newArray))
+ {
+// echo htmlDiff($oldArray[$field], $newArray[$field]);
+// echo $oldArray[$field].$newArray[$field];
+ $diffArray[$label] = htmlDiff($oldArray[$field], $newArray[$field]);
+ }
+ }
+ return $diffArray;
+ }
+} \ No newline at end of file
diff --git a/h-source/Application/Models/BoxesModel.php b/h-source/Application/Models/BoxesModel.php
new file mode 100644
index 0000000..0e6eee1
--- /dev/null
+++ b/h-source/Application/Models/BoxesModel.php
@@ -0,0 +1,40 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class BoxesModel extends Model_Tree {
+
+ public function __construct() {
+ $this->_tables = 'boxes';
+ $this->_idFields = 'id_box';
+
+ parent::__construct();
+ }
+
+ public $formStruct = array(
+ 'entries' => array(
+ 'title' => array(),
+ 'message' => array('type'=>'Textarea'),
+ 'id_box' => array(
+ 'type' => 'Hidden'
+ )
+ ),
+ );
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/DeletionModel.php b/h-source/Application/Models/DeletionModel.php
new file mode 100644
index 0000000..ea3c4e6
--- /dev/null
+++ b/h-source/Application/Models/DeletionModel.php
@@ -0,0 +1,51 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class DeletionModel extends Model_Tree
+{
+
+ public function __construct()
+ {
+ $this->_tables = 'deletion';
+ $this->_idFields = 'id_del';
+
+// $this->_where=array(
+// 'id_hard' => 'talk'
+// );
+//
+ $this->_popupItemNames = array(
+ 'object' => 'object',
+ );
+
+ $this->_popupLabels = array(
+ 'object' => 'OBJECT',
+ );
+//
+ $this->orderBy = 'deletion.id_del desc';
+
+ $this->strongConditions['insert'] = array(
+ "checkIsStrings|duplication,other" => 'object',
+ "+checkLength|500" => 'message'
+ );
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php
new file mode 100644
index 0000000..710ddaf
--- /dev/null
+++ b/h-source/Application/Models/HardwareModel.php
@@ -0,0 +1,198 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class HardwareModel extends Model_Map {
+
+ public $id_user = 0;
+ public $type = ''; //device type
+ public $lastId = 0; //the id of the last record inserted
+
+ public $formStruct = array(
+ 'entries' => array(
+ 'deleted'=> array('type'=>'Select','options'=>'no,yes'),
+ 'id_hard' => array(
+ 'type' => 'Hidden'
+ )
+ ),
+ );
+
+ public function __construct() {
+ $this->_tables='hardware,regusers,hardware_users';
+ $this->_idFields='id_hard,id_user';
+ $this->_where=array(
+ 'type' => 'hardware',
+ 'username' => 'regusers',
+ 'has_confirmed' => 'regusers',
+ 'deleted' => 'regusers',
+ '-deleted' => 'hardware'
+ );
+ $this->orderBy = 'hardware.id_hard desc';
+ $this->printAssError = "no";
+
+ $this->_popupItemNames = array(
+ 'type'=>'type',
+ 'ask_for_del'=>'ask_for_del',
+ '-deleted'=>'deleted',
+ );
+
+ $this->_popupLabels = array(
+ 'type'=>'TYPE',
+ 'ask_for_del'=>'ASK FOR DEL?',
+ '-deleted'=>'DELETED?',
+ );
+
+ $this->databaseConditions['insert'] = array(
+ 'checkUnique' => 'model',
+ );
+
+ $this->databaseConditions['update'] = array(
+ 'checkUniqueCompl' => 'model',
+ );
+
+ parent::__construct();
+ }
+
+ public function insert()
+ {
+ $this->values['created_by'] = (int)$this->id_user;
+ $this->values['updated_by'] = (int)$this->id_user;
+ $this->values['update_date'] = date('Y-m-d H:i:s');
+
+ //random ID
+ $randomId = md5(uniqid(mt_rand(),true));
+ $this->values["type"] = $randomId;
+
+ parent::insert();
+
+ //associate the user to the record
+ if ($this->queryResult)
+ {
+ $resId = $this->db->select("hardware","id_hard","type='$randomId'");
+ $clean['id'] = $resId[0]['hardware']['id_hard'];
+ $this->lastId = $clean['id'];
+ $this->db->update('hardware','type',array($this->type),'id_hard='.$clean['id']);
+
+ $this->associate($clean['id']);
+ }
+
+ }
+
+ public function update($id)
+ {
+ $clean['id'] = (int)$id;
+
+ $this->values['updated_by'] = (int)$this->id_user;
+ $this->values['update_date'] = date('Y-m-d H:i:s');
+
+ //save the old fields in the revisions table
+ $this->setWhereQueryClause(array('id_hard' => $clean['id']));
+ $oldStruct = $this->getFields($this->fields.',created_by,updated_by,update_date,type,id_hard');
+
+ if (count($oldStruct > 0))
+ {
+ if (strcmp($oldStruct[0]['hardware']['type'],$this->type) === 0)
+ {
+ $oldValues = $oldStruct[0]['hardware'];
+
+ $revisions = new RevisionsModel();
+ $revisions->values = $oldValues;
+ if ($revisions->insert())
+ {
+ parent::update($clean['id']);
+ if ($this->queryResult)
+ {
+ $this->lastId = $clean['id'];
+ if (!$this->checkAssociation($clean['id'],(int)$this->id_user))
+ {
+ $this->associate($clean['id']);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public function makeCurrent($id_rev)
+ {
+ $clean['id_rev'] = (int)$id_rev;
+
+ $revisions = new RevisionsModel();
+
+ $clean['id_hard'] = (int)$revisions->getIdHard($clean['id_rev']);
+
+ //save the old fields in the revisions table
+ $this->setWhereQueryClause(array('id_hard'=>$clean['id_hard']));
+ $oldStruct = $this->getFields($this->fields.',created_by,updated_by,update_date,type,id_hard');
+
+ if (count($oldStruct > 0))
+ {
+ if (strcmp($oldStruct[0]['hardware']['type'],$this->type) === 0)
+ {
+ //get the values of the revision
+ $revisions->setWhereQueryClause(array('id_rev'=>$clean['id_rev']));
+ $newStruct = $revisions->getFields($this->fields.',created_by,updated_by,update_date,type,id_hard');
+
+ if (count($newStruct > 0))
+ {
+ $revisions->values = $oldStruct[0]['hardware'];
+
+ $this->values = $newStruct[0]['revisions'];
+ $this->values['updated_by'] = (int)$this->id_user;
+ $this->values['update_date'] = date('Y-m-d H:i:s');
+
+ if ($revisions->insert())
+ {
+ if (parent::update($clean['id_hard']))
+ {
+ $this->lastId = $clean['id_hard'];
+ if (!$this->checkAssociation($clean['id_hard'],(int)$this->id_user))
+ {
+ $this->associate($clean['id_hard']);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ $this->notice = "<div class='alert'>Wrong type..</div>\n";
+ }
+ }
+
+ }
+
+ public function associate($id_record)
+ {
+ return parent::associate((int)$id_record,(int)$this->id_user);
+ }
+
+ //get the model name
+ public function getTheModelName($id)
+ {
+ $clean['id'] = (int)$id;
+ $this->setWhereQueryClause(array('id_hard' => $clean['id']));
+ $res = $this->getFields('model');
+ $name = count($res) > 0 ? $res[0]['hardware']['model'] : '';
+ return $name;
+ }
+
+
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/HistoryModel.php b/h-source/Application/Models/HistoryModel.php
new file mode 100644
index 0000000..309bc99
--- /dev/null
+++ b/h-source/Application/Models/HistoryModel.php
@@ -0,0 +1,48 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class HistoryModel extends Model_Tree {
+
+ public function __construct() {
+ $this->_tables = 'history';
+ $this->_idFields = 'id_history';
+
+ $this->orderBy = 'history.id_history';
+
+ $this->_popupFunctions = array(
+ 'created_by'=> 'getUserName',
+ );
+
+ $this->_popupItemNames = array(
+ 'type' => 'type',
+ 'action' => 'action',
+ 'created_by'=> 'created_by',
+ );
+
+ $this->_popupLabels = array(
+ 'type' => 'TYPE',
+ 'action' => 'ACTION',
+ 'created_by'=> 'MODERATOR',
+ );
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/IssuesModel.php b/h-source/Application/Models/IssuesModel.php
new file mode 100644
index 0000000..8ca8a52
--- /dev/null
+++ b/h-source/Application/Models/IssuesModel.php
@@ -0,0 +1,131 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class IssuesModel extends Model_Tree {
+
+ public function __construct() {
+ $this->_tables = 'issues';
+ $this->_idFields = 'id_issue';
+
+ $this->_onDelete = 'nocheck';
+
+ $this->_where = array(
+ 'priority' => 'issues',
+ 'status' => 'issues',
+ 'topic' => 'issues',
+ );
+
+ $this->_popupItemNames = array(
+ 'priority' => 'priority',
+ 'status' => 'status',
+ 'topic' => 'topic',
+ 'deleted' => 'deleted',
+ );
+
+ $this->_popupLabels = array(
+ 'priority' => 'PRIORITY',
+ 'status' => 'STATUS',
+ 'topic' => 'TOPIC',
+ 'deleted' => 'DELETED?',
+ );
+
+ $this->orderBy = 'issues.id_issue desc';
+
+ $this->strongConditions['insert'] = array(
+ "checkLength|99" => 'title',
+ "+checkLength|34" => 'topic',
+ "++checkLength|15" => 'priority',
+ "+++checkLength|5000" => 'message',
+ "checkisStrings|low,medium,high" => 'priority',
+ "+checkisStrings|maybe-a-bug,new-categories-of-hardware,add-a-vendor-name,other" => 'topic',
+ );
+
+ $this->formStruct = array(
+ 'entries' => array(
+ 'title' => array('labelString' => gtext("TITLE").':'),
+ 'topic' => array(
+ 'type'=>'Select',
+ 'options'=>array(
+ 'Add a vendor name' => 'add-a-vendor-name',
+ 'Maybe a bug' => 'maybe-a-bug',
+ 'Add new categories of hardware' => 'new-categories-of-hardware',
+ 'Other' => 'other'
+ ),
+ 'labelString' => gtext("TOPIC").':',
+ ),
+ 'deleted'=> array(
+ 'type' => 'Select',
+ 'options' => 'no,yes',
+ ),
+ 'priority' => array(
+ 'type'=>'Select',
+ 'options'=>'low,medium,high',
+ 'labelString' => gtext("PRIORITY").':',
+ ),
+ 'message' => array('type'=>'Textarea','idName'=>'bb_code','labelString' => gtext("MESSAGE").':',),
+ 'status' => array(
+ 'type' => 'Select',
+ 'options' => 'opened,closed'
+ ),
+ 'notice' => array(
+ 'type' => 'Textarea',
+ 'idName' => 'bb_code_notice',
+ ),
+ 'id_issue' => array(
+ 'type' => 'Hidden'
+ )
+ ),
+ );
+
+ parent::__construct();
+ }
+
+// public $formStruct = array(
+// 'entries' => array(
+// 'title' => array(),
+// 'topic' => array(
+// 'type'=>'Select',
+// 'options'=>array(
+// 'Add a vendor name' => 'add-a-vendor-name',
+// 'Maybe a bug' => 'maybe-a-bug',
+// 'Add new categories of hardware' => 'new-categories-of-hardware',
+// 'Other' => 'other'
+// ),
+// ),
+// 'deleted'=> array(
+// 'type' => 'Select',
+// 'options' => 'no,yes',
+// ),
+// 'priority' => array('type'=>'Select','options'=>'low,medium,high'),
+// 'message' => array('type'=>'Textarea','idName'=>'bb_code'),
+// 'status' => array(
+// 'type' => 'Select',
+// 'options' => 'opened,closed'
+// ),
+// 'notice' => array(
+// 'type' => 'Textarea',
+// 'idName' => 'bb_code_notice',
+// ),
+// 'id_issue' => array(
+// 'type' => 'Hidden'
+// )
+// ),
+// );
+} \ No newline at end of file
diff --git a/h-source/Application/Models/MessagesModel.php b/h-source/Application/Models/MessagesModel.php
new file mode 100644
index 0000000..64b2bed
--- /dev/null
+++ b/h-source/Application/Models/MessagesModel.php
@@ -0,0 +1,56 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class MessagesModel extends Model_Tree {
+
+ public function __construct() {
+ $this->_tables = 'messages';
+ $this->_idFields = 'id_mes';
+
+ $this->orderBy = 'messages.id_mes';
+
+ $this->_popupItemNames = array(
+ 'deleted' => 'deleted',
+ 'has_read' => 'has_read',
+ );
+
+ $this->_popupLabels = array(
+ 'deleted' => 'DELETED?',
+ 'has_read' => 'ALREADY READ?',
+ );
+
+ $this->strongConditions['insert'] = array(
+ "checkLength|5000" => 'message',
+ );
+
+ parent::__construct();
+ }
+
+ public $formStruct = array(
+ 'entries' => array(
+ 'deleted' => array('type'=>'Select','options'=>'no,yes'),
+ 'has_read' => array('type'=>'Select','options'=>'no,yes'),
+ 'message' => array('type'=>'Textarea','idName'=>'bb_code'),
+ 'id_mes' => array(
+ 'type' => 'Hidden'
+ )
+ ),
+ );
+} \ No newline at end of file
diff --git a/h-source/Application/Models/NewsModel.php b/h-source/Application/Models/NewsModel.php
new file mode 100644
index 0000000..fae053b
--- /dev/null
+++ b/h-source/Application/Models/NewsModel.php
@@ -0,0 +1,42 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class NewsModel extends Model_Tree {
+
+ public function __construct() {
+ $this->_tables = 'news';
+ $this->_idFields = 'id_news';
+
+ $this->orderBy = 'news.id_news desc';
+
+ parent::__construct();
+ }
+
+ public $formStruct = array(
+ 'entries' => array(
+ 'title' => array(),
+ 'message' => array('type'=>'Textarea','idName'=>'bb_code'),
+ 'id_news' => array(
+ 'type' => 'Hidden'
+ )
+ ),
+ );
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/NotebooksModel.php b/h-source/Application/Models/NotebooksModel.php
new file mode 100644
index 0000000..456f75f
--- /dev/null
+++ b/h-source/Application/Models/NotebooksModel.php
@@ -0,0 +1,69 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class NotebooksModel extends BaseModel {
+
+ public $type = 'notebook'; //device type
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'compatibility' => 'compatibility',
+ 'comm_year' => 'comm_year',
+ 'subtype' => 'subtype',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => gtext("vendor"),
+ 'compatibility' => gtext("compatibility"),
+ 'comm_year' => gtext("year"),
+ 'subtype' => gtext("subtype"),
+ );
+
+ $this->_popupWhere = array(
+ 'vendor' => 'type="notebook" and deleted="no"',
+ 'compatibility' => 'type="notebook" and deleted="no"',
+ 'comm_year' => 'type="notebook" and deleted="no"',
+ 'subtype' => 'type="notebook" and deleted="no"',
+ );
+
+ $this->diffFields = array(
+ 'vendor' => gtext("vendor"),
+ 'model' => gtext('model name'),
+ 'subtype' => gtext('subtype (notebook or netbook)'),
+ 'comm_year' => gtext('year of commercialization'),
+ 'distribution' => gtext('GNU/Linux distribution used for the test'),
+ 'compatibility' => gtext('compatibility with free software'),
+ 'kernel' => gtext('tested with the following kernel libre'),
+ 'video_card_type' => gtext('video card model'),
+ 'video_card_works' => gtext('does the video card work?'),
+ 'wifi_type' => gtext('wifi model'),
+ 'wifi_works' => gtext('does the wifi card work?'),
+ 'description' => gtext('Description'),
+ );
+
+ $this->fieldsWithBreaks = array(gtext('Description'));
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/ParamsModel.php b/h-source/Application/Models/ParamsModel.php
new file mode 100644
index 0000000..d1347fe
--- /dev/null
+++ b/h-source/Application/Models/ParamsModel.php
@@ -0,0 +1,41 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class ParamsModel extends Model_Tree {
+
+ public function __construct() {
+ $this->_tables = 'params';
+ $this->_idFields = 'id_par';
+
+ parent::__construct();
+ }
+
+ public $formStruct = array(
+ 'entries' => array(
+ 'updating' => array(
+ 'type'=>'Select',
+ 'options'=>'no,yes',
+ ),
+ 'id_par' => array(
+ 'type' => 'Hidden'
+ )
+ ),
+ );
+} \ No newline at end of file
diff --git a/h-source/Application/Models/PrintersModel.php b/h-source/Application/Models/PrintersModel.php
new file mode 100644
index 0000000..8d5991e
--- /dev/null
+++ b/h-source/Application/Models/PrintersModel.php
@@ -0,0 +1,68 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class PrintersModel extends BaseModel
+{
+
+ public $type = 'printer'; //device type
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'compatibility' => 'compatibility',
+ 'comm_year' => 'comm_year',
+ 'interface' => 'interface',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => gtext("vendor"),
+ 'compatibility' => gtext("compatibility"),
+ 'comm_year' => gtext("year"),
+ 'interface' => gtext("interface"),
+ );
+
+ $this->_popupWhere = array(
+ 'vendor' => 'type="printer" and deleted="no"',
+ 'compatibility' => 'type="printer" and deleted="no"',
+ 'comm_year' => 'type="printer" and deleted="no"',
+ 'interface' => 'type="printer" and deleted="no"',
+ );
+
+ $this->diffFields = array(
+ 'vendor' => gtext("vendor"),
+ 'model' => gtext('model name'),
+ 'pci_id' => gtext("VendorID:ProductID code of the device"),
+ 'comm_year' => gtext('year of commercialization'),
+ 'interface' => gtext("interface"),
+ 'distribution' => gtext('GNU/Linux distribution used for the test'),
+ 'compatibility' => gtext('compatibility with free software'),
+ 'kernel' => gtext('tested with the following kernel libre'),
+ 'driver' => gtext("free driver used"),
+ 'description' => gtext('Description'),
+ );
+
+ $this->fieldsWithBreaks = array(gtext('Description'));
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/ProfileModel.php b/h-source/Application/Models/ProfileModel.php
new file mode 100644
index 0000000..c282b4f
--- /dev/null
+++ b/h-source/Application/Models/ProfileModel.php
@@ -0,0 +1,70 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class ProfileModel extends Model_Tree {
+
+ public function __construct() {
+ $this->_tables = 'profile';
+ $this->_idFields = 'id_prof';
+
+ $this->_where=array(
+ 'username' => 'regusers',
+ 'has_confirmed' => 'regusers',
+ 'deleted' => 'regusers'
+ );
+
+ $this->softConditions['update'] = array(
+ "checkLength|90" => "real_name,where_you_are,fav_distro,birth_date,website|the fields 'real name', 'where_you_are', 'favorite distro', 'website' and 'birthdate' don't have to have more than 90 characters",
+ "checkLength|1000" => "projects,description|the fields 'projects' and 'description' don't have to have more than 1000 characters",
+ "checkIsStrings|no,yes" => "publish_mail"
+ );
+
+ parent::__construct();
+ }
+
+ public $formStruct = array(
+
+ 'entries' => array(
+ 'real_name' => array('labelString'=>'Your real name'),
+ 'website' => array('labelString'=>'Your website address (add http://)'),
+ 'where_you_are' => array('labelString'=>'I\'m from...'),
+ 'birth_date' => array('labelString'=>'My birthdate'),
+ 'fav_distro' => array('labelString'=>'My favourite distribution'),
+ 'projects' => array(
+ 'type' => 'Textarea',
+ 'labelString'=>'Free software projects I\'m working on'
+ ),
+ 'publish_mail' => array(
+ 'type' => 'Select',
+ 'options' => 'no,yes',
+ 'labelString'=> 'Would you like to publish your e-mail address?'
+ ),
+ 'description' => array(
+ 'type' => 'Textarea',
+ 'labelString'=> 'Your description'
+ ),
+ 'id_prof' => array(
+ 'type' => 'Hidden'
+ )
+ ),
+
+ );
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/RevisionsModel.php b/h-source/Application/Models/RevisionsModel.php
new file mode 100644
index 0000000..203da64
--- /dev/null
+++ b/h-source/Application/Models/RevisionsModel.php
@@ -0,0 +1,48 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class RevisionsModel extends Model_Tree {
+
+ public $id_user = 0;
+ public $type = ''; //device type
+
+ public function __construct() {
+ $this->_tables='revisions';
+ $this->_idFields='id_rev';
+
+ $this->_where=array(
+ 'id_hard'=>'revisions'
+ );
+
+ $this->orderBy = 'id_rev desc';
+
+ parent::__construct();
+ }
+
+ public function getIdHard($id_rev = 0)
+ {
+ $clean['id_rev'] = (int)$id_rev;
+
+ $res = $this->db->select('revisions','id_hard','id_rev='.$clean['id_rev']);
+
+ return (count($res) > 0) ? $res[0]['revisions']['id_hard'] : 0;
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/ScannersModel.php b/h-source/Application/Models/ScannersModel.php
new file mode 100644
index 0000000..74e2bdd
--- /dev/null
+++ b/h-source/Application/Models/ScannersModel.php
@@ -0,0 +1,68 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class ScannersModel extends BaseModel
+{
+
+ public $type = 'scanner'; //device type
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'compatibility' => 'compatibility',
+ 'comm_year' => 'comm_year',
+ 'interface' => 'interface',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => gtext("vendor"),
+ 'compatibility' => gtext("compatibility"),
+ 'comm_year' => gtext("year"),
+ 'interface' => gtext("interface"),
+ );
+
+ $this->_popupWhere = array(
+ 'vendor' => 'type="scanner" and deleted="no"',
+ 'compatibility' => 'type="scanner" and deleted="no"',
+ 'comm_year' => 'type="scanner" and deleted="no"',
+ 'interface' => 'type="scanner" and deleted="no"',
+ );
+
+ $this->diffFields = array(
+ 'vendor' => gtext("vendor"),
+ 'model' => gtext('model name'),
+ 'pci_id' => gtext("VendorID:ProductID code of the device"),
+ 'comm_year' => gtext('year of commercialization'),
+ 'interface' => gtext("interface"),
+ 'distribution' => gtext('GNU/Linux distribution used for the test'),
+ 'compatibility' => gtext('compatibility with free software'),
+ 'kernel' => gtext('tested with the following kernel libre'),
+ 'driver' => gtext("free driver used"),
+ 'description' => gtext('Description'),
+ );
+
+ $this->fieldsWithBreaks = array(gtext('Description'));
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/TalkModel.php b/h-source/Application/Models/TalkModel.php
new file mode 100644
index 0000000..992ffa9
--- /dev/null
+++ b/h-source/Application/Models/TalkModel.php
@@ -0,0 +1,52 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class TalkModel extends Model_Tree {
+
+ public function __construct() {
+ $this->_tables = 'talk';
+ $this->_idFields = 'id_talk';
+
+ $this->_where=array(
+ 'id_hard' => 'talk'
+ );
+
+ $this->orderBy = 'talk.id_talk desc';
+
+ $this->strongConditions['insert'] = array(
+ "checkLength|99" => 'title',
+ "+checkNotEmpty" => 'message',
+ "++checkLength|5000" => 'message',
+ );
+
+ parent::__construct();
+ }
+
+ public $formStruct = array(
+ 'entries' => array(
+ 'title' => array(),
+ 'message' => array('type'=>'Textarea'),
+ 'id_talk' => array(
+ 'type' => 'Hidden'
+ )
+ ),
+ );
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/UsersModel.php b/h-source/Application/Models/UsersModel.php
new file mode 100755
index 0000000..c425079
--- /dev/null
+++ b/h-source/Application/Models/UsersModel.php
@@ -0,0 +1,221 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class UsersModel extends Model_Map
+{
+
+ public static $usersList = array();
+
+ public function __construct()
+ {
+ $this->_tables='regusers,reggroups,regusers_groups';
+ $this->_idFields='id_user,id_group';
+
+ $this->_where=array(
+ 'id_group' => 'reggroups',
+ 'id_user' => 'regusers',
+ 'name' => 'reggroups',
+ 'confirmation_token'=> 'regusers',
+ 'has_confirmed' => 'regusers',
+ 'deleted' => 'regusers',
+ 'forgot_token' => 'regusers'
+ );
+
+ $this->_popupItemNames = array(
+ 'has_confirmed'=>'has_confirmed',
+ 'deleted'=>'deleted',
+ 'id_group'=>'name',
+ );
+
+ $this->_popupLabels = array(
+ 'has_confirmed'=>'HAS CONFIRMED?',
+ 'deleted'=>'DELETED?',
+ 'id_group'=>'GROUP'
+ );
+
+ $this->orderBy = 'regusers.id_user desc';
+
+ parent::__construct();
+
+ $this->deleteNotRegistered();
+ }
+
+ public function deleteNotRegistered()
+ {
+ $limit = time() - Account::$confirmTime;
+ $this->db->del('regusers','has_confirmed = 1 and deleted = "no" and creation_time < '.$limit);
+ }
+
+ public function getUser($id_user = 0)
+ {
+ $clean['id_user'] = (int)$id_user;
+ if (array_key_exists($clean['id_user'],self::$usersList))
+ {
+ return self::$usersList[$clean['id_user']];
+ }
+ else
+ {
+ $user = $this->db->select('regusers','username,has_confirmed','id_user='.$clean['id_user']);
+ if (count($user) > 0)
+ {
+ $fuser = (strcmp($user[0]['regusers']['has_confirmed'],0) === 0) ? $user[0]['regusers']['username'] : "__".$user[0]['regusers']['username'];
+ self::$usersList[$clean['id_user']] = $fuser;
+ return $fuser;
+ }
+ else
+ {
+ return "__";
+ }
+ }
+ }
+
+ public function insert()
+ {
+ //create the token
+ $confirmation_token = md5(randString(20));
+ $this->values['confirmation_token'] = $confirmation_token;
+ //has_confirmed flag
+ $this->values['has_confirmed'] = 1;
+ $this->values['creation_time'] = time();
+
+ //random ID
+ $randomId = md5(randString(5).uniqid(mt_rand(),true));
+ $this->values["temp_field"] = $randomId;
+
+ if (isset($_POST['captcha']))
+ {
+ if ( strcmp($_SESSION['captchaString'],$_POST['captcha']) === 0 )
+ {
+
+ parent::insert();
+
+ if ($this->queryResult)
+ {
+ $resId = $this->db->select("regusers","id_user","temp_field='$randomId'");
+ $clean['id_user'] = $resId[0]['regusers']['id_user'];
+ $this->db->update("regusers",'temp_field',array(''),'id_user='.$clean['id_user']);
+
+ $result = Account::confirm($this->values['username'],$this->values['e_mail'],$clean['id_user'],$confirmation_token);
+
+ if ($result)
+ {
+ $_SESSION['status'] = 'sent';
+ }
+ else
+ {
+ $_SESSION['status'] = 'regerror';
+ }
+
+ $hed = new HeaderObj(DOMAIN_NAME);
+ $hed->redirect('users/notice/'.Lang::$current);
+ }
+
+ }
+ else
+ {
+ $this->result = false;
+ $this->queryResult = false;
+ $this->notice = "<div class='alert'>Wrong captcha code...</div>\n";
+ }
+ }
+ }
+
+ public function close($id_user)
+ {
+ $clean['id_user'] = (int)$id_user;
+
+ $this->values = array(
+ 'has_confirmed' => 1,
+ 'deleted' => 'yes',
+ 'e_mail' => ''
+ );
+
+ if ($this->update($clean['id_user']))
+ {
+ $_SESSION['status'] = 'deleted';
+
+ $profile = new ProfileModel();
+ $res = $profile->db->select('profile','id_prof','created_by='.$clean['id_user']);
+
+ if (count($res) > 0)
+ {
+ $clean['id_prof'] = (int)$res[0]['profile']['id_prof'];
+ $profile->values = array(
+ 'real_name' => '',
+ 'where_you_are' => '',
+ 'birth_date' => '',
+ 'fav_distro' => '',
+ 'projects' => '',
+ 'description' => ''
+ );
+ $profile->update($clean['id_prof']);
+ }
+ }
+
+ }
+
+ public function forgot($username)
+ {
+ $clean['username'] = ctype_alnum($username) ? sanitizeAll($username) : '';
+
+ if (isset($_POST['captcha']))
+ {
+ if ( strcmp($_SESSION['captchaString'],$_POST['captcha']) === 0 )
+ {
+ $res = $this->db->select('regusers','e_mail,id_user','username="'.$clean['username'].'" and has_confirmed = 0 and deleted = "no"');
+ if (count($res) > 0)
+ {
+ $e_mail = $res[0]['regusers']['e_mail'];
+ $id_user = (int)$res[0]['regusers']['id_user'];
+ $forgot_token = md5(randString(20));
+ $forgot_time = time();
+ $updateArray = array($forgot_token, $forgot_time);
+ $this->db->update('regusers','forgot_token,forgot_time',$updateArray,'username="'.$clean['username'].'"');
+
+ $result = Account::sendnew($clean['username'],$e_mail,$id_user,$forgot_token);
+
+ if ($result)
+ {
+ $_SESSION['status'] = 'sent_new';
+ }
+ else
+ {
+ $_SESSION['status'] = 'sent_new_error';
+ }
+
+ $hed = new HeaderObj(DOMAIN_NAME);
+ $hed->redirect('users/notice/'.Lang::$current,1);
+
+ }
+ else
+ {
+ $this->notice = "<div class='alert'>the user does not exist</div>\n";
+ }
+ }
+ else
+ {
+ $this->result = false;
+ $this->queryResult = false;
+ $this->notice = "<div class='alert'>Wrong captcha code...</div>\n";
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/VideocardsModel.php b/h-source/Application/Models/VideocardsModel.php
new file mode 100644
index 0000000..fb90a31
--- /dev/null
+++ b/h-source/Application/Models/VideocardsModel.php
@@ -0,0 +1,64 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class VideocardsModel extends BaseModel
+{
+
+ public $type = 'videocard'; //device type
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'comm_year' => 'comm_year',
+ 'interface' => 'interface',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => gtext("vendor"),
+ 'comm_year' => gtext("year"),
+ 'interface' => gtext("interface"),
+ );
+
+ $this->_popupWhere = array(
+ 'vendor' => 'type="videocard" and deleted="no"',
+ 'comm_year' => 'type="videocard" and deleted="no"',
+ 'interface' => 'type="videocard" and deleted="no"',
+ );
+
+ $this->diffFields = array(
+ 'vendor' => gtext("vendor"),
+ 'model' => gtext('model name'),
+ 'pci_id' => gtext("VendorID:ProductID code of the device"),
+ 'comm_year' => gtext('year of commercialization'),
+ 'interface' => gtext("interface"),
+ 'distribution' => gtext('GNU/Linux distribution used for the test'),
+ 'kernel' => gtext('tested with the following kernel libre'),
+ 'video_card_works' => gtext("how does it work with free software?"),
+ 'description' => gtext('Description'),
+ );
+
+ $this->fieldsWithBreaks = array(gtext('Description'));
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Models/WifiModel.php b/h-source/Application/Models/WifiModel.php
new file mode 100644
index 0000000..1322cdd
--- /dev/null
+++ b/h-source/Application/Models/WifiModel.php
@@ -0,0 +1,67 @@
+<?php
+
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class WifiModel extends BaseModel
+{
+
+ public $type = 'wifi'; //device type
+
+ public function __construct()
+ {
+
+ $this->_popupItemNames = array(
+ 'vendor' => 'vendor',
+ 'comm_year' => 'comm_year',
+ 'wifi_works' => 'wifi_works',
+ 'interface' => 'interface',
+ );
+
+ $this->_popupLabels = array(
+ 'vendor' => gtext("vendor"),
+ 'comm_year' => gtext("year"),
+ 'wifi_works' => gtext("does it work?"),
+ 'interface' => gtext("interface"),
+ );
+
+ $this->_popupWhere = array(
+ 'vendor' => 'type="wifi" and deleted="no"',
+ 'comm_year' => 'type="wifi" and deleted="no"',
+ 'wifi_works' => 'type="wifi" and deleted="no"',
+ 'interface' => 'type="wifi" and deleted="no"',
+ );
+
+ $this->diffFields = array(
+ 'vendor' => gtext("vendor"),
+ 'model' => gtext('model name'),
+ 'pci_id' => gtext("VendorID:ProductID code of the device"),
+ 'comm_year' => gtext('year of commercialization'),
+ 'interface' => gtext("interface"),
+ '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?"),
+ 'description' => gtext('Description'),
+ );
+
+ $this->fieldsWithBreaks = array(gtext('Description'));
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Modules/ModBase.php b/h-source/Application/Modules/ModBase.php
new file mode 100644
index 0000000..44d25a2
--- /dev/null
+++ b/h-source/Application/Modules/ModBase.php
@@ -0,0 +1,41 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+//module to print an HTML link
+//extends the ModAbstract class inside the Library folder
+class ModBase extends ModAbstract {
+
+ public function render()
+ {
+ return null;
+ }
+
+ public function getHtmlClass()
+ {
+ if (isset($this->simpleXmlObj->classname))
+ {
+ return " class='".$this->simpleXmlObj->classname[0]."' ";
+ }
+ return null;
+ }
+
+ //wrap the html with a <div>
+ //look for the <div> tag in the xml in order to set the class of the div
+ public function wrapDiv($string)
+ {
+ $divOpen = "<div class='box_module'>";
+ $divClose = "</div>";
+
+ if (isset($this->simpleXmlObj->div))
+ {
+ $divOpen = "<div class='".$this->simpleXmlObj->div."'>";
+ }
+
+ return $divOpen . $string . $divClose;
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Modules/ModImage.php b/h-source/Application/Modules/ModImage.php
new file mode 100644
index 0000000..5a116b1
--- /dev/null
+++ b/h-source/Application/Modules/ModImage.php
@@ -0,0 +1,45 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+//module to print an HTML image
+//extends the ModBase class
+class ModImage extends ModBase {
+
+ public function widthPropertyString()
+ {
+ if (isset($this->simpleXmlObj->width))
+ {
+ return " width = '" . $this->simpleXmlObj->width ."' ";
+ }
+ return null;
+ }
+
+ public function heightPropertyString()
+ {
+ if (isset($this->simpleXmlObj->height))
+ {
+ return " height = '" . $this->simpleXmlObj->height ."' ";
+ }
+ return null;
+ }
+
+ public function titlePropertyString()
+ {
+ if (isset($this->simpleXmlObj->title))
+ {
+ return " title = '" . $this->simpleXmlObj->title ."' ";
+ }
+ return null;
+ }
+
+ public function render()
+ {
+ $link = "<img ".$this->getHtmlClass().$this->widthPropertyString().$this->heightPropertyString().$this->titlePropertyString()." src='".$this->simpleXmlObj->src[0]."'>";
+ return $this->wrapDiv($link)."\n";
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Modules/ModLink.php b/h-source/Application/Modules/ModLink.php
new file mode 100644
index 0000000..011bc78
--- /dev/null
+++ b/h-source/Application/Modules/ModLink.php
@@ -0,0 +1,18 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+//module to print an HTML link
+//extends the ModBase class
+class ModLink extends ModBase {
+
+ public function render()
+ {
+ $link = "<a ".$this->getHtmlClass()." href='".$this->simpleXmlObj->href[0]."'>".$this->simpleXmlObj->text[0]."</a>";
+ return $this->wrapDiv($link)."\n";
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Modules/ModLinkimage.php b/h-source/Application/Modules/ModLinkimage.php
new file mode 100644
index 0000000..8e49bbf
--- /dev/null
+++ b/h-source/Application/Modules/ModLinkimage.php
@@ -0,0 +1,18 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+//module to print an HTML image linking to something
+//extends the ModBase class
+class ModLinkimage extends ModImage {
+
+ public function render()
+ {
+ $link = "<a ".$this->getHtmlClass()." href='".$this->simpleXmlObj->href[0]."'><img ".$this->widthPropertyString().$this->heightPropertyString().$this->titlePropertyString()." src='".$this->simpleXmlObj->src[0]."'></a>";
+ return $this->wrapDiv($link)."\n";
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Modules/ModRaw.php b/h-source/Application/Modules/ModRaw.php
new file mode 100644
index 0000000..4ed3226
--- /dev/null
+++ b/h-source/Application/Modules/ModRaw.php
@@ -0,0 +1,18 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+//module to print some raw HTML
+//extends the ModBase class
+class ModRaw extends ModBase {
+
+ public function render()
+ {
+ $link = $this->simpleXmlObj->text[0];
+ return $this->wrapDiv($link)."\n";
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Modules/index.html b/h-source/Application/Modules/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/h-source/Application/Modules/index.html
@@ -0,0 +1 @@
+
diff --git a/h-source/Application/Strings/Lang/It/DbCondStrings.php b/h-source/Application/Strings/Lang/It/DbCondStrings.php
new file mode 100644
index 0000000..4c985cd
--- /dev/null
+++ b/h-source/Application/Strings/Lang/It/DbCondStrings.php
@@ -0,0 +1,17 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+//error strings in the case database conditions are not satisfied
+class Lang_It_DbCondStrings extends Lang_Eng_DbCondStrings {
+
+ //get the error string in the case that the value of the field $field is already present in the table $table
+ public function getNotUniqueString($field)
+ {
+ return "<div class='alert'>Il valore del campo <i>". $field ."</i> &egrave gi&agrave presente. Per favore scegline un altro.</div>\n";
+ }
+
+}
diff --git a/h-source/Application/Strings/Lang/It/ModelStrings.php b/h-source/Application/Strings/Lang/It/ModelStrings.php
new file mode 100644
index 0000000..e02013b
--- /dev/null
+++ b/h-source/Application/Strings/Lang/It/ModelStrings.php
@@ -0,0 +1,19 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class Lang_It_ModelStrings extends Lang_ResultStrings {
+
+ public $string = array(
+ "error" => "<div class='alert'>Errore nella query: contatta l'amministratore!</div>\n",
+ "executed" => "<div class='executed'>operazione eseguita!</div>\n",
+ "associate" => "<div class='alert'>Problema di integrit&agrave referenziale: il record &egrave associato ad un record di una tabella figlia. Devi prima rompere l'associazione.</div>\n",
+ "no-id" => "<div class='alert'>Non &egrave definito alcun id della query</div>\n",
+ "not-linked" => "<div class='alert'>Il record non &egrave associato, non puoi dissociarlo</div>",
+ "linked" => "<div class='alert'>Il record &egrave gi&agrave associato, non puoi associarlo un'altra volta</div>"
+ );
+
+}
diff --git a/h-source/Application/Strings/Lang/It/UploadStrings.php b/h-source/Application/Strings/Lang/It/UploadStrings.php
new file mode 100644
index 0000000..57bcda6
--- /dev/null
+++ b/h-source/Application/Strings/Lang/It/UploadStrings.php
@@ -0,0 +1,26 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class Lang_It_UploadStrings extends Lang_ResultStrings {
+
+ public $string = array(
+ "error" => "<div class='alert'>Errore: verificare i permessi del file/directory</div>\n",
+ "executed" => "<div class='executed'>Operazione eseguita!</div>\n",
+ "not-child" => "<div class='alert'>La cartella selezionata non &egrave una sotto directory della directory base</div>\n",
+ "not-dir" => "<div class='alert'>La cartella selezionata non &egrave una directory</div>\n",
+ "not-empty" => "<div class='alert'>La cartella selezionata non &egrave vuota</div>\n",
+ "no-folder-specified" => "<div class='alert'>Non &egrave stata specificata alcuna cartella</div>\n",
+ "not-writable" => "<div class='alert'>La cartella non &egrave scrivibile</div>\n",
+ "not-writable-file" => "<div class='alert'>Il file non &egrave scrivibile</div>\n",
+ "dir-exists" => "<div class='alert'>Esiste gi&agrave una directory con lo stesso nome</div>\n",
+ "no-upload-file" => "<div class='alert'>Non c'&egrave alcun file di cui fare l'upload</div>\n",
+ "size-over" => "<div class='alert'>La dimensione del file &egrave troppo grande</div>\n",
+ "not-allowed-ext" => "<div class='alert'>L'estensione del file che vuoi caricare non &egrave consentita</div>\n",
+ "file-exists" => "<div class='alert'>Esiste gi&agrave un file con lo stesso nome</div>\n",
+ );
+
+}
diff --git a/h-source/Application/Strings/Lang/It/ValCondStrings.php b/h-source/Application/Strings/Lang/It/ValCondStrings.php
new file mode 100644
index 0000000..a54c650
--- /dev/null
+++ b/h-source/Application/Strings/Lang/It/ValCondStrings.php
@@ -0,0 +1,69 @@
+<?php
+
+// All EasyGiant code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+// See COPYRIGHT.txt and LICENSE.txt.
+
+if (!defined('EG')) die('Direct access not allowed!');
+
+class Lang_It_ValCondStrings extends Lang_Eng_ValCondStrings {
+
+ //if the element is not defined
+ public function getNotDefinedResultString($element)
+ {
+ return "<div class='alert'>". $element ." non &egrave stato definito</div>\n";
+ }
+
+ //if the elements are not equal
+ public function getNotEqualResultString($element)
+ {
+ return "<div class='alert'>Differenti valori: $element</div>\n";
+ }
+
+ //if the element is not alphabetic
+ public function getNotAlphabeticResultString($element)
+ {
+ return "<div class='alert'>".$element." deve essere una stringa di soli caratteri alfabetici</div>\n";
+ }
+
+ //if the element is not alphanumeric
+ public function getNotAlphanumericResultString($element)
+ {
+ return "<div class='alert'>".$element." deve essere una stringa di soli caratteri alfanumerici</div>\n";
+ }
+
+ //if the element is not a decimal digit
+ public function getNotDecimalDigitResultString($element)
+ {
+ return "<div class='alert'>".$element." deve essere una stringa di soli numeri decimali</div>\n";
+ }
+
+ //if the element has the mail format
+ public function getNotMailFormatResultString($element)
+ {
+ return "<div class='alert'>".$element." non sembra un indirizzo e-mail</div>\n";
+ }
+
+ //if the element is numeric
+ public function getNotNumericResultString($element)
+ {
+ return "<div class='alert'>".$element." deve essere un numero</div>\n";
+ }
+
+ //if the element (string) length exceeds the value of characters (defined by $maxLength)
+ public function getLengthExceedsResultString($element,$maxLength)
+ {
+ return "<div class='alert'>".$element." non deve essere composto da pi&ugrave di $maxLength caratteri</div>\n";
+ }
+
+ //if the element is one of the strings indicated by $stringList (a comma-separated list of strings)
+ public function getIsForbiddenStringResultString($element,$stringList)
+ {
+ return "<div class='alert'>".$element." non pu&ograve assumere uno dei seguenti valori: $stringList</div>\n";
+ }
+
+ //if the element is not one of the strings indicated by $stringList (a comma-separated list of strings)
+ public function getIsNotStringResultString($element,$stringList)
+ {
+ return "<div class='alert'>".$element." deve assumere uno dei seguenti valori: $stringList</div>\n";
+ }
+}
diff --git a/h-source/Application/Strings/Lang/It/index.html b/h-source/Application/Strings/Lang/It/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/h-source/Application/Strings/Lang/It/index.html
@@ -0,0 +1 @@
+
diff --git a/h-source/Application/Strings/Lang/index.html b/h-source/Application/Strings/Lang/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/h-source/Application/Strings/Lang/index.html
@@ -0,0 +1 @@
+
diff --git a/h-source/Application/Strings/index.html b/h-source/Application/Strings/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/h-source/Application/Strings/index.html
@@ -0,0 +1 @@
+
diff --git a/h-source/Application/Views/Contact/index.php b/h-source/Application/Views/Contact/index.php
new file mode 100644
index 0000000..bac30f4
--- /dev/null
+++ b/h-source/Application/Views/Contact/index.php
@@ -0,0 +1,29 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; contact
+ </div>
+
+ <p>write in the file <b>Application/Views/Contact/index.php</b> your contact information</p>
+
+ </div>
diff --git a/h-source/Application/Views/Contact/index_es.php b/h-source/Application/Views/Contact/index_es.php
new file mode 100644
index 0000000..acaf264
--- /dev/null
+++ b/h-source/Application/Views/Contact/index_es.php
@@ -0,0 +1,29 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; contact
+ </div>
+
+
+
+ </div>
diff --git a/h-source/Application/Views/Contact/index_it.php b/h-source/Application/Views/Contact/index_it.php
new file mode 100644
index 0000000..acaf264
--- /dev/null
+++ b/h-source/Application/Views/Contact/index_it.php
@@ -0,0 +1,29 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; contact
+ </div>
+
+
+
+ </div>
diff --git a/h-source/Application/Views/Credits/index.php b/h-source/Application/Views/Credits/index.php
new file mode 100644
index 0000000..fe327f3
--- /dev/null
+++ b/h-source/Application/Views/Credits/index.php
@@ -0,0 +1,63 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; credits
+ </div>
+
+ <div class="credits_external_box">
+
+ <div class="credits_item_title">
+ Icons:
+ </div>
+
+ <div class="credits_item_description">
+ The icons used inside <?php echo Website::$generalName;?> are taken from the <a href="http://kde-look.org/content/show.php/ACUN+Simgeleri?content=83018">ACUN Simgeleri 0.7</a> icon theme and from the <a href="http://kde-look.org/content/show.php/H2O+Icon+Theme?content=127149">H2O Icon Theme 0.0.5</a>, both licensed under the GNU GPL license, from the <a href="http://www.everaldo.com/crystal/?action=downloads">Crystal Projects</a> icons, licensed under the LGPL, from the <a href="http://www.notmart.org/index.php/Graphics">glaze icons set</a> (LGPL) and from the <a href="http://kde-look.org/content/show.php/Dark-Glass+reviewed?content=67902">DarkGlass_Reworked icons theme</a> (GPL). The flag icons are taken from the <a href="http://www.famfamfam.com/lab/icons/flags/">FAMFAMFAM flag icons set</a> (Public Domain).
+ </div>
+
+ <div class="credits_item_title">
+ jQuery:
+ </div>
+
+ <div class="credits_item_description">
+ The <a href="http://jquery.com/">jQuery</a> and the <a href="http://jqueryui.com/home">jQuery UI</a> javascript libraries (licensed under MIT/GPL) have been used through the website
+ </div>
+
+ <div class="credits_item_title">
+ markitup:
+ </div>
+
+ <div class="credits_item_description">
+ The <a href="http://markitup.jaysalvat.com/home/">markitup</a> jQuery plugin (licensed under MIT/GPL) has been used in order to help the user to insert wiki tags
+ </div>
+
+ <div class="credits_item_title">
+ php diff algorithm:
+ </div>
+
+ <div class="credits_item_description">
+ <a href="http://compsci.ca/v3/viewtopic.php?p=142539">This</a> algorithm (licensed under the zlib free license) has been used in order to highlight the differences between two different revisions of the same hadrware model.
+ </div>
+
+ </div>
+
+ </div>
diff --git a/h-source/Application/Views/Credits/index_es.php b/h-source/Application/Views/Credits/index_es.php
new file mode 100644
index 0000000..3efea33
--- /dev/null
+++ b/h-source/Application/Views/Credits/index_es.php
@@ -0,0 +1,63 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; credits
+ </div>
+
+ <div class="credits_external_box">
+
+ <div class="credits_item_title">
+ Iconos:
+ </div>
+
+ <div class="credits_item_description">
+ Los iconos usados dentro de <?php echo Website::$generalName;?> son tomados de el tema de iconos <a href="http://kde-look.org/content/show.php/ACUN+Simgeleri?content=83018">ACUN Simgeleri 0.7</a> y de <a href="http://kde-look.org/content/show.php/H2O+Icon+Theme?content=127149">H2O Icon Theme 0.0.5</a>, ambos licenciados bajo la licencia GNU GPL, de <a href="http://www.everaldo.com/crystal/?action=downloads">Crystal Projects</a>, licenciado bajo la LGPL, de <a href="http://www.notmart.org/index.php/Graphics">glaze icons set</a> (LGPL) y de <a href="http://kde-look.org/content/show.php/Dark-Glass+reviewed?content=67902">DarkGlass_Reworked icons theme</a> (GPL). Los iconos de las banderas son tomados la colección de iconos de banderas <a href="http://www.famfamfam.com/lab/icons/flags/">FAMFAMFAM</a> (Dominio Público)
+ </div>
+
+ <div class="credits_item_title">
+ jQuery:
+ </div>
+
+ <div class="credits_item_description">
+ Las bibliotecas javascript <a href="http://jquery.com/">jQuery</a> y <a href="http://jqueryui.com/home">jQuery UI</a> (licenciadas bajo MIT/GPL) han sido usadas en el sitio
+ </div>
+
+ <div class="credits_item_title">
+ markitup:
+ </div>
+
+ <div class="credits_item_description">
+ El complemento <a href="http://markitup.jaysalvat.com/home/">markitup</a> jQuery (licenciado bajo MIT/GPL) ha sido usado en orden de ayudar al usuario a insertar etiquetas wiki
+ </div>
+
+ <div class="credits_item_title">
+ php diff algorithm:
+ </div>
+
+ <div class="credits_item_description">
+ <a href="http://compsci.ca/v3/viewtopic.php?p=142539">Este</a> algoritmo (licenciado bajo la licencia libre de zlib) ha sido usado en orden de remarcar las diferencias entre dos diferentes revisiones del mismo modelo de hardware.
+ </div>
+
+ </div>
+
+ </div>
diff --git a/h-source/Application/Views/Credits/index_it.php b/h-source/Application/Views/Credits/index_it.php
new file mode 100644
index 0000000..0d32ebd
--- /dev/null
+++ b/h-source/Application/Views/Credits/index_it.php
@@ -0,0 +1,64 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; credits
+ </div>
+
+ <div class="credits_external_box">
+
+ <div class="credits_item_title">
+ Icone:
+ </div>
+
+ <div class="credits_item_description">
+ Le icone utilizzate nel sito h-node.com appartengono ai temi di icone <a href="http://kde-look.org/content/show.php/ACUN+Simgeleri?content=83018">ACUN Simgeleri 0.7</a> e <a href="http://kde-look.org/content/show.php/H2O+Icon+Theme?content=127149">H2O Icon Theme 0.0.5</a>, entrambi sotto licenza GNU GPL, e al tema <a href="http://www.everaldo.com/crystal/?action=downloads">Crystal Projects</a>, sotto licenza LGPL, al <a href="http://www.notmart.org/index.php/Graphics">set di icone glaze</a> (LGPL) e al tema <a href="http://kde-look.org/content/show.php/Dark-Glass+reviewed?content=67902">DarkGlass_Reworked</a> (GPL). Le icone bandiere derivano dal set di icone <a href="http://www.famfamfam.com/lab/icons/flags/">FAMFAMFAM</a> (Public Domain).
+ </div>
+
+
+ <div class="credits_item_title">
+ jQuery:
+ </div>
+
+ <div class="credits_item_description">
+ Le librerie javascript <a href="http://jquery.com/">jQuery</a> e <a href="http://jqueryui.com/home">jQuery UI</a> (sotto licenza MIT/GPL) sono state usate nel sito
+ </div>
+
+ <div class="credits_item_title">
+ markitup:
+ </div>
+
+ <div class="credits_item_description">
+ Il plugin jQuery <a href="http://markitup.jaysalvat.com/home/">markitup</a> (sotto licenza MIT/GPL) è stata usata per aiutare gli utenti a inserire i tag della wiki </div>
+
+ <div class="credits_item_title">
+ Algoritmo php diff:
+ </div>
+
+ <div class="credits_item_description">
+ <a href="http://compsci.ca/v3/viewtopic.php?p=142539">Questo</a> algoritmo (sotto licenza libera zlib) è stata usata per sottolineare la differenza tra due diverse revisioni dello stesso modello di hardware.
+ </div>
+
+
+ </div>
+
+ </div>
diff --git a/h-source/Application/Views/Download/index.php b/h-source/Application/Views/Download/index.php
new file mode 100644
index 0000000..e296711
--- /dev/null
+++ b/h-source/Application/Views/Download/index.php
@@ -0,0 +1,68 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; download
+ </div>
+
+ <div class="credits_external_box">
+
+ <div class="credits_item_title">
+ Download the h-node hardware database in xml format:
+ </div>
+
+ <div class="credits_item_description">
+ You can download all the h-node database in one unique xml file in order to parse its contents by means of some proper script (for example a Python or Perl or PHP script)
+
+ <div class="download_table">
+ <table width="95%">
+ <tr>
+ <td>Download the xml file of all the database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/all/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Download the xml file of all the <b>notebooks</b> in the database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/notebooks/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Download the xml file of all the <b>wifi cards</b> in the database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/wifi/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Download the xml file of all the <b>video cards</b> in the database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/videocards/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Download the xml file of all the <b>printers</b> in the database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/printers/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Download the xml file of all the <b>scanners</b> in the database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/scanners/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
diff --git a/h-source/Application/Views/Download/index_es.php b/h-source/Application/Views/Download/index_es.php
new file mode 100644
index 0000000..b181b23
--- /dev/null
+++ b/h-source/Application/Views/Download/index_es.php
@@ -0,0 +1,68 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; download
+ </div>
+
+ <div class="credits_external_box">
+
+ <div class="credits_item_title">
+ Descargue la base de datos de h-node.com en formato xml:
+ </div>
+
+ <div class="credits_item_description">
+ Puede descargar toda la base de datos de h-node en un único archivo xml en orden de procesar sus contenidos por medio de un algoritmo (por ejemplo un algoritmo en Python o Perl o PHP)
+
+ <div class="download_table">
+ <table width="95%">
+ <tr>
+ <td>Descargue el archivo xml de toda la base de datos</td>
+ <td><a href="<?php echo $this->baseUrl."/download/all/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Descargue el archivo xml de todas las <b>laptops</b> en la base de datos</td>
+ <td><a href="<?php echo $this->baseUrl."/download/notebooks/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Descargue el archivo xml de todas las <b>tarjetas inalámbricas</b> en la base de datos</td>
+ <td><a href="<?php echo $this->baseUrl."/download/wifi/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Descargue el archivo xml de todas las <b>tarjetas de video</b> en la base de datos</td>
+ <td><a href="<?php echo $this->baseUrl."/download/videocards/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Descargue el archivo xml de todas las <b>impresoras</b> en la base de datos</td>
+ <td><a href="<?php echo $this->baseUrl."/download/printers/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Download the xml file of all the <b>scanners</b> in the database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/scanners/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
diff --git a/h-source/Application/Views/Download/index_it.php b/h-source/Application/Views/Download/index_it.php
new file mode 100644
index 0000000..16fb40a
--- /dev/null
+++ b/h-source/Application/Views/Download/index_it.php
@@ -0,0 +1,68 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; download
+ </div>
+
+ <div class="credits_external_box">
+
+ <div class="credits_item_title">
+ Scarica il database dell'hardware di h-node in formato xml:
+ </div>
+
+ <div class="credits_item_description">
+ Puoi scaricare l'intero database di h-node in un unico file xml per analizzarne i contenuti utilizzando uno script appropriato (ad esempio uno script Python o Perl o PHP)
+
+ <div class="download_table">
+ <table width="95%">
+ <tr>
+ <td>Scarica il file xml dell'intero database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/all/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Scarica il file xml di tutti i <b>notebooks</b> del database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/notebooks/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Scarica il file xml di tutte le <b>schede wifi</b> del database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/wifi/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Scarica il file xml di tutte le <b>schede video</b> del database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/videocards/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Scarica il file xml di tutte le <b>stampanti</b> del database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/printers/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ <tr>
+ <td>Scarica il file xml di tutti gli <b>scanner</b> del database</td>
+ <td><a href="<?php echo $this->baseUrl."/download/scanners/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
diff --git a/h-source/Application/Views/Download/xml.php b/h-source/Application/Views/Download/xml.php
new file mode 100644
index 0000000..b473875
--- /dev/null
+++ b/h-source/Application/Views/Download/xml.php
@@ -0,0 +1,20 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+<?php echo $xml; ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?> \ No newline at end of file
diff --git a/h-source/Application/Views/Hardware/left.php b/h-source/Application/Views/Hardware/left.php
new file mode 100644
index 0000000..974340d
--- /dev/null
+++ b/h-source/Application/Views/Hardware/left.php
@@ -0,0 +1,47 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; Hardware
+ </div>
+
+ <div class="hardware_element">
+ <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/computer-laptop.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/notebooks/catalogue/<?php echo $lang;?>">Notebooks</a>
+ </div>
+
+ <div class="hardware_element">
+ <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/network-wireless.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/wifi/catalogue/<?php echo $lang;?>">Wifi cards</a>
+ </div>
+
+ <div class="hardware_element">
+ <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/1282042718_hardware.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/videocards/catalogue/<?php echo $lang;?>">Video cards</a>
+ </div>
+
+ <div class="hardware_element">
+ <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/printer.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/printers/catalogue/<?php echo $lang;?>">Printers</a>
+ </div>
+
+ <div class="hardware_element">
+ <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/scanner.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/scanners/catalogue/<?php echo $lang;?>">Scanners</a>
+ </div>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Help/index.php b/h-source/Application/Views/Help/index.php
new file mode 100644
index 0000000..8412f1d
--- /dev/null
+++ b/h-source/Application/Views/Help/index.php
@@ -0,0 +1,361 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+<div class="help_external_box">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; help
+ </div>
+
+ <div class="help_tables_of_contents">
+ Table of contents
+ <ul>
+ <li><a href="<?php echo $this->currPage."/$lang#wiki-syntax";?>">Wiki syntax</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#compatibility";?>">Compatibility classes</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#discover-hardware";?>">Discover your hardware</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#fully-free";?>">List of fully free Gnu/Linux distributions</a></li>
+ </ul>
+ </div>
+
+ <a name="wiki-syntax"><h1>Wiki syntax</h1></a>
+
+ <h3>List of <?php echo Website::$generalName;?> wiki tags</h3>
+
+ <table class="help_wiki_table" width="100%">
+ <thead>
+ <tr>
+ <th>name</th>
+ <th>tag</th>
+ <th>result</th>
+ <th width="40%">description</th>
+ </tr>
+ </thead>
+ <tr>
+ <td>bold</td>
+ <td>[b]text[/b]</td>
+ <td><b>text</b></td>
+ <td>text bold</td>
+ </tr>
+ <tr>
+ <td>italic</td>
+ <td>[i]text[/i]</td>
+ <td><i>text</i></td>
+ <td>text italic</td>
+ </tr>
+ <tr>
+ <td>del</td>
+ <td>[del]text[/del]</td>
+ <td><del>text</del></td>
+ <td>text deleted</td>
+ </tr>
+ <tr>
+ <td>underline</td>
+ <td>[u]text[/u]</td>
+ <td><u>text</u></td>
+ <td>text underlined</td>
+ </tr>
+ <tr>
+ <td>head 1</td>
+ <td>[h1]text[/h1]</td>
+ <td><div class="div_h1">text</div></td>
+ <td>head 1</td>
+ </tr>
+ <tr>
+ <td>head 2</td>
+ <td>[h2]text[/h2]</td>
+ <td><div class="div_h2">text</div></td>
+ <td>head 2</td>
+ </tr>
+ <tr>
+ <td>head 3</td>
+ <td>[h3]text[/h3]</td>
+ <td><div class="div_h3">text</div></td>
+ <td>head 3</td>
+ </tr>
+ <tr>
+ <td>paragraph</td>
+ <td>[p]text[/p]</td>
+ <td><p>text</p></td>
+ <td>new paragraph</td>
+ </tr>
+ <tr>
+ <td>list</td>
+ <td>[list]list[/list]</td>
+ <td>&lt;ul&gt;list&lt;/ul&gt;</td>
+ <td>make a list of items</td>
+ </tr>
+ <tr>
+ <td>numbered list</td>
+ <td>[enum]list[/enum]</td>
+ <td>&lt;ol&gt;list&lt;/ol&gt;</td>
+ <td>make a numbered list of items</td>
+ </tr>
+ <tr>
+ <td>list item</td>
+ <td>[*]item[/*]</td>
+ <td>&lt;li&gt;item&lt;/li&gt;</td>
+ <td>ad an item to a list</td>
+ </tr>
+ <tr>
+ <td>code</td>
+ <td>[code]some code[/code]</td>
+ <td><pre class="code_pre">some code</div></td>
+ <td>ad some code</td>
+ </tr>
+ <tr>
+ <td>simple link</td>
+ <td>[a]url[/a]</td>
+ <td>&lt;a href="url"&gt;url&lt;/a&gt;</td>
+ <td>simple link</td>
+ </tr>
+ <tr>
+ <td>link with text</td>
+ <td>[a]url|text[/a]</td>
+ <td>&lt;a href="url"&gt;text&lt;/a&gt;</td>
+ <td>link with text</td>
+ </tr>
+ <tr>
+ <td>notebook</td>
+ <td>[notebook]id[/notebook]</td>
+ <td>&nbsp</td>
+ <td>link to the notebook with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td>
+ </tr>
+ <tr>
+ <td>wifi</td>
+ <td>[wifi]id[/wifi]</td>
+ <td>&nbsp</td>
+ <td>link to the wifi with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td>
+ </tr>
+ <tr>
+ <td>videocard</td>
+ <td>[videocard]id[/videocard]</td>
+ <td>&nbsp</td>
+ <td>link to the videocard with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td>
+ </tr>
+ </table>
+
+ <a name="compatibility"><h1>Compatibility classes</h1></a>
+
+ <a name="notebook-compatibility"><h2>Notebooks</h2></a>
+
+ <h3>Class A (Platinum)</h3>
+
+ <p>All the notebook devices work with a very good performance. Example: all the devices work, the 3D acceleration is supported</p>
+
+ <h3>Class B (Gold)</h3>
+
+ <p>All the notebook devices work but not at full performance. A typical example: all the devices work, but the 3D acceleration is not supported</p>
+
+ <h3>Class C (Silver)</h3>
+
+ <p>One main device is not supported. Example: the internal wifi card does not work. You need an external USB card</p>
+
+ <h3>Class D (Bronze)</h3>
+
+ <p>More than one device is not supported</p>
+
+ <h3>Class E (Garbage)</h3>
+
+ <p>The notebook does not work with free software</p>
+
+
+ <a name="printer-compatibility"><h2>Printers</h2></a>
+
+ <h3>Class A (Full)</h3>
+
+ <p>All device functions and features are supported</p>
+
+ <h3>Class B (Partial)</h3>
+
+ <p>Printing supported but possibly at limited speed or print quality; scanning and/or faxing on some multifunction devices may not be supported</p>
+
+ <h3>Class C (None)</h3>
+
+ <p>The printer does not work with free software</p>
+
+
+ <a name="scanner-compatibility"><h2>Scanners</h2></a>
+
+ <h3>Class A (Full)</h3>
+
+ <p>All device functions and features are supported</p>
+
+ <h3>Class B (Partial)</h3>
+
+ <p>Scanning supported but possibly at limited speed or quality; some other features may not be supported</p>
+
+ <h3>Class C (None)</h3>
+
+ <p>The scanner does not work with free software</p>
+
+ <a name="discover-hardware"><h1>Discover your hardware</h1></a>
+ <div>
+ (Thanks <a href="<?php echo $this->baseUrl;?>/issues/view/en/3/1/token">lluvia</a>)
+ </div>
+
+ <p>In order to know the details of your hardware you can carry out the following actions:</p>
+
+ <h3>How to discover the model name of your notebook</h3>
+
+ <p>See below your notebook or netbook</p>
+
+ <!--<h3>How to discover the year of commercialization of your notebook</h3>
+
+ <p>Open a terminal and type the following command:</p>
+
+ <pre>
+ sudo dmidecode| grep "Release Date"
+ </pre>-->
+
+ <h3>How to discover the kernel libre version you are using</h3>
+
+ <p>Open a terminal and type the following command:</p>
+
+ <pre>
+ uname -r
+ </pre>
+
+ <h3>How to discover the name of your video card</h3>
+
+ <p>Open a terminal and type the following command:</p>
+
+ <pre>
+ sudo lspci
+ </pre>
+
+ <p>Then look for the row containing the string <b>VGA</b> or <b>Display controller</b>. You can also try one of the following commands:</p>
+
+ <pre>
+ lspci | grep "Display controller"
+ </pre>
+
+ <p>or</p>
+
+ <pre>
+ lspci | grep "VGA"
+ </pre>
+
+ <h3>How to discover the VendorID and the ProductID of your device (VendorID:ProductID code)</h3>
+
+ <div>
+ (Thanks <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5839">Michał Masłowski</a> and <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5837">Julius22</a>)
+ </div>
+
+ <h4>If the device is integrated (example: a video card)</h4>
+
+ <p>Open a terminal and type the following command:</p>
+
+ <pre>
+ sudo lspci -nnk
+ </pre>
+
+ <p>You should obtain a list of hardware similar to the one written below</p>
+
+ <pre>
+ 03:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [<b>14e4:4311</b>] (rev 02)
+ Kernel driver in use: b43-pci-bridge
+ Kernel modules: ssb
+ 05:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [<b>10de:0427</b>] (rev a1)
+ Kernel modules: nouveau, nvidiafb
+ </pre>
+
+ <p>The strings in <b>bold</b> and placed inside the square brackets (in the above list) are the code you are looking for. The first set of digits (before the colon) are the <b>VendorID</b>, the second set of digits are the <b>ProductID</b>. In the above example: the VendorID:ProductID code of the wifi card (note the strings "Network controller" and "WLAN") is <b>14e4:4311</b> while the VendorID:ProductID code of the video card (note the string "VGA") is <b>10de:0427</b></p>
+
+ <h4>If the device is an USB device (example: an external USB wifi card)</h4>
+
+ <p>Open a terminal and type the following command:</p>
+
+ <pre>
+ sudo lsusb
+ </pre>
+
+ <p>You should obtain a list of hardware similar to the one written below</p>
+
+ <pre>
+ Bus 001 Device 002: ID <b>0846:4260</b> NetGear, Inc. WG111v3 54 Mbps Wireless [realtek RTL8187B]
+ Bus 001 Device 001: ID <b>1d6b:0002</b> Linux Foundation 2.0 root hub
+ Bus 002 Device 003: ID <b>08ff:2580</b> AuthenTec, Inc. AES2501 Fingerprint Sensor
+ </pre>
+
+ <p>The strings in <b>bold</b> (in the above list) are the code you are looking for. The first set of digits (before the colon) are the <b>VendorID</b>, the second set of digits are the <b>ProductID</b>. In the above example: the VendorID:ProductID code of the external USB wifi card (note the strings "Wireless") is <b>0846:4260</b></p>
+
+
+ <h3>How to discover if the video card works</h3>
+
+ <p>Install <a href="http://rss-glx.sourceforge.net/">rss-glx</a> by means of the package manager of your distribution or compiling it from source and try some screensavers (for example <b>Skyrocket</b> or <b>Solarwinds</b>). Check if you can play the screensaver (and/or if you can play it smoothly)</p>
+
+ <h3>How to discover if the 3D acceleration works</h3>
+
+ <p>Try to enable compiz</p>
+
+ <h3>How to discover the name of your wifi card</h3>
+
+ <p>Open a terminal and type the following command:</p>
+
+ <pre>
+ sudo lspci
+ </pre>
+
+ <p>Then look for the row containing the string <b>Wireless</b> or <b>Network controller</b>. You can also try one of the following commands:</p>
+
+ <pre>
+ lspci | grep "Wireless"
+ </pre>
+
+ <p>or</p>
+
+ <pre>
+ lspci | grep "Network"
+ </pre>
+
+ <h3>How to discover the printer driver you are using</h3>
+
+ <h4>If you are using cups</h4>
+
+ <p>Open a terminal and type the following command:</p>
+
+ <pre>
+ dpkg-query -W -f '${Version}\n' cups
+ </pre>
+
+
+ <a name="fully-free"><h1>List of fully free GNU/Linux distributions</h1></a>
+
+ <p>They are listed in alphabetical order</p>
+
+ <ul>
+ <li><a href="http://www.blagblagblag.org/">BLAG</a></li>
+
+ <li><a href="http://dragora.usla.org.ar/wiki/doku.php">Dragora</a></li>
+
+ <li><a href="http://dynebolic.org/">Dynebolic</a></li>
+
+ <li><a href="http://www.gnewsense.org/">gNewSense</a></li>
+
+ <li><a href="http://www.musix.org.ar/">Musix GNU+Linux</a></li>
+
+ <li><a href="http://trisquel.info/en/">Trisquel</a></li>
+
+ <li><a href="http://www.ututo.org/www/">Ututo</a></li>
+
+ <li><a href="http://venenux.org/">Venenux</a></li>
+ </ul>
+
+</div>
diff --git a/h-source/Application/Views/Help/index_es.php b/h-source/Application/Views/Help/index_es.php
new file mode 100644
index 0000000..e218517
--- /dev/null
+++ b/h-source/Application/Views/Help/index_es.php
@@ -0,0 +1,361 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+<div class="help_external_box">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; help
+ </div>
+
+ <div class="help_tables_of_contents">
+ Tabla de contenidos
+ <ul>
+ <li><a href="<?php echo $this->currPage."/$lang#wiki-syntax";?>">Sintaxis del Wiki</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#compatibility";?>">Clases de Compatibilidad</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#discover-hardware";?>">Descubra su hardware</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#fully-free";?>">Lista de las distribuciones GNU/Linux completamente libres distributions</a></li>
+ </ul>
+ </div>
+
+ <a name="wiki-syntax"><h1>Sintaxis del Wiki</h1></a>
+
+ <h3>Lista de las etiquetas wiki de <?php echo Website::$generalName;?></h3>
+
+ <table class="help_wiki_table" width="100%">
+ <thead>
+ <tr>
+ <th>nombre</th>
+ <th>etiqueta</th>
+ <th>resultado</th>
+ <th width="40%">descripción</th>
+ </tr>
+ </thead>
+ <tr>
+ <td>bold</td>
+ <td>[b]texto[/b]</td>
+ <td><b>texto</b></td>
+ <td>texto en negrita</td>
+ </tr>
+ <tr>
+ <td>italic</td>
+ <td>[i]texto[/i]</td>
+ <td><i>texto</i></td>
+ <td>texto en cursiva</td>
+ </tr>
+ <tr>
+ <td>del</td>
+ <td>[del]texto[/del]</td>
+ <td><del>texto</del></td>
+ <td>texto eliminado</td>
+ </tr>
+ <tr>
+ <td>underline</td>
+ <td>[u]texto[/u]</td>
+ <td><u>texto</u></td>
+ <td>texto subrayado</td>
+ </tr>
+ <tr>
+ <td>head 1</td>
+ <td>[h1]texto[/h1]</td>
+ <td><div class="div_h1">texto</div></td>
+ <td>encabezado 1</td>
+ </tr>
+ <tr>
+ <td>head 2</td>
+ <td>[h2]texto[/h2]</td>
+ <td><div class="div_h2">texto</div></td>
+ <td>encabezado 2</td>
+ </tr>
+ <tr>
+ <td>head 3</td>
+ <td>[h3]texto[/h3]</td>
+ <td><div class="div_h3">texto</div></td>
+ <td>encabezado 3</td>
+ </tr>
+ <tr>
+ <td>paragraph</td>
+ <td>[p]texto[/p]</td>
+ <td><p>texto</p></td>
+ <td>nuevo párrafo</td>
+ </tr>
+ <tr>
+ <td>lista</td>
+ <td>[list]lista[/list]</td>
+ <td>&lt;ul&gt;lista&lt;/ul&gt;</td>
+ <td>hace una lista de objetos</td>
+ </tr>
+ <tr>
+ <td>numbered list</td>
+ <td>[enum]lista[/enum]</td>
+ <td>&lt;ol&gt;lista&lt;/ol&gt;</td>
+ <td>hace una lista numerada de objetos</td>
+ </tr>
+ <tr>
+ <td>list item</td>
+ <td>[*]objeto[/*]</td>
+ <td>&lt;li&gt;objeto&lt;/li&gt;</td>
+ <td>agrega un objeto a la lista</td>
+ </tr>
+ <tr>
+ <td>code</td>
+ <td>[code]código[/code]</td>
+ <td><pre class="code_pre">código</div></td>
+ <td>agrega código</td>
+ </tr>
+ <tr>
+ <td>simple link</td>
+ <td>[a]url[/a]</td>
+ <td>&lt;a href="url"&gt;url&lt;/a&gt;</td>
+ <td>enlace simple</td>
+ </tr>
+ <tr>
+ <td>link with text</td>
+ <td>[a]url|text[/a]</td>
+ <td>&lt;a href="url"&gt;text&lt;/a&gt;</td>
+ <td>enlace con texto</td>
+ </tr>
+ <tr>
+ <td>notebook</td>
+ <td>[notebook]id[/notebook]</td>
+ <td>&nbsp</td>
+ <td>enlace a la laptop con el identificador id (el identificador de cada modelo de dispositivo esta escrito en la página del dispositivo mismo, seguido del nombre del modelo)</td>
+ </tr>
+ <tr>
+ <td>wifi</td>
+ <td>[wifi]id[/wifi]</td>
+ <td>&nbsp</td>
+ <td>enlace al wifi con el identificador id (el identificador de cada modelo de dispositivo esta escrito en la página del dispositivo mismo, seguido del nombre del modelo)</td>
+ </tr>
+ <tr>
+ <td>videocard</td>
+ <td>[videocard]id[/videocard]</td>
+ <td>&nbsp</td>
+ <td>enlace a la tarjeta de video con el identificador id (el identificador de cada modelo de dispositivo esta escrito en la página del dispositivo mismo, seguido del nombre del modelo)</td>
+ </tr>
+ </table>
+
+ <a name="compatibility"><h1>Clases de Compatibilidad</h1></a>
+
+ <a name="notebook-compatibility"><h2>Laptops</h2></a>
+
+ <h3>Clase A (Platino)</h3>
+
+ <p>Todos los dispositivos funcionan con un buen desempeño. Ejemplo: todos los dispositivos funcionan, la aceleración 3D esta soportada</p>
+
+ <h3>Clase B (Oro)</h3>
+
+ <p>Todos los dispositivos funcionan pero no a su rendimiento completo. Un ejemplo típico es: todos los dispositivos funcionan, pero la aceleración 3D no esta soportada</p>
+
+ <h3>Clase C (Plata)</h3>
+
+ <p>Un dispositivo principal no esta soportado. Ejemplo: la tarjeta inalámbrica interna no funciona. Necesita una tarjeta USB externa</p>
+
+ <h3>Clase D (Bronce)</h3>
+
+ <p>Más de un dispositivo no esta soportado</p>
+
+ <h3>Clase E (Basura)</h3>
+
+ <p>El equipo no funciona con software libre</p>
+
+
+ <a name="printer-compatibility"><h2>Impresoras</h2></a>
+
+ <h3>Clase A (Completo)</h3>
+
+ <p>Todos los dispositivos funcionan y las características soportadas</p>
+
+ <h3>Clase B (Parcial)</h3>
+
+ <p>La impresión esta soportada pero a velocidad o calidad limitada; escaneo y/o envío por fax en algunos dispositivos multifuncionales pueden no estar soportados</p>
+
+ <h3>Clase C (Ninguno)</h3>
+
+ <p>La impresora no funciona con software libre</p>
+
+
+ <a name="scanner-compatibility"><h2>Scanners</h2></a>
+
+ <h3>Class A (Full)</h3>
+
+ <p>All device functions and features are supported</p>
+
+ <h3>Class B (Partial)</h3>
+
+ <p>Scanning supported but possibly at limited speed or quality; some other features may not be supported</p>
+
+ <h3>Class C (None)</h3>
+
+ <p>The scanner does not work with free software</p>
+
+ <a name="discover-hardware"><h1>Descubra su hardware</h1></a>
+ <div>
+ (Gracias <a href="<?php echo $this->baseUrl;?>/issues/view/en/3/1/token">lluvia</a>)
+ </div>
+
+ <p>En orden de conocer los detalles de su hardware puede seguir las siguientes acciones:</p>
+
+ <h3>Como descubrir el modelo de su laptop</h3>
+
+ <p>Vea debajo de su laptop o netbook</p>
+
+ <!--<h3>How to discover the year of commercialization of your notebook</h3>
+
+ <p>Open a terminal and type the following command:</p>
+
+ <pre>
+ sudo dmidecode| grep "Release Date"
+ </pre>-->
+
+ <h3>Como descubrir la versión de kernel que esta usando</h3>
+
+ <p>Abra una terminal y escriba la siguiente orden:</p>
+
+ <pre>
+ uname -r
+ </pre>
+
+ <h3>Como descubrir el nombre de su tarjeta de video</h3>
+
+ <p>Abra una terminal y escriba la siguiente orden:</p>
+
+ <pre>
+ sudo lspci
+ </pre>
+
+ <p>Después busque por la linea que contenga la cadena VGA o Display controller. También puede usar uno de las siguientes ordenes:</p>
+
+ <pre>
+ lspci | grep "Display controller"
+ </pre>
+
+ <p>o</p>
+
+ <pre>
+ lspci | grep "VGA"
+ </pre>
+
+ <h3>Como descubrir el ID del vendedor y el ID del producto de su dispositivo (código VendorID:ProductID)</h3>
+
+ <div>
+ (Gracias <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5839">Michał Masłowski</a> y <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5837">Julius22</a>)
+ </div>
+
+ <h4>Si el dispositivo es integrado (ejemplo: una tarjeta de video)</h4>
+
+ <p>Abra una terminal y escriba la siguiente orden:</p>
+
+ <pre>
+ sudo lspci -nnk
+ </pre>
+
+ <p>Debe de obtener una lista de hardware similar a la escriba debajo</p>
+
+ <pre>
+ 03:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [<b>14e4:4311</b>] (rev 02)
+ Kernel driver in use: b43-pci-bridge
+ Kernel modules: ssb
+ 05:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [<b>10de:0427</b>] (rev a1)
+ Kernel modules: nouveau, nvidiafb
+ </pre>
+
+ <p>Las cadenas en <b>negritas</b> y colocadas en los corchetes (en la lista superior) son los códigos que esta buscando. El primer grupo de dígitos (antes de los dos puntos) son el <b>VendorID</b>, el segundo grupo de dígitos son el <b>ProductID</b>. En el ejemplo superior: el código VendorID:ProductID de la tarjeta inalámbrica (note las cadenas "Network controller" y "WLAN") es <b>14e4:4311</b> mientras el código VendorID:ProductID de la tarjeta de video (note la cadena "VGA") es <b>10de:0427</b></p>
+
+ <h4>Si el dispositivo es un dispositivo USB (ejemplo: una tarjeta USB externa)</h4>
+
+ <p>Abra una terminal y escriba la siguiente orden:</p>
+
+ <pre>
+ sudo lsusb
+ </pre>
+
+ <p>Debe de obtener una lista de hardware similar a la descrita a continuación</p>
+
+ <pre>
+ Bus 001 Device 002: ID <b>0846:4260</b> NetGear, Inc. WG111v3 54 Mbps Wireless [realtek RTL8187B]
+ Bus 001 Device 001: ID <b>1d6b:0002</b> Linux Foundation 2.0 root hub
+ Bus 002 Device 003: ID <b>08ff:2580</b> AuthenTec, Inc. AES2501 Fingerprint Sensor
+ </pre>
+
+ <p>Las cadenas en <b>negritas</b> (en la lista superior) son el código que busca. El primer grupo de dígitos (antes de los dos puntos) son el <b>VendorID</b>, el segundo grupo de dígitos son el <b>ProductID</b>. En el ejemplo superior: el código VendorID:ProductID de la tarjeta inalámbrica USB externa (note la cadena "Wireless") es <b>0846:4260</b></p>
+
+
+ <h3>Como descubrir si la tarjeta de video funciona</h3>
+
+ <p>Instale <a href="http://rss-glx.sourceforge.net/">rss-glx</a> por lo medios del administrador de paquetes de su distribución o por medio de compilar el código fuente y pruebe algunos protectores de pantalla (por ejemplo <b>Skyrocket</b> o <b>Solarwinds</b>). Revise si puede ejecutar el protector de pantalla (y/o si puede mostrarlo suavemente)</p>
+
+ <h3>Como descubrir si la aceleración 3D funciona</h3>
+
+ <p>Intente activar compiz</p>
+
+ <h3>Como descubrir el nombre de su tarjeta de inalámbrica</h3>
+
+ <p>Abra una terminal y escriba la siguiente orden:</p>
+
+ <pre>
+ sudo lspci
+ </pre>
+
+ <p>Después busque por la linea que contenga la cadena <b>Wireless</b> o <b>Network controller</b>. También puede intentar una de las siguientes ordenes</p>
+
+ <pre>
+ lspci | grep "Wireless"
+ </pre>
+
+ <p>o</p>
+
+ <pre>
+ lspci | grep "Network"
+ </pre>
+
+ <h3>Como descubrir el driver de la impresora que esta usando</h3>
+
+ <h4>If you are using cups</h4>
+
+ <p>Abra una terminal y escriba la orden siguiente:</p>
+
+ <pre>
+ dpkg-query -W -f '${Version}\n' cups
+ </pre>
+
+
+ <a name="fully-free"><h1>Lista de las distribuciones GNU/Linux completamente libres</h1></a>
+
+ <p>Están enlistadas en orden alfabético</p>
+
+ <ul>
+ <li><a href="http://www.blagblagblag.org/">BLAG</a></li>
+
+ <li><a href="http://dragora.usla.org.ar/wiki/doku.php">Dragora</a></li>
+
+ <li><a href="http://dynebolic.org/">Dynebolic</a></li>
+
+ <li><a href="http://www.gnewsense.org/">gNewSense</a></li>
+
+ <li><a href="http://www.musix.org.ar/">Musix GNU+Linux</a></li>
+
+ <li><a href="http://trisquel.info/en/">Trisquel</a></li>
+
+ <li><a href="http://www.ututo.org/www/">Ututo</a></li>
+
+ <li><a href="http://venenux.org/">Venenux</a></li>
+ </ul>
+
+</div>
diff --git a/h-source/Application/Views/Help/index_fr.php b/h-source/Application/Views/Help/index_fr.php
new file mode 100644
index 0000000..0abcd54
--- /dev/null
+++ b/h-source/Application/Views/Help/index_fr.php
@@ -0,0 +1,352 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+<div class="help_external_box">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; help
+ </div>
+
+ <div class="help_tables_of_contents">
+ Sommaire
+ <ul>
+ <li><a href="<?php echo $this->currPage."/$lang#wiki-syntax";?>">Syntaxe Wiki</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#compatibility";?>">Niveau de compatibilitée</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#discover-hardware";?>">Découvrez votre matériel</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#fully-free";?>">Liste de distribution GNU/Linux entièrement libre</a></li>
+ </ul>
+ </div>
+
+ <a name="wiki-syntax"><h1>Syntaxe Wiki</h1></a>
+
+ <h3>Liste des tags Wiki sur <?php echo Website::$generalName;?></h3>
+
+ <table class="help_wiki_table" width="100%">
+ <thead>
+ <tr>
+ <th>name</th>
+ <th>tag</th>
+ <th>result</th>
+ <th width="40%">description</th>
+ </tr>
+ </thead>
+ <tr>
+ <td>bold</td>
+ <td>[b]text[/b]</td>
+ <td><b>text</b></td>
+ <td>text bold</td>
+ </tr>
+ <tr>
+ <td>italic</td>
+ <td>[i]text[/i]</td>
+ <td><i>text</i></td>
+ <td>text italic</td>
+ </tr>
+ <tr>
+ <td>del</td>
+ <td>[del]text[/del]</td>
+ <td><del>text</del></td>
+ <td>text deleted</td>
+ </tr>
+ <tr>
+ <td>underline</td>
+ <td>[u]text[/u]</td>
+ <td><u>text</u></td>
+ <td>text underlined</td>
+ </tr>
+ <tr>
+ <td>head 1</td>
+ <td>[h1]text[/h1]</td>
+ <td><div class="div_h1">text</div></td>
+ <td>head 1</td>
+ </tr>
+ <tr>
+ <td>head 2</td>
+ <td>[h2]text[/h2]</td>
+ <td><div class="div_h2">text</div></td>
+ <td>head 2</td>
+ </tr>
+ <tr>
+ <td>head 3</td>
+ <td>[h3]text[/h3]</td>
+ <td><div class="div_h3">text</div></td>
+ <td>head 3</td>
+ </tr>
+ <tr>
+ <td>paragraph</td>
+ <td>[p]text[/p]</td>
+ <td><p>text</p></td>
+ <td>new paragraph</td>
+ </tr>
+ <tr>
+ <td>list</td>
+ <td>[list]list[/list]</td>
+ <td>&lt;ul&gt;list&lt;/ul&gt;</td>
+ <td>make a list of items</td>
+ </tr>
+ <tr>
+ <td>numbered list</td>
+ <td>[enum]list[/enum]</td>
+ <td>&lt;ol&gt;list&lt;/ol&gt;</td>
+ <td>make a numbered list of items</td>
+ </tr>
+ <tr>
+ <td>list item</td>
+ <td>[*]item[/*]</td>
+ <td>&lt;li&gt;item&lt;/li&gt;</td>
+ <td>ad an item to a list</td>
+ </tr>
+ <tr>
+ <td>code</td>
+ <td>[code]some code[/code]</td>
+ <td><pre class="code_pre">some code</div></td>
+ <td>ad some code</td>
+ </tr>
+ <tr>
+ <td>simple link</td>
+ <td>[a]url[/a]</td>
+ <td>&lt;a href="url"&gt;url&lt;/a&gt;</td>
+ <td>simple link</td>
+ </tr>
+ <tr>
+ <td>link with text</td>
+ <td>[a]url|text[/a]</td>
+ <td>&lt;a href="url"&gt;text&lt;/a&gt;</td>
+ <td>link with text</td>
+ </tr>
+ <tr>
+ <td>notebook</td>
+ <td>[notebook]id[/notebook]</td>
+ <td>&nbsp</td>
+ <td>link to the notebook with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td>
+ </tr>
+ <tr>
+ <td>wifi</td>
+ <td>[wifi]id[/wifi]</td>
+ <td>&nbsp</td>
+ <td>link to the wifi with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td>
+ </tr>
+ <tr>
+ <td>videocard</td>
+ <td>[videocard]id[/videocard]</td>
+ <td>&nbsp</td>
+ <td>link to the videocard with the identifier equal to id (the identifier of each device model is written in the page of the device itself, next to the model name)</td>
+ </tr>
+ </table>
+
+ <a name="compatibility"><h1>Niveau de compatibilitée</h1></a>
+
+ <a name="notebook-compatibility"><h2>Notebooks</h2></a>
+
+ <h3>Classe A (Platinium)</h3>
+
+ <p>Tout le matériel du notebook fonctionne avec du logiciel libre. Exemple : la 3D fonctionne, le son et la wifi également</p>
+
+ <h3>Classe B (Or)</h3>
+
+ <p>Tout le matériel du notebook fonctionne, mais avec des performances réduites. Exemple : la carte graphique est reconnues mais la 3D ne fonctionne pas</p>
+
+ <h3>Classe C (Argent)</h3>
+
+ <p>Un matériel principal ne fonctionne pas. Exemple : La carte wifi ne fonctionne pas</p>
+
+ <h3>Classe D (Bronze)</h3>
+
+ <p>Plus d'un matériel ne fonctionne pas avec du logiciel libre</p>
+
+ <h3>Classe E (Poubelle)</h3>
+
+ <p>Aucun matériel ne fonctionne avec du logiciel libre</p>
+
+
+ <a name="printer-compatibility"><h2>Imprimantes</h2></a>
+
+ <h3>Classe A (Complet)</h3>
+
+ <p>Toutes les fonctionnalitées de l'imprimante fonctionne avec du logiciel libre</p>
+
+ <h3>Classe B (Partielle)</h3>
+
+ <p>La fonction d'impression fonctionne, mais à une vitesse ou qualitée limitée. Le scan ou le fax sur certains appareils peut ne pas être supportés</p>
+
+ <h3>Classe C (Aucun)</h3>
+
+ <p>L'imprimante ne fonctionne pas avec du logiciel libre</p>
+
+
+ <a name="scanner-compatibility"><h2>Scanners</h2></a>
+
+ <h3>Classe A (Complet)</h3>
+
+ <p>Toutes les fonctionnalitées du scanner sont supportées</p>
+
+ <h3>Classe B (Partielle)</h3>
+
+ <p>Le scanner fonctionne mais à une vitesse ou qualitée limitée, d'autres fonctionnalitées peuvent ne pas fonctionner</p>
+
+ <h3>Classe C (Aucun)</h3>
+
+ <p>Le scanner ne fonctionne pas avec du logiciel libre</p>
+
+ <a name="discover-hardware"><h1>Découvrez votre matériel</h1></a>
+ <div>
+ (Merci <a href="<?php echo $this->baseUrl;?>/issues/view/en/3/1/token">lluvia</a>)
+ </div>
+
+ <p>Pour connaitre votre matériel en détails, vous pouviez faire les choses suivantes:</p>
+
+ <h3>Comment découvrir le modèle de votre notebook</h3>
+
+ <p>See below your notebook or netbook</p>
+
+ <h3>Trouver la version du noyau linux libre que vous utilisez</h3>
+
+ <p>Ouvrez un terminal et tapez la commande suivant:</p>
+
+ <pre>
+ uname -r
+ </pre>
+
+ <h3>Comment trouver le modèle de votre carte graphique</h3>
+
+ <p>Ouvrez un terminal et taper la commande suivante:</p>
+
+ <pre>
+ sudo lspci
+ </pre>
+
+ <p>Chercher la ligne qui contient le mot <b>VGA</b> ou <b>Display Controller</b>. Vous pouvez aussi essayer l'une des commandes suivantes:</p>
+
+ <pre>
+ lspci | grep "Display controller"
+ </pre>
+
+ <p>ou</p>
+
+ <pre>
+ lspci | grep "VGA"
+ </pre>
+
+ <h3>Comment connaitre le VendorID ou le ProductID (VendorID:ProductID code)</h3>
+
+ <div>
+ (Merci à <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5839">Michał Masłowski</a> et <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5837">Julius22</a>)
+ </div>
+
+ <h4>Si le matériel est intégré (example : une puce vidéo)</h4>
+
+ <p>Ouvrez un terminal sudo et taper la commande suivante:</p>
+
+ <pre>
+ sudo lspci -nnk
+ </pre>
+
+ <p>Vous devriez obtenir une liste de matériel similaire à celle-ci</p>
+
+ <pre>
+ 03:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [<b>14e4:4311</b>] (rev 02)
+ Kernel driver in use: b43-pci-bridge
+ Kernel modules: ssb
+ 05:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [<b>10de:0427</b>] (rev a1)
+ Kernel modules: nouveau, nvidiafb
+ </pre>
+
+ <p>Les lignes en <b>gras</b> et placée entre crochet (dans la liste ci-dessus) sont les lignes que vous recherchez. Le premier packet de numéros (avant la virgule) sont le <b>VendorID</b>, le second sont le <b>ProductID</b>. Dans l’exemple ci dessus, le code VendorID:ProductID de la carte wifi ( vous pouvez la remarquez grace aux mots "Network Controller" et "WLAN" ) est <b>14e4:4311</b></p>
+
+ <h4>Si le périphérique est un périphérique USB : (exemple : une clé usb wifi)</h4>
+
+ <p>Ouvrez un terminal et tapez:</p>
+
+ <pre>
+ sudo lsusb
+ </pre>
+
+ <p>Vous devriez obtenir une liste de matériel similaire à celle ci</p>
+
+ <pre>
+ Bus 001 Device 002: ID <b>0846:4260</b> NetGear, Inc. WG111v3 54 Mbps Wireless [realtek RTL8187B]
+ Bus 001 Device 001: ID <b>1d6b:0002</b> Linux Foundation 2.0 root hub
+ Bus 002 Device 003: ID <b>08ff:2580</b> AuthenTec, Inc. AES2501 Fingerprint Sensor
+ </pre>
+
+ <p>Les lignes en <b>gras</b> (dans la liste du dessus) sont les lignes que vous recherchez. Les premiers nombres (avant les deux points) sont le <b>VendorID</b>, les autres sont le <b>ProductID</b>. Dans l'exemple ci-dessus : le code VendorID:ProductID de la carte usb wifi externe (Remarquez la ligne Wireless) est <b>0846:4260</b></p>
+
+ <h3>Comment savoir si votre carte graphique fonctionne</h3>
+
+ <p>Installer <a href="http://rss-glx.sourceforge.net/">rss-glx</a> en utilisant le gestionnaire de paquet de votre distribution ou en le compilant depuis les sources et essayez certains écran de veille (par exemple <b>Skyrocket</b> ou <b>Solarwinds</b>). Essayer de faire fonctionner le fond d'écran, et/ou le faire fonctionner fluidement.</p>
+
+ <h3>Comment savoir si l'accélération 3D fonctionne</h3>
+
+ <p>Essayer d’activer compiz</p>
+
+ <h3>Comment decouvrir le nom de votre carte wifi</h3>
+
+ <p>Ouvrez un terminal et taper la commande suivante:</p>
+
+ <pre>
+ sudo lspci
+ </pre>
+
+ <p>Regardez ensuite les lignes <b>Wireless</b> ou <b>Network controller</b>. Vous pouvez aussi essayer l'une de ses commandes:</p>
+
+ <pre>
+ lspci | grep "Wireless"
+ </pre>
+
+ <p>ou</p>
+
+ <pre>
+ lspci | grep "Network"
+ </pre>
+
+ <h3>Comment connaitre le pilote d’imprimante que vous utilisez</h3>
+
+ <h4>Si vous utilisez cups</h4>
+
+ <p>Ouvrez un terminal et taper ceci:</p>
+
+ <pre>
+ dpkg-query -W -f '${Version}\n' cups
+ </pre>
+
+
+ <a name="fully-free"><h1>Liste de dristributions GNU/Linux entièrement libre</h1></a>
+
+ <p>They are listed in alphabetical order</p>
+
+ <ul>
+ <li><a href="http://www.blagblagblag.org/">BLAG</a></li>
+
+ <li><a href="http://dragora.usla.org.ar/wiki/doku.php">Dragora</a></li>
+
+ <li><a href="http://dynebolic.org/">Dynebolic</a></li>
+
+ <li><a href="http://www.gnewsense.org/">gNewSense</a></li>
+
+ <li><a href="http://www.musix.org.ar/">Musix GNU+Linux</a></li>
+
+ <li><a href="http://trisquel.info/en/">Trisquel</a></li>
+
+ <li><a href="http://www.ututo.org/www/">Ututo</a></li>
+
+ <li><a href="http://venenux.org/">Venenux</a></li>
+ </ul>
+
+</div>
diff --git a/h-source/Application/Views/Help/index_it.php b/h-source/Application/Views/Help/index_it.php
new file mode 100644
index 0000000..cd22c34
--- /dev/null
+++ b/h-source/Application/Views/Help/index_it.php
@@ -0,0 +1,378 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+<div class="help_external_box">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; help
+ </div>
+
+ <div class="help_tables_of_contents">
+ Table of contents
+ <ul>
+ <li><a href="<?php echo $this->currPage."/$lang#wiki-syntax";?>">Sintassi della Wiki</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#compatibility";?>">Classi di compatibilità</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#discover-hardware";?>">Scopri il tuo hardware</a></li>
+ <li><a href="<?php echo $this->currPage."/$lang#fully-free";?>">Lista delle distribuzioni Gnu/Linux completamente libere</a></li>
+ </ul>
+ </div>
+
+ <a name="wiki-syntax"><h1>Sintassi della Wiki</h1></a>
+
+ <h3>Lista dei tag della wiki di <?php echo Website::$generalName;?></h3>
+
+ <table class="help_wiki_table" width="100%">
+ <thead>
+ <tr>
+
+ <th>nome</th>
+ <th>tag</th>
+ <th>risultato</th>
+ <th width="40%">descrizione</th>
+ </tr>
+ </thead>
+ <tr>
+
+ <td>grassetto</td>
+ <td>[b]text[/b]</td>
+ <td><b>text</b></td>
+ <td>testo in grassetto</td>
+ </tr>
+ <tr>
+ <td>corsivo</td>
+
+ <td>[i]text[/i]</td>
+ <td><i>text</i></td>
+ <td>testo corsivo</td>
+ </tr>
+ <tr>
+ <td>cancellare</td>
+ <td>[del]text[/del]</td>
+
+ <td><del>text</del></td>
+ <td>testo cancellato</td>
+ </tr>
+ <tr>
+ <td>sottolineare</td>
+ <td>[u]text[/u]</td>
+ <td><u>text</u></td>
+
+ <td>testo sottolineato</td>
+ </tr>
+ <tr>
+ <td>head 1</td>
+ <td>[h1]text[/h1]</td>
+ <td><div class="div_h1">text</div></td>
+ <td>head 1</td>
+
+ </tr>
+ <tr>
+ <td>head 2</td>
+ <td>[h2]text[/h2]</td>
+ <td><div class="div_h2">text</div></td>
+ <td>head 2</td>
+ </tr>
+
+ <tr>
+ <td>head 3</td>
+ <td>[h3]text[/h3]</td>
+ <td><div class="div_h3">text</div></td>
+ <td>head 3</td>
+ </tr>
+ <tr>
+
+ <td>paragrafo</td>
+ <td>[p]text[/p]</td>
+ <td><p>text</p></td>
+ <td>crea un nuovo paragrafo</td>
+ </tr>
+ <tr>
+ <td>elenco</td>
+
+ <td>[list]list[/list]</td>
+ <td>&lt;ul&gt;list&lt;/ul&gt;</td>
+ <td>crea un elenco di item</td>
+ </tr>
+ <tr>
+ <td>elenco numerato</td>
+
+ <td>[enum]list[/enum]</td>
+ <td>&lt;ol&gt;list&lt;/ol&gt;</td>
+ <td>crea un elenco numerato di item</td>
+ </tr>
+ <tr>
+ <td>item di un elenco</td>
+
+ <td>[*]item[/*]</td>
+ <td>&lt;li&gt;item&lt;/li&gt;</td>
+ <td>aggiungi un item a un elenco</td>
+ </tr>
+ <tr>
+ <td>codice</td>
+
+ <td>[code]some code[/code]</td>
+ <td><pre class="code_pre">some code</div></td>
+ <td>aggiungi del codice</td>
+ </tr>
+ <tr>
+ <td>link semplice</td>
+ <td>[a]url[/a]</td>
+
+ <td>&lt;a href="url"&gt;url&lt;/a&gt;</td>
+ <td>crea un link semplice</td>
+ </tr>
+ <tr>
+ <td>link con testo</td>
+ <td>[a]url|text[/a]</td>
+
+ <td>&lt;a href="url"&gt;text&lt;/a&gt;</td>
+ <td>crea un link con testo</td>
+ </tr>
+ <tr>
+ <td>notebook</td>
+ <td>[notebook]id[/notebook]</td>
+
+ <td>&nbsp</td>
+ <td>crea un link al notebook con l'identificatore corrispondente a id (l'identificatore di ogni modello di dispositivo si trova nella pagina del dispositivo stesso, accanto al nome del modello</td>
+ </tr>
+ <tr>
+ <td>wifi</td>
+ <td>[wifi]id[/wifi]</td>
+ <td>&nbsp</td>
+
+ <td>crea un link alla wifi con l'identificatore corrispondente a id (l'identificatore di ogni modello di dispositivo si trova nella pagina del dispositivo stesso, accanto al nome del modello)</td>
+ </tr>
+ <tr>
+ <td>scheda video</td>
+ <td>[videocard]id[/videocard]</td>
+ <td>&nbsp</td>
+ <td>crea un link alla scheda video con l'identificatore corrispondente a id (l'identificatore di ogni modello di dispositivo si trova nella pagina del dispositivo stesso, accanto al nome del modello)</td>
+
+ </tr>
+ </table>
+
+ <a name="compatibility"><h1>Classi di compatibilità</h1></a>
+
+ <a name="notebook-compatibility"><h2>Notebooks</h2></a>
+
+ <h3>Classe A (Platino)</h3>
+
+ <p>Tutti i dispositivi del portatile funzionano ad alte prestazioni. Per esempio: funzionano tutti i dispositivi, l'accelerazione 3D è supportata.</p>
+
+ <h3>Classe B (Oro)</h3>
+
+ <p>Tutti i dispositivi del portatile funzionano ma non a piene prestazioni. Esempio tipico: funzionano tutti i dispositivi, ma l'accelerazione 3D non è supportata.</p>
+
+ <h3>Classe C (Argento)</h3>
+
+ <p>Uno dei dispositivi principali non è supportato. Per esempio: la scheda wifi interna non funziona e serve una wifi esterna USB.</p>
+
+ <h3>Classe D (Bronzo)</h3>
+
+ <p>Più di uno dei dispositivi principali non è supportato.</p>
+
+ <h3>Classe E (Spazzatura)</h3>
+
+ <p>Il portatile non funziona con software libero.</p>
+
+
+ <a name="printer-compatibility"><h2>Stampanti</h2></a>
+
+
+ <h3>Classe A (Piena)</h3>
+
+ <p>Sono supportate tutte le funzioni e le caratteristiche della stampante.</p>
+
+ <h3>Classe B (Parziale)</h3>
+
+ <p>La funzione di stampa è supportata, ma a velocità limitata o a scarsa qualità. Su alcune stampanti multifunzione possono non essere supportate le funzioni di scanner e/o di fax.</p>
+
+ <h3>Classe C (Nessuna)</h3>
+
+ <p>La stampante non funziona con software libero.</p>
+
+
+ <a name="scanner-compatibility"><h2>Scanner</h2></a>
+
+ <h3>Classe A (Piena)</h3>
+
+ <p>Sono supportate tutte le funzioni e le caratteristiche dello scanner.</p>
+
+ <h3>Classe B (Parziale)</h3>
+
+ <p>La funzione di scannerizzazione è supportata, ma a velocità limitata o a scarsa qualità. Qualche altra caratteristica può non essere supportata.</p>
+
+ <h3>Classe C (Nessuna)</h3>
+
+ <p>Lo scanner non funziona con software libero.</p>
+
+ <a name="discover-hardware"><h1>Scopri il tuo hardware</h1></a>
+ <div>
+ (Grazie <a href="<?php echo $this->baseUrl;?>/issues/view/en/3/1/token">lluvia</a>)
+ </div>
+
+ <p>Per sapere le caratteristiche e i dettagli del tuo hardware puoi seguire queste istruzioni:</p>
+
+ <h3>Come scoprire il nome del modello del portatile</h3>
+
+ <p>Guarda sotto al tuo notebook o al tuo netbook</p>
+
+ <h3>Come scoprire che versione del kernel libre stai usando</h3>
+
+ <p>Apri un terminale e digita questo comando:</p>
+
+ <pre>
+ uname -r
+ </pre>
+
+ <h3>Come scoprire il nome della tua scheda video</h3>
+
+ <p>Apri un terminale e digita questo comando:</p>
+
+
+ <pre>
+ sudo lspci
+ </pre>
+
+ <p>Poi cerca la riga contenente la stringa <b>VGA</b> o <b>Display controller</b>. Puoi anche provare con uno di questi comandi:</p>
+
+ <pre>
+ lspci | grep "Display controller"
+ </pre>
+
+
+ <p>o</p>
+
+ <pre>
+ lspci | grep "VGA"
+ </pre>
+
+ <h3>Come scoprire il VendorID e il ProductID del tuo dispositivo (VendorID:ProductID code)</h3>
+
+ <div>
+ (Grazie <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5839">Michał Masłowski</a> e <a href="http://trisquel.info/en/forum/h-nodecom-new-website-hardware-database#comment-5837">Julius22</a>)
+ </div>
+
+ <h4>Se il dispositivo è integrato (per esempio una scheda video)</h4>
+
+ <p>Apri un terminale e digita il seguente comando:</p>
+
+ <pre>
+ sudo lspci -nnk
+ </pre>
+
+ <p>Dovresti ottenere una lista di hardware simile a quella scritta qui sotto</p>
+
+ <pre>
+
+ 03:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [<b>14e4:4311</b>] (rev 02)
+ Kernel driver in use: b43-pci-bridge
+ Kernel modules: ssb
+ 05:00.0 VGA compatible controller [0300]: nVidia Corporation G86 [GeForce 8400M GS] [<b>10de:0427</b>] (rev a1)
+ Kernel modules: nouveau, nvidiafb
+ </pre>
+
+ <p>Le stringhe in <b>grassetto</b> e tra parentesi quadre (nella lista qui sopra) sono il codice che stai cercando. Il primo gruppo di cifre (prima dei due punti) è il <b>VendorID</b>, il secondo gruppo è il <b>ProductID</b>. Nell'esempio qui sopra: il codice VendorID:ProductID della scheda wifi (nota le stringhe "Network controller" e "WLAN") è <b>14e4:4311</b> mentre il codice VendorID:ProductID della scheda video (nota la stringa "VGA") è <b>10de:0427</b></p>
+
+
+ <h4>Se si tratta di un dispositivo USB (per esempio una wifi esterna USB)</h4>
+
+ <p>Apri un terminale e digita questo comando:</p>
+
+ <pre>
+ sudo lsusb
+ </pre>
+
+ <p>Dovresti ottenere una lista di hardware simile a quella scritta qui sotto</p>
+
+ <pre>
+
+ Bus 001 Device 002: ID <b>0846:4260</b> NetGear, Inc. WG111v3 54 Mbps Wireless [realtek RTL8187B]
+ Bus 001 Device 001: ID <b>1d6b:0002</b> Linux Foundation 2.0 root hub
+ Bus 002 Device 003: ID <b>08ff:2580</b> AuthenTec, Inc. AES2501 Fingerprint Sensor
+ </pre>
+
+ <p>Le stringhe in <b>grassetto</b> (nella lista qui sopra) sono il codice che stai cercando. Il primo gruppo di cifre (prima dei due punti) è il <b>VendorID</b>, il secondo gruppo è il <b>ProductID</b>. Nell'esempio qui sopra: il codice VendorID:ProductID della wifi esterna USB (nota la stringa "Wireless") è <b>0846:4260</b></p>
+
+ <h3>Come scoprire se funziona la scheda video</h3>
+
+ <p>Installa <a href="http://rss-glx.sourceforge.net/">rss-glx</a> tramite il gestore di pacchetti della tua distribuzione
+o compilando dai sorgenti e prova degli screensaver (per esempio <b>Skyrocket</b> o <b>Solarwinds</b>). Controlla se parte lo screensaver (e/o se si vede "fluido")</p>
+
+ <h3>Come scoprire se funziona l'accelerazione 3D</h3>
+
+
+ <p>Prova ad attivare compiz</p>
+
+ <h3>Come scoprire il nome della tua scheda wifi</h3>
+
+ <p>Apri un terminale e digita questo comando:</p>
+
+ <pre>
+ sudo lspci
+ </pre>
+
+ <p>Poi cerca la riga contenente la stringa <b>Wireless</b> o <b>Network controller</b>. Puoi anche provare uno dei seguenti comandi:</p>
+
+
+ <pre>
+ lspci | grep "Wireless"
+ </pre>
+
+ <p>o</p>
+
+ <pre>
+ lspci | grep "Network"
+ </pre>
+
+ <h3>Come scoprire che driver per la stampante stai usando</h3>
+
+ <h4>Se stai usando cups</h4>
+
+ <p>Apri un terminale e digita il seguente comando:</p>
+
+ <pre>
+ dpkg-query -W -f '${Version}\n' cups
+ </pre>
+
+
+ <a name="fully-free"><h1>Lista di distribuzioni GNU/Linux completamente libere</h1></a>
+
+ <p>In ordine alfabetico</p>
+
+ <ul>
+ <li><a href="http://www.blagblagblag.org/">BLAG</a></li>
+
+ <li><a href="http://dragora.usla.org.ar/wiki/doku.php">Dragora</a></li>
+
+ <li><a href="http://dynebolic.org/">Dynebolic</a></li>
+
+ <li><a href="http://www.gnewsense.org/">gNewSense</a></li>
+
+ <li><a href="http://www.musix.org.ar/">Musix GNU+Linux</a></li>
+
+ <li><a href="http://trisquel.info/en/">Trisquel</a></li>
+
+ <li><a href="http://www.ututo.org/www/">Ututo</a></li>
+
+ <li><a href="http://venenux.org/">Venenux</a></li>
+ </ul>
+
+</div>
diff --git a/h-source/Application/Views/History/viewall.php b/h-source/Application/Views/History/viewall.php
new file mode 100644
index 0000000..47848ff
--- /dev/null
+++ b/h-source/Application/Views/History/viewall.php
@@ -0,0 +1,38 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+<?php $u = new UsersModel();?>
+<?php
+ $mess_count = 0;
+ foreach ($res as $row) {
+ $mess_count++;
+?>
+<div class="details_of_actions_inner">
+ <div class="talk_message_item_date">this message has been <?php echo $md_action[$row['history']['action']];?> by <?php echo getLinkToUser($u->getUser($row['history']['created_by']));?> at <?php echo smartDate($row['history']['creation_date']);?> with the following motivation:
+ </div>
+ <div class="deleted_message_show"><?php echo$row['history']['message'];?></div>
+</div>
+<?php } ?>
+
+<?php if ($mess_count === 0) { ?>
+ <div class="details_of_actions_inner">
+ there are no details..
+ </div>
+<?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Home/left.php b/h-source/Application/Views/Home/left.php
new file mode 100644
index 0000000..816a47b
--- /dev/null
+++ b/h-source/Application/Views/Home/left.php
@@ -0,0 +1,34 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ Home
+ </div>
+
+ <?php echo $htmlNewsBox;?>
+
+ <p>it works!!</p>
+
+ <p>modify the file <b>Application/Views/Home/left.php</b> in order to change the english version of your homepage</p>
+
+ <p>modify the file <b>Application/Include/languages.php</b> in order to add new languages</p>
+ </div>
diff --git a/h-source/Application/Views/Home/left_es.php b/h-source/Application/Views/Home/left_es.php
new file mode 100644
index 0000000..029962b
--- /dev/null
+++ b/h-source/Application/Views/Home/left_es.php
@@ -0,0 +1,31 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ Home
+ </div>
+
+ <?php echo $htmlNewsBox;?>
+
+
+
+ </div>
diff --git a/h-source/Application/Views/Home/left_fr.php b/h-source/Application/Views/Home/left_fr.php
new file mode 100644
index 0000000..de2acda
--- /dev/null
+++ b/h-source/Application/Views/Home/left_fr.php
@@ -0,0 +1,30 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ Home
+ </div>
+
+ <?php echo $htmlNewsBox;?>
+
+
+ </div>
diff --git a/h-source/Application/Views/Home/left_it.php b/h-source/Application/Views/Home/left_it.php
new file mode 100644
index 0000000..de2acda
--- /dev/null
+++ b/h-source/Application/Views/Home/left_it.php
@@ -0,0 +1,30 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ Home
+ </div>
+
+ <?php echo $htmlNewsBox;?>
+
+
+ </div>
diff --git a/h-source/Application/Views/Issues/view.php b/h-source/Application/Views/Issues/view.php
new file mode 100644
index 0000000..20d0403
--- /dev/null
+++ b/h-source/Application/Views/Issues/view.php
@@ -0,0 +1,202 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+ </script>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/issues/viewall/$lang".$this->viewStatus;?>">issues</a> &raquo; <?php echo $id_issue;?>
+ </div>
+
+ <div class="issues_external_box">
+ <?php foreach ($table as $row) { ?>
+
+ <div class="issues_view_title">
+ <?php echo $row['issues']['title'];?>
+ </div>
+
+ <div class="talk_message_item_date">
+ submitted by <?php echo getLinkToUser($u->getUser($row['issues']['created_by']));?>, <?php echo smartDate($row['issues']['creation_date']);?>
+ </div>
+
+ <div class="issues_view_status_and_priority">
+ <table>
+ <tr>
+ <td><?php echo gtext("TOPIC");?>:</td>
+ <td><b><?php echo str_replace('-',' ',$row['issues']['topic']);?></b></td>
+ </tr>
+ <tr>
+ <td><?php echo gtext("STATUS");?>:</td>
+ <td><b><?php echo $row['issues']['status'];?></b></td>
+ </tr>
+ <tr>
+ <td><?php echo gtext("PRIORITY");?>:</td>
+ <td><b><?php echo $row['issues']['priority'];?></b></td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="issues_view_description_title">
+ <?php echo gtext("Description");?>:
+ </div>
+
+ <div class="issues_view_description">
+ <?php echo decodeWikiText($row['issues']['message']);?>
+ </div>
+
+ <?php if (strcmp($row['issues']['notice'],'') !== 0) { ?>
+
+ <div class="issues_view_description_title">
+ Response message (from h-node.com):
+ </div>
+
+ <div class="issues_view_description">
+ <?php echo decodeWikiText($row['issues']['notice']);?>
+ </div>
+
+ <?php } ?>
+
+ <?php } ?>
+ </div>
+
+ <!--print the messages to this issue-->
+ <div class="issues_external_box">
+ <div class="add_message_form_title">
+ <?php echo gtext("Messages");?>:
+ </div>
+ <?php
+ $mess_count = 0;
+ foreach ($messages as $row) {
+ $mess_count++;
+ ?>
+
+ <?php if (strcmp($row['messages']['deleted'],'no') === 0) { ?>
+
+ <div class="issues_message_item">
+ <div class="issues_message_item_user">
+ <div class="issues_message_item_user_inner">
+ <?php echo $u->getUser($row['messages']['created_by']);?>:
+ </div>
+ <?php if ($ismoderator) { ?>
+ <a id="<?php echo $row['messages']['id_mes'];?>" class="hide_message hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_cancel.png">hide</a>
+ <?php } ?>
+
+ </div>
+
+ <div class="message_view_description">
+ <?php echo decodeWikiText($row['messages']['message']);?>
+ </div>
+ <div class="talk_message_item_date">
+ submitted by <?php echo getLinkToUser($u->getUser($row['messages']['created_by']));?>, <?php echo smartDate($row['messages']['creation_date']);?>
+ </div>
+
+ <?php if ($ismoderator) { ?>
+ <!--view details-->
+ <div class="show_hidden_box_ext">
+ <div class="md_type">message</div>
+ <a id="<?php echo $row['messages']['id_mes'];?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
+ <div class="moderation_details_box"></div>
+ </div>
+ <?php } ?>
+
+ </div>
+
+ <?php } else { ?>
+
+ <div class="issues_message_item_hidden">
+ <?php echo gtext("this message has been deleted");?>
+ <?php if ($ismoderator) { ?>
+ <a id="<?php echo $row['messages']['id_mes'];?>" class="show_message hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png">make visible</a>
+
+ <!--view details-->
+ <div class="show_hidden_box_ext">
+ <div class="md_type">message</div>
+
+ <a id="<?php echo $row['messages']['id_mes'];?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
+
+ <div class="details_of_hidden_message">
+ <div class="details_of_hidden_message_inner">
+ <div class="talk_message_item_date">
+ submitted by <?php echo getLinkToUser($u->getUser($row['messages']['created_by']));?>, <?php echo smartDate($row['messages']['creation_date']);?>
+ </div>
+ <div class="message_view_description_hidden">
+ <?php echo decodeWikiText($row['messages']['message']);?>
+ </div>
+ </div>
+ <div class="moderation_details_box"></div>
+ </div>
+ </div>
+
+ <?php } ?>
+ </div>
+
+ <?php } ?>
+
+ <?php } ?>
+
+ <?php if ($mess_count === 0) { ?>
+ <?php echo gtext("there are no messages");?>..
+ <?php } ?>
+
+ </div>
+
+ <!--insert a message notice-->
+ <?php if ($islogged === 'yes') { ?>
+
+ <div class="add_issue_form">
+ <div class="add_message_form_title">
+ <a name="form"><?php echo gtext("Add a message to this issue");?></a>
+ </div>
+
+ <?php echo $notice;?>
+
+ <!--preiview-->
+ <?php if (isset($preview_message)) { ?>
+ <div class="message_preview_notice">
+ <?php echo gtext("preview of the message");?>:
+ </div>
+ <div class="issues_message_item_preview">
+ <div class="message_view_description">
+ <?php echo decodeWikiText($preview_message);?>
+ </div>
+ </div>
+ <?php } ?>
+
+ <?php echo $form;?>
+ </div>
+
+ <?php } else { ?>
+
+ <div class="talk_login_notice">
+ <a name="form"><?php echo gtext("You have to");?> <a href="<?php echo $this->baseUrl."/users/login/$lang";?>">login</a> <?php echo gtext("in order to submit a message to this issue");?></a>
+ </div>
+
+ <?php } ?>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Issues/viewall.php b/h-source/Application/Views/Issues/viewall.php
new file mode 100644
index 0000000..39bd566
--- /dev/null
+++ b/h-source/Application/Views/Issues/viewall.php
@@ -0,0 +1,118 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+ </script>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; issues
+ </div>
+
+ <div class="issues_external_box">
+ <div class="issues_viewall_title">
+ <?php echo gtext("List of issues");?>:
+ </div>
+
+ <table class="issues_viewall_table">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th><?php echo gtext("TITLE");?></th>
+ <th><?php echo gtext("TOPIC");?></th>
+ <th><?php echo gtext("OPENED BY");?></th>
+ <th><?php echo gtext("DATE");?></th>
+ <th><?php echo gtext("REPLIES");?></th>
+ <th><?php echo gtext("PRIORITY");?></th>
+ <th><?php echo gtext("STATUS");?></th>
+ </tr>
+ </thead>
+
+ <?php foreach ($table as $row) { ?>
+ <tr>
+ <td><?php echo $row['issues']['id_issue'];?></td>
+ <td><a href="<?php echo $this->baseUrl."/issues/view/$lang/".$row['issues']['id_issue'].$this->viewStatus;?>"><?php echo $row['issues']['title'];?></a></td>
+ <td><?php echo str_replace('-',' ',$row['issues']['topic']);?></td>
+ <td><?php echo getLinkToUser($u->getUser($row['issues']['created_by']));?></td>
+ <td><?php echo smartDate($row['issues']['creation_date']);?></td>
+ <td>
+ <?php
+ if (strcmp($row['messages']['message'],'') !== 0)
+ {
+ echo $row['aggregate']['numb_mess'];
+ }
+ else
+ {
+ echo $row['aggregate']['numb_mess']-1;
+ }
+ ?>
+ </td>
+ <td><?php echo $row['issues']['priority'];?></td>
+ <td><?php echo $row['issues']['status'];?></td>
+ </tr>
+ <?php } ?>
+ </table>
+ </div>
+
+ <div class="history_page_list">
+ <?php echo gtext("page list");?>: <?php echo $pageList;?>
+ </div>
+
+ <?php if ($islogged === 'yes') { ?>
+
+ <div class="add_issue_form">
+ <div class="add_issue_form_title">
+ <a name="form"><?php echo gtext("Add a new issue");?></a>
+ </div>
+
+ <?php echo $notice;?>
+
+ <!--preiview-->
+ <?php if (isset($preview_message)) { ?>
+ <div class="message_preview_notice">
+ <?php echo gtext("preview of the new issue message");?>:
+ </div>
+ <div class="issues_message_item_preview">
+ <div class="message_view_description">
+ <?php echo decodeWikiText($preview_message);?>
+ </div>
+ </div>
+ <?php } ?>
+
+ <?php echo $form;?>
+ </div>
+
+ <?php } else { ?>
+
+ <div class="talk_login_notice">
+ <a name="form"><?php echo gtext("You have to");?> <a href="<?php echo $this->baseUrl."/users/login/$lang";?>">login</a> <?php echo gtext("in order to submit an issue");?></a>
+ </div>
+
+ <?php } ?>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/My/email.php b/h-source/Application/Views/My/email.php
new file mode 100644
index 0000000..bda793e
--- /dev/null
+++ b/h-source/Application/Views/My/email.php
@@ -0,0 +1,31 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>">panel</a> &raquo; e-mail
+ </div>
+
+ <?php echo $notice;?>
+
+ <?php echo $form;?>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/My/goodbye.php b/h-source/Application/Views/My/goodbye.php
new file mode 100644
index 0000000..e4936a6
--- /dev/null
+++ b/h-source/Application/Views/My/goodbye.php
@@ -0,0 +1,61 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function(){
+
+ $(".close_account_submit").click(function () {
+ if (window.confirm("Are you really sure?")) {
+ return true;
+ }
+ return false;
+ });
+
+ });
+
+ </script>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>">panel</a> &raquo; delete account
+ </div>
+
+ <div class="delete_account_notice_box">
+ After your account cancellation:
+ <ul>
+ <li>you won't be able to log-in anymore</li>
+ <li>all your data, except for your username, will be deleted from the database</li>
+ <li>your public profile won't be accessible anymore</li>
+ <li>you won't be able to get your old account back. If you want to register another time you have to choose a different username</li>
+ <li>your username will remain in the history of the devices (notebooks,video cards..) you have modified</li>
+ </ul>
+ </div>
+
+ <div class="climb_form_ext_box">
+
+ <form action="<?php echo $this->currPage."/$lang".$this->viewStatus;?>" method="POST">
+ I want to close my account: <input class="close_account_submit" type="submit" name="closeAction" value="confirm">
+ </form>
+
+ </div>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/My/panel.php b/h-source/Application/Views/My/panel.php
new file mode 100644
index 0000000..d03d274
--- /dev/null
+++ b/h-source/Application/Views/My/panel.php
@@ -0,0 +1,35 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; panel
+ </div>
+
+ <ul class='panelApplicationList'>
+ <li><a href="<?php echo Url::getRoot('users/meet/'.$lang.'/'.$username);?>">Watch your public profile</a></li>
+ <li><a href="<?php echo Url::getRoot('my/profile/'.$lang.'/'.$token);?>">Edit your profile</a></li>
+ <li><a href="<?php echo Url::getRoot('my/email/'.$lang.'/'.$token);?>">Change the e-mail address</a></li>
+ <li><a href="<?php echo Url::getRoot('my/password/'.$lang.'/'.$token);?>">Change the password</a></li>
+ <li><a href="<?php echo Url::getRoot('my/goodbye/'.$lang.'/'.$token);?>">Delete your account</a></li>
+ </ul>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/My/password.php b/h-source/Application/Views/My/password.php
new file mode 100644
index 0000000..1644b88
--- /dev/null
+++ b/h-source/Application/Views/My/password.php
@@ -0,0 +1,31 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>">panel</a> &raquo; password
+ </div>
+
+ <?php echo $notice;?>
+
+ <?php echo $form;?>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/My/profile.php b/h-source/Application/Views/My/profile.php
new file mode 100644
index 0000000..b4f51ea
--- /dev/null
+++ b/h-source/Application/Views/My/profile.php
@@ -0,0 +1,31 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/my/home/$lang/$token";?>">panel</a> &raquo; profile
+ </div>
+
+ <?php echo $notice;?>
+
+ <?php echo $form;?>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/News/index.php b/h-source/Application/Views/News/index.php
new file mode 100644
index 0000000..ce2b080
--- /dev/null
+++ b/h-source/Application/Views/News/index.php
@@ -0,0 +1,49 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; news
+ </div>
+
+ <div class="news_external_box">
+ <?php foreach ($table as $row) { ?>
+ <div class="news_item">
+ <div class="news_item_title">
+ <?php echo $row['news']['title'];?>
+ </div>
+ <div class="news_item_date">
+ <?php echo smartDate($row['news']['creation_date']);?>
+ </div>
+ <div class="news_item_message">
+ <?php echo decodeWikiText($row['news']['message']);?>
+ </div>
+ </div>
+ <?php } ?>
+ </div>
+
+ <?php if ($recordNumber > 10) { ?>
+ <div class="history_page_list_news">
+ <?php echo $pageList;?>
+ </div>
+ <?php } ?>
+
+ </div>
diff --git a/h-source/Application/Views/Notebooks/catalogue.php b/h-source/Application/Views/Notebooks/catalogue.php
new file mode 100644
index 0000000..b4c24ce
--- /dev/null
+++ b/h-source/Application/Views/Notebooks/catalogue.php
@@ -0,0 +1,80 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="viewall_popup_menu_box_external">
+ <div class="viewall_popup_menu_box">
+ <?php echo $popup;?>
+ </div>
+ <div class="viewall_popup_menu_status">
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['vendor']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['compatibility']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['subtype']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div>
+ </div>
+ </div>
+
+ <!--if no notebooks found-->
+ <?php if (strcmp($recordNumber,0) === 0) { ?>
+ <div class="viewall_no_items_found">
+ <?php echo gtext("No notebooks found");?>..
+ </div>
+ <?php } ?>
+
+ <!--loop-->
+ <?php foreach ($table as $item) {?>
+ <div class="model_viewall">
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/computer-laptop_22.png";?>"><span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><?php echo $item['hardware']['vendor'];?></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("subtype (notebook or netbook)");?></div>
+ <div class="inner_value"><b><?php echo $item['hardware']['subtype'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_compatibility">
+ <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div>
+ <div class="inner_value"><?php echo $item['hardware']['compatibility'];?></div>
+ </div>
+
+ <div class="notebook_view_link">
+ <a href="<?php echo $this->baseUrl."/notebooks/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?></a>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($recordNumber,0) !== 0) { ?>
+ <div class="history_page_list">
+ <?php echo gtext("page list");?>: <?php echo $pageList;?>
+ </div>
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Notebooks/form.php b/h-source/Application/Views/Notebooks/form.php
new file mode 100644
index 0000000..0ef7d1b
--- /dev/null
+++ b/h-source/Application/Views/Notebooks/form.php
@@ -0,0 +1,114 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ dist_list_helper();
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+ </script>
+
+ <?php echo $notice;?>
+
+ <div class="notebooks_insert_form">
+ <form action="<?php echo $this->baseUrl."/notebooks/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST">
+
+ <div class="edit_form">
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("vendor");?>:</div>
+ <?php echo Html_Form::select('vendor',$values['vendor'],Notebooks::$vendors,"select_entry");?>
+ <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div>
+ <?php echo Html_Form::input('model',$values['model'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("subtype (notebook or netbook)");?>:</div>
+ <?php echo Html_Form::select('subtype',$values['subtype'],Notebooks::$subtypeSelect,"select_entry");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("year of commercialization");?>:</div>
+ <?php echo Html_Form::select('comm_year',$values['comm_year'],Notebooks::$commYear,"select_entry");?>
+ </div>
+
+ <div class="form_entry td_with_distribution_checkboxes">
+ <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div>
+ <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?>
+ <?php echo Distributions::getFormHtml();?>
+ </div>
+
+ <div class="form_entry hidden_x_explorer">
+ <div class="entry_label"><?php echo gtext("compatibility with free software");?>:</div>
+ <?php echo Html_Form::select('compatibility',$values['compatibility'],Notebooks::$compatibility,"select_entry");?>
+ <a class="open_help_window" title="compatibility help page" target="blank" href="<?php echo $this->baseUrl."/help/index/$lang#notebook-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("video card model");?>:</div>
+ <?php echo Html_Form::input('video_card_type',$values['video_card_type'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("does the video card work?");?></div>
+ <?php echo Html_Form::select('video_card_works',$values['video_card_works'],Notebooks::$videoSelect,"select_entry");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("wifi model");?>:</div>
+ <?php echo Html_Form::input('wifi_type',$values['wifi_type'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("does the wifi card work?");?></div>
+ <?php echo Html_Form::select('wifi_works',$values['wifi_works'],Notebooks::$wifiSelect,"select_entry");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div>
+ <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?>
+ </div>
+
+ <?php echo $hiddenInput;?>
+
+ <input type="submit" name="<?php echo $submitName;?>" value="Save">
+
+ <div class="mandatory_fields_notice">
+ <?php echo gtext("Fields marked with <b>*</b> are mandatory");?>
+ </div>
+
+ </div>
+
+ </form>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Notebooks/page.php b/h-source/Application/Views/Notebooks/page.php
new file mode 100644
index 0000000..0a29b3d
--- /dev/null
+++ b/h-source/Application/Views/Notebooks/page.php
@@ -0,0 +1,92 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <?php if (strcmp($isDeleted,'no') === 0) { ?>
+
+ <?php
+ $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions';
+ ?>
+
+ <?php foreach ($table as $item) { ?>
+ <div class="notebooks_viewall">
+
+ <!--if revision-->
+ <?php if (strcmp($this->action,'revision') === 0) { ?>
+ <div class="revision_alert">
+ This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/notebooks/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>.
+ </div>
+ <?php } ?>
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/computer-laptop_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span>
+ <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?>
+ <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span>
+ <?php } ?>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['vendor'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("subtype (notebook or netbook)");?></div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['subtype'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_compatibility">
+ <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['compatibility'];?></b> <a class="open_help_window" target="blank" title="compatibility help page" href="<?php echo $this->baseUrl."/help/index/$lang#notebook-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a></div>
+ </div>
+
+ <div class="model_tested_on">
+ <div class="inner_label"><?php echo gtext("tested on");?>:</div>
+ <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("video card model");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['video_card_type'];?></b> (<?php echo Notebooks::$videoReverse[$item[$tableName]['video_card_works']];?>)</div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("wifi model");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['wifi_type'];?></b> (<?php echo Notebooks::$wifiReverse[$item[$tableName]['wifi_works']];?>)</div>
+ </div>
+
+ <div class="notebook_description">
+ <div class="notebook_description_label"><?php echo gtext("Description");?>:</div>
+ <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Printers/catalogue.php b/h-source/Application/Views/Printers/catalogue.php
new file mode 100644
index 0000000..bf790f0
--- /dev/null
+++ b/h-source/Application/Views/Printers/catalogue.php
@@ -0,0 +1,80 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="viewall_popup_menu_box_external">
+ <div class="viewall_popup_menu_box">
+ <?php echo $popup;?>
+ </div>
+ <div class="viewall_popup_menu_status">
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['vendor']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['compatibility']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['interface']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div>
+ </div>
+ </div>
+
+ <!--if no notebooks found-->
+ <?php if (strcmp($recordNumber,0) === 0) { ?>
+ <div class="viewall_no_items_found">
+ <?php echo gtext("No printers found");?>..
+ </div>
+ <?php } ?>
+
+ <!--loop-->
+ <?php foreach ($table as $item) {?>
+ <div class="model_viewall">
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/printer_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><?php echo $item['hardware']['vendor'];?></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("interface");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div>
+ </div>
+
+ <div class="notebook_compatibility">
+ <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div>
+ <div class="inner_value"><?php echo $item['hardware']['compatibility'];?></div>
+ </div>
+
+ <div class="notebook_view_link">
+ <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?>..</a>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($recordNumber,0) !== 0) { ?>
+ <div class="history_page_list">
+ <?php echo gtext("page list");?>: <?php echo $pageList;?>
+ </div>
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Printers/form.php b/h-source/Application/Views/Printers/form.php
new file mode 100644
index 0000000..b6a71a6
--- /dev/null
+++ b/h-source/Application/Views/Printers/form.php
@@ -0,0 +1,104 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ dist_list_helper();
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+ </script>
+
+ <?php echo $notice;?>
+
+ <div class="notebooks_insert_form">
+ <form action="<?php echo $this->baseUrl."/".$this->controller."/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST">
+
+ <div class="edit_form">
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("vendor");?>:</div>
+ <?php echo Html_Form::select('vendor',$values['vendor'],Printer::$vendors,"select_entry");?>
+ <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div>
+ <?php echo Html_Form::input('model',$values['model'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>
+ <?php echo Html_Form::input('pci_id',$values['pci_id'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("year of commercialization");?></div>
+ <?php echo Html_Form::select('comm_year',$values['comm_year'],Printer::$commYear,"select_entry");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("interface");?> (<?php echo gtext("set not-specified if not sure");?>)</div>
+ <?php echo Html_Form::select('interface',$values['interface'],Printer::$interface,"select_entry");?>
+ </div>
+
+ <div class="form_entry td_with_distribution_checkboxes">
+ <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div>
+ <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?>
+ <?php echo Distributions::getFormHtml();?>
+ </div>
+
+ <div class="form_entry hidden_x_explorer">
+ <div class="entry_label"><?php echo gtext("compatibility with free software");?>:</div>
+ <?php echo Html_Form::select('compatibility',$values['compatibility'],Printer::$compatibility,"select_entry");?>
+ <a class="open_help_window" title="compatibility help page" target="blank" href="<?php echo $this->baseUrl."/help/index/$lang#printer-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label hidden_x_explorer"><?php echo gtext("free driver used");?> (example: cups-1.4.4) (<?php echo gtext("see the help page or leave blank if you are not sure");?>):</div>
+ <?php echo Html_Form::input('driver',$values['driver'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div>
+ <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?>
+ </div>
+
+ <?php echo $hiddenInput;?>
+
+ <input type="submit" name="<?php echo $submitName;?>" value="Save">
+
+ <div class="mandatory_fields_notice">
+ <?php echo gtext("Fields marked with <b>*</b> are mandatory");?>
+ </div>
+
+ </div>
+
+ </form>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Printers/page.php b/h-source/Application/Views/Printers/page.php
new file mode 100644
index 0000000..100cfde
--- /dev/null
+++ b/h-source/Application/Views/Printers/page.php
@@ -0,0 +1,92 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <?php if (strcmp($isDeleted,'no') === 0) { ?>
+
+ <?php
+ $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions';
+ ?>
+
+ <?php foreach ($table as $item) { ?>
+ <div class="notebooks_viewall">
+
+ <!--if revision-->
+ <?php if (strcmp($this->action,'revision') === 0) { ?>
+ <div class="revision_alert">
+ This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>.
+ </div>
+ <?php } ?>
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/printer_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span>
+ <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?>
+ <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span>
+ <?php } ?>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['vendor'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['pci_id'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("interface");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['interface'];?></b></div>
+ </div>
+
+ <div class="model_tested_on">
+ <div class="inner_label"><?php echo gtext("tested on");?>:</div>
+ <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div>
+ </div>
+
+ <div class="notebook_compatibility">
+ <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['compatibility'];?></b> <a class="open_help_window" target="blank" title="compatibility help page" href="<?php echo $this->baseUrl."/help/index/$lang#printer-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("free driver used");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['driver'];?></b></div>
+ </div>
+
+ <div class="notebook_description">
+ <div class="notebook_description_label"><?php echo gtext("Description");?>:</div>
+ <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Project/index.php b/h-source/Application/Views/Project/index.php
new file mode 100644
index 0000000..7b8140c
--- /dev/null
+++ b/h-source/Application/Views/Project/index.php
@@ -0,0 +1,29 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; h-project
+ </div>
+
+ <p>write in the file <b>Application/Views/Project/index.php</b> your project information</p>
+
+ </div>
diff --git a/h-source/Application/Views/Project/index_es.php b/h-source/Application/Views/Project/index_es.php
new file mode 100644
index 0000000..f934b0f
--- /dev/null
+++ b/h-source/Application/Views/Project/index_es.php
@@ -0,0 +1,29 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; h-project
+ </div>
+
+
+
+ </div>
diff --git a/h-source/Application/Views/Project/index_it.php b/h-source/Application/Views/Project/index_it.php
new file mode 100644
index 0000000..f934b0f
--- /dev/null
+++ b/h-source/Application/Views/Project/index_it.php
@@ -0,0 +1,29 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; h-project
+ </div>
+
+
+
+ </div>
diff --git a/h-source/Application/Views/Scanners/catalogue.php b/h-source/Application/Views/Scanners/catalogue.php
new file mode 100644
index 0000000..c988371
--- /dev/null
+++ b/h-source/Application/Views/Scanners/catalogue.php
@@ -0,0 +1,80 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="viewall_popup_menu_box_external">
+ <div class="viewall_popup_menu_box">
+ <?php echo $popup;?>
+ </div>
+ <div class="viewall_popup_menu_status">
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['vendor']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['compatibility']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['interface']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div>
+ </div>
+ </div>
+
+ <!--if no notebooks found-->
+ <?php if (strcmp($recordNumber,0) === 0) { ?>
+ <div class="viewall_no_items_found">
+ <?php echo gtext("No scanners found");?>...
+ </div>
+ <?php } ?>
+
+ <!--loop-->
+ <?php foreach ($table as $item) {?>
+ <div class="model_viewall">
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/scanner_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><?php echo $item['hardware']['vendor'];?></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("interface");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div>
+ </div>
+
+ <div class="notebook_compatibility">
+ <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div>
+ <div class="inner_value"><?php echo $item['hardware']['compatibility'];?></div>
+ </div>
+
+ <div class="notebook_view_link">
+ <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?>..</a>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($recordNumber,0) !== 0) { ?>
+ <div class="history_page_list">
+ <?php echo gtext("page list");?>: <?php echo $pageList;?>
+ </div>
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Scanners/form.php b/h-source/Application/Views/Scanners/form.php
new file mode 100644
index 0000000..78f8bcb
--- /dev/null
+++ b/h-source/Application/Views/Scanners/form.php
@@ -0,0 +1,104 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ dist_list_helper();
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+ </script>
+
+ <?php echo $notice;?>
+
+ <div class="notebooks_insert_form">
+ <form action="<?php echo $this->baseUrl."/".$this->controller."/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST">
+
+ <div class="edit_form">
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("vendor");?>:</div>
+ <?php echo Html_Form::select('vendor',$values['vendor'],Printer::$vendors,"select_entry");?>
+ <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div>
+ <?php echo Html_Form::input('model',$values['model'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>
+ <?php echo Html_Form::input('pci_id',$values['pci_id'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("year of commercialization");?></div>
+ <?php echo Html_Form::select('comm_year',$values['comm_year'],Printer::$commYear,"select_entry");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("interface");?> (<?php echo gtext("set not-specified if not sure");?>)</div>
+ <?php echo Html_Form::select('interface',$values['interface'],Printer::$interface,"select_entry");?>
+ </div>
+
+ <div class="form_entry td_with_distribution_checkboxes">
+ <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div>
+ <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?>
+ <?php echo Distributions::getFormHtml();?>
+ </div>
+
+ <div class="form_entry hidden_x_explorer">
+ <div class="entry_label"><?php echo gtext("compatibility with free software");?>:</div>
+ <?php echo Html_Form::select('compatibility',$values['compatibility'],Printer::$compatibility,"select_entry");?>
+ <a class="open_help_window" title="compatibility help page" target="blank" href="<?php echo $this->baseUrl."/help/index/$lang#scanner-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label hidden_x_explorer"><?php echo gtext("free driver used");?> (<?php echo gtext("see the help page or leave blank if you are not sure");?>):</div>
+ <?php echo Html_Form::input('driver',$values['driver'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div>
+ <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?>
+ </div>
+
+ <?php echo $hiddenInput;?>
+
+ <input type="submit" name="<?php echo $submitName;?>" value="Save">
+
+ <div class="mandatory_fields_notice">
+ <?php echo gtext("Fields marked with <b>*</b> are mandatory");?>
+ </div>
+
+ </div>
+
+ </form>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Scanners/page.php b/h-source/Application/Views/Scanners/page.php
new file mode 100644
index 0000000..411fe6d
--- /dev/null
+++ b/h-source/Application/Views/Scanners/page.php
@@ -0,0 +1,92 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <?php if (strcmp($isDeleted,'no') === 0) { ?>
+
+ <?php
+ $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions';
+ ?>
+
+ <?php foreach ($table as $item) { ?>
+ <div class="notebooks_viewall">
+
+ <!--if revision-->
+ <?php if (strcmp($this->action,'revision') === 0) { ?>
+ <div class="revision_alert">
+ This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>.
+ </div>
+ <?php } ?>
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/scanner_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span>
+ <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?>
+ <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span>
+ <?php } ?>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['vendor'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['pci_id'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("interface");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['interface'];?></b></div>
+ </div>
+
+ <div class="model_tested_on">
+ <div class="inner_label"><?php echo gtext("tested on");?>:</div>
+ <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div>
+ </div>
+
+ <div class="notebook_compatibility">
+ <div class="inner_label"><?php echo gtext("compatibility with free software");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['compatibility'];?></b> <a class="open_help_window" target="blank" title="compatibility help page" href="<?php echo $this->baseUrl."/help/index/$lang#scanner-compatibility";?>"><img class="top_left_images_help" src="<?php echo $this->baseUrl;?>/Public/Img/Acun/help_hint.png"></a></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("free driver used");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['driver'];?></b></div>
+ </div>
+
+ <div class="notebook_description">
+ <div class="notebook_description_label"><?php echo gtext("Description");?>:</div>
+ <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Search/form.php b/h-source/Application/Views/Search/form.php
new file mode 100644
index 0000000..ab25d9e
--- /dev/null
+++ b/h-source/Application/Views/Search/form.php
@@ -0,0 +1,72 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ $(".search_form table").append("<tr><td><input id=\"search_action_input\" type=\"submit\" name=\"action\" value=\"search\"></td></tr>");
+
+ $("#search_action_input").click(function(){
+
+ var s_type = $("#search_type_input").attr("value");
+ var s_model = $("#search_model_input").attr("value");
+ var s_action = $("#search_action_input").attr("value");
+
+ var s_url = "1/" + s_action + "/" + s_type + "/" + s_model;
+
+ location.href="<?php echo $this->baseUrl."/search/results/$lang/";?>"+s_url;
+ return false;
+ });
+
+ });
+
+ </script>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; search form
+ </div>
+
+ <div class="notebook_view_title">
+ Search one device in the archive:
+ </div>
+
+ <div class="search_form">
+
+
+ <form method="GET">
+ <table>
+ <tr>
+ <td>hardware type:</td>
+ <td><?php echo Html_Form::select('type','',MyStrings::getTypes(),"select_entry","search_type_input");?></td>
+ </tr>
+ <tr>
+ <td>the model name contains:</td>
+ <td><?php echo Html_Form::input('model','','input_entry_search',"search_model_input");?></td>
+ </tr>
+ </table>
+ </form>
+
+
+ </div>
+
+ </div>
diff --git a/h-source/Application/Views/Search/form_es.php b/h-source/Application/Views/Search/form_es.php
new file mode 100644
index 0000000..f58a125
--- /dev/null
+++ b/h-source/Application/Views/Search/form_es.php
@@ -0,0 +1,72 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ $(".search_form table").append("<tr><td><input id=\"search_action_input\" type=\"submit\" name=\"action\" value=\"search\"></td></tr>");
+
+ $("#search_action_input").click(function(){
+
+ var s_type = $("#search_type_input").attr("value");
+ var s_model = $("#search_model_input").attr("value");
+ var s_action = $("#search_action_input").attr("value");
+
+ var s_url = "1/" + s_action + "/" + s_type + "/" + s_model;
+
+ location.href="<?php echo $this->baseUrl."/search/results/$lang/";?>"+s_url;
+ return false;
+ });
+
+ });
+
+ </script>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; search form
+ </div>
+
+ <div class="notebook_view_title">
+ Busque un dispositivo en el archivo::
+ </div>
+
+ <div class="search_form">
+
+
+ <form method="GET">
+ <table>
+ <tr>
+ <td>tipo de hardware:</td>
+ <td><?php echo Html_Form::select('type','',MyStrings::getTypes(),"select_entry","search_type_input");?></td>
+ </tr>
+ <tr>
+ <td>el nombre del modelo contiene:</td>
+ <td><?php echo Html_Form::input('model','','input_entry_search',"search_model_input");?></td>
+ </tr>
+ </table>
+ </form>
+
+
+ </div>
+
+ </div>
diff --git a/h-source/Application/Views/Search/form_it.php b/h-source/Application/Views/Search/form_it.php
new file mode 100644
index 0000000..4d89477
--- /dev/null
+++ b/h-source/Application/Views/Search/form_it.php
@@ -0,0 +1,72 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ $(".search_form table").append("<tr><td><input id=\"search_action_input\" type=\"submit\" name=\"action\" value=\"search\"></td></tr>");
+
+ $("#search_action_input").click(function(){
+
+ var s_type = $("#search_type_input").attr("value");
+ var s_model = $("#search_model_input").attr("value");
+ var s_action = $("#search_action_input").attr("value");
+
+ var s_url = "1/" + s_action + "/" + s_type + "/" + s_model;
+
+ location.href="<?php echo $this->baseUrl."/search/results/$lang/";?>"+s_url;
+ return false;
+ });
+
+ });
+
+ </script>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; search form
+ </div>
+
+ <div class="notebook_view_title">
+ Cerca un dispositivo nell'archivio:
+ </div>
+
+ <div class="search_form">
+
+
+ <form method="GET">
+ <table>
+ <tr>
+ <td>tipo di hardware:</td>
+ <td><?php echo Html_Form::select('type','',MyStrings::getTypes(),"select_entry","search_type_input");?></td>
+ </tr>
+ <tr>
+ <td>il nome del modello contiene:</td>
+ <td><?php echo Html_Form::input('model','','input_entry_search',"search_model_input");?></td>
+ </tr>
+ </table>
+ </form>
+
+
+ </div>
+
+ </div>
diff --git a/h-source/Application/Views/Search/results.php b/h-source/Application/Views/Search/results.php
new file mode 100644
index 0000000..48c4f8b
--- /dev/null
+++ b/h-source/Application/Views/Search/results.php
@@ -0,0 +1,66 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/search/form/$lang";?>">search form</a> &raquo; results
+ </div>
+
+ <div class="notebook_view_title">
+ <?php echo gtext("Results of the search");?>:
+ </div>
+
+ <div class="search_form">
+ <?php
+ $count = 0;
+ foreach ($table as $row) {
+ $count++;
+ ?>
+
+ <div class="search_result_item">
+ <div>
+ <?php echo gtext("model name");?>: <b><a href="<?php echo $this->baseUrl."/".MyStrings::$reverse[$row['hardware']['type']]."/view/$lang/".$row['hardware']['id_hard']."/".$row['hardware']['model'];?>"><?php echo $row['hardware']['model'];?></a></b>
+ </div>
+ <div>
+ <?php echo gtext("model type");?>: <b><?php echo $row['hardware']['type'];?></b>
+ </div>
+ <div>
+ <?php echo gtext("year of commercialization");?>: <b><?php echo $row['hardware']['comm_year'];?></b>
+ </div>
+ </div>
+
+ <?php } ?>
+
+ <?php if ($count === 0) { ?>
+ <div class="search_result_item">
+ <?php echo gtext("No devices found");?>..
+ </div>
+ <?php } ?>
+
+ </div>
+
+ <?php if (strcmp($recordNumber,0) !== 0) { ?>
+ <div class="history_page_list">
+ <?php echo gtext("page list");?>: <?php echo $pageList;?>
+ </div>
+ <?php } ?>
+
+ </div>
diff --git a/h-source/Application/Views/Users/add.php b/h-source/Application/Views/Users/add.php
new file mode 100755
index 0000000..0b8aabc
--- /dev/null
+++ b/h-source/Application/Views/Users/add.php
@@ -0,0 +1,70 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; create account
+ </div>
+
+ <div class="new_account_title">
+ Create new account
+ </div>
+
+ <?php echo $notice;?>
+
+ <form class='formClass' action='<?php echo $this->baseUrl."/users/add/$lang";?>' method='POST'>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>choose the username:</span>
+ <?php echo Html_Form::input('username',$values['username']);?>
+ </div>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>your e-mail address (necessary to confirm the registration):</span>
+ <?php echo Html_Form::input('e_mail',$values['e_mail']);?>
+ </div>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>choose the password:</span>
+ <?php echo Html_Form::password('password',$values['password']);?>
+ </div>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>confirm your password:</span>
+ <?php echo Html_Form::password('confirmation',$values['confirmation']);?>
+ </div>
+
+ <div class="captcha_box">
+ <img src="<?php echo $this->baseUrl?>/image/captcha">
+ </div>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>write the code above:</span>
+ <input type="input" name="captcha" value="">
+ </div>
+
+ <div class='inputEntry'>
+ <input id='insertAction' type='submit' name='insertAction' value='create account'>
+ </div>
+
+ </form>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/change.php b/h-source/Application/Views/Users/change.php
new file mode 100644
index 0000000..623d647
--- /dev/null
+++ b/h-source/Application/Views/Users/change.php
@@ -0,0 +1,28 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="confirm_notice">
+ <p>The link has expired</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/confirmation.php b/h-source/Application/Views/Users/confirmation.php
new file mode 100644
index 0000000..f1a2074
--- /dev/null
+++ b/h-source/Application/Views/Users/confirmation.php
@@ -0,0 +1,42 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; confirmation
+ </div>
+
+ <?php if ($status_confirm) { ?>
+
+ <div class="confirm_notice">
+ <p>The account has been confirmed successfully!</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else { ?>
+
+ <div class="confirm_notice">
+ <p>The confirmation link has expired</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } ?>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/contributions.php b/h-source/Application/Views/Users/contributions.php
new file mode 100644
index 0000000..2d5995a
--- /dev/null
+++ b/h-source/Application/Views/Users/contributions.php
@@ -0,0 +1,50 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/users/meet/$lang/$meet_username";?>">meet <b><?php echo $meet_username;?></b></a> &raquo; contributions
+ </div>
+
+ <div class="contrib_explain_box">
+ contributions of <?php echo $meet_username;?>
+ </div>
+
+ <div class="external_users_contrib">
+ <?php foreach ($table as $item) {?>
+ <div class="users_contrib_item">
+
+ <div class="contribution_item">
+ <?php
+
+ $name = $item['hardware']['model'];
+ $type = $item['hardware']['type'];
+ $id_hard = $item['hardware']['id_hard'];
+
+ ?>
+ <?php echo $type;?> <a href="<?php echo $this->baseUrl."/".MyStrings::$reverse[$type]."/view/$lang/$id_hard/".encodeUrl($name);?>"><?php echo $name;?></a>
+ </div>
+
+ </div>
+ <?php } ?>
+ </div>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/forgot.php b/h-source/Application/Views/Users/forgot.php
new file mode 100644
index 0000000..a4c7d20
--- /dev/null
+++ b/h-source/Application/Views/Users/forgot.php
@@ -0,0 +1,55 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; request new password
+ </div>
+
+ <div class="new_account_title">
+ Request new password
+ </div>
+
+ <?php echo $notice;?>
+
+ <form class='formClass' action='<?php echo $this->currPage."/$lang";?>' method='POST'>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>write your username:</span>
+ <input type="input" name="username" value="">
+ </div>
+
+ <div class="captcha_box">
+ <img src="<?php echo $this->baseUrl?>/image/captcha">
+ </div>
+
+ <div class='formEntry'>
+ <span class='entryLabel'>write the code above:</span>
+ <input type="input" name="captcha" value="">
+ </div>
+
+ <div class='inputEntry'>
+ <input id='insertAction' type='submit' name='forgotAction' value='send e-mail'>
+ </div>
+
+ </form>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/login.php b/h-source/Application/Views/Users/login.php
new file mode 100755
index 0000000..5998751
--- /dev/null
+++ b/h-source/Application/Views/Users/login.php
@@ -0,0 +1,57 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <?php if ( strcmp($updating_flag,'no') === 0 ) { ?>
+
+ <?php if (isset($flag)) { ?>
+ <div class="login_note">
+ Sorry.. you have to be logged if you want to insert a new device in the archive or modify an existing one..
+ </div>
+ <?php } ?>
+
+ <?php echo $notice; ?>
+
+ <div class="login_box">
+ <form action = '<?php echo $action;?>' method = 'POST'>
+
+ <table>
+ <tr>
+ <td>Username</td>
+ <td><input class="login_username_input" type='text' name='username'></td>
+ </tr>
+ <tr>
+ <td>Password</td>
+ <td><input class="login_username_input" type='password' name='password'></td>
+ </tr>
+ <tr>
+ <td><input type = 'submit' value = 'login'></td>
+ </tr>
+ </table>
+
+ </form>
+ </div>
+
+ <?php } else { ?>
+
+ <div class="login_note">
+ Sorry, we are updating the website... it is no possible to log-in, register new accounts or request a new password. You will be able to log-in or create a new account as soon as possible. Thanks!
+ </div>
+
+ <?php } ?>
diff --git a/h-source/Application/Views/Users/logout.php b/h-source/Application/Views/Users/logout.php
new file mode 100755
index 0000000..39b5873
--- /dev/null
+++ b/h-source/Application/Views/Users/logout.php
@@ -0,0 +1,25 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="logout_box">
+ <div><?php echo $notice;?></div>
+
+ <div><a href="<?php echo $this->baseUrl."/users/login/$lang";?>">login</a></div>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/meet.php b/h-source/Application/Views/Users/meet.php
new file mode 100644
index 0000000..ee0c708
--- /dev/null
+++ b/h-source/Application/Views/Users/meet.php
@@ -0,0 +1,89 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; meet <b><?php echo $meet_username;?></b>
+ </div>
+
+ <div class="meet_contrib_link">
+ <u>Public profile of <?php echo $meet_username;?></u>. See all <a href="<?php echo $this->baseUrl."/users/contributions/$lang/$meet_username";?>"><b><?php echo $meet_username;?></b> contributions</a>
+ </div>
+
+ <?php foreach ($table as $item) {?>
+ <div class="users_meet_box">
+
+ <div class="meet_item">
+ <div class="meet_item_inner">Username:</div> <?php echo $item['regusers']['username'];?>
+ </div>
+
+ <?php if (strcmp($item['profile']['website'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">My website:</div> <?php echo vitalizeUrl($item['profile']['website']);?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['real_name'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">My real name is:</div> <?php echo $item['profile']['real_name'];?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['publish_mail'],'yes') === 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">My e-mail address:</div> <?php echo $item['regusers']['e_mail'];?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['where_you_are'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">I'm from:</div> <?php echo $item['profile']['where_you_are'];?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['birth_date'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">Birthdate:</div> <?php echo $item['profile']['birth_date'];?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['fav_distro'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">My favourite distro is:</div> <?php echo $item['profile']['fav_distro'];?>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['projects'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">Projects I'm working on:</div> <div><?php echo nl2br($item['profile']['projects']);?></div>
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($item['profile']['description'],'') !== 0) { ?>
+ <div class="meet_item">
+ <div class="meet_item_inner">My description:</div> <div><?php echo nl2br($item['profile']['description']);?></div>
+ </div>
+ <?php } ?>
+
+ </div>
+ <?php } ?>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Users/notice.php b/h-source/Application/Views/Users/notice.php
new file mode 100644
index 0000000..d556363
--- /dev/null
+++ b/h-source/Application/Views/Users/notice.php
@@ -0,0 +1,94 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; notice
+ </div>
+
+ <?php if ( isset($_SESSION['status']) ) { ?>
+
+ <?php if ( strcmp($_SESSION['status'],'sent') === 0 ) { ?>
+ <div class="confirm_notice">
+ <p>An e-mail has been sent to your mailbox.</p>
+ <p>If you have received no mail, then check inside the spam too</p>
+ <p>Click on the confirmation link in the e-mail in order to confirm the registration of the new account.</p>
+ <p>The confirmation link will expire in a hour.</p>
+ <p>If you don't want to confirm the account registration then wait one hour and your username and e-mail will be deleted from the database.</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'regerror') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>Registration failed</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'sent_new') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>An e-mail has been sent to your mailbox.</p>
+ <p>If you have received no mail, then check inside the spam too</p>
+ <p>Click on the confirmation link in the e-mail in order to change the password of your account.</p>
+ <p>The confirmation link will expire in a hour.</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'sent_new_error') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>Registration failed</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'sent_new_password') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>The new password has been sent to you by mail!</p>
+ <p>If you have received no mail, then check inside the spam too</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'sent_new_password_error') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>Operation failed</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } else if (strcmp($_SESSION['status'],'deleted') === 0) { ?>
+
+ <div class="confirm_notice">
+ <p>Your account has been successfully deleted</p>
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } ?>
+
+ <?php } else { ?>
+
+ <div class="confirm_notice">
+ <p>go to the <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">homepage</a></p>
+ </div>
+
+ <?php } ?>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Videocards/catalogue.php b/h-source/Application/Views/Videocards/catalogue.php
new file mode 100644
index 0000000..0fbe2be
--- /dev/null
+++ b/h-source/Application/Views/Videocards/catalogue.php
@@ -0,0 +1,79 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="viewall_popup_menu_box_external">
+ <div class="viewall_popup_menu_box">
+ <?php echo $popup;?>
+ </div>
+ <div class="viewall_popup_menu_status">
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['vendor']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['interface']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div>
+ </div>
+ </div>
+
+ <!--if no notebooks found-->
+ <?php if (strcmp($recordNumber,0) === 0) { ?>
+ <div class="viewall_no_items_found">
+ <?php echo gtext("No video cards found");?>..
+ </div>
+ <?php } ?>
+
+ <!--loop-->
+ <?php foreach ($table as $item) {?>
+ <div class="model_viewall">
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/Crystal/1282042976_hardware.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><?php echo $item['hardware']['vendor'];?></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("interface");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("how does it work with free software?");?></div>
+ <div class="inner_value"><b><?php echo Videocard::$videoReverse[$item['hardware']['video_card_works']];?></b></div>
+ </div>
+
+ <div class="notebook_view_link">
+ <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?>..</a>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($recordNumber,0) !== 0) { ?>
+ <div class="history_page_list">
+ <?php echo gtext("page list");?>: <?php echo $pageList;?>
+ </div>
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Videocards/form.php b/h-source/Application/Views/Videocards/form.php
new file mode 100644
index 0000000..25f33b7
--- /dev/null
+++ b/h-source/Application/Views/Videocards/form.php
@@ -0,0 +1,98 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ dist_list_helper();
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+ </script>
+
+ <?php echo $notice;?>
+
+ <div class="notebooks_insert_form">
+ <form action="<?php echo $this->baseUrl."/".$this->controller."/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST">
+
+ <div class="edit_form">
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("vendor");?>:</div>
+ <?php echo Html_Form::select('vendor',$values['vendor'],Videocard::$vendors,"select_entry");?>
+ <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div>
+ <?php echo Html_Form::input('model',$values['model'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>
+ <?php echo Html_Form::input('pci_id',$values['pci_id'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("year of commercialization");?></div>
+ <?php echo Html_Form::select('comm_year',$values['comm_year'],Notebooks::$commYear,"select_entry");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("interface");?> (<?php echo gtext("set not-specified if not sure");?>)</div>
+ <?php echo Html_Form::select('interface',$values['interface'],Videocard::$interface,"select_entry");?>
+ </div>
+
+ <div class="form_entry td_with_distribution_checkboxes">
+ <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div>
+ <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?>
+ <?php echo Distributions::getFormHtml();?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("how does it work with free software?");?></div>
+ <?php echo Html_Form::select('video_card_works',$values['video_card_works'],Videocard::$videoSelect,"select_entry hidden_x_explorer");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div>
+ <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?>
+ </div>
+
+ <?php echo $hiddenInput;?>
+
+ <input type="submit" name="<?php echo $submitName;?>" value="Save">
+
+ <div class="mandatory_fields_notice">
+ <?php echo gtext("Fields marked with <b>*</b> are mandatory");?>
+ </div>
+
+ </div>
+
+ </form>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Videocards/page.php b/h-source/Application/Views/Videocards/page.php
new file mode 100644
index 0000000..5ae071c
--- /dev/null
+++ b/h-source/Application/Views/Videocards/page.php
@@ -0,0 +1,87 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <?php if (strcmp($isDeleted,'no') === 0) { ?>
+
+ <?php
+ $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions';
+ ?>
+
+ <?php foreach ($table as $item) { ?>
+ <div class="notebooks_viewall">
+
+ <!--if revision-->
+ <?php if (strcmp($this->action,'revision') === 0) { ?>
+ <div class="revision_alert">
+ This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>.
+ </div>
+ <?php } ?>
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/Crystal/1282042976_hardware.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span>
+ <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?>
+ <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span>
+ <?php } ?>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['vendor'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['pci_id'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("interface");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div>
+ </div>
+
+ <div class="model_tested_on">
+ <div class="inner_label"><?php echo gtext("tested on");?>:</div>
+ <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("how does it work with free software?");?></div>
+ <div class="inner_value"><b><?php echo Videocard::$videoReverse[$item[$tableName]['video_card_works']];?></b></div>
+ </div>
+
+ <div class="notebook_description">
+ <div class="notebook_description_label"><?php echo gtext("Description");?>:</div>
+ <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Wifi/catalogue.php b/h-source/Application/Views/Wifi/catalogue.php
new file mode 100644
index 0000000..df03820
--- /dev/null
+++ b/h-source/Application/Views/Wifi/catalogue.php
@@ -0,0 +1,80 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="viewall_popup_menu_box_external">
+ <div class="viewall_popup_menu_box">
+ <?php echo $popup;?>
+ </div>
+ <div class="viewall_popup_menu_status">
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['vendor']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['comm_year']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['wifi_works']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['interface']?></div>
+ <div class="viewall_popup_menu_status_item"><?php echo $this->viewArgs['sort-by']?></div>
+ </div>
+ </div>
+
+ <!--if no notebooks found-->
+ <?php if (strcmp($recordNumber,0) === 0) { ?>
+ <div class="viewall_no_items_found">
+ <?php echo gtext("No wifi cards found");?>..
+ </div>
+ <?php } ?>
+
+ <!--loop-->
+ <?php foreach ($table as $item) {?>
+ <div class="model_viewall">
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/network-wireless_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item['hardware']['model'];?></b></span>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><?php echo $item['hardware']['vendor'];?></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("interface");?>:</div>
+ <div class="inner_value"><b><?php echo $item['hardware']['interface'];?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("does it work with free software?");?></div>
+ <div class="inner_value"><b><?php echo $item['hardware']['wifi_works'];?></b></div>
+ </div>
+
+ <div class="notebook_view_link">
+ <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$item['hardware']['id_hard'].'/'.encodeUrl($item['hardware']['model']).$this->viewStatus;?>"><?php echo gtext("view the other specifications");?>..</a>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php if (strcmp($recordNumber,0) !== 0) { ?>
+ <div class="history_page_list">
+ <?php echo gtext("page list");?>: <?php echo $pageList;?>
+ </div>
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/Wifi/form.php b/h-source/Application/Views/Wifi/form.php
new file mode 100644
index 0000000..c955d26
--- /dev/null
+++ b/h-source/Application/Views/Wifi/form.php
@@ -0,0 +1,98 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ dist_list_helper();
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+ </script>
+
+ <?php echo $notice;?>
+
+ <div class="notebooks_insert_form">
+ <form action="<?php echo $this->baseUrl."/".$this->controller."/".$this->action."/$lang/$token".$this->viewStatus;?>" method="POST">
+
+ <div class="edit_form">
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("vendor");?>:</div>
+ <?php echo Html_Form::select('vendor',$values['vendor'],Wifi::$vendors,"select_entry");?>
+ <a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Vendor not present?</a>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("model name");?>: <b>*</b></div>
+ <?php echo Html_Form::input('model',$values['model'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>
+ <?php echo Html_Form::input('pci_id',$values['pci_id'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("year of commercialization");?></div>
+ <?php echo Html_Form::select('comm_year',$values['comm_year'],Notebooks::$commYear,"select_entry");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("interface");?> (<?php echo gtext("set not-specified if not sure");?>)</div>
+ <?php echo Html_Form::select('interface',$values['interface'],Wifi::$interface,"select_entry");?>
+ </div>
+
+ <div class="form_entry td_with_distribution_checkboxes">
+ <div class="entry_label"><?php echo gtext("GNU/Linux distribution used for the test");?>: <b>*</b></div>
+ <?php echo Html_Form::input('distribution',$values['distribution'],'input_entry input_distribution');?>
+ <?php echo Distributions::getFormHtml();?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <?php echo Html_Form::input('kernel',$values['kernel'],'input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label hidden_x_explorer"><?php echo gtext("does it work with free software?");?></div>
+ <?php echo Html_Form::select('wifi_works',$values['wifi_works'],Wifi::$wifiSelect,"select_entry hidden_x_explorer");?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label"><?php echo gtext("Description: (write here all the useful information)");?><br /><a href="<?php echo $this->baseUrl."/help/index/$lang#wiki-syntax";?>"><?php echo gtext("discover all the wiki tags");?></a></div>
+ <?php echo Html_Form::textarea('description',$values['description'],'textarea_entry','bb_code');?>
+ </div>
+
+ <?php echo $hiddenInput;?>
+
+ <input type="submit" name="<?php echo $submitName;?>" value="Save">
+
+ <div class="mandatory_fields_notice">
+ <?php echo gtext("Fields marked with <b>*</b> are mandatory");?>
+ </div>
+
+ </div>
+
+ </form>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/Wifi/page.php b/h-source/Application/Views/Wifi/page.php
new file mode 100644
index 0000000..40696dc
--- /dev/null
+++ b/h-source/Application/Views/Wifi/page.php
@@ -0,0 +1,87 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <?php if (strcmp($isDeleted,'no') === 0) { ?>
+
+ <?php
+ $tableName = (strcmp($this->action,'view') === 0) ? 'hardware' : 'revisions';
+ ?>
+
+ <?php foreach ($table as $item) { ?>
+ <div class="notebooks_viewall">
+
+ <!--if revision-->
+ <?php if (strcmp($this->action,'revision') === 0) { ?>
+ <div class="revision_alert">
+ This is an old revision of this page, as edited by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b> at <b><?php echo smartDate($update_date); ?></b>. It may differ significantly from the <a href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id_hard/".$name.$this->viewStatus;?>">current revision</a>.
+ </div>
+ <?php } ?>
+
+ <div class="notebook_model">
+ <img align="top" class="catalogue_item_icon" src="<?php echo $this->baseUrl."/Public/Img/H2O/network-wireless_22.png";?>"> <span class="span_model_name"><?php echo gtext("model");?>: <b><?php echo $item[$tableName]['model'];?></b><span class="model_id">(<?php echo gtext("model id");?>: <?php echo $id_hard;?>)</span></span>
+ <?php if (strcmp($islogged,'yes') === 0 and strcmp($this->action,'view') === 0) { ?>
+ <span class="ask_for_removal_class"><a class="ask_for_removal_class_link" href="<?php echo $this->baseUrl;?>">ask for removal</a></span>
+ <?php } ?>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("vendor");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['vendor'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['pci_id'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("year of commercialization");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['comm_year'];?></b></div>
+ </div>
+
+ <div class="notebook_vendor">
+ <div class="inner_label"><?php echo gtext("interface");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['interface'];?></b></div>
+ </div>
+
+ <div class="model_tested_on">
+ <div class="inner_label"><?php echo gtext("tested on");?>:</div>
+ <div class="inner_value"><b><?php echo Distributions::getName($item[$tableName]['distribution']);?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("tested with the following kernel libre");?>:</div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['kernel'];?></b></div>
+ </div>
+
+ <div class="notebook_kernel">
+ <div class="inner_label"><?php echo gtext("does it work with free software?");?></div>
+ <div class="inner_value"><b><?php echo $item[$tableName]['wifi_works'];?></b></div>
+ </div>
+
+ <div class="notebook_description">
+ <div class="notebook_description_label"><?php echo gtext("Description");?>:</div>
+ <div class="notebook_description_value"><?php echo decodeWikiText($item[$tableName]['description']);?></div>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/bottom_left.php b/h-source/Application/Views/bottom_left.php
new file mode 100644
index 0000000..438fe0f
--- /dev/null
+++ b/h-source/Application/Views/bottom_left.php
@@ -0,0 +1,27 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <?php if (strcmp($this->action,'talk') !== 0) { ?>
+ <div class="bottom_licence_notice">
+ The contents of this page are in the Public Domain. (see the <a href="http://creativecommons.org/publicdomain/zero/1.0/">CC0 page</a> 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.
+ </div>
+ <?php } ?>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/climb.php b/h-source/Application/Views/climb.php
new file mode 100644
index 0000000..f947cd5
--- /dev/null
+++ b/h-source/Application/Views/climb.php
@@ -0,0 +1,35 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="notebooks_viewall">
+
+ <?php echo $notice;?>
+
+ <div class="climb_form_ext_box">
+
+ <?php if (strcmp($isDeleted,'no') === 0 ) { ?>
+ <form action="<?php echo $this->currPage."/$lang/$id_rev/$token".$this->viewStatus;?>" method="POST">
+ I want to make this revision the current revision: <input type="submit" name="confirmAction" value="confirm">
+ </form>
+ <?php } ?>
+
+ </div>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/dialog.php b/h-source/Application/Views/dialog.php
new file mode 100644
index 0000000..537e527
--- /dev/null
+++ b/h-source/Application/Views/dialog.php
@@ -0,0 +1,100 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+<script type="text/javascript">
+
+ $(function(){
+
+ $("#dialog-form").css("display","block");
+
+ $('#notice_dialog').dialog({
+ autoOpen: false,
+ width: 500
+ });
+
+ // Dialog
+ $('#dialog-form').dialog({
+ autoOpen: false,
+ width: 500,
+ buttons: {
+ "Send": function() {
+
+ var d_id_hard = $(".dialod_hidden_id_hard").attr("value");
+ var d_object = encodeURIComponent($("#object").attr("value"));
+ var d_message = encodeURIComponent($("#message").attr("value"));
+ var d_id_duplicate = encodeURIComponent($("#id_duplicate").attr("value"));
+
+ $.ajax({
+ type: "POST",
+ url: "<?php echo $this->baseUrl.'/generic/del/'.$lang.'/'.$token;?>",
+ data: "id_hard="+d_id_hard+"&object="+d_object+"&message="+d_message+"&id_duplicate="+d_id_duplicate+"&insertAction=save",
+ async: false,
+ cache:false,
+ dataType: "html",
+ success: function(html){
+ $(".notice_dialog_inner").text(html);
+ $('#notice_dialog').dialog('open');
+ }
+ });
+
+ $(this).dialog("close");
+ },
+ "Cancel": function() {
+ $(this).dialog("close");
+ }
+ }
+ });
+
+ // Dialog Link
+ $('.ask_for_removal_class_link').click(function(){
+ $('#dialog-form').dialog('open');
+ return false;
+ });
+
+ });
+</script>
+
+
+<div id="dialog-form" title="Ask for the removal of this device">
+<!-- <p class="validateTips">Ask for removal:</p> -->
+ <form>
+ <table>
+ <tr>
+ <td><label for="object">why?</label></td>
+ <td><?php echo Html_Form::select('object','duplicated','duplication,other',null,"object");?></td>
+ </tr>
+ <tr>
+ <td><label for="message">message</label></td>
+ <td><textarea name="message" id="message">Write here your message..</textarea></td>
+ </tr>
+ <tr>
+ <td><label for="id_duplicate">duplicated model (write the id)</label></td>
+ <td><input type="text" id="id_duplicate" type="hidden" name="id_duplicate" value=""></td>
+ </tr>
+ <input class="dialod_hidden_id_hard" type="hidden" name="id_hard" value="<?php echo $id_hard;?>">
+ </table>
+ </form>
+</div>
+
+<div id="notice_dialog" title="Notice:">
+ <div class="notice_dialog_inner">
+
+ </div>
+</div> \ No newline at end of file
diff --git a/h-source/Application/Views/differences.php b/h-source/Application/Views/differences.php
new file mode 100644
index 0000000..7e3862e
--- /dev/null
+++ b/h-source/Application/Views/differences.php
@@ -0,0 +1,43 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="notebooks_viewall">
+
+ <div class="diff_color_notice">
+ <b>Notice</b>: the text in <del>red</del> has been deleted from the previous revision, the text in <ins>green</ins> has been added in this revision and the text in <span class="gray_text_notice">gray</span> has not been changed.
+ </div>
+
+ <?php foreach ($diffArray as $label => $text) { ?>
+
+ <div class="diff_ext_box">
+
+ <div class="diff_item_label">
+ <?php echo gtext("differences in the entry");?>: <b><?php echo $label;?></b>
+ </div>
+
+ <div class="diff_item_text">
+ <?php echo in_array($label,$fieldsWithBreaks) ? nl2br($text) : $text;?>
+ </div>
+
+ </div>
+
+ <?php } ?>
+
+ </div>
diff --git a/h-source/Application/Views/footer.php b/h-source/Application/Views/footer.php
new file mode 100644
index 0000000..aeadbe1
--- /dev/null
+++ b/h-source/Application/Views/footer.php
@@ -0,0 +1,38 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="footer">
+ <div class="copyright_notice_box">
+ The <a href="<?php echo $this->baseUrl."/project/index/$lang";?>"><?php echo Website::$projectName;?></a> Project
+ </div>
+
+ <div class="footer_credits_box">
+ <a href="<?php echo $this->baseUrl."/credits/index/$lang";?>">credits</a>
+ </div>
+
+ <div class="footer_credits_box">
+ <a href="<?php echo $this->baseUrl."/contact/index/$lang";?>">contact</a>
+ </div>
+ </div> <!--fine footer-->
+
+</div> <!--fine container-->
+
+</body>
+</html>
diff --git a/h-source/Application/Views/header.php b/h-source/Application/Views/header.php
new file mode 100644
index 0000000..83aa59d
--- /dev/null
+++ b/h-source/Application/Views/header.php
@@ -0,0 +1,78 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//IT">
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+<?php $u = new UsersModel();?>
+<html>
+<head>
+
+ <title><?php echo $title;?></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <meta name="description" content="free software project with the aim of collecting informations about the hardware that work with a fully free operating system" />
+ <meta name="keywords" content="free software GNU Linux distribution hardware wiki users freedom" />
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl?>/Public/Css/website.css">
+ <link rel="Shortcut Icon" href="<?php echo $this->baseUrl?>/Public/Img/tab_icon_2.ico" type="image/x-icon">
+
+
+ <!--[if IE]>
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl?>/Public/Css/explorer.css">
+ <![endif] -->
+
+ <script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/jquery/jquery-1.4.2.min.js"></script>
+ <script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/functions.js"></script>
+
+ <!--markitup-->
+ <script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/markitup/jquery.markitup.js"></script>
+ <script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/markitup/sets/bbcode/set.js"></script>
+
+ <!-- markItUp! skin -->
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl;?>/Public/Js/markitup/skins/simple/style.css" />
+ <!-- markItUp! toolbar skin -->
+ <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl;?>/Public/Js/markitup/sets/bbcode/style.css" />
+
+ <!-- jQuery ui dialog -->
+ <link rel="stylesheet" href="<?php echo $this->baseUrl;?>/Public/Js/jquery/dialog/css/excite-bike/jquery-ui-1.8.4.custom.css" rel="stylesheet" />
+ <script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/jquery/dialog/js/jquery-ui-1.8.4.custom.min.js"></script>
+
+ <script type="text/javascript">
+
+ var base_url = "<?php echo $this->baseUrl;?>";
+ var curr_lang = "<?php echo $lang;?>";
+ var csrf_token = "<?php echo $token;?>";
+
+ </script>
+
+</head>
+<body>
+
+
+<div id="external_header">
+ <div id="header">
+ <img src="<?php echo $this->baseUrl;?>/Public/Img/title.png">
+ </div>
+</div>
+
+<div id="top_menu_external">
+ <div id="top_menu">
+ <ul>
+ <li<?php echo $tm['home']; ?>><a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a></li><li<?php echo $tm['hardware']; ?>><a href="<?php echo $this->baseUrl."/hardware/catalogue/$lang";?>">Hardware</a></li><li<?php echo $tm['issues']; ?>><a href="<?php echo $this->baseUrl."/issues/viewall/$lang/1/$token";?>">Issues</a></li><li<?php echo $tm['search']; ?>><a href="<?php echo $this->baseUrl."/search/form/$lang";?>">Search</a></li><li<?php echo $tm['news']; ?>><a href="<?php echo $this->baseUrl."/news/index/$lang";?>">News</a></li><li<?php echo $tm['download']; ?>><a href="<?php echo $this->baseUrl."/download/index/$lang";?>">Download</a></li><li<?php echo $tm['help']; ?>><a href="<?php echo $this->baseUrl."/help/index/$lang";?>">Help</a></li>
+ </ul>
+ </div>
+</div>
+
+<div id="container">
diff --git a/h-source/Application/Views/history.php b/h-source/Application/Views/history.php
new file mode 100644
index 0000000..4edd41b
--- /dev/null
+++ b/h-source/Application/Views/history.php
@@ -0,0 +1,53 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="notebooks_viewall">
+
+ <ul class="page_history">
+
+ <?php if ($this->viewArgs['history_page'] === 1) { ?>
+ <?php foreach ($rev1 as $rev) { ?>
+ <li class="page_history_current_item"><b>Current revision:</b> <?php echo smartDate($rev['hardware']['update_date']);?> by <?php echo getLinkToUser($u->getUser($rev['hardware']['updated_by']));?> (<a href="<?php echo $this->baseUrl."/".$this->controller."/differences/$lang/$id/0".$this->viewStatus;?>">diff</a>)</li>
+ <?php } ?>
+ <?php } ?>
+
+ <?php foreach ($rev2 as $rev) { ?>
+ <li class="page_history_item">
+
+ <a href="<?php echo $this->baseUrl."/".$this->controller."/revision/$lang/".$rev['revisions']['id_rev'].$this->viewStatus;?>"><?php echo smartDate($rev['revisions']['update_date']);?></a> by <?php echo getLinkToUser($u->getUser($rev['revisions']['updated_by']));?>
+
+ <?php if (strcmp($rev['revisions']['id_rev'],$firstRev) !== 0) {?>
+ (<a href="<?php echo $this->baseUrl."/".$this->controller."/differences/$lang/$id/".$rev['revisions']['id_rev'].$this->viewStatus;?>">diff</a>)
+ <?php } ?>
+
+ <?php if ($islogged === 'yes') { ?>
+ (<a href="<?php echo $this->baseUrl.'/'.$this->controller.'/climb/'.$lang.'/'.$rev['revisions']['id_rev'].'/'.$token.$this->viewStatus;?>">make current</a>)
+ <?php } ?>
+
+ </li>
+ <?php } ?>
+
+ </ul>
+
+ </div>
+
+ <div class="history_page_list">
+ page list: <?php echo $pageList;?>
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/if_page_deleted.php b/h-source/Application/Views/if_page_deleted.php
new file mode 100644
index 0000000..2f9fd1e
--- /dev/null
+++ b/h-source/Application/Views/if_page_deleted.php
@@ -0,0 +1,49 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <?php if (strcmp($isDeleted,'yes') === 0) { ?>
+
+ <div class="notebooks_viewall">
+ <div class="revision_alert">
+ <div>
+ This page has been deleted as requested by:
+ <?php foreach ($deletionUsers as $user) { ?>
+ <?php echo getLinkToUser($u->getUser($user));?>
+ <?php } ?>
+ </div>
+ </div>
+ <div class="deletion_motivations_title">
+ With the following motivations:
+ </div>
+ <div class="deletion_motivations_external">
+ <?php foreach ($deletion as $row) { ?>
+ <div class="deletion_motivations_iternal">
+ <div class="deletion_motivations_iternal_title">
+ motivation of <?php echo getLinkToUser($u->getUser($row['deletion']['created_by']));?>: <?php echo getMotivation($row,$this->controller);?>
+ </div>
+ <div class="deletion_motivations_iternal_message">
+ message: <i><?php echo $row['deletion']['message'];?></i>
+ </div>
+ </div>
+ <?php } ?>
+ </div>
+ </div>
+
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/license_notice.php b/h-source/Application/Views/license_notice.php
new file mode 100644
index 0000000..71b1db9
--- /dev/null
+++ b/h-source/Application/Views/license_notice.php
@@ -0,0 +1,24 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div class="top_licence_notice">
+ <div><b>License Informations:</b></div>
+ Any text submitted by you will be put in the Public Domain (see the <a href="http://creativecommons.org/publicdomain/zero/1.0/">CC0 page</a> for detailed information).
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/moderator_dialog.php b/h-source/Application/Views/moderator_dialog.php
new file mode 100644
index 0000000..058cc3a
--- /dev/null
+++ b/h-source/Application/Views/moderator_dialog.php
@@ -0,0 +1,62 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+<div id="delete_dialog" title="Manage this message">
+ <form>
+ <p>Write below your motivation</p>
+ <textarea name="md_message" id="md_message"></textarea>
+ </form>
+</div>
+
+<div id="notice_dialog" title="Notice:">
+ <div class="notice_dialog_inner">
+
+ </div>
+</div>
+
+<script>
+
+ $(document).ready(function() {
+
+ <?php echo $md_javascript;?>
+
+ $(".hidden_message_view_details").click(function(){
+
+ var md_id_ext = $(this).attr("id");
+ var md_type_ext = $(this).parent().find(".md_type").text();
+ var that = $(this);
+
+ $.ajax({
+ url: base_url + "/history/viewall/" + curr_lang + "/" + md_type_ext + "/" + md_id_ext,
+ async: false,
+ cache: false,
+ dataType: "html",
+ success: function(html){
+ that.parent().find(".moderation_details_box").empty();
+ that.parent().find(".moderation_details_box").append(html);
+ }
+ });
+
+ that.parent().find(".details_of_hidden_message").show();
+ return false;
+ });
+ });
+
+</script> \ No newline at end of file
diff --git a/h-source/Application/Views/right.php b/h-source/Application/Views/right.php
new file mode 100644
index 0000000..9d778b2
--- /dev/null
+++ b/h-source/Application/Views/right.php
@@ -0,0 +1,118 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="right">
+
+ <?php if (strcmp($this->action,'update') !== 0) { ?>
+ <div class="language_links_box">
+ <?php echo $language_links;?>
+ </div>
+ <?php } ?>
+
+ <div class="login_table_box">
+
+ <?php if ($islogged === 'yes') { ?>
+ <div class="login_box_logged">
+ <div class="who_you_are_and_logout">
+ Hello <b><?php echo $username; ?></b> (<a href="<?php echo $this->baseUrl?>/users/logout">logout</a>)
+ </div>
+ <div class="your_panel_link">
+ your <a href="<?php echo $this->baseUrl."/my/home/$lang";?>">control panel</a>
+ </div>
+ </div>
+ <?php } else { ?>
+
+ <div class="who_you_are_and_logout">
+ Login form:
+ </div>
+ <!--login form-->
+ <form action="<?php echo $this->baseUrl."/users/login/$lang";?>" method="POST">
+
+ <div class="login_right_box">
+ <div class="login_right_item">
+ <div class="login_right_label">
+ username
+ </div>
+ <div class="login_right_form">
+ <input class="login_input" type="text" name="username" value="">
+ </div>
+ </div>
+ <div class="login_right_item">
+ <div class="login_right_label">
+ password
+ </div>
+ <div class="login_right_form">
+ <input class="login_input" type="password" name="password" value="">
+ </div>
+ </div>
+ <div>
+ <input type="submit" name="login" value="login">
+ </div>
+ </div>
+ </form>
+
+ <div class="manage_account_link_box">
+ <a href="<?php echo $this->baseUrl."/users/add/$lang";?>">Create new account</a>
+ </div>
+
+ <div class="manage_account_link_box">
+ <a href="<?php echo $this->baseUrl."/users/forgot/$lang";?>">Request new password</a>
+ </div>
+
+ <?php } ?>
+
+ </div>
+
+ <div class="discover_hardware">
+ <a href="<?php echo $this->baseUrl."/help/index/$lang#discover-hardware";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/discover.png"></a>
+ </div>
+
+ <div class="download_database">
+ <a href="<?php echo $this->baseUrl."/download/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/download.png"></a>
+ </div>
+
+ <div class="statistics_ext_box">
+ <div class="statistics_int_title">
+ website statistics:
+ </div>
+
+ <div class="statistics_hard_title">
+ hardware in the database:
+ </div>
+
+ <table width="100%">
+ <?php foreach ($stat as $type => $number) { ?>
+ <tr>
+ <td><?php echo $type;?></td>
+ <td><?php echo "<b>".$number."</b>";?></td>
+ </tr>
+ <?php } ?>
+ </table>
+
+ <div class="statistics_hard_title">
+ users logged: <span class="user_logged"><?php echo $numbLogged;?></span>
+ </div>
+ </div>
+
+ <div class="right_box_ext_box">
+ <?php echo $htmlRightBox;?>
+ </div>
+
+ </div> \ No newline at end of file
diff --git a/h-source/Application/Views/suggest_dialog.php b/h-source/Application/Views/suggest_dialog.php
new file mode 100644
index 0000000..223bbd8
--- /dev/null
+++ b/h-source/Application/Views/suggest_dialog.php
@@ -0,0 +1,41 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+<script type="text/javascript">
+
+ $(function(){
+
+ $("#suggest_dialog").css("display","block");
+
+ // Dialog
+ $('#suggest_dialog').dialog({
+ autoOpen: false,
+ width: 500,
+ });
+
+ $('#suggest_dialog').dialog('open');
+
+ });
+</script>
+
+<div id="suggest_dialog" title="Insert new hardware">
+ <p>Thanks for helping the h-node project and the free software movement!</p>
+ <p>You have just inserted a new notebook in the database.. can you please insert its devices separately too? Thanks!</p>
+</div> \ No newline at end of file
diff --git a/h-source/Application/Views/talk.php b/h-source/Application/Views/talk.php
new file mode 100644
index 0000000..6ae3bca
--- /dev/null
+++ b/h-source/Application/Views/talk.php
@@ -0,0 +1,140 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <script>
+
+ $(document).ready(function() {
+
+ $("#bb_code").markItUp(mySettings);
+
+ });
+
+ </script>
+
+ <div class="notebooks_viewall">
+
+ <?php foreach ($table as $message) { ?>
+
+ <?php if (strcmp($message['talk']['deleted'],'no') === 0) { ?>
+
+ <div class="talk_message_item">
+
+ <div class="talk_message_item_title_date">
+ <?php if ($ismoderator) { ?>
+ <a id="<?php echo $message['talk']['id_talk'];?>" class="hide_talk hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_cancel.png">hide</a>
+ <?php } ?>
+
+ <div class="talk_message_item_title">
+ <?php echo eg_strtoupper($message['talk']['title']);?>
+ </div>
+
+ <div class="talk_message_item_date">
+ by <?php echo getLinkToUser($u->getUser($message['talk']['created_by']));?>, <?php echo smartDate($message['talk']['creation_date']);?>
+ </div>
+ </div>
+
+ <div class="talk_message_item_content">
+ <?php echo decodeWikiText($message['talk']['message']);?>
+ </div>
+
+ <?php if ($ismoderator) { ?>
+ <!--view details-->
+ <div class="show_hidden_box_ext">
+ <div class="md_type">talk</div>
+ <a id="<?php echo $message['talk']['id_talk'];?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
+ <div class="moderation_details_box"></div>
+ </div>
+ <?php } ?>
+
+ </div>
+
+ <?php } else { ?>
+
+ <div class="talk_message_item_hidden">
+ this message has been deleted
+ <?php if ($ismoderator) { ?>
+ <a id="<?php echo $message['talk']['id_talk'];?>" class="show_talk hide_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png">make visible</a>
+
+ <!--view details-->
+ <div class="show_hidden_box_ext">
+ <div class="md_type">talk</div>
+
+ <a id="<?php echo $message['talk']['id_talk'];?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
+
+ <div class="details_of_hidden_message">
+ <div class="details_of_hidden_message_inner">
+ <div class="talk_message_item_date">
+ submitted by <?php echo getLinkToUser($u->getUser($message['talk']['created_by']));?>, <?php echo smartDate($message['talk']['creation_date']);?>
+ </div>
+ <div class="message_view_description_hidden">
+ <?php echo decodeWikiText($message['talk']['message']);?>
+ </div>
+ </div>
+ <div class="moderation_details_box"></div>
+ </div>
+ </div>
+
+ <?php } ?>
+ </div>
+
+ <?php } ?>
+
+ <?php } ?>
+ </div>
+
+ <?php if ($islogged === 'yes') { ?>
+
+ <div class="talk_form_external_box">
+ <div class="talk_login_notice">
+ <a name="form">Add a message</a>
+ </div>
+
+ <?php echo $notice;?>
+
+ <div class="notebooks_insert_form">
+ <form action="<?php echo $this->baseUrl."/".$this->controller."/talk/$lang/$id_hard/$token".$this->viewStatus;?>#form" method="POST">
+
+ <div class="edit_form">
+
+ <div class="form_entry">
+ <div class="entry_label">Title:</div>
+ <?php echo Html_Form::input('title',$values['title'],'talk_input_entry');?>
+ </div>
+
+ <div class="form_entry">
+ <div class="entry_label">Message:</div>
+ <?php echo Html_Form::textarea('message',$values['message'],'talk_textarea_entry','bb_code');?>
+ </div>
+
+ <input type="submit" name="insertAction" value="Save">
+
+ </div>
+
+ </form>
+ </div>
+ </div>
+
+ <?php } else { ?>
+
+ <div class="talk_login_notice">
+ <a name="form">You have to <a href="<?php echo $this->baseUrl."/users/login/$lang/".$this->controller."/view/$id_hard";?>">login</a> in order to add a message</a>
+ </div>
+
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/Views/top_left.php b/h-source/Application/Views/top_left.php
new file mode 100644
index 0000000..3c7bede
--- /dev/null
+++ b/h-source/Application/Views/top_left.php
@@ -0,0 +1,142 @@
+<?php if (!defined('EG')) die('Direct access not allowed!'); ?>
+
+<?php
+// h-source, a web software to build a community of people that want to share their hardware information.
+// Copyright (C) 2010 Antonio Gallo (h-source-copyright.txt)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+?>
+
+ <div id="left">
+
+ <div class="position_tree_box">
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/hardware/catalogue/$lang";?>">Hardware</a> &raquo; <?php echo $tree;?>
+ </div>
+
+ <?php if (strcmp($this->action,'view') === 0) { ?>
+
+ <div class="notebook_view_title">
+ Specifications of the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> <b><?php echo $ne_name;?></b>
+ </div>
+
+ <div class="notebook_insert_link">
+ <div class="view_page_back_button">
+ <a title="Back to the list of <?php echo MyStrings::$view[$lang][$this->controller]['element'];?>s" href="<?php echo $this->baseUrl."/".$this->controller."/catalogue/$lang".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a>
+ </div>
+
+ <div class="view_page_history_button">
+ <a title="talk page" href="<?php echo $this->baseUrl."/".$this->controller."/talk/$lang/$id_hard/$token".$this->viewStatus;?>"><img class="top_left_note_image" src="<?php echo $this->baseUrl;?>/Public/Img/talk-60.png"></a>
+ </div>
+
+ <div class="view_page_history_button">
+ <a title="history page" href="<?php echo $this->baseUrl."/".$this->controller."/history/$lang/$id_hard".$this->viewStatus;?>"><img class="top_left_note_image" src="<?php echo $this->baseUrl;?>/Public/Img/history-60.png"></a>
+ </div>
+
+ <?php if (strcmp($isDeleted,'no') === 0) { ?>
+ <div class="view_page_update_button">
+ <form action="<?php echo $this->baseUrl."/".$this->controller."/update/$lang/$token".$this->viewStatus;?>" method="POST">
+ <input title="edit page" class="update_submit_class" type="image" src="<?php echo $this->baseUrl;?>/Public/Img/edit-60.png" value="xedit">
+ <input type="hidden" name="id_hard" value="<?php echo $id_hard;?>">
+ </form>
+ </div>
+ <?php } ?>
+ </div>
+
+ <div class="talk_numb_ext">
+ <a href="<?php echo $this->baseUrl."/".$this->controller."/talk/$lang/$id_hard/$token".$this->viewStatus;?>">talk messages: <?php echo $talk_number;?></a>
+ </div>
+
+ <?php } else if (strcmp($this->action,'catalogue') === 0) { ?>
+
+ <div class="notebook_view_title">
+ List of <b><?php echo MyStrings::$view[$lang][$this->controller]['element'];?>s</b> in the archive
+ </div>
+
+ <div class="notebook_insert_link">
+ <a title="Insert a new <?php echo MyStrings::$view[$lang][$this->controller]['element'];?>" href="<?php echo $this->baseUrl."/".$this->controller."/insert/$lang/$token".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/new-60.png"></a>
+ </div>
+
+ <?php } else if (strcmp($this->action,'history') === 0) { ?>
+
+ <div class="notebook_view_title">
+ History of the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' <b>'.$ne_name.'</b>';?>
+ </div>
+
+ <div class="notebook_insert_link">
+ <a title="Back to the specifications of the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' '.$name;?>" href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/$id/$name".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a>
+ </div>
+
+ <?php } else if (strcmp($this->action,'differences') === 0) { ?>
+
+ <?php if ($showDiff === true) { ?>
+ <div class="notebook_view_title">
+ Differences between the revision of <b><?php echo smartDate($update_new);?></b>, created by <b><?php echo getLinkToUser($u->getUser($updated_by));?></b>, and the revision of <b><?php echo smartDate($update_old);?></b>
+ </div>
+ <?php } ?>
+
+ <div class="notebook_insert_link">
+ <a title="Back to the history of the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> <?php echo $name;?>" href="<?php echo $this->baseUrl."/".$this->controller."/history/$lang/$id_hard".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a>
+ </div>
+
+ <?php } else if (strcmp($this->action,'climb') === 0) { ?>
+
+ <div class="notebook_view_title">
+ Make current this revision of the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' <b>'.$ne_name.'</b>';?>
+ </div>
+
+ <div class="notebook_insert_link">
+ <a title="Back to the history of the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> <?php echo $name;?>" href="<?php echo $this->baseUrl."/".$this->controller."/history/$lang/$id_hard".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a>
+ </div>
+
+ <?php } else if (strcmp($this->action,'revision') === 0) { ?>
+
+ <div class="notebook_view_title">
+ Revision of the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' <b>'.$ne_name.'</b>';?>
+ </div>
+
+ <div class="notebook_insert_link">
+ <a title="Back to the history of the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> <?php echo $name;?>" href="<?php echo $this->baseUrl."/".$this->controller."/history/$lang/$id_hard".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a>
+ </div>
+
+ <?php } else if (strcmp($this->action,'insert') === 0) { ?>
+
+ <div class="notebook_view_title">
+ Insert a new <?php echo MyStrings::$view[$lang][$this->controller]['element'];?>
+ </div>
+
+ <div class="notebook_insert_link">
+ <a title="Back to the list of <?php echo MyStrings::$view[$lang][$this->controller]['element'];?>s" href="<?php echo $this->baseUrl."/".$this->controller."/catalogue/$lang".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a>
+ </div>
+
+ <?php } else if (strcmp($this->action,'update') === 0) { ?>
+
+ <div class="notebook_view_title">
+ Edit the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' <b>'.$ne_name.'</b>';?>
+ </div>
+
+ <div class="notebook_insert_link">
+ <a title="Back to the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> specifications" href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$id_hard."/$name".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a>
+ </div>
+
+ <?php } else if (strcmp($this->action,'talk') === 0) { ?>
+
+ <div class="notebook_view_title">
+ Talk page of the <?php echo MyStrings::$view[$lang][$this->controller]['element'].' <b>'.$ne_name.'</b>';?>
+ </div>
+
+ <div class="notebook_insert_link">
+ <a title="Back to the <?php echo MyStrings::$view[$lang][$this->controller]['element'];?> specifications" href="<?php echo $this->baseUrl."/".$this->controller."/view/$lang/".$id_hard."/$name".$this->viewStatus;?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/back-60.png"></a>
+ </div>
+
+ <?php } ?> \ No newline at end of file
diff --git a/h-source/Application/index.html b/h-source/Application/index.html
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/h-source/Application/index.html
@@ -0,0 +1 @@
+