aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-04-26 05:32:06 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-04-26 05:32:06 +0000
commit64fbca4467ef44081b680955592428da35b40a9a (patch)
tree4aee063a793513c8880514ebb51b35089bd57c72 /h-source/Application
parentea4c1ff1b7946ecd9934419dc4873de74dccb3f0 (diff)
added RAID adapter category, part 1 - rsandu issue
Diffstat (limited to 'h-source/Application')
-rw-r--r--h-source/Application/Controllers/DownloadController.php6
-rw-r--r--h-source/Application/Controllers/RaidadaptersController.php131
-rw-r--r--h-source/Application/Include/hardware.php26
-rw-r--r--h-source/Application/Include/languages.php15
-rw-r--r--h-source/Application/Models/RaidadaptersModel.php68
-rw-r--r--h-source/Application/Views/Desktop/Download/index.php4
-rw-r--r--h-source/Application/Views/Desktop/Hardware/left.php4
7 files changed, 236 insertions, 18 deletions
diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php
index 5fa11b2..7994329 100644
--- a/h-source/Application/Controllers/DownloadController.php
+++ b/h-source/Application/Controllers/DownloadController.php
@@ -136,7 +136,7 @@ class DownloadController extends BaseController
$xml .= "\t\t<it_works>".$row['hardware']['video_card_works']."</it_works>\n";
}
- if ($type === 'acquisition-card' or $type === 'modem')
+ if ($type === 'acquisition-card' or $type === 'modem' or $type === 'RAID-adapter')
{
$xml .= "\t\t<it_works>".$row['hardware']['compatibility']."</it_works>\n";
}
@@ -262,4 +262,8 @@ class DownloadController extends BaseController
$this->printXml($lang, array('type'=>'modem','-deleted'=>'no'));
}
+ public function raidadapters($lang = 'en')
+ {
+ $this->printXml($lang, array('type'=>'RAID-adapter','-deleted'=>'no'));
+ }
} \ No newline at end of file
diff --git a/h-source/Application/Controllers/RaidadaptersController.php b/h-source/Application/Controllers/RaidadaptersController.php
new file mode 100644
index 0000000..37bbad1
--- /dev/null
+++ b/h-source/Application/Controllers/RaidadaptersController.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 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 RaidadaptersController extends GenericController
+{
+
+ public function __construct($model, $controller, $queryString)
+ {
+
+ $worksOptions = Raidadapters::$select;
+ $worksField = 'compatibility';
+ $interfaceOptions = Raidadapters::$interface;
+
+ parent::__construct($model, $controller, $queryString);
+
+ //load the model
+ $this->model('HardwareModel');
+ $this->model('RevisionsModel');
+ $this->model('RaidadaptersModel');
+ $this->model('TalkModel');
+
+ $this->mod = $this->m['RaidadaptersModel'];
+
+ $this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user'];
+ $this->m['HardwareModel']->type = 'RAID-adapter';
+
+ $this->m['HardwareModel']->setConditions($worksOptions,$worksField,$interfaceOptions);
+
+ $this->m['HardwareModel']->setFields('model,kernel,description,distribution,comm_year,compatibility,pci_id,interface,driver,other_names','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',
+ 'search_string:sanitizeString' => 'undef'
+ );
+
+ $this->setArgKeys($argKeys);
+
+ $data['title'] = 'Acquisition cards';
+
+ $data['intefaceOptions'] = $interfaceOptions;
+ $data['worksOptions'] = $worksOptions;
+ $data['worksField'] = $worksField;
+
+ $data['notFoundString'] = "No RAID adapter found";
+
+ $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/Include/hardware.php b/h-source/Application/Include/hardware.php
index bc25ff7..9fa218b 100644
--- a/h-source/Application/Include/hardware.php
+++ b/h-source/Application/Include/hardware.php
@@ -80,6 +80,7 @@ class Hardware
'ethernet-card' => 'H2O/network-wired_22.png',
'sd-card-reader' => 'H2O/media-flash-sd-mmc_22.png',
'modem' => 'Crystal/modem_22.png',
+ 'RAID-adapter' => 'Crystal/modem_22.png',
);
public static $typeToController = array(
@@ -97,6 +98,7 @@ class Hardware
'ethernet-card' => 'ethernetcards',
'sd-card-reader' => 'sdcardreaders',
'modem' => 'modems',
+ 'RAID-adapter' => 'raidadapters',
);
public static function getTypes()
@@ -430,37 +432,27 @@ class Acquisitioncards extends Hardware
}
-class Fingerprintreaders extends Hardware
+class Fingerprintreaders extends Acquisitioncards
{
- 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 Ethernetcards 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 Sdcardreaders extends Hardware
+class Sdcardreaders extends Acquisitioncards
{
- 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 Modems extends Hardware
+class Modems extends Acquisitioncards
{
- 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 Raidadapters extends Acquisitioncards
+{
-} \ No newline at end of file
+}
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php
index 0805b09..2e0c5b0 100644
--- a/h-source/Application/Include/languages.php
+++ b/h-source/Application/Include/languages.php
@@ -379,6 +379,9 @@ class Lang
/*0319*/"contact us" => "contattaci",
/*0320*/"credits" => "crediti",
/*0321*/"desktop version" => "versione desktop",
+ /*0322*/"RAID adapters" => "Adattatori RAID",
+ /*0323*/"No RAID adapter found" => "Nessun adattatore RAID è stato trovato",
+ "Download the xml file of all the <b>RAID adapters</b> in the database" => "Scarica il file xml di tutti gli <b>adattatori RAID</b> presenti nel database",
),
'es' => array
(
@@ -1560,6 +1563,7 @@ class Lang
/*12*/'ethernetcards' => 'ethernet card',
/*13*/'sdcardreaders' => 'sd card reader',
/*14*/'modems' => 'modem',
+ /*15*/'raidadapters' => 'RAID adapter',
),
'it' => array(
'notebooks' => 'notebook',
@@ -1576,6 +1580,7 @@ class Lang
'ethernetcards' => 'scheda ethernet',
'sdcardreaders' => 'lettore di schede sd',
'modems' => 'modem',
+ 'raidadapters' => 'adattatore RAID',
),
'es' => array(
'notebooks' => 'portátil',
@@ -1592,6 +1597,7 @@ class Lang
'ethernetcards' => 'tarjeta de ethernet',
'sdcardreaders' => 'lector de tarjetas sd',
'modems' => 'modem',
+ 'raidadapters' => 'RAID adapter',
),
'fr' => array(
'notebooks' => 'notebook',
@@ -1608,6 +1614,7 @@ class Lang
'ethernetcards' => 'carte ethernet',
'sdcardreaders' => 'lecteur de carte SD',
'modem' => 'modem',
+ 'raidadapters' => 'RAID adapter',
),
'de' => array(
'notebooks' => 'notebook',
@@ -1624,6 +1631,7 @@ class Lang
'ethernetcards' => 'ethernet card',
'sdcardreaders' => 'sd card reader',
'modems' => 'modem',
+ 'raidadapters' => 'RAID adapter',
),
'gr' => array(
/*01*/'notebooks' => 'Υπο-φορητοί υπολογιστές',
@@ -1640,6 +1648,7 @@ class Lang
/*12*/'ethernetcards' => 'Κάρτες ethernet',
/*13*/'sdcardreaders' => 'Συσκευές ανάγνωσης καρτών sd',
/*14*/'modems' => 'Συσκευές modem',
+ /*15*/'raidadapters' => 'RAID adapter',
),
);
@@ -1659,6 +1668,7 @@ class Lang
/*12*/'ethernetcards' => 'ethernet cards',
/*13*/'sdcardreaders' => 'sd card readers',
/*14*/'modems' => 'modems',
+ /*15*/'raidadapters' => 'RAID adapters',
),
'it' => array(
/*01*/'notebooks' => 'notebook',
@@ -1675,6 +1685,7 @@ class Lang
/*12*/'ethernetcards' => 'schede ethernet',
/*13*/'sdcardreaders' => 'lettori di schede sd',
/*14*/'modems' => 'modem',
+ /*15*/'raidadapters' => 'adattatori RAID',
),
'es' => array(
/*01*/'notebooks' => 'portátiles',
@@ -1691,6 +1702,7 @@ class Lang
/*12*/'ethernetcards' => 'tarjetas de ethernet',
/*13*/'sdcardreaders' => 'lectores de tarjetas sd',
/*14*/'modems' => 'modems',
+ /*15*/'raidadapters' => 'RAID adapters',
),
'fr' => array(
/*01*/'notebooks' => 'notebooks',
@@ -1707,6 +1719,7 @@ class Lang
/*12*/'ethernetcards' => 'cartes ethernet',
/*13*/'sdcardreaders' => 'lecteurs de cartes SD',
/*14*/'modems' => 'modems',
+ /*15*/'raidadapters' => 'RAID adapters',
),
'de' => array(
/*01*/'notebooks' => 'notebooks',
@@ -1723,6 +1736,7 @@ class Lang
/*12*/'ethernetcards' => 'ethernet cards',
/*13*/'sdcardreaders' => 'sd card readers',
/*14*/'modems' => 'modems',
+ /*15*/'raidadapters' => 'RAID adapters',
),
'gr' => array(
/*01*/'notebooks' => 'Υπο-φορητοί υπολογιστές',
@@ -1739,6 +1753,7 @@ class Lang
/*12*/'ethernetcards' => 'Κάρτες ethernet',
/*13*/'sdcardreaders' => 'Συσκευές ανάγνωσης καρτών sd',
/*14*/'modems' => 'Συσκευές modem',
+ /*15*/'raidadapters' => 'RAID adapters',
),
);
diff --git a/h-source/Application/Models/RaidadaptersModel.php b/h-source/Application/Models/RaidadaptersModel.php
new file mode 100644
index 0000000..2e140e8
--- /dev/null
+++ b/h-source/Application/Models/RaidadaptersModel.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 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 RaidadaptersModel extends GenericModel
+{
+
+ public $type = 'RAID-adapter'; //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->setPopupFunctions();
+
+ $this->createPopupWhere('vendor,compatibility,comm_year,interface');
+
+ $this->diffFields = array(
+ 'vendor' => gtext("vendor"),
+ 'model' => gtext('model name'),
+ 'other_names' => gtext('possible other names of the device'),
+ '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'),gtext('possible other names of the device'));
+
+ parent::__construct();
+ }
+
+} \ No newline at end of file
diff --git a/h-source/Application/Views/Desktop/Download/index.php b/h-source/Application/Views/Desktop/Download/index.php
index 1275d63..1ceca5a 100644
--- a/h-source/Application/Views/Desktop/Download/index.php
+++ b/h-source/Application/Views/Desktop/Download/index.php
@@ -97,6 +97,10 @@
<td><?php echo gtext("Download the xml file of all the <b>modems</b> in the database");?></td>
<td><a href="<?php echo $this->baseUrl."/download/modems/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
</tr>
+ <tr>
+ <td><?php echo gtext("Download the xml file of all the <b>RAID adapters</b> in the database");?></td>
+ <td><a href="<?php echo $this->baseUrl."/download/raidadapters/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
+ </tr>
</table>
</div>
</div>
diff --git a/h-source/Application/Views/Desktop/Hardware/left.php b/h-source/Application/Views/Desktop/Hardware/left.php
index ece6e32..73e9b4a 100644
--- a/h-source/Application/Views/Desktop/Hardware/left.php
+++ b/h-source/Application/Views/Desktop/Hardware/left.php
@@ -81,4 +81,8 @@
<div class="hardware_element">
<img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/modem.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/modems/catalogue/<?php echo $lang;?>"><?php echo gtext("Modems and ADSL cards");?></a>
</div>
+
+ <div class="hardware_element">
+ <img align="middle" class="hardware_element_image" src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/modem.png"><a class="hardware_element_link" href="<?php echo $this->baseUrl?>/raidadapters/catalogue/<?php echo $lang;?>"><?php echo gtext("RAID adapters");?></a>
+ </div>
</div> \ No newline at end of file