<?php
/**
 * 
 * @file channel_edit.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_edit.php';
Common::checkAdminFileAuth($url); //check file authority
$clComUserChannel = new ComUserChannel();
$clTemplate = new Template(getAdminTemplateDir($url));

if (!isset($act)) $act = '';

switch ($act) {
    case 'save_add':
        $clComUserChannel -> addRecords();
        break;
    case 'save_edit':
        $clComUserChannel -> editRecords();
        break;
    case 'copy':
        $clComUserChannel -> copyRecords();
        break;

    case 'add':
    case 'edit':
    default :
        $clComUserChannel -> layout_user_channel_edit();
        break;
} 

?>