Редакция 315 | Редакция 317 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 315 | Редакция 316 | ||
---|---|---|---|
Строка 81... | Строка 81... | ||
81 | return $result; |
81 | return $result; |
82 | }
|
82 | }
|
83 | 83 | ||
84 | // Получение и отображение списка версий дистрибутива
|
84 | // Получение и отображение списка версий дистрибутива
|
85 | function showDistVersionsList($name, $distID, $format = 'html') { |
85 | function showDistVersionsList($name, $distID, $format = 'html') { |
- | 86 | $distname = $this->getDistName($distID); |
|
86 | $query = "SELECT * FROM ".$this->prefix."version WHERE dist_id='".$this->secure->checkInt($distID)."' ORDER BY version ASC"; |
87 | $query = "SELECT * FROM ".$this->prefix."version WHERE dist_id='".$this->secure->checkInt($distID)."' ORDER BY version ASC"; |
87 | switch ($format) { |
88 | switch ($format) { |
88 | case 'html': |
89 | case 'html': |
89 | $show = "<label for='".$name."'>".$info."</label> <select id='".$name."' name='".$name."'>\n"; |
90 | $show = "<label for='".$name."'>Версии ".$distname["DistName"]."</label> <select id='".$name."' name='".$name."'>\n"; |
90 | $rq =& $this->db->query($query); |
91 | $rq =& $this->db->query($query); |
91 | while ($rq->fetchInto($element)) { |
92 | while ($rq->fetchInto($element)) { |
92 | $show .= "<option value='".$this->secure->checkInt($element["dist_id"])."'>".$this->secure->checkStr($element["distname"],1)."</option>\n"; |
93 | $show .= "<option value='".$this->secure->checkInt($element["version_id"])."'>".$this->secure->checkStr($element["version"],1)." ".$this->secure->checkStr($element["vname"],1)."</option>\n"; |
93 | }
|
94 | }
|
94 | $show .= "</select>"; |
95 | $show .= "</select>"; |
95 | break; |
96 | break; |
96 | case 'json': |
97 | case 'json': |
97 | $show = '[{value:"",text:"'.$info.'"}'; |
98 | $show = '[{value:"",text:"Выбери версию '.$distname["DistName"].'"}'; |
98 | $rq =& $this->db->query($query); |
99 | $rq =& $this->db->query($query); |
99 | while ($rq->fetchInto($element)) { |
100 | while ($rq->fetchInto($element)) { |
100 | $show .= ',{value:"'.$this->secure->checkInt($element["dist_id"]).'",text:"'.$this->secure->checkStr($element["distname"],1).'"}'; |
101 | $show .= ',{value:"'.$this->secure->checkInt($element["version_id"]).'",text:"'.$this->secure->checkStr($element["version"],1).' '.$this->secure->checkStr($element["vname"],1).'"}'; |
101 | }
|
102 | }
|
102 | $show .= ']'; |
103 | $show .= ']'; |
103 | break; |
104 | break; |
104 | }
|
105 | }
|
105 | return $show; |
106 | return $show; |