diff options
Diffstat (limited to 'h-source/Application/Controllers/DownloadController.php')
-rw-r--r-- | h-source/Application/Controllers/DownloadController.php | 30 |
1 files changed, 21 insertions, 9 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 |