[ Index ] |
PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2009 Oliver Georgi (oliver@phpwcms.de) // All rights reserved. 6 7 This script is part of PHPWCMS. The PHPWCMS web content management system is 8 free software; you can redistribute it and/or modify it under the terms of 9 the GNU General Public License as published by the Free Software Foundation; 10 either version 2 of the License, or (at your option) any later version. 11 12 The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html 13 A copy is found in the textfile GPL.txt and important notices to the license 14 from the author is found in LICENSE.txt distributed with these scripts. 15 16 This script is distributed in the hope that it will be useful, but WITHOUT ANY 17 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 18 PARTICULAR PURPOSE. See the GNU General Public License for more details. 19 20 This copyright notice MUST APPEAR in all copies of the script! 21 *************************************************************************************/ 22 23 24 // session_name('hashID'); 25 session_start(); 26 $phpwcms = array(); 27 $ref = $_SESSION['REFERER_URL']; 28 29 30 require_once ('../../config/phpwcms/conf.inc.php'); 31 require_once ('../inc_lib/default.inc.php'); 32 require_once (PHPWCMS_ROOT.'/include/inc_lib/dbcon.inc.php'); 33 34 require_once (PHPWCMS_ROOT.'/include/inc_lib/general.inc.php'); 35 checkLogin(); 36 require_once (PHPWCMS_ROOT.'/include/inc_lib/backend.functions.inc.php'); 37 38 if($_SESSION["wcs_user_admin"] == 1) { //Wenn Benutzer Admin-Rechte hat 39 40 //diverse Aktionen 41 $do = explode(",", $_GET["do"]); 42 43 switch(intval($do[0])) { 44 45 case 1: //Aktiv/Inaktiv File Category 46 $do[1] = intval($do[1]); //cat ID 47 $do[2] = intval($do[2]); //active value 48 if($do[1]) { 49 $sql = "UPDATE ".DB_PREPEND."phpwcms_filecat SET fcat_aktiv=".$do[2]." WHERE fcat_id=".$do[1].";"; 50 mysql_query($sql, $db) or die("error while changing file category status"); 51 } 52 break; 53 54 case 2: //Aktiv/Inaktiv File Key 55 $do[1] = intval($do[1]); //key ID 56 $do[2] = intval($do[2]); //active value 57 if($do[1]) { 58 $sql = "UPDATE ".DB_PREPEND."phpwcms_filekey SET fkey_aktiv=".$do[2]." WHERE fkey_id=".$do[1].";"; 59 mysql_query($sql, $db) or die("error while changing file key status"); 60 } 61 break; 62 63 case 8: //Löschen der File Category 64 $do[1] = intval($do[1]); //delete ID 65 if($do[1]) { 66 $sql = "UPDATE ".DB_PREPEND."phpwcms_filecat SET fcat_deleted=9 WHERE fcat_id=".$do[1].";"; 67 mysql_query($sql, $db) or die("error while deleting file category"); 68 } 69 break; 70 71 case 9: //Löschen des File Keys 72 $do[1] = intval($do[1]); //delete ID 73 $do[2] = intval($do[2]); //cat ID 74 if($do[1] && $do[2]) { 75 $sql = "UPDATE ".DB_PREPEND."phpwcms_filekey SET fkey_deleted=9 WHERE fkey_id=".$do[1]." AND fkey_cid=".$do[2].";"; 76 mysql_query($sql, $db) or die("error while deleting file key"); 77 } 78 break; 79 80 } 81 82 } //Ende Abarbeiten Aktion 83 84 headerRedirect($ref); 85 86 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Dec 30 05:55:15 2009 | Cross-referenced by PHPXref 0.7 |