Exemplo n.º 1
0
 public function Signin($username, $password)
 {
     $userid = AuthFuncCheckUserSignin($username, $password);
     if ($userid) {
         $this->Load($userid);
         SetSession("userid", $this->id);
         SetSession("username", $this->username);
         return true;
     }
     return false;
 }
Exemplo n.º 2
0
 /**
  *	Load a custom search
  */
 public function CustomSearch()
 {
     SetSession('productsearch', (int) $_GET['searchId']);
     if ($_GET['searchId'] > 0) {
         $this->_customSearch = $GLOBALS['ISC_CLASS_ADMIN_CUSTOMSEARCH']->LoadSearch($_GET['searchId']);
         $_REQUEST = array_merge($_REQUEST, $this->_customSearch['searchvars']);
     }
     if (isset($_REQUEST['new'])) {
         $this->ManageProducts(GetLang('CustomSearchSaved'), MSG_SUCCESS);
     } else {
         $this->ManageProducts();
     }
 }
 function CopyOut(&$a_vars, $a_fields = array())
 {
     //$s_db = "Session CopyOut:\n";
     $n_copied = 0;
     foreach ($this->_aAccessList as $s_var_name) {
         if (isset($a_vars[$s_var_name])) {
             if (empty($a_fields) || in_array($s_var_name, $a_fields)) {
                 SetSession($s_var_name, $a_vars[$s_var_name]);
                 //$s_db .= "$s_var_name='".GetSession($s_var_name)."'\n";
                 $n_copied++;
             }
         }
     }
     //SendAlert($s_db);
     return $n_copied;
 }
Exemplo n.º 4
0
<?php

include_once "../includes/session.php";
SetSession("AdminId", "");
header("Location: index.php");
Exemplo n.º 5
0
    $results = $connection->query($sql);
    //test na existenciu užívateľa
    if (empty($errors) && ($obj = $results->fetch_object())) {
        $counts = $obj->count;
        if ($counts > 0) {
            $errors[] = "Užívateľ s emailom " . $email . " už existuje.";
        }
    }
    if (empty($errors)) {
        $sql = "insert into users (email,passcode,name,address) values('{$email}','{$password1}','{$name}','{$address}')";
        $result = $connection->query($sql);
        if (!$result) {
            $errors[] = $connection->error;
        } else {
            $last_id = $connection->insert_id;
            SetSession("UserId", $last_id);
            header('Location: registerOK.php');
            exit;
        }
    }
}
include_once "pageHeader.php";
?>
<div class="container">

    <div class="row">

        <div class="col-md-4">
            <h2>Registrácia</h2>
            <?php 
if (!empty($errors)) {
Exemplo n.º 6
0
 /**
  * Perform a custom view search for shipments.
  */
 private function CustomSearch()
 {
     if (!isset($_REQUEST['searchId'])) {
         ob_end_clean();
         header('Location: index.php?ToDo=viewShipments');
         exit;
     }
     SetSession('shipmentsearch', (int) $_GET['searchId']);
     $this->customSearch = $GLOBALS['ISC_CLASS_ADMIN_CUSTOMSEARCH']->LoadSearch($_GET['searchId']);
     $_REQUEST = array_merge($_REQUEST, $this->customSearch['searchvars']);
     $GLOBALS['BreadcrumEntries'][GetLang('CustomView')] = '';
     $this->ManageShipments();
 }
Exemplo n.º 7
0
        $errors[] = "Zadajte email";
    }
    if ($password == "") {
        $errors[] = "Zadajte heslo";
    }
    if ($email != "" && $password != "") {
        $sql = "SELECT * FROM users WHERE email='{$email}'";
        $results = $connection->query($sql);
        if ($obj = $results->fetch_object()) {
            $id = $obj->id;
            $passcode = $obj->passcode;
            $email = $obj->email;
            if ($passcode != $password) {
                $errors[] = "Nesprávne heslo.";
            } else {
                SetSession("UserId", $id);
                header('Location: index.php');
                exit;
            }
        } else {
            //nenasli sme uzivatela s danym heslom
            $errors[] = "Uživateľ neexistuje.";
        }
    }
}
include_once "pageHeader.php";
?>

<div class="container">
    <div class="row">
Exemplo n.º 8
0
<?php

include_once "includes/session.php";
SetSession("UserId", "");
header("Location: index.php");