mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-14 16:02:14 +09:00
commit
aab1c8f1a1
110 changed files with 1990 additions and 896 deletions
36
.htaccess
36
.htaccess
|
|
@ -15,37 +15,7 @@ RewriteRule ^(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*) ./files/$2
|
|||
RewriteCond %{SCRIPT_FILENAME} !-f
|
||||
RewriteRule ^(.+)/(files|modules|widgets|widgetstyles|layouts|m.layouts|addons)/(.*) ./$2/$3 [L]
|
||||
|
||||
# rss , blogAPI
|
||||
RewriteRule ^(rss|atom)$ ./index.php?module=rss&act=$1 [L]
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/(rss|atom|api)$ ./index.php?mid=$1&act=$2 [L]
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$ ./index.php?vid=$1&mid=$2&act=$3 [L]
|
||||
|
||||
# trackback
|
||||
RewriteRule ^([0-9]+)/(.+)/trackback$ ./index.php?document_srl=$1&key=$2&act=trackback [L]
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?mid=$1&document_srl=$2&key=$3&act=trackback [L]
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&document_srl=$2&key=$3&act=trackback [L]
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&mid=$2&document_srl=$3&key=$4&act=trackback [L]
|
||||
|
||||
# document permanent link
|
||||
RewriteRule ^([0-9]+)$ ./index.php?document_srl=$1 [L,QSA]
|
||||
|
||||
# mid link
|
||||
RewriteCond %{SCRIPT_FILENAME} !-d
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/?$ ./index.php?mid=$1 [L,QSA]
|
||||
# mid + document link
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)$ ./index.php?mid=$1&document_srl=$2 [L,QSA]
|
||||
|
||||
# vid + mid link
|
||||
RewriteCond %{SCRIPT_FILENAME} !-d
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$ ./index.php?vid=$1&mid=$2 [L,QSA]
|
||||
# vid + mid + document link
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$ ./index.php?vid=$1&mid=$2&document_srl=$3 [L,QSA]
|
||||
|
||||
# mid + entry title
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/entry/(.+)$ ./index.php?mid=$1&entry=$2 [L,QSA]
|
||||
# vid + mid + entry title
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$ ./index.php?vid=$1&mid=$2&entry=$3 [L,QSA]
|
||||
|
||||
#shop / vid / [category|product] / identifier
|
||||
# router
|
||||
RewriteCond %{SCRIPT_FILENAME} !-f
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_\.-]+)$ ./index.php?act=route&vid=$1&type=$2&identifier=$3 [L,QSA]
|
||||
RewriteCond %{SCRIPT_FILENAME} !-d
|
||||
RewriteRule ^(.*)$ ./index.php [L]
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ XpressEngine(XE)은 PHP로 작성한 설치형 CMS(Content Management System)입
|
|||
@akasima @bnu @jhyeon1010 @khongchi @ngleader
|
||||
|
||||
## Authors
|
||||
adrian.vasile.constantin, aerofleet, @akasima, @andreimarin, araste, @bnu, @bongkeun, bradly1, buffkj, c2joy, @canto, cbrghost, @ccata17, @ChanMyeong, chinaskyking, chschy, clench, @cometdev, @devdho, @devjin, @dionisrom, @dorami, @dragan-dan, ducduydaovn, duvent, @Eundong, @florinutz, @flourscent, @flyskyko, @ForPeople, FruitsHake, guny, @haneul, hankm2004, @hansim, haojilin, heemin, @hyeon0142, ikko, @izuzero, johnsonshu, juanlee0, k10206, kagami, @khongchi, @lansi951, @largeden, liahona, lickawtl, @mAKEkr, mayoojin, mglclub, @misol, mmx900, @mog422, mooo, mosmartin, @nagoon97, @ngleader, nicetwo, ovclas, @qw5414, @Rayyin, risapapa, rokmcssu, royallin, rubyeye, ryin005, @samswnlee, sanghunjun, @sejin7940, @smaker, @solidh, sspa3141, @stellar12, supershop, @taggon, @ucorina, unryong, venister, wdlee91, welcomeju, @YJSoft, ysnglee2000, zero
|
||||
<http://www.xpressengine.com/contributors>
|
||||
|
||||
## Contribution Guide
|
||||
`CONTRIBUTING.md`파일을 참고하세요.
|
||||
|
|
|
|||
|
|
@ -230,14 +230,30 @@ class Context
|
|||
define('_XE_SITELOCK_MESSAGE_', $message);
|
||||
|
||||
header("HTTP/1.1 403 Forbidden");
|
||||
include _XE_PATH_ . 'common/tpl/sitelock.html';
|
||||
if(FileHandler::exists(_XE_PATH_ . 'common/tpl/sitelock.user.html'))
|
||||
{
|
||||
include _XE_PATH_ . 'common/tpl/sitelock.user.html';
|
||||
}
|
||||
else
|
||||
{
|
||||
include _XE_PATH_ . 'common/tpl/sitelock.html';
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// check if using rewrite module
|
||||
$this->allow_rewrite = ($this->db_info->use_rewrite == 'Y' ? TRUE : FALSE);
|
||||
|
||||
// If XE is installed, get virtual site information
|
||||
if(self::isInstalled())
|
||||
{
|
||||
// If using rewrite module, initializes router
|
||||
if($this->allow_rewrite)
|
||||
{
|
||||
Router::proc();
|
||||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$site_module_info = $oModuleModel->getDefaultMid();
|
||||
|
||||
|
|
@ -358,9 +374,6 @@ class Context
|
|||
$this->lang = &$GLOBALS['lang'];
|
||||
$this->loadLang(_XE_PATH_ . 'common/lang/');
|
||||
|
||||
// check if using rewrite module
|
||||
$this->allow_rewrite = ($this->db_info->use_rewrite == 'Y' ? TRUE : FALSE);
|
||||
|
||||
// set locations for javascript use
|
||||
if($_SERVER['REQUEST_METHOD'] == 'GET')
|
||||
{
|
||||
|
|
@ -1059,6 +1072,7 @@ class Context
|
|||
*/
|
||||
function convertEncodingStr($str)
|
||||
{
|
||||
if(!$str) return null;
|
||||
$obj = new stdClass();
|
||||
$obj->str = $str;
|
||||
$obj = self::convertEncoding($obj);
|
||||
|
|
@ -1554,7 +1568,9 @@ class Context
|
|||
'act.document_srl.key.mid.vid' => ($act == 'trackback') ? "$vid/$mid/$srl/$key/$act" : ''
|
||||
);
|
||||
|
||||
$query = $target_map[$target];
|
||||
Router::setMap($target_map);
|
||||
|
||||
$query = Router::makePrettyUrl($target);
|
||||
}
|
||||
|
||||
if(!$query)
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ class DisplayHandler extends Handler
|
|||
$buff = 'The IP address is not allowed. Change the value of __DEBUG_PROTECT_IP__ into your IP address in config/config.user.inc.php or config/config.inc.php';
|
||||
}
|
||||
|
||||
return "<!--\r\n" . implode("\r\n", $buff) . "\r\n-->";
|
||||
return "<!--\r\n" . $buff . "\r\n-->";
|
||||
}
|
||||
|
||||
// Output to a file
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class HTMLDisplayHandler
|
|||
$output = preg_replace_callback('!<meta(.*?)(?:\/|)>!is', array($this, '_moveMetaToHeader'), $output);
|
||||
|
||||
// change a meta fine(widget often put the tag like <!--Meta:path--> to the content because of caching)
|
||||
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\-\/\.\@]+)-->/is', array($this, '_transMeta'), $output);
|
||||
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\-\/\.\@\:]+)-->/is', array($this, '_transMeta'), $output);
|
||||
|
||||
// handles a relative path generated by using the rewrite module
|
||||
if(Context::isAllowRewrite())
|
||||
|
|
@ -451,10 +451,23 @@ class HTMLDisplayHandler
|
|||
// add common JS/CSS files
|
||||
if(__DEBUG__ || !__XE_VERSION_STABLE__)
|
||||
{
|
||||
$oContext->loadFile(array('./common/js/jquery-1.x.js', 'head', 'lt IE 9', -111000), true);
|
||||
$oContext->loadFile(array('./common/js/jquery.js', 'head', 'gte IE 9', -110000), true);
|
||||
$oContext->loadFile(array('./common/js/x.js', 'head', '', -100000), true);
|
||||
$oContext->loadFile(array('./common/js/common.js', 'head', '', -100000), true);
|
||||
$oContext->loadFile(array('./common/js/js_app.js', 'head', '', -100000), true);
|
||||
$oContext->loadFile(array('./common/js/xml_handler.js', 'head', '', -100000), true);
|
||||
$oContext->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000), true);
|
||||
$oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true);
|
||||
$oContext->loadFile(array('./common/css/mobile.css', '', '', -1000000), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oContext->loadFile(array('./common/js/jquery-1.x.min.js', 'head', 'lt IE 9', -111000), true);
|
||||
$oContext->loadFile(array('./common/js/jquery.min.js', 'head', 'gte IE 9', -110000), true);
|
||||
$oContext->loadFile(array('./common/js/x.min.js', 'head', '', -100000), true);
|
||||
$oContext->loadFile(array('./common/js/xe.min.js', 'head', '', -100000), true);
|
||||
$oContext->loadFile(array('./common/css/xe.min.css', '', '', -1000000), true);
|
||||
$oContext->loadFile(array('./common/css/mobile.min.css', '', '', -1000000), true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -515,7 +515,7 @@ class FileHandler
|
|||
* @param string $post_data Request arguments array for POST method
|
||||
* @return string If success, the content of the target file. Otherwise: none
|
||||
*/
|
||||
function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array())
|
||||
function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array(), $request_config = array())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -533,6 +533,15 @@ class FileHandler
|
|||
else
|
||||
{
|
||||
$oRequest = new HTTP_Request($url);
|
||||
|
||||
if(count($request_config) && method_exists($oRequest, 'setConfig'))
|
||||
{
|
||||
foreach($request_config as $key=>$val)
|
||||
{
|
||||
$oRequest->setConfig($key, $val);
|
||||
}
|
||||
}
|
||||
|
||||
if(count($headers) > 0)
|
||||
{
|
||||
foreach($headers as $key => $val)
|
||||
|
|
@ -1008,6 +1017,33 @@ class FileHandler
|
|||
$path = self::getRealPath($path);
|
||||
return is_dir($path) ? $path : FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check is writable dir
|
||||
*
|
||||
* @param string $path Target dir path
|
||||
* @return bool
|
||||
*/
|
||||
function isWritableDir($path)
|
||||
{
|
||||
$path = self::getRealPath($path);
|
||||
if(is_dir($path)==FALSE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$checkFile = $path . '/_CheckWritableDir';
|
||||
|
||||
$fp = fopen($checkFile, 'w');
|
||||
if(!is_resource($fp))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
fclose($fp);
|
||||
|
||||
self::removeFile($checkFile);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file FileHandler.class.php */
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
class FrontEndFileHandler extends Handler
|
||||
{
|
||||
|
||||
static $isSSL = FALSE;
|
||||
static $isSSL = null;
|
||||
|
||||
/**
|
||||
* Map for css
|
||||
|
|
@ -50,12 +50,13 @@ class FrontEndFileHandler extends Handler
|
|||
* Check SSL
|
||||
*
|
||||
* @return bool If using ssl returns true, otherwise returns false.
|
||||
* @deprecated
|
||||
*/
|
||||
function isSsl()
|
||||
{
|
||||
if(self::$isSSL)
|
||||
if(!is_null(self::$isSSL))
|
||||
{
|
||||
return TRUE;
|
||||
return self::$isSSL;
|
||||
}
|
||||
|
||||
$url_info = parse_url(Context::getRequestUrl());
|
||||
|
|
|
|||
|
|
@ -59,7 +59,10 @@ class ModuleHandler extends Handler
|
|||
$this->mid = $mid ? $mid : Context::get('mid');
|
||||
$this->document_srl = $document_srl ? (int) $document_srl : (int) Context::get('document_srl');
|
||||
$this->module_srl = $module_srl ? (int) $module_srl : (int) Context::get('module_srl');
|
||||
$this->entry = Context::convertEncodingStr(Context::get('entry'));
|
||||
if($entry = Context::get('entry'))
|
||||
{
|
||||
$this->entry = Context::convertEncodingStr($entry);
|
||||
}
|
||||
|
||||
// Validate variables to prevent XSS
|
||||
$isInvalid = NULL;
|
||||
|
|
@ -548,7 +551,6 @@ class ModuleHandler extends Handler
|
|||
}
|
||||
|
||||
$xml_info = $oModuleModel->getModuleActionXml($forward->module);
|
||||
$oMemberModel = getModel('member');
|
||||
|
||||
if($this->module == "admin" && $type == "view")
|
||||
{
|
||||
|
|
@ -1145,12 +1147,25 @@ class ModuleHandler extends Handler
|
|||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
//store before trigger call time
|
||||
$before_trigger_time = NULL;
|
||||
if(__LOG_SLOW_TRIGGER__> 0)
|
||||
{
|
||||
$before_trigger_time = microtime(true);
|
||||
}
|
||||
|
||||
foreach($triggers as $item)
|
||||
{
|
||||
$module = $item->module;
|
||||
$type = $item->type;
|
||||
$called_method = $item->called_method;
|
||||
|
||||
$before_each_trigger_time = NULL;
|
||||
if(__LOG_SLOW_TRIGGER__> 0)
|
||||
{
|
||||
$before_each_trigger_time = microtime(true);
|
||||
}
|
||||
|
||||
// todo why don't we call a normal class object ?
|
||||
$oModule = getModule($module, $type);
|
||||
|
|
@ -1165,6 +1180,57 @@ class ModuleHandler extends Handler
|
|||
return $output;
|
||||
}
|
||||
unset($oModule);
|
||||
|
||||
//store after trigger call time
|
||||
$after_each_trigger_time = NULL;
|
||||
//init value to 0
|
||||
$elapsed_time_trigger = 0;
|
||||
|
||||
if(__LOG_SLOW_TRIGGER__> 0)
|
||||
{
|
||||
$after_each_trigger_time = microtime(true);
|
||||
$elapsed_time_trigger = ($after_each_trigger_time - $before_each_trigger_time) * 1000;
|
||||
}
|
||||
|
||||
// if __LOG_SLOW_TRIGGER__ is defined, check elapsed time and leave trigger time log
|
||||
if(__LOG_SLOW_TRIGGER__> 0 && $elapsed_time_trigger > __LOG_SLOW_TRIGGER__)
|
||||
{
|
||||
$buff = '';
|
||||
$log_file = _XE_PATH_ . 'files/_db_slow_trigger.php';
|
||||
if(!file_exists($log_file))
|
||||
{
|
||||
$buff = '<?php exit(); ?' . '>' . "\n";
|
||||
}
|
||||
|
||||
$buff .= sprintf("%s\t%s.%s.%s.%s(%s)\n\t%0.6f msec\n\n", date("Y-m-d H:i"), $item->trigger_name,$item->module,$item->called_method,$item->called_position,$item->type, $elapsed_time_trigger);
|
||||
|
||||
@file_put_contents($log_file, $buff, FILE_APPEND|LOCK_EX);
|
||||
}
|
||||
}
|
||||
|
||||
//store after trigger call time
|
||||
$after_trigger_time = NULL;
|
||||
//init value to 0
|
||||
$elapsed_time = 0;
|
||||
if(__LOG_SLOW_TRIGGER__> 0)
|
||||
{
|
||||
$after_trigger_time = microtime(true);
|
||||
$elapsed_time = ($after_trigger_time - $before_trigger_time) * 1000;
|
||||
}
|
||||
|
||||
// if __LOG_SLOW_TRIGGER__ is defined, check elapsed time and leave trigger time log
|
||||
if(__LOG_SLOW_TRIGGER__> 0 && $elapsed_time > __LOG_SLOW_TRIGGER__)
|
||||
{
|
||||
$buff = '';
|
||||
$log_file = _XE_PATH_ . 'files/_slow_trigger.php';
|
||||
if(!file_exists($log_file))
|
||||
{
|
||||
$buff = '<?php exit(); ?' . '>' . "\n";
|
||||
}
|
||||
|
||||
$buff .= sprintf("%s\t%s.totaltime\n\t%0.6f msec\n\n", date("Y-m-d H:i"), $trigger_name,$elapsed_time);
|
||||
|
||||
@file_put_contents($log_file, $buff, FILE_APPEND|LOCK_EX);
|
||||
}
|
||||
|
||||
return new Object();
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ class Object
|
|||
}
|
||||
|
||||
/**
|
||||
* Method to retrieve an object containing a key/value paris
|
||||
* Method to retrieve an object containing a key/value pairs
|
||||
*
|
||||
* @return Object Returns an object containing key/value pairs
|
||||
*/
|
||||
|
|
|
|||
253
classes/router/Router.class.php
Normal file
253
classes/router/Router.class.php
Normal file
|
|
@ -0,0 +1,253 @@
|
|||
<?php
|
||||
/**
|
||||
* @file Router.class.php
|
||||
* @brief Parses URIs and determines routing
|
||||
* @author FunnyXE (admin@funnyxe.com)
|
||||
*/
|
||||
class Router
|
||||
{
|
||||
/**
|
||||
* URI Segments
|
||||
* @var array
|
||||
*/
|
||||
private static $segments = array();
|
||||
|
||||
/**
|
||||
* Routes
|
||||
* @var array
|
||||
*/
|
||||
private static $routes = array(
|
||||
// rss , blogAPI
|
||||
'(rss|atom)' => array('module' => 'rss', 'act' => '$1', '[L]' => TRUE),
|
||||
'([a-zA-Z0-9_]+)/(rss|atom|api)' => array('mid' => '$1', 'act' => '$2', '[L]' => TRUE),
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)' => array('vid' => '$1', 'mid' => '$2', 'act' => '$3', '[L]' => TRUE),
|
||||
// trackback
|
||||
'([0-9]+)/(.+)/trackback' => array('document_srl' => '$1', 'key' => '$2', 'act' => 'trackback', '[L]' => TRUE),
|
||||
'([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback' => array('mid' => '$1', 'document_srl' => '$2', 'key' => '$3', 'act' => 'trackback', '[L]' => TRUE),
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback' => array('vid' => '$1', 'mid' => '$2', 'document_srl' => '$3' , 'key' => '$4', 'act' => 'trackback', '[L]' => TRUE),
|
||||
// document_srl
|
||||
'([0-9]+)' => array('document_srl' => '$1', '[L]' => TRUE),
|
||||
// mid
|
||||
'([a-zA-Z0-9_]+)/?' => array('mid' => '$1', '[L]' => TRUE),
|
||||
// mid + document_srl
|
||||
'([a-zA-Z0-9_]+)/([0-9]+)' => array('mid' => '$1', 'document_srl' => '$2', '[L]' => TRUE),
|
||||
// vid + mid
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/' => array('vid' => '$1', 'mid' => '$2', '[L]' => TRUE),
|
||||
// vid + mid + document_srl
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)?' => array('vid' => '$1', 'mid' => '$2', 'document_srl' => '$3', '[L]' => TRUE),
|
||||
// mid + entry title
|
||||
'([a-zA-Z0-9_]+)/entry/(.+)' => array('mid' => '$1', 'entry' => '$2', '[L]' => TRUE),
|
||||
// vid + mid + entry title
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)' => array('vid' => '$1', 'mid' => '$2', 'entry' => '$3', '[L]' => TRUE),
|
||||
// shop / vid / [category|product] / identifier
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_\.-]+)' => array('act' => 'route', 'vid' => '$1', 'type' => '$2', 'identifier'=> '$3', '[L]' => TRUE)
|
||||
);
|
||||
|
||||
/**
|
||||
* Rewrite map
|
||||
* @var array
|
||||
*/
|
||||
private static $rewrite_map = array();
|
||||
|
||||
/**
|
||||
* @brief Applys routes.
|
||||
* @see This function should be called only once
|
||||
* @return void
|
||||
*/
|
||||
public static function proc()
|
||||
{
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
|
||||
if (stripos($uri, $_SERVER['SCRIPT_NAME']) === 0)
|
||||
{
|
||||
$uri = substr($uri, strlen($_SERVER['SCRIPT_NAME']));
|
||||
}
|
||||
elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
|
||||
{
|
||||
$uri = substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME'])));
|
||||
}
|
||||
|
||||
if ($uri == '/' || empty($uri))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get relative path from request uri
|
||||
$path = parse_url($uri, PHP_URL_PATH);
|
||||
|
||||
// Do some final cleaning of the URI and return it
|
||||
$path = str_replace(array('//', '../'), '/', trim($path, '/'));
|
||||
|
||||
if(strlen($path) > 0)
|
||||
{
|
||||
self::$segments = explode('/', $path);
|
||||
}
|
||||
|
||||
if(isset(self::$routes[$path]))
|
||||
{
|
||||
foreach(self::$routes[$path] as $key => $val)
|
||||
{
|
||||
if(strlen($val) > 0)
|
||||
{
|
||||
if(substr_compare($val, '$', 0, 1) == 0)
|
||||
{
|
||||
$segment_index = (int) substr($val, 1) - 1;
|
||||
if($segment_index < 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Context::set($key, self::$segments[$segment_index], TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::set($key, $val, TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::set($key, '', TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$break = FALSE;
|
||||
|
||||
// Apply routes
|
||||
foreach(self::$routes as $regex => $query)
|
||||
{
|
||||
// Stop the routing proccess
|
||||
if($break)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if(preg_match('#^' . $regex . '$#', $path, $matches))
|
||||
{
|
||||
foreach($query as $key => $val)
|
||||
{
|
||||
// If [L] keyword is defined
|
||||
if($key == '[L]')
|
||||
{
|
||||
// Stop the routing process and don't apply any more rules
|
||||
$break = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(strlen($val) > 0)
|
||||
{
|
||||
if(substr($val, 0, 1) == '$')
|
||||
{
|
||||
$segment_index = (int) substr($val, 1) - 1;
|
||||
if($segment_index < 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Context::set($key, self::$segments[$segment_index], TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::set($key, $val, TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::set($key, '', TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add a rewrite map(s)
|
||||
* @param array $map
|
||||
* @return void
|
||||
*/
|
||||
public static function setMap($map)
|
||||
{
|
||||
self::$rewrite_map = array_merge(self::$rewrite_map, $map);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add a route
|
||||
* @param string $target
|
||||
* @param array $query
|
||||
* @return void
|
||||
*/
|
||||
public static function add($target, $query)
|
||||
{
|
||||
self::$routes[$target] = $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add multiple routes
|
||||
* @param array $routes
|
||||
* @return void
|
||||
*/
|
||||
public function adds($routes)
|
||||
{
|
||||
self::$routes = array_merge(self::$routes, $routes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get segment from request uri
|
||||
* @param int $index
|
||||
* @return string
|
||||
*/
|
||||
public static function getSegment($index)
|
||||
{
|
||||
return self::$segments[$index - 1];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get segment from request uri
|
||||
* @param int $index
|
||||
* @return string
|
||||
*/
|
||||
public static function getSegments()
|
||||
{
|
||||
return self::$segments;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get route info
|
||||
* @param string $regex
|
||||
* @return array
|
||||
*/
|
||||
public static function getRoute($regex)
|
||||
{
|
||||
return self::$routes[$regex];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get routes list
|
||||
* @return array
|
||||
*/
|
||||
public static function getRoutes()
|
||||
{
|
||||
return self::$routes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get routes list
|
||||
* @param string $regex
|
||||
* @return boolean
|
||||
*/
|
||||
public static function isExistsRoute($regex)
|
||||
{
|
||||
return isset(self::$routes[$regex]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Makes shortten url
|
||||
* @param string $regex
|
||||
* @return string
|
||||
*/
|
||||
public static function makePrettyUrl($regex)
|
||||
{
|
||||
return self::$rewrite_map[$regex];
|
||||
}
|
||||
}
|
||||
|
|
@ -87,6 +87,7 @@
|
|||
</domain>
|
||||
<domain name="http://www.vimeo.com" desc="vimeo.com">
|
||||
<pattern>http://player.vimeo.com/</pattern>
|
||||
<pattern>//player.vimeo.com/</pattern>
|
||||
</domain>
|
||||
</iframe>
|
||||
</whiteurl>
|
||||
|
|
|
|||
|
|
@ -365,12 +365,34 @@ class TemplateHandler
|
|||
ob_start();
|
||||
if(substr($buff, 0, 7) == 'file://')
|
||||
{
|
||||
include(substr($buff, 7));
|
||||
if(__DEBUG__)
|
||||
{
|
||||
//load cache file from disk
|
||||
$eval_str = FileHandler::readFile(substr($buff, 7));
|
||||
$eval_str_buffed = "?>" . $eval_str;
|
||||
@eval($eval_str_buffed);
|
||||
$error_info = error_get_last();
|
||||
//parse error
|
||||
if ($error_info['type'] == 4)
|
||||
{
|
||||
throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
include(substr($buff, 7));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$eval_str = "?>" . $buff;
|
||||
eval($eval_str);
|
||||
@eval($eval_str);
|
||||
$error_info = error_get_last();
|
||||
//parse error
|
||||
if ($error_info['type'] == 4)
|
||||
{
|
||||
throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}");
|
||||
}
|
||||
}
|
||||
|
||||
return ob_get_clean();
|
||||
|
|
|
|||
|
|
@ -714,7 +714,7 @@ class Validator
|
|||
{
|
||||
$name = strtolower($name);
|
||||
|
||||
if(strpos('email,userid,url,alpha,alpha_number,number,', $name . ',') !== false)
|
||||
if(in_array($name, array('email', 'userid', 'url', 'alpha', 'alpha_number', 'number')))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,398 +1,396 @@
|
|||
<?php
|
||||
/* Copyright (C) NAVER <http://www.navercorp.com> */
|
||||
|
||||
/**
|
||||
* Argument class
|
||||
* @author NAVER (developers@xpressengine.com)
|
||||
* @package /classes/xml/xmlquery/argument
|
||||
* @version 0.1
|
||||
*/
|
||||
class Argument
|
||||
{
|
||||
|
||||
/**
|
||||
* argument value
|
||||
* @var mixed
|
||||
*/
|
||||
var $value;
|
||||
|
||||
/**
|
||||
* argument name
|
||||
* @var string
|
||||
*/
|
||||
var $name;
|
||||
|
||||
/**
|
||||
* argument type
|
||||
* @var string
|
||||
*/
|
||||
var $type;
|
||||
|
||||
/**
|
||||
* result of argument type check
|
||||
* @var bool
|
||||
*/
|
||||
var $isValid;
|
||||
|
||||
/**
|
||||
* error message
|
||||
* @var Object
|
||||
*/
|
||||
var $errorMessage;
|
||||
|
||||
/**
|
||||
* column operation
|
||||
*/
|
||||
var $column_operation;
|
||||
|
||||
/**
|
||||
* Check if arg value is user submnitted or default
|
||||
* @var mixed
|
||||
*/
|
||||
var $uses_default_value;
|
||||
|
||||
/**
|
||||
* Caches escaped and toString value so that the parsing won't happen multiple times
|
||||
* @var mixed
|
||||
*/
|
||||
var $_value; //
|
||||
|
||||
/**
|
||||
* constructor
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function Argument($name, $value)
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->name = $name;
|
||||
$this->isValid = TRUE;
|
||||
}
|
||||
|
||||
function getType()
|
||||
{
|
||||
if(isset($this->type))
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
if(is_string($this->value))
|
||||
{
|
||||
return 'column_name';
|
||||
}
|
||||
|
||||
return 'number';
|
||||
}
|
||||
|
||||
function setColumnType($value)
|
||||
{
|
||||
$this->type = $value;
|
||||
}
|
||||
|
||||
function setColumnOperation($operation)
|
||||
{
|
||||
$this->column_operation = $operation;
|
||||
}
|
||||
|
||||
function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
function getValue()
|
||||
{
|
||||
if(!isset($this->_value))
|
||||
{
|
||||
$value = $this->getEscapedValue();
|
||||
$this->_value = $this->toString($value);
|
||||
}
|
||||
return $this->_value;
|
||||
}
|
||||
|
||||
function getPureValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
function getColumnOperation()
|
||||
{
|
||||
return $this->column_operation;
|
||||
}
|
||||
|
||||
function getEscapedValue()
|
||||
{
|
||||
return $this->escapeValue($this->value);
|
||||
}
|
||||
|
||||
function getUnescapedValue()
|
||||
{
|
||||
if($this->value === 'null')
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* mixed value to string
|
||||
* @param mixed $value
|
||||
* @return string
|
||||
*/
|
||||
function toString($value)
|
||||
{
|
||||
if(is_array($value))
|
||||
{
|
||||
if(count($value) === 0)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
if(count($value) === 1 && $value[0] === '')
|
||||
{
|
||||
return '';
|
||||
}
|
||||
return '(' . implode(',', $value) . ')';
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* escape value
|
||||
* @param mixed $value
|
||||
* @return mixed
|
||||
*/
|
||||
function escapeValue($value)
|
||||
{
|
||||
$column_type = $this->getType();
|
||||
if($column_type == 'column_name')
|
||||
{
|
||||
$dbParser = DB::getParser();
|
||||
return $dbParser->parseExpression($value);
|
||||
}
|
||||
if(!isset($value))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$columnTypeList = array('date' => 1, 'varchar' => 1, 'char' => 1, 'text' => 1, 'bigtext' => 1);
|
||||
if(isset($columnTypeList[$column_type]))
|
||||
{
|
||||
if(!is_array($value))
|
||||
{
|
||||
$value = $this->_escapeStringValue($value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$total = count($value);
|
||||
for($i = 0; $i < $total; $i++)
|
||||
{
|
||||
$value[$i] = $this->_escapeStringValue($value[$i]);
|
||||
}
|
||||
//$value[$i] = '\''.$value[$i].'\'';
|
||||
}
|
||||
}
|
||||
if($this->uses_default_value)
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
if($column_type == 'number')
|
||||
{
|
||||
if(is_array($value))
|
||||
{
|
||||
foreach($value AS $key => $val)
|
||||
{
|
||||
if(isset($val) && $val !== '')
|
||||
{
|
||||
$value[$key] = (int) $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$value = (int) $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* escape string value
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
function _escapeStringValue($value)
|
||||
{
|
||||
// Remove non-utf8 chars.
|
||||
$regex = '@((?:[\x00-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}){1,100})|([\xF0-\xF7][\x80-\xBF]{3})|([\x80-\xBF])|([\xC0-\xFF])@x';
|
||||
|
||||
$value = preg_replace_callback($regex, array($this, 'utf8Replacer'), $value);
|
||||
$db = DB::getInstance();
|
||||
$value = $db->addQuotes($value);
|
||||
return '\'' . $value . '\'';
|
||||
}
|
||||
|
||||
function utf8Replacer($captures)
|
||||
{
|
||||
if(strlen($captures[1]))
|
||||
{
|
||||
// Valid byte sequence. Return unmodified.
|
||||
return $captures[1];
|
||||
}
|
||||
else if(strlen($captures[2]))
|
||||
{
|
||||
// Remove user defined area
|
||||
if("\xF3\xB0\x80\x80" <= $captures[2])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
return $captures[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function isValid()
|
||||
{
|
||||
return $this->isValid;
|
||||
}
|
||||
|
||||
function isColumnName()
|
||||
{
|
||||
$type = $this->getType();
|
||||
$value = $this->getUnescapedValue();
|
||||
if($type == 'column_name')
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
if($type == 'number' && is_null($value))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if($type == 'number' && !is_numeric($value) && $this->uses_default_value)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function getErrorMessage()
|
||||
{
|
||||
return $this->errorMessage;
|
||||
}
|
||||
|
||||
function ensureDefaultValue($default_value)
|
||||
{
|
||||
if($this->value === NULL || $this->value === '')
|
||||
{
|
||||
$this->value = $default_value;
|
||||
$this->uses_default_value = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* check filter by filter type
|
||||
* @param string $filter_type
|
||||
* @return void
|
||||
*/
|
||||
function checkFilter($filter_type)
|
||||
{
|
||||
if(isset($this->value) && $this->value != '')
|
||||
{
|
||||
global $lang;
|
||||
$val = $this->value;
|
||||
$key = $this->name;
|
||||
switch($filter_type)
|
||||
{
|
||||
case 'email' :
|
||||
case 'email_address' :
|
||||
if(!preg_match('/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_email, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
case 'homepage' :
|
||||
if(!preg_match('/^(http|https)+(:\/\/)+[0-9a-z_-]+\.[^ ]+$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_homepage, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
case 'userid' :
|
||||
case 'user_id' :
|
||||
if(!preg_match('/^[a-zA-Z]+([_0-9a-zA-Z]+)*$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_userid, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
case 'number' :
|
||||
case 'numbers' :
|
||||
if(is_array($val))
|
||||
{
|
||||
$val = join(',', $val);
|
||||
}
|
||||
if(!preg_match('/^(-?)[0-9]+(,\-?[0-9]+)*$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_number, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
case 'alpha' :
|
||||
if(!preg_match('/^[a-z]+$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_alpha, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
case 'alpha_number' :
|
||||
if(!preg_match('/^[0-9a-z]+$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_alpha_number, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkMaxLength($length)
|
||||
{
|
||||
if($this->value && (strlen($this->value) > $length))
|
||||
{
|
||||
global $lang;
|
||||
$this->isValid = FALSE;
|
||||
$key = $this->name;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->outofrange, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
}
|
||||
|
||||
function checkMinLength($length)
|
||||
{
|
||||
if($this->value && (strlen($this->value) < $length))
|
||||
{
|
||||
global $lang;
|
||||
$this->isValid = FALSE;
|
||||
$key = $this->name;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->outofrange, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
}
|
||||
|
||||
function checkNotNull()
|
||||
{
|
||||
if(!isset($this->value))
|
||||
{
|
||||
global $lang;
|
||||
$this->isValid = FALSE;
|
||||
$key = $this->name;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->isnull, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file Argument.class.php */
|
||||
/* Location: ./classes/xml/xmlquery/argument/Argument.class.php */
|
||||
<?php
|
||||
/* Copyright (C) NAVER <http://www.navercorp.com> */
|
||||
|
||||
/**
|
||||
* Argument class
|
||||
* @author NAVER (developers@xpressengine.com)
|
||||
* @package /classes/xml/xmlquery/argument
|
||||
* @version 0.1
|
||||
*/
|
||||
class Argument
|
||||
{
|
||||
|
||||
/**
|
||||
* argument value
|
||||
* @var mixed
|
||||
*/
|
||||
var $value;
|
||||
|
||||
/**
|
||||
* argument name
|
||||
* @var string
|
||||
*/
|
||||
var $name;
|
||||
|
||||
/**
|
||||
* argument type
|
||||
* @var string
|
||||
*/
|
||||
var $type;
|
||||
|
||||
/**
|
||||
* result of argument type check
|
||||
* @var bool
|
||||
*/
|
||||
var $isValid;
|
||||
|
||||
/**
|
||||
* error message
|
||||
* @var Object
|
||||
*/
|
||||
var $errorMessage;
|
||||
|
||||
/**
|
||||
* column operation
|
||||
*/
|
||||
var $column_operation;
|
||||
|
||||
/**
|
||||
* Check if arg value is user submnitted or default
|
||||
* @var mixed
|
||||
*/
|
||||
var $uses_default_value;
|
||||
|
||||
/**
|
||||
* Caches escaped and toString value so that the parsing won't happen multiple times
|
||||
* @var mixed
|
||||
*/
|
||||
var $_value; //
|
||||
|
||||
/**
|
||||
* constructor
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function Argument($name, $value)
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->name = $name;
|
||||
$this->isValid = TRUE;
|
||||
}
|
||||
|
||||
function getType()
|
||||
{
|
||||
if(isset($this->type))
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
if(is_string($this->value))
|
||||
{
|
||||
return 'column_name';
|
||||
}
|
||||
|
||||
return 'number';
|
||||
}
|
||||
|
||||
function setColumnType($value)
|
||||
{
|
||||
$this->type = $value;
|
||||
}
|
||||
|
||||
function setColumnOperation($operation)
|
||||
{
|
||||
$this->column_operation = $operation;
|
||||
}
|
||||
|
||||
function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
function getValue()
|
||||
{
|
||||
if(!isset($this->_value))
|
||||
{
|
||||
$value = $this->getEscapedValue();
|
||||
$this->_value = $this->toString($value);
|
||||
}
|
||||
return $this->_value;
|
||||
}
|
||||
|
||||
function getPureValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
function getColumnOperation()
|
||||
{
|
||||
return $this->column_operation;
|
||||
}
|
||||
|
||||
function getEscapedValue()
|
||||
{
|
||||
return $this->escapeValue($this->value);
|
||||
}
|
||||
|
||||
function getUnescapedValue()
|
||||
{
|
||||
if($this->value === 'null')
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* mixed value to string
|
||||
* @param mixed $value
|
||||
* @return string
|
||||
*/
|
||||
function toString($value)
|
||||
{
|
||||
if(is_array($value))
|
||||
{
|
||||
if(count($value) === 0)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
if(count($value) === 1 && $value[0] === '')
|
||||
{
|
||||
return '';
|
||||
}
|
||||
return '(' . implode(',', $value) . ')';
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* escape value
|
||||
* @param mixed $value
|
||||
* @return mixed
|
||||
*/
|
||||
function escapeValue($value)
|
||||
{
|
||||
$column_type = $this->getType();
|
||||
if($column_type == 'column_name')
|
||||
{
|
||||
$dbParser = DB::getParser();
|
||||
return $dbParser->parseExpression($value);
|
||||
}
|
||||
if(!isset($value))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$columnTypeList = array('date' => 1, 'varchar' => 1, 'char' => 1, 'text' => 1, 'bigtext' => 1);
|
||||
if(isset($columnTypeList[$column_type]))
|
||||
{
|
||||
if(!is_array($value))
|
||||
{
|
||||
$value = $this->_escapeStringValue($value);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($value as $key=>$val)
|
||||
{
|
||||
$value[$key] = $this->_escapeStringValue($val);
|
||||
}
|
||||
}
|
||||
}
|
||||
if($this->uses_default_value)
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
if($column_type == 'number')
|
||||
{
|
||||
if(is_array($value))
|
||||
{
|
||||
foreach($value AS $key => $val)
|
||||
{
|
||||
if(isset($val) && $val !== '')
|
||||
{
|
||||
$value[$key] = (int) $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$value = (int) $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* escape string value
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
function _escapeStringValue($value)
|
||||
{
|
||||
// Remove non-utf8 chars.
|
||||
$regex = '@((?:[\x00-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}){1,100})|([\xF0-\xF7][\x80-\xBF]{3})|([\x80-\xBF])|([\xC0-\xFF])@x';
|
||||
|
||||
$value = preg_replace_callback($regex, array($this, 'utf8Replacer'), $value);
|
||||
$db = DB::getInstance();
|
||||
$value = $db->addQuotes($value);
|
||||
return '\'' . $value . '\'';
|
||||
}
|
||||
|
||||
function utf8Replacer($captures)
|
||||
{
|
||||
if(strlen($captures[1]))
|
||||
{
|
||||
// Valid byte sequence. Return unmodified.
|
||||
return $captures[1];
|
||||
}
|
||||
else if(strlen($captures[2]))
|
||||
{
|
||||
// Remove user defined area
|
||||
if("\xF3\xB0\x80\x80" <= $captures[2])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
return $captures[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function isValid()
|
||||
{
|
||||
return $this->isValid;
|
||||
}
|
||||
|
||||
function isColumnName()
|
||||
{
|
||||
$type = $this->getType();
|
||||
$value = $this->getUnescapedValue();
|
||||
if($type == 'column_name')
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
if($type == 'number' && is_null($value))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if($type == 'number' && !is_numeric($value) && $this->uses_default_value)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function getErrorMessage()
|
||||
{
|
||||
return $this->errorMessage;
|
||||
}
|
||||
|
||||
function ensureDefaultValue($default_value)
|
||||
{
|
||||
if($this->value === NULL || $this->value === '')
|
||||
{
|
||||
$this->value = $default_value;
|
||||
$this->uses_default_value = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* check filter by filter type
|
||||
* @param string $filter_type
|
||||
* @return void
|
||||
*/
|
||||
function checkFilter($filter_type)
|
||||
{
|
||||
if(isset($this->value) && $this->value != '')
|
||||
{
|
||||
global $lang;
|
||||
$val = $this->value;
|
||||
$key = $this->name;
|
||||
switch($filter_type)
|
||||
{
|
||||
case 'email' :
|
||||
case 'email_address' :
|
||||
if(!preg_match('/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_email, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
case 'homepage' :
|
||||
if(!preg_match('/^(http|https)+(:\/\/)+[0-9a-z_-]+\.[^ ]+$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_homepage, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
case 'userid' :
|
||||
case 'user_id' :
|
||||
if(!preg_match('/^[a-zA-Z]+([_0-9a-zA-Z]+)*$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_userid, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
case 'number' :
|
||||
case 'numbers' :
|
||||
if(is_array($val))
|
||||
{
|
||||
$val = join(',', $val);
|
||||
}
|
||||
if(!preg_match('/^(-?)[0-9]+(,\-?[0-9]+)*$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_number, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
case 'alpha' :
|
||||
if(!preg_match('/^[a-z]+$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_alpha, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
case 'alpha_number' :
|
||||
if(!preg_match('/^[0-9a-z]+$/is', $val))
|
||||
{
|
||||
$this->isValid = FALSE;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_alpha_number, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkMaxLength($length)
|
||||
{
|
||||
if($this->value && (strlen($this->value) > $length))
|
||||
{
|
||||
global $lang;
|
||||
$this->isValid = FALSE;
|
||||
$key = $this->name;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->outofrange, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
}
|
||||
|
||||
function checkMinLength($length)
|
||||
{
|
||||
if($this->value && (strlen($this->value) < $length))
|
||||
{
|
||||
global $lang;
|
||||
$this->isValid = FALSE;
|
||||
$key = $this->name;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->outofrange, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
}
|
||||
|
||||
function checkNotNull()
|
||||
{
|
||||
if(!isset($this->value))
|
||||
{
|
||||
global $lang;
|
||||
$this->isValid = FALSE;
|
||||
$key = $this->name;
|
||||
$this->errorMessage = new Object(-1, sprintf($lang->filter->isnull, $lang->{$key} ? $lang->{$key} : $key));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file Argument.class.php */
|
||||
/* Location: ./classes/xml/xmlquery/argument/Argument.class.php */
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ button.btn {
|
|||
-moz-border-radius-topleft: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
}
|
||||
.btn-group>.btn: last-child {
|
||||
.btn-group>.btn:last-child {
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
-moz-border-radius-topright: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
|
|
|
|||
|
|
@ -596,14 +596,25 @@ function doDocumentLoad(obj) {
|
|||
}
|
||||
|
||||
/* 저장된 게시글의 선택 */
|
||||
function doDocumentSelect(document_srl) {
|
||||
function doDocumentSelect(document_srl, module) {
|
||||
if(!opener || !opener.objForSavedDoc) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if(module===undefined) {
|
||||
module = 'document';
|
||||
}
|
||||
|
||||
// 게시글을 가져와서 등록하기
|
||||
opener.location.href = opener.current_url.setQuery('document_srl', document_srl).setQuery('act', 'dispBoardWrite');
|
||||
switch(module) {
|
||||
case 'page' :
|
||||
opener.location.href = opener.current_url.setQuery('document_srl', document_srl).setQuery('act', 'dispPageAdminContentModify');
|
||||
break;
|
||||
default :
|
||||
opener.location.href = opener.current_url.setQuery('document_srl', document_srl).setQuery('act', 'dispBoardWrite');
|
||||
break;
|
||||
}
|
||||
window.close();
|
||||
}
|
||||
|
||||
|
|
@ -900,7 +911,7 @@ function get_by_id(id) {
|
|||
|
||||
jQuery(function($){
|
||||
// display popup menu that contains member actions and document actions
|
||||
$(document).click(function(evt) {
|
||||
$(document).on('click touchstart', function(evt) {
|
||||
var $area = $('#popup_menu_area');
|
||||
if(!$area.length) $area = $('<div id="popup_menu_area" tabindex="0" style="display:none;z-index:9999" />').appendTo(document.body);
|
||||
|
||||
|
|
@ -916,6 +927,18 @@ jQuery(function($){
|
|||
if(cls) match = cls.match(new RegExp('(?:^| )((document|comment|member)_([1-9]\\d*))(?: |$)',''));
|
||||
if(!match) return;
|
||||
|
||||
// mobile에서 touchstart에 의한 동작 시 pageX, pageY 위치를 구함
|
||||
if(evt.pageX===undefined || evt.pageY===undefined)
|
||||
{
|
||||
var touch = evt.originalEvent.touches[0];
|
||||
if(touch!==undefined || !touch)
|
||||
{
|
||||
touch = evt.originalEvent.changedTouches[0];
|
||||
}
|
||||
evt.pageX = touch.pageX;
|
||||
evt.pageY = touch.pageY;
|
||||
}
|
||||
|
||||
var action = 'get'+ucfirst(match[2])+'Menu';
|
||||
var params = {
|
||||
mid : current_mid,
|
||||
|
|
|
|||
145
common/js/xe.js
145
common/js/xe.js
|
|
@ -595,14 +595,25 @@ function doDocumentLoad(obj) {
|
|||
}
|
||||
|
||||
/* 저장된 게시글의 선택 */
|
||||
function doDocumentSelect(document_srl) {
|
||||
function doDocumentSelect(document_srl, module) {
|
||||
if(!opener || !opener.objForSavedDoc) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if(module===undefined) {
|
||||
module = 'document';
|
||||
}
|
||||
|
||||
// 게시글을 가져와서 등록하기
|
||||
opener.location.href = opener.current_url.setQuery('document_srl', document_srl).setQuery('act', 'dispBoardWrite');
|
||||
switch(module) {
|
||||
case 'page' :
|
||||
opener.location.href = opener.current_url.setQuery('document_srl', document_srl).setQuery('act', 'dispPageAdminContentModify');
|
||||
break;
|
||||
default :
|
||||
opener.location.href = opener.current_url.setQuery('document_srl', document_srl).setQuery('act', 'dispBoardWrite');
|
||||
break;
|
||||
}
|
||||
window.close();
|
||||
}
|
||||
|
||||
|
|
@ -899,7 +910,7 @@ function get_by_id(id) {
|
|||
|
||||
jQuery(function($){
|
||||
// display popup menu that contains member actions and document actions
|
||||
$(document).click(function(evt) {
|
||||
$(document).on('click touchstart', function(evt) {
|
||||
var $area = $('#popup_menu_area');
|
||||
if(!$area.length) $area = $('<div id="popup_menu_area" tabindex="0" style="display:none;z-index:9999" />').appendTo(document.body);
|
||||
|
||||
|
|
@ -915,6 +926,18 @@ jQuery(function($){
|
|||
if(cls) match = cls.match(new RegExp('(?:^| )((document|comment|member)_([1-9]\\d*))(?: |$)',''));
|
||||
if(!match) return;
|
||||
|
||||
// mobile에서 touchstart에 의한 동작 시 pageX, pageY 위치를 구함
|
||||
if(evt.pageX===undefined || evt.pageY===undefined)
|
||||
{
|
||||
var touch = evt.originalEvent.touches[0];
|
||||
if(touch!==undefined || !touch)
|
||||
{
|
||||
touch = evt.originalEvent.changedTouches[0];
|
||||
}
|
||||
evt.pageX = touch.pageX;
|
||||
evt.pageY = touch.pageY;
|
||||
}
|
||||
|
||||
var action = 'get'+ucfirst(match[2])+'Menu';
|
||||
var params = {
|
||||
mid : current_mid,
|
||||
|
|
@ -1639,31 +1662,55 @@ function xml2json(xml, tab, ignoreAttrib) {
|
|||
|
||||
if(typeof(xeVid)!='undefined') $.extend(data,{vid:xeVid});
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: request_uri,
|
||||
contentType: "application/json",
|
||||
data: $.param(data),
|
||||
success: function(data) {
|
||||
$(".wfsr").hide().trigger('cancel_confirm');
|
||||
if(data.error != '0' && data.error > -1000) {
|
||||
if(data.error == -1 && data.message == 'msg_is_not_administrator') {
|
||||
alert('You are not logged in as an administrator');
|
||||
if($.isFunction(callback_error)) callback_error(data);
|
||||
try {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: request_uri,
|
||||
contentType: "application/json",
|
||||
data: $.param(data),
|
||||
success: function(data) {
|
||||
$(".wfsr").hide().trigger('cancel_confirm');
|
||||
if(data.error != '0' && data.error > -1000) {
|
||||
if(data.error == -1 && data.message == 'msg_is_not_administrator') {
|
||||
alert('You are not logged in as an administrator');
|
||||
if($.isFunction(callback_error)) callback_error(data);
|
||||
|
||||
return;
|
||||
} else {
|
||||
alert(data.message);
|
||||
if($.isFunction(callback_error)) callback_error(data);
|
||||
return;
|
||||
} else {
|
||||
alert(data.message);
|
||||
if($.isFunction(callback_error)) callback_error(data);
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($.isFunction(callback_sucess)) callback_sucess(data);
|
||||
}
|
||||
});
|
||||
if($.isFunction(callback_sucess)) callback_sucess(data);
|
||||
},
|
||||
error: function(xhr, textStatus) {
|
||||
$(".wfsr").hide();
|
||||
|
||||
var msg = '';
|
||||
|
||||
if (textStatus == 'parsererror') {
|
||||
msg = 'The result is not valid JSON :\n-------------------------------------\n';
|
||||
|
||||
if(xhr.responseText === "") return;
|
||||
|
||||
msg += xhr.responseText.replace(/<[^>]+>/g, '');
|
||||
} else {
|
||||
msg = textStatus;
|
||||
}
|
||||
|
||||
try{
|
||||
console.log(msg);
|
||||
} catch(ee){}
|
||||
}
|
||||
});
|
||||
} catch(e) {
|
||||
alert(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1683,17 +1730,43 @@ function xml2json(xml, tab, ignoreAttrib) {
|
|||
if(show_waiting_message) $(".wfsr").html(waiting_message).show();
|
||||
|
||||
$.extend(data,{module:action[0],act:action[1]});
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
dataType:"html",
|
||||
url:request_uri,
|
||||
data:$.param(data),
|
||||
success : function(html){
|
||||
$(".wfsr").hide().trigger('cancel_confirm');
|
||||
self[type](html);
|
||||
if($.isFunction(func)) func(args);
|
||||
}
|
||||
});
|
||||
try {
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
dataType:"html",
|
||||
url:request_uri,
|
||||
data:$.param(data),
|
||||
success : function(html){
|
||||
$(".wfsr").hide().trigger('cancel_confirm');
|
||||
self[type](html);
|
||||
if($.isFunction(func)) func(args);
|
||||
},
|
||||
error: function(xhr, textStatus) {
|
||||
$(".wfsr").hide();
|
||||
|
||||
var msg = '';
|
||||
|
||||
if (textStatus == 'parsererror') {
|
||||
msg = 'The result is not valid page :\n-------------------------------------\n';
|
||||
|
||||
if(xhr.responseText === "") return;
|
||||
|
||||
msg += xhr.responseText.replace(/<[^>]+>/g, '');
|
||||
} else {
|
||||
msg = textStatus;
|
||||
}
|
||||
|
||||
try{
|
||||
console.log(msg);
|
||||
} catch(ee){}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} catch(e) {
|
||||
alert(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1702,7 +1775,7 @@ function xml2json(xml, tab, ignoreAttrib) {
|
|||
}
|
||||
|
||||
$(function($){
|
||||
$('.wfsr')
|
||||
$(document)
|
||||
.ajaxStart(function(){
|
||||
$(window).bind('beforeunload', beforeUnloadHandler);
|
||||
})
|
||||
|
|
|
|||
3
common/js/xe.min.js
vendored
3
common/js/xe.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -414,31 +414,55 @@ function xml2json(xml, tab, ignoreAttrib) {
|
|||
|
||||
if(typeof(xeVid)!='undefined') $.extend(data,{vid:xeVid});
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: request_uri,
|
||||
contentType: "application/json",
|
||||
data: $.param(data),
|
||||
success: function(data) {
|
||||
$(".wfsr").hide().trigger('cancel_confirm');
|
||||
if(data.error != '0' && data.error > -1000) {
|
||||
if(data.error == -1 && data.message == 'msg_is_not_administrator') {
|
||||
alert('You are not logged in as an administrator');
|
||||
if($.isFunction(callback_error)) callback_error(data);
|
||||
try {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: request_uri,
|
||||
contentType: "application/json",
|
||||
data: $.param(data),
|
||||
success: function(data) {
|
||||
$(".wfsr").hide().trigger('cancel_confirm');
|
||||
if(data.error != '0' && data.error > -1000) {
|
||||
if(data.error == -1 && data.message == 'msg_is_not_administrator') {
|
||||
alert('You are not logged in as an administrator');
|
||||
if($.isFunction(callback_error)) callback_error(data);
|
||||
|
||||
return;
|
||||
} else {
|
||||
alert(data.message);
|
||||
if($.isFunction(callback_error)) callback_error(data);
|
||||
return;
|
||||
} else {
|
||||
alert(data.message);
|
||||
if($.isFunction(callback_error)) callback_error(data);
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($.isFunction(callback_sucess)) callback_sucess(data);
|
||||
}
|
||||
});
|
||||
if($.isFunction(callback_sucess)) callback_sucess(data);
|
||||
},
|
||||
error: function(xhr, textStatus) {
|
||||
$(".wfsr").hide();
|
||||
|
||||
var msg = '';
|
||||
|
||||
if (textStatus == 'parsererror') {
|
||||
msg = 'The result is not valid JSON :\n-------------------------------------\n';
|
||||
|
||||
if(xhr.responseText === "") return;
|
||||
|
||||
msg += xhr.responseText.replace(/<[^>]+>/g, '');
|
||||
} else {
|
||||
msg = textStatus;
|
||||
}
|
||||
|
||||
try{
|
||||
console.log(msg);
|
||||
} catch(ee){}
|
||||
}
|
||||
});
|
||||
} catch(e) {
|
||||
alert(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -458,17 +482,43 @@ function xml2json(xml, tab, ignoreAttrib) {
|
|||
if(show_waiting_message) $(".wfsr").html(waiting_message).show();
|
||||
|
||||
$.extend(data,{module:action[0],act:action[1]});
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
dataType:"html",
|
||||
url:request_uri,
|
||||
data:$.param(data),
|
||||
success : function(html){
|
||||
$(".wfsr").hide().trigger('cancel_confirm');
|
||||
self[type](html);
|
||||
if($.isFunction(func)) func(args);
|
||||
}
|
||||
});
|
||||
try {
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
dataType:"html",
|
||||
url:request_uri,
|
||||
data:$.param(data),
|
||||
success : function(html){
|
||||
$(".wfsr").hide().trigger('cancel_confirm');
|
||||
self[type](html);
|
||||
if($.isFunction(func)) func(args);
|
||||
},
|
||||
error: function(xhr, textStatus) {
|
||||
$(".wfsr").hide();
|
||||
|
||||
var msg = '';
|
||||
|
||||
if (textStatus == 'parsererror') {
|
||||
msg = 'The result is not valid page :\n-------------------------------------\n';
|
||||
|
||||
if(xhr.responseText === "") return;
|
||||
|
||||
msg += xhr.responseText.replace(/<[^>]+>/g, '');
|
||||
} else {
|
||||
msg = textStatus;
|
||||
}
|
||||
|
||||
try{
|
||||
console.log(msg);
|
||||
} catch(ee){}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} catch(e) {
|
||||
alert(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -477,7 +527,7 @@ function xml2json(xml, tab, ignoreAttrib) {
|
|||
}
|
||||
|
||||
$(function($){
|
||||
$('.wfsr')
|
||||
$(document)
|
||||
.ajaxStart(function(){
|
||||
$(window).bind('beforeunload', beforeUnloadHandler);
|
||||
})
|
||||
|
|
|
|||
|
|
@ -11,19 +11,18 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
|
||||
<!--// TITLE -->
|
||||
<title>{Context::getBrowserTitle()}</title>
|
||||
<!--// CSS-->
|
||||
<!--@foreach($css_files as $key => $css_file)-->
|
||||
<!--@if($css_file['targetie'])--><!--[if {$css_file['targetie']}]><!--@end-->
|
||||
<link rel="stylesheet" href="{$css_file['file']}" media="{$css_file['media']}"|cond="$css_file['media'] != 'all'" />
|
||||
<!--@if($css_file['targetie'])--><![endif]--><!--@end-->
|
||||
<!--@end-->
|
||||
|
||||
<!--// JS -->
|
||||
<!--@foreach($js_files as $key => $js_file)-->
|
||||
<!--@if($js_file['targetie'])--><!--[if {$js_file['targetie']}]><!--@end-->
|
||||
<script src="{$js_file['file']}"></script>
|
||||
<!--@if($js_file['targetie'])--><![endif]--><!--@end-->
|
||||
<!--@end-->
|
||||
<!-- CSS -->
|
||||
<block loop="$css_files=>$key,$css_file">
|
||||
<block cond="$css_file['targetie']"><!--[if {$css_file['targetie']}]></block>
|
||||
<link rel="stylesheet" href="{$css_file['file']}" media="{$css_file['media']}"|cond="$css_file['media'] != 'all'" />
|
||||
<block cond="$css_file['targetie']"><![endif]--></block>
|
||||
</block>
|
||||
<!-- JS -->
|
||||
<block loop="$js_files=>$key,$js_file">
|
||||
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]><block cond="stripos($js_file['targetie'], 'gt') === 0"><!--></block></block>
|
||||
<script src="{$js_file['file']}"></script>
|
||||
<block cond="$js_file['targetie']"><![endif]--></block>
|
||||
</block>
|
||||
<!--[if lt IE 9]><script src="../js/html5.js"></script><![endif]-->
|
||||
|
||||
<!--// RSS -->
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ define('__ZBXE__', __XE__);
|
|||
/**
|
||||
* Display XE's full version.
|
||||
*/
|
||||
define('__XE_VERSION__', '1.7.5.2');
|
||||
define('__XE_VERSION__', '1.7.5.7');
|
||||
define('__XE_VERSION_ALPHA__', (stripos(__XE_VERSION__, 'alpha') !== false));
|
||||
define('__XE_VERSION_BETA__', (stripos(__XE_VERSION__, 'beta') !== false));
|
||||
define('__XE_VERSION_RC__', (stripos(__XE_VERSION__, 'rc') !== false));
|
||||
|
|
@ -173,6 +173,20 @@ if(!defined('__LOG_SLOW_QUERY__'))
|
|||
define('__LOG_SLOW_QUERY__', 0);
|
||||
}
|
||||
|
||||
if(!defined('__LOG_SLOW_TRIGGER__'))
|
||||
{
|
||||
/**
|
||||
* Trigger excute time log
|
||||
*
|
||||
* <pre>
|
||||
* 0: Do not leave a log
|
||||
* > 0: leave a log when the trigger takes over specified milliseconds
|
||||
* Log file is saved as ./files/_db_slow_trigger.php file
|
||||
* </pre>
|
||||
*/
|
||||
define('__LOG_SLOW_TRIGGER__', 0);
|
||||
}
|
||||
|
||||
if(!defined('__DEBUG_QUERY__'))
|
||||
{
|
||||
/**
|
||||
|
|
@ -254,6 +268,7 @@ if(!defined('__XE_LOADED_CLASS__'))
|
|||
require(_XE_PATH_ . 'classes/xml/XmlJsFilter.class.php');
|
||||
require(_XE_PATH_ . 'classes/xml/XmlLangParser.class.php');
|
||||
require(_XE_PATH_ . 'classes/cache/CacheHandler.class.php');
|
||||
require(_XE_PATH_ . 'classes/router/Router.class.php');
|
||||
require(_XE_PATH_ . 'classes/context/Context.class.php');
|
||||
require(_XE_PATH_ . 'classes/db/DB.class.php');
|
||||
require(_XE_PATH_ . 'classes/file/FileHandler.class.php');
|
||||
|
|
|
|||
|
|
@ -714,43 +714,9 @@ function zdate($str, $format = 'Y-m-d H:i:s', $conversion = TRUE)
|
|||
}
|
||||
}
|
||||
|
||||
// If year value is less than 1970, handle it separately.
|
||||
if((int) substr($str, 0, 4) < 1970)
|
||||
{
|
||||
$hour = (int) substr($str, 8, 2);
|
||||
$min = (int) substr($str, 10, 2);
|
||||
$sec = (int) substr($str, 12, 2);
|
||||
$year = (int) substr($str, 0, 4);
|
||||
$month = (int) substr($str, 4, 2);
|
||||
$day = (int) substr($str, 6, 2);
|
||||
$date = new DateTime($str);
|
||||
$string = $date->format($format);
|
||||
|
||||
// leading zero?
|
||||
$lz = create_function('$n', 'return ($n>9?"":"0").$n;');
|
||||
|
||||
$trans = array(
|
||||
'Y' => $year,
|
||||
'y' => $lz($year % 100),
|
||||
'm' => $lz($month),
|
||||
'n' => $month,
|
||||
'd' => $lz($day),
|
||||
'j' => $day,
|
||||
'G' => $hour,
|
||||
'H' => $lz($hour),
|
||||
'g' => $hour % 12,
|
||||
'h' => $lz($hour % 12),
|
||||
'i' => $lz($min),
|
||||
's' => $lz($sec),
|
||||
'M' => getMonthName($month),
|
||||
'F' => getMonthName($month, FALSE)
|
||||
);
|
||||
|
||||
$string = strtr($format, $trans);
|
||||
}
|
||||
else
|
||||
{
|
||||
// if year value is greater than 1970, get unixtime by using ztime() for date() function's argument.
|
||||
$string = date($format, ztime($str));
|
||||
}
|
||||
// change day and am/pm for each language
|
||||
$unit_week = Context::getLang('unit_week');
|
||||
$unit_meridiem = Context::getLang('unit_meridiem');
|
||||
|
|
|
|||
|
|
@ -120,6 +120,11 @@ class adminAdminController extends admin
|
|||
$db = DB::getInstance();
|
||||
$db->deleteDuplicateIndexes();
|
||||
}
|
||||
|
||||
// check autoinstall packages
|
||||
$oAutoinstallAdminController = getAdminController('autoinstall');
|
||||
$oAutoinstallAdminController->checkInstalled();
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
|
|
@ -467,11 +472,19 @@ class adminAdminController extends admin
|
|||
*/
|
||||
function procAdminRemoveIcons()
|
||||
{
|
||||
|
||||
$site_info = Context::get('site_module_info');
|
||||
$virtual_site = '';
|
||||
if($site_info->site_srl)
|
||||
{
|
||||
$virtual_site = $site_info->site_srl . '/';
|
||||
}
|
||||
|
||||
$iconname = Context::get('iconname');
|
||||
$file_exist = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $iconname);
|
||||
$file_exist = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $virtual_site . $iconname);
|
||||
if($file_exist)
|
||||
{
|
||||
@FileHandler::removeFile(_XE_PATH_ . 'files/attach/xeicon/' . $iconname);
|
||||
@FileHandler::removeFile(_XE_PATH_ . 'files/attach/xeicon/' . $virtual_site . $iconname);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -947,14 +947,22 @@ class adminAdminModel extends admin
|
|||
|
||||
function iconUrlCheck($iconname, $default_icon_name)
|
||||
{
|
||||
$file_exsit = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $iconname);
|
||||
|
||||
$site_info = Context::get('site_module_info');
|
||||
$virtual_site = '';
|
||||
if($site_info->site_srl)
|
||||
{
|
||||
$virtual_site = $site_info->site_srl . '/';
|
||||
}
|
||||
|
||||
$file_exsit = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $virtual_site . $iconname);
|
||||
if(!$file_exsit)
|
||||
{
|
||||
$icon_url = './modules/admin/tpl/img/' . $default_icon_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$icon_url = $db_info->default_url . 'files/attach/xeicon/' . $iconname;
|
||||
$icon_url = $db_info->default_url . 'files/attach/xeicon/' . $virtual_site . $iconname;
|
||||
}
|
||||
return $icon_url;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -619,6 +619,7 @@ class adminAdminView extends admin
|
|||
$info['PHP_Core'] = $php_core;
|
||||
|
||||
$str_info = "[XE Server Environment " . date("Y-m-d") . "]\n\n";
|
||||
$str_info .= "realpath : ".realpath('./')."\n";
|
||||
foreach( $info as $key=>$value )
|
||||
{
|
||||
if( is_array( $value ) == false ) {
|
||||
|
|
|
|||
|
|
@ -1597,8 +1597,8 @@
|
|||
<value xml:lang="jp"><![CDATA[HTMLタグを使用できます。]]></value>
|
||||
</item>
|
||||
<item name="sitelock_warning_whitelist">
|
||||
<value xml:lang="ko"><![CDATA[이곳에 관리자의 IP를 반드시 포함해야 합니다.<br />만약 접근이 차단된 경우 './files/config/db.config.php' 파일에서 `'use_sitelock' => '<strong>Y</strong>'`를 `'use_sitelock' => '<strong>N</strong>'`으로 변경하여 차단을 해제할 수 있습니다.<br />사이트 잠금 디자인 파일의 위치는 './common/tpl/sitelock.html' 입니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You should include the IP of the administrator here.<br />If the access is blocked, you can unbrick this by changing `'use_sitelock' => '<strong>Y</strong>'` to `'use_sitelock' => '<strong>N</strong>'` in './files/config/db.config.php.'<br />The file of site lock design is at './common/tpl/sitelock.html.']]></value>
|
||||
<value xml:lang="ko"><![CDATA[이곳에 관리자의 IP를 반드시 포함해야 합니다.<br />만약 접근이 차단된 경우 './files/config/db.config.php' 파일에서 `'use_sitelock' => '<strong>Y</strong>'`를 `'use_sitelock' => '<strong>N</strong>'`으로 변경하여 차단을 해제할 수 있습니다.<br />사이트 잠금 디자인 파일의 위치는 './common/tpl/sitelock.html'이며<br />'./common/tpl/sitelock.user.html' 파일을 만들어서 디자인 파일을 편집하실 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You should include the IP of the administrator here.<br />If the access is blocked, you can unbrick this by changing `'use_sitelock' => '<strong>Y</strong>'` to `'use_sitelock' => '<strong>N</strong>'` in './files/config/db.config.php.'<br />The file of site lock design is at './common/tpl/sitelock.html'.<br />You can modify design file by creating './common/tpl/sitelock.user.html'.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ここに管理者のIPを必ず記入てください。<br />もし接近が遮断された場合、'./files/config/db.config.php' ファイルから `'use_sitelock' => '<strong>Y</strong>'`を `'use_sitelock' => '<strong>N</strong>'`へ変更すれば遮断が解除できます。<br />サイトロックの設計ファイルの場所は、'./commo/tpl/sitelock.html' です。]]></value>
|
||||
</item>
|
||||
<item name="your_ip">
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<!-- GNB -->
|
||||
<nav class="gnb <!--@if($_COOKIE['__xe_admin_gnb_status'] == 'open')-->open<!--@end-->" id="gnb">
|
||||
<a href="#gnbNav"><i class="x_icon-align-justify x_icon-white"></i><b></b> Menu Open/Close</a>
|
||||
<ul id="gnbNav" class="ex"|cond="$_COOKIE['__xe_admin_gnb_ex_status'] == 'open'">
|
||||
<ul id="gnbNav" class="ex">
|
||||
<script>
|
||||
var __xe_admin_gnb_txs = new Array();
|
||||
</script>
|
||||
|
|
@ -49,9 +49,6 @@
|
|||
</li>
|
||||
<li cond="!is_array($favorite_list) || count($favorite_list) < 1"><a href="{getUrl('', 'module', 'admin', 'act', 'dispModuleAdminContent')}">{$lang->no_data}</a></li>
|
||||
</ul>
|
||||
<div class="exMenu">
|
||||
<button type="button" title="{$lang->advanced_settings}"><i class="x_icon-chevron-down"></i><i class="x_icon-chevron-up"></i></button>
|
||||
</div>
|
||||
</li>
|
||||
<!--@end-->
|
||||
<li class="<!--@if($parentSrl==$key || $value['href']=='index.php?module=admin' && !$mid && !$act)-->active open<!--@elseif($_COOKIE['__xe_admin_gnb_tx_' . md5($value['href'])] == 'open')-->open<!--@end-->">
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@
|
|||
<input type="hidden" name="module" value="install">
|
||||
<input type="hidden" name="act" value="procInstallAdminConfigIconUpload">
|
||||
<p>
|
||||
<input type="file" name="favicon" id="favicon" title="Mobile Home Icon"/>
|
||||
<input class="x_btn" type="submit" value="{$lang->cmd_submit}" style="vertical-align:top">
|
||||
<input type="file" name="favicon" id="favicon" title="Favicon"/>
|
||||
<input class="x_btn" type="submit" value="{$lang->cmd_preview}" style="vertical-align:top">
|
||||
</p>
|
||||
</form>
|
||||
<span class="x_help-block">{$lang->about_use_favicon}</span>
|
||||
|
|
@ -118,7 +118,7 @@
|
|||
<input type="hidden" name="act" value="procInstallAdminConfigIconUpload">
|
||||
<p>
|
||||
<input type="file" name="mobicon" id="mobicon" title="Mobile Home Icon"/>
|
||||
<input class="x_btn" type="submit" value="{$lang->cmd_submit}" style="vertical-align:top">
|
||||
<input class="x_btn" type="submit" value="{$lang->cmd_preview}" style="vertical-align:top">
|
||||
</p>
|
||||
</form>
|
||||
<span class="x_help-block">{$lang->detail_use_mobile_icon}</span>
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@
|
|||
.undelegate(".jstree")
|
||||
.removeData("jstree-instance-id")
|
||||
.find("[class^='jstree']")
|
||||
.andSelf()
|
||||
.addBack()
|
||||
.attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); });
|
||||
$(document)
|
||||
.unbind(".jstree-" + n)
|
||||
|
|
@ -678,7 +678,7 @@
|
|||
}
|
||||
else {
|
||||
original_obj = obj;
|
||||
if(obj.is(".jstree-closed")) { obj = obj.find("li.jstree-closed").andSelf(); }
|
||||
if(obj.is(".jstree-closed")) { obj = obj.find("li.jstree-closed").addBack(); }
|
||||
else { obj = obj.find("li.jstree-closed"); }
|
||||
}
|
||||
var _this = this;
|
||||
|
|
@ -694,12 +694,12 @@
|
|||
var _this = this;
|
||||
obj = obj ? this._get_node(obj) : this.get_container();
|
||||
if(!obj || obj === -1) { obj = this.get_container_ul(); }
|
||||
obj.find("li.jstree-open").andSelf().each(function () { _this.close_node(this, !do_animation); });
|
||||
obj.find("li.jstree-open").addBack().each(function () { _this.close_node(this, !do_animation); });
|
||||
this.__callback({ "obj" : obj });
|
||||
},
|
||||
clean_node : function (obj) {
|
||||
obj = obj && obj != -1 ? $(obj) : this.get_container_ul();
|
||||
obj = obj.is("li") ? obj.find("li").andSelf() : obj.find("li");
|
||||
obj = obj.is("li") ? obj.find("li").addBack() : obj.find("li");
|
||||
obj.removeClass("jstree-last")
|
||||
.filter("li:last-child").addClass("jstree-last").end()
|
||||
.filter(":has(li)")
|
||||
|
|
@ -922,7 +922,7 @@
|
|||
if(!obj || !obj.o || obj.or[0] === obj.o[0]) { return false; }
|
||||
if(obj.op && obj.np && obj.op[0] === obj.np[0] && obj.cp - 1 === obj.o.index()) { return false; }
|
||||
obj.o.each(function () {
|
||||
if(r.parentsUntil(".jstree", "li").andSelf().index(this) !== -1) { ret = false; return false; }
|
||||
if(r.parentsUntil(".jstree", "li").addBack().index(this) !== -1) { ret = false; return false; }
|
||||
});
|
||||
return ret;
|
||||
},
|
||||
|
|
@ -941,7 +941,7 @@
|
|||
var o = false;
|
||||
if(is_copy) {
|
||||
o = obj.o.clone(true);
|
||||
o.find("*[id]").andSelf().each(function () {
|
||||
o.find("*[id]").addBack().each(function () {
|
||||
if(this.id) { this.id = "copy_" + this.id; }
|
||||
});
|
||||
}
|
||||
|
|
@ -1138,7 +1138,7 @@
|
|||
switch(!0) {
|
||||
case (is_range):
|
||||
this.data.ui.last_selected.addClass("jstree-last-selected");
|
||||
obj = obj[ obj.index() < this.data.ui.last_selected.index() ? "nextUntil" : "prevUntil" ](".jstree-last-selected").andSelf();
|
||||
obj = obj[ obj.index() < this.data.ui.last_selected.index() ? "nextUntil" : "prevUntil" ](".jstree-last-selected").addBack();
|
||||
if(s.select_limit == -1 || obj.length < s.select_limit) {
|
||||
this.data.ui.last_selected.removeClass("jstree-last-selected");
|
||||
this.data.ui.selected.each(function () {
|
||||
|
|
@ -1242,7 +1242,7 @@
|
|||
.bind("move_node.jstree", $.proxy(function (e, data) {
|
||||
if(this._get_settings().crrm.move.open_onmove) {
|
||||
var t = this;
|
||||
data.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function () {
|
||||
data.rslt.np.parentsUntil(".jstree").addBack().filter(".jstree-closed").each(function () {
|
||||
t.open_node(this, false, true);
|
||||
});
|
||||
}
|
||||
|
|
@ -2800,7 +2800,7 @@
|
|||
obj.each(function () {
|
||||
t = $(this);
|
||||
c = t.is("li") && (t.hasClass("jstree-checked") || (rc && t.children(":checked").length)) ? "jstree-checked" : "jstree-unchecked";
|
||||
t.find("li").andSelf().each(function () {
|
||||
t.find("li").addBack().each(function () {
|
||||
var $t = $(this), nm;
|
||||
$t.children("a" + (_this.data.languages ? "" : ":eq(0)") ).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'> </ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass( ts ? "jstree-unchecked" : c );
|
||||
if(rc) {
|
||||
|
|
@ -2844,13 +2844,13 @@
|
|||
}
|
||||
else {
|
||||
if(state) {
|
||||
coll = obj.find("li").andSelf();
|
||||
coll = obj.find("li").addBack();
|
||||
if(!coll.filter(".jstree-checked, .jstree-undetermined").length) { return false; }
|
||||
coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
|
||||
if(rc) { coll.children(":checkbox").removeAttr("checked"); }
|
||||
}
|
||||
else {
|
||||
coll = obj.find("li").andSelf();
|
||||
coll = obj.find("li").addBack();
|
||||
if(!coll.filter(".jstree-unchecked, .jstree-undetermined").length) { return false; }
|
||||
coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
|
||||
if(rc) { coll.children(":checkbox").attr("checked","checked"); }
|
||||
|
|
@ -2861,8 +2861,8 @@
|
|||
var $this = $(this);
|
||||
if(state) {
|
||||
if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length) {
|
||||
$this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").removeAttr("checked"); }
|
||||
$this.parentsUntil(".jstree", "li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { $this.parentsUntil(".jstree", "li").addBack().children(":checkbox").removeAttr("checked"); }
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
|
@ -2872,8 +2872,8 @@
|
|||
}
|
||||
else {
|
||||
if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length) {
|
||||
$this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").removeAttr("checked"); }
|
||||
$this.parentsUntil(".jstree", "li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { $this.parentsUntil(".jstree", "li").addBack().children(":checkbox").removeAttr("checked"); }
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
|
@ -2944,8 +2944,8 @@
|
|||
else if(a === 0 && b === 0) { this.change_state(obj, true); }
|
||||
else if(a === c) { this.change_state(obj, false); }
|
||||
else {
|
||||
obj.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { obj.parentsUntil(".jstree", "li").andSelf().children(":checkbox").removeAttr("checked"); }
|
||||
obj.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { obj.parentsUntil(".jstree", "li").addBack().children(":checkbox").removeAttr("checked"); }
|
||||
}
|
||||
},
|
||||
reselect : function () {
|
||||
|
|
@ -3415,7 +3415,7 @@
|
|||
this.get_container()
|
||||
.bind("search.jstree", function (e, data) {
|
||||
$(this).children("ul").find("li").hide().removeClass("jstree-last");
|
||||
data.rslt.nodes.parentsUntil(".jstree").andSelf().show()
|
||||
data.rslt.nodes.parentsUntil(".jstree").addBack().show()
|
||||
.filter("ul").each(function () { $(this).children("li:visible").eq(-1).addClass("jstree-last"); });
|
||||
})
|
||||
.bind("clear_search.jstree", function () {
|
||||
|
|
@ -4001,7 +4001,7 @@
|
|||
// this used to use html() and clean the whitespace, but this way any attached data was lost
|
||||
this.data.html_data.original_container_html = this.get_container().find(" > ul > li").clone(true);
|
||||
// remove white space from LI node - otherwise nodes appear a bit to the right
|
||||
this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function() { return this.nodeType == 3; }).remove();
|
||||
this.data.html_data.original_container_html.find("li").addBack().contents().filter(function() { return this.nodeType == 3; }).remove();
|
||||
},
|
||||
defaults : {
|
||||
data : false,
|
||||
|
|
@ -4427,7 +4427,7 @@
|
|||
obj = !obj || obj == -1 ? this.get_container().find("> ul > li") : this._get_node(obj);
|
||||
if(obj === false) { return; } // added for removing root nodes
|
||||
obj.each(function () {
|
||||
$(this).find("li").andSelf().each(function () {
|
||||
$(this).find("li").addBack().each(function () {
|
||||
var $t = $(this);
|
||||
if($t.children(".jstree-wholerow-span").length) { return true; }
|
||||
$t.prepend("<span class='jstree-wholerow-span' style='width:" + ($t.parentsUntil(".jstree","li").length * 18) + "px;'> </span>");
|
||||
|
|
@ -4542,4 +4542,4 @@
|
|||
})(jQuery);
|
||||
//*/
|
||||
|
||||
})();
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ jQuery(function($){
|
|||
});
|
||||
|
||||
$('a._child_delete').click(function() {
|
||||
var menu_item_srl = $(this).parents('li').find('._item_key').val();
|
||||
var menu_item_srl = $(this).closest('li').find('._item_key').val();
|
||||
listForm.find('input[name=menu_item_srl]').val(menu_item_srl);
|
||||
listForm.submit();
|
||||
});
|
||||
|
|
|
|||
2
modules/admin/tpl/js/menu_setup.min.js
vendored
2
modules/admin/tpl/js/menu_setup.min.js
vendored
|
|
@ -1 +1 @@
|
|||
jQuery(function(a){function b(b){var c;if(moduleList=b.menuList){var d=a("#menuNameList");for(var e in moduleList){var f=moduleList[e];c=a('<optgroup label="'+e+'" />').appendTo(d);for(var g in f)c.append('<option value="'+e+":"+g+'">'+f[g].title+"</option>")}}}var c,d,e=a("#editForm"),f=a("#listForm");a("a._add").click(function(){if(d=a(this).parent().prevAll("._item_key").val(),e.find("input[name=parent_srl]").val(d),!c){var f=[],g=["menuList"];exec_xml("menu","procMenuAdminAllActList",f,b,g)}}),a("a._parent_delete").click(function(){var b=a(this).parent().prevAll("._parent_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()}),a("a._child_delete").click(function(){var b=a(this).parents("li").find("._item_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()})}),jQuery(function(a){function b(a,b){for(var c=0,d=0;a&&a!=b;)c+=a.offsetTop,d+=a.offsetLeft,a=a.offsetParent;return{top:c,left:d}}a("form.adminMap").delegate("li:not(.placeholder)","dropped.st",function(){var b,c,d=a(this);b=d.find(">input._parent_key"),c=!!d.parent("ul").parent("li").length,b.val(c?d.parent("ul").parent("li").find(">input._item_key").val():"0")});var c=!1,d=a('<li class="placeholder">');a("form.adminMap>ul").delegate("li:not(.placeholder,.parent)",{"mousedown.st":function(e){var f,g,h,i,j,k,l,m,n,o;if(!a(e.target).is("a,input,label,textarea")&&1==e.which){for(c=!0,f=a(this),j=f.height(),i=f.width(),g=f.parentsUntil(".adminMap").filter("ul"),h=g.eq(-1),l={x:e.pageX,y:e.pageY},k=b(this,h.get(0)),$clone=f.clone(!0).attr("target",!0),n=g.length-1;n;n--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();return m=[],h.find("li").each(function(){if(f[0]===this||f.has(this).length)return!0;var c=b(this,h.get(0));m.push({top:c.top,bottom:c.top+32,$item:a(this)})}),$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:.6,width:i,height:j,left:k.left,top:k.top,zIndex:100}).appendTo(h.eq(0)),d.css({position:"absolute",opacity:.6,width:i,height:"10px",left:k.left,top:k.top,zIndex:99}).appendTo(h.eq(0)),f.css("opacity",.6),a(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f,g;for(o=null,b={x:l.x-a.pageX,y:l.y-a.pageY},c=k.top-b.y,e=0,f=m.length;f>e;e++)g=m[e],g.top>c||g.bottom<c||(o={element:g.$item},g.$item.hasClass("parent")?(o.state="prepend",d.css("top",g.bottom-5)):g.top>c-12?(o.state="before",d.css("top",g.top-5)):(o.state="after",d.css("top",g.bottom-5)));$clone.css({top:c})}).bind("mouseup.st",function(){var b,e;c=!1,a(document).unbind("mousemove.st mouseup.st"),f.css("opacity",""),$clone.remove(),d.remove(),e=a("<li />").height(f.height()),o&&(b=a(o.element),f.before(e),"prepend"==o.state?(b.find(">ul").length||b.find(">.side").after("<ul>"),b.find(">ul").prepend(f.hide())):b[o.state](f.hide()),f.slideDown(100,function(){f.removeClass("active")}),e.slideUp(100,function(){var a=e.parent();e.remove(),a.children("li").length||a.remove()}),f.trigger("dropped.st"))}),!1}},"mouseover.st":function(){return c||a(this).addClass("active"),!1},"mouseout.st":function(){return c||a(this).removeClass("active"),!1}}).find("li li").prepend('<button type="button" class="moveTo">Move to</button>').end().end(),a('<div id="dropzone-marker" />').css({display:"none",position:"absolute",backgroundColor:"#000",opacity:.7}).appendTo("body")});
|
||||
jQuery(function(a){function b(b){var c;if(moduleList=b.menuList){var d=a("#menuNameList");for(var e in moduleList){var f=moduleList[e];c=a('<optgroup label="'+e+'" />').appendTo(d);for(var g in f)c.append('<option value="'+e+":"+g+'">'+f[g].title+"</option>")}}}var c,d,e=a("#editForm"),f=a("#listForm");a("a._add").click(function(){if(d=a(this).parent().prevAll("._item_key").val(),e.find("input[name=parent_srl]").val(d),!c){var f=[],g=["menuList"];exec_xml("menu","procMenuAdminAllActList",f,b,g)}}),a("a._parent_delete").click(function(){var b=a(this).parent().prevAll("._parent_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()}),a("a._child_delete").click(function(){var b=a(this).closest("li").find("._item_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()})}),jQuery(function(a){function b(a,b){for(var c=0,d=0;a&&a!=b;)c+=a.offsetTop,d+=a.offsetLeft,a=a.offsetParent;return{top:c,left:d}}a("form.adminMap").delegate("li:not(.placeholder)","dropped.st",function(){var b,c,d=a(this);b=d.find(">input._parent_key"),c=!!d.parent("ul").parent("li").length,b.val(c?d.parent("ul").parent("li").find(">input._item_key").val():"0")});var c=!1,d=a('<li class="placeholder">');a("form.adminMap>ul").delegate("li:not(.placeholder,.parent)",{"mousedown.st":function(e){var f,g,h,i,j,k,l,m,n,o;if(!a(e.target).is("a,input,label,textarea")&&1==e.which){for(c=!0,f=a(this),j=f.height(),i=f.width(),g=f.parentsUntil(".adminMap").filter("ul"),h=g.eq(-1),l={x:e.pageX,y:e.pageY},k=b(this,h.get(0)),$clone=f.clone(!0).attr("target",!0),n=g.length-1;n;n--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();return m=[],h.find("li").each(function(){if(f[0]===this||f.has(this).length)return!0;var c=b(this,h.get(0));m.push({top:c.top,bottom:c.top+32,$item:a(this)})}),$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:.6,width:i,height:j,left:k.left,top:k.top,zIndex:100}).appendTo(h.eq(0)),d.css({position:"absolute",opacity:.6,width:i,height:"10px",left:k.left,top:k.top,zIndex:99}).appendTo(h.eq(0)),f.css("opacity",.6),a(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f,g;for(o=null,b={x:l.x-a.pageX,y:l.y-a.pageY},c=k.top-b.y,e=0,f=m.length;f>e;e++)g=m[e],g.top>c||g.bottom<c||(o={element:g.$item},g.$item.hasClass("parent")?(o.state="prepend",d.css("top",g.bottom-5)):g.top>c-12?(o.state="before",d.css("top",g.top-5)):(o.state="after",d.css("top",g.bottom-5)));$clone.css({top:c})}).bind("mouseup.st",function(){var b,e;c=!1,a(document).unbind("mousemove.st mouseup.st"),f.css("opacity",""),$clone.remove(),d.remove(),e=a("<li />").height(f.height()),o&&(b=a(o.element),f.before(e),"prepend"==o.state?(b.find(">ul").length||b.find(">.side").after("<ul>"),b.find(">ul").prepend(f.hide())):b[o.state](f.hide()),f.slideDown(100,function(){f.removeClass("active")}),e.slideUp(100,function(){var a=e.parent();e.remove(),a.children("li").length||a.remove()}),f.trigger("dropped.st"))}),!1}},"mouseover.st":function(){return c||a(this).addClass("active"),!1},"mouseout.st":function(){return c||a(this).removeClass("active"),!1}}).find("li li").prepend('<button type="button" class="moveTo">Move to</button>').end().end(),a('<div id="dropzone-marker" />').css({display:"none",position:"absolute",backgroundColor:"#000",opacity:.7}).appendTo("body")});
|
||||
|
|
@ -181,6 +181,7 @@ class autoinstallAdminController extends autoinstall
|
|||
@set_time_limit(0);
|
||||
$package_srls = Context::get('package_srl');
|
||||
$oModel = getModel('autoinstall');
|
||||
$oAdminModel = getAdminModel('autoinstall');
|
||||
$packages = explode(',', $package_srls);
|
||||
$ftp_info = Context::getFTPInfo();
|
||||
if(!$_SESSION['ftp_password'])
|
||||
|
|
@ -196,7 +197,11 @@ class autoinstallAdminController extends autoinstall
|
|||
foreach($packages as $package_srl)
|
||||
{
|
||||
$package = $oModel->getPackage($package_srl);
|
||||
if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
|
||||
if($oAdminModel->checkUseDirectModuleInstall($package)->toBool())
|
||||
{
|
||||
$oModuleInstaller = new DirectModuleInstaller($package);
|
||||
}
|
||||
else if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
|
||||
{
|
||||
$oModuleInstaller = new SFTPModuleInstaller($package);
|
||||
}
|
||||
|
|
@ -308,7 +313,11 @@ class autoinstallAdminController extends autoinstall
|
|||
{
|
||||
$package_srl = Context::get('package_srl');
|
||||
|
||||
$this->uninstallPackageByPackageSrl($package_srl);
|
||||
$output = $this->uninstallPackageByPackageSrl($package_srl);
|
||||
if($output->toBool()==FALSE)
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
if(Context::get('return_url'))
|
||||
{
|
||||
|
|
@ -348,6 +357,8 @@ class autoinstallAdminController extends autoinstall
|
|||
{
|
||||
$path = $package->path;
|
||||
|
||||
$oAdminModel = getAdminModel('autoinstall');
|
||||
|
||||
if(!$_SESSION['ftp_password'])
|
||||
{
|
||||
$ftp_password = Context::get('ftp_password');
|
||||
|
|
@ -359,7 +370,11 @@ class autoinstallAdminController extends autoinstall
|
|||
$ftp_info = Context::getFTPInfo();
|
||||
|
||||
$isSftpSupported = function_exists(ssh2_sftp);
|
||||
if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
|
||||
if($oAdminModel->checkUseDirectModuleInstall($package)->toBool())
|
||||
{
|
||||
$oModuleInstaller = new DirectModuleInstaller($package);
|
||||
}
|
||||
else if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
|
||||
{
|
||||
$oModuleInstaller = new SFTPModuleInstaller($package);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ class autoinstallAdminModel extends autoinstall
|
|||
}
|
||||
}
|
||||
|
||||
$installedPackage = $oModel->getInstalledPackage($package_srl);
|
||||
$installedPackage = $oModel->getInstalledPackage($packageSrl);
|
||||
if($installedPackage)
|
||||
{
|
||||
$package->installed = TRUE;
|
||||
|
|
@ -348,6 +348,61 @@ class autoinstallAdminModel extends autoinstall
|
|||
$this->add('package', $package);
|
||||
}
|
||||
|
||||
public function checkUseDirectModuleInstall($package)
|
||||
{
|
||||
$directModuleInstall = TRUE;
|
||||
$arrUnwritableDir = array();
|
||||
$output = $this->isWritableDir($package->path);
|
||||
if($output->toBool()==FALSE)
|
||||
{
|
||||
$directModuleInstall = FALSE;
|
||||
$arrUnwritableDir[] = $output->get('path');
|
||||
}
|
||||
|
||||
foreach($package->depends as $dep)
|
||||
{
|
||||
$output = $this->isWritableDir($dep->path);
|
||||
if($output->toBool()==FALSE)
|
||||
{
|
||||
$directModuleInstall = FALSE;
|
||||
$arrUnwritableDir[] = $output->get('path');
|
||||
}
|
||||
}
|
||||
|
||||
if($directModuleInstall==FALSE)
|
||||
{
|
||||
$output = new Object(-1, 'msg_direct_inall_invalid');
|
||||
$output->add('path', $arrUnwritableDir);
|
||||
return $output;
|
||||
}
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
public function isWritableDir($path)
|
||||
{
|
||||
$path_list = explode('/', dirname($path));
|
||||
$real_path = './';
|
||||
|
||||
while($path_list)
|
||||
{
|
||||
$check_path = realpath($real_path . implode('/', $path_list));
|
||||
if(FileHandler::isDir($check_path))
|
||||
{
|
||||
break;
|
||||
}
|
||||
array_pop($path_list);
|
||||
}
|
||||
|
||||
if(FileHandler::isWritableDir($check_path)==FALSE)
|
||||
{
|
||||
$output = new Object(-1, 'msg_unwritable_directory');
|
||||
$output->add('path', FileHandler::getRealPath($check_path));
|
||||
return $output;
|
||||
}
|
||||
return new Object();
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file autoinstall.admin.model.php */
|
||||
/* Location: ./modules/autoinstall/autoinstall.admin.model.php */
|
||||
|
|
|
|||
|
|
@ -368,6 +368,13 @@ class autoinstallAdminView extends autoinstall
|
|||
Context::set('need_password', TRUE);
|
||||
}
|
||||
|
||||
$output = $oAdminModel->checkUseDirectModuleInstall($package);
|
||||
if($output->toBool()==TRUE)
|
||||
{
|
||||
Context::set('show_ftp_note', FALSE);
|
||||
}
|
||||
Context::set('directModuleInstall', $output);
|
||||
|
||||
$this->setTemplateFile('install');
|
||||
|
||||
$security = new Security();
|
||||
|
|
@ -503,6 +510,7 @@ class autoinstallAdminView extends autoinstall
|
|||
}
|
||||
|
||||
$oModel = getModel('autoinstall');
|
||||
$oAdminModel = getAdminModel('autoinstall');
|
||||
$installedPackage = $oModel->getInstalledPackage($package_srl);
|
||||
if(!$installedPackage)
|
||||
{
|
||||
|
|
@ -529,6 +537,13 @@ class autoinstallAdminView extends autoinstall
|
|||
return $this->stop("msg_invalid_request");
|
||||
}
|
||||
|
||||
$output = $oAdminModel->checkUseDirectModuleInstall($installedPackage);
|
||||
if($output->toBool()==TRUE)
|
||||
{
|
||||
Context::set('show_ftp_note', FALSE);
|
||||
}
|
||||
Context::set('directModuleInstall', $output);
|
||||
|
||||
$params["act"] = "getResourceapiPackages";
|
||||
$params["package_srls"] = $package_srl;
|
||||
$body = XmlGenerater::generate($params);
|
||||
|
|
|
|||
|
|
@ -867,6 +867,131 @@ class FTPModuleInstaller extends ModuleInstaller
|
|||
return new Object();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Module installer for Direct. Not use FTP
|
||||
* @author NAVER (developers@xpressengine.com)
|
||||
*/
|
||||
class DirectModuleInstaller extends ModuleInstaller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $package Package information
|
||||
*/
|
||||
function DirectModuleInstaller(&$package)
|
||||
{
|
||||
$this->package = &$package;
|
||||
}
|
||||
|
||||
/**
|
||||
* empty
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function _connect()
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove file
|
||||
*
|
||||
* @param string $path Path to remove
|
||||
* @return Object
|
||||
*/
|
||||
function _removeFile($path)
|
||||
{
|
||||
if(substr($path, 0, 2) == "./")
|
||||
{
|
||||
$path = substr($path, 2);
|
||||
}
|
||||
$target_path = FileHandler::getRealPath($path);
|
||||
|
||||
if(!FileHandler::removeFile($target_path))
|
||||
{
|
||||
return new Object(-1, sprintf(Context::getLang('msg_delete_file_failed'), $path));
|
||||
}
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove directory
|
||||
* @param string $path Path to remove
|
||||
* @return Object
|
||||
*/
|
||||
function _removeDir_real($path)
|
||||
{
|
||||
if(substr($path, 0, 2) == "./")
|
||||
{
|
||||
$path = substr($path, 2);
|
||||
}
|
||||
$target_path = FileHandler::getRealPath($path);
|
||||
|
||||
FileHandler::removeDir($target_path);
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Close
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function _close()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy directory
|
||||
*
|
||||
* @param array $file_list File list to copy
|
||||
* @return Object
|
||||
*/
|
||||
function _copyDir(&$file_list)
|
||||
{
|
||||
$output = $this->_connect();
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
$target_dir = $this->target_path;
|
||||
|
||||
if(is_array($file_list))
|
||||
{
|
||||
foreach($file_list as $k => $file)
|
||||
{
|
||||
$org_file = $file;
|
||||
if($this->package->path == ".")
|
||||
{
|
||||
$file = substr($file, 3);
|
||||
}
|
||||
$path = FileHandler::getRealPath("./" . $this->target_path . "/" . $file);
|
||||
$path_list = explode('/', dirname($this->target_path . "/" . $file));
|
||||
$real_path = "./";
|
||||
|
||||
for($i = 0; $i < count($path_list); $i++)
|
||||
{
|
||||
if($path_list == "")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$real_path .= $path_list[$i] . "/";
|
||||
if(!file_exists(FileHandler::getRealPath($real_path)))
|
||||
{
|
||||
FileHandler::makeDir($real_path);
|
||||
}
|
||||
}
|
||||
FileHandler::copyFile( FileHandler::getRealPath($this->download_path . "/" . $org_file), FileHandler::getRealPath("./" . $target_dir . '/' . $file));
|
||||
}
|
||||
}
|
||||
|
||||
$this->_close();
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file autoinstall.lib.php */
|
||||
/* Location: ./modules/autoinstall/autoinstall.lib.php */
|
||||
|
|
|
|||
|
|
@ -323,6 +323,11 @@
|
|||
<value xml:lang="en"><![CDATA[SFTP is not supported.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[SFTPの非対応環境です。]]></value>
|
||||
</item>
|
||||
<item name="msg_direct_install_not_supported">
|
||||
<value xml:lang="ko"><![CDATA[아래 목록에 나열된 디렉터리에 쓰기 권한이 없기 때문에 FTP를 사용합니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Use FTP because there is no write permission to the directories listed in the list below.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[下記のリストにリストされているディレクトリへの書き込み権限がないため、FTPを使用してください。]]></value>
|
||||
</item>
|
||||
<item name="msg_does_not_support_delete">
|
||||
<value xml:lang="ko"><![CDATA[이 패키지가 삭제를 지원하지 않습니다(모듈 클래스에 moduleUninstall()이 없음).]]></value>
|
||||
<value xml:lang="en"><![CDATA[Cannot delete this package (no moduleUninstall() in the module class).]]></value>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<div cond="$XE_VALIDATOR_MESSAGE && isset($from_id[$XE_VALIDATOR_ID])" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<!--
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="module" value="autoinstall" />
|
||||
<input type="hidden" name="act" value="procAutoinstallAdminUpdateinfo" />
|
||||
|
|
@ -22,4 +23,5 @@
|
|||
{sprintf($lang->description_update, $btnUpdate)}
|
||||
</p>
|
||||
</form>
|
||||
-->
|
||||
<include target="list.html" />
|
||||
|
|
|
|||
|
|
@ -6,30 +6,37 @@
|
|||
<h4>{$lang->msg_update_core_title}</h4>
|
||||
<p>{$lang->msg_update_core}</p>
|
||||
</div>
|
||||
<div class="x_well">
|
||||
<p cond="$package->installed">{$lang->current_version}: {$package->cur_version} <block cond="$package->need_update">({$lang->require_update})</block></p>
|
||||
<p cond="!$package->installed">{$lang->require_installation}</p>
|
||||
<block cond="$package->depends">
|
||||
<p>{$lang->about_depending_programs}</p>
|
||||
<ul>
|
||||
<li loop="$package->depends => $dep">
|
||||
{$dep->title} ver. {$dep->version} -
|
||||
<block cond="$dep->installed">{$lang->current_version}: {$dep->cur_version} <block cond="$dep->need_update">({$lang->require_update})</block></block>
|
||||
<block cond="!$dep->installed">{$lang->require_installation}</block>
|
||||
<block cond="$show_ftp_note && ($dep->need_update || !$dep->installed)">
|
||||
<a href="{_XE_DOWNLOAD_SERVER_}?module=resourceapi&act=procResourceapiDownload&package_srl={$dep->package_srl}">{$lang->cmd_download}</a> ({$lang->path}: {$dep->path})
|
||||
</block>
|
||||
</li>
|
||||
</ul>
|
||||
<p>{$lang->description_install}</p>
|
||||
</block>
|
||||
<div cond="$package->installed" class="x_well">
|
||||
<p>{$lang->current_version}: {$package->cur_version} <block cond="$package->need_update">({$lang->require_update})</block></p>
|
||||
</div>
|
||||
<div cond="$package->depends && (!$package->installed || $package->need_update)" class="x_well">
|
||||
<p>{$lang->about_depending_programs}</p>
|
||||
<p>{$lang->description_install}</p>
|
||||
<ul>
|
||||
<li loop="$package->depends => $dep">
|
||||
{$dep->title} ver. {$dep->version} -
|
||||
<block cond="$dep->installed">{$lang->current_version}: {$dep->cur_version} <block cond="$dep->need_update">({$lang->require_update})</block></block>
|
||||
<block cond="!$dep->installed">{$lang->require_installation}</block>
|
||||
<block cond="$show_ftp_note && ($dep->need_update || !$dep->installed)">
|
||||
<a href="{_XE_DOWNLOAD_SERVER_}?module=resourceapi&act=procResourceapiDownload&package_srl={$dep->package_srl}">{$lang->cmd_download}</a> ({$lang->path}: {$dep->path})
|
||||
</block>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<block cond="!$package->installed || $package->need_update">
|
||||
<div cond="$show_ftp_note" class="x_well x_clearfix">
|
||||
<p>{$lang->description_download}. (<a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigFtp')}">FTP Setup</a>)</p>
|
||||
<p>{$lang->path}: {$package->path}</p>
|
||||
<p><a class="x_btn x_btn-primary x_pull-right" href="{_XE_DOWNLOAD_SERVER_}?module=resourceapi&act=procResourceapiDownload&package_srl={$package->package_srl}">{$lang->cmd_download}</a>
|
||||
<div cond="!$directModuleInstall->toBool() || $show_ftp_note" class="x_well x_clearfix">
|
||||
<block cond="!$directModuleInstall->toBool()">
|
||||
<p>{$lang->msg_direct_install_not_supported}</p>
|
||||
<ul>
|
||||
<li loop="$directModuleInstall->get('path') => $path">{$path}</li>
|
||||
</ul>
|
||||
</block>
|
||||
<block cond="$show_ftp_note" >
|
||||
<p>{$lang->description_download}. (<a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigFtp')}">FTP Setup</a>)</p>
|
||||
<p>{$lang->path}: {$package->path}</p>
|
||||
<p><a class="x_btn x_btn-primary x_pull-right" href="{_XE_DOWNLOAD_SERVER_}?module=resourceapi&act=procResourceapiDownload&package_srl={$package->package_srl}">{$lang->cmd_download}</a>
|
||||
</block>
|
||||
</div>
|
||||
<div cond="!$show_ftp_note">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/autoinstall/tpl/install/1'" class="message error">
|
||||
|
|
@ -40,10 +47,10 @@
|
|||
<input type="hidden" name="act" value="procAutoinstallAdminPackageinstall" />
|
||||
<input type="hidden" name="package_srl" value="{$package->package_srl}" />
|
||||
<input type="hidden" name="return_url" value="{$return_url}" />
|
||||
<input cond="!$need_password" type="hidden" name="ftp_password" value="dummy" />
|
||||
<input cond="!$need_password || $directModuleInstall->toBool()" type="hidden" name="ftp_password" value="dummy" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/autoinstall/tpl/install/1" />
|
||||
|
||||
<block cond="$need_password">
|
||||
<block cond="$need_password && !$directModuleInstall->toBool()">
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="ftp_password">FTP {$lang->password}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
<p class="x_btn-group" style="text-align:right">
|
||||
<a cond="$item->current_version && $item->need_update != 'Y'" class="x_btn x_disabled" href="#">{$lang->installed}</a>
|
||||
<a cond="!$item->current_version" class="x_btn" href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$item->package_srl)}"><i class="x_icon-download-alt"></i> {$lang->install}</a>
|
||||
<a cond="!$show_ftp_note && $item->current_version && $item->avail_remove" class="x_btn" href="{getUrl('act','dispAutoinstallAdminUninstall','package_srl',$item->package_srl)}"><i class="x_icon-remove"></i> {$lang->cmd_delete}</a>
|
||||
<a cond="$item->current_version && $item->avail_remove" class="x_btn" href="{getUrl('act','dispAutoinstallAdminUninstall','package_srl',$item->package_srl)}"><i class="x_icon-remove"></i> {$lang->cmd_delete}</a>
|
||||
<a cond="$item->current_version && $item->need_update == 'Y'" class="x_btn" href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$item->package_srl)}"><i class="x_icon-refresh"></i> {$lang->update}</a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,43 +8,55 @@
|
|||
<div class="x_alert x_alert-block">
|
||||
<p>{$lang->description_uninstall}</p>
|
||||
</div>
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/autoinstall/tpl/uninstall/1'" class="message error">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
<div class="x_well x_clearfix">
|
||||
<block cond="!$directModuleInstall->toBool()">
|
||||
<p>{$lang->msg_direct_install_not_supported}</p>
|
||||
<ul>
|
||||
<li loop="$directModuleInstall->get('path') => $path">{$path}</li>
|
||||
</ul>
|
||||
</block>
|
||||
<block cond="$show_ftp_note">
|
||||
<p>{$lang->ftp_form_title}. (<a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigFtp')}">FTP Setup</a>)</p>
|
||||
</block>
|
||||
</div>
|
||||
<form action="./" class="x_form-horizontal" method="post" ruleset="ftp">
|
||||
<input type="hidden" name="module" value="autoinstall" />
|
||||
<input type="hidden" name="act" value="procAutoinstallAdminUninstallPackage" />
|
||||
<input type="hidden" name="package_srl" value="{$package_srl}" />
|
||||
<input type="hidden" name="return_url" value="{$return_url}" />
|
||||
<input cond="!$need_password" type="hidden" name="ftp_password" value="dummy" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/autoinstall/tpl/uninstall/1" />
|
||||
|
||||
<block cond="$need_password">
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="ftp_password">FTP {$lang->password}</label>
|
||||
<div class="x_controls">
|
||||
<input type="password" name="ftp_password" id="ftp_password" value="" />
|
||||
<span class="x_help-block">{$lang->about_ftp_password}</span>
|
||||
<div cond="!$show_ftp_note">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/autoinstall/tpl/uninstall/1'" class="message error">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form action="./" class="x_form-horizontal" method="post" ruleset="ftp">
|
||||
<input type="hidden" name="module" value="autoinstall" />
|
||||
<input type="hidden" name="act" value="procAutoinstallAdminUninstallPackage" />
|
||||
<input type="hidden" name="package_srl" value="{$package_srl}" />
|
||||
<input type="hidden" name="return_url" value="{$return_url}" />
|
||||
<input cond="!$need_password || $directModuleInstall->toBool()" type="hidden" name="ftp_password" value="dummy" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/autoinstall/tpl/uninstall/1" />
|
||||
|
||||
<block cond="$need_password && !$directModuleInstall->toBool()">
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="ftp_password">FTP {$lang->password}</label>
|
||||
<div class="x_controls">
|
||||
<input type="password" name="ftp_password" id="ftp_password" value="" />
|
||||
<span class="x_help-block">{$lang->about_ftp_password}</span>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_delete}" />
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_delete}" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</block>
|
||||
<block cond="!$package->avail_remove">
|
||||
<div class="x_alert x_alert-error">
|
||||
<p cond="$package->deps">{$lang->msg_dependency_package}</p>
|
||||
<p cond="!$package->deps">{$lang->msg_does_not_support_delete}</p>
|
||||
</div>
|
||||
<div class="x_well">
|
||||
<p cond="$package->deps">{$lang->dependant_list}:</p>
|
||||
<ul cond="$package->deps">
|
||||
<div cond="$package->deps" class="x_well">
|
||||
<p>{$lang->dependant_list}:</p>
|
||||
<ul>
|
||||
<li loop="$package->deps => $dep_package_srl">{$installed[$dep_package_srl]->title}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -30,12 +30,24 @@ class boardAdminController extends board {
|
|||
if(is_array($args->use_status)) $args->use_status = implode('|@|', $args->use_status);
|
||||
unset($args->board_name);
|
||||
|
||||
// setup extra_order_target
|
||||
$extra_order_target = array();
|
||||
if($args->module_srl)
|
||||
{
|
||||
$oDocumentModel = getModel('document');
|
||||
$module_extra_vars = $oDocumentModel->getExtraKeys($args->module_srl);
|
||||
foreach($module_extra_vars as $oExtraItem)
|
||||
{
|
||||
$extra_order_target[$oExtraItem->eid] = $oExtraItem->name;
|
||||
}
|
||||
}
|
||||
|
||||
// setup other variables
|
||||
if($args->except_notice != 'Y') $args->except_notice = 'N';
|
||||
if($args->use_anonymous != 'Y') $args->use_anonymous = 'N';
|
||||
if($args->consultation != 'Y') $args->consultation = 'N';
|
||||
if($args->protect_content!= 'Y') $args->protect_content = 'N';
|
||||
if(!in_array($args->order_target,$this->order_target)) $args->order_target = 'list_order';
|
||||
if(!in_array($args->order_target,$this->order_target) && !in_array($args->order_target, $extra_order_target)) $args->order_target = 'list_order';
|
||||
if(!in_array($args->order_type, array('asc', 'desc'))) $args->order_type = 'asc';
|
||||
|
||||
// if there is an existed module
|
||||
|
|
|
|||
|
|
@ -168,11 +168,21 @@ class boardAdminView extends board {
|
|||
$oBoardModel = getModel('board');
|
||||
|
||||
// setup the extra vaiables
|
||||
Context::set('extra_vars', $oBoardModel->getDefaultListConfig($this->module_info->module_srl));
|
||||
$extra_vars = $oBoardModel->getDefaultListConfig($this->module_info->module_srl);
|
||||
Context::set('extra_vars', $extra_vars);
|
||||
|
||||
// setup the list config (install the default value if there is no list config)
|
||||
Context::set('list_config', $oBoardModel->getListConfig($this->module_info->module_srl));
|
||||
|
||||
// setup extra_order_target
|
||||
$module_extra_vars = $oDocumentModel->getExtraKeys($this->module_info->module_srl);
|
||||
$extra_order_target = array();
|
||||
foreach($module_extra_vars as $oExtraItem)
|
||||
{
|
||||
$extra_order_target[$oExtraItem->eid] = $oExtraItem->name;
|
||||
}
|
||||
Context::set('extra_order_target', $extra_order_target);
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('extra_vars..name','list_config..name');
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
class board extends ModuleObject
|
||||
{
|
||||
var $search_option = array('title','content','title_content','comment','user_name','nick_name','user_id','tag'); ///< 검색 옵션
|
||||
var $search_option = array('title_content','title','content','comment','user_name','nick_name','user_id','tag'); ///< 검색 옵션
|
||||
|
||||
var $order_target = array('list_order', 'update_order', 'regdate', 'voted_count', 'blamed_count', 'readed_count', 'comment_count', 'title'); // 정렬 옵션
|
||||
var $order_target = array('list_order', 'update_order', 'regdate', 'voted_count', 'blamed_count', 'readed_count', 'comment_count', 'title', 'nick_name', 'user_name', 'user_id'); // 정렬 옵션
|
||||
|
||||
var $skin = "default"; ///< skin name
|
||||
var $list_count = 20; ///< the number of documents displayed in a page
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class boardController extends board
|
|||
$obj->commentStatus = $obj->comment_status;
|
||||
|
||||
settype($obj->title, "string");
|
||||
if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...');
|
||||
if($obj->title == '') $obj->title = cut_str(trim(strip_tags(nl2br($obj->content))),20,'...');
|
||||
//setup dpcument title tp 'Untitled'
|
||||
if($obj->title == '') $obj->title = 'Untitled';
|
||||
|
||||
|
|
@ -89,11 +89,12 @@ class boardController extends board
|
|||
$bAnonymous = false;
|
||||
}
|
||||
|
||||
if((!$obj->status && $obj->is_secret == 'Y') || strtoupper($obj->status == 'SECRET'))
|
||||
if($obj->is_secret == 'Y' || strtoupper($obj->status == 'SECRET'))
|
||||
{
|
||||
$use_status = explode('|@|', $this->module_info->use_status);
|
||||
if(!is_array($use_status) || !in_array('SECRET', $use_status))
|
||||
{
|
||||
unset($obj->is_secret);
|
||||
$obj->status = 'PUBLIC';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,11 @@ class boardMobile extends boardView
|
|||
$oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl');
|
||||
|
||||
if($this->module_info->list_count) $this->list_count = $this->module_info->list_count;
|
||||
if($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count;
|
||||
if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count;
|
||||
if($this->module_info->mobile_search_list_count) $this->list_count = $this->module_info->mobile_search_list_count;
|
||||
if($this->module_info->page_count) $this->page_count = $this->module_info->page_count;
|
||||
if($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count;
|
||||
$this->except_notice = $this->module_info->except_notice == 'N' ? false : true;
|
||||
|
||||
// $this->_getStatusNameListecret option backward compatibility
|
||||
|
|
|
|||
|
|
@ -395,6 +395,16 @@ class boardView extends board
|
|||
$args->search_target = Context::get('search_target');
|
||||
$args->search_keyword = Context::get('search_keyword');
|
||||
|
||||
$search_option = Context::get('search_option');
|
||||
if($search_option==FALSE)
|
||||
{
|
||||
$search_option = $this->search_option;
|
||||
}
|
||||
if(isset($search_option[$args->search_target])==FALSE)
|
||||
{
|
||||
$args->search_target = '';
|
||||
}
|
||||
|
||||
// if the category is enabled, then get the category
|
||||
if($this->module_info->use_category=='Y')
|
||||
{
|
||||
|
|
@ -639,7 +649,8 @@ class boardView extends board
|
|||
/**
|
||||
* add JS filters
|
||||
**/
|
||||
Context::addJsFilter($this->module_path.'tpl/filter', 'insert.xml');
|
||||
if(Context::get('logged_info')->is_admin=='Y') Context::addJsFilter($this->module_path.'tpl/filter', 'insert_admin.xml');
|
||||
else Context::addJsFilter($this->module_path.'tpl/filter', 'insert.xml');
|
||||
|
||||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('category_list.text', 'category_list.title');
|
||||
|
|
|
|||
|
|
@ -48,6 +48,27 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="list_count">{$lang->list_count}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="list_count" id="list_count" value="{$module_info->list_count?$module_info->list_count:20}" style="width:30px" />
|
||||
<p class="x_help-inline">{$lang->about_list_count}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="search_list_count">{$lang->search_list_count}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="search_list_count" id="search_list_count" value="{$module_info->search_list_count?$module_info->search_list_count:20}" style="width:30px" />
|
||||
<p class="x_help-inline">{$lang->about_search_list_count}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="page_count">{$lang->page_count}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="page_count" id="page_count" value="{$module_info->page_count?$module_info->page_count:10}" style="width:30px" />
|
||||
<p class="x_help-inline">{$lang->about_page_count}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="lang_header_text">{$lang->header_text}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -94,8 +115,29 @@
|
|||
<p id="mobile_skin_help" class="x_help-block" hidden>{$lang->about_skin}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="mobile_list_count">{$lang->list_count}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="mobile_list_count" id="mobile_list_count" value="{$module_info->mobile_list_count?$module_info->mobile_list_count:20}" style="width:30px" />
|
||||
<p class="x_help-inline">{$lang->about_list_count}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="mobile_search_list_count">{$lang->search_list_count}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="mobile_search_list_count" id="mobile_search_list_count" value="{$module_info->mobile_search_list_count?$module_info->mobile_search_list_count:20}" style="width:30px" />
|
||||
<p class="x_help-inline">{$lang->about_search_list_count}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="mobile_page_count">{$lang->page_count}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="mobile_page_count" id="mobile_page_count" value="{$module_info->mobile_page_count?$module_info->mobile_page_count:5}" style="width:30px" />
|
||||
<p class="x_help-inline">{$lang->about_mobile_page_count}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section collapsed">
|
||||
<section class="section">
|
||||
<h1>{$lang->subtitle_advanced}</h1>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->cmd_list_setting}</label>
|
||||
|
|
@ -129,6 +171,9 @@
|
|||
<div class="x_controls">
|
||||
<select name="order_target" id="order_target" title="{$lang->order_target}">
|
||||
<option loop="$order_target=> $key, $val" value="{$key}" selected="selected"|cond="$module_info->order_target== $key">{$val}</option>
|
||||
<block cond="$extra_order_target">
|
||||
<option loop="$extra_order_target=> $key, $val" value="{$key}" selected="selected"|cond="$module_info->order_target== $key">{$val}</option>
|
||||
</block>
|
||||
</select>
|
||||
<select name="order_type" id="order_type" title="{$lang->order_type}">
|
||||
<option value="asc" selected="selected"|cond="$module_info->order_type != 'desc'">{$lang->order_asc}</option>
|
||||
|
|
@ -136,27 +181,6 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="list_count">{$lang->list_count}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="list_count" id="list_count" value="{$module_info->list_count?$module_info->list_count:20}" style="width:30px" />
|
||||
<p class="x_help-inline">{$lang->about_list_count}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="search_list_count">{$lang->search_list_count}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="search_list_count" id="search_list_count" value="{$module_info->search_list_count?$module_info->search_list_count:20}" style="width:30px" />
|
||||
<p class="x_help-inline">{$lang->about_search_list_count}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="page_count">{$lang->page_count}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="page_count" id="page_count" value="{$module_info->page_count?$module_info->page_count:10}" style="width:30px" />
|
||||
<p class="x_help-inline">{$lang->about_page_count}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->except_notice}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
17
modules/board/tpl/filter/insert_admin.xml
Normal file
17
modules/board/tpl/filter/insert_admin.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<filter name="insert" module="board" act="procBoardInsertDocument">
|
||||
<form>
|
||||
<node target="nick_name" required="true" maxlength="20"/>
|
||||
<node target="password" required="true" />
|
||||
<node target="email_address" maxlength="250" filter="email" />
|
||||
<node target="homepage" maxlength="250" filter="url" />
|
||||
<node target="title" required="true" minlength="1" maxlength="250" />
|
||||
<node target="content" required="true" />
|
||||
</form>
|
||||
<response callback_func="completeDocumentInserted">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
<tag name="mid" />
|
||||
<tag name="document_srl" />
|
||||
<tag name="category_srl" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -199,18 +199,25 @@ class commentController extends comment
|
|||
// check if comment's module is using comment validation and set the publish status to 0 (false)
|
||||
// for inserting query, otherwise default is 1 (true - means comment is published)
|
||||
$using_validation = $this->isModuleUsingPublishValidation($obj->module_srl);
|
||||
if(Context::get('is_logged'))
|
||||
if(!$manual_inserted)
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y')
|
||||
if(Context::get('is_logged'))
|
||||
{
|
||||
$is_admin = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_admin = FALSE;
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y')
|
||||
{
|
||||
$is_admin = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_admin = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_admin = FALSE;
|
||||
}
|
||||
|
||||
if(!$using_validation)
|
||||
{
|
||||
|
|
@ -441,7 +448,10 @@ class commentController extends comment
|
|||
}
|
||||
|
||||
// grant autority of the comment
|
||||
$this->addGrant($obj->comment_srl);
|
||||
if(!$manual_inserted)
|
||||
{
|
||||
$this->addGrant($obj->comment_srl);
|
||||
}
|
||||
|
||||
// call a trigger(after)
|
||||
if($output->toBool())
|
||||
|
|
@ -711,6 +721,15 @@ class commentController extends comment
|
|||
// remove XE's wn tags from contents
|
||||
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
|
||||
|
||||
if(Mobile::isFromMobilePhone())
|
||||
{
|
||||
if($obj->use_html != 'Y')
|
||||
{
|
||||
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
}
|
||||
$obj->content = nl2br($obj->content);
|
||||
}
|
||||
|
||||
// remove iframe and script if not a top administrator on the session
|
||||
if($logged_info->is_admin != 'Y')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ class commentItem extends Object
|
|||
$content = preg_replace('!(<br[\s]*/{0,1}>[\s]*)+!is', ' ', $content);
|
||||
|
||||
// replace tags such as </p> , </div> , </li> by blanks.
|
||||
$content = str_replace(array('</p>', '</div>', '</li>'), ' ', $content);
|
||||
$content = str_replace(array('</p>', '</div>', '</li>', '-->'), ' ', $content);
|
||||
|
||||
// Remove tags
|
||||
$content = preg_replace('!<([^>]*?)>!is', '', $content);
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ class communicationAdminModel extends communication
|
|||
|
||||
$oModuleModel = getModel('module');
|
||||
$communication_config = $oModuleModel->getModuleConfig('communication');
|
||||
if(!is_object($communication_config)) $communication_config = new stdClass;
|
||||
if(!$communication_config->colorset)
|
||||
{
|
||||
$communication_config->colorset = "white";
|
||||
|
|
|
|||
|
|
@ -175,6 +175,9 @@ class communicationController extends communication
|
|||
$content = removeHackTag($content);
|
||||
$title = htmlspecialchars($title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
|
||||
$message_srl = getNextSequence();
|
||||
$related_srl = getNextSequence();
|
||||
|
||||
// messages to save in the sendor's message box
|
||||
$sender_args = new stdClass();
|
||||
$sender_args->sender_srl = $sender_srl;
|
||||
|
|
@ -184,15 +187,15 @@ class communicationController extends communication
|
|||
$sender_args->content = $content;
|
||||
$sender_args->readed = 'N';
|
||||
$sender_args->regdate = date("YmdHis");
|
||||
$sender_args->message_srl = getNextSequence();
|
||||
$sender_args->related_srl = getNextSequence();
|
||||
$sender_args->message_srl = $message_srl;
|
||||
$sender_args->related_srl = $related_srl;
|
||||
$sender_args->list_order = $sender_args->message_srl * -1;
|
||||
|
||||
// messages to save in the receiver's message box
|
||||
$receiver_args = new stdClass();
|
||||
$receiver_args->message_srl = $sender_args->related_srl;
|
||||
$receiver_args->message_srl = $related_srl;
|
||||
$receiver_args->related_srl = 0;
|
||||
$receiver_args->list_order = $sender_args->related_srl * -1;
|
||||
$receiver_args->list_order = $related_srl * -1;
|
||||
$receiver_args->sender_srl = $sender_srl;
|
||||
if(!$receiver_args->sender_srl)
|
||||
{
|
||||
|
|
@ -210,6 +213,7 @@ class communicationController extends communication
|
|||
$trigger_obj->sender_srl = $sender_srl;
|
||||
$trigger_obj->receiver_srl = $receiver_srl;
|
||||
$trigger_obj->message_srl = $message_srl;
|
||||
$trigger_obj->related_srl = $related_srl;
|
||||
$trigger_obj->title = $title;
|
||||
$trigger_obj->content = $content;
|
||||
$trigger_obj->sender_log = $sender_log;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
.barContainer{margin-right:103px;position:relative;height:100%;}
|
||||
.graphHr{position:relative; display:inline-block; background:transparent url(images/iconBar.gif) 4px 0 repeat-x;height:5px}
|
||||
.graphHr>span{position:absolute;top:-7px;left:100%;padding-left:4px;width:100px}
|
||||
.graphHr>span{position:absolute;top:-7px;left:100%;padding-left:4px;width:100px;white-space:nowrap}
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ class documentController extends document
|
|||
}
|
||||
// If the tile is empty, extract string from the contents.
|
||||
settype($obj->title, "string");
|
||||
if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...');
|
||||
if($obj->title == '') $obj->title = cut_str(trim(strip_tags(nl2br($obj->content))),20,'...');
|
||||
// If no tile extracted from the contents, leave it untitled.
|
||||
if($obj->title == '') $obj->title = 'Untitled';
|
||||
// Remove XE's own tags from the contents.
|
||||
|
|
@ -333,7 +333,10 @@ class documentController extends document
|
|||
$oDB->commit();
|
||||
|
||||
// return
|
||||
$this->addGrant($obj->document_srl);
|
||||
if(!$manual_inserted)
|
||||
{
|
||||
$this->addGrant($obj->document_srl);
|
||||
}
|
||||
$output->add('document_srl',$obj->document_srl);
|
||||
$output->add('category_srl',$obj->category_srl);
|
||||
|
||||
|
|
@ -512,30 +515,33 @@ class documentController extends document
|
|||
return $output;
|
||||
}
|
||||
// Remove all extra variables
|
||||
$this->deleteDocumentExtraVars($source_obj->get('module_srl'), $obj->document_srl, null, Context::getLangType());
|
||||
// Insert extra variables if the document successfully inserted.
|
||||
$extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl);
|
||||
if(count($extra_keys))
|
||||
if(Context::get('act')!='procFileDelete')
|
||||
{
|
||||
foreach($extra_keys as $idx => $extra_item)
|
||||
$this->deleteDocumentExtraVars($source_obj->get('module_srl'), $obj->document_srl, null, Context::getLangType());
|
||||
// Insert extra variables if the document successfully inserted.
|
||||
$extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl);
|
||||
if(count($extra_keys))
|
||||
{
|
||||
$value = NULL;
|
||||
if(isset($obj->{'extra_vars'.$idx}))
|
||||
foreach($extra_keys as $idx => $extra_item)
|
||||
{
|
||||
$tmp = $obj->{'extra_vars'.$idx};
|
||||
if(is_array($tmp))
|
||||
$value = implode('|@|', $tmp);
|
||||
else
|
||||
$value = trim($tmp);
|
||||
$value = NULL;
|
||||
if(isset($obj->{'extra_vars'.$idx}))
|
||||
{
|
||||
$tmp = $obj->{'extra_vars'.$idx};
|
||||
if(is_array($tmp))
|
||||
$value = implode('|@|', $tmp);
|
||||
else
|
||||
$value = trim($tmp);
|
||||
}
|
||||
else if(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
|
||||
if($value == NULL) continue;
|
||||
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
|
||||
}
|
||||
else if(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
|
||||
if($value == NULL) continue;
|
||||
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
|
||||
}
|
||||
// Inert extra vars for multi-language support of title and contents.
|
||||
if($extra_content->title) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -1, $extra_content->title, 'title_'.Context::getLangType());
|
||||
if($extra_content->content) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -2, $extra_content->content, 'content_'.Context::getLangType());
|
||||
}
|
||||
// Inert extra vars for multi-language support of title and contents.
|
||||
if($extra_content->title) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -1, $extra_content->title, 'title_'.Context::getLangType());
|
||||
if($extra_content->content) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -2, $extra_content->content, 'content_'.Context::getLangType());
|
||||
// Update the category if the category_srl exists.
|
||||
if($source_obj->get('category_srl') != $obj->category_srl || $source_obj->get('module_srl') == $logged_info->member_srl)
|
||||
{
|
||||
|
|
@ -1551,6 +1557,7 @@ class documentController extends document
|
|||
$this->updateCategory($cur_args);
|
||||
// Category information
|
||||
$next_args = new stdClass;
|
||||
$next_args->category_srl = $next_category->category_srl;
|
||||
$next_args->list_order = $list_order;
|
||||
$next_args->title = $next_category->title;
|
||||
$this->updateCategory($next_args);
|
||||
|
|
|
|||
|
|
@ -523,19 +523,19 @@ class documentItem extends Object
|
|||
|
||||
function getSummary($str_size = 50, $tail = '...')
|
||||
{
|
||||
$content = $this->getContent(false,false);
|
||||
$content = $this->getContent(FALSE, FALSE);
|
||||
|
||||
// For a newlink, inert a whitespace
|
||||
$content = preg_replace('!(<br[\s]*/{0,1}>[\s]*)+!is', ' ', $content);
|
||||
|
||||
// Replace tags such as </p> , </div> , </li> and others to a whitespace
|
||||
$content = str_replace(array('</p>', '</div>', '</li>'), ' ', $content);
|
||||
$content = str_replace(array('</p>', '</div>', '</li>', '-->'), ' ', $content);
|
||||
|
||||
// Remove Tags
|
||||
$content = preg_replace('!<([^>]*?)>!is','', $content);
|
||||
$content = preg_replace('!<([^>]*?)>!is', '', $content);
|
||||
|
||||
// Replace < , >, "
|
||||
$content = str_replace(array('<','>','"',' '), array('<','>','"',' '), $content);
|
||||
$content = str_replace(array('<', '>', '"', ' '), array('<', '>', '"', ' '), $content);
|
||||
|
||||
// Delete a series of whitespaces
|
||||
$content = preg_replace('/ ( +)/is', ' ', $content);
|
||||
|
|
@ -544,7 +544,7 @@ class documentItem extends Object
|
|||
$content = trim(cut_str($content, $str_size, $tail));
|
||||
|
||||
// Replace back < , <, "
|
||||
$content = str_replace(array('<','>','"'),array('<','>','"'), $content);
|
||||
$content = str_replace(array('<', '>', '"'),array('<', '>', '"'), $content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<td > <a href="#" onclick="jQuery('#saved_document_{$val->document_srl}').toggle(); setFixedPopupSize(); return false;">{$val->getTitle()}</a>
|
||||
<div id="saved_document_{$val->document_srl}" class="saved_content" style="display:none;">{$val->getContent(false)}</div>
|
||||
</td>
|
||||
<td><a href="#" onclick="doDocumentSelect('{$val->document_srl}'); return false;" class="buttonSet buttonActive"><span>{$lang->cmd_select}</span></a></td>
|
||||
<td><a href="#" onclick="doDocumentSelect('{$val->document_srl}', '{$val->getDocumentType()}'); return false;" class="buttonSet buttonActive"><span>{$lang->cmd_select}</span></a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -221,6 +221,7 @@ class editorController extends editor
|
|||
$xml_obj->attrs = new stdClass;
|
||||
for($i=0,$c=count($m[0]);$i<$c;$i++)
|
||||
{
|
||||
if(!isset($xml_obj->attrs)) $xml_obj->attrs = new stdClass;
|
||||
$xml_obj->attrs->{$m[1][$i]} = $m[2][$i];
|
||||
}
|
||||
$xml_obj->body = $match[4];
|
||||
|
|
|
|||
|
|
@ -379,7 +379,8 @@ class editorModel extends editor
|
|||
$option->colorset = $config->sel_editor_colorset;
|
||||
// Permission check for file upload
|
||||
$option->allow_fileupload = false;
|
||||
if(count($config->upload_file_grant))
|
||||
if($logged_info->is_admin=='Y') $option->allow_fileupload = true;
|
||||
elseif(count($config->upload_file_grant))
|
||||
{
|
||||
foreach($group_list as $group_srl => $group_info)
|
||||
{
|
||||
|
|
@ -393,7 +394,8 @@ class editorModel extends editor
|
|||
else $option->allow_fileupload = true;
|
||||
// Permission check for using default components
|
||||
$option->enable_default_component = false;
|
||||
if(count($config->enable_default_component_grant))
|
||||
if($logged_info->is_admin=='Y') $option->enable_default_component = true;
|
||||
elseif(count($config->enable_default_component_grant))
|
||||
{
|
||||
foreach($group_list as $group_srl => $group_info)
|
||||
{
|
||||
|
|
@ -407,7 +409,8 @@ class editorModel extends editor
|
|||
else $option->enable_default_component = true;
|
||||
// Permisshion check for using extended components
|
||||
$option->enable_component = false;
|
||||
if(count($config->enable_component_grant))
|
||||
if($logged_info->is_admin=='Y') $option->enable_component = true;
|
||||
elseif(count($config->enable_component_grant))
|
||||
{
|
||||
foreach($group_list as $group_srl => $group_info)
|
||||
{
|
||||
|
|
@ -421,7 +424,8 @@ class editorModel extends editor
|
|||
else $option->enable_component = true;
|
||||
// HTML editing privileges
|
||||
$enable_html = false;
|
||||
if(count($config->enable_html_grant))
|
||||
if($logged_info->is_admin=='Y') $enable_html = true;
|
||||
elseif(count($config->enable_html_grant))
|
||||
{
|
||||
foreach($group_list as $group_srl => $group_info)
|
||||
{
|
||||
|
|
@ -747,18 +751,77 @@ class editorModel extends editor
|
|||
}
|
||||
|
||||
// List extra variables (text type only for editor component)
|
||||
$extra_vars = $xml_doc->component->extra_vars->var;
|
||||
$extra_vars = $xml_doc->component->extra_vars;
|
||||
if($extra_vars)
|
||||
{
|
||||
if(!is_array($extra_vars)) $extra_vars = array($extra_vars);
|
||||
|
||||
foreach($extra_vars as $key => $val)
|
||||
$extra_var_groups = $extra_vars->group;
|
||||
if(!$extra_var_groups)
|
||||
{
|
||||
$key = $val->attrs->name;
|
||||
$extra_var = new stdClass;
|
||||
$extra_var->title = $val->title->body;
|
||||
$extra_var->description = $val->description->body;
|
||||
$component_info->extra_vars->{$key} = $extra_var;
|
||||
$extra_var_groups = $extra_vars;
|
||||
}
|
||||
if(!is_array($extra_var_groups))
|
||||
{
|
||||
$extra_var_groups = array($extra_var_groups);
|
||||
}
|
||||
|
||||
foreach($extra_var_groups as $group)
|
||||
{
|
||||
$extra_vars = $group->var;
|
||||
if(!is_array($group->var))
|
||||
{
|
||||
$extra_vars = array($group->var);
|
||||
}
|
||||
|
||||
foreach($extra_vars as $key => $val)
|
||||
{
|
||||
if(!$val)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$obj = new stdClass();
|
||||
if(!$val->attrs)
|
||||
{
|
||||
$val->attrs = new stdClass();
|
||||
}
|
||||
if(!$val->attrs->type)
|
||||
{
|
||||
$val->attrs->type = 'text';
|
||||
}
|
||||
|
||||
$obj->group = $group->title->body;
|
||||
$obj->name = $val->attrs->name;
|
||||
$obj->title = $val->title->body;
|
||||
$obj->type = $val->attrs->type;
|
||||
$obj->description = $val->description->body;
|
||||
if($obj->name)
|
||||
{
|
||||
$obj->value = $extra_vals->{$obj->name};
|
||||
}
|
||||
if(strpos($obj->value, '|@|') != FALSE)
|
||||
{
|
||||
$obj->value = explode('|@|', $obj->value);
|
||||
}
|
||||
if($obj->type == 'mid_list' && !is_array($obj->value))
|
||||
{
|
||||
$obj->value = array($obj->value);
|
||||
}
|
||||
|
||||
// 'Select'type obtained from the option list.
|
||||
if($val->options && !is_array($val->options))
|
||||
{
|
||||
$val->options = array($val->options);
|
||||
}
|
||||
|
||||
for($i = 0, $c = count($val->options); $i < $c; $i++)
|
||||
{
|
||||
$obj->options[$i] = new stdClass();
|
||||
$obj->options[$i]->title = $val->options[$i]->title->body;
|
||||
$obj->options[$i]->value = $val->options[$i]->attrs->value;
|
||||
}
|
||||
|
||||
$component_info->extra_vars->{$obj->name} = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5205,6 +5205,8 @@ xe.XE_XHTMLFormatter = $.Class({
|
|||
tag = tag.toLowerCase();
|
||||
attrs = $.trim(attrs || '');
|
||||
|
||||
if(replace_tags[tag]!=undefined) tag = replace_tags[tag];
|
||||
|
||||
if (!closing) {
|
||||
if ($.inArray(tag,no_closing_tags) >= 0) {
|
||||
var len = attrs.length;
|
||||
|
|
@ -5490,7 +5492,7 @@ xe.XE_Table = $.Class({
|
|||
|
||||
// 첫번째 셀 가로 확장
|
||||
var colspan = 0;
|
||||
cell.eq(0).nextAll('td,th').andSelf().filter('.xe_selected_cell').each(function(idx){
|
||||
cell.eq(0).nextAll('td,th').addBack().filter('.xe_selected_cell').each(function(idx){
|
||||
colspan += self._getSpan(this, 'col');
|
||||
});
|
||||
|
||||
|
|
@ -5683,7 +5685,7 @@ xe.XE_Table = $.Class({
|
|||
|
||||
_mousedown : function(event) {
|
||||
var cur = $(event.target);
|
||||
var sel = cur.parents().andSelf().filter('td,th,table');
|
||||
var sel = cur.parents().addBack().filter('td,th,table');
|
||||
var app = this.oApp;
|
||||
var self = this;
|
||||
|
||||
|
|
@ -5698,7 +5700,7 @@ xe.XE_Table = $.Class({
|
|||
function delayed(){
|
||||
sel = app.getSelection().cloneRange();
|
||||
sel.collapseToStart();
|
||||
sel = $(sel.startContainer).parents().andSelf().filter('td,th').eq(0);
|
||||
sel = $(sel.startContainer).parents().addBack().filter('td,th').eq(0);
|
||||
|
||||
if (!sel.length) return self._removeAllListener()||true;
|
||||
|
||||
|
|
@ -5724,7 +5726,7 @@ xe.XE_Table = $.Class({
|
|||
|
||||
_mousemove : function(event) {
|
||||
var cur = $(event.target);
|
||||
var cell = cur.parents().andSelf().filter('td,th').eq(0);
|
||||
var cell = cur.parents().addBack().filter('td,th').eq(0);
|
||||
var self = this;
|
||||
|
||||
// 마우스 왼쪽 버튼이 눌리지 않았으면 종료
|
||||
|
|
|
|||
|
|
@ -5210,6 +5210,8 @@ xe.XE_XHTMLFormatter = $.Class({
|
|||
tag = tag.toLowerCase();
|
||||
attrs = $.trim(attrs || '');
|
||||
|
||||
if(replace_tags[tag]!=undefined) tag = replace_tags[tag];
|
||||
|
||||
if (!closing) {
|
||||
if ($.inArray(tag,no_closing_tags) >= 0) {
|
||||
var len = attrs.length;
|
||||
|
|
@ -5495,7 +5497,7 @@ xe.XE_Table = $.Class({
|
|||
|
||||
// 첫번째 셀 가로 확장
|
||||
var colspan = 0;
|
||||
cell.eq(0).nextAll('td,th').andSelf().filter('.xe_selected_cell').each(function(idx){
|
||||
cell.eq(0).nextAll('td,th').addBack().filter('.xe_selected_cell').each(function(idx){
|
||||
colspan += self._getSpan(this, 'col');
|
||||
});
|
||||
|
||||
|
|
@ -5688,7 +5690,7 @@ xe.XE_Table = $.Class({
|
|||
|
||||
_mousedown : function(event) {
|
||||
var cur = $(event.target);
|
||||
var sel = cur.parents().andSelf().filter('td,th,table');
|
||||
var sel = cur.parents().addBack().filter('td,th,table');
|
||||
var app = this.oApp;
|
||||
var self = this;
|
||||
|
||||
|
|
@ -5703,7 +5705,7 @@ xe.XE_Table = $.Class({
|
|||
function delayed(){
|
||||
sel = app.getSelection().cloneRange();
|
||||
sel.collapseToStart();
|
||||
sel = $(sel.startContainer).parents().andSelf().filter('td,th').eq(0);
|
||||
sel = $(sel.startContainer).parents().addBack().filter('td,th').eq(0);
|
||||
|
||||
if (!sel.length) return self._removeAllListener()||true;
|
||||
|
||||
|
|
@ -5729,7 +5731,7 @@ xe.XE_Table = $.Class({
|
|||
|
||||
_mousemove : function(event) {
|
||||
var cur = $(event.target);
|
||||
var cell = cur.parents().andSelf().filter('td,th').eq(0);
|
||||
var cell = cur.parents().addBack().filter('td,th').eq(0);
|
||||
var self = this;
|
||||
|
||||
// 마우스 왼쪽 버튼이 눌리지 않았으면 종료
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -208,6 +208,7 @@ function openComponent(component_name, editor_sequence, manual_url) {
|
|||
|
||||
var popup_url = request_uri+"?module=editor&act=dispEditorPopup&editor_sequence="+editor_sequence+"&component="+component_name;
|
||||
if(typeof(manual_url)!="undefined" && manual_url) popup_url += "&manual_url="+escape(manual_url);
|
||||
if(typeof(current_mid)!="undefined" && current_mid) popup_url += "&mid="+escape(current_mid);
|
||||
|
||||
popopen(popup_url, 'editorComponent');
|
||||
}
|
||||
|
|
|
|||
2
modules/editor/tpl/js/editor_common.min.js
vendored
2
modules/editor/tpl/js/editor_common.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -333,7 +333,7 @@ function previewFiles(event, file_srl) {
|
|||
var $opt, $select, $preview, fileinfo, filename, match, html, $=jQuery;
|
||||
|
||||
if(!file_srl) {
|
||||
$opt = $(event.target).parent().andSelf().filter('select').find('>option:selected');
|
||||
$opt = $(event.target).parent().addBack().filter('select').find('>option:selected');
|
||||
if(!$opt.length) return;
|
||||
|
||||
file_srl = $opt.attr('value');
|
||||
|
|
|
|||
|
|
@ -32,13 +32,29 @@
|
|||
<a href="#" onclick="winopen('{$component->link}');return false;">{$component->link}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" loop="$component->extra_vars=>$key,$val">
|
||||
<label class="x_control-label">{$val->title}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="{$key}" value="{$val->value}" />
|
||||
<span class="x_help-block">{$val->description}</span>
|
||||
</div>
|
||||
</div>
|
||||
<block cond="count($component->extra_vars)">
|
||||
<block loop="$component->extra_vars => $id, $var">
|
||||
<block cond="$group != $var->group">
|
||||
<h2>{$var->group}</h2>
|
||||
{@$group = $var->group}
|
||||
</block>
|
||||
{@$not_first = true}
|
||||
<div class="x_control-group" cond="!$not_first && $group != $var->group"></div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="{$var->name}"|cond="$var->type != 'textarea'" for="lang_{$var->name}"|cond="$var->type == 'textarea'">{$var->title}</label>
|
||||
<div class="x_controls">
|
||||
<input cond="$var->type == 'text'" type="text" name="{$var->name}" id="{$var->name}" value="{htmlspecialchars($var->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}">
|
||||
<textarea cond="$var->type == 'textarea'" name="{$var->name}" id="{$var->name}" rows="8" cols="42">{htmlspecialchars($var->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</textarea>
|
||||
<select cond="$var->type == 'select'" name="{$var->name}" id="{$var->name}">
|
||||
<option loop="$var->options => $option" value="{$option->value}" selected="selected"|cond="$var->value == $option->value">{$option->title}</option>
|
||||
</select>
|
||||
<span class="x_help-inline">{nl2br($var->description)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
</block>
|
||||
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->grant}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class fileAdminView extends file
|
|||
// Get a list
|
||||
$oFileAdminModel = getAdminModel('file');
|
||||
$columnList = array('file_srl', 'upload_target_srl', 'upload_target_type', 'sid', 'module_srl'
|
||||
, 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'ipaddress', 'member.member_srl', 'member.nick_name');
|
||||
, 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'ipaddress', 'member.member_srl', 'member.nick_name', 'uploaded_filename');
|
||||
$output = $oFileAdminModel->getFileList($args, $columnList);
|
||||
// Get the document for looping a list
|
||||
if($output->data)
|
||||
|
|
|
|||
|
|
@ -764,7 +764,7 @@ class fileController extends file
|
|||
$oDocumentController = getController('document');
|
||||
$documentSrlList = array();
|
||||
|
||||
for($i=0;$i<count($srls);$i++)
|
||||
for($i=0, $c=count($srls); $i<$c; $i++)
|
||||
{
|
||||
$srl = (int)$srls[$i];
|
||||
if(!$srl) continue;
|
||||
|
|
@ -818,29 +818,33 @@ class fileController extends file
|
|||
{
|
||||
// Get a list of attachements
|
||||
$oFileModel = getModel('file');
|
||||
$columnList = array('uploaded_filename', 'module_srl');
|
||||
$columnList = array('file_srl', 'uploaded_filename', 'module_srl');
|
||||
$file_list = $oFileModel->getFiles($upload_target_srl, $columnList);
|
||||
// Success returned if no attachement exists
|
||||
if(!is_array($file_list)||!count($file_list)) return new Object();
|
||||
|
||||
// Remove from the DB
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = executeQuery('file.deleteFiles', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// Delete the file
|
||||
$path = array();
|
||||
$file_count = count($file_list);
|
||||
for($i=0;$i<$file_count;$i++)
|
||||
{
|
||||
$uploaded_filename = $file_list[$i]->uploaded_filename;
|
||||
FileHandler::removeFile($uploaded_filename);
|
||||
$module_srl = $file_list[$i]->module_srl;
|
||||
$this->deleteFile($file_list[$i]->file_srl);
|
||||
|
||||
$uploaded_filename = $file_list[$i]->uploaded_filename;
|
||||
$path_info = pathinfo($uploaded_filename);
|
||||
if(!in_array($path_info['dirname'], $path)) $path[] = $path_info['dirname'];
|
||||
}
|
||||
// Remove a file directory of the document
|
||||
for($i=0;$i<count($path);$i++) FileHandler::removeBlankDir($path[$i]);
|
||||
for($i=0, $c=count($path); $i<$c; $i++)
|
||||
{
|
||||
FileHandler::removeBlankDir($path[$i]);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,7 +238,9 @@ class fileModel extends file
|
|||
|
||||
if($logged_info->is_admin == 'Y')
|
||||
{
|
||||
$file_config->allowed_filesize = preg_replace("/[a-z]/is","",ini_get('upload_max_filesize'));
|
||||
$size = preg_replace('/[a-z]/is', '', ini_get('upload_max_filesize'));
|
||||
$file_config->allowed_attach_size = $size;
|
||||
$file_config->allowed_filesize = $size;
|
||||
$file_config->allowed_filetypes = '*.*';
|
||||
}
|
||||
return $file_config;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,10 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<!--@endif-->
|
||||
<!-- one document end -->
|
||||
<tr>
|
||||
<td><a href="{htmlspecialchars_decode($val->download_url)}">{htmlspecialchars($val->source_filename, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</a></td>
|
||||
<td> <!--@if(preg_match("/\.(jpg|png|bmp|jpeg|gif)$/i",strtolower($val->source_filename)))-->
|
||||
<img src="{$val->uploaded_filename}" style="width:50px; height:50px">
|
||||
<!--@end-->
|
||||
<a href="{htmlspecialchars_decode($val->download_url)}">{htmlspecialchars($val->source_filename, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</a></td>
|
||||
<td class="nowr">{FileHandler::filesize($val->file_size)}</td>
|
||||
<td class="nowr">{$val->download_count}</td>
|
||||
<td class="nowr">
|
||||
|
|
|
|||
|
|
@ -327,9 +327,17 @@ class installAdminController extends install
|
|||
|
||||
private function saveIconTmp($icon, $iconname)
|
||||
{
|
||||
|
||||
$site_info = Context::get('site_module_info');
|
||||
$virtual_site = '';
|
||||
if($site_info->site_srl)
|
||||
{
|
||||
$virtual_site = $site_info->site_srl . '/';
|
||||
}
|
||||
|
||||
$target_file = $icon['tmp_name'];
|
||||
$type = $icon['type'];
|
||||
$relative_filename = 'files/attach/xeicon/tmp/'.$iconname;
|
||||
$relative_filename = 'files/attach/xeicon/'.$virtual_site.'tmp/'.$iconname;
|
||||
$target_filename = _XE_PATH_.$relative_filename;
|
||||
|
||||
list($width, $height, $type_no, $attrs) = @getimagesize($target_file);
|
||||
|
|
@ -364,7 +372,15 @@ class installAdminController extends install
|
|||
}
|
||||
|
||||
private function updateIcon($iconname, $deleteIcon = false) {
|
||||
$image_filepath = _XE_PATH_.'files/attach/xeicon/';
|
||||
|
||||
$site_info = Context::get('site_module_info');
|
||||
$virtual_site = '';
|
||||
if($site_info->site_srl)
|
||||
{
|
||||
$virtual_site = $site_info->site_srl . '/';
|
||||
}
|
||||
|
||||
$image_filepath = _XE_PATH_.'files/attach/xeicon/' . $virtual_site;
|
||||
|
||||
if($deleteIcon) {
|
||||
FileHandler::removeFile($image_filepath.$iconname);
|
||||
|
|
|
|||
|
|
@ -225,7 +225,8 @@ class installController extends install
|
|||
);
|
||||
$db_info->slave_db = array($db_info->master_db);
|
||||
$db_info->default_url = Context::getRequestUri();
|
||||
$db_info->lang_type = Context::getLangType();
|
||||
$db_info->lang_type = Context::get('lang_type') ? Context::get('lang_type') : Context::getLangType();
|
||||
Context::setLangType($db_info->lang_type);
|
||||
$db_info->use_rewrite = Context::get('use_rewrite');
|
||||
$db_info->time_zone = Context::get('time_zone');
|
||||
|
||||
|
|
@ -388,26 +389,26 @@ class installController extends install
|
|||
|
||||
FileHandler::writeFile(_XE_PATH_.$checkFilePath, trim($checkString));
|
||||
|
||||
$scheme = $_SERVER['REQUEST_SCHEME'];
|
||||
$hostname = $_SERVER['SERVER_NAME'];
|
||||
$port = $_SERVER['SERVER_PORT'];
|
||||
$str_port = '';
|
||||
if($port)
|
||||
{
|
||||
$str_port = ':' . $port;
|
||||
}
|
||||
|
||||
$query = "/JUST/CHECK/REWRITE/" . $checkFilePath;
|
||||
$currentPath = str_replace($_SERVER['DOCUMENT_ROOT'], "", _XE_PATH_);
|
||||
if($currentPath != "")
|
||||
{
|
||||
$query = $currentPath . $query;
|
||||
|
||||
$fp = @fsockopen($hostname, $port, $errno, $errstr, 5);
|
||||
if(!$fp) return false;
|
||||
|
||||
fputs($fp, "GET {$query} HTTP/1.0\r\n");
|
||||
fputs($fp, "Host: {$hostname}\r\n\r\n");
|
||||
|
||||
$buff = '';
|
||||
while(!feof($fp)) {
|
||||
$str = fgets($fp, 1024);
|
||||
if(trim($str)=='') $start = true;
|
||||
if($start) $buff .= $str;
|
||||
}
|
||||
fclose($fp);
|
||||
|
||||
$requestUrl = sprintf('%s://%s%s%s', $scheme, $hostname, $str_port, $query);
|
||||
$requestConfig = array();
|
||||
$requestConfig['ssl_verify_peer'] = false;
|
||||
$buff = FileHandler::getRemoteResource($requestUrl, null, 10, 'POST', 'application/x-www-form-urlencoded', array(), array(), array(), $requestConfig);
|
||||
|
||||
FileHandler::removeFile(_XE_PATH_.$checkFilePath);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,27 @@ class installView extends install
|
|||
$install_config_file = FileHandler::getRealPath('./config/install.config.php');
|
||||
if(file_exists($install_config_file))
|
||||
{
|
||||
/**
|
||||
* If './config/install.config.php' file created and write array shown in the example below, XE installed using config file.
|
||||
* ex )
|
||||
$install_config = array(
|
||||
'db_type' =>'mysqli_innodb',
|
||||
'db_port' =>'3306',
|
||||
'db_hostname' =>'localhost',
|
||||
'db_userid' =>'root',
|
||||
'db_password' =>'root',
|
||||
'db_database' =>'xe_database',
|
||||
'db_table_prefix' =>'xe',
|
||||
'user_rewrite' =>'N',
|
||||
'time_zone' =>'0000',
|
||||
'email_address' =>'admin@xe.com',
|
||||
'password' =>'pass',
|
||||
'password2' =>'pass',
|
||||
'nick_name' =>'admin',
|
||||
'user_id' =>'admin',
|
||||
'lang_type' =>'ko', // en, jp, ...
|
||||
);
|
||||
*/
|
||||
include $install_config_file;
|
||||
if(is_array($install_config))
|
||||
{
|
||||
|
|
@ -124,6 +145,19 @@ class installView extends install
|
|||
|
||||
$title = sprintf(Context::getLang('input_dbinfo_by_dbtype'), Context::get('db_type'));
|
||||
Context::set('title', $title);
|
||||
|
||||
$error_return_url = getNotEncodedUrl('', 'act', Context::get('act'), 'db_type', Context::get('db_type'));
|
||||
if($_SERVER['HTTPS'] == 'on')
|
||||
{
|
||||
// Error occured when using https protocol at "ModuleHandler::init() '
|
||||
$parsedUrl = parse_url($error_return_url);
|
||||
$error_return_url = '';
|
||||
if(isset($parsedUrl['path'])) $error_return_url .= $parsedUrl['path'];
|
||||
if(isset($parsedUrl['query'])) $error_return_url .= '?' . $parsedUrl['query'];
|
||||
if(isset($parsedUrl['fragment'])) $error_return_url .= '?' . $parsedUrl['fragment'];
|
||||
}
|
||||
Context::set('error_return_url', $error_return_url);
|
||||
|
||||
$this->setTemplateFile($tpl_filename);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
// ko/en/...
|
||||
$lang = Context::getLangType();
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// insertMenu
|
||||
$oMenuAdminController = getAdminController('menu'); /* @var $oMenuAdminController menuAdminController */
|
||||
|
|
@ -114,20 +115,27 @@ $oDocumentModel = getModel('document'); /* @var $oDocumentModel documentModel */
|
|||
$oDocumentController = getController('document'); /* @var $oDocumentController documentController */
|
||||
|
||||
$obj = new stdClass;
|
||||
|
||||
$obj->member_srl = $logged_info->member_srl;
|
||||
$obj->user_id = htmlspecialchars_decode($logged_info->user_id);
|
||||
$obj->user_name = htmlspecialchars_decode($logged_info->user_name);
|
||||
$obj->nick_name = htmlspecialchars_decode($logged_info->nick_name);
|
||||
$obj->email_address = $logged_info->email_address;
|
||||
|
||||
$obj->module_srl = $module_srl;
|
||||
Context::set('version', __XE_VERSION__);
|
||||
$obj->title = 'Welcome XE';
|
||||
|
||||
$obj->content = $oTemplateHandler->compile(_XE_PATH_ . 'modules/install/script/welcome_content', 'welcome_content_'.$lang);
|
||||
|
||||
$output = $oDocumentController->insertDocument($obj);
|
||||
$output = $oDocumentController->insertDocument($obj, true);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$document_srl = $output->get('document_srl');
|
||||
|
||||
unset($obj->document_srl);
|
||||
$obj->title = 'Welcome mobile XE';
|
||||
$output = $oDocumentController->insertDocument($obj);
|
||||
$output = $oDocumentController->insertDocument($obj, true);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// save PageWidget
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form rule="cubrid" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
|
||||
<input type="hidden" value="{$error_return_url}" name="error_return_url">
|
||||
<input type="hidden" name="act" value="procCubridDBSetting" />
|
||||
<input type="hidden" name="db_type" value="{$db_type}" />
|
||||
<h2>{$title}</h2>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form rule="mssql" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
|
||||
<input type="hidden" value="{$error_return_url}" name="error_return_url">
|
||||
<input type="hidden" name="act" value="procMssqlDBSetting" />
|
||||
<input type="hidden" name="db_type" value="{$db_type}" />
|
||||
<h2>{$title}</h2>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form rule="mysql" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
|
||||
<input type="hidden" value="{$error_return_url}" name="error_return_url">
|
||||
<input type="hidden" name="act" value="procMysqlDBSetting" />
|
||||
<input type="hidden" name="db_type" value="{$db_type}" />
|
||||
<h2>{$title}</h2>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form rule="mysql" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
|
||||
<input type="hidden" value="{$error_return_url}" name="error_return_url">
|
||||
<input type="hidden" name="act" value="procMysqlDBSetting" />
|
||||
<input type="hidden" name="db_type" value="{$db_type}" />
|
||||
<h2>{$title}</h2>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form rule="mysql" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
|
||||
<input type="hidden" value="{$error_return_url}" name="error_return_url">
|
||||
<input type="hidden" name="act" value="procMysqlDBSetting" />
|
||||
<input type="hidden" name="db_type" value="{$db_type}" />
|
||||
<h2>{$title}</h2>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form rule="mysql" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" value="{getUrl('', 'act', $act, 'db_type', $db_type)}" name="error_return_url">
|
||||
<input type="hidden" value="{$error_return_url}" name="error_return_url">
|
||||
<input type="hidden" name="act" value="procMysqlDBSetting" />
|
||||
<input type="hidden" name="db_type" value="{$db_type}" />
|
||||
<h2>{$title}</h2>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class integration_searchAdminController extends integration_search
|
|||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
$args = new stdClass;
|
||||
$args->skin = Context::get('skin');
|
||||
$args->target = Context::get('target');
|
||||
$args->target_module_srl = Context::get('target_module_srl');
|
||||
|
|
@ -51,6 +52,7 @@ class integration_searchAdminController extends integration_search
|
|||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
$args = new stdClass;
|
||||
$args->skin = $config->skin;
|
||||
$args->target_module_srl = $config->target_module_srl;
|
||||
// Get skin information (to check extra_vars)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
<!--// 컬러셋 체크 -->
|
||||
<!--@if($module_info->colorset != "white")-->
|
||||
{@if(!is_object($module_info)) $module_info = new stdClass;}
|
||||
{@$module_info->colorset = "white"}
|
||||
<!--@end-->
|
||||
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ class layoutAdminController extends layout
|
|||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$start_module = $oModuleModel->getSiteInfo(0, $columnList);
|
||||
$tmpArgs = new stdClass;
|
||||
$tmpArgs->url = $start_module->mid;
|
||||
$tmpArgs->site_srl = 0;
|
||||
$output = executeQuery('menu.getMenuItemByUrl', $tmpArgs);
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ class layoutModel extends layout
|
|||
// Include the cache file if it is valid and then return $layout_info variable
|
||||
if(!$layout_srl)
|
||||
{
|
||||
$cache_file = $this->getLayoutCache($layout, Context::getLangType());
|
||||
$cache_file = $this->getLayoutCache($layout, Context::getLangType(), $layout_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -896,9 +896,16 @@ class layoutModel extends layout
|
|||
* @param string $lang_type
|
||||
* @return string
|
||||
*/
|
||||
function getLayoutCache($layout_name,$lang_type)
|
||||
function getLayoutCache($layout_name,$lang_type,$layout_type='P')
|
||||
{
|
||||
return sprintf("%sfiles/cache/layout/%s.%s.cache.php", _XE_PATH_, $layout_name,$lang_type);
|
||||
if($layout_type=='P')
|
||||
{
|
||||
return sprintf("%sfiles/cache/layout/%s.%s.cache.php", _XE_PATH_, $layout_name,$lang_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
return sprintf("%sfiles/cache/layout/m.%s.%s.cache.php", _XE_PATH_, $layout_name,$lang_type);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1325,6 +1325,9 @@
|
|||
<value xml:lang="tr"><![CDATA[%s adresine etkinleştirme maili gönderdik. Lütfen mailinizi kontrol ediniz.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Chúng tôi đã gửi Email xác nhận đến %s. Xin vui lòng bấm vào Link đi kèm trong Email để hoàn tất việc đăng kí!]]></value>
|
||||
</item>
|
||||
<item name="msg_change_mail_sent">
|
||||
<value xml:lang="ko"><![CDATA[%s 메일로 이메일 변경 인증 메일이 발송되었습니다. 메일을 확인하세요.]]></value>
|
||||
</item>
|
||||
<item name="msg_invalid_modify_email_auth_key">
|
||||
<value xml:lang="ko"><![CDATA[잘못된 이메일 변경 요청입니다.<br />이메일 변경요청을 다시 하거나 사이트 관리자에게 문의해주세요.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[正しくないEメール変更要求です。<br />Eメール変更要求を再度行うかサイト管理者へお問い合わせください。]]></value>
|
||||
|
|
|
|||
|
|
@ -1109,6 +1109,11 @@ class memberAdminController extends member
|
|||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
||||
if(!isset($args->list_order) || $args->list_order=='')
|
||||
{
|
||||
$args->list_order = $args->group_srl;
|
||||
}
|
||||
|
||||
if(!$args->group_srl) $args->group_srl = getNextSequence();
|
||||
$output = executeQuery('member.insertGroup', $args);
|
||||
$this->_deleteMemberGroupCache($args->site_srl);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class memberAdminView extends member
|
|||
}
|
||||
}
|
||||
$config = $this->memberConfig;
|
||||
$memberIdentifiers = array('email_address'=>'email_address', 'user_id'=>'user_id', 'user_name'=>'user_name', 'nick_name'=>'nick_name');
|
||||
$memberIdentifiers = array('user_id'=>'user_id', 'user_name'=>'user_name', 'nick_name'=>'nick_name');
|
||||
$usedIdentifiers = array();
|
||||
|
||||
if(is_array($config->signupForm))
|
||||
|
|
@ -582,6 +582,7 @@ class memberAdminView extends member
|
|||
{
|
||||
$template = '<select name="'.$formInfo->name.'" id="'.$formInfo->name.'">%s</select>';
|
||||
$optionTag = array();
|
||||
$optionTag[] = sprintf('<option value="">%s</option>', $lang->cmd_select);
|
||||
if($extendForm->default_value)
|
||||
{
|
||||
foreach($extendForm->default_value as $v)
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ class member extends ModuleObject {
|
|||
if(!$config->image_name_max_height) $config->image_name_max_height = '20';
|
||||
if(!$config->image_mark_max_width) $config->image_mark_max_width = '20';
|
||||
if(!$config->image_mark_max_height) $config->image_mark_max_height = '20';
|
||||
if(!$config->profile_image_max_width) $config->profile_image_max_width = '80';
|
||||
if(!$config->profile_image_max_height) $config->profile_image_max_height = '80';
|
||||
if(!$config->profile_image_max_width) $config->profile_image_max_width = '90';
|
||||
if(!$config->profile_image_max_height) $config->profile_image_max_height = '90';
|
||||
if($config->group_image_mark!='Y') $config->group_image_mark = 'N';
|
||||
if(!$config->password_strength) $config->password_strength = 'normal';
|
||||
|
||||
|
|
|
|||
|
|
@ -230,8 +230,7 @@ class memberController extends member
|
|||
}
|
||||
// Check if duplicated
|
||||
$member_srl = $oMemberModel->getMemberSrlByNickName($value);
|
||||
$member_srl_by_decode = $oMemberModel->getMemberSrlByNickName(utf8_decode($value));
|
||||
if(($member_srl && $logged_info->member_srl != $member_srl ) || ($member_srl_by_decode && $logged_info->member_srl != $member_srl_by_decode )) return new Object(0,'msg_exists_nick_name');
|
||||
if($member_srl && $logged_info->member_srl != $member_srl ) return new Object(0,'msg_exists_nick_name');
|
||||
|
||||
break;
|
||||
case 'email_address' :
|
||||
|
|
@ -706,13 +705,14 @@ class memberController extends member
|
|||
// Check uploaded file
|
||||
if(!checkUploadedFile($target_file)) return;
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('member');
|
||||
$oMemberModel = getModel('member');
|
||||
$config = $oMemberModel->getMemberConfig();
|
||||
|
||||
// Get an image size
|
||||
$max_width = $config->profile_image_max_width;
|
||||
if(!$max_width) $max_width = "90";
|
||||
$max_height = $config->profile_image_max_height;
|
||||
if(!$max_height) $max_height = "20";
|
||||
if(!$max_height) $max_height = "90";
|
||||
// Get a target path to save
|
||||
$target_path = sprintf('files/member_extra_info/profile_image/%s', getNumberingPath($member_srl));
|
||||
FileHandler::makeDir($target_path);
|
||||
|
|
@ -1009,7 +1009,7 @@ class memberController extends member
|
|||
$oMail->setTitle( Context::getLang('msg_find_account_title') );
|
||||
$oMail->setContent($content);
|
||||
$oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email);
|
||||
$oMail->setReceiptor( $member_info->user_name, $member_info->email_address );
|
||||
$oMail->setReceiptor( $member_info->nick_name, $member_info->email_address );
|
||||
$oMail->send();
|
||||
// Return message
|
||||
$msg = sprintf(Context::getLang('msg_auth_mail_sent'), $member_info->email_address);
|
||||
|
|
@ -1181,7 +1181,7 @@ class memberController extends member
|
|||
$oMail->setTitle( Context::getLang('msg_confirm_account_title') );
|
||||
$oMail->setContent($content);
|
||||
$oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email);
|
||||
$oMail->setReceiptor( $member_info->user_name, $member_info->email_address );
|
||||
$oMail->setReceiptor( $member_info->nick_name, $member_info->email_address );
|
||||
$oMail->send();
|
||||
// Return message
|
||||
$msg = sprintf(Context::getLang('msg_auth_mail_sent'), $member_info->email_address);
|
||||
|
|
@ -1264,7 +1264,7 @@ class memberController extends member
|
|||
$oMail->setTitle( Context::getLang('msg_confirm_account_title') );
|
||||
$oMail->setContent($content);
|
||||
$oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email);
|
||||
$oMail->setReceiptor( $args->user_name, $args->email_address );
|
||||
$oMail->setReceiptor( $args->email_address, $args->email_address );
|
||||
$oMail->send();
|
||||
|
||||
$msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $args->email_address);
|
||||
|
|
@ -1391,7 +1391,7 @@ class memberController extends member
|
|||
$oMail->setTitle( Context::getLang('msg_confirm_account_title') );
|
||||
$oMail->setContent($content);
|
||||
$oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email);
|
||||
$oMail->setReceiptor( $member_info->user_name, $member_info->email_address );
|
||||
$oMail->setReceiptor( $member_info->nick_name, $member_info->email_address );
|
||||
$oMail->send();
|
||||
}
|
||||
|
||||
|
|
@ -1970,8 +1970,7 @@ class memberController extends member
|
|||
return new Object(-1,'denied_nick_name');
|
||||
}
|
||||
$member_srl = $oMemberModel->getMemberSrlByNickName($args->nick_name);
|
||||
$member_srl_by_decode = $oMemberModel->getMemberSrlByNickName(utf8_decode($args->nick_name));
|
||||
if($member_srl || $member_srl_by_decode) return new Object(-1,'msg_exists_nick_name');
|
||||
if($member_srl) return new Object(-1,'msg_exists_nick_name');
|
||||
|
||||
$member_srl = $oMemberModel->getMemberSrlByEmailAddress($args->email_address);
|
||||
if($member_srl) return new Object(-1,'msg_exists_email_address');
|
||||
|
|
@ -2129,8 +2128,7 @@ class memberController extends member
|
|||
}
|
||||
|
||||
$member_srl = $oMemberModel->getMemberSrlByNickName($args->nick_name);
|
||||
$member_srl_by_decode = $oMemberModel->getMemberSrlByNickName(utf8_decode($args->nick_name));
|
||||
if(($member_srl || $member_srl_by_decode) && $orgMemberInfo->nick_name != $args->nick_name) return new Object(-1,'msg_exists_nick_name');
|
||||
if($member_srl && $orgMemberInfo->nick_name != $args->nick_name) return new Object(-1,'msg_exists_nick_name');
|
||||
|
||||
list($args->email_id, $args->email_host) = explode('@', $args->email_address);
|
||||
// Website, blog, checks the address
|
||||
|
|
@ -2462,7 +2460,7 @@ class memberController extends member
|
|||
$oMail->setReceiptor( $member_info->nick_name, $newEmail );
|
||||
$result = $oMail->send();
|
||||
|
||||
$msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $newEmail);
|
||||
$msg = sprintf(Context::getLang('msg_change_mail_sent'), $newEmail);
|
||||
$this->setMessage($msg);
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
|
||||
|
|
@ -2635,7 +2633,7 @@ class memberController extends member
|
|||
$spam_description = trim( Context::get('spam_description') );
|
||||
|
||||
$oMemberModel = getModel('member');
|
||||
$columnList = array('member_srl', 'description');
|
||||
$columnList = array('member_srl', 'email_address', 'user_id', 'nick_name', 'description');
|
||||
// get member current infomation
|
||||
$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList);
|
||||
|
||||
|
|
@ -2646,7 +2644,10 @@ class memberController extends member
|
|||
$total_count = $cnt_comment + $cnt_document;
|
||||
|
||||
$args = new stdClass();
|
||||
$args->member_srl= $member_info->member_srl;
|
||||
$args->member_srl = $member_info->member_srl;
|
||||
$args->email_address = $member_info->email_address;
|
||||
$args->user_id = $member_info->user_id;
|
||||
$args->nick_name = $member_info->nick_name;
|
||||
$args->denied = "Y";
|
||||
$args->description = trim( $member_info->description );
|
||||
if( $args->description != "" ) $args->description .= "\n"; // add new line
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ class memberModel extends member
|
|||
if(!$config->image_name_max_height) $config->image_name_max_height = 20;
|
||||
if(!$config->image_mark_max_width) $config->image_mark_max_width = 20;
|
||||
if(!$config->image_mark_max_height) $config->image_mark_max_height = 20;
|
||||
if(!$config->profile_image_max_width) $config->profile_image_max_width = 80;
|
||||
if(!$config->profile_image_max_height) $config->profile_image_max_height = 80;
|
||||
if(!$config->profile_image_max_width) $config->profile_image_max_width = 90;
|
||||
if(!$config->profile_image_max_height) $config->profile_image_max_height = 90;
|
||||
if(!$config->skin) $config->skin = 'default';
|
||||
if(!$config->colorset) $config->colorset = 'white';
|
||||
if(!$config->editor_skin || $config->editor_skin == 'default') $config->editor_skin = 'xpresseditor';
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class memberView extends member
|
|||
continue;
|
||||
}
|
||||
|
||||
if($memberInfo->member_srl != $logged_info->member_srl && $formInfo->isPublic != 'Y')
|
||||
if($logged_info->is_admin != 'Y' && $memberInfo->member_srl != $logged_info->member_srl && $formInfo->isPublic != 'Y')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<columns>
|
||||
<column name="site_srl" var="site_srl" default="0" notnull="notnull" />
|
||||
<column name="group_srl" var="group_srl" notnull="notnull" />
|
||||
<column name="list_order" var="group_srl" notnull="notnull" />
|
||||
<column name="list_order" var="list_order" notnull="notnull" />
|
||||
<column name="title" var="title" notnull="notnull" />
|
||||
<column name="is_default" var="is_default" default="N" notnull="notnull" />
|
||||
<column name="is_admin" var="is_admin" default="N" notnull="notnull" />
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="@login" action="{getUrl('')}" method="post" id="fo_member_login">
|
||||
<form ruleset="@login" action="{getUrl('', 'act', 'procMemberLogin')}" method="post" id="fo_member_login">
|
||||
<input type="hidden" name="success_return_url" value="{$referer_url}" />
|
||||
<input type="hidden" name="act" value="procMemberLogin" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/member/skins" />
|
||||
|
|
|
|||
16
modules/member/skins/default/resend_auth_mail.html
Normal file
16
modules/member/skins/default/resend_auth_mail.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<include target="./common_header.html" />
|
||||
<h1>{$lang->cmd_resend_auth_mail}</h1>
|
||||
<p>{$lang->about_resend_auth_mail}</p>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins/default/resend_auth_mail/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="resendAuthMail" class="form" action="./" method="post">
|
||||
<input type="hidden" name="module" value="member" />
|
||||
<input type="hidden" name="act" value="procMemberResendAuthMail" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/member/skins/default/resend_auth_mail/1" />
|
||||
<div class="input-append">
|
||||
<input type="text" id="email_address" name="email_address" value="" title="{$lang->email_address}" placeholder="{$lang->email_address}" />
|
||||
<input type="submit" id="resend_button" name="" value="{$lang->cmd_resend_auth_mail}" class="btn btn-inverse" />
|
||||
</div>
|
||||
</form>
|
||||
<include target="./common_footer.html" />
|
||||
|
|
@ -47,8 +47,8 @@
|
|||
</td>
|
||||
{@ $member_info['group_list'] = implode(', ', $member_info['group_list'])}
|
||||
<td class="nowr" loop="$usedIdentifiers=>$name,$title">{$member_info[$name]}</td>
|
||||
<td class="nowr">{zdate($member_info['regdate'], 'Y-m-d')}</td>
|
||||
<td class="nowr">{zdate($member_info['last_login'], 'Y-m-d')}</td>
|
||||
<td class="nowr" title="{zdate($member_info['regdate'], 'Y-m-d H:i:s')}">{zdate($member_info['regdate'], 'Y-m-d')}</td>
|
||||
<td class="nowr" title="{zdate($member_info['last_login'], 'Y-m-d H:i:s')}">{zdate($member_info['last_login'], 'Y-m-d')}</td>
|
||||
<td>{$member_info['group_list']} </td>
|
||||
<td class="nowr"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminInsert', 'member_srl', $member_info['member_srl'])}">{$lang->inquiry}/{$lang->cmd_modify}</a></td>
|
||||
{@$used_values = ''}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<textarea name="spam_description" id="spam_description" cols="400" rows="3"></textarea>
|
||||
</div>
|
||||
<div class="btn-proc" >
|
||||
<label for="to_trash"><input type="checkbox" name="to_trash" value="Y" checked="checked" id="to_trash" />{$lang->spammer_move_to_trash}</label>
|
||||
<label for="to_trash"><input type="checkbox" name="to_trash" value="Y" id="to_trash" />{$lang->spammer_move_to_trash}</label>
|
||||
<button class="x_btn x_btn-danger" type="submit"/>{$lang->btn_spammer_delete_all}</button>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -606,6 +606,12 @@ class menuAdminController extends menu
|
|||
$cmArgs->is_skin_fix = 'N';
|
||||
$cmArgs->is_mskin_fix = 'N';
|
||||
|
||||
$db_info = Context::getDBInfo();
|
||||
if($db_info->use_mobile_view == 'Y')
|
||||
{
|
||||
$cmArgs->use_mobile = 'Y';
|
||||
}
|
||||
|
||||
// if mid is empty, auto create mid
|
||||
if(!$request->module_id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@
|
|||
.undelegate(".jstree")
|
||||
.removeData("jstree-instance-id")
|
||||
.find("[class^='jstree']")
|
||||
.andSelf()
|
||||
.addBack()
|
||||
.attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); });
|
||||
$(document)
|
||||
.unbind(".jstree-" + n)
|
||||
|
|
@ -678,7 +678,7 @@
|
|||
}
|
||||
else {
|
||||
original_obj = obj;
|
||||
if(obj.is(".jstree-closed")) { obj = obj.find("li.jstree-closed").andSelf(); }
|
||||
if(obj.is(".jstree-closed")) { obj = obj.find("li.jstree-closed").addBack(); }
|
||||
else { obj = obj.find("li.jstree-closed"); }
|
||||
}
|
||||
var _this = this;
|
||||
|
|
@ -694,12 +694,12 @@
|
|||
var _this = this;
|
||||
obj = obj ? this._get_node(obj) : this.get_container();
|
||||
if(!obj || obj === -1) { obj = this.get_container_ul(); }
|
||||
obj.find("li.jstree-open").andSelf().each(function () { _this.close_node(this, !do_animation); });
|
||||
obj.find("li.jstree-open").addBack().each(function () { _this.close_node(this, !do_animation); });
|
||||
this.__callback({ "obj" : obj });
|
||||
},
|
||||
clean_node : function (obj) {
|
||||
obj = obj && obj != -1 ? $(obj) : this.get_container_ul();
|
||||
obj = obj.is("li") ? obj.find("li").andSelf() : obj.find("li");
|
||||
obj = obj.is("li") ? obj.find("li").addBack() : obj.find("li");
|
||||
obj.removeClass("jstree-last")
|
||||
.filter("li:last-child").addClass("jstree-last").end()
|
||||
.filter(":has(li)")
|
||||
|
|
@ -922,7 +922,7 @@
|
|||
if(!obj || !obj.o || obj.or[0] === obj.o[0]) { return false; }
|
||||
if(obj.op && obj.np && obj.op[0] === obj.np[0] && obj.cp - 1 === obj.o.index()) { return false; }
|
||||
obj.o.each(function () {
|
||||
if(r.parentsUntil(".jstree", "li").andSelf().index(this) !== -1) { ret = false; return false; }
|
||||
if(r.parentsUntil(".jstree", "li").addBack().index(this) !== -1) { ret = false; return false; }
|
||||
});
|
||||
return ret;
|
||||
},
|
||||
|
|
@ -941,7 +941,7 @@
|
|||
var o = false;
|
||||
if(is_copy) {
|
||||
o = obj.o.clone(true);
|
||||
o.find("*[id]").andSelf().each(function () {
|
||||
o.find("*[id]").addBack().each(function () {
|
||||
if(this.id) { this.id = "copy_" + this.id; }
|
||||
});
|
||||
}
|
||||
|
|
@ -1138,7 +1138,7 @@
|
|||
switch(!0) {
|
||||
case (is_range):
|
||||
this.data.ui.last_selected.addClass("jstree-last-selected");
|
||||
obj = obj[ obj.index() < this.data.ui.last_selected.index() ? "nextUntil" : "prevUntil" ](".jstree-last-selected").andSelf();
|
||||
obj = obj[ obj.index() < this.data.ui.last_selected.index() ? "nextUntil" : "prevUntil" ](".jstree-last-selected").addBack();
|
||||
if(s.select_limit == -1 || obj.length < s.select_limit) {
|
||||
this.data.ui.last_selected.removeClass("jstree-last-selected");
|
||||
this.data.ui.selected.each(function () {
|
||||
|
|
@ -1242,7 +1242,7 @@
|
|||
.bind("move_node.jstree", $.proxy(function (e, data) {
|
||||
if(this._get_settings().crrm.move.open_onmove) {
|
||||
var t = this;
|
||||
data.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function () {
|
||||
data.rslt.np.parentsUntil(".jstree").addBack().filter(".jstree-closed").each(function () {
|
||||
t.open_node(this, false, true);
|
||||
});
|
||||
}
|
||||
|
|
@ -2800,7 +2800,7 @@
|
|||
obj.each(function () {
|
||||
t = $(this);
|
||||
c = t.is("li") && (t.hasClass("jstree-checked") || (rc && t.children(":checked").length)) ? "jstree-checked" : "jstree-unchecked";
|
||||
t.find("li").andSelf().each(function () {
|
||||
t.find("li").addBack().each(function () {
|
||||
var $t = $(this), nm;
|
||||
$t.children("a" + (_this.data.languages ? "" : ":eq(0)") ).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'> </ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass( ts ? "jstree-unchecked" : c );
|
||||
if(rc) {
|
||||
|
|
@ -2844,13 +2844,13 @@
|
|||
}
|
||||
else {
|
||||
if(state) {
|
||||
coll = obj.find("li").andSelf();
|
||||
coll = obj.find("li").addBack();
|
||||
if(!coll.filter(".jstree-checked, .jstree-undetermined").length) { return false; }
|
||||
coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
|
||||
if(rc) { coll.children(":checkbox").removeAttr("checked"); }
|
||||
}
|
||||
else {
|
||||
coll = obj.find("li").andSelf();
|
||||
coll = obj.find("li").addBack();
|
||||
if(!coll.filter(".jstree-unchecked, .jstree-undetermined").length) { return false; }
|
||||
coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
|
||||
if(rc) { coll.children(":checkbox").attr("checked","checked"); }
|
||||
|
|
@ -2861,8 +2861,8 @@
|
|||
var $this = $(this);
|
||||
if(state) {
|
||||
if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length) {
|
||||
$this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").removeAttr("checked"); }
|
||||
$this.parentsUntil(".jstree", "li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { $this.parentsUntil(".jstree", "li").addBack().children(":checkbox").removeAttr("checked"); }
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
|
@ -2872,8 +2872,8 @@
|
|||
}
|
||||
else {
|
||||
if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length) {
|
||||
$this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").removeAttr("checked"); }
|
||||
$this.parentsUntil(".jstree", "li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { $this.parentsUntil(".jstree", "li").addBack().children(":checkbox").removeAttr("checked"); }
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
|
@ -2944,8 +2944,8 @@
|
|||
else if(a === 0 && b === 0) { this.change_state(obj, true); }
|
||||
else if(a === c) { this.change_state(obj, false); }
|
||||
else {
|
||||
obj.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { obj.parentsUntil(".jstree", "li").andSelf().children(":checkbox").removeAttr("checked"); }
|
||||
obj.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
|
||||
if(rc) { obj.parentsUntil(".jstree", "li").addBack().children(":checkbox").removeAttr("checked"); }
|
||||
}
|
||||
},
|
||||
reselect : function () {
|
||||
|
|
@ -3415,7 +3415,7 @@
|
|||
this.get_container()
|
||||
.bind("search.jstree", function (e, data) {
|
||||
$(this).children("ul").find("li").hide().removeClass("jstree-last");
|
||||
data.rslt.nodes.parentsUntil(".jstree").andSelf().show()
|
||||
data.rslt.nodes.parentsUntil(".jstree").addBack().show()
|
||||
.filter("ul").each(function () { $(this).children("li:visible").eq(-1).addClass("jstree-last"); });
|
||||
})
|
||||
.bind("clear_search.jstree", function () {
|
||||
|
|
@ -4001,7 +4001,7 @@
|
|||
// this used to use html() and clean the whitespace, but this way any attached data was lost
|
||||
this.data.html_data.original_container_html = this.get_container().find(" > ul > li").clone(true);
|
||||
// remove white space from LI node - otherwise nodes appear a bit to the right
|
||||
this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function() { return this.nodeType == 3; }).remove();
|
||||
this.data.html_data.original_container_html.find("li").addBack().contents().filter(function() { return this.nodeType == 3; }).remove();
|
||||
},
|
||||
defaults : {
|
||||
data : false,
|
||||
|
|
@ -4427,7 +4427,7 @@
|
|||
obj = !obj || obj == -1 ? this.get_container().find("> ul > li") : this._get_node(obj);
|
||||
if(obj === false) { return; } // added for removing root nodes
|
||||
obj.each(function () {
|
||||
$(this).find("li").andSelf().each(function () {
|
||||
$(this).find("li").addBack().each(function () {
|
||||
var $t = $(this);
|
||||
if($t.children(".jstree-wholerow-span").length) { return true; }
|
||||
$t.prepend("<span class='jstree-wholerow-span' style='width:" + ($t.parentsUntil(".jstree","li").length * 18) + "px;'> </span>");
|
||||
|
|
@ -4542,4 +4542,4 @@
|
|||
})(jQuery);
|
||||
//*/
|
||||
|
||||
})();
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ class messageMobile extends messageView
|
|||
// Get configurations (using module model object)
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('message');
|
||||
if(!is_object($config)) $config = new stdClass;
|
||||
if(!$config->mskin) $config->mskin = 'default';
|
||||
// Set the template path
|
||||
$template_path = sprintf('%sm.skins/%s', $this->module_path, $config->mskin);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -905,6 +905,18 @@
|
|||
<value xml:lang="tr"><![CDATA[Sayfanın alt kısmında sayfa geçiş linklerinin sayısını ayarlayabilirsiniz.(varsayılan : 10)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[bạn có thể giới hạn số trang liên kết hiển thị phía dưới.(Mặc định là 10)]]></value>
|
||||
</item>
|
||||
<item name="about_mobile_page_count">
|
||||
<value xml:lang="ko"><![CDATA[목록 하단, 페이지를 이동하는 링크 수를 지정할 수 있습니다. (기본 5개)]]></value>
|
||||
<value xml:lang="en"><![CDATA[You can set the number of page links to move pages in a bottom of the page. (default is 5)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[リスト下部、ページ移動可能なリンク数を指定できます(デフォルト5個)。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可以指定显示在目录下方的页面数(默认为5个)。 ]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[可以指定顯示在清單下方的頁面數(預設為 5 個)。 ]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez configurer combien de liens pour les Pages à Bouger en bas de chaque page.(5 par défaut)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Вы можете установить число страниц внизу. (по умолчанию: 5)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Usted puede definir el número de página enlazada para mover páginas en un botón de la página.(Predefinido es 5)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Sayfanın alt kısmında sayfa geçiş linklerinin sayısını ayarlayabilirsiniz.(varsayılan : 5)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[bạn có thể giới hạn số trang liên kết hiển thị phía dưới.(Mặc định là 5)]]></value>
|
||||
</item>
|
||||
<item name="about_admin_id">
|
||||
<value xml:lang="ko"><![CDATA[해당 모듈에 대해 최고 권한을 가지는 관리자를 지정할 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You can grant a manager to have all permissions to the module.]]></value>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue