<?php
/**
 * 
 * @file link_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('class_link.php');

$url = 'mod_link/link_edit.php';
Common::checkAdminFileAuth($url); //check file authority
$clComLink = new ComLink();

$act = '';
if (isset($_GET['act'])) $act = $_GET['act'];

switch ($act) {
    case 'save':
        $selectid = '';
        if (isset($_POST['selectValue'])) $selectid = $_POST['selectValue'];
        if ($selectid == '') {
            $clComLink -> addRecords();
        } else {
            $clComLink -> editRecords();
        } 
        break;

    case 'add':
    case 'edit':
    default :
        $clComLink -> layout_link_edit();
        break;
} 

?>