mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
commit
7d9f6ff750
39 changed files with 790 additions and 512 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`파일을 참고하세요.
|
||||
|
|
|
|||
|
|
@ -368,6 +368,12 @@ class Context
|
|||
// check if using rewrite module
|
||||
$this->allow_rewrite = ($this->db_info->use_rewrite == 'Y' ? TRUE : FALSE);
|
||||
|
||||
// If using rewrite module, initializes router
|
||||
if($this->allow_rewrite)
|
||||
{
|
||||
Router::proc();
|
||||
}
|
||||
|
||||
// set locations for javascript use
|
||||
if($_SERVER['REQUEST_METHOD'] == 'GET')
|
||||
{
|
||||
|
|
@ -1561,7 +1567,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)
|
||||
|
|
|
|||
|
|
@ -548,7 +548,6 @@ class ModuleHandler extends Handler
|
|||
}
|
||||
|
||||
$xml_info = $oModuleModel->getModuleActionXml($forward->module);
|
||||
$oMemberModel = getModel('member');
|
||||
|
||||
if($this->module == "admin" && $type == "view")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
205
classes/router/Router.class.php
Normal file
205
classes/router/Router.class.php
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
<?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'),
|
||||
'([a-zA-Z0-9_]+)/(rss|atom|api)' => array('mid' => '$1', 'act' => '$2'),
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)' => array('vid' => '$1', 'mid' => '$2', 'act' => '$3'),
|
||||
// trackback
|
||||
'([0-9]+)/(.+)/trackback' => array('document_srl' => '$1', 'key' => '$2', 'act' => 'trackback'),
|
||||
'([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback' => array('mid' => '$1', 'document_srl' => '$2', 'key' => '$3', 'act' => 'trackback'),
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback' => array('vid' => '$1', 'mid' => '$2', 'document_srl' => '$3' , 'key' => '$4', 'act' => 'trackback'),
|
||||
// mid
|
||||
'([a-zA-Z0-9_]+)/?' => array('mid' => '$1'),
|
||||
// mid + document_srl
|
||||
'([a-zA-Z0-9_]+)/([0-9]+)' => array('mid' => '$1', 'document_srl' => '$2'),
|
||||
// vid + mid
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/' => array('vid' => '$1', 'mid' => '$2'),
|
||||
// vid + mid + document_srl
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)?' => array('vid' => '$1', 'mid' => '$2', 'document_srl' => '$3'),
|
||||
// document_srl
|
||||
'([0-9]+)' => array('document_srl' => '$1'),
|
||||
// mid + entry title
|
||||
'([a-zA-Z0-9_]+)/entry/(.+)' => array('mid' => '$1', 'entry' => '$2'),
|
||||
// vid + mid + entry title
|
||||
'([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)' => array('vid' => '$1', 'mid' => '$2', 'entry' => '$3'),
|
||||
// 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')
|
||||
);
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
$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);
|
||||
|
||||
// Remove the meanless segment
|
||||
unset(self::$segments[0]);
|
||||
}
|
||||
|
||||
if(isset(self::$routes[$path]))
|
||||
{
|
||||
foreach(self::$routes[$path] as $key => $val)
|
||||
{
|
||||
$val = preg_replace('#^\$([0-9]+)$#e', '\$matches[$1]', $val);
|
||||
|
||||
Context::set($key, $val, TRUE);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Apply routes
|
||||
foreach(self::$routes as $regex => $query)
|
||||
{
|
||||
if(preg_match('#^' . $regex . '$#', $path, $matches))
|
||||
{
|
||||
foreach($query as $key => $val)
|
||||
{
|
||||
$val = preg_replace('#^\$([0-9]+)$#e', '\$matches[$1]', $val);
|
||||
|
||||
Context::set($key, $val, 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];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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];
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
2
common/js/xe.min.js
vendored
2
common/js/xe.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -29,7 +29,7 @@ define('__ZBXE__', __XE__);
|
|||
/**
|
||||
* Display XE's full version.
|
||||
*/
|
||||
define('__XE_VERSION__', '1.7.5.3');
|
||||
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));
|
||||
|
|
@ -254,6 +254,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');
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -721,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')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
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
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -388,26 +388,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -124,6 +124,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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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' :
|
||||
|
|
@ -1970,8 +1969,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 +2127,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
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -27,6 +27,9 @@
|
|||
<input type="submit" value="{$lang->cmd_search}" class="x_btn" />
|
||||
</div>
|
||||
</div>
|
||||
<!--@if($module_category_exists)-->
|
||||
<!--@foreach($selected_mids as $key => $val)-->
|
||||
<h2 cond="$key" style="margin-top:40px;">{$key}</h2>
|
||||
<table class="x_table x_table-striped x_table-hover" style="border-top:1px dotted #ddd">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -36,32 +39,41 @@
|
|||
<tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@if($module_category_exists)-->
|
||||
<!--@foreach($selected_mids as $key => $val)-->
|
||||
<tr>
|
||||
{@ $_idx =0; }
|
||||
<!--@foreach($val as $k => $v)-->
|
||||
{@ $_idx =0; }
|
||||
<!--@foreach($val as $k => $v)-->
|
||||
<!--@if($_idx >0)--><tr><!--@end-->
|
||||
{@ $browser_title = str_replace("'", "\\'", htmlspecialchars($v->browser_title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); }
|
||||
<td>{$k}</td>
|
||||
<td>{$v->browser_title}</td>
|
||||
<td><a href="#" onclick="insertModule('{$id}', {$v->module_srl}, '{$k}', '{$browser_title}',{$type=='single'?'false':'true'}); return false;" class="button green"><span>{$type=='single'?$lang->cmd_select:$lang->cmd_insert}</span></a></td>
|
||||
{@ $browser_title = str_replace("'", "\\'", htmlspecialchars($v->browser_title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); }
|
||||
<td>{$k}</td>
|
||||
<td>{$v->browser_title}</td>
|
||||
<td><a href="#" onclick="insertModule('{$id}', {$v->module_srl}, '{$k}', '{$browser_title}',{$type=='single'?'false':'true'}); return false;" class="button green"><span>{$type=='single'?$lang->cmd_select:$lang->cmd_insert}</span></a></td>
|
||||
<!--@if($_idx <count($val))--></tr><!--@end-->
|
||||
{@ $_idx ++; }
|
||||
<!--@end-->
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<!--@else-->
|
||||
{@ $_idx ++; }
|
||||
<!--@end-->
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--@end-->
|
||||
<!--@else-->
|
||||
<table class="x_table x_table-striped x_table-hover" style="border-top:1px dotted #ddd">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$lang->mid}</th>
|
||||
<th>{$lang->browser_title}</th>
|
||||
<th>{$type=='single'?$lang->cmd_select:$lang->cmd_insert}</th>
|
||||
<tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($selected_mids as $key => $val)-->
|
||||
<!--@foreach($val as $k => $v)-->
|
||||
<tr>
|
||||
<td>{$k}</td>
|
||||
<td>{$v->browser_title}</td>
|
||||
<td><a href="#" onclick="insertModule('{$id}', {$v->module_srl}, '{$k}', '{str_replace("'","\\'",$v->browser_title)}',{$type=='single'?'false':'true'}); return false;" class="button green"><span>{$type=='single'?$lang->cmd_select:$lang->cmd_insert}</span></a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<!--@foreach($val as $k => $v)-->
|
||||
<tr>
|
||||
<td>{$k}</td>
|
||||
<td>{$v->browser_title}</td>
|
||||
<td><a href="#" onclick="insertModule('{$id}', {$v->module_srl}, '{$k}', '{str_replace("'","\\'",$v->browser_title)}',{$type=='single'?'false':'true'}); return false;" class="button green"><span>{$type=='single'?$lang->cmd_select:$lang->cmd_insert}</span></a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
<!--@end-->
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -283,6 +283,12 @@ class pageAdminView extends page
|
|||
$document_srl = $this->module_info->{$target};
|
||||
$oDocument->setDocument($document_srl);
|
||||
Context::set('document_srl', $document_srl);
|
||||
}
|
||||
else if(Context::get('document_srl'))
|
||||
{
|
||||
$document_srl = Context::get('document_srl');
|
||||
$oDocument->setDocument($document_srl);
|
||||
Context::set('document_srl', $document_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -205,7 +205,6 @@ class widgetModel extends widget
|
|||
$extra_var_count = count($extra_vars);
|
||||
|
||||
$buff .= sprintf('$widget_info->extra_var_count = "%s";', $extra_var_count);
|
||||
$buff .= '$widget_info->extra_var = new stdClass;';
|
||||
for($i=0;$i<$extra_var_count;$i++)
|
||||
{
|
||||
unset($var);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue