Example #1
0
}
if (isset($_GET['section']) && !empty($_GET['section'])) {
    switch (filter_input(INPUT_GET, 'section')) {
        //gestion des utilisateurs
        case "user":
            if (isset($_GET['action']) && strcmp($_GET['action'], 'adduser') == 0) {
                if (isset($_POST['Ajouter']) && verifAjout()) {
                    $nameuser = htmlentities($_POST['name_user']);
                    $newuser = new User();
                    $newuser->setName($nameuser);
                    $newuser->setLogin($_POST['log']);
                    $newuser->setPassword(sha1($_POST['pwd']));
                    $newuser->setEmail($_POST['email']);
                    $newuser->setRole($_POST['role']);
                    $newuser->setDevise($_POST['devise']);
                    $newuser->insertNewUser($bdd);
                    echo '<div class="bg-success">L\'utilisateur à bien été ajoutée</div><br/><br/>';
                }
                include_once '/views/admin/adduser.php';
                break;
            }
            //on retourne la liste d'utilisateur en fonction du role
            if ($secu->isAdmin($bdd)) {
                $listUser = User::getAllUser($bdd);
            } else {
                $listUser = User::getUsersByManagerId($bdd, $sessionUser->getId());
            }
            include_once '/views/admin/user.php';
            break;
            //Statistiques
        //Statistiques
Example #2
0
Oxygen Webhelp plugin
Copyright (c) 1998-2014 Syncro Soft SRL, Romania.  All rights reserved.
Licensed under the terms stated in the license file EULA_Webhelp.txt 
available in the base directory of this Oxygen Webhelp plugin.
*/
require_once 'init.php';
//$ses=Session::getInstance();
$json = new JsonResponse();
if (isset($_POST['userName']) && trim($_POST['userName']) != '') {
    // send email to support
    $info['username'] = $_POST['userName'];
    $info['name'] = $_POST['name'];
    $info['password'] = $_POST['password'];
    $info['email'] = $_POST['email'];
    $user = new User($dbConnectionInfo);
    $return = $user->insertNewUser($info);
    if ($return->error == "true") {
        echo $return;
    } else {
        $id = base64_encode($user->userId . "|" . $user->date);
        $link = "<a href='" . __BASE_URL__ . "oxygen-webhelp/resources/confirm.html?id={$id}'>" . __BASE_URL__ . "oxygen-webhelp/resources/confirm.html?id={$id}</a>";
        $template = new Template("./templates/signUp.html");
        $productTranslate = defined("__PRODUCT_NAME__") ? __PRODUCT_NAME__ : $_POST['product'];
        $arrayProducts = $user->getSharedProducts();
        $products = "";
        foreach ($arrayProducts as $productId => $productName) {
            $products .= "\"" . $productName . "\" ";
        }
        $confirmationMsg = $template->replace(array("name" => $info['name'], "username" => $info['username'], "confirmationLink" => $link, "productName" => $productTranslate, "products" => $products));
        $mail = new Mail();
        $mail->Subject("[" . $productTranslate . "] " . Utils::translate('signUpEmailSubject'));
Example #3
0
    } else {
        $result = $user->getUser($id);
        $row = mysql_fetch_assoc($result);
    }
}
$save = $_POST["save"];
if (isset($_POST["id"]) && $save == 'spara') {
    $id = $_REQUEST["id"];
    $name = $_POST["name"];
    $lname = $_POST["lname"];
    $tagline = $_POST["tagline"];
    $email = $_POST["email"];
    $mobile = $_POST["mobile"];
    $phone = $_POST["phone"];
    if ($id == 'new') {
        $id = User::insertNewUser($name, $lname, $tagline, $email, $mobile, $phone);
    } else {
        User::setUserParams($id, $name, $lname, $tagline, $email, $mobile, $phone);
    }
    $result = $user->getUser($id);
    $row = mysql_fetch_assoc($result);
}
?>


    <form action="" method="post">
    <div class="card" >
      <h2>Tisdagsbandy</h2>
      <div class="clear"></div>
      <div class="" >
        <span class="name">