diff --git a/e107_admin/cache.php b/e107_admin/cache.php index ed62e336f..290554703 100644 --- a/e107_admin/cache.php +++ b/e107_admin/cache.php @@ -9,9 +9,9 @@ * Cache Administration Area * * $Source: /cvs_backup/e107_0.8/e107_admin/cache.php,v $ - * $Revision: 1.12 $ - * $Date: 2009-11-18 01:04:25 $ - * $Author: e107coders $ + * $Revision: 1.13 $ + * $Date: 2010-01-04 21:35:37 $ + * $Author: e107steved $ * */ require_once("../class2.php"); @@ -84,8 +84,8 @@ if (isset($_POST['empty_cache'])) -$syscache_files = glob($e107->file_path.$CACHE_DIRECTORY."S_*.*"); -$cache_files = glob($e107->file_path.$CACHE_DIRECTORY."C_*.*"); +$syscache_files = glob(e_CACHE."S_*.*"); +$cache_files = glob(e_CACHE."C_*.*"); $syscache_files_num = count($syscache_files); $cache_files_num = count($cache_files); diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 3840d3f02..d9543cae6 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -2,31 +2,41 @@ /* * e107 website system * - * Copyright (C) 2008-2009 e107 Inc (e107.org) + * Copyright (C) 2008-2010 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * Custom Menus/Pages Administration * * $Source: /cvs_backup/e107_0.8/e107_admin/cpage.php,v $ - * $Revision: 1.33 $ - * $Date: 2010-01-03 12:14:06 $ + * $Revision: 1.34 $ + * $Date: 2010-01-04 21:35:37 $ * $Author: e107steved $ * */ -require_once("../class2.php"); +/** + * + * @package e107 + * @subpackage admin + * @version $Revision: 1.34 $ + * @author $Author: e107steved $ -if (!getperms("5|J")) { header("location:".e_BASE."index.php"); exit; } + * Admin-related functions for custom page and menu creation +*/ + +require_once('../class2.php'); + +if (!getperms("5|J")) { header('location:'.e_BASE.'index.php'); exit; } include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE); $e_sub_cat = 'custom'; -require_once("auth.php"); -require_once(e_HANDLER."userclass_class.php"); -require_once(e_HANDLER."message_handler.php"); -require_once(e_HANDLER."form_handler.php"); +require_once('auth.php'); +require_once(e_HANDLER.'userclass_class.php'); +require_once(e_HANDLER.'message_handler.php'); +require_once(e_HANDLER.'form_handler.php'); $frm = new e_form(true); $emessage = &eMessage::getInstance(); $page = new page; @@ -93,7 +103,7 @@ if (isset($_POST['saveOptions'])) if(!e_QUERY) { - if(getperms("5")) + if(getperms('5')) { $page->showExistingPages(); } @@ -103,7 +113,7 @@ if(!e_QUERY) } } -elseif($_GET['action']=='edit') +elseif(varset($_GET['action'],'')=='edit') { $action = 'create'; $sub_action = 'edit'; @@ -118,11 +128,11 @@ elseif(vartrue($_GET['menus'])) } else { - $function = $action."Page"; + $function = $action.'Page'; $page->$function(); } -require_once(e_ADMIN."footer.php"); +require_once(e_ADMIN.'footer.php'); class page { @@ -282,8 +292,14 @@ class page $menu_name = $tp->toForm($row['page_theme']); } } + else + { + $menu_name = ''; + $page_title = ''; + $data = ''; + } - $e_qry = ($mode) ? "menus=1" : ""; + $e_qry = ($mode) ? 'menus=1' : ''; $text = "