1,26 → 1,5 |
<?php |
|
/** |
* Project: Ant: sources.list generator |
* File: admin.php |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Lesser General Public |
* License as published by the Free Software Foundation; either |
* version 2.1 of the License, or (at your option) any later version. |
* |
* This library is distributed in the hope that it will be useful, |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
* Lesser General Public License for more details. |
* |
* You should have received a copy of the GNU Lesser General Public |
* License along with this library; if not, write to the Free Software |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
*/ |
|
|
include "./sign-valid.php"; |
|
$mode = abs(intval($_GET["mode"])); |
167,7 → 146,7 |
switch ($act) { |
case '0': |
// Выбор дистрибутива |
$dist =& $db->query("SELECT * FROM distribution d JOIN version v ON v.dist_id=d.dist_id"); |
$dist =& $db->query("SELECT * FROM distribution d JOIN version v ON v.dist_id=d.dist_id ORDER BY d.dist_id,v.version_id ASC"); |
$display = "В наличии есть следующие версии apt-дистрибутивов:<ul id='distlist'>"; |
while ($dist->fetchInto($info, DB_FETCHMODE_ASSOC)) { |
$display .= "<li><a href='./admin.php?mode=3&action=1&uid=".$info["version_id"]."'>".stripslashes($info["distname"])." ".stripslashes($info["version"])." “".stripslashes($info["vname"])."”</a></li>"; |
222,8 → 201,9 |
break; |
case '3': |
// Редактирование репозитория |
$rep =& $db->query("SELECT * FROM repository WHERE rep_id='$uid'"); |
$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'"); |
$rep->fetchInto($info, DB_FETCHMODE_ASSOC); |
$dist_vname = stripslashes($info["distname"])." ".stripslashes($info["version"])." “".stripslashes($info["vname"])."”"; |
$tlist = "<select name='scheme'>"; |
$sq =& $db->query("SELECT * FROM scheme"); |
while ($sq->fetchInto($type, DB_FETCHMODE_ASSOC)) { |