Редакция 557 | Редакция 559 | К новейшей редакции | Весь файл | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 557 | Редакция 558 | ||
---|---|---|---|
Строка 1110... | Строка 1110... | ||
1110 | $show .= "</ul>"; |
1110 | $show .= "</ul>"; |
1111 | return $show; |
1111 | return $show; |
1112 | }
|
1112 | }
|
1113 | 1113 | ||
1114 | /**
|
1114 | /**
|
- | 1115 | * Вывод списка типов репозиториев
|
|
- | 1116 | *
|
|
- | 1117 | * @author Alexander Wolf
|
|
- | 1118 | * @category Core
|
|
- | 1119 | *
|
|
- | 1120 | * @param integer $reptype
|
|
- | 1121 | * @param string $name
|
|
- | 1122 | * @return string
|
|
- | 1123 | */
|
|
- | 1124 | public function showRepType($reptype = 0, $name = "") { |
|
- | 1125 | $sRT = $this->secure->checkInt($reptype); |
|
- | 1126 | $sNM = $this->secure->checkStr($name,1); |
|
- | 1127 | $query = "SELECT * FORM ".$this->prefix."rtype"; |
|
- | 1128 | $rq =& $this->db->query($query); |
|
- | 1129 | $show = "<select name='".$sNM."' id='".$sNM."'>\n"; |
|
- | 1130 | while ($rq->fetchInto($element)) { |
|
- | 1131 | if ($element["rtype_id"]==$sRT) { |
|
- | 1132 | $show .= "<option value='".$this->secure->checkInt($element["rtype_id"])."' selected>".$this->secure->checkStr($element["rtype"],1)."</option>\n"; |
|
- | 1133 | } else { |
|
- | 1134 | $show .= "<option value='".$this->secure->checkInt($element["rtype_id"])."'>".$this->secure->checkStr($element["rtype"],1)."</option>\n"; |
|
- | 1135 | }
|
|
- | 1136 | }
|
|
- | 1137 | $show .= "</select>"; |
|
- | 1138 | ||
- | 1139 | return $show; |
|
- | 1140 | }
|
|
- | 1141 | ||
- | 1142 | /**
|
|
1115 | * Форма создания/редактирвоания репозиториев
|
1143 | * Форма создания/редактирвоания репозиториев
|
1116 | *
|
1144 | *
|
1117 | * @author Alexander Wolf
|
1145 | * @author Alexander Wolf
|
1118 | * @category Core
|
1146 | * @category Core
|
1119 | *
|
1147 | *
|
Строка 1132... | Строка 1160... | ||
1132 | if ($sRType == "") { |
1160 | if ($sRType == "") { |
1133 | $sRType = "deb"; |
1161 | $sRType = "deb"; |
1134 | }
|
1162 | }
|
1135 | if ($sRepID != 0) { |
1163 | if ($sRepID != 0) { |
1136 | // Режим редактирования
|
1164 | // Режим редактирования
|
1137 | $query = "SELECT r.repname,r.repinfo,r.repkey,rt.rtype,p.proto,h.rhost,f.rfolder,v.*,d.distname,dt.type FROM ".$this->prefix."repository r "; |
1165 | $query = "SELECT r.rtype_id,r.repname,r.repinfo,r.repkey,p.proto,h.rhost,f.rfolder,v.*,d.distname,dt.type FROM ".$this->prefix."repository r "; |
1138 | $query .= "JOIN ".$this->prefix."rtype rt ON r.rtype_id=rt.rtype_id "; |
1166 | //$query .= "JOIN ".$this->prefix."rtype rt ON r.rtype_id=rt.rtype_id ";
|
1139 | $query .= "JOIN ".$this->prefix."protos p ON r.proto_id=p.proto_id "; |
1167 | $query .= "JOIN ".$this->prefix."protos p ON r.proto_id=p.proto_id "; |
1140 | $query .= "JOIN ".$this->prefix."rephost h ON r.rhost_id=h.rhost_id "; |
1168 | $query .= "JOIN ".$this->prefix."rephost h ON r.rhost_id=h.rhost_id "; |
1141 | $query .= "JOIN ".$this->prefix."repfolder f ON r.rfolder_id=f.rfolder_id "; |
1169 | $query .= "JOIN ".$this->prefix."repfolder f ON r.rfolder_id=f.rfolder_id "; |
1142 | $query .= "JOIN ".$this->prefix."version v ON r.version=v.version_id "; |
1170 | $query .= "JOIN ".$this->prefix."version v ON r.version=v.version_id "; |
1143 | $query .= "JOIN ".$this->prefix."distribution d ON v.dist_id=d.dist_id "; |
1171 | $query .= "JOIN ".$this->prefix."distribution d ON v.dist_id=d.dist_id "; |
Строка 1153... | Строка 1181... | ||
1153 | $show .= "<div class='inputbox'><label for='rinfo'>Описание репозитория:</label> <input type='text' name='rinfo' value='".$this->secure->checkStr($element["repinfo"],1)."'></div>\n"; |
1181 | $show .= "<div class='inputbox'><label for='rinfo'>Описание репозитория:</label> <input type='text' name='rinfo' value='".$this->secure->checkStr($element["repinfo"],1)."'></div>\n"; |
1154 | $show .= "<div class='inputbox'><label for='rkey'>Ключ подписи репозитория:</label> <input type='text' name='rkey' value='".$this->secure->checkStr($element["repkey"],1)."'></div>\n"; |
1182 | $show .= "<div class='inputbox'><label for='rkey'>Ключ подписи репозитория:</label> <input type='text' name='rkey' value='".$this->secure->checkStr($element["repkey"],1)."'></div>\n"; |
1155 | $show .= "<div class='inputbox'><label for='rproto'>Протокол доступа:</label> <input type='text' name='rproto' value='".$this->secure->checkStr($element["proto"],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"; |
1156 | $show .= "<div class='inputbox'><label for='rhost'>Хост репозитория:</label> <input type='text' name='rhost' value='".$this->secure->checkStr($element["rhost"],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"; |
1157 | $show .= "<div class='inputbox'><label for='rfolder'>Корневая папка:</label> <input type='text' name='rfolder' value='".$this->secure->checkStr($element["rfolder"],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"; |
- | 1186 | $show .= "<div class='inputbox'><label for='rtype'>Тип репозитория:</label> ".$this->showRepType($this->secure->checkInt($element["rtype_id"]), "rtype")."</div>\n"; |
|
1158 | $show .= "<div class='inputbox'><input type='submit' value=' Отправить данные '></div></fieldset>\n"; |
1187 | $show .= "<div class='inputbox'><input type='submit' value=' Отправить данные '></div></fieldset>\n"; |
1159 | 1188 | ||
1160 | return $show; |
1189 | return $show; |
1161 | return $show; |
1190 | return $show; |
1162 | }
|
1191 | }
|