示例#1
0
 public function indexAction()
 {
     $this->view->Title = "Trang chủ";
     $this->view->headTitle($this->view->Title);
     $Product = Product::getDataNotPage();
     $this->view->Product = $Product;
     $SoldOut = Product::getSoldOut();
     $this->view->SoldOut = $SoldOut;
     $NewStatus = Product::getNewStatus();
     $this->view->NewStatus = $NewStatus;
     /**
      * Update visited
      */
     if ($_SESSION['visit'] == false) {
         $Visit = new Visited();
         $Visit->visited_date = date("Y-m-d H:i:s");
         $Visit->save();
         $_SESSION['visit'] = true;
     } else {
     }
 }
示例#2
0
文件: User.class.php 项目: Klym/flame
 function checkUser($sid)
 {
     $STH = $this->db->DBH->prepare("SELECT * FROM users WHERE email=? and activation=?");
     $activation = 1;
     $STH->bindParam(1, $this->email);
     $STH->bindParam(2, $activation);
     $STH->execute();
     $STH->setFetchMode(PDO::FETCH_ASSOC);
     $myrow = $STH->fetch();
     if ($this->password == $myrow['password']) {
         $_SESSION['email'] = $myrow['email'];
         $visited = new Visited($myrow['id'], $sid, $this->db);
         $online = new Online($myrow['id'], $sid, $this->db);
         $visited->setArr();
         $visited->set();
         $online->setArr();
         $online->set();
         echo "<html><head>\n\t\t\t<meta http-equiv='refresh' content='0; url=" . $_SERVER['HTTP_REFERER'] . "'>\n\t\t\t</head>\n\t\t\t</html>";
     } else {
         exit("<html><head><meta http-equiv='refresh' content='3; url=" . $_SERVER['HTTP_REFERER'] . "'></head><body>Извините, введённый вами email или пароль неверный.</body></html>");
     }
 }
示例#3
0
 function setArr()
 {
     self::$arr = array($this->id);
 }
示例#4
0
文件: left.php 项目: Klym/flame
                	<p>Сейчас онлайн:</p>
                    	<div id="visited">
						<?
							$online = new Online($user->id,session_id(),$db);
							if (isset($_SESSION['email'])) {
								$online->setArr();
								$online->set();
							}
							$online->loginsOnline();
							$online->get();
						?>
                    	</div>
					<p>Нас сегодня посетили:</p>
                    	<div id="visited">
						<?
							$visited = new Visited($user->id,null,$db);
							if (isset($_SESSION['email'])) {
								$visited->setArr();
								$visited->set();
							}
							$visited->get();
							$visited->del();
						?>
                        </div>
            	</div>
            	<div class="leftBlockFooter"></div>
    		</div>
    	</div>
        <div class='leftBlock'>
            <div class="leftBlockHeader">Баннер</div>
            <div class="leftBlockContent">