Хранилища Subversion ant

Редакция

Редакция 321 | Редакция 345 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 321 Редакция 329
Строка 173... Строка 173...
173
        }
173
        }
174
174
175
        return $result;
175
        return $result;
176
    }
176
    }
177
177
-
 
178
    // Отображение типа дистрибутива
-
 
179
    function showDistTypeForm($name = "dtype",$type = 0) {
-
 
180
        $query = "SELECT * FROM ".$this->prefix."dtype";
-
 
181
        $rq =& $this->db->query($query);
-
 
182
        $show = "<select name='".$name."' id='".$name."'>\n";
-
 
183
        while ($rq->fetchInto($element)) {
-
 
184
            if ($element["dtype_id"] == $type) {
-
 
185
                $show .= "<option value='".$element["dtype_id"]."' selected>".$this->secure->checkStr($element["dtype"])."</option>\n";
-
 
186
            } else {
-
 
187
                $show .= "<option value='".$element["dtype_id"]."'>".$this->secure->checkStr($element["dtype"])."</option>\n";
-
 
188
            }
-
 
189
        }
-
 
190
        $show .= "</select>";
-
 
191
-
 
192
        return $show;
-
 
193
    }
-
 
194
-
 
195
   // Отображение формы создания и редактирования apt-дистрибутива
-
 
196
    function showDistributionForm($distID = 0) {
-
 
197
        $sDistID = $this->secure->checkInt($distID);
-
 
198
        if ($sDistID != 0) {
-
 
199
            // Режим редактирования
-
 
200
            $query = "SELECT * FROM ".$this->prefix."distribution WHERE dist_id='".$sDistID."'";
-
 
201
            $rq =& $this->db->query($query);
-
 
202
            $rq->fetchInto($element);
-
 
203
        }
-
 
204
-
 
205
        if ($element["distlogo"] == 1) {
-
 
206
            $image = "<img src='./img/".$this->secure->checkStr($element["distua"],1).".png' width='32' height='32' id='adm-dist-logo'>";
-
 
207
        } else {
-
 
208
            $image = "<img src='./img/empty-logo.png' width='32' height='32' id='adm-dist-logo'>";
-
 
209
        }
-
 
210
-
 
211
        $show  = "<fieldset><legend>Дистрибутив</legend>\n";
-
 
212
        $show .= "<div class='inputbox'><label for='dname'>Название дистрибутива</label> <input type='text' name='dname' id='dname' value='".$this->secure->checkStr($element["distname"],1)."'></div>\n";
-
 
213
        $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";
-
 
214
        $show .= "<div class='inputbox'><label for='dtype'>Тип дистрибутива</label> ".$this->showDistTypeForm("dtype",$element["dtype_id"])."</div>\n";
-
 
215
        $show  = "<div class='inputbox'><table><tr><td>Логотип дистрибутива:</td>\n";
-
 
216
        $show .= "<td>".$image."</td>\n<td><input type='file' name='distlogo'></td>\n</tr></table>\n</div>\n";
-
 
217
        $show .= "<div class='inputbox'><input type='submit' value='Отправить дынные'></div>\n</fieldset>\n";
-
 
218
-
 
219
        return $show;
-
 
220
    }
-
 
221
178
}
222
}
179
223
180
?>
224
?>