aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-02-04 11:26:22 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-02-04 11:26:22 +0000
commit799376543af81e836b175b1eb71368f321b84416 (patch)
tree36c93375dce2cbe3d4a98542a2c09378e3582f68 /h-source/Application
parent190ded0397f9434a1fadd0f06775edb6dcf60272 (diff)
added webcams - part 2
Diffstat (limited to 'h-source/Application')
-rw-r--r--h-source/Application/Controllers/DownloadController.php30
-rw-r--r--h-source/Application/Include/languages.php10
-rw-r--r--h-source/Application/Views/Download/index.php24
-rw-r--r--h-source/Application/Views/Download/index_es.php78
-rw-r--r--h-source/Application/Views/Download/index_fr.php78
-rw-r--r--h-source/Application/Views/Download/index_it.php78
6 files changed, 45 insertions, 253 deletions
diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php
index cf5aa3c..6ad04dc 100644
--- a/h-source/Application/Controllers/DownloadController.php
+++ b/h-source/Application/Controllers/DownloadController.php
@@ -98,11 +98,9 @@ class DownloadController extends BaseController
$xml .= "\t\t<wifi_card>".$row['hardware']['wifi_type']."</wifi_card>\n";
$xml .= "\t\t<videocard>".$row['hardware']['video_card_type']."</videocard>\n";
$xml .= "\t\t<webcam>".$row['hardware']['webcam_type']."</webcam>\n";
- }
-
- if ($type === 'notebook')
- {
$xml .= "\t\t<wifi_works>".$row['hardware']['wifi_works']."</wifi_works>\n";
+ $xml .= "\t\t<videocard_works>".$row['hardware']['video_card_works']."</videocard_works>\n";
+ $xml .= "\t\t<webcam_works>".$row['hardware']['webcam_works']."</webcam_works>\n";
}
if ($type === '3G-card' or $type === 'wifi')
@@ -114,21 +112,22 @@ class DownloadController extends BaseController
{
$xml .= "\t\t<it_works>".$row['hardware']['sound_card_works']."</it_works>\n";
}
-
- if ($type === 'notebook' or $type === 'videocard')
+
+ if ($type === 'webcam')
{
- $xml .= "\t\t<videocard_works>".$row['hardware']['video_card_works']."</videocard_works>\n";
+ $xml .= "\t\t<it_works>".$row['hardware']['webcam_works']."</it_works>\n";
}
- if ($type === 'notebook')
+ if ($type === 'videocard')
{
- $xml .= "\t\t<webcam_works>".$row['hardware']['webcam_works']."</webcam_works>\n";
+ $xml .= "\t\t<it_works>".$row['hardware']['video_card_works']."</it_works>\n";
}
if ($type === 'printer' or $type === 'scanner' or $type === 'soundcard')
{
$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";
@@ -245,4 +244,17 @@ class DownloadController extends BaseController
$this->clean();
$this->load('xml');
}
+
+ public function webcams($lang = 'en')
+ {
+ header ("Content-Type:text/xml");
+
+ $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'webcam','-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/Include/languages.php b/h-source/Application/Include/languages.php
index a7498b7..e457f2e 100644
--- a/h-source/Application/Include/languages.php
+++ b/h-source/Application/Include/languages.php
@@ -157,6 +157,16 @@ class Lang
"The following devices has not been found in the database" => "I seguenti device non sono stati trovati nel database",
"can you please insert them?" => "puoi gentilmente inserirli?",
"No webcams found" => "Non è stata trovata alcuna webcam",
+ "Download the xml file of all the database" => "Scarica il file xml di tutto il database",
+ "Download the xml file of all the <b>notebooks</b> in the database" => "Scarica il file xml di tutti i <b>notebook</b> presenti nel database",
+ "Download the xml file of all the <b>wifi cards</b> in the database" => "Scarica il file xml di tutte le <b>schede wifi</b> presenti nel database",
+ "Download the xml file of all the <b>video cards</b> in the database" => "Scarica il file xml di tutte le <b>schede video</b> presenti nel database",
+ "Download the xml file of all the <b>printers</b> in the database" => "Scarica il file xml di tutte le <b>stampanti</b> presenti nel database",
+ "Download the xml file of all the <b>3G cards</b> in the database" => "Scarica il file xml di tutte le <b>schede 3G</b> presenti nel database",
+ "Download the xml file of all the <b>sound cards</b> in the database" => "Scarica il file xml di tutte le <b>schede audio</b> presenti nel database",
+ "Download the xml file of all the <b>webcams</b> in the database" => "Scarica il file xml di tutte le <b>webcams</b> presenti nel database",
+ "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)" => "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)",
+ "Download the h-node hardware database in xml format" => "Scarica il database dell'hardware di h-node in formato xml",
),
'es' => array
(
diff --git a/h-source/Application/Views/Download/index.php b/h-source/Application/Views/Download/index.php
index c13e0b3..c153fb8 100644
--- a/h-source/Application/Views/Download/index.php
+++ b/h-source/Application/Views/Download/index.php
@@ -29,46 +29,50 @@
<div class="credits_external_box">
<div class="credits_item_title">
- Download the h-node hardware database in xml format:
+ <?php echo gtext("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)
+ <?php echo gtext("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><?php echo gtext("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><?php echo gtext("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><?php echo gtext("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><?php echo gtext("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><?php echo gtext("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><?php echo gtext("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>
<tr>
- <td>Download the xml file of all the <b>3G cards</b> in the database</td>
+ <td><?php echo gtext("Download the xml file of all the <b>3G cards</b> in the database");?></td>
<td><a href="<?php echo $this->baseUrl."/download/threegcards/$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>soundcards</b> in the database</td>
+ <td><?php echo gtext("Download the xml file of all the <b>sound cards</b> in the database");?></td>
<td><a href="<?php echo $this->baseUrl."/download/soundcards/$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>webcams</b> in the database");?></td>
+ <td><a href="<?php echo $this->baseUrl."/download/webcams/$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/Download/index_es.php b/h-source/Application/Views/Download/index_es.php
deleted file mode 100644
index 10051a4..0000000
--- a/h-source/Application/Views/Download/index_es.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?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 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>
- <tr>
- <td>Download the xml file of all the <b>3G cards</b> in the database</td>
- <td><a href="<?php echo $this->baseUrl."/download/threegcards/$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>soundcards</b> in the database</td>
- <td><a href="<?php echo $this->baseUrl."/download/soundcards/$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_fr.php b/h-source/Application/Views/Download/index_fr.php
deleted file mode 100644
index d178a6a..0000000
--- a/h-source/Application/Views/Download/index_fr.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?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 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">
- Télécharger la base de donnée h-node au format XML:
- </div>
-
- <div class="credits_item_description">
- Vous pouvez télécharger toute la base de donnée de h-node dans un unique fichier xml afin de gérer son contenus avec des scripts (Par exemple un script python perl ou php)
-
- <div class="download_table">
- <table width="95%">
- <tr>
- <td>Télécharger toute la base de donnée au format XML</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>Télécharger la base de donnée de <b>notebooks</b> au format XML</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>Télécharger la base de donnée de <b>cartes wifi</b> au format XML</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>Télécharger la base de donnée de <b>cartes graphique</b> au format XML</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>Télécharger la base de donnée <b>d’imprimantes</b> au format XML</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>Télécharger la base de donnée de <b>scanners</b> au format XML</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>
- <tr>
- <td>Download the xml file of all the <b>3G cards</b> in the database</td>
- <td><a href="<?php echo $this->baseUrl."/download/threegcards/$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>soundcards</b> in the database</td>
- <td><a href="<?php echo $this->baseUrl."/download/soundcards/$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
deleted file mode 100644
index 1428202..0000000
--- a/h-source/Application/Views/Download/index_it.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?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 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>
- <tr>
- <td>Scarica il file xml di tutte le schede <b>3G cards</b> del database</td>
- <td><a href="<?php echo $this->baseUrl."/download/threegcards/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
- </tr>
- <tr>
- <td>Scarica il file xml di tutte le schede <b>audio</b> del database</td>
- <td><a href="<?php echo $this->baseUrl."/download/soundcards/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td>
- </tr>
- </table>
- </div>
- </div>
-
- </div>
-
- </div>