. * * @category Main * @package RPMPHP * * @author Remi Collet * @author Johan Cwiklinski * @copyright 2010-2014 Remi Collet * @license http://www.gnu.org/licenses/agpl-3.0-standalone.html AGPL License 3.0 or (at your option) any later version * @link https://git.remirepo.net/cgit/web/rpmphp.git/ * @since The begining of times. */ require 'include/main.php'; $smarty->assign('ariane', $ariane); $smarty->assign('page_title', 'Packages in Fedora / RHEL / CentOS / EPEL repositories'); try { $db = new PDO ("mysql:dbname=" . MYBASE . ";host=" . MYHOST, MYUSER, MYPASS); $repo = new TableRpmRepo($db); $prev = false; $repositories = array(); $crit = array('id' => '>0', 'ORDER'=>'id'); if (!isset($_GET['eol']) || !$_GET['eol']) { $crit['active'] = 1; } foreach ($repo->request($crit) as $repo) { $repositories[] = array( 'repo_name' => ($repo['main'] != $prev ? $repo['main'] : " "), 'active' => ($repo['main'] != $prev ? ($repo['active'] ? "Yes" : "no") : " " ), 'sub_name' => $repo['sub'], 'url' => $repo['url'], 'date' => ($repo['stamp'] ? date("r", $repo['stamp']) : '') ); $prev = $repo['main']; } $smarty->assign('repositories', $repositories); } catch(PDOException $e) { $smarty->assign( 'error', sprintf("%s ERREUR : %s\n", date("r"), $e->getMessage()) ); } $smarty->assign('rpmphp_version', RPMPHP_VERSION); $smarty->assign('fedcli_version', FedoraClient::VERSION); $page_content = $smarty->fetch('index.tpl'); $smarty->assign('page_content', $page_content); $smarty->display('main.tpl'); ?>