Хранилища Subversion ant

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

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

/trunk/changelog.php
Новый файл
0,0 → 1,48
<?php
 
/**
* Project: Ant: sources.list generator
* File: changelog.php
*
* This application is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
 
 
require_once dirname(__FILE__)."/lib/init.php";
 
$ID = abs(intval($_GET["id"]));
$skip = abs(intval($_GET["skip"]));
 
if ($ID>0) {
$query =& $db->query("SELECT * FROM changelog WHERE log_id='$ID'");
$query->fetchInto($log, DB_FETCHMODE_ASSOC);
$result = "<h2>".stripslashes($log["log_title"])."</h2>";
$result .= "<p>".stripslashes($log["log_desc"])."</p>";
$result .= "<p class='time'>".stripslashes($log["log_record"])."</p>";
} else {
$query =& $db->query("SELECT * FROM changelog ORDER BY log_id DESC");
if ($query->numRows()>0) {
while($query->fetchInto($log, DB_FETCHMODE_ASSOC)) {
$result .= "<li>".stripslashes($log["log_record"])." &bull; <a href='./changelog.php?id=".$log["log_id"]."'>".stripslashes($log["log_title"])."</a></li>";
}
}
}
 
$smarty->assign('h1','Изменения');
$smarty->assign('result',$result);
$smarty->display('index.tpl');
 
?>
/trunk/wizard.php
26,68 → 26,7
$dist = abs(intval($_GET["d"]));
$vers = abs(intval($_GET["v"]));
 
$query =& $db->query("SELECT * FROM settings WHERE opt LIKE 'version'");
$query->fetchInto($antv, DB_FETCHMODE_ASSOC);
$antversion = $antv["optvalue"];
 
$query =& $db->query("SELECT * FROM distribution");
while ($query->fetchInto($data, DB_FETCHMODE_ASSOC)) {
$linux .= "<p><input type='radio' name='d' value='".$data["dist_id"]."' />".stripslashes($data["distname"])."</p>\n";
}
 
if (!isset($status)) { $status = 0; };
 
if (isset($dist)) {
$query =& $db->query("SELECT * FROM version v JOIN distribution d ON d.dist_id=v.dist_id WHERE v.dist_id='$dist'");
$distvers = "<p><input type='hidden' name='d' value='".$dist."' /></p>\n";
while ($query->fetchInto($version, DB_FETCHMODE_ASSOC)) {
if ($version["vname"]!="") {
$distname = "&#8220;".stripslashes($version["vname"])."&#8221;";
} else {
$distname = "";
}
$distvers .= "<p><input type='radio' name='v' value='".$version["version_id"]."' />".stripslashes($version["distname"])." ".stripslashes($version["version"])." ".$distname."</p>\n";
}
}
 
if (isset($vers)) {
$query =& $db->query("SELECT * FROM settings");
$settings = array();
while ($query->fetchInto($setting, DB_FETCHMODE_ASSOC)) {
$settings[stripslashes($setting["opt"])] = stripslashes($setting["optvalue"]);
};
$query =& $db->query("SELECT * FROM version v JOIN distribution d ON d.dist_id=v.dist_id JOIN dtype p ON d.disttype=p.type_id WHERE v.dist_id='$dist' AND v.version_id='$vers'");
$query->fetchInto($infodist, DB_FETCHMODE_ASSOC);
$distname = "";
if ($infodist["vname"]!="") {
$distname = "&#8220;".stripslashes($infodist["vname"])."&#8221;";
}
$info = "<h2>Доступные репозитории для <em>".stripslashes($infodist["distname"])." ".stripslashes($infodist["version"])." ".$distname."</em></h2>";
$query =& $db->query("SELECT * FROM repository r JOIN ver2rep v ON r.rep_id=v.rep_id JOIN version v2 ON v.ver_id=v2.version_id JOIN scheme s ON s.scheme_id=r.scheme_id WHERE v.ver_id='$vers' ORDER BY r.rtype_id, r.scheme_id ASC");
$result = "<p>Скопируйте эти строки в файл <span id='sourceslist'>/etc/apt/sources.list</span>:</p><pre>";
while ($query->fetchInto($resinfo, DB_FETCHMODE_ASSOC)) {
$repscheme = stripslashes($resinfo["scheme"]);
$querysect =& $db->query("SELECT * FROM section s JOIN sect2rep r ON s.sect_id=r.sect_id WHERE
r.rep_id='$resinfo[rep_id]'");
$sections = "";
while ($querysect->fetchInto($section,DB_FETCHMODE_ASSOC)) {
$sections .= stripslashes($section["sectname"])." ";
}
 
$repscheme = str_replace("{TYPE}",stripslashes($infodist["type"]),$repscheme);
$repscheme = str_replace("{PROTO}",$settings["proto"],$repscheme);
$repscheme = str_replace("{URL}",$settings["url"],$repscheme);
$repscheme = str_replace("{REP}",stripslashes($resinfo["repname"]),$repscheme);
$repscheme = str_replace("{DIST}",stripslashes($infodist["vcodename"]),$repscheme);
$repscheme = str_replace("{SECT}",$sections,$repscheme);
$result .= $repscheme."\n";
}
$result .= "</pre>";
$result = $info.$result;
}
 
$smarty->assign('status',$status);
$smarty->assign('linux',$linux);
$smarty->assign('version',$distvers);
/trunk/css/ant.css
1,3 → 1,9
/*
 
Theme Ant (default)
 
*/
 
body {
background: #fff url(../img/bg.gif) top left repeat;
}
/trunk/templates/index.tpl
1,29 → 1,9
{config_load file=ant.conf section="setup"}
{include file="header.tpl" title='Ant'}
 
<div id='ant'>
{if $status == 0}
<h2>Выбор дистрибутива</h2>
<form action='./index.php' method='get'>
<p><input type='hidden' name='step' value='1'></p>
{$linux}
<p><input type='submit' value=' Выбрать дистрибутив '></p>
</form>
{/if}
<h1>{$h1}</h1>
 
{if $status == 1}
<h2>Выбор версии дистрибутива</h2>
<form action='./index.php' method='get'>
<p><input type='hidden' name='step' value='2'></p>
{$version}
<p><input type='submit' value=' Получить sources.list '></p>
</form>
{/if}
 
{if $status == 2}
{$result}
{/if}
</div>
 
<div id='footer'><a href="http://track.altlug.ru/projects/show/ant">Ant {$antversion}</a> {$interface}</div>