Редакция 448 | Редакция 450 | К новейшей редакции | Содержимое файла | Сравнить с предыдущей | Последнее изменение | Открыть журнал | RSS
Редакция | Автор | № строки | Строка |
---|---|---|---|
390 | alex-w | 1 | <?php |
2 | |||
3 | /** |
||
4 | * |
||
5 | * Codename: ant-ng - generator of sources.list for Debian and |
||
6 | * distributives, based on Debian |
||
7 | * http://alex-w.org.ru/p/antng/ |
||
8 | * |
||
9 | * Copyright (c) 2009 Alexander Wolf |
||
10 | * Dual licensed under the MIT and GNU LGPL licenses. |
||
11 | * http://alex-w.org.ru/p/antng/license |
||
12 | * |
||
13 | */ |
||
14 | |||
15 | require_once dirname(__FILE__)."/init.php"; |
||
16 | |||
448 | alex-w | 17 | // for index.php |
399 | alex-w | 18 | $stepID = $secure->checkInt($_GET["step"]); |
19 | $distID = $secure->checkInt($_GET["d"]); |
||
20 | $versID = $secure->checkInt($_GET["v"]); |
||
448 | alex-w | 21 | // for manager.php |
22 | $modeID = $secure->checkInt($_GET["mode"]); |
||
23 | $actID = $secure->checkInt($_GET["action"]); |
||
390 | alex-w | 24 | |
449 | alex-w | 25 | if (preg_match("/konqueror\/(?P<major>\d+)\.(?P<minor>\d+)/i",$_SERVER["HTTP_USER_AGENT"],$konq)) { |
26 | if (($konq["major"]<4) || ($konq["major"]==4 && $konq["minor"]<3)) { |
||
27 | $dist_konq = $secure->checkStr($_GET["d"]); |
||
28 | $query = "SELECT dist_id FROM ".PREFIX."distribution WHERE distname LIKE '".$dist_konq."'"; |
||
29 | $fix = $db->query($query); |
||
30 | $fix->fetchInto($dfix); |
||
31 | $distID = $dfix["dist_id"]; |
||
32 | } |
||
33 | } |
||
424 | alex-w | 34 | |
399 | alex-w | 35 | switch($stepID) { |
390 | alex-w | 36 | case '1': |
399 | alex-w | 37 | $result = $core->showDistVersionsList("version", $distID, "json"); |
390 | alex-w | 38 | break; |
411 | alex-w | 39 | case '2': |
418 | alex-w | 40 | $result = "<form action='./get.php' method='post'>"; |
415 | alex-w | 41 | $result .= "<input type='hidden' name='d' value='".$distID."'>\n"; |
42 | $result .= "<input type='hidden' name='v' value='".$versID."'>\n"; |
||
411 | alex-w | 43 | $result .= $core->showBranchesList($versID, "html"); |
405 | alex-w | 44 | $result .= $core->showRepList($versID, 2, "html"); |
411 | alex-w | 45 | $result .= $core->showRepList($versID, 3, "html"); |
412 | alex-w | 46 | $result .= "<input type='submit' value=' Сгенерировать файл sources.list '>\n</form>"; |
401 | alex-w | 47 | break; |
390 | alex-w | 48 | } |
49 | |||
448 | alex-w | 50 | switch($modeID) { |
51 | case '1': |
||
52 | break; |
||
53 | } |
||
54 | |||
390 | alex-w | 55 | print $result; |
56 | |||
57 | ?> |