Редакция 89 | Редакция 96 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 89 | Редакция 91 | ||
---|---|---|---|
Строка 191... | Строка 191... | ||
191 | $list = ""; |
191 | $list = ""; |
192 | while ($sect->fetchInto($slist, DB_FETCHMODE_ASSOC)) { |
192 | while ($sect->fetchInto($slist, DB_FETCHMODE_ASSOC)) { |
193 | $list .= "<input type='checkbox' name='sect[]' value='".$slist["sect_id"]."'> <span title='".stripslashes($slist["sectinfo"])."'>".stripslashes($slist["sectname"])."</span> "; |
193 | $list .= "<input type='checkbox' name='sect[]' value='".$slist["sect_id"]."'> <span title='".stripslashes($slist["sectinfo"])."'>".stripslashes($slist["sectname"])."</span> "; |
194 | }
|
194 | }
|
195 | $type .= "</select>\n"; |
195 | $type .= "</select>\n"; |
- | 196 | $rootfolder = "<select name='rootFolder'>\n"; |
|
- | 197 | $root =& $db->query("SELECT * FROM root"); |
|
- | 198 | while ($root->fetchInto($rfi, DB_FETCHMODE_ASSOC)) { |
|
- | 199 | $rootfolder .= "<option value='".$rfi["root_id"]."'>".stripslashes($rfi["root_folder"])."</option>"; |
|
- | 200 | }
|
|
- | 201 | $rootfolder .= "</select>"; |
|
196 | $display = "<h3>Добавление нового репозитория для ".$dist_vname."</h3>"; |
202 | $display = "<h3>Добавление нового репозитория для ".$dist_vname."</h3>"; |
197 | $display .= "<form action='./process.php' method='POST'>\n"; |
203 | $display .= "<form action='./process.php' method='POST'>\n"; |
198 | $display .= "<input type='hidden' name='mode' value='7'>\n"; |
204 | $display .= "<input type='hidden' name='mode' value='7'>\n"; |
199 | $display .= "<input type='hidden' name='vers' value='$uid'>\n"; |
205 | $display .= "<input type='hidden' name='vers' value='$uid'>\n"; |
200 | $display .= "Название репозитория (codename): <input type='text' name='repName'><br>\n"; |
206 | $display .= "Название репозитория (codename): <input type='text' name='repName'><br>\n"; |
201 | $display .= "Описание репозитория:<br> <textarea name='repInfo'></textarea><br>\n"; |
207 | $display .= "Описание репозитория:<br> <textarea name='repInfo'></textarea><br>\n"; |
202 | $display .= "Схема репозитория: ".$rscheme."<br>"; |
208 | $display .= "Схема репозитория: ".$rscheme."<br>"; |
203 | $display .= "Тип репозитория: ".$reptype."<br>"; |
209 | $display .= "Тип репозитория: ".$reptype."<br>"; |
- | 210 | $display .= "Корневая папка репозитория: ".$rootfolder."<br>"; |
|
204 | $display .= "Секции: ".$list; |
211 | $display .= "Секции: ".$list; |
205 | $display .= "<br><input type='submit' value='Создать'></form>\n"; |
212 | $display .= "<br><input type='submit' value='Создать'></form>\n"; |
206 | break; |
213 | break; |
207 | case '3': |
214 | case '3': |
208 | // Редактирование репозитория
|
215 | // Редактирование репозитория
|
209 | $rep =& $db->query("SELECT * FROM repository r JOIN ver2rep l ON l.rep_id=r.rep_id JOIN version v ON v.version_id=l.ver_id JOIN distribution d ON v.dist_id=d.dist_id WHERE r.rep_id='$uid'"); |
216 | $rep =& $db->query("SELECT * FROM repository r JOIN ver2rep l ON l.rep_id=r.rep_id JOIN version v ON v.version_id=l.ver_id JOIN distribution d ON v.dist_id=d.dist_id JOIN root r2 ON r2.root_id=r.root_id WHERE r.rep_id='$uid'"); |
210 | $rep->fetchInto($info, DB_FETCHMODE_ASSOC); |
217 | $rep->fetchInto($info, DB_FETCHMODE_ASSOC); |
211 | $dist_vname = stripslashes($info["distname"])." ".stripslashes($info["version"])." “".stripslashes($info["vname"])."”"; |
218 | $dist_vname = stripslashes($info["distname"])." ".stripslashes($info["version"])." “".stripslashes($info["vname"])."”"; |
212 | $tlist = "<select name='scheme'>"; |
219 | $tlist = "<select name='scheme'>"; |
213 | $sq =& $db->query("SELECT * FROM scheme"); |
220 | $sq =& $db->query("SELECT * FROM scheme"); |
214 | while ($sq->fetchInto($type, DB_FETCHMODE_ASSOC)) { |
221 | while ($sq->fetchInto($type, DB_FETCHMODE_ASSOC)) { |
Строка 240... | Строка 247... | ||
240 | if ($req->numRows()>0) { |
247 | if ($req->numRows()>0) { |
241 | while ($req->fetchInto($sect, DB_FETCHMODE_ASSOC)) { |
248 | while ($req->fetchInto($sect, DB_FETCHMODE_ASSOC)) { |
242 | $list .= "<input type='checkbox' name='sect[]' value='".$sect["sect_id"]."'><span title='".stripslashes($sect["sectinfo"])."'>".stripslashes($sect["sectname"])."</span> "; |
249 | $list .= "<input type='checkbox' name='sect[]' value='".$sect["sect_id"]."'><span title='".stripslashes($sect["sectinfo"])."'>".stripslashes($sect["sectname"])."</span> "; |
243 | }
|
250 | }
|
244 | }
|
251 | }
|
- | 252 | $rootfolder = "<select name='rootFolder'>\n"; |
|
- | 253 | $req =& $db->query("SELECT * FROM root"); |
|
- | 254 | if ($req->numRows()>0) { |
|
- | 255 | while ($req->fetchInto($rfi, DB_FETCHMODE_ASSOC)) { |
|
- | 256 | if ($rfi["root_id"]==$info["root_id"]) { |
|
- | 257 | $rootfolder .= "<option value='".$rfi["root_id"]."' selected>".stripslashes($rfi["root_folder"])."</option>"; |
|
- | 258 | } else { |
|
- | 259 | $rootfolder .= "<option value='".$rfi["root_id"]."'>".stripslashes($rfi["root_folder"])."</option>"; |
|
- | 260 | }
|
|
- | 261 | }
|
|
- | 262 | }
|
|
- | 263 | $rootfolder .= "</select>"; |
|
- | 264 | ||
245 | $display = "<h3>Правка репозитория ".$info["repname"]." для <em>".$dist_vname."</em></h3>"; |
265 | $display = "<h3>Правка репозитория ".$info["repname"]." для <em>".$dist_vname."</em></h3>"; |
246 | $display .= "<form action='./process.php' method='POST'>\n"; |
266 | $display .= "<form action='./process.php' method='POST'>\n"; |
247 | $display .= "<input type='hidden' name='mode' value='8'>\n"; |
267 | $display .= "<input type='hidden' name='mode' value='8'>\n"; |
248 | $display .= "<input type='hidden' name='rep' value='$uid'>\n"; |
268 | $display .= "<input type='hidden' name='rep' value='$uid'>\n"; |
249 | $display .= "Название репозитория (codename): <input type='text' name='repName' value='".stripslashes($info["repname"])."'><br>\n"; |
269 | $display .= "Название репозитория (codename): <input type='text' name='repName' value='".stripslashes($info["repname"])."'><br>\n"; |
250 | $display .= "Описание репозитория:<br> <textarea name='repInfo'>".stripslashes($info["repdescribe"])."</textarea><br>\n"; |
270 | $display .= "Описание репозитория:<br> <textarea name='repInfo'>".stripslashes($info["repdescribe"])."</textarea><br>\n"; |
251 | $display .= "Схема репозитория: ".$tlist."<br>"; |
271 | $display .= "Схема репозитория: ".$tlist."<br>"; |
252 | $display .= "Тип репозитория: ".$tlist2."<br>"; |
272 | $display .= "Тип репозитория: ".$tlist2."<br>"; |
- | 273 | $display .= "Корневая папка репозитория: ".$rootfolder."<br>"; |
|
253 | $display .= "Секции: ".$list; |
274 | $display .= "Секции: ".$list; |
254 | $display .= "<br><input type='submit' value='Править'></form>\n"; |
275 | $display .= "<br><input type='submit' value='Править'></form>\n"; |
255 | break; |
276 | break; |
256 | case '4': |
277 | case '4': |
257 | // Удаление репозитория
|
278 | // Удаление репозитория
|
Строка 587... | Строка 608... | ||
587 | }
|
608 | }
|
588 | $display .= "<p><a href='./admin.php?mode=8&action=1'>Добавить новую корневую папку репозиториев</a></p>"; |
609 | $display .= "<p><a href='./admin.php?mode=8&action=1'>Добавить новую корневую папку репозиториев</a></p>"; |
589 | break; |
610 | break; |
590 | case '1': |
611 | case '1': |
591 | // Добавление новой корневой папки репозиториев
|
612 | // Добавление новой корневой папки репозиториев
|
- | 613 | $display = "<h3>Добавление корневой папки</h3>"; |
|
- | 614 | $display .= "<form action='./process.php' method='post'>\n"; |
|
- | 615 | $display .= "<input type='hidden' name='mode' value='26'>"; |
|
- | 616 | $display .= "Корневая папка: <input type='text' name='rootFolder'><br>\n"; |
|
- | 617 | $display .= "<input type='submit' value='Создать'>\n</form>\n"; |
|
592 | break; |
618 | break; |
593 | case '2': |
619 | case '2': |
594 | // Редактирование корневой папки репозиториев
|
620 | // Редактирование корневой папки репозиториев
|
- | 621 | $display = "<h3>Редактирование корневой папки</h3>"; |
|
- | 622 | $req =& $db->query("SELECT * FROM root WHERE root_id='$uid'"); |
|
- | 623 | if ($req->numRows()>0) { |
|
- | 624 | $req->fetchInto($root, DB_FETCHMODE_ASSOC); |
|
- | 625 | $display .= "<form action='./process.php' method='post'>\n"; |
|
- | 626 | $display .= "<input type='hidden' name='mode' value='27'>\n"; |
|
- | 627 | $display .= "<input type='hidden' name='rootID' value='$uid'>\n"; |
|
- | 628 | $display .= "Корневая папка репозитория: <input type='text' name='rootFolder' value='".stripslashes($root["root_folder"])."'><br>\n"; |
|
- | 629 | $display .= "<input type='submit' value='Редактировать'>\n</form>\n"; |
|
- | 630 | } else { |
|
- | 631 | $display .= "<p>Такой корневой папки репозиториев не существует</p>"; |
|
- | 632 | }
|
|
595 | break; |
633 | break; |
596 | case '3': |
634 | case '3': |
597 | // Удаление корневой папки репозиториев
|
635 | // Удаление корневой папки репозиториев
|
- | 636 | $display = "<h3>Удаление корневой папки</h3>"; |
|
- | 637 | $req =& $db->query("SELECT * FROM root WHERE root_id='$uid'"); |
|
- | 638 | if ($req->numRows()>0) { |
|
- | 639 | $req->fetchInto($root, DB_FETCHMODE_ASSOC); |
|
- | 640 | $display .= "<form action='./process.php' method='post'>\n"; |
|
- | 641 | $display .= "<input type='hidden' name='mode' value='28'>\n"; |
|
- | 642 | $display .= "<input type='hidden' name='rootID' value='$uid'>\n"; |
|
- | 643 | $display .= "Корневая папка репозитория: <input type='text' name='rootFolder' value='".stripslashes($root["root_folder"])."' readonly><br>\n"; |
|
- | 644 | $display .= "<input type='submit' value='Удалить'>\n</form>\n"; |
|
- | 645 | } else { |
|
- | 646 | $display .= "<p>Такой корневой папки не существует</p>"; |
|
- | 647 | }
|
|
598 | break; |
648 | break; |
599 | }
|
649 | }
|
600 | break; |
650 | break; |
601 | }
|
651 | }
|
602 | 652 |