mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 03:22:29 +09:00
issue 2119. supporting php 5.4. admin module.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12711 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
fa75bf0981
commit
3df6b3ecd7
4 changed files with 543 additions and 374 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* adminAdminController class
|
||||
* admin controller class of admin module
|
||||
|
|
@ -8,6 +9,7 @@
|
|||
*/
|
||||
class adminAdminController extends admin
|
||||
{
|
||||
|
||||
/**
|
||||
* initialization
|
||||
* @return void
|
||||
|
|
@ -15,9 +17,12 @@ class adminAdminController extends admin
|
|||
function init()
|
||||
{
|
||||
// forbit access if the user is not an administrator
|
||||
$oMemberModel = &getModel('member');
|
||||
$oMemberModel = getModel('member');
|
||||
$logged_info = $oMemberModel->getLoggedInfo();
|
||||
if($logged_info->is_admin!='Y') return $this->stop("msg_is_not_administrator");
|
||||
if($logged_info->is_admin != 'Y')
|
||||
{
|
||||
return $this->stop("msg_is_not_administrator");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -27,11 +32,17 @@ class adminAdminController extends admin
|
|||
function procAdminMenuReset()
|
||||
{
|
||||
$menuSrl = Context::get('menu_srl');
|
||||
if (!$menuSrl) return $this->stop('msg_invalid_request');
|
||||
if(!$menuSrl)
|
||||
{
|
||||
return $this->stop('msg_invalid_request');
|
||||
}
|
||||
|
||||
$oMenuAdminController = &getAdminController('menu');
|
||||
$oMenuAdminController = getAdminController('menu');
|
||||
$output = $oMenuAdminController->deleteMenu($menuSrl);
|
||||
if(!$output->toBool()) return $output;
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
FileHandler::removeDir('./files/cache/menu/admin_lang/');
|
||||
|
||||
|
|
@ -54,21 +65,24 @@ class adminAdminController extends admin
|
|||
FileHandler::removeFile(_XE_PATH_ . 'files/_debug_db_query.php');
|
||||
FileHandler::removeFile(_XE_PATH_ . 'files/_db_slow_query.php');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList();
|
||||
|
||||
// call recompileCache for each module
|
||||
foreach($module_list as $module)
|
||||
{
|
||||
$oModule = null;
|
||||
$oModule = &getClass($module->module);
|
||||
if(method_exists($oModule, 'recompileCache')) $oModule->recompileCache();
|
||||
$oModule = NULL;
|
||||
$oModule = getClass($module->module);
|
||||
if(method_exists($oModule, 'recompileCache'))
|
||||
{
|
||||
$oModule->recompileCache();
|
||||
}
|
||||
}
|
||||
|
||||
// remove cache
|
||||
$truncated = array();
|
||||
$oObjectCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oTemplateCacheHandler = &CacheHandler::getInstance('template');
|
||||
$oObjectCacheHandler = CacheHandler::getInstance('object');
|
||||
$oTemplateCacheHandler = CacheHandler::getInstance('template');
|
||||
|
||||
if($oObjectCacheHandler->isSupport())
|
||||
{
|
||||
|
|
@ -80,7 +94,7 @@ class adminAdminController extends admin
|
|||
$truncated[] = $oTemplateCacheHandler->truncate();
|
||||
}
|
||||
|
||||
if(count($truncated) && in_array(false,$truncated))
|
||||
if(count($truncated) && in_array(FALSE, $truncated))
|
||||
{
|
||||
return new Object(-1, 'msg_self_restart_cache_engine');
|
||||
}
|
||||
|
|
@ -91,15 +105,18 @@ class adminAdminController extends admin
|
|||
{
|
||||
foreach($tmp_cache_list as $tmp_dir)
|
||||
{
|
||||
if($tmp_dir) FileHandler::removeDir('./files/'.$tmp_dir);
|
||||
if($tmp_dir)
|
||||
{
|
||||
FileHandler::removeDir('./files/' . $tmp_dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// remove duplicate indexes (only for CUBRID)
|
||||
$db_type = &Context::getDBType();
|
||||
$db_type = Context::getDBType();
|
||||
if($db_type == 'cubrid')
|
||||
{
|
||||
$db = &DB::getInstance();
|
||||
$db = DB::getInstance();
|
||||
$db->deleteDuplicateIndexes();
|
||||
}
|
||||
$this->setMessage('success_updated');
|
||||
|
|
@ -111,13 +128,12 @@ class adminAdminController extends admin
|
|||
*/
|
||||
function procAdminLogout()
|
||||
{
|
||||
$oMemberController = &getController('member');
|
||||
$oMemberController = getController('member');
|
||||
$oMemberController->procMemberLogout();
|
||||
|
||||
header('Location: ' . getNotEncodedUrl('', 'module', 'admin'));
|
||||
}
|
||||
|
||||
|
||||
public function procAdminInsertDefaultDesignInfo()
|
||||
{
|
||||
$vars = Context::getRequestVars();
|
||||
|
|
@ -217,9 +233,12 @@ class adminAdminController extends admin
|
|||
$moduleName = Context::get('module_name');
|
||||
|
||||
// check favorite exists
|
||||
$oModel = &getAdminModel('admin');
|
||||
$oModel = getAdminModel('admin');
|
||||
$output = $oModel->isExistsFavorite($siteSrl, $moduleName);
|
||||
if(!$output->toBool()) return $output;
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
// if exists, delete favorite
|
||||
if($output->get('result'))
|
||||
|
|
@ -235,7 +254,10 @@ class adminAdminController extends admin
|
|||
$result = 'on';
|
||||
}
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
$this->add('result', $result);
|
||||
|
||||
|
|
@ -280,6 +302,7 @@ class adminAdminController extends admin
|
|||
return new Object();
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->admin_favorite_srls = $deleteTargets;
|
||||
$output = executeQuery('admin.deleteFavorites', $args);
|
||||
if(!$output->toBool())
|
||||
|
|
@ -297,10 +320,16 @@ class adminAdminController extends admin
|
|||
function procAdminEnviromentGatheringAgreement()
|
||||
{
|
||||
$isAgree = Context::get('is_agree');
|
||||
if($isAgree == 'true') $_SESSION['enviroment_gather'] = 'Y';
|
||||
else $_SESSION['enviroment_gather'] = 'N';
|
||||
if($isAgree == 'true')
|
||||
{
|
||||
$_SESSION['enviroment_gather'] = 'Y';
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['enviroment_gather'] = 'N';
|
||||
}
|
||||
|
||||
$redirectUrl = getUrl('', 'module', 'admin');
|
||||
$redirectUrl = getNotEncodedUrl('', 'module', 'admin');
|
||||
$this->setRedirectUrl($redirectUrl);
|
||||
}
|
||||
|
||||
|
|
@ -313,9 +342,14 @@ class adminAdminController extends admin
|
|||
$adminTitle = Context::get('adminTitle');
|
||||
$file = $_FILES['adminLogo'];
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
$oAdminConfig = $oModuleModel->getModuleConfig('admin');
|
||||
|
||||
if(!is_object($oAdminConfig))
|
||||
{
|
||||
$oAdminConfig = new stdClass();
|
||||
}
|
||||
|
||||
if($file['tmp_name'])
|
||||
{
|
||||
$target_path = 'files/attach/images/admin/';
|
||||
|
|
@ -323,21 +357,36 @@ class adminAdminController extends admin
|
|||
|
||||
// Get file information
|
||||
list($width, $height, $type, $attrs) = @getimagesize($file['tmp_name']);
|
||||
if($type == 3) $ext = 'png';
|
||||
elseif($type == 2) $ext = 'jpg';
|
||||
else $ext = 'gif';
|
||||
if($type == 3)
|
||||
{
|
||||
$ext = 'png';
|
||||
}
|
||||
elseif($type == 2)
|
||||
{
|
||||
$ext = 'jpg';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ext = 'gif';
|
||||
}
|
||||
|
||||
$target_filename = sprintf('%s%s.%s.%s', $target_path, 'adminLogo', date('YmdHis'), $ext);
|
||||
@move_uploaded_file($file['tmp_name'], $target_filename);
|
||||
|
||||
$oAdminConfig->adminLogo = $target_filename;
|
||||
}
|
||||
if($adminTitle) $oAdminConfig->adminTitle = strip_tags($adminTitle);
|
||||
else unset($oAdminConfig->adminTitle);
|
||||
if($adminTitle)
|
||||
{
|
||||
$oAdminConfig->adminTitle = strip_tags($adminTitle);
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($oAdminConfig->adminTitle);
|
||||
}
|
||||
|
||||
if($oAdminConfig)
|
||||
{
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->insertModuleConfig('admin', $oAdminConfig);
|
||||
}
|
||||
|
||||
|
|
@ -353,13 +402,13 @@ class adminAdminController extends admin
|
|||
*/
|
||||
function procAdminDeleteLogo()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
$oAdminConfig = $oModuleModel->getModuleConfig('admin');
|
||||
|
||||
FileHandler::removeFile(_XE_PATH_ . $oAdminConfig->adminLogo);
|
||||
unset($oAdminConfig->adminLogo);
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->insertModuleConfig('admin', $oAdminConfig);
|
||||
|
||||
$this->setMessage('success_deleted', 'info');
|
||||
|
|
@ -401,7 +450,7 @@ class adminAdminController extends admin
|
|||
*/
|
||||
function _deleteAllFavorite()
|
||||
{
|
||||
$args = null;
|
||||
$args = NULL;
|
||||
$output = executeQuery('admin.deleteAllFavorite', $args);
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -410,7 +459,8 @@ class adminAdminController extends admin
|
|||
* Remove admin icon
|
||||
* @return object|void
|
||||
*/
|
||||
function procAdminRemoveIcons(){
|
||||
function procAdminRemoveIcons()
|
||||
{
|
||||
$iconname = Context::get('iconname');
|
||||
$file_exist = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $iconname);
|
||||
if($file_exist)
|
||||
|
|
@ -423,6 +473,7 @@ class adminAdminController extends admin
|
|||
}
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file admin.admin.controller.php */
|
||||
/* Location: ./modules/admin/admin.admin.controller.php */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* adminAdminModel class
|
||||
* admin model class of admin module
|
||||
|
|
@ -8,11 +9,13 @@
|
|||
*/
|
||||
class adminAdminModel extends admin
|
||||
{
|
||||
|
||||
/**
|
||||
* Ftp root path
|
||||
* @var string
|
||||
*/
|
||||
var $pwd;
|
||||
|
||||
/**
|
||||
* Buffer for Admin GNB menu
|
||||
* @var string
|
||||
|
|
@ -205,9 +208,12 @@ class adminAdminModel extends admin
|
|||
$sftp = ssh2_sftp($connection);
|
||||
$curpwd = "ssh2.sftp://$sftp" . $this->pwd;
|
||||
$dh = @opendir($curpwd);
|
||||
if(!$dh) return new Object(-1, 'msg_ftp_invalid_path');
|
||||
if(!$dh)
|
||||
{
|
||||
return new Object(-1, 'msg_ftp_invalid_path');
|
||||
}
|
||||
$list = array();
|
||||
while(($file = readdir($dh)) !== false)
|
||||
while(($file = readdir($dh)) !== FALSE)
|
||||
{
|
||||
if(is_dir($curpwd . $file))
|
||||
{
|
||||
|
|
@ -245,7 +251,8 @@ class adminAdminModel extends admin
|
|||
$ftp_info->ftp_host = "127.0.0.1";
|
||||
}
|
||||
|
||||
if (!$ftp_info->ftp_port || !is_numeric ($ftp_info->ftp_port)) {
|
||||
if(!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port))
|
||||
{
|
||||
$ftp_info->ftp_port = "21";
|
||||
}
|
||||
|
||||
|
|
@ -277,11 +284,14 @@ class adminAdminModel extends admin
|
|||
{
|
||||
foreach($_list as $k => $v)
|
||||
{
|
||||
$src = null;
|
||||
$src = new stdClass();
|
||||
$src->data = $v;
|
||||
$res = Context::convertEncoding($src);
|
||||
$v = $res->data;
|
||||
if(strpos($v,'d') === 0 || strpos($v, '<DIR>')) $list[] = substr(strrchr($v,' '),1) . '/';
|
||||
if(strpos($v, 'd') === 0 || strpos($v, '<DIR>'))
|
||||
{
|
||||
$list[] = substr(strrchr($v, ' '), 1) . '/';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -323,27 +333,36 @@ class adminAdminModel extends admin
|
|||
foreach(get_loaded_extensions() as $ext)
|
||||
{
|
||||
$ext = strtolower($ext);
|
||||
if(in_array($ext, $skip['ext'])) continue;
|
||||
if(in_array($ext, $skip['ext']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['phpext'] .= '|' . $ext;
|
||||
}
|
||||
$info['phpext'] = substr($info['phpext'], 1);
|
||||
|
||||
$info['module'] = '';
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList();
|
||||
foreach($module_list as $module)
|
||||
{
|
||||
if(in_array($module->module, $skip['module'])) continue;
|
||||
if(in_array($module->module, $skip['module']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['module'] .= '|' . $module->module;
|
||||
}
|
||||
$info['module'] = substr($info['module'], 1);
|
||||
|
||||
$info['addon'] = '';
|
||||
$oAddonAdminModel = &getAdminModel('addon');
|
||||
$oAddonAdminModel = getAdminModel('addon');
|
||||
$addon_list = $oAddonAdminModel->getAddonList();
|
||||
foreach($addon_list as $addon)
|
||||
{
|
||||
if(in_array($addon->addon, $skip['addon'])) continue;
|
||||
if(in_array($addon->addon, $skip['addon']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$info['addon'] .= '|' . $addon->addon;
|
||||
}
|
||||
$info['addon'] = substr($info['addon'], 1);
|
||||
|
|
@ -351,7 +370,10 @@ class adminAdminModel extends admin
|
|||
$param = '';
|
||||
foreach($info as $k => $v)
|
||||
{
|
||||
if($v) $param .= sprintf('&%s=%s',$k,urlencode($v));
|
||||
if($v)
|
||||
{
|
||||
$param .= sprintf('&%s=%s', $k, urlencode($v));
|
||||
}
|
||||
}
|
||||
$param = substr($param, 1);
|
||||
|
||||
|
|
@ -385,16 +407,25 @@ class adminAdminModel extends admin
|
|||
* @param array $layout_list
|
||||
* @return object
|
||||
*/
|
||||
function getThemeInfo($theme_name, $layout_list = null)
|
||||
function getThemeInfo($theme_name, $layout_list = NULL)
|
||||
{
|
||||
if ($GLOBALS['__ThemeInfo__'][$theme_name]) return $GLOBALS['__ThemeInfo__'][$theme_name];
|
||||
if($GLOBALS['__ThemeInfo__'][$theme_name])
|
||||
{
|
||||
return $GLOBALS['__ThemeInfo__'][$theme_name];
|
||||
}
|
||||
|
||||
$info_file = _XE_PATH_ . 'themes/' . $theme_name . '/conf/info.xml';
|
||||
if(!file_exists($info_file)) return;
|
||||
if(!file_exists($info_file))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$oXmlParser = new XmlParser();
|
||||
$_xml_obj = $oXmlParser->loadXmlFile($info_file);
|
||||
if(!$_xml_obj->theme) return;
|
||||
if(!$_xml_obj->theme)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$xml_obj = $_xml_obj->theme;
|
||||
|
||||
|
|
@ -403,16 +434,25 @@ class adminAdminModel extends admin
|
|||
$theme_info->name = $theme_name;
|
||||
$theme_info->title = $xml_obj->title->body;
|
||||
$thumbnail = './themes/' . $theme_name . '/thumbnail.png';
|
||||
$theme_info->thumbnail = (file_exists($thumbnail))?$thumbnail:null;
|
||||
$theme_info->thumbnail = (file_exists($thumbnail)) ? $thumbnail : NULL;
|
||||
$theme_info->version = $xml_obj->version->body;
|
||||
$date_obj = new stdClass();
|
||||
sscanf($xml_obj->date->body, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
$theme_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
$theme_info->description = $xml_obj->description->body;
|
||||
$theme_info->path = './themes/' . $theme_name . '/';
|
||||
|
||||
if(!is_array($xml_obj->publisher)) $publisher_list[] = $xml_obj->publisher;
|
||||
else $publisher_list = $xml_obj->publisher;
|
||||
if(!is_array($xml_obj->publisher))
|
||||
{
|
||||
$publisher_list = array();
|
||||
$publisher_list[] = $xml_obj->publisher;
|
||||
}
|
||||
else
|
||||
{
|
||||
$publisher_list = $xml_obj->publisher;
|
||||
}
|
||||
|
||||
$theme_info->publisher = array();
|
||||
foreach($publisher_list as $publisher)
|
||||
{
|
||||
$publisher_obj = new stdClass();
|
||||
|
|
@ -429,23 +469,21 @@ class adminAdminModel extends admin
|
|||
switch($layout_parse[1])
|
||||
{
|
||||
case 'themes' :
|
||||
{
|
||||
$layout_info->name = $theme_name . '|@|' . $layout_parse[count($layout_parse) - 1];
|
||||
break;
|
||||
}
|
||||
|
||||
case 'layouts' :
|
||||
{
|
||||
$layout_info->name = $layout_parse[count($layout_parse) - 1];
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
$layout_info->title = $layout_parse[count($layout_parse) - 1];
|
||||
$layout_info->path = $layout_path;
|
||||
|
||||
$site_info = Context::get('site_module_info');
|
||||
// check layout instance
|
||||
$is_new_layout = true;
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$is_new_layout = TRUE;
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info_list = array();
|
||||
$layout_list = $oLayoutModel->getLayoutList($site_info->site_srl);
|
||||
if($layout_list)
|
||||
|
|
@ -454,7 +492,7 @@ class adminAdminModel extends admin
|
|||
{
|
||||
if($val->layout == $layout_info->name)
|
||||
{
|
||||
$is_new_layout = false;
|
||||
$is_new_layout = FALSE;
|
||||
$layout_info->layout_srl = $val->layout_srl;
|
||||
break;
|
||||
}
|
||||
|
|
@ -471,7 +509,7 @@ class adminAdminModel extends admin
|
|||
$args->title = $layout_info->title;
|
||||
$args->layout_type = "P";
|
||||
// Insert into the DB
|
||||
$oLayoutAdminController = &getAdminController('layout');
|
||||
$oLayoutAdminController = getAdminController('layout');
|
||||
$output = $oLayoutAdminController->insertLayout($args);
|
||||
$layout_info->layout_srl = $args->layout_srl;
|
||||
}
|
||||
|
|
@ -479,10 +517,16 @@ class adminAdminModel extends admin
|
|||
$theme_info->layout_info = $layout_info;
|
||||
|
||||
$skin_infos = $xml_obj->skininfos;
|
||||
if(is_array($skin_infos->skininfo))$skin_list = $skin_infos->skininfo;
|
||||
else $skin_list = array($skin_infos->skininfo);
|
||||
if(is_array($skin_infos->skininfo))
|
||||
{
|
||||
$skin_list = $skin_infos->skininfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
$skin_list = array($skin_infos->skininfo);
|
||||
}
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
$skins = array();
|
||||
foreach($skin_list as $val)
|
||||
{
|
||||
|
|
@ -492,19 +536,17 @@ class adminAdminModel extends admin
|
|||
switch($skin_parse[1])
|
||||
{
|
||||
case 'themes' :
|
||||
{
|
||||
$is_theme = true;
|
||||
$is_theme = TRUE;
|
||||
$module_name = $skin_parse[count($skin_parse) - 1];
|
||||
$skin_info->name = $theme_name . '|@|' . $module_name;
|
||||
break;
|
||||
}
|
||||
|
||||
case 'modules' :
|
||||
{
|
||||
$is_theme = false;
|
||||
$is_theme = FALSE;
|
||||
$module_name = $skin_parse[2];
|
||||
$skin_info->name = $skin_parse[count($skin_parse) - 1];
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
$skin_info->path = $val->directory->attrs->path;
|
||||
$skin_info->is_theme = $is_theme;
|
||||
|
|
@ -532,17 +574,24 @@ class adminAdminModel extends admin
|
|||
* Return theme module skin list
|
||||
* @return array
|
||||
*/
|
||||
function getModulesSkinList(){
|
||||
if ($GLOBALS['__ThemeModuleSkin__']['__IS_PARSE__']) return $GLOBALS['__ThemeModuleSkin__'];
|
||||
function getModulesSkinList()
|
||||
{
|
||||
if($GLOBALS['__ThemeModuleSkin__']['__IS_PARSE__'])
|
||||
{
|
||||
return $GLOBALS['__ThemeModuleSkin__'];
|
||||
}
|
||||
$searched_list = FileHandler::readDir('./modules');
|
||||
sort($searched_list);
|
||||
|
||||
$searched_count = count($searched_list);
|
||||
if(!$searched_count) return;
|
||||
if(!$searched_count)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$exceptionModule = array('editor', 'poll', 'homepage', 'textyle');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
foreach($searched_list as $val)
|
||||
{
|
||||
$skin_list = $oModuleModel->getSkins('./modules/' . $val);
|
||||
|
|
@ -559,7 +608,7 @@ class adminAdminModel extends admin
|
|||
$GLOBALS['__ThemeModuleSkin__'][$val]['skins'] = array_merge($GLOBALS['__ThemeModuleSkin__'][$val]['skins'], $skin_list);
|
||||
}
|
||||
}
|
||||
$GLOBALS['__ThemeModuleSkin__']['__IS_PARSE__'] = true;
|
||||
$GLOBALS['__ThemeModuleSkin__']['__IS_PARSE__'] = TRUE;
|
||||
|
||||
return $GLOBALS['__ThemeModuleSkin__'];
|
||||
}
|
||||
|
|
@ -576,10 +625,11 @@ class adminAdminModel extends admin
|
|||
// Update if no cache file exists or it is older than xml file
|
||||
if(!is_readable($cacheFile))
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$lang = new stdClass();
|
||||
$oModuleModel = getModel('module');
|
||||
$installed_module_list = $oModuleModel->getModulesXmlInfo();
|
||||
|
||||
$this->gnbLangBuffer = '<?php ';
|
||||
$this->gnbLangBuffer = '<?php $lang = new stdClass();';
|
||||
foreach($installed_module_list AS $key => $value)
|
||||
{
|
||||
$moduleActionInfo = $oModuleModel->getModuleActionXml($value->module);
|
||||
|
|
@ -595,7 +645,10 @@ class adminAdminModel extends admin
|
|||
$this->gnbLangBuffer .= ' ?>';
|
||||
FileHandler::writeFile($cacheFile, $this->gnbLangBuffer);
|
||||
}
|
||||
else include $cacheFile;
|
||||
else
|
||||
{
|
||||
include $cacheFile;
|
||||
}
|
||||
|
||||
return $lang->menu_gnb_sub;
|
||||
}
|
||||
|
|
@ -606,17 +659,23 @@ class adminAdminModel extends admin
|
|||
* @param bool $isGetModuleInfo
|
||||
* @return object
|
||||
*/
|
||||
function getFavoriteList($siteSrl = 0, $isGetModuleInfo = false)
|
||||
function getFavoriteList($siteSrl = 0, $isGetModuleInfo = FALSE)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->site_srl = $siteSrl;
|
||||
$output = executeQueryArray('admin.getFavoriteList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
if(!$output->data) return new Object();
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
if(!$output->data)
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
if($isGetModuleInfo && is_array($output->data))
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
foreach($output->data AS $key => $value)
|
||||
{
|
||||
$moduleInfo = $oModuleModel->getModuleInfoXml($value->module);
|
||||
|
|
@ -642,17 +701,20 @@ class adminAdminModel extends admin
|
|||
$args->site_srl = $siteSrl;
|
||||
$args->module = $module;
|
||||
$output = executeQuery('admin.getFavorite', $args);
|
||||
if (!$output->toBool()) return $output;
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
$returnObject = new Object();
|
||||
if($output->data)
|
||||
{
|
||||
$returnObject->add('result', true);
|
||||
$returnObject->add('result', TRUE);
|
||||
$returnObject->add('favoriteSrl', $output->data->admin_favorite_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$returnObject->add('result', false);
|
||||
$returnObject->add('result', FALSE);
|
||||
}
|
||||
|
||||
return $returnObject;
|
||||
|
|
@ -664,7 +726,10 @@ class adminAdminModel extends admin
|
|||
*/
|
||||
function getSiteAllList()
|
||||
{
|
||||
if(Context::get('domain')) $domain = Context::get('domain');
|
||||
if(Context::get('domain'))
|
||||
{
|
||||
$domain = Context::get('domain');
|
||||
}
|
||||
$siteList = $this->getAllSitesThatHaveModules($domain);
|
||||
$this->add('site_list', $siteList);
|
||||
}
|
||||
|
|
@ -675,17 +740,23 @@ class adminAdminModel extends admin
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
function getAllSitesThatHaveModules($domain = null)
|
||||
function getAllSitesThatHaveModules($domain = NULL)
|
||||
{
|
||||
$args = new stdClass();
|
||||
if($domain) $args->domain = $domain;
|
||||
if($domain)
|
||||
{
|
||||
$args->domain = $domain;
|
||||
}
|
||||
$columnList = array('domain', 'site_srl');
|
||||
|
||||
$siteList = array();
|
||||
$output = executeQueryArray('admin.getSiteAllList', $args, $columnList);
|
||||
if($output->toBool()) $siteList = $output->data;
|
||||
if($output->toBool())
|
||||
{
|
||||
$siteList = $output->data;
|
||||
}
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
foreach($siteList as $key => $value)
|
||||
{
|
||||
$args->site_srl = $value->site_srl;
|
||||
|
|
@ -719,10 +790,18 @@ class adminAdminModel extends admin
|
|||
*/
|
||||
function getSiteCountByDate($date = '')
|
||||
{
|
||||
if($date) $args->regDate = date('Ymd', strtotime($date));
|
||||
$args = new stdClass();
|
||||
|
||||
if($date)
|
||||
{
|
||||
$args->regDate = date('Ymd', strtotime($date));
|
||||
}
|
||||
|
||||
$output = executeQuery('admin.getSiteCountByDate', $args);
|
||||
if(!$output->toBool()) return 0;
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return $output->data->count;
|
||||
}
|
||||
|
|
@ -750,6 +829,7 @@ class adminAdminModel extends admin
|
|||
}
|
||||
return $icon_url;
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file admin.admin.model.php */
|
||||
/* Location: ./modules/admin/admin.admin.model.php */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* adminAdminView class
|
||||
* Admin view class of admin module
|
||||
|
|
@ -9,11 +10,13 @@
|
|||
*/
|
||||
class adminAdminView extends admin
|
||||
{
|
||||
|
||||
/**
|
||||
* layout list
|
||||
* @var array
|
||||
*/
|
||||
var $layout_list;
|
||||
|
||||
/**
|
||||
* easy install check file
|
||||
* @var array
|
||||
|
|
@ -27,9 +30,12 @@ class adminAdminView extends admin
|
|||
function init()
|
||||
{
|
||||
// forbit access if the user is not an administrator
|
||||
$oMemberModel = &getModel('member');
|
||||
$oMemberModel = getModel('member');
|
||||
$logged_info = $oMemberModel->getLoggedInfo();
|
||||
if($logged_info->is_admin!='Y') return $this->stop("msg_is_not_administrator");
|
||||
if($logged_info->is_admin != 'Y')
|
||||
{
|
||||
return $this->stop("msg_is_not_administrator");
|
||||
}
|
||||
|
||||
// change into administration layout
|
||||
$this->setTemplatePath($this->module_path . 'tpl');
|
||||
|
|
@ -53,8 +59,14 @@ class adminAdminView extends admin
|
|||
Context::set('use_mobile_view', $db_info->use_mobile_view == 'Y' ? 'Y' : 'N');
|
||||
Context::set('use_ssl', $db_info->use_ssl ? $db_info->use_ssl : "none");
|
||||
Context::set('use_cdn', $db_info->use_cdn ? $db_info->use_cdn : "none");
|
||||
if($db_info->http_port) Context::set('http_port', $db_info->http_port);
|
||||
if($db_info->https_port) Context::set('https_port', $db_info->https_port);
|
||||
if($db_info->http_port)
|
||||
{
|
||||
Context::set('http_port', $db_info->http_port);
|
||||
}
|
||||
if($db_info->https_port)
|
||||
{
|
||||
Context::set('https_port', $db_info->https_port);
|
||||
}
|
||||
|
||||
$this->showSendEnv();
|
||||
$this->checkEasyinstall();
|
||||
|
|
@ -67,9 +79,12 @@ class adminAdminView extends admin
|
|||
function checkEasyinstall()
|
||||
{
|
||||
$lastTime = (int) FileHandler::readFile($this->easyinstallCheckFile);
|
||||
if ($lastTime > time() - 60*60*24*30) return;
|
||||
if($lastTime > time() - 60 * 60 * 24 * 30)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$oAutoinstallModel = &getModel('autoinstall');
|
||||
$oAutoinstallModel = getModel('autoinstall');
|
||||
$params = array();
|
||||
$params["act"] = "getResourceapiLastupdate";
|
||||
$body = XmlGenerater::generate($params);
|
||||
|
|
@ -87,7 +102,7 @@ class adminAdminView extends admin
|
|||
$item = $oAutoinstallModel->getLatestPackage();
|
||||
if(!$item || $item->updatedate < $updateDate)
|
||||
{
|
||||
$oController = &getAdminController('autoinstall');
|
||||
$oController = getAdminController('autoinstall');
|
||||
$oController->_updateinfo();
|
||||
}
|
||||
$this->_markingCheckEasyinstall();
|
||||
|
|
@ -112,7 +127,7 @@ class adminAdminView extends admin
|
|||
{
|
||||
global $lang;
|
||||
|
||||
$oAdminAdminModel = &getAdminModel('admin');
|
||||
$oAdminAdminModel = getAdminModel('admin');
|
||||
$lang->menu_gnb_sub = $oAdminAdminModel->getAdminMenuLang();
|
||||
|
||||
$result = $oAdminAdminModel->checkAdminMenu();
|
||||
|
|
@ -123,7 +138,7 @@ class adminAdminView extends admin
|
|||
}
|
||||
include $result->php_file;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
$moduleActionInfo = $oModuleModel->getModuleActionXml($module);
|
||||
|
||||
$currentAct = Context::get('act');
|
||||
|
|
@ -138,7 +153,7 @@ class adminAdminView extends admin
|
|||
}
|
||||
|
||||
$parentSrl = 0;
|
||||
$oMenuAdminConroller = &getAdminController('menu');
|
||||
$oMenuAdminConroller = getAdminController('menu');
|
||||
foreach((array) $menu->list as $parentKey => $parentMenu)
|
||||
{
|
||||
if(!$parentMenu['text'])
|
||||
|
|
@ -148,7 +163,10 @@ class adminAdminView extends admin
|
|||
break;
|
||||
}
|
||||
|
||||
if(!is_array($parentMenu['list']) || !count($parentMenu['list'])) continue;
|
||||
if(!is_array($parentMenu['list']) || !count($parentMenu['list']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if($parentMenu['href'] == '#' && count($parentMenu['list']))
|
||||
{
|
||||
$firstChild = current($parentMenu['list']);
|
||||
|
|
@ -181,7 +199,7 @@ class adminAdminView extends admin
|
|||
$browserTitle = ($subMenuTitle ? $subMenuTitle : 'Dashboard') . ' - ' . $gnbTitleInfo->adminTitle;
|
||||
|
||||
// Get list of favorite
|
||||
$oAdminAdminModel = &getAdminModel('admin');
|
||||
$oAdminAdminModel = getAdminModel('admin');
|
||||
$output = $oAdminAdminModel->getFavoriteList(0, true);
|
||||
Context::set('favorite_list', $output->get('favoriteList'));
|
||||
|
||||
|
|
@ -205,7 +223,10 @@ class adminAdminView extends admin
|
|||
$item = $buff->zbxe_news->item;
|
||||
if($item)
|
||||
{
|
||||
if(!is_array($item)) $item = array($item);
|
||||
if(!is_array($item))
|
||||
{
|
||||
$item = array($item);
|
||||
}
|
||||
|
||||
foreach($item as $key => $val)
|
||||
{
|
||||
|
|
@ -244,14 +265,14 @@ class adminAdminView extends admin
|
|||
$today = date("Ymd");
|
||||
|
||||
// Member Status
|
||||
$oMemberAdminModel = &getAdminModel('member');
|
||||
$oMemberAdminModel = getAdminModel('member');
|
||||
$status = new stdClass();
|
||||
$status->member = new stdClass();
|
||||
$status->member->todayCount = $oMemberAdminModel->getMemberCountByDate($today);
|
||||
$status->member->totalCount = $oMemberAdminModel->getMemberCountByDate();
|
||||
|
||||
// Document Status
|
||||
$oDocumentAdminModel = &getAdminModel('document');
|
||||
$oDocumentAdminModel = getAdminModel('document');
|
||||
$statusList = array('PUBLIC', 'SECRET');
|
||||
$status->document = new stdClass();
|
||||
$status->document->todayCount = $oDocumentAdminModel->getDocumentCountByDate($today, array(), $statusList);
|
||||
|
|
@ -260,17 +281,18 @@ class adminAdminView extends admin
|
|||
Context::set('status', $status);
|
||||
|
||||
// Latest Document
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocumentModel = getModel('document');
|
||||
$columnList = array('document_srl', 'module_srl', 'category_srl', 'title', 'nick_name', 'member_srl');
|
||||
$args->list_count = 5;;
|
||||
$output = $oDocumentModel->getDocumentList($args, false, false, $columnList);
|
||||
$args->list_count = 5;
|
||||
;
|
||||
$output = $oDocumentModel->getDocumentList($args, FALSE, FALSE, $columnList);
|
||||
Context::set('latestDocumentList', $output->data);
|
||||
$security = new Security();
|
||||
$security->encodeHTML('latestDocumentList..variables.nick_name');
|
||||
unset($args, $output, $columnList);
|
||||
|
||||
// Latest Comment
|
||||
$oCommentModel = &getModel('comment');
|
||||
$oCommentModel = getModel('comment');
|
||||
$columnList = array('comment_srl', 'module_srl', 'document_srl', 'content', 'nick_name', 'member_srl');
|
||||
$args = new stdClass();
|
||||
$args->list_count = 5;
|
||||
|
|
@ -286,21 +308,21 @@ class adminAdminView extends admin
|
|||
unset($args, $output, $columnList);
|
||||
|
||||
// Get list of modules
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList();
|
||||
if(is_array($module_list))
|
||||
{
|
||||
$needUpdate = false;
|
||||
$addTables = false;
|
||||
$needUpdate = FALSE;
|
||||
$addTables = FALSE;
|
||||
foreach($module_list AS $key => $value)
|
||||
{
|
||||
if($value->need_install)
|
||||
{
|
||||
$addTables = true;
|
||||
$addTables = TRUE;
|
||||
}
|
||||
if($value->need_update)
|
||||
{
|
||||
$needUpdate = true;
|
||||
$needUpdate = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -348,8 +370,11 @@ class adminAdminView extends admin
|
|||
// gathering enviroment check
|
||||
$mainVersion = join('.', array_slice(explode('.', __ZBXE_VERSION__), 0, 2));
|
||||
$path = FileHandler::getRealPath('./files/env/' . $mainVersion);
|
||||
$isEnviromentGatheringAgreement = false;
|
||||
if(file_exists($path)) $isEnviromentGatheringAgreement = true;
|
||||
$isEnviromentGatheringAgreement = FALSE;
|
||||
if(file_exists($path))
|
||||
{
|
||||
$isEnviromentGatheringAgreement = TRUE;
|
||||
}
|
||||
Context::set('isEnviromentGatheringAgreement', $isEnviromentGatheringAgreement);
|
||||
Context::set('layout', 'none');
|
||||
|
||||
|
|
@ -376,19 +401,19 @@ class adminAdminView extends admin
|
|||
$admin_ip_list = preg_replace("/[,]+/", "\r\n", $db_info->admin_ip_list);
|
||||
Context::set('admin_ip_list', $admin_ip_list);
|
||||
|
||||
$oAdminModel = &getAdminModel('admin');
|
||||
$oAdminModel = getAdminModel('admin');
|
||||
$favicon_url = $oAdminModel->getFaviconUrl();
|
||||
$mobicon_url = $oAdminModel->getMobileIconUrl();
|
||||
Context::set('favicon_url', $favicon_url);
|
||||
Context::set('mobicon_url', $mobicon_url);
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocumentModel = getModel('document');
|
||||
$config = $oDocumentModel->getDocumentConfig();
|
||||
Context::set('thumbnail_type', $config->thumbnail_type);
|
||||
|
||||
Context::set('IP', $_SERVER['REMOTE_ADDR']);
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('module');
|
||||
Context::set('siteTitle', $config->siteTitle);
|
||||
Context::set('htmlFooter', $config->htmlFooter);
|
||||
|
|
@ -429,11 +454,11 @@ class adminAdminView extends admin
|
|||
*/
|
||||
function dispAdminSetup()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
$configObject = $oModuleModel->getModuleConfig('admin');
|
||||
|
||||
$oAdmin = &getClass('admin');
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
$oAdmin = getClass('admin');
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
$output = $oMenuAdminModel->getMenuByTitle($oAdmin->getAdminMenuName());
|
||||
|
||||
Context::set('menu_srl', $output->menu_srl);
|
||||
|
|
@ -442,14 +467,16 @@ class adminAdminView extends admin
|
|||
$this->setTemplateFile('admin_setup');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Enviroment information send to XE collect server
|
||||
* @return void
|
||||
*/
|
||||
function showSendEnv()
|
||||
{
|
||||
if(Context::getResponseMethod() != 'HTML') return;
|
||||
if(Context::getResponseMethod() != 'HTML')
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$server = 'http://collect.xpressengine.com/env/img.php?';
|
||||
$path = './files/env/';
|
||||
|
|
@ -458,7 +485,7 @@ class adminAdminView extends admin
|
|||
|
||||
if(file_exists(FileHandler::getRealPath($install_env)))
|
||||
{
|
||||
$oAdminAdminModel = &getAdminModel('admin');
|
||||
$oAdminAdminModel = getAdminModel('admin');
|
||||
$params = $oAdminAdminModel->getEnv('INSTALL');
|
||||
$img = sprintf('<img src="%s" alt="" style="height:0px;width:0px" />', $server . $params);
|
||||
Context::addHtmlFooter($img);
|
||||
|
|
@ -470,7 +497,7 @@ class adminAdminView extends admin
|
|||
{
|
||||
if($_SESSION['enviroment_gather'] == 'Y')
|
||||
{
|
||||
$oAdminAdminModel = &getAdminModel('admin');
|
||||
$oAdminAdminModel = getAdminModel('admin');
|
||||
$params = $oAdminAdminModel->getEnv();
|
||||
$img = sprintf('<img src="%s" alt="" style="height:0px;width:0px" />', $server . $params);
|
||||
Context::addHtmlFooter($img);
|
||||
|
|
@ -481,6 +508,7 @@ class adminAdminView extends admin
|
|||
unset($_SESSION['enviroment_gather']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file admin.admin.view.php */
|
||||
/* Location: ./modules/admin/admin.admin.view.php */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* admin class
|
||||
* Base class of admin module
|
||||
|
|
@ -9,6 +10,7 @@
|
|||
*/
|
||||
class admin extends ModuleObject
|
||||
{
|
||||
|
||||
private $adminMenuName = '__ADMINMENU_V17__';
|
||||
|
||||
public function getAdminMenuName()
|
||||
|
|
@ -31,10 +33,13 @@ class admin extends ModuleObject
|
|||
*/
|
||||
function checkUpdate()
|
||||
{
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists("admin_favorite", "type")) return true;
|
||||
$oDB = DB::getInstance();
|
||||
if(!$oDB->isColumnExists("admin_favorite", "type"))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -43,10 +48,10 @@ class admin extends ModuleObject
|
|||
*/
|
||||
function moduleUpdate()
|
||||
{
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB = DB::getInstance();
|
||||
if(!$oDB->isColumnExists("admin_favorite", "type"))
|
||||
{
|
||||
$oAdminAdminModel = &getAdminModel('admin');
|
||||
$oAdminAdminModel = getAdminModel('admin');
|
||||
$output = $oAdminAdminModel->getFavoriteList();
|
||||
$favoriteList = $output->get('favoriteList');
|
||||
|
||||
|
|
@ -55,7 +60,7 @@ class admin extends ModuleObject
|
|||
$oDB->addColumn('admin_favorite', "type", "varchar", 30, 'module');
|
||||
if(is_array($favoriteList))
|
||||
{
|
||||
$oAdminAdminController = &getAdminController('admin');
|
||||
$oAdminAdminController = getAdminController('admin');
|
||||
$oAdminAdminController->_deleteAllFavorite();
|
||||
foreach($favoriteList AS $key => $value)
|
||||
{
|
||||
|
|
@ -72,6 +77,7 @@ class admin extends ModuleObject
|
|||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function checkAdminMenu()
|
||||
|
|
@ -79,19 +85,19 @@ class admin extends ModuleObject
|
|||
// for admin menu
|
||||
if(Context::isInstalled())
|
||||
{
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
$output = $oMenuAdminModel->getMenuByTitle($this->adminMenuName);
|
||||
|
||||
if(!$output->menu_srl)
|
||||
{
|
||||
$oAdminClass = &getClass('admin');
|
||||
$oAdminClass = getClass('admin');
|
||||
$oAdminClass->createXeAdminMenu();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!is_readable(FileHandler::getRealPath($output->php_file)))
|
||||
{
|
||||
$oMenuAdminController = &getAdminController('menu');
|
||||
$oMenuAdminController = getAdminController('menu');
|
||||
$oMenuAdminController->makeXmlFile($output->menu_srl);
|
||||
}
|
||||
Context::set('admin_menu_srl', $output->menu_srl);
|
||||
|
|
@ -136,12 +142,15 @@ class admin extends ModuleObject
|
|||
{
|
||||
$args->url = 'index.php?module=admin';
|
||||
}
|
||||
else $args->url = '#';
|
||||
else
|
||||
{
|
||||
$args->url = '#';
|
||||
}
|
||||
$args->listorder = -1 * $args->menu_item_srl;
|
||||
$output = executeQuery('menu.insertMenuItem', $args);
|
||||
}
|
||||
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
$columnList = array('menu_item_srl', 'name');
|
||||
$output = $oMenuAdminModel->getMenuItems($menuSrl, 0, $columnList);
|
||||
if(is_array($output->data))
|
||||
|
|
@ -245,7 +254,7 @@ class admin extends ModuleObject
|
|||
),
|
||||
);
|
||||
|
||||
$oMemberModel = &getModel('member');
|
||||
$oMemberModel = getModel('member');
|
||||
$output = $oMemberModel->getAdminGroup(array('group_srl'));
|
||||
$adminGroupSrl = $output->group_srl;
|
||||
|
||||
|
|
@ -259,7 +268,7 @@ class admin extends ModuleObject
|
|||
$args->hover_btn = '';
|
||||
$args->active_btn = '';
|
||||
$args->group_srls = $adminGroupSrl;
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel = getModel('module');
|
||||
|
||||
foreach($gnbModuleList AS $key => $value)
|
||||
{
|
||||
|
|
@ -281,7 +290,7 @@ class admin extends ModuleObject
|
|||
}
|
||||
}
|
||||
|
||||
$oMenuAdminConroller = &getAdminController('menu');
|
||||
$oMenuAdminConroller = getAdminController('menu');
|
||||
$oMenuAdminConroller->makeXmlFile($menuSrl);
|
||||
}
|
||||
|
||||
|
|
@ -386,7 +395,7 @@ class admin extends ModuleObject
|
|||
|
||||
private function _oldAdminmenuDelete()
|
||||
{
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
|
||||
$output = $oMenuAdminModel->getMenuByTitle($this->adminMenuName);
|
||||
$newAdminmenuSrl = $output->menu_srl;
|
||||
|
|
@ -408,7 +417,7 @@ class admin extends ModuleObject
|
|||
|
||||
if($menuSrl)
|
||||
{
|
||||
$oMenuAdminController = &getAdminController('menu');
|
||||
$oMenuAdminController = getAdminController('menu');
|
||||
|
||||
$output = $oMenuAdminModel->getMenuItems($menuSrl);
|
||||
if(is_array($output->data))
|
||||
|
|
@ -424,7 +433,7 @@ class admin extends ModuleObject
|
|||
}
|
||||
}
|
||||
|
||||
$isUserAddedMenuMoved = false;
|
||||
$isUserAddedMenuMoved = FALSE;
|
||||
foreach($output->data AS $key => $menuItem)
|
||||
{
|
||||
if($menuItem->parent_srl != 0)
|
||||
|
|
@ -453,7 +462,7 @@ class admin extends ModuleObject
|
|||
$menuItem->parent_srl = $newParentItem->menu_item_srl;
|
||||
|
||||
$output = executeQuery('menu.updateMenuItem', $menuItem);
|
||||
$isUserAddedMenuMoved = true;
|
||||
$isUserAddedMenuMoved = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -467,6 +476,7 @@ class admin extends ModuleObject
|
|||
$oMenuAdminController->deleteMenu($menuSrl);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file admin.class.php */
|
||||
/* Location: ./modules/admin/admin.class.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue