Редакция 143 |
Редакция 219 |
К новейшей редакции |
Авторство |
Сравнить с предыдущей |
Последнее изменение |
Открыть журнал
| Скачать
| 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>Генератор sources.list</h2><p>".$info[1];
if ($info[0]!="unknown") {
$cnt = count($info);
switch ($cnt) {
case '2':
$telepathy .= "GNU/Linux, но явно не та, которую мы поддерживаем или дистрибутив и его версия тчательно замаскированы. Если это маскировка, то можно попробовать сгенерировать sources.list “<a href='./modern.php'>вручную</a>”.</p>";
break;
case '4':
$telepathy .= "<em>".$info[3]."</em>, а что за версия не могу разобрать. Попробуем создать sources.list “<a href='./modern.php'>вручную</a>”?</p>";
break;
case '6':
$telepathy .= "<em>".$info[3]." ".$info[5]."</em>. Если это не так, то выберите дистрибутив и версию <a href='./modern.php'>вручную</a>.</p>";
$telepathy .= "<p>Для этой версии у нас есть следующие репозитории (список нужно скопировать в файл <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->getRepListLegacy($info[2],$info[4],$db)."</pre>";
$telepathy .= "<p><a href='./get.php?id=".$info[2].",".$info[4]."'>Получить 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'," • <a href='./changelog.php'>Изменения</a> • ".$core->getInterfacesList($_SERVER["REQUEST_URI"],$db));
$smarty->display('modern.tpl');
?>