Хранилища Subversion ant

Редакция

Редакция 448 | Только различия | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 448 Редакция 449
1
<?php
1
<?php
2
2
3
/**
3
/**
4
 *  
4
 *  
5
 *  Codename: ant-ng - generator of sources.list for Debian and
5
 *  Codename: ant-ng - generator of sources.list for Debian and
6
 *  distributives, based on Debian
6
 *  distributives, based on Debian
7
 *  http://alex-w.org.ru/p/antng/
7
 *  http://alex-w.org.ru/p/antng/
8
 *
8
 *
9
 *  Copyright (c) 2009 Alexander Wolf
9
 *  Copyright (c) 2009 Alexander Wolf
10
 *  Dual licensed under the MIT and GNU LGPL licenses.
10
 *  Dual licensed under the MIT and GNU LGPL licenses.
11
 *  http://alex-w.org.ru/p/antng/license
11
 *  http://alex-w.org.ru/p/antng/license
12
 *
12
 *
13
 */
13
 */
14
14
15
require_once dirname(__FILE__)."/init.php";
15
require_once dirname(__FILE__)."/init.php";
16
16
17
// for index.php
17
// for index.php
18
$stepID = $secure->checkInt($_GET["step"]);
18
$stepID = $secure->checkInt($_GET["step"]);
19
$distID = $secure->checkInt($_GET["d"]);
19
$distID = $secure->checkInt($_GET["d"]);
20
$versID = $secure->checkInt($_GET["v"]);
20
$versID = $secure->checkInt($_GET["v"]);
21
// for manager.php
21
// for manager.php
22
$modeID = $secure->checkInt($_GET["mode"]);
22
$modeID = $secure->checkInt($_GET["mode"]);
23
$actID  = $secure->checkInt($_GET["action"]);
23
$actID  = $secure->checkInt($_GET["action"]);
24
24
-
 
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"]);
25
//TODO Написать заплатку для корректной обработки параметров из Konqueror 3.x (jQuery bug)
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
}
26
34
27
switch($stepID) {
35
switch($stepID) {
28
    case '1':
36
    case '1':
29
        $result = $core->showDistVersionsList("version", $distID, "json");
37
        $result = $core->showDistVersionsList("version", $distID, "json");
30
        break;
38
        break;
31
    case '2':
39
    case '2':
32
        $result  = "<form action='./get.php' method='post'>";
40
        $result  = "<form action='./get.php' method='post'>";
33
        $result .= "<input type='hidden' name='d' value='".$distID."'>\n";
41
        $result .= "<input type='hidden' name='d' value='".$distID."'>\n";
34
        $result .= "<input type='hidden' name='v' value='".$versID."'>\n";
42
        $result .= "<input type='hidden' name='v' value='".$versID."'>\n";
35
        $result .= $core->showBranchesList($versID, "html");
43
        $result .= $core->showBranchesList($versID, "html");
36
        $result .= $core->showRepList($versID, 2, "html");        
44
        $result .= $core->showRepList($versID, 2, "html");        
37
        $result .= $core->showRepList($versID, 3, "html");
45
        $result .= $core->showRepList($versID, 3, "html");
38
        $result .= "<input type='submit' value=' Сгенерировать файл sources.list '>\n</form>";
46
        $result .= "<input type='submit' value=' Сгенерировать файл sources.list '>\n</form>";
39
        break;
47
        break;
40
}
48
}
41
49
42
switch($modeID) {
50
switch($modeID) {
43
    case '1':
51
    case '1':
44
        break;
52
        break;
45
}
53
}
46
54
47
print $result;
55
print $result;
48
56
49
?>
57
?>
50
 
58