예제 #1
0
				WHERE id = ' . $page2);
                    }
                    if (!$result) {
                        ls_redirect(BASE_URL . 'index.php?p=error&sp=mysql');
                    } else {
                        ls_redirect(BASE_URL . 'index.php?p=success');
                    }
                    // Output the errors
                } else {
                    $errors['e'] = $tl['error']['e'];
                    $errors = $errors;
                }
            }
            // Call the settings function
            $lang_files = ls_get_lang_files(false);
            $LS_FORM_DATA = ls_get_data($page2, $lstable);
            $template = 'edituser.php';
        } else {
            ls_redirect(BASE_URL . 'index.php?p=error&sp=not-exist');
        }
        break;
    default:
        if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['ls_delete_user'])) {
            $defaults = $_POST;
            if (isset($defaults['lock'])) {
                $lockuser = $defaults['ls_delete_user'];
                $useridarray = explode(',', LS_SUPERADMIN);
                for ($i = 0; $i < count($lockuser); $i++) {
                    $locked = $lockuser[$i];
                    if (!in_array($locked, $useridarray)) {
                        $sql = 'UPDATE ' . $lstable . ' SET access = IF (access = 1, 0, 1) WHERE id = ' . $locked . '';
예제 #2
0
 if (LS_CAPTCHA) {
     $human_captcha = explode(':#:', $_SESSION['jrc_captcha']);
     if ($defaults[$human_captcha[0]] == '' || $defaults[$human_captcha[0]] != $human_captcha[1]) {
         $errors['human'] = $tl['error']['e12'];
     }
 }
 if (count($errors) > 0) {
     /* Outputtng the error messages */
     if ($_SERVER['HTTP_X_REQUESTED_WITH']) {
         header('Cache-Control: no-cache');
         die('{"status":0, "errors":' . json_encode($errors) . '}');
     } else {
         $errors = $errors;
     }
 } else {
     $userDetails = ls_get_data($_GET['user'], 'users');
     /*// Get the department for the contact form if set
             if (is_numeric($defaults["department"]) && $defaults["department"] != 0) {
     
                 $op_email = LS_EMAIL;
     
                 foreach ($LV_DEPARTMENTS as $d) {
                     if (in_array($defaults["department"], $d)) {
                         if ($d['email'])
                             $op_email = $d['email'];
                     }
                 }
             }*/
     if (isset($userDetails['email']) && !empty($userDetails['email'])) {
         $op_email = $userDetails['email'];
     } else {