Ejemplo n.º 1
0
//User Class instance
$B->user =& new user();
// set the base template for this module
$B->module = SF_BASE_DIR . '/admin/modules/user/templates/index.tpl.php';
// Assign template var : module handler name
$B->this_module = EVT_HANDLER_USER;
// Switch to module features
switch ($_REQUEST['mf']) {
    case 'edit_usr':
        include SF_BASE_DIR . "/admin/modules/user/edituser.php";
        // set the base template for this module feature
        $B->section = SF_BASE_DIR . '/admin/modules/user/templates/edituser.tpl.php';
        break;
    case 'add_usr':
        // have rights to add users?
        if (FALSE == rights::ask_access_to_add_user()) {
            @header('Location: ' . SF_BASE_LOCATION . '/admin/index.php?m=USER');
            exit;
        }
        if (isset($_POST['adduser'])) {
            include SF_BASE_DIR . "/admin/modules/user/adduser.php";
        }
        // set the base template for this module feature
        $B->section = SF_BASE_DIR . '/admin/modules/user/templates/adduser.tpl.php';
        break;
    case 'del_usr':
        // Include default
        include SF_BASE_DIR . "/admin/modules/user/deluser.php";
        break;
    default:
        // set the base template for this module