Esempio n. 1
0
File: conf.php Progetto: gblok/rsc
<?php

//ADMIN :: configuration
//define admin department
$admin_dpt = array("id" => "conf", "sort_order" => 30, "name" => ADMIN_SETTINGS, "sub_departments" => array(array("id" => "setting", "name" => ADMIN_SETTINGS_GENERAL), array("id" => "currencies", "name" => ADMIN_CURRENCY_TYPES), array("id" => "shipping", "name" => STRING_SHIPPING_TYPE), array("id" => "payment", "name" => STRING_PAYMENT_TYPE), array("id" => "blocks_edit", "name" => ADMIN_CONF_BLOCKS), array("id" => "admin_edit", "name" => ADMIN_CONF_ADMINS), array("id" => "countries", "name" => ADMIN_COUNTRIES), array("id" => "zones", "name" => ADMIN_MENU_TAXEZ)));
add_department($admin_dpt);
//show department if it is being selected
if ($dpt == "conf") {
    //set default sub department if required
    if (!isset($sub)) {
        $sub = "setting";
    }
    if (file_exists("core/includes/admin/sub/" . $admin_dpt["id"] . "_{$sub}.php")) {
        //assign admin main department template
        $smarty->assign("admin_main_content_template", $admin_dpt["id"] . ".tpl");
        //assign subdepts
        $smarty->assign("admin_sub_departments", $admin_dpt["sub_departments"]);
        //include selected sub-department
        include "core/includes/admin/sub/" . $admin_dpt["id"] . "_{$sub}.php";
    } else {
        //no sub department found
        $smarty->assign("admin_main_content_template", "notfound.tpl");
    }
}
Esempio n. 2
0
     $DoB = $_POST['DoB'];
     $Name = $_POST['Name'];
     $Sex = $_POST['Sex'];
     $Address = $_POST['Address'];
     $Email = $_POST['Email'];
     $Distance = $_POST['Distance'];
     $BSSalary = $_POST['BSSalary'];
     $PoF = $_POST['PoF'];
     $pwd = sha1($EId . $_POST['pwd']);
     add_user($EId, $DoB, $Name, $Sex, $Email, $Distance, $BSSalary, $PoF, $pwd);
     include '/view/add_user.php';
     break;
 case 'add_department':
     $Name = $_POST['Name'];
     $Info = $_POST['Info'];
     add_department($Name, $Info);
     include 'view/department.php';
     break;
 case 'delete_department':
     delete_department($_POST['DId']);
     include 'view/department.php';
     break;
 case 'show_project':
     include 'view/project.php';
     break;
 case 'Delete_EP':
     $PId = $_POST["PId"];
     $EId = $_POST["EId"];
     Delete_EP($PId, $EId);
     include 'view/project.php';
     break;
    $department = $_POST['department'];
    $email = $_POST['email'];
    if (!empty($_POST['job_title'])) {
        $job_title = $_POST['job_title'];
        $error = add_user($firstname, $lastname, $department, $email, $job_title);
    } else {
        $error = add_user($firstname, $lastname, $department, $email, NULL);
    }
} else {
    if (isset($_GET['AddUser'])) {
        $add_user_message = "Gebruiker toegevoegd";
    } else {
        if (isset($_POST['add_department'])) {
            $department = $_POST['department'];
            $manager = $_POST['manager'];
            add_department($department, $manager);
        } else {
            if (isset($_GET['AddDepartment'])) {
                $add_department_message = "Department toegevoegd";
            }
        }
    }
}
?>
    <aside class="topSidebar">
        <h2><?php 
echo get_text('Add_user');
?>
</h2>

        <form method="post" action="<?php