602,14 → 602,24 |
* @param string $actor |
* @return string |
*/ |
public function showSectionsList($name, $actor) { |
public function showSectionsList($name, $actor, $format = 'html') { |
$query = "SELECT * FROM ".$this->prefix."section"; |
$rq =& $this->db->query($query); |
switch($format) { |
case 'html': |
$show = "<ul>\n"; |
while ($rq->fetchInto($element)) { |
$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"; |
} |
$show .= "</ul>"; |
break; |
case 'innerhtml': |
$show = ""; |
while ($rq->fetchInto($element)) { |
$show .= "<input type='checkbox' name='".$name."[]' value='".$element["sect_id"]."'> ".$this->secure->checkStr($element["secname"],1)." "; |
} |
break; |
} |
|
return $show; |
} |
1184,11 → 1194,13 |
$show .= "<div class='inputbox'><label for='rhost'>Хост репозитория:</label> <input type='text' name='rhost' value='".$this->secure->checkStr($element["rhost"],1)."'></div>\n"; |
$show .= "<div class='inputbox'><label for='rfolder'>Корневая папка:</label> <input type='text' name='rfolder' value='".$this->secure->checkStr($element["rfolder"],1)."'></div>\n"; |
$show .= "<div class='inputbox'><label for='rtype'>Тип репозитория:</label> ".$this->showRepType($this->secure->checkInt($element["rtype_id"]), "rtype")."</div>\n"; |
$show .= "<div class='inputbox'><label for='rsects'>Секции репозитория:</label> ".$this->showSectionsList("rsects","","innerhtml")."</div>\n"; |
$show .= "<div class='inputbox'><input type='submit' value=' Отправить данные '></div></fieldset>\n"; |
|
return $show; |
return $show; |
} |
|
} |
|
?> |