Хранилища Subversion ant

Редакция

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

Редакция 559 Редакция 560
Строка 600... Строка 600...
600
     *
600
     *
601
     * @param string $name
601
     * @param string $name
602
     * @param string $actor
602
     * @param string $actor
603
     * @return string
603
     * @return string
604
     */
604
     */
605
    public function showSectionsList($name, $actor) {
605
    public function showSectionsList($name, $actor, $format = 'html') {
606
        $query = "SELECT * FROM ".$this->prefix."section";
606
        $query = "SELECT * FROM ".$this->prefix."section";
607
        $rq =& $this->db->query($query);
607
        $rq =& $this->db->query($query);
-
 
608
        switch($format) {
-
 
609
            case 'html':
-
 
610
                $show = "<ul>\n";
-
 
611
                while ($rq->fetchInto($element)) {
608
        $show = "<ul>\n";
612
                    $show .= "<li>[<a href='".$actor."?mode=".$name."&action=edit&uuid=".$element["sect_id"]."' class='edit'>править</a>][<a href='".$actor."?mode=".$name."&action=delete&uuid=".$element["sect_id"]."' class='delete'>удалить</a>] ".$this->secure->checkStr($element["secname"],1)."</li>\n";
-
 
613
                }
-
 
614
                $show .= "</ul>";
-
 
615
                break;
-
 
616
            case 'innerhtml':
-
 
617
                $show = "";
609
        while ($rq->fetchInto($element)) {
618
                while ($rq->fetchInto($element)) {
-
 
619
                    $show .= "<input type='checkbox' name='".$name."[]' value='".$element["sect_id"]."'> ".$this->secure->checkStr($element["secname"],1)." ";
-
 
620
                }                
610
            $show .= "<li>[<a href='".$actor."?mode=".$name."&action=edit&uuid=".$element["sect_id"]."' class='edit'>править</a>][<a href='".$actor."?mode=".$name."&action=delete&uuid=".$element["sect_id"]."' class='delete'>удалить</a>] ".$this->secure->checkStr($element["secname"],1)."</li>\n";
621
                break;
611
        }
622
        }
612
        $show .= "</ul>";
-
 
613
623
614
        return $show;
624
        return $show;
615
    }
625
    }
616
626
617
    /**
627
    /**
Строка 1182... Строка 1192...
1182
        $show .= "<div class='inputbox'><label for='rkey'>Ключ подписи репозитория:</label> <input type='text' name='rkey' value='".$this->secure->checkStr($element["repkey"],1)."'></div>\n";
1192
        $show .= "<div class='inputbox'><label for='rkey'>Ключ подписи репозитория:</label> <input type='text' name='rkey' value='".$this->secure->checkStr($element["repkey"],1)."'></div>\n";
1183
        $show .= "<div class='inputbox'><label for='rproto'>Протокол доступа:</label> <input type='text' name='rproto' value='".$this->secure->checkStr($element["proto"],1)."'></div>\n";
1193
        $show .= "<div class='inputbox'><label for='rproto'>Протокол доступа:</label> <input type='text' name='rproto' value='".$this->secure->checkStr($element["proto"],1)."'></div>\n";
1184
        $show .= "<div class='inputbox'><label for='rhost'>Хост репозитория:</label> <input type='text' name='rhost' value='".$this->secure->checkStr($element["rhost"],1)."'></div>\n";
1194
        $show .= "<div class='inputbox'><label for='rhost'>Хост репозитория:</label> <input type='text' name='rhost' value='".$this->secure->checkStr($element["rhost"],1)."'></div>\n";
1185
        $show .= "<div class='inputbox'><label for='rfolder'>Корневая папка:</label> <input type='text' name='rfolder' value='".$this->secure->checkStr($element["rfolder"],1)."'></div>\n";
1195
        $show .= "<div class='inputbox'><label for='rfolder'>Корневая папка:</label> <input type='text' name='rfolder' value='".$this->secure->checkStr($element["rfolder"],1)."'></div>\n";
1186
        $show .= "<div class='inputbox'><label for='rtype'>Тип репозитория:</label> ".$this->showRepType($this->secure->checkInt($element["rtype_id"]), "rtype")."</div>\n";
1196
        $show .= "<div class='inputbox'><label for='rtype'>Тип репозитория:</label> ".$this->showRepType($this->secure->checkInt($element["rtype_id"]), "rtype")."</div>\n";
-
 
1197
        $show .= "<div class='inputbox'><label for='rsects'>Секции репозитория:</label> ".$this->showSectionsList("rsects","","innerhtml")."</div>\n";
1187
        $show .= "<div class='inputbox'><input type='submit' value=' Отправить данные '></div></fieldset>\n";
1198
        $show .= "<div class='inputbox'><input type='submit' value=' Отправить данные '></div></fieldset>\n";
1188
1199
1189
        return $show;
1200
        return $show;
1190
        return $show;
1201
        return $show;
1191
    }
1202
    }
-
 
1203
   
1192
}
1204
}
1193
1205
1194
?>
1206
?>
1195
1207