<?php
/**
 * 
 * @file channel.php
 * @copyright (c) 2005 - 2007 eifr.com
 * @license http://www.gnu.org/copyleft/gpl.html gnu/gpl
 * eifr is free software
 */

require_once('../../includes/inc_admin.php');
require_once(EIFR_ROOT . 'libraries/template.php');
require_once('class_user_channel.php');

$url = 'mod_user_channel/user_channel.php';
Common::checkAdminFileAuth($url); //check file authority
$clComUserChannel = new ComUserChannel();

if (!isset($act)) $act = '';
$uid = getCookie(COOKIE_UID);
if ($act == 'touserchannel') $uid = $selectValue;
switch ($act) {
    case 'up':
    case 'down':
        $clComUserChannel -> orderbyRecords($uid);
        break;
    case 'delete':
        $clComUserChannel -> deleteRecords();
        break;
} 

$clTemplate = new Template(getAdminTemplateDir($url));
$clComUserChannel -> layout_user_channel($uid);

?>