Хранилища Subversion ant

Редакция

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

Редакция 475 Редакция 554
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 apt-distributives
6
 *  distributives, based on Debian
-
 
7
 *  http://alex-w.org.ru/p/antng/
6
 *  http://alex-w.org.ru/p/antng/
8
 *
7
 *
9
 *  Copyright (c) 2009 Alexander Wolf
8
 *  Copyright (c) 2009 Alexander Wolf
10
 *  Dual licensed under the MIT and GNU LGPL licenses.
9
 *  Dual licensed under the MIT and GNU LGPL licenses.
11
 *  http://alex-w.org.ru/p/antng/license
10
 *  http://alex-w.org.ru/p/antng/license
12
 *
11
 *
13
 */
12
 */
14
13
15
require_once dirname(__FILE__)."/init.php";
14
require_once dirname(__FILE__)."/init.php";
16
15
17
// for index.php
16
// for index.php
18
$stepID = $secure->checkInt($_GET["step"]);
17
$stepID = $secure->checkInt($_GET["step"]);
19
$distID = $secure->checkInt($_GET["d"]);
18
$distID = $secure->checkInt($_GET["d"]);
20
$versID = $secure->checkInt($_GET["v"]);
19
$versID = $secure->checkInt($_GET["v"]);
21
// for manager.php
20
// for manager.php
22
$modeID = $secure->checkInt($_GET["mode"]);
21
$modeID = $secure->checkInt($_GET["mode"]);
23
$actID  = $secure->checkInt($_GET["action"]);
22
$actID  = $secure->checkInt($_GET["action"]);
24
23
25
if (preg_match("/konqueror\/(?P<major>\d+)\.(?P<minor>\d+)/i",$_SERVER["HTTP_USER_AGENT"],$konq)) {
24
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)) {
25
    if (($konq["major"]<4) || ($konq["major"]==4 && $konq["minor"]<3)) {
27
        $dist_konq = $secure->checkStr($_GET["d"]);
26
        $dist_konq = $secure->checkStr($_GET["d"]);
28
        $query = "SELECT dist_id FROM ".PREFIX."distribution WHERE distname LIKE '".$dist_konq."'";
27
        $query = "SELECT dist_id FROM ".PREFIX."distribution WHERE distname LIKE '".$dist_konq."'";
29
        $fix = $db->query($query);
28
        $fix = $db->query($query);
30
        $fix->fetchInto($dfix);
29
        $fix->fetchInto($dfix);
31
        $distID = $dfix["dist_id"];
30
        $distID = $dfix["dist_id"];
32
        $vers_konq = $secure->checkStr($_GET["v"]);
31
        $vers_konq = $secure->checkStr($_GET["v"]);
33
        list($v,$n) = split(" ",$vers_konq);
32
        list($v,$n) = split(" ",$vers_konq);
34
        $query = "SELECT version_id FROM ".PREFIX."version WHERE version LIKE '".$v."' AND vname LIKE '".$n."'";
33
        $query = "SELECT version_id FROM ".PREFIX."version WHERE version LIKE '".$v."' AND vname LIKE '".$n."'";
35
        $fix = $db->query($query);
34
        $fix = $db->query($query);
36
        $fix->fetchInto($dfix);
35
        $fix->fetchInto($dfix);
37
        $versID = $dfix["version_id"];
36
        $versID = $dfix["version_id"];
38
    }
37
    }
39
}
38
}
40
39
41
header('Content-Type: text/html; charset=utf-8');
40
header('Content-Type: text/html; charset=utf-8');
42
41
43
switch($stepID) {
42
switch($stepID) {
44
    case '1':
43
    case '1':
45
        $result = $core->showDistVersionsList("version", $distID, "json");
44
        $result = $core->showDistVersionsList("version", $distID, "json");
46
        break;
45
        break;
47
    case '2':
46
    case '2':
48
        $result  = "<form action='./get.php' method='post'>";
47
        $result  = "<form action='./get.php' method='post'>";
49
        $result .= "<input type='hidden' name='d' value='".$distID."'>\n";
48
        $result .= "<input type='hidden' name='d' value='".$distID."'>\n";
50
        $result .= "<input type='hidden' name='v' value='".$versID."'>\n";
49
        $result .= "<input type='hidden' name='v' value='".$versID."'>\n";
51
        $result .= $core->showBranchesList($versID, "html");
50
        $result .= $core->showBranchesList($versID, "html");
52
        $result .= $core->showRepList($versID, 2, "html");        
51
        $result .= $core->showRepList($versID, 2, "html");        
53
        $result .= $core->showRepList($versID, 3, "html");
52
        $result .= $core->showRepList($versID, 3, "html");
54
        $result .= "<input type='submit' value=' Сгенерировать файл sources.list '>\n</form>";
53
        $result .= "<input type='submit' value=' Сгенерировать файл sources.list '>\n</form>";
55
        break;
54
        break;
56
}
55
}
57
56
58
switch($modeID) {
57
switch($modeID) {
59
    case '1':
58
    case '1':
60
        break;
59
        break;
61
}
60
}
62
61
63
print $result;
62
print $result;
64
63
65
?>
64
?>
66
 
65