Хранилища Subversion ant

Сравнить редакции

Не учитывать пробелы Редакция 321 → Редакция 329

/branches/ant-ng/lib/core.php
175,6 → 175,50
return $result;
}
 
// Отображение типа дистрибутива
function showDistTypeForm($name = "dtype",$type = 0) {
$query = "SELECT * FROM ".$this->prefix."dtype";
$rq =& $this->db->query($query);
$show = "<select name='".$name."' id='".$name."'>\n";
while ($rq->fetchInto($element)) {
if ($element["dtype_id"] == $type) {
$show .= "<option value='".$element["dtype_id"]."' selected>".$this->secure->checkStr($element["dtype"])."</option>\n";
} else {
$show .= "<option value='".$element["dtype_id"]."'>".$this->secure->checkStr($element["dtype"])."</option>\n";
}
}
$show .= "</select>";
 
return $show;
}
 
// Отображение формы создания и редактирования apt-дистрибутива
function showDistributionForm($distID = 0) {
$sDistID = $this->secure->checkInt($distID);
if ($sDistID != 0) {
// Режим редактирования
$query = "SELECT * FROM ".$this->prefix."distribution WHERE dist_id='".$sDistID."'";
$rq =& $this->db->query($query);
$rq->fetchInto($element);
}
 
if ($element["distlogo"] == 1) {
$image = "<img src='./img/".$this->secure->checkStr($element["distua"],1).".png' width='32' height='32' id='adm-dist-logo'>";
} else {
$image = "<img src='./img/empty-logo.png' width='32' height='32' id='adm-dist-logo'>";
}
 
$show = "<fieldset><legend>Дистрибутив</legend>\n";
$show .= "<div class='inputbox'><label for='dname'>Название дистрибутива</label> <input type='text' name='dname' id='dname' value='".$this->secure->checkStr($element["distname"],1)."'></div>\n";
$show .= "<div class='inputbox'><label for='dua'>UA дистрибутива</label> <input type='text' name='dua' id='dua' value='".$this->secure->checkStr($element["distua"],1)."'></div>\n";
$show .= "<div class='inputbox'><label for='dtype'>Тип дистрибутива</label> ".$this->showDistTypeForm("dtype",$element["dtype_id"])."</div>\n";
$show = "<div class='inputbox'><table><tr><td>Логотип дистрибутива:</td>\n";
$show .= "<td>".$image."</td>\n<td><input type='file' name='distlogo'></td>\n</tr></table>\n</div>\n";
$show .= "<div class='inputbox'><input type='submit' value='Отправить дынные'></div>\n</fieldset>\n";
 
return $show;
}
 
}
 
?>