diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-04-18 16:09:47 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-04-18 16:09:47 +0000 |
commit | 931861e0513be7e110fc1d98e366cbd4efb831ce (patch) | |
tree | 9cb3bf844f5edc60f06d19da53334126d01d3c52 /h-source | |
parent | 1614aa5cb29b3abbe59b45760d4cedf3b2183fa8 (diff) |
h-source:added acquisition cards and fingerprint readers - part 1
Diffstat (limited to 'h-source')
19 files changed, 1114 insertions, 30 deletions
diff --git a/h-source/Application/Controllers/AcquisitioncardsController.php b/h-source/Application/Controllers/AcquisitioncardsController.php new file mode 100644 index 0000000..6937de0 --- /dev/null +++ b/h-source/Application/Controllers/AcquisitioncardsController.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 file is part of h-source +// +// h-source 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. +// +// h-source 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 h-source. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class AcquisitioncardsController 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('AcquisitioncardsModel'); + $this->model('TalkModel'); + + $this->mod = $this->m['AcquisitioncardsModel']; + + $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user']; + $this->m['HardwareModel']->type = 'acquisition-card'; + + //hardware conditions + $this->m['HardwareModel']->strongConditions['update'] = array( + "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", + "+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}", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "++checkIsStrings|".Wifi::$commYear => "comm_year", + "+++checkIsStrings|".Acquisitioncards::$select => "compatibility", + "++++checkIsStrings|".Acquisitioncards::$interface => "interface", + ); + + $this->m['HardwareModel']->strongConditions['insert'] = array( + "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", + "+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}", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "++checkIsStrings|".Wifi::$commYear => "comm_year", + "+++checkIsStrings|".Acquisitioncards::$select => "compatibility", + "++++checkIsStrings|".Acquisitioncards::$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", + "++checkLength|49" => "driver", + "++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" => "kernel", + "++checkLength|49" => "driver", + "++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('model,kernel,description,distribution,comm_year,compatibility,pci_id,interface,driver','sanitizeAll'); + + $argKeys = array( + 'page:forceNat' => 1, + 'history_page:forceNat' => 1, + 'vendor:sanitizeString' => 'undef', + 'comm_year:sanitizeString' => 'undef', + 'compatibility:sanitizeString' => 'undef', + 'interface:sanitizeString' => 'undef', + 'sort-by:sanitizeString' => 'undef' + ); + + $this->setArgKeys($argKeys); + + $data['title'] = 'Acquisition cards'; + $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'], + 'compatibility' => $this->viewArgs['compatibility'], + '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/FingerprintreadersController.php b/h-source/Application/Controllers/FingerprintreadersController.php new file mode 100644 index 0000000..a32ea42 --- /dev/null +++ b/h-source/Application/Controllers/FingerprintreadersController.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 file is part of h-source +// +// h-source 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. +// +// h-source 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 h-source. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class FingerprintreadersController 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('FingerprintreadersModel'); + $this->model('TalkModel'); + + $this->mod = $this->m['FingerprintreadersModel']; + + $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user']; + $this->m['HardwareModel']->type = 'fingerprint-reader'; + + //hardware conditions + $this->m['HardwareModel']->strongConditions['update'] = array( + "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", + "+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}", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "++checkIsStrings|".Wifi::$commYear => "comm_year", + "+++checkIsStrings|".Fingerprintreaders::$select => "fingerprint_works", + "++++checkIsStrings|".Fingerprintreaders::$interface => "interface", + ); + + $this->m['HardwareModel']->strongConditions['insert'] = array( + "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", + "+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}", + "checkLength|99" => "model", + "+checkLength|299" => "distribution", + "++checkIsStrings|".Wifi::$commYear => "comm_year", + "+++checkIsStrings|".Fingerprintreaders::$select => "fingerprint_works", + "++++checkIsStrings|".Fingerprintreaders::$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", + "++checkLength|49" => "driver", + "++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" => "kernel", + "++checkLength|49" => "driver", + "++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('model,kernel,description,distribution,comm_year,fingerprint_works,pci_id,interface,driver','sanitizeAll'); + + $argKeys = array( + 'page:forceNat' => 1, + 'history_page:forceNat' => 1, + 'vendor:sanitizeString' => 'undef', + 'comm_year:sanitizeString' => 'undef', + 'fingerprint_works:sanitizeString' => 'undef', + 'interface:sanitizeString' => 'undef', + 'sort-by:sanitizeString' => 'undef' + ); + + $this->setArgKeys($argKeys); + + $data['title'] = 'Fingerprint reader'; + $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'], + 'fingerprint_works' => $this->viewArgs['fingerprint_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/Include/distributions.php b/h-source/Application/Include/distributions.php index 5b91346..e15c224 100644 --- a/h-source/Application/Include/distributions.php +++ b/h-source/Application/Include/distributions.php @@ -26,6 +26,7 @@ class Distributions public static $allowed = array( 'blag_90001' => 'BLAG 90001', 'blag_120000' => 'BLAG 120000', + 'blag_140000' => 'BLAG 140000', 'dragora_1_1' => 'Dragora 1.1', 'dragora_2_0' => 'Dragora 2.0 Ardi', 'dynebolic_2_5_2' => 'Dynebolic 2.5.2 DHORUBA', diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index 89ea519..c55515c 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -24,7 +24,7 @@ if (!defined('EG')) die('Direct access not allowed!'); class Hardware { - public static $controllers = array('notebooks','wifi','videocards','printers','scanners','threegcards','soundcards','webcams','bluetooth'); //used by UsersController::login() + public static $controllers = array('notebooks','wifi','videocards','printers','scanners','threegcards','soundcards','webcams','bluetooth','acquisitioncards','fingerprintreaders'); //used by UsersController::login() //classId => controller public static $deviceClasses = array( @@ -34,29 +34,38 @@ class Hardware ); public static $icons = array( - 'notebook' => 'H2O/computer-laptop_22.png', - 'wifi' => 'H2O/network-wireless_22.png', - 'videocard' => 'Crystal/1282042976_hardware.png', - 'printer' => 'H2O/printer_22.png', - 'scanner' => 'H2O/scanner_22.png', - '3G-card' => 'Crystal/usb_22.png', - 'soundcard' => 'H2O/audio-card_22.png', - 'webcam' => 'H2O/camera-web_22.png', - 'bluetooth' => 'H2O/preferences-system-bluetooth-22.png', + 'notebook' => 'H2O/computer-laptop_22.png', + 'wifi' => 'H2O/network-wireless_22.png', + 'videocard' => 'Crystal/1282042976_hardware.png', + 'printer' => 'H2O/printer_22.png', + 'scanner' => 'H2O/scanner_22.png', + '3G-card' => 'Crystal/usb_22.png', + 'soundcard' => 'H2O/audio-card_22.png', + 'webcam' => 'H2O/camera-web_22.png', + 'bluetooth' => 'H2O/preferences-system-bluetooth-22.png', + 'acquisition-card' => 'Crystal/cam_mount-22.png', + 'fingerprint-reader' => 'Crystal/cam_mount-22.png', ); public static $typeToController = array( - 'notebook' => 'notebooks', - 'wifi' => 'wifi', - 'videocard' => 'videocards', - 'printer' => 'printers', - 'scanner' => 'scanners', - '3G-card' => 'threegcards', - 'soundcard' => 'soundcards', - 'webcam' => 'webcams', - 'bluetooth' => 'bluetooth', + 'notebook' => 'notebooks', + 'wifi' => 'wifi', + 'videocard' => 'videocards', + 'printer' => 'printers', + 'scanner' => 'scanners', + '3G-card' => 'threegcards', + 'soundcard' => 'soundcards', + 'webcam' => 'webcams', + 'bluetooth' => 'bluetooth', + 'acquisition-card' => 'acquisitioncards', + 'fingerprint-reader' => 'fingerprintreaders', ); + public static function getTypes() + { + return implode(',',array_keys(self::$typeToController)); + } + public static function getControllerFromType($type) { if (array_key_exists($type,self::$typeToController)) @@ -339,4 +348,22 @@ class Bluetooth extends Hardware public static $interface = "not-specified,USB,PCI,PCI-E,mini-PCI,mini-PCI-E,ExpressCard,PC-Card"; +} + +class Acquisitioncards extends Hardware +{ + + public static $select = 'yes,no'; + + public static $interface = "not-specified,USB,PCI,PCI-E,mini-PCI,mini-PCI-E,ExpressCard,PC-Card,Firewire,Parallel,Serial"; + +} + +class Fingerprintreaders extends Hardware +{ + + public static $select = 'yes,no'; + + public static $interface = "not-specified,USB,PCI,PCI-E,mini-PCI,mini-PCI-E,ExpressCard,PC-Card,Firewire,Parallel,Serial"; + }
\ No newline at end of file diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 87f6eb3..6f80831 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -216,6 +216,8 @@ class Lang "learn how to find it" => "scopri come individuarlo", "Download the xml file of all the <b>bluetooth devices</b> in the database" => "Scarica il file xml di tutti i <b>dispositivi bluetooth</b> presenti nel database", "License information" => "Informazioni sulla licenza", + "No acquisition card found" => "Non è stata trovata alcuna scheda d'acquisizione", + "No fingerprint readers found" => "Non è stato trovato alcun lettore di impronte digitali", ), 'es' => array ( @@ -545,6 +547,7 @@ class Lang 'soundcards' => 'soundcard', 'webcams' => 'webcam', 'bluetooth' => 'bluetooth device', + 'acquisitioncards' => 'acquisition card', ), 'it' => array( 'notebooks' => 'notebook', @@ -556,6 +559,7 @@ class Lang 'soundcards' => 'soundcard', 'webcams' => 'webcam', 'bluetooth' => 'bluetooth device', + 'acquisitioncards' => 'acquisition card', ), 'es' => array( 'notebooks' => 'notebook', @@ -567,6 +571,7 @@ class Lang 'soundcards' => 'soundcard', 'webcams' => 'webcam', 'bluetooth' => 'bluetooth device', + 'acquisitioncards' => 'acquisition card', ), 'fr' => array( 'notebooks' => 'notebook', @@ -578,6 +583,7 @@ class Lang 'soundcards' => 'soundcard', 'webcams' => 'webcam', 'bluetooth' => 'bluetooth device', + 'acquisitioncards' => 'acquisition card', ), ); @@ -592,6 +598,7 @@ class Lang 'soundcards' => 'soundcards', 'webcams' => 'webcams', 'bluetooth' => 'bluetooth devices', + 'acquisitioncards' => 'acquisition cards', ), 'it' => array( 'notebooks' => 'notebooks', @@ -603,6 +610,7 @@ class Lang 'soundcards' => 'soundcards', 'webcams' => 'webcams', 'bluetooth' => 'bluetooth devices', + 'acquisitioncards' => 'acquisition cards', ), 'es' => array( 'notebooks' => 'notebooks', @@ -614,6 +622,7 @@ class Lang 'soundcards' => 'soundcards', 'webcams' => 'webcams', 'bluetooth' => 'bluetooth devices', + 'acquisitioncards' => 'acquisition cards', ), 'fr' => array( 'notebooks' => 'notebooks', @@ -625,6 +634,7 @@ class Lang 'soundcards' => 'soundcards', 'webcams' => 'webcams', 'bluetooth' => 'bluetooth devices', + 'acquisitioncards' => 'acquisition cards', ), ); @@ -666,15 +676,17 @@ class MyStrings //type => controller public static $reverse = array( - 'notebook' => 'notebooks', - 'wifi' => 'wifi', - 'videocard' => 'videocards', - 'printer' => 'printers', - 'scanner' => 'scanners', - '3G-card' => 'threegcards', - 'soundcard' => 'soundcards', - 'webcam' => 'webcams', - 'bluetooth' => 'bluetooth', + 'notebook' => 'notebooks', + 'wifi' => 'wifi', + 'videocard' => 'videocards', + 'printer' => 'printers', + 'scanner' => 'scanners', + '3G-card' => 'threegcards', + 'soundcard' => 'soundcards', + 'webcam' => 'webcams', + 'bluetooth' => 'bluetooth', + 'acquisition-card' => 'acquisitioncards', + 'fingerprint-reader' => 'fingerprintreaders', ); public static function getTypes() diff --git a/h-source/Application/Models/AcquisitioncardsModel.php b/h-source/Application/Models/AcquisitioncardsModel.php new file mode 100644 index 0000000..7114dd3 --- /dev/null +++ b/h-source/Application/Models/AcquisitioncardsModel.php @@ -0,0 +1,74 @@ +<?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 file is part of h-source +// +// h-source 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. +// +// h-source 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 h-source. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class AcquisitioncardsModel extends GenericModel +{ + + public $type = 'acquisition-card'; //device type + + public function __construct() + { + + $this->_popupItemNames = array( + 'vendor' => 'vendor', + 'comm_year' => 'comm_year', + 'compatibility' => 'compatibility', + 'interface' => 'interface', + ); + + $this->_popupLabels = array( + 'vendor' => gtext("vendor"), + 'comm_year' => gtext("year"), + 'compatibility' => gtext("does it work?"), + 'interface' => gtext("interface"), + ); + + $this->_popupFunctions = array( + 'vendor' => 'betterVendor', + ); + + $this->_popupWhere = array( + 'vendor' => 'type="acquisition-card" and deleted="no"', + 'comm_year' => 'type="acquisition-card" and deleted="no"', + 'compatibility' => 'type="acquisition-card" and deleted="no"', + 'interface' => 'type="acquisition-card" 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'), + 'compatibility' => gtext("does it work with free software?"), + '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/FingerprintreadersModel.php b/h-source/Application/Models/FingerprintreadersModel.php new file mode 100644 index 0000000..83be7db --- /dev/null +++ b/h-source/Application/Models/FingerprintreadersModel.php @@ -0,0 +1,74 @@ +<?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 file is part of h-source +// +// h-source 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. +// +// h-source 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 h-source. If not, see <http://www.gnu.org/licenses/>. + +if (!defined('EG')) die('Direct access not allowed!'); + +class FingerprintreadersModel extends GenericModel +{ + + public $type = 'fingerprint-reader'; //device type + + public function __construct() + { + + $this->_popupItemNames = array( + 'vendor' => 'vendor', + 'comm_year' => 'comm_year', + 'fingerprint_works' => 'fingerprint_works', + 'interface' => 'interface', + ); + + $this->_popupLabels = array( + 'vendor' => gtext("vendor"), + 'comm_year' => gtext("year"), + 'fingerprint_works' => gtext("does it work?"), + 'interface' => gtext("interface"), + ); + + $this->_popupFunctions = array( + 'vendor' => 'betterVendor', + ); + + $this->_popupWhere = array( + 'vendor' => 'type="fingerprint-reader" and deleted="no"', + 'comm_year' => 'type="fingerprint-reader" and deleted="no"', + 'fingerprint_works' => 'type="fingerprint-reader" and deleted="no"', + 'interface' => 'type="fingerprint-reader" 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'), + 'fingerprint_works' => gtext("does it work with free software?"), + '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/Views/Acquisitioncards/catalogue.php b/h-source/Application/Views/Acquisitioncards/catalogue.php new file mode 100644 index 0000000..857fd07 --- /dev/null +++ b/h-source/Application/Views/Acquisitioncards/catalogue.php @@ -0,0 +1,82 @@ +<?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 file is part of h-source +// +// h-source 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. +// +// h-source 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 h-source. 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 betterVendor($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['compatibility']?></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 acquisition card 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 Hardware::getIconFromType($item['hardware']['type']);?>"> <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 betterVendor($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']['compatibility'];?></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/Acquisitioncards/form.php b/h-source/Application/Views/Acquisitioncards/form.php new file mode 100644 index 0000000..cf7668e --- /dev/null +++ b/h-source/Application/Views/Acquisitioncards/form.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 file is part of h-source +// +// h-source 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. +// +// h-source 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 h-source. 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("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");?>: <b>*</b><br /><a target="blank" href="<?php echo $this->baseUrl."/help/index/$lang#vendoridproductid";?>"><?php echo gtext("learn how to find it");?></a></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'],Acquisitioncards::$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 include(ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . 'noscript_distributions.php');?> + <?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('compatibility',$values['compatibility'],Acquisitioncards::$select,"select_entry hidden_x_explorer");?> + </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/Acquisitioncards/page.php b/h-source/Application/Views/Acquisitioncards/page.php new file mode 100644 index 0000000..2a47417 --- /dev/null +++ b/h-source/Application/Views/Acquisitioncards/page.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 file is part of h-source +// +// h-source 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. +// +// h-source 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 h-source. 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 Hardware::getIconFromType($item[$tableName]['type']);?>"> <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 betterVendor($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]['compatibility'];?></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/Fingerprintreaders/catalogue.php b/h-source/Application/Views/Fingerprintreaders/catalogue.php new file mode 100644 index 0000000..3423f60 --- /dev/null +++ b/h-source/Application/Views/Fingerprintreaders/catalogue.php @@ -0,0 +1,82 @@ +<?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 file is part of h-source +// +// h-source 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. +// +// h-source 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 h-source. 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 betterVendor($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['fingerprint_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 fingerprint readers 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 Hardware::getIconFromType($item['hardware']['type']);?>"> <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 betterVendor($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']['fingerprint_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/Fingerprintreaders/form.php b/h-source/Application/Views/Fingerprintreaders/form.php new file mode 100644 index 0000000..a3b6221 --- /dev/null +++ b/h-source/Application/Views/Fingerprintreaders/form.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 file is part of h-source +// +// h-source 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. +// +// h-source 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 h-source. 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("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");?>: <b>*</b><br /><a target="blank" href="<?php echo $this->baseUrl."/help/index/$lang#vendoridproductid";?>"><?php echo gtext("learn how to find it");?></a></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'],Fingerprintreaders::$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 include(ROOT . DS . APPLICATION_PATH . DS . 'Views' . DS . 'noscript_distributions.php');?> + <?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('fingerprint_works',$values['fingerprint_works'],Fingerprintreaders::$select,"select_entry hidden_x_explorer");?> + </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/Fingerprintreaders/page.php b/h-source/Application/Views/Fingerprintreaders/page.php new file mode 100644 index 0000000..1e5f6f0 --- /dev/null +++ b/h-source/Application/Views/Fingerprintreaders/page.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 file is part of h-source +// +// h-source 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. +// +// h-source 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 h-source. 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 Hardware::getIconFromType($item[$tableName]['type']);?>"> <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 betterVendor($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]['fingerprint_works'];?></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/Hardware/left.php b/h-source/Application/Views/Hardware/left.php index fbd6585..4583a9c 100644 --- a/h-source/Application/Views/Hardware/left.php +++ b/h-source/Application/Views/Hardware/left.php @@ -61,5 +61,13 @@ <div class="hardware_element"> <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/H2O/preferences-system-bluetooth.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/bluetooth/catalogue/<?php echo $lang;?>">Bluetooth devices</a> </div> + + <div class="hardware_element"> + <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/cam_mount.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/acquisitioncards/catalogue/<?php echo $lang;?>">TV/Video/FM acquisition cards</a> + </div> + + <div class="hardware_element"> + <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/cam_mount.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/fingerprintreaders/catalogue/<?php echo $lang;?>">Fingerprint readers</a> + </div> </div>
\ No newline at end of file diff --git a/h-source/Application/Views/Search/form.php b/h-source/Application/Views/Search/form.php index 58b33dd..22650f5 100644 --- a/h-source/Application/Views/Search/form.php +++ b/h-source/Application/Views/Search/form.php @@ -65,7 +65,7 @@ <table> <tr> <td><?php echo gtext("hardware type");?>:</td> - <td><?php echo Html_Form::select('type','',MyStrings::getTypes(),"select_entry","search_type_input");?></td> + <td><?php echo Html_Form::select('type','',Hardware::getTypes(),"select_entry","search_type_input");?></td> </tr> <tr> <td><?php echo gtext("the model name contains");?>:</td> diff --git a/h-source/Config/Route.php b/h-source/Config/Route.php index b7ddf68..e340a53 100644 --- a/h-source/Config/Route.php +++ b/h-source/Config/Route.php @@ -165,6 +165,24 @@ class Route 'bluetooth,talk', 'client,licenseinfo', 'client,userinfo', + 'acquisitioncards,catalogue', + 'acquisitioncards,view', + 'acquisitioncards,history', + 'acquisitioncards,revision', + 'acquisitioncards,insert', + 'acquisitioncards,update', + 'acquisitioncards,differences', + 'acquisitioncards,climb', + 'acquisitioncards,talk', + 'fingerprintreaders,catalogue', + 'fingerprintreaders,view', + 'fingerprintreaders,history', + 'fingerprintreaders,revision', + 'fingerprintreaders,insert', + 'fingerprintreaders,update', + 'fingerprintreaders,differences', + 'fingerprintreaders,climb', + 'fingerprintreaders,talk', ); //it can be 'yes' or 'no' diff --git a/h-source/Public/Img/Crystal/cam_mount-22.png b/h-source/Public/Img/Crystal/cam_mount-22.png Binary files differnew file mode 100755 index 0000000..d4d2595 --- /dev/null +++ b/h-source/Public/Img/Crystal/cam_mount-22.png diff --git a/h-source/Public/Img/Crystal/cam_mount.png b/h-source/Public/Img/Crystal/cam_mount.png Binary files differnew file mode 100755 index 0000000..2da5732 --- /dev/null +++ b/h-source/Public/Img/Crystal/cam_mount.png diff --git a/h-source/tables.sql b/h-source/tables.sql index e914867..34c8ab9 100644 --- a/h-source/tables.sql +++ b/h-source/tables.sql @@ -96,7 +96,8 @@ create table hardware ( webcam_type varchar(100) CHARACTER SET utf8 not null, webcam_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', sound_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', - bluetooth_works varchar(30) CHARACTER SET utf8 not null default 'not-specified' + bluetooth_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', + fingerprint_works varchar(30) CHARACTER SET utf8 not null default 'not-specified' )engine=innodb; create table revisions ( @@ -126,6 +127,7 @@ create table revisions ( webcam_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', sound_card_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', bluetooth_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', + fingerprint_works varchar(30) CHARACTER SET utf8 not null default 'not-specified', id_hard INT UNSIGNED NOT NULL )engine=innodb; |