if (!DEMO) {
        $USERS->setUSERAktiv($u_id, $val);
    }
    if ($val == 1) {
        $_MAIN_MESSAGE .= "<br>" . ___("Benutzer wurde aktiviert.");
    } else {
        $_MAIN_MESSAGE .= "<br>" . ___("Benutzer wurde de-aktiviert.");
    }
}
if ($set == "delete" && $doit == 1) {
    if (!DEMO) {
        $USERS->delUSER($u_id);
    }
    $_MAIN_MESSAGE .= "<br>" . ___("Benutzer wurde gelöscht.");
}
$USER = $USERS->getUsers();
$uc = count($USER);
$editURLPara = tmObjCopy($mSTDURL);
$aktivURLPara = tmObjCopy($mSTDURL);
$aktivURLPara->addParam("set", "aktiv");
$delURLPara = tmObjCopy($mSTDURL);
$delURLPara->addParam("set", "delete");
#$statURLPara=tmObjCopy($mSTDURL);
#$statURLPara->addParam("act","statistic");
#$statURLPara->addParam("set","user");
//show log summary
//search for logs, only section
$search_log['object'] = "usr";
include TM_INCLUDEPATH . "/log_summary_section.inc.php";
$_MAIN_OUTPUT .= "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\" width=\"100%\">";
$_MAIN_OUTPUT .= "<thead>" . "<tr>" . "<td><b>&nbsp;</b>" . "</td>" . "<td><b>" . ___("Name") . "</b>" . "</td>" . "<td><b>" . ___("E-Mail") . "</b>" . "</td>" . "<td><b>" . ___("Layout") . "</b>" . "</td>" . "<td><b>" . ___("Sprache") . "</b>" . "</td>" . "<td><b>" . ___("Startseite") . "</b>" . "</td>" . "<td><b>" . ___("Aktiv") . "</b>" . "</td>" . "<td>...</td>" . "</tr>" . "</thead>" . "<tbody>";
 }
 //email auf gueltigkeit pruefen
 $check_mail = checkEmailAdr($email, $EMailcheck_Intern);
 if (!$check_mail[0]) {
     $check = false;
     $_MAIN_MESSAGE .= "<br>" . ___("Die E-Mail-Adresse ist nicht gültig.") . " " . $check_mail[1];
 }
 if ($check) {
     if (!DEMO) {
         $USERS = new tm_CFG();
         $pass_hash = md5(TM_SITEID . $name . $pass);
         $USERS->addUSER(array("siteid" => TM_SITEID, "name" => $name, "passwd" => $pass_hash, "crypt" => crypt($pass, CRYPT_EXT_DES), "email" => $email, "aktiv" => $aktiv, "admin" => $admin, "manager" => $manager, "startpage" => $startpage, "style" => $style, "lang" => $lang, "expert" => 0));
         //neue .htpasswd schreiben!
         $tm_htpasswd = "";
         //userliste holen
         $ALL_USERS = $USERS->getUsers();
         $uc = count($ALL_USERS);
         for ($ucc = 0; $ucc < $uc; $ucc++) {
             $tm_htpasswd .= $ALL_USERS[$ucc]['name'] . ":" . $ALL_USERS[$ucc]['crypt'] . "\n";
         }
         //for
         //neue .htpasswd schreiben!
         write_file(TM_INCLUDEPATH, ".htpasswd", $tm_htpasswd);
         unset($ALL_USERS);
     }
     //demo
     $_MAIN_MESSAGE .= "<br>" . sprintf(___("Neuer Benutzer %s wurde angelegt."), "'<b>" . display($name) . "</b>'");
     $_MAIN_MESSAGE .= "<br>" . ___("Eine neue .htpasswd Datei wurde erzeugt.") . "<br>";
     $action = "adm_user_list";
     require_once TM_INCLUDEPATH . "/adm_user_list.inc.php";
 } else {
$InputName_Manager = "manager";
${$InputName_Manager} = getVar($InputName_Manager);
$InputName_Startpage = "startpage";
${$InputName_Startpage} = getVar($InputName_Startpage);
$InputName_Style = "style";
${$InputName_Style} = getVar($InputName_Style);
$InputName_Lang = "lang";
${$InputName_Lang} = getVar($InputName_Lang);
$InputName_Pass = "******";
//
${$InputName_Pass} = getVar($InputName_Pass);
$InputName_Pass2 = "pass2";
//
${$InputName_Pass2} = getVar($InputName_Pass2);
$USERS = new tm_CFG();
$USER = $USERS->getUsers("", $u_id);
if ($set == "save") {
    $check = true;
    $change_pw = true;
    //checkinput
    if (empty($name)) {
        $check = false;
        $_MAIN_MESSAGE .= "<br>" . ___("Der Name darf nicht leer sein.");
    }
    if (empty($email)) {
        $check = false;
        $_MAIN_MESSAGE .= "<br>" . ___("Die E-Mail-Adresse darf nicht leer sein.");
    }
    //email auf gueltigkeit pruefen
    $check_mail = checkEmailAdr($email, $EMailcheck_Intern);
    if (!$check_mail[0]) {
Esempio n. 4
0
 }
 $check_mail = checkEmailAdr($email, $EMailcheck_Intern);
 if (!$check_mail[0]) {
     $check = false;
     $usr_message .= "<br>" . ___("E-Mail-Adresse ist nicht gültig.") . " " . $check_mail[1];
 }
 $USER = new tm_CFG();
 if ($check) {
     if (!DEMO) {
         $pass_hash = md5(TM_SITEID . $LOGIN->USER['name'] . $pass);
         $USER->setPasswd($LOGIN->USER['name'], $pass_hash, crypt($pass, CRYPT_EXT_DES));
         $_SESSION['user_pw_md5'] = $pass_hash;
         //neue .htpasswd schreiben!
         $tm_htpasswd = "";
         //userliste holen
         $USERS = $USER->getUsers();
         $uc = count($USERS);
         for ($ucc = 0; $ucc < $uc; $ucc++) {
             $tm_htpasswd .= $USERS[$ucc]['name'] . ":" . $USERS[$ucc]['crypt'] . "\n";
         }
         //neue .htpasswd schreiben!
         write_file(TM_INCLUDEPATH, ".htpasswd", $tm_htpasswd);
         $usr_message .= "<br>" . ___("Eine neue .htpasswd Datei wurde erzeugt.") . "<br>";
         $pwchanged = 1;
     }
 } else {
     $usr_message .= "<br>" . ___("Das Passwort wurde nicht geändert.");
 }
 if (!DEMO) {
     $USER->setEMail($LOGIN->USER['name'], $email);
 }