[ 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 // ---------------------------------------------------------------- 25 // obligate check for phpwcms constants 26 if (!defined('PHPWCMS_ROOT')) { 27 die("You Cannot Access This Script Directly, Have a Nice Day."); 28 } 29 // ---------------------------------------------------------------- 30 31 32 // read content type form vars 33 if($content["aid"] != intval($_POST["caid"])) die("error: wrong form data!"); 34 35 36 $content["title"] = clean_slweg($_POST["ctitle"]); 37 $content["subtitle"] = clean_slweg($_POST["csubtitle"]); 38 $content["comment"] = slweg($_POST["ccomment"]); 39 $content["paginate_title"] = clean_slweg($_POST["cpaginate_title"]); 40 $content["paginate_page"] = empty($_POST["cpaginate_page"]) ? 0 : intval($_POST["cpaginate_page"]); 41 $content["visible"] = empty($_POST["cvisible"]) ? 0 : 1; 42 $content["before"] = intval($_POST["cbefore"]); 43 $content["after"] = intval($_POST["cafter"]); 44 $content["top"] = isset($_POST["ctop"]) ? 1 : 0; 45 $content["anchor"] = isset($_POST["canchor"]) ? 1 : 0; 46 $content["id"] = intval($_POST["cid"]); 47 $content["granted"] = empty($_POST["cgranted"]) ? 0 : 1; 48 49 if(!empty($_POST['ctype_change_aid'])) { 50 51 $ctype_change_aid = intval($_POST['ctype_change_aid']); 52 53 if($ctype_change_aid && $ctype_change_aid != $content["aid"]) { 54 55 $ctype_change_aid = _dbQuery('SELECT article_id FROM '.DB_PREPEND.'phpwcms_article WHERE article_id='.$ctype_change_aid.' AND article_deleted=0'); 56 if(!empty($ctype_change_aid[0]['article_id'])) { 57 $content["aid"] = $ctype_change_aid[0]['article_id']; 58 $ctype_change_aid = 'DO_CHANGE'; 59 } 60 } 61 } 62 63 64 if(!$content["before"] || $content["before"] > 9999) $content["before"] = ''; 65 if(!$content["after"] || $content["after"] > 9999) $content["after"] = ''; 66 67 68 if(isset($_POST["target_ctype"])) { 69 70 $content["target_type"] = explode(':', $_POST["target_ctype"]); 71 $content["module"] = empty($content["target_type"][1]) ? '' : trim($content["target_type"][1]); 72 $content["target_type"] = intval($content["target_type"][0]); 73 74 } else { 75 76 $content["target_type"] = 0; 77 $content["module"] = ''; 78 79 } 80 81 $content["sorting"] = intval($_POST["csorting"]); 82 83 $content["block"] = clean_slweg($_POST["cblock"]); 84 // reset paginate page number to 0 > pagination support for CONTENT block only 85 if($content["paginate_page"] && $content["block"] != 'CONTENT') { 86 $content["paginate_page"] = 0; 87 } 88 89 $content["module"] = empty($_POST["ctype_module"]) ? '' : clean_slweg($_POST["ctype_module"]); 90 91 // check if content type possibly changed 92 $content["update_type"] = ($content["target_type"] != $content["type"]) ? 1 : 0; 93 94 // read form vars for special content parts 95 96 if($content["type"] != 30 && file_exists(PHPWCMS_ROOT."/include/inc_lib/content/cnt".$content["type"].".readform.inc.php")) { 97 $content["module"] = ''; 98 include_once(PHPWCMS_ROOT."/include/inc_lib/content/cnt".$content["type"].".readform.inc.php"); 99 100 } elseif($content["type"] == 30 && file_exists($phpwcms['modules'][$content['module']]['path'].'inc/cnt.post.php')) { 101 102 include_once($phpwcms['modules'][$content['module']]['path'].'inc/cnt.post.php'); 103 104 } else { 105 $content["module"] = ''; 106 include_once (PHPWCMS_ROOT."/include/inc_lib/content/cnt0.readform.inc.php"); 107 108 } 109 110 ?>
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 |