Хранилища Subversion ant

Редакция

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

Редакция 510 Редакция 511
Строка 418... Строка 418...
418
     * @category Core
418
     * @category Core
419
     *
419
     *
420
     * @param integer $distID
420
     * @param integer $distID
421
     * @return string
421
     * @return string
422
     */
422
     */
423
    public function showDistributionForm($distID = 0) {
423
    public function showDistributionForm($distID = 0, $info = '') {
424
        $sDistID = $this->secure->checkInt($distID);
424
        $sDistID = $this->secure->checkInt($distID);
-
 
425
        $sInfo = $this->secure->checkStr($info, 1);
-
 
426
        if ($sInfo == "") {
-
 
427
            $sInfo = "Дистрибутив";
-
 
428
        }
425
        if ($sDistID != 0) {
429
        if ($sDistID != 0) {
426
            // Режим редактирования
430
            // Режим редактирования
427
            $query = "SELECT * FROM ".$this->prefix."distribution WHERE dist_id='".$sDistID."'";
431
            $query = "SELECT * FROM ".$this->prefix."distribution WHERE dist_id='".$sDistID."'";
428
            $rq =& $this->db->query($query);
432
            $rq =& $this->db->query($query);
429
            $rq->fetchInto($element);
433
            $rq->fetchInto($element);
Строка 433... Строка 437...
433
            $image = "<img src='./img/d/".$this->secure->checkStr($element["distua"],1).".png' width='32' height='32' id='adm-dist-logo' alt='Логотип дистрибутива ".$this->secure->checkStr($element["distname"],1)."' title='Логотип дистрибутива ".$this->secure->checkStr($element["distname"],1)."'>";
437
            $image = "<img src='./img/d/".$this->secure->checkStr($element["distua"],1).".png' width='32' height='32' id='adm-dist-logo' alt='Логотип дистрибутива ".$this->secure->checkStr($element["distname"],1)."' title='Логотип дистрибутива ".$this->secure->checkStr($element["distname"],1)."'>";
434
        } else {
438
        } else {
435
            $image = "<img src='./img/d/empty-logo.png' width='32' height='32' id='adm-dist-logo' alt='Логотип дистрибутива' title='Логотип дистрибутива не загружен'>";
439
            $image = "<img src='./img/d/empty-logo.png' width='32' height='32' id='adm-dist-logo' alt='Логотип дистрибутива' title='Логотип дистрибутива не загружен'>";
436
        }
440
        }
437
441
438
        $show  = "<fieldset><legend>Дистрибутив</legend>\n";
442
        $show  = "<fieldset><legend>".$sInfo."</legend>\n";
439
        $show .= "<div class='inputbox'><label for='dname'>Название дистрибутива:</label> <input type='text' name='dname' id='dname' value='".$this->secure->checkStr($element["distname"],1)."'></div>\n";
443
        $show .= "<div class='inputbox'><label for='dname'>Название дистрибутива:</label> <input type='text' name='dname' id='dname' value='".$this->secure->checkStr($element["distname"],1)."'></div>\n";
440
        $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";
444
        $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";
441
        $show .= "<div class='inputbox'><label for='dtype'>Тип дистрибутива:</label> ".$this->showDistTypeForm("dtype",$element["dtype_id"])."</div>\n";
445
        $show .= "<div class='inputbox'><label for='dtype'>Тип дистрибутива:</label> ".$this->showDistTypeForm("dtype",$element["dtype_id"])."</div>\n";
442
        $show .= "<div class='inputbox'><table><tr><td class='td-name'>Логотип дистрибутива:</td>\n";
446
        $show .= "<div class='inputbox'><table><tr><td class='td-name'>Логотип дистрибутива:</td>\n";
443
        $show .= "<td>".$image."</td>\n<td><input type='file' name='distlogo'></td>\n</tr></table>\n</div>\n";
447
        $show .= "<td>".$image."</td>\n<td><input type='file' name='distlogo'></td>\n</tr></table>\n</div>\n";
Строка 556... Строка 560...
556
     * @param string $name
560
     * @param string $name
557
     * @param string $actor
561
     * @param string $actor
558
     * @param integer $versionID
562
     * @param integer $versionID
559
     * @return string
563
     * @return string
560
     */
564
     */
561
    public function showDistVersionsForm($versionID = 0) {
565
    public function showDistVersionsForm($versionID = 0, $info = '') {
562
        $sVersionID = $this->secure->checkInt($versionID);
566
        $sVersionID = $this->secure->checkInt($versionID);
-
 
567
        $sInfo = $this->secure->checkStr($info, 1);
-
 
568
        if ($sInfo == "") {
-
 
569
            $sInfo = "Версия дистрибутива";
-
 
570
        }
563
        if ($sVersionID != 0) {
571
        if ($sVersionID != 0) {
564
            // Режим редактирования
572
            // Режим редактирования
565
            $query = "SELECT * FROM ".$this->prefix."version v JOIN ".$this->prefix."distribution d ON v.dist_id=d.dist_id WHERE v.version_id='".$versionID."'";
573
            $query = "SELECT * FROM ".$this->prefix."version v JOIN ".$this->prefix."distribution d ON v.dist_id=d.dist_id WHERE v.version_id='".$versionID."'";
566
            $rq =& $this->db->query($query);
574
            $rq =& $this->db->query($query);
567
            $rq->fetchInto($element);
575
            $rq->fetchInto($element);
568
        }
576
        }
569
 
577
 
570
        $show  = "<fieldset><legend>Версия дистрибутива</legend>\n";
578
        $show  = "<fieldset><legend>".$sInfo."</legend>\n";
571
        if ($sVersionID != 0) {
579
        if ($sVersionID != 0) {
572
            $show .= "<div class='inputbox'><label for='distname'>Дистрибутив:</label> <input type='text' name='distname' value='".$this->secure->checkStr($element["distname"],1)."' readonly='readonly'></div>\n";
580
            $show .= "<div class='inputbox'><label for='distname'>Дистрибутив:</label> <input type='text' name='distname' value='".$this->secure->checkStr($element["distname"],1)."' readonly='readonly'></div>\n";
573
        } else {
581
        } else {
574
            $show .= "<div class='inputbox'><label for='distname'>Дистрибутив:</label> ".$this->showDistributionList("distname", "", "", "innerhtml")."</div>\n";
582
            $show .= "<div class='inputbox'><label for='distname'>Дистрибутив:</label> ".$this->showDistributionList("distname", "", "", "innerhtml")."</div>\n";
575
        }
583
        }