function ADODB_Session_Key()
 {
     $ADODB_CRYPT_KEY = 'CRYPTED ADODB SESSIONS ROCK!';
     /* USE THIS FUNCTION TO CREATE THE ENCRYPTION KEY FOR CRYPTED SESSIONS	*/
     /* Crypt the used key, $ADODB_CRYPT_KEY as key and session_ID as SALT	*/
     return crypt($ADODB_CRYPT_KEY, session_ID());
 }
예제 #2
0
 /**
  * Create qrcode for mobile login.
  * 
  * @access public
  * @return void
  */
 public function qrCode()
 {
     $loginAPI = common::getSysURL() . $this->config->webRoot;
     if ($this->loadModel('user')->isLogon()) {
         $loginAPI .= "?sid=" . session_ID();
     }
     if (!extension_loaded('gd')) {
         die(printf($this->lang->misc->noGDLib, $loginAPI));
     }
     $ciqrcode = $this->app->loadClass('qrcode');
     QRcode::png($loginAPI, false, 4, 9);
 }
예제 #3
0
파일: ProtectBase.php 프로젝트: julesbl/ssp
 /**
  * Do final user setup and page config
  * @param object $userInfo - user login info from database
  */
 private function finalSetup($userInfo)
 {
     // set up final properties
     $this->sessionToken = session_ID();
     if ($this->loggedIn) {
         $this->userInfo = $userInfo;
         $this->succesfullLoginSessionCheck();
     }
     // send page cacheing parameters
     if (!$this->config->pageCaching) {
         // Date in the past
         header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
         // always modified
         header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
         // HTTP/1.1
         header("Cache-Control: no-store, no-cache, must-revalidate");
         header("Cache-Control: post-check=0, pre-check=0", false);
         // HTTP/1.0
         header("Pragma: no-cache");
     }
     // send time for page valid if time specified is greater than 0
     if ($this->config->pageValid > 0) {
         header("Expires: " . gmstrftime("%a, %d %b %Y %H:%M:%S", gmmktime() + $this->config->pageValid) . " GMT");
     }
 }
예제 #4
0
 static function sid()
 {
     return "session=" . session_name() . "=" . session_ID();
 }
}
include "header.php";
?>

<div class="banner">
    <div class="row">
        <h3 class="text-center"><?php 
echo "Your order was received.  Cheers!<br />";
?>
</h3>
    </div>
</div>

<div class="fullContent"><div class="row">
    <h4>Order Confirmation ID: <?php 
echo session_ID();
?>
</h4>
    <div class="large-6 columns">
        <?php 
echo "Order Summary<br />";
$session_id = session_id();
$sql = "select * from products,cart where (cart.session_id='{$session_id}') and (cart.product_id = products.id)";
$result = mysqli_query($connection, $sql);
while ($row = mysqli_fetch_assoc($result)) {
    echo $row["product_name"] . " | QTY: " . $row["quantity"] . "<br />";
    $contents = $contents . $row["product_name"] . " | QTY: " . $row["quantity"] . "\n";
    $quantity_remaining = $row["quantity_remaining"] - $row["quantity"];
    //update quantity_remaining entry
    mysqli_query($connection, "update products set quantity_remaining='{$quantity_remaining}' where {$row['product_id']} = id");
}