Хранилища Subversion ant

Редакция

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

<?php

/**
 * Project:     Ant: sources.list generator
 * File:        modern.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";

$info = array();

$info = $core->getInfo($_SERVER["HTTP_USER_AGENT"],$db);

$telepathy = "<h2>"._("Generator of sources.list")."</h2><p>".$info[1];

if ($info[0]!="unknown") {
        $cnt = count($info);
        switch ($cnt) {
                case '2':
                        $telepathy .= _("GNU/Linux, but certainly not one that we support or the distribution and its version tchatelno masked. If this is a disguise, you can try to generate a sources.list &#8220;<a href='./modern.php'>manually</a>&#8221;.</p>");
                break;
                case '4':
                        $telepathy .= "<em>".$info[3]."</em>, "._("and that the version I can not disassemble. Let's try to create a sources.list &#8220;<a href='./modern.php'><strong>manually</strong></a>&#8221;?</p>");
                break;
                case '6':
                        $dummyar[0] = "-1";
                        $telepathy .= "<em>".$info[3]." ".$info[5]."</em>. "._("If not, then select the distribution and version <a href='./modern.php'>manually</a>").".</p>";
                        $telepathy .= "<p>"._("For this version we have the following repository (the list should be placed in the file")."<span id='sourceslist'>/etc/apt/sources.list</span>):</p>";
                        $telepathy .= "<pre># Ant: sources.list generator :: http://track.altlug.ru/projects/show/ant\n\n".$core->getSourceList($info[2],$info[4],$dummyar,$db)."</pre>";
            $telepathy .= "<p>"._("The list represented only the basic repositories. Add extra repositories (unofficial) you can")." <a href='./classic.php?step=2&d=".$info[2]."&v=".$info[4]."'>"._("here")."</a>.</p>";
                        $telepathy .= "<p><a href='./get.php?id=".$info[2].",".$info[4]."'>"._("Get sources.list")."</a></p>";
                break;
        }
} else {
        $telepathy .= "</p>";
};

$smarty->assign('feedaddr',$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"]));
$smarty->assign('modern',$telepathy);
$smarty->assign('antversion',$core->getSetting('version',$db));
$smarty->assign('title',$core->getSetting('codename',$db));
$smarty->assign('interface'," &bull; <a href='./changelog.php'>"._("Changes")."</a> &bull; ".$core->getInterfacesList($_SERVER["REQUEST_URI"],$db));
$smarty->assign('theme',$theme->getThemeName($core,$db));

$smarty->display('modern.tpl');

?>