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

$url = 'mod_user/user_edit.php';
Common::checkAdminFileAuth($url); //check file authority
$clComUser = new ComUser();

$act = kGet('act');
switch ($act) {
    case 'save_add':
        $clComUser -> addRecords();
        break;
        
    case 'save_edit':
        $clComUser -> editRecords();
        break;
        
    case 'save_edit_detail':
        $clComUser -> editFieldDetail();
        break;
        
    case 'edit':
        $edittype = '';
        if (isset($_GET['edittype'])) $edittype = $_GET['edittype'];
        if ($edittype == 'all') {
            $clComUser -> layout_user_edit_all();
        } else {
            $clComUser -> layout_user_edit_general();
        } 
        break;
        
    case 'edit_detail':
        $layout = $clComUser -> get_layout_edit_detail();
        require_once(getAdminTemplatePath('user_edit_detail', $url));
        break;
        
    case 'add':
    default :
        $clComUser -> layout_user_edit_add();
        break;
} 

?>