Хранилища Subversion ant

Сравнить редакции

Не учитывать пробелы Редакция 137 → Редакция 138

/trunk/feed.php
68,7 → 68,7
$result .= "<link href=\"http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/\" />\n";
$result .= "<updated>".$lastbuilddate."</updated>\n";
$result .= "<author>\n<name>\n".$core->getSetting('codename',$db)."</name>\n</author>\n";
$result .= "<id>urn:uuid:".uniqid("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/",true)."</id>\n";
$result .= "<id>urn:uuid:".$core->getUUID("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/")."</id>\n";
$query =& $db->query("SELECT * FROM changelog ORDER BY log_id DESC LIMIT 10");
if ($query->numRows()>0) {
while ($query->fetchInto($log, DB_FETCHMODE_ASSOC)) {
76,7 → 76,7
$result .= "<title type=\"html\">".stripslashes($log["log_title"])."</title>\n";
$result .= "<link href=\"http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"]."\" />\n";
$result .= "<summary type=\"html\"><![CDATA[".stripslashes($log["log_desc"])."]]></summary>\n";
$result .= "<id>urn:uuid:".uniqid("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"],true)."/changelog.php?id=".$log["log_id"])."</id>\n";
$result .= "<id>urn:uuid:".$core->getUUID("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"])."/changelog.php?id=".$log["log_id"])."</id>\n";
$updated = str_replace(" ","T",$log["log_record"]);
$updated .= "+06:00";
$result .= "<updated>".$updated."</updated>\n";
/trunk/lib/core.php
113,6 → 113,25
$query->fetchInto($sett, DB_FETCHMODE_ASSOC);
return stripslashes($sett["optvalue"]);
}
 
function getUUID($param) {
$param_s = md5($param);
$time_low = bin2hex(substr($param_s,0, 4));
$time_mid = bin2hex(substr($param_s,4, 2));
$time_hi_and_version = bin2hex(substr($param_s,6, 2));
$clock_seq_hi_and_reserved = bin2hex(substr($param_s,8, 2));
$node = bin2hex(substr($param_s,10, 6));
 
$time_hi_and_version = hexdec($time_hi_and_version);
$time_hi_and_version = $time_hi_and_version >> 4;
$time_hi_and_version = $time_hi_and_version | 0x4000;
$clock_seq_hi_and_reserved = hexdec($clock_seq_hi_and_reserved);
$clock_seq_hi_and_reserved = $clock_seq_hi_and_reserved >> 2;
$clock_seq_hi_and_reserved = $clock_seq_hi_and_reserved | 0x8000;
return sprintf('%08s-%04s-%04x-%04x-%012s',$time_low, $time_mid, $time_hi_and_version, $clock_seq_hi_and_reserved, $node);
}
}
 
?>
/trunk/admin.php
21,7 → 21,7
 
switch ($mode) {
case '0':
$display = "<ul><li><a href='".$admin."?mode=1'>Управление дистрибутивами</a></li><li><a href='".$admin."?mode=2'>Управление версиями дистрибутивов</a></li><li><a href='".$admin."?mode=3'>Управление репозиториями</a></li><li><a href='".$admin."?mode=4'>Управление секциями репозиториев</a></li><li><a href='".$admin."?mode=5'>Управление схемами репозиториев</a></li><li><a href='".$admin."?mode=7'>Управление типами репозиториев</a></li><li><a href='".$admin."?mode=8'>Управление корневыми папками репозиториев</a></li><li><a href='".$admin."?mode=6'>Управление настройками Ant</a></li><li><a href='./signout.php' style='color:red;'>Выход</a></li></ul>";
$display = "<ul><li><a href='".$admin."?mode=1'>Управление дистрибутивами</a></li><li><a href='".$admin."?mode=2'>Управление версиями дистрибутивов</a></li><li><a href='".$admin."?mode=3'>Управление репозиториями</a></li><li><a href='".$admin."?mode=4'>Управление секциями репозиториев</a></li><li><a href='".$admin."?mode=5'>Управление схемами репозиториев</a></li><li><a href='".$admin."?mode=7'>Управление типами репозиториев</a></li><li><a href='".$admin."?mode=8'>Управление корневыми папками репозиториев</a></li><li><a href='".$admin."?mode=6'>Управление настройками ".$core->getSetting('codename',$db)."</a></li><li><a href='./signout.php' style='color:red;'>Выход</a></li></ul>";
break;
case '1':
// Работа с дистрибутивами
412,7 → 412,7
case '0':
// Список настроек Ant
$req =& $db->query("SELECT * FROM settings");
$display = "<p>Имеющиеся настройки Ant</p><ul class='sectlist'>";
$display = "<p>Имеющиеся настройки ".$core->getSetting('codename',$db)."</p><ul class='sectlist'>";
if ($req->numRows()>0) {
while ($req->fetchInto($setting, DB_FETCHMODE_ASSOC)) {
$display .= "<li>Настройка: <em>".stripslashes($setting["opt"])."</em> Свойство: <em>".stripslashes($setting["optvalue"])."</em> [<a href='".$admin."?mode=6&action=2&uid=".$setting["opt_id"]."' class='edit'>править</a>][<a href='".$admin."?mode=6&action=3&uid=".$setting["opt_id"]."' class='delete'>удалить</a>]</li>";
422,7 → 422,7
break;
case '1':
// Добавление новой настройки Ant
$display = "<h3>Создание настройки Ant</h3>";
$display = "<h3>Создание настройки ".$core->getSetting('codename',$db)."</h3>";
$display .= "<form action='./process.php' method='POST'>\n";
$display .= "<input type='hidden' name='mode' value='16'>\n";
$display .= "Настройка (латиница, без пробелов): <input type='text' name='setoption'><br>\n";
434,7 → 434,7
$req =& $db->query("SELECT * FROM settings WHERE opt_id='$uid'");
if ($req->numRows()>0) {
$req->fetchInto($setting, DB_FETCHMODE_ASSOC);
$display = "<h3>Правка настройки Ant</h3>";
$display = "<h3>Правка настройки ".$core->getSetting('codename',$db)."</h3>";
$display .= "<form action='./process.php' method='POST'>\n";
$display .= "<input type='hidden' name='mode' value='17'>\n";
$display .= "<input type='hidden' name='optID' value='".stripslashes($setting["opt_id"])."'><br>\n";
464,7 → 464,7
$req =& $db->query("SELECT * FROM settings WHERE opt_id='$uid'");
if ($req->numRows()>0) {
$req->fetchInto($setting, DB_FETCHMODE_ASSOC);
$display = "<h3>Удаление настройки Ant</h3>";
$display = "<h3>Удаление настройки ".$core->getSetting('codename',$db)."</h3>";
$display .= "Удаляемая настройка <em>".stripslashes($setting["opt"])."</em> с свойством <em>".stripslashes($setting["optvalue"])."</em><br>";
$display .= "<form action='./process.php' method='POST'>\n";
$display .= "<input type='hidden' name='mode' value='18'>\n";