<?php
/**
 * 
 * @file user_repository_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_user_repository.php');

$url = 'mod_user_repository/user_repository_edit.php';
Common::checkAdminFileAuth($url); //check file authority
$clComUserRepository = new ComUserRepository();

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

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

    case 'add':
    case 'edit':
    default :
        $clComUserRepository -> layout_user_repository_edit();
        break;
} 

?>