Source for file AdminRegUserEdit.class.php

Documentation is available at AdminRegUserEdit.class.php

  1. <?php
  2. /**
  3.  * Class AdminRegUserEdit - Admin area
  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.7$
  10.  * @link       http://www.sedesign.de/de_produkte_chat-v3.html
  11.  * @since      File available since Alpha 1.0
  12.  */
  13.  
  14. {
  15.  
  16.     /**
  17.     * Constructor
  18.     *
  19.     * @uses ConnectDB::sqlSet()
  20.     * @uses ConnectDB::close()
  21.     * @return void 
  22.     */
  23.     public function __construct ()
  24.         
  25.         // call parent Constructor from class DbConectionMaker
  26.         parent::__construct()
  27.  
  28.         session_start();
  29.  
  30.         header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
  31.         // Sets charset and content-type for index.php
  32.         header('content-type: text/html; charset=utf-8');
  33.         
  34.         // create new LangXml Object
  35.         $langObj = new LangXml();
  36.         $lang=$langObj->getLang()->admin[0]->admin_reg_user[0];
  37.         
  38.         if ($_SESSION['etchat_'.$this->_prefix.'user_priv']=="admin"){
  39.  
  40.             if (isset($_POST['userids'])){
  41.                 $ids=explode(','$_POST['userids']);
  42.             
  43.                 foreach($ids as $id)
  44.                     $this->dbObj->sqlSet("UPDATE {$this->_prefix}etchat_user SET etchat_userpw = NULL, etchat_userprivilegien = 'gast' WHERE etchat_user_id=".(int)$id);
  45.             }
  46.             if (isset($_GET['mod']))
  47.                 $this->dbObj->sqlSet("update {$this->_prefix}etchat_user set etchat_userprivilegien='mod' WHERE etchat_user_id = ".(int)$_GET['id']);
  48.                 
  49.             if (isset($_GET['admin']))
  50.                 $this->dbObj->sqlSet("update {$this->_prefix}etchat_user set etchat_userprivilegien='admin' WHERE etchat_user_id = ".(int)$_GET['id']);
  51.             
  52.             $this->dbObj->close();
  53.             header("Location: ./?AdminRegUserIndex");
  54.             
  55.         }else{
  56.             echo $lang->error[0]->tagData;
  57.             return false;
  58.         }
  59.     }

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