Source for file ChangeStatus.class.php

Documentation is available at ChangeStatus.class.php

  1. <?php
  2. /**
  3.  * ChangeStatus for user blocking in the session
  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. {
  15.     /**
  16.     * Constructor
  17.     *
  18.     * @uses ConnectDB::sqlSet()
  19.     * @uses ConnectDB::close()
  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.         
  33.         if($_POST['img']=="status_online"){$_POST['img']=""$_POST['text']="";}
  34.  
  35.         if ($_SESSION['etchat_v3_user_priv']!="admin" && $_SESSION['etchat_v3_user_priv']!="mod"){
  36.             if($_POST['img']=="status_invisible"){$_POST['img']=""$_POST['text']="";}
  37.         }
  38.  
  39.         $this->dbObj->sqlSet("UPDATE {$this->_prefix}etchat_useronline SET 
  40.             etchat_user_online_user_status_img = '".addslashes($_POST['img'])."',
  41.             etchat_user_online_user_status_text = '".addslashes(urldecode($_POST['text']))."'
  42.             WHERE etchat_onlineuser_fid = ".(int)$_SESSION['etchat_v3_user_id']);
  43.         
  44.         // close DB connection
  45.         $this->dbObj->close();
  46.         
  47.         echo "1";
  48.     }

Documentation generated on Thu, 13 Aug 2009 08:21:44 +0200 by phpDocumentor 1.4.1