当前位置: 首页>>代码示例>>PHP>>正文


PHP SetSession函数代码示例

本文整理汇总了PHP中SetSession函数的典型用法代码示例。如果您正苦于以下问题:PHP SetSession函数的具体用法?PHP SetSession怎么用?PHP SetSession使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SetSession函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Signin

 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;
 }
开发者ID:BGCX261,项目名称:zjxt-svn-to-git,代码行数:11,代码来源:user.class.php

示例2: CustomSearch

 /**
  *	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();
     }
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:16,代码来源:class.product_18_12.php

示例3: CopyOut

 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;
 }
开发者ID:chrismathers,项目名称:premierplacement,代码行数:16,代码来源:resumemailer_061612.php

示例4: SetSession

<?php

include_once "../includes/session.php";
SetSession("AdminId", "");
header("Location: index.php");
开发者ID:kuzmiakmiroslav,项目名称:eshop,代码行数:5,代码来源:logout.php

示例5: users

    $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)) {
开发者ID:kuzmiakmiroslav,项目名称:eshop,代码行数:31,代码来源:register.php

示例6: CustomSearch

 /**
  * 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();
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:16,代码来源:class.shipments.php

示例7: SetSession

        $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">
开发者ID:kuzmiakmiroslav,项目名称:eshop,代码行数:30,代码来源:login.php


注:本文中的SetSession函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。