* Created for the StreamOnTheFly project (IST-2001-32226) * Authors: András Micsik, Máté Pataki, Tamás Déri * at MTA SZTAKI DSD, http://dsd.sztaki.hu */ require "init.inc.php"; $hitsPerPage = $sotfVars->get("hitsPerPage", 15); $smarty->assign('PAGETITLE', $page->getlocalized('Stations')); $start = sotf_Utils::getParameter('start'); $station = sotf_Utils::getParameter('station'); $delete = sotf_Utils::getParameter('delete'); if ($delete) { checkPerm('node', 'delete'); $st =& $repository->getObject($station); $st->delete(); $page->addStatusMsg('delete_ok'); $page->redirect($_SERVER["PHP_SELF"]); } $limit = $page->splitList(sotf_Station::countAll(), $scriptUrl); //$result = $db->limitQuery($query, $limit["from"], $limit["maxresults"]); //get results with limit $stations = sotf_Station::listStations($limit["from"], $limit["maxresults"]); for ($i = 0; $i < count($stations); $i++) { $sprops = $stations[$i]->getAllWithIcon(); $sprops['numProgs'] = $stations[$i]->numProgrammes(); $sprops['isLocal'] = $stations[$i]->isLocal(); if (hasPerm('node', 'delete', 'change')) { $sprops['managers'] = $permissions->listUsersWithPermission($stations[$i]->id, 'admin'); } $STATION_LIST[] = $sprops; } $smarty->assign('STATIONS', $STATION_LIST); $page->send();
<?php // -*- tab-width: 3; indent-tabs-mode: 1; -*- // $Id$ require "init.inc.php"; $hitsPerPage = $sotfVars->get("hitsPerPage", 15); $smarty->assign('PAGETITLE', $page->getlocalized('Stations')); $start = sotf_Utils::getParameter('start'); $station = sotf_Utils::getParameter('station'); $delete = sotf_Utils::getParameter('delete'); if ($delete and hasPerm('node', 'delete')) { $st =& new sotf_Station($station); $st->delete(); $page->addStatusMsg('delete_ok'); $page->redirect($_SERVER["PHP_SELF"]); } $limit = $page->splitList(sotf_Station::countAll(), "{$php_self}"); //$result = $db->limitQuery($query, $limit["from"], $limit["maxresults"]); //get results with limit $stations = sotf_Station::listStations($limit["from"], $limit["maxresults"]); for ($i = 0; $i < count($stations); $i++) { $sprops = $stations[$i]->getAllWithIcon(); $sprops['numProgs'] = $stations[$i]->numProgrammes(); $sprops['isLocal'] = $stations[$i]->isLocal(); if (hasPerm('node', 'delete')) { $sprops['managers'] = $permissions->listUsersWithPermission($stations[$i]->id, 'admin'); } $STATION_LIST[] = $sprops; } $smarty->assign('STATIONS', $STATION_LIST); $page->send();
* $Id$ * Created for the StreamOnTheFly project (IST-2001-32226) * Authors: András Micsik, Máté Pataki, Tamás Déri * at MTA SZTAKI DSD, http://dsd.sztaki.hu */ require "init.inc.php"; require $config['classdir'] . "/sotf_AdvSearch.class.php"; if ($_REQUEST['select_station']) { $page->redirect($config['localPrefix'] . "/showStation.php/" . $_POST['station']); } $db->begin(); $data['numNodes'] = sotf_Node::countAll(); if ($data['numNodes'] == 0) { $data['numNodes'] = 1; } $data['numStations'] = sotf_Station::countAll(); $data['numProgs'] = sotf_Programme::countAll(); $data['numProgs'] = sotf_Programme::countAll(); $allStats = sotf_Statistics::networkStats(); $allStats['l_and_d'] = $allStats['listens'] + $allStats['downloads']; $data['access'] = $allStats; $fileStats = sotf_Programme::getFileStats(); $fileStats['size_mb'] = sprintf('%d', $fileStats['filesize'] / 1024 / 1024); $fileStats['length_hour'] = sprintf('%d', $fileStats['play_length'] / 60 / 60); $data['files'] = $fileStats; $data['numUsers'] = sotf_User::countUsers(); $smarty->assign($data); $smarty->assign('STATIONS', sotf_Station::listStationNames()); $searchLangs = $config['languages']; array_unshift($searchLangs, "any_language"); for ($i = 0; $i < count($searchLangs); $i++) {