Хранилища Subversion ant

Редакция

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

Редакция 452 Редакция 453
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
/*
-
 
26
if (preg_match("/konqueror\/(?P<major>\d+)\.(?P<minor>\d+)/i",$_SERVER["HTTP_USER_AGENT"],$konq)) {
25
if (preg_match("/konqueror\/(?P<major>\d+)\.(?P<minor>\d+)/i",$_SERVER["HTTP_USER_AGENT"],$konq)) {
27
    if (($konq["major"]<4) || ($konq["major"]==4 && $konq["minor"]<3)) {
26
    if (($konq["major"]<4) || ($konq["major"]==4 && $konq["minor"]<3)) {
28
        $dist_konq = $secure->checkStr($_GET["d"]);
27
        $dist_konq = $secure->checkStr($_GET["d"]);
29
        $query = "SELECT dist_id FROM ".PREFIX."distribution WHERE distname LIKE '".$dist_konq."'";
28
        $query = "SELECT dist_id FROM ".PREFIX."distribution WHERE distname LIKE '".$dist_konq."'";
30
        $fix = $db->query($query);
29
        $fix = $db->query($query);
31
        $fix->fetchInto($dfix);
30
        $fix->fetchInto($dfix);
32
        $distID = $dfix["dist_id"];
31
        $distID = $dfix["dist_id"];
33
        $vers_konq = $secure->checkStr($_GET["v"]);
32
        $vers_konq = $secure->checkStr($_GET["v"]);
34
        list($v,$n) = split(" ",$vers_konq);
33
        list($v,$n) = split(" ",$vers_konq);
35
        $query = "SELECT version_id FROM ".PREFIX."version WHERE version LIKE '".$v."' AND vname LIKE '".$n."'";
34
        $query = "SELECT version_id FROM ".PREFIX."version WHERE version LIKE '".$v."' AND vname LIKE '".$n."'";
36
        $fix = $db->query($query);
35
        $fix = $db->query($query);
37
        $fix->fetchInto($dfix);
36
        $fix->fetchInto($dfix);
38
        $versID = $dfix["version_id"];
37
        $versID = $dfix["version_id"];
39
    }
38
    }
40
}
39
}
41
*/
-
 
42
40
43
switch($stepID) {
41
switch($stepID) {
44
    case '1':
42
    case '1':
45
        $result = $core->showDistVersionsList("version", $distID, "json");
43
        $result = $core->showDistVersionsList("version", $distID, "json");
46
        break;
44
        break;
47
    case '2':
45
    case '2':
48
        $result  = "<form action='./get.php' method='post'>";
46
        $result  = "<form action='./get.php' method='post'>";
49
        $result .= "<input type='hidden' name='d' value='".$distID."'>\n";
47
        $result .= "<input type='hidden' name='d' value='".$distID."'>\n";
50
        $result .= "<input type='hidden' name='v' value='".$versID."'>\n";
48
        $result .= "<input type='hidden' name='v' value='".$versID."'>\n";
51
        $result .= $core->showBranchesList($versID, "html");
49
        $result .= $core->showBranchesList($versID, "html");
52
        $result .= $core->showRepList($versID, 2, "html");        
50
        $result .= $core->showRepList($versID, 2, "html");        
53
        $result .= $core->showRepList($versID, 3, "html");
51
        $result .= $core->showRepList($versID, 3, "html");
54
        $result .= "<input type='submit' value=' Сгенерировать файл sources.list '>\n</form>";
52
        $result .= "<input type='submit' value=' Сгенерировать файл sources.list '>\n</form>";
55
        break;
53
        break;
56
}
54
}
57
55
58
switch($modeID) {
56
switch($modeID) {
59
    case '1':
57
    case '1':
60
        break;
58
        break;
61
}
59
}
62
60
63
print $result;
61
print $result;
64
62
65
?>
63
?>
66
 
64