diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-03-06 16:13:52 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-03-06 16:13:52 +0000 |
commit | b588efb71e62470d96a85528960a7e2385e934b0 (patch) | |
tree | 70a5b003edca35feb5b271157e57f2ad895e68b7 /h-source | |
parent | 0a1bbc3293fc57494286a13b520aac77028993b9 (diff) |
improved DownloadController
Diffstat (limited to 'h-source')
-rw-r--r-- | h-source/Application/Controllers/DownloadController.php | 20 | ||||
-rw-r--r-- | h-source/Application/Include/languages.php | 1 | ||||
-rw-r--r-- | h-source/Application/Views/Download/index.php | 4 | ||||
-rw-r--r-- | h-source/Config/Route.php | 1 |
4 files changed, 25 insertions, 1 deletions
diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php index 72292f6..f79fe7e 100644 --- a/h-source/Application/Controllers/DownloadController.php +++ b/h-source/Application/Controllers/DownloadController.php @@ -113,6 +113,11 @@ class DownloadController extends BaseController $xml .= "\t\t<it_works>".$row['hardware']['sound_card_works']."</it_works>\n"; } + if ($type === 'bluetooth') + { + $xml .= "\t\t<it_works>".$row['hardware']['bluetooth_works']."</it_works>\n"; + } + if ($type === 'webcam') { $xml .= "\t\t<it_works>".$row['hardware']['webcam_works']."</it_works>\n"; @@ -123,7 +128,7 @@ class DownloadController extends BaseController $xml .= "\t\t<it_works>".$row['hardware']['video_card_works']."</it_works>\n"; } - if ($type === 'printer' or $type === 'scanner' or $type === 'soundcard' or $type === 'webcam') + if ($type === 'printer' or $type === 'scanner' or $type === 'soundcard' or $type === 'webcam' or $type === 'bluetooth') { $xml .= "\t\t<driver>".$row['hardware']['driver']."</driver>\n"; } @@ -257,4 +262,17 @@ class DownloadController extends BaseController $this->clean(); $this->load('xml'); } + + public function bluetooth($lang = 'en') + { + header ("Content-Type:text/xml"); + + $res = $this->m['HardwareModel']->clear()->select()->where(array('type'=>'bluetooth','-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 ffcef4e..a1b5ab1 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -214,6 +214,7 @@ class Lang "Watch all the actions carried out by administrators" => "Guarda tutte le azioni compiute dagli amministratori", "No bluetooth devices found" => "Non รจ stato trovato alcun dispositivo bluetooth", "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", ), 'es' => array ( diff --git a/h-source/Application/Views/Download/index.php b/h-source/Application/Views/Download/index.php index c153fb8..1eb2a63 100644 --- a/h-source/Application/Views/Download/index.php +++ b/h-source/Application/Views/Download/index.php @@ -73,6 +73,10 @@ <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> + <tr> + <td><?php echo gtext("Download the xml file of all the <b>bluetooth devices</b> in the database");?></td> + <td><a href="<?php echo $this->baseUrl."/download/bluetooth/$lang";?>"><img src="<?php echo $this->baseUrl?>/Public/Img/H2O/download.png"></a></td> + </tr> </table> </div> </div> diff --git a/h-source/Config/Route.php b/h-source/Config/Route.php index 48521b5..9333134 100644 --- a/h-source/Config/Route.php +++ b/h-source/Config/Route.php @@ -100,6 +100,7 @@ class Route 'download,threegcards', 'download,soundcards', 'download,webcams', + 'download,bluetooth', 'history,hide', 'history,show', 'history,block', |