Source for file CheckRoomPw.class.php

Documentation is available at CheckRoomPw.class.php

  1. <?php
  2. /**
  3.  * CheckRoomPw, checks the PW for PW-protected rooms
  4.  *
  5.  * LICENSE: CREATIVE COMMONS PUBLIC LICENSE  "Namensnennung — Nicht-kommerziell 2.0"
  6.  *
  7.  * @copyright  2009 <SEDesign />
  8.  * @license    http://creativecommons.org/licenses/by-nc/2.0/de/
  9.  * @version    $3.0.6$
  10.  * @link       http://www.sedesign.de/de_produkte_chat-v3.html
  11.  * @since      File available since Alpha 1.0
  12.  */
  13.  
  14. class CheckRoomPw extends DbConectionMaker
  15. {
  16.     /**
  17.     * Constructor
  18.     *
  19.     * @uses ConnectDB::sqlGet()
  20.     * @return void 
  21.     */
  22.     public function __construct (){
  23.     
  24.         // call parent Constructor from class DbConectionMaker
  25.         parent::__construct();
  26.     
  27.         session_start();
  28.         
  29.         // all documentc requested per AJAX should have this part to turn off the browser and proxy cache for any XHR request
  30.         header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
  31.         
  32.         $freigabe=$this->dbObj->sqlGet("SELECT etchat_id_room FROM {$this->_prefix}etchat_rooms WHERE etchat_id_room = ".(int)$_POST['roomid']." AND etchat_room_pw = '".addslashes($_POST['layerpw'])."'");
  33.         
  34.         if (!is_array($freigabe)) echo "wrong";
  35.         else{
  36.             $_SESSION['etchat_'.$this->_prefix.'roompw_array'][]=$freigabe[0][0];
  37.             echo "1";
  38.         }
  39.         
  40.         // close DB connection
  41.         $this->dbObj->close();
  42.     }

Documentation generated on Thu, 05 May 2011 14:05:55 +0000 by phpDocumentor 1.4.3