mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 19:51:42 +09:00
merge from 1.5.3.2 (~r11225)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@11226 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
54e3a72065
commit
77f5aa2671
313 changed files with 8058 additions and 14251 deletions
|
|
@ -1,7 +1,11 @@
|
|||
RewriteEngine On
|
||||
|
||||
# reserve XE Layout Template Source File (*.html)
|
||||
RewriteRule ^(layouts|m.layouts)/(.+)/(.+)\.html$ ./index.php [L]
|
||||
RewriteRule ^(layouts|m.layouts)/(.+)\.html$ - [L,F]
|
||||
# reserve XE Template Source Files (*.html)
|
||||
RewriteCond %{REQUEST_URI} !/modules/editor/
|
||||
RewriteRule /(skins|m.skins)/(.+)\.html$ - [L,F]
|
||||
|
||||
# conf, query, schema
|
||||
RewriteRule ^(modules|addons|widgets)/(.+)/(conf|queries|schemas)/(.+)\.xml$ ./index.php [L]
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ var calledArgs = null;
|
|||
'<button type="button" class="play" title="" style="position:absolute; top:27px; left:245px; width:25px; height:25px; padding:0; overflow:visible; border:1px solid #575757; background:#747474 url('+request_uri + 'addons/captcha/img/icon.gif) no-repeat center -20px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #444 inset;-moz-box-shadow:0 0 3px #444 inset;-webkit-box-shadow:0 0 3px #444 inset;"></button>'+
|
||||
'</div>'+
|
||||
'<label id="captchaAbout" for="captcha" style="display:block; border-top:1px dashed #c5c5c5; padding:15px 0; margin:0 20px; font-size:12px; color:#5f5f5f;"></label>'+
|
||||
'<input name="" type="text" id="secret_text" style="margin:0 20px; width:232px; border:1px solid #bdbdbd; padding:3px 4px; font-size:18px; font-weight:bold;" />'+
|
||||
'<input name="" type="text" id="secret_text" style="ime-mode:inactive;margin:0 20px; width:232px; border:1px solid #bdbdbd; padding:3px 4px; font-size:18px; font-weight:bold;" />'+
|
||||
'<div style="margin:20px; border-top:1px dashed #c5c5c5; padding:15px 0 0 0; text-align:center">'+
|
||||
'<button type="submit" style="height:31px; line-height:31px; padding:0 15px; margin:0 2px; font-size:12px; font-weight:bold; color:#fff; overflow:visible; border:1px solid #5c8a16; background:#6faa13;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #666 inset;-moz-box-shadow:0 0 3px #666 inset;-webkit-box-shadow:0 0 3px #666 inset;"></button>'+
|
||||
'<button type="button" class="cancel" style="height:31px; line-height:31px; padding:0 15px; margin:0 2px; font-size:12px; font-weight:bold; color:#fff; overflow:visible; border:1px solid #575757; background:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #444 inset;-moz-box-shadow:0 0 3px #444 inset;-webkit-box-shadow:0 0 3px #444 inset;"></button>'+
|
||||
|
|
|
|||
4
addons/captcha/captcha.min.js
vendored
4
addons/captcha/captcha.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
|
|
@ -407,6 +407,7 @@
|
|||
*/
|
||||
function executeQuery($query_id, $args = NULL, $arg_columns = NULL) {
|
||||
static $cache_file = array();
|
||||
|
||||
if(!$query_id) return new Object(-1, 'msg_invalid_queryid');
|
||||
if(!$this->db_type) return;
|
||||
|
||||
|
|
@ -414,7 +415,7 @@
|
|||
|
||||
$this->query_id = $query_id;
|
||||
|
||||
if(!isset($cache_file[$query_id])) {
|
||||
if(!isset($cache_file[$query_id]) || !file_exists($cache_file[$query_id])) {
|
||||
$id_args = explode('.', $query_id);
|
||||
if(count($id_args) == 2) {
|
||||
$target = 'modules';
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@
|
|||
*/
|
||||
function isSupported()
|
||||
{
|
||||
if (!function_exists('cubrid_connect')) return false;
|
||||
return true;
|
||||
if (!function_exists('cubrid_connect')) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
{
|
||||
@cubrid_commit ($connection);
|
||||
@cubrid_disconnect ($connection);
|
||||
$this->transaction_started = false;
|
||||
$this->transaction_started = FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
$connection = $this->_getConnection('master');
|
||||
cubrid_set_autocommit($connection, CUBRID_AUTOCOMMIT_FALSE);
|
||||
}
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -167,7 +167,7 @@
|
|||
{
|
||||
$connection = $this->_getConnection('master');
|
||||
@cubrid_rollback ($connection);
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -179,7 +179,7 @@
|
|||
{
|
||||
$connection = $this->_getConnection('master');
|
||||
@cubrid_commit($connection);
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -194,6 +194,12 @@
|
|||
if($this->use_prepared_statements == 'Y')
|
||||
{
|
||||
$req = @cubrid_prepare($connection, $query);
|
||||
if(!$req)
|
||||
{
|
||||
$this->_setError();
|
||||
return false;
|
||||
}
|
||||
|
||||
$position = 0;
|
||||
if($this->param)
|
||||
{
|
||||
|
|
@ -219,12 +225,22 @@
|
|||
if(is_array($value)){
|
||||
foreach($value as $v)
|
||||
{
|
||||
cubrid_bind($req, ++$position, $v, $bind_type);
|
||||
$bound = @cubrid_bind($req, ++$position, $v, $bind_type);
|
||||
if(!$bound)
|
||||
{
|
||||
$this->_setError();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cubrid_bind($req, ++$position, $value, $bind_type);
|
||||
$bound = @cubrid_bind($req, ++$position, $value, $bind_type);
|
||||
if(!$bound)
|
||||
{
|
||||
$this->_setError();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -232,10 +248,8 @@
|
|||
$result = @cubrid_execute($req);
|
||||
if(!$result)
|
||||
{
|
||||
$code = cubrid_error_code ();
|
||||
$msg = cubrid_error_msg ();
|
||||
|
||||
$this->setError ($code, $msg);
|
||||
$this->_setError();
|
||||
return false;
|
||||
}
|
||||
return $req;
|
||||
|
||||
|
|
@ -243,16 +257,27 @@
|
|||
// Execute the query
|
||||
$result = @cubrid_execute ($connection, $query);
|
||||
// error check
|
||||
if (cubrid_error_code ()) {
|
||||
$code = cubrid_error_code ();
|
||||
$msg = cubrid_error_msg ();
|
||||
|
||||
$this->setError ($code, $msg);
|
||||
if (!$result) {
|
||||
$this->_setError();
|
||||
return false;
|
||||
}
|
||||
// Return the result
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve CUBRID error and set to object
|
||||
*
|
||||
* @author Corina Udrescu (dev@xpressengine.org)
|
||||
*/
|
||||
function _setError()
|
||||
{
|
||||
$code = cubrid_error_code ();
|
||||
$msg = cubrid_error_msg ();
|
||||
|
||||
$this->setError ($code, $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the result
|
||||
* @param resource $result
|
||||
|
|
@ -360,7 +385,7 @@
|
|||
$this->_query($query);
|
||||
}
|
||||
|
||||
$_GLOBALS['XE_EXISTS_SEQUENCE'] = true;
|
||||
$_GLOBALS['XE_EXISTS_SEQUENCE'] = TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -380,10 +405,10 @@
|
|||
|
||||
$result = $this->_query ($query);
|
||||
if (cubrid_num_rows($result) > 0) {
|
||||
$output = true;
|
||||
$output = TRUE;
|
||||
}
|
||||
else {
|
||||
$output = false;
|
||||
$output = FALSE;
|
||||
}
|
||||
|
||||
if ($result) cubrid_close_request ($result);
|
||||
|
|
@ -401,7 +426,7 @@
|
|||
* @param boolean $notnull not null status, default value is false
|
||||
* @return void
|
||||
*/
|
||||
function addColumn($table_name, $column_name, $type = 'number', $size = '', $default = '', $notnull = false)
|
||||
function addColumn($table_name, $column_name, $type = 'number', $size = '', $default = '', $notnull = FALSE)
|
||||
{
|
||||
$type = strtoupper($this->column_type[$type]);
|
||||
if ($type == 'INTEGER') $size = '';
|
||||
|
|
@ -457,8 +482,8 @@
|
|||
$query = sprintf ("select \"attr_name\" from \"db_attribute\" where ". "\"attr_name\" ='%s' and \"class_name\" = '%s%s'", $column_name, $this->prefix, $table_name);
|
||||
$result = $this->_query ($query);
|
||||
|
||||
if (cubrid_num_rows ($result) > 0) $output = true;
|
||||
else $output = false;
|
||||
if (cubrid_num_rows ($result) > 0) $output = TRUE;
|
||||
else $output = FALSE;
|
||||
|
||||
if ($result) cubrid_close_request ($result);
|
||||
|
||||
|
|
@ -475,13 +500,13 @@
|
|||
* @param boolean $is_unique
|
||||
* @return void
|
||||
*/
|
||||
function addIndex ($table_name, $index_name, $target_columns, $is_unique = false)
|
||||
function addIndex ($table_name, $index_name, $target_columns, $is_unique = FALSE)
|
||||
{
|
||||
if (!is_array ($target_columns)) {
|
||||
$target_columns = array ($target_columns);
|
||||
}
|
||||
|
||||
$query = sprintf ("create %s index \"%s\" on \"%s%s\" (%s);", $is_unique?'unique':'', $this->prefix .$index_name, $this->prefix, $table_name, '"'.implode('","',$target_columns).'"');
|
||||
$query = sprintf ("create %s index \"%s\" on \"%s%s\" (%s);", $is_unique?'unique':'', $index_name, $this->prefix, $table_name, '"'.implode('","',$target_columns).'"');
|
||||
|
||||
$this->_query ($query);
|
||||
}
|
||||
|
|
@ -493,9 +518,9 @@
|
|||
* @param boolean $is_unique
|
||||
* @return void
|
||||
*/
|
||||
function dropIndex ($table_name, $index_name, $is_unique = false)
|
||||
function dropIndex ($table_name, $index_name, $is_unique = FALSE)
|
||||
{
|
||||
$query = sprintf ("drop %s index \"%s\" on \"%s%s\"", $is_unique?'unique':'', $this->prefix .$index_name, $this->prefix, $table_name);
|
||||
$query = sprintf ("drop %s index \"%s\" on \"%s%s\"", $is_unique?'unique':'', $index_name, $this->prefix, $table_name);
|
||||
|
||||
$this->_query($query);
|
||||
}
|
||||
|
|
@ -508,15 +533,15 @@
|
|||
*/
|
||||
function isIndexExists ($table_name, $index_name)
|
||||
{
|
||||
$query = sprintf ("select \"index_name\" from \"db_index\" where ". "\"class_name\" = '%s%s' and \"index_name\" = '%s' ", $this->prefix, $table_name, $this->prefix .$index_name);
|
||||
$query = sprintf ("select \"index_name\" from \"db_index\" where ". "\"class_name\" = '%s%s' and (\"index_name\" = '%s' or \"index_name\" = '%s') ", $this->prefix, $table_name, $this->prefix .$index_name, $index_name);
|
||||
$result = $this->_query ($query);
|
||||
|
||||
if ($this->isError ()) return false;
|
||||
if ($this->isError ()) return FALSE;
|
||||
|
||||
$output = $this->_fetch ($result);
|
||||
|
||||
if (!$output) return false;
|
||||
return true;
|
||||
if (!$output) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -551,18 +576,26 @@
|
|||
);
|
||||
$result = $this->_query ($query);
|
||||
|
||||
if ($this->isError ()) return false;
|
||||
if ($this->isError ()) return FALSE;
|
||||
|
||||
$output = $this->_fetch ($result);
|
||||
if (!$output) return false;
|
||||
if (!$output) return FALSE;
|
||||
|
||||
if(!is_array($output)) {
|
||||
$indexes_to_be_deleted = array($output);
|
||||
}
|
||||
else {
|
||||
$indexes_to_be_deleted = $output;
|
||||
}
|
||||
|
||||
$indexes_to_be_deleted = $output->data;
|
||||
foreach($indexes_to_be_deleted as $index)
|
||||
{
|
||||
$this->dropIndex($index->class_name, $index->unprefixed_index_name, $index->is_unique == 'YES' ? true : false);
|
||||
$this->dropIndex(substr($index->class_name, strlen($this->prefix))
|
||||
, $this->prefix . $index->unprefixed_index_name
|
||||
, $index->is_unique == 'YES' ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -648,10 +681,10 @@
|
|||
|
||||
switch ($this->column_type[$type]) {
|
||||
case 'integer' :
|
||||
$size = null;
|
||||
$size = NULL;
|
||||
break;
|
||||
case 'text' :
|
||||
$size = null;
|
||||
$size = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -693,14 +726,14 @@
|
|||
|
||||
if (count ($unique_list)) {
|
||||
foreach ($unique_list as $key => $val) {
|
||||
$query = sprintf ("create unique index \"%s\" on \"%s\" ". "(%s);", $this->prefix .$key, $table_name, '"'.implode('","', $val).'"');
|
||||
$query = sprintf ("create unique index \"%s\" on \"%s\" ". "(%s);", $key, $table_name, '"'.implode('","', $val).'"');
|
||||
$this->_query ($query);
|
||||
}
|
||||
}
|
||||
|
||||
if (count ($index_list)) {
|
||||
foreach ($index_list as $key => $val) {
|
||||
$query = sprintf ("create index \"%s\" on \"%s\" (%s);", $this->prefix .$key, $table_name, '"'.implode('","',$val).'"');
|
||||
$query = sprintf ("create index \"%s\" on \"%s\" (%s);", $key, $table_name, '"'.implode('","',$val).'"');
|
||||
$this->_query ($query);
|
||||
}
|
||||
}
|
||||
|
|
@ -715,17 +748,17 @@
|
|||
* @param boolean $with_values
|
||||
* @return resource
|
||||
*/
|
||||
function _executeInsertAct($queryObject, $with_values = true)
|
||||
function _executeInsertAct($queryObject, $with_values = TRUE)
|
||||
{
|
||||
if($this->use_prepared_statements == 'Y')
|
||||
{
|
||||
$this->param = $queryObject->getArguments();
|
||||
$with_values = false;
|
||||
$with_values = FALSE;
|
||||
}
|
||||
$query = $this->getInsertSql($queryObject, $with_values);
|
||||
if(is_a($query, 'Object')) return;
|
||||
|
||||
$query .= (__DEBUG_QUERY__&1 && $queryObject->queryID)?sprintf (' '.$this->comment_syntax, $queryObject->queryID):'';
|
||||
$query .= (__DEBUG_QUERY__&1 && $this->query_id)?sprintf (' '.$this->comment_syntax, $this->query_id):'';
|
||||
|
||||
$result = $this->_query ($query);
|
||||
if ($result && !$this->transaction_started) {
|
||||
|
|
@ -741,16 +774,18 @@
|
|||
* @param boolean $with_values
|
||||
* @return resource
|
||||
*/
|
||||
function _executeUpdateAct($queryObject, $with_values = true)
|
||||
function _executeUpdateAct($queryObject, $with_values = TRUE)
|
||||
{
|
||||
if($this->use_prepared_statements == 'Y')
|
||||
{
|
||||
$this->param = $queryObject->getArguments();
|
||||
$with_values = false;
|
||||
$with_values = FALSE;
|
||||
}
|
||||
$query = $this->getUpdateSql($queryObject, $with_values);
|
||||
if(is_a($query, 'Object')) return;
|
||||
|
||||
$query .= (__DEBUG_QUERY__&1 && $this->query_id)?sprintf (' '.$this->comment_syntax, $this->query_id):'';
|
||||
|
||||
$result = $this->_query($query);
|
||||
|
||||
if ($result && !$this->transaction_started) $this->_commit();
|
||||
|
|
@ -765,16 +800,18 @@
|
|||
* @param boolean $with_values
|
||||
* @return resource
|
||||
*/
|
||||
function _executeDeleteAct($queryObject, $with_values = true)
|
||||
function _executeDeleteAct($queryObject, $with_values = TRUE)
|
||||
{
|
||||
if($this->use_prepared_statements == 'Y')
|
||||
{
|
||||
$this->param = $queryObject->getArguments();
|
||||
$with_values = false;
|
||||
$with_values = FALSE;
|
||||
}
|
||||
$query = $this->getDeleteSql($queryObject, $with_values);
|
||||
if(is_a($query, 'Object')) return;
|
||||
|
||||
$query .= (__DEBUG_QUERY__&1 && $this->query_id)?sprintf (' '.$this->comment_syntax, $this->query_id):'';
|
||||
|
||||
$result = $this->_query ($query);
|
||||
|
||||
if ($result && !$this->transaction_started) $this->_commit();
|
||||
|
|
@ -792,10 +829,10 @@
|
|||
* @param boolean $with_values
|
||||
* @return Object
|
||||
*/
|
||||
function _executeSelectAct($queryObject, $connection = null, $with_values = true) {
|
||||
function _executeSelectAct($queryObject, $connection = NULL, $with_values = TRUE) {
|
||||
if ($this->use_prepared_statements == 'Y') {
|
||||
$this->param = $queryObject->getArguments();
|
||||
$with_values = false;
|
||||
$with_values = FALSE;
|
||||
}
|
||||
$limit = $queryObject->getLimit();
|
||||
if ($limit && $limit->isPageHandler())
|
||||
|
|
@ -807,7 +844,7 @@
|
|||
if (is_a($query, 'Object'))
|
||||
return;
|
||||
|
||||
$query .= (__DEBUG_QUERY__ & 1 && $queryObject->queryID) ? sprintf(' ' . $this->comment_syntax, $queryObject->queryID) : '';
|
||||
$query .= (__DEBUG_QUERY__ & 1 && $this->query_id) ? sprintf(' ' . $this->comment_syntax, $this->query_id) : '';
|
||||
$result = $this->_query($query, $connection);
|
||||
|
||||
if ($this->isError())
|
||||
|
|
@ -851,12 +888,12 @@
|
|||
function queryPageLimit($queryObject, $connection, $with_values){
|
||||
$limit = $queryObject->getLimit();
|
||||
// Total count
|
||||
$temp_where = $queryObject->getWhereString($with_values, false);
|
||||
$temp_where = $queryObject->getWhereString($with_values, FALSE);
|
||||
$count_query = sprintf('select count(*) as "count" %s %s', 'FROM ' . $queryObject->getFromString($with_values), ($temp_where === '' ? '' : ' WHERE '. $temp_where));
|
||||
|
||||
// Check for distinct query and if found update count query structure
|
||||
$temp_select = $queryObject->getSelectString($with_values);
|
||||
$uses_distinct = strpos(strtolower($temp_select), "distinct") !== false;
|
||||
$uses_distinct = strpos(strtolower($temp_select), "distinct") !== FALSE;
|
||||
$uses_groupby = $queryObject->getGroupByString() != '';
|
||||
if($uses_distinct || $uses_groupby) {
|
||||
$count_query = sprintf('select %s %s %s %s'
|
||||
|
|
@ -940,7 +977,7 @@
|
|||
* @param int $list_count
|
||||
* @return string select paging sql
|
||||
*/
|
||||
function getSelectPageSql($query, $with_values = true, $start_count = 0, $list_count = 0) {
|
||||
function getSelectPageSql($query, $with_values = TRUE, $start_count = 0, $list_count = 0) {
|
||||
|
||||
$select = $query->getSelectString($with_values);
|
||||
if($select == '') return new Object(-1, "Invalid query");
|
||||
|
|
@ -966,6 +1003,4 @@
|
|||
return $select . ' ' . $from . ' ' . $where . ' ' . $groupBy . ' ' . $orderBy . ' ' . $limit;
|
||||
}
|
||||
}
|
||||
|
||||
return new DBCubrid;
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -865,6 +865,4 @@
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
return new DBFireBird;
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -734,6 +734,4 @@
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
return new DBMssql;
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -443,6 +443,7 @@ class DBMysql extends DB {
|
|||
*/
|
||||
function _executeInsertAct($queryObject, $with_values = true) {
|
||||
$query = $this->getInsertSql($queryObject, $with_values, true);
|
||||
$query .= (__DEBUG_QUERY__ & 1 && $this->query_id) ? sprintf(' ' . $this->comment_syntax, $this->query_id) : '';
|
||||
if(is_a($query, 'Object')) return;
|
||||
return $this->_query($query);
|
||||
}
|
||||
|
|
@ -455,6 +456,7 @@ class DBMysql extends DB {
|
|||
*/
|
||||
function _executeUpdateAct($queryObject, $with_values = true) {
|
||||
$query = $this->getUpdateSql($queryObject, $with_values, true);
|
||||
$query .= (__DEBUG_QUERY__ & 1 && $this->query_id) ? sprintf(' ' . $this->comment_syntax, $this->query_id) : '';
|
||||
if(is_a($query, 'Object')) return;
|
||||
return $this->_query($query);
|
||||
}
|
||||
|
|
@ -467,6 +469,7 @@ class DBMysql extends DB {
|
|||
*/
|
||||
function _executeDeleteAct($queryObject, $with_values = true) {
|
||||
$query = $this->getDeleteSql($queryObject, $with_values, true);
|
||||
$query .= (__DEBUG_QUERY__ & 1 && $this->query_id) ? sprintf(' ' . $this->comment_syntax, $this->query_id) : '';
|
||||
if(is_a($query, 'Object')) return;
|
||||
return $this->_query($query);
|
||||
}
|
||||
|
|
@ -674,6 +677,4 @@ class DBMysql extends DB {
|
|||
return $select . ' ' . $from . ' ' . $where . ' ' . $groupBy . ' ' . $orderBy . ' ' . $limit;
|
||||
}
|
||||
}
|
||||
|
||||
return new DBMysql;
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -159,6 +159,4 @@
|
|||
if(!$output) return false;
|
||||
}
|
||||
}
|
||||
|
||||
return new DBMysql_innodb;
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -217,8 +217,14 @@
|
|||
$stmt = $result;
|
||||
$meta = mysqli_stmt_result_metadata($stmt);
|
||||
$fields = mysqli_fetch_fields($meta);
|
||||
|
||||
foreach($fields as $field)
|
||||
|
||||
/**
|
||||
* Mysqli has a bug that causes LONGTEXT columns not to get loaded
|
||||
* Unless store_result is called before
|
||||
* MYSQLI_TYPE for longtext is 252
|
||||
*/
|
||||
$longtext_exists = false;
|
||||
foreach($fields as $field)
|
||||
{
|
||||
if(isset($resultArray[$field->name])) // When joined tables are used and the same column name appears twice, we should add it separately, otherwise bind_result fails
|
||||
$field->name = 'repeat_' . $field->name;
|
||||
|
|
@ -226,9 +232,16 @@
|
|||
// Array passed needs to contain references, not values
|
||||
$row[$field->name] = "";
|
||||
$resultArray[$field->name] = &$row[$field->name];
|
||||
|
||||
if($field->type == 252) $longtext_exists = true;
|
||||
}
|
||||
$resultArray = array_merge(array($stmt), $resultArray);
|
||||
|
||||
if($longtext_exists)
|
||||
{
|
||||
mysqli_stmt_store_result($stmt);
|
||||
}
|
||||
|
||||
call_user_func_array('mysqli_stmt_bind_result', $resultArray);
|
||||
|
||||
$rows = array();
|
||||
|
|
@ -370,6 +383,4 @@
|
|||
return mysqli_free_result($result);
|
||||
}
|
||||
}
|
||||
|
||||
return new DBMysqli;
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -597,6 +597,4 @@ class DBPostgresql extends DB
|
|||
return new DBParser('"', '"', $this->prefix);
|
||||
}
|
||||
}
|
||||
|
||||
return new DBPostgresql;
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -633,6 +633,4 @@
|
|||
return $sql;
|
||||
}
|
||||
}
|
||||
|
||||
return new DBSqlite3_pdo;
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -11,24 +11,43 @@ class HTMLDisplayHandler {
|
|||
$oTemplate = &TemplateHandler::getInstance();
|
||||
|
||||
// compile module tpl
|
||||
if ($oModule->module_info->module == $oModule->module)
|
||||
$skin = $oModule->origin_module_info->skin;
|
||||
else
|
||||
$skin = $oModule->module_config->skin;
|
||||
// deprecated themes skin
|
||||
|
||||
if(Context::get('module')!='admin' && strpos(Context::get('act'),'Admin') === false){
|
||||
if ($skin && is_string($skin)){
|
||||
$theme_skin = explode('.', $skin);
|
||||
$template_path = $oModule->getTemplatePath();
|
||||
if (count($theme_skin) == 2) {
|
||||
$theme_path = sprintf('./themes/%s',$theme_skin[0]);
|
||||
if(substr($theme_path,0,strlen($theme_path)) != $theme_path)
|
||||
$template_path = sprintf('%s/modules/%s/', $theme_path, $theme_skin[1]);
|
||||
}
|
||||
}else{
|
||||
$template_path = $oModule->getTemplatePath();
|
||||
|
||||
if(!is_dir($template_path))
|
||||
{
|
||||
if ($oModule->module_info->module == $oModule->module)
|
||||
$skin = $oModule->origin_module_info->skin;
|
||||
else
|
||||
$skin = $oModule->module_config->skin;
|
||||
|
||||
if(Context::get('module')!='admin' && strpos(Context::get('act'),'Admin') === false)
|
||||
{
|
||||
if ($skin && is_string($skin))
|
||||
{
|
||||
$theme_skin = explode('|@|', $skin);
|
||||
$template_path = $oModule->getTemplatePath();
|
||||
if (count($theme_skin) == 2)
|
||||
{
|
||||
$theme_path = sprintf('./themes/%s',$theme_skin[0]);
|
||||
if(substr($theme_path,0,strlen($theme_path)) != $theme_path)
|
||||
{
|
||||
$template_path = sprintf('%s/modules/%s/', $theme_path, $theme_skin[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = $oModule->getTemplatePath();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = $oModule->getTemplatePath();
|
||||
}
|
||||
}else $template_path = $oModule->getTemplatePath();
|
||||
}
|
||||
|
||||
$tpl_file = $oModule->getTemplateFile();
|
||||
|
||||
$output = $oTemplate->compile($template_path, $tpl_file);
|
||||
|
|
@ -93,6 +112,9 @@ class HTMLDisplayHandler {
|
|||
// move <style ..></style> in body to the header
|
||||
$output = preg_replace_callback('!<style(.*?)<\/style>!is', array($this,'_moveStyleToHeader'), $output);
|
||||
|
||||
// move <meta ../> in body to the header
|
||||
$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);
|
||||
|
||||
|
|
@ -238,6 +260,16 @@ class HTMLDisplayHandler {
|
|||
Context::addHtmlHeader($matches[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* add meta code extracted from html body to Context, which will be
|
||||
* printed inside <header></header> later.
|
||||
* @param array $matches
|
||||
* @return void
|
||||
**/
|
||||
function _moveMetaToHeader($matches) {
|
||||
Context::addHtmlHeader($matches[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* add given .css or .js file names in widget code to Context
|
||||
* @param array $matches
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/**
|
||||
* Superclass of the edit component.
|
||||
* Set up the component variables
|
||||
*
|
||||
* @class EditorHandler
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief superclass of the edit component
|
||||
*
|
||||
* set up the component variables
|
||||
**/
|
||||
|
||||
class EditorHandler extends Object {
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@
|
|||
if(is_array($value)) $values = $value;
|
||||
elseif(strpos($value,'|@|')!==false) $values = explode('|@|', $value);
|
||||
elseif(strpos($value,',')!==false) $values = explode(',', $value);
|
||||
else $values = array($value);
|
||||
return $values;
|
||||
break;
|
||||
//case 'date' :
|
||||
|
|
@ -287,9 +288,9 @@
|
|||
// Phone Number
|
||||
case 'tel' :
|
||||
$buff .=
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.$value[0].'" size="4" class="tel" />'.
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.$value[1].'" size="4" class="tel" />'.
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.$value[2].'" size="4" class="tel" />';
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.$value[0].'" size="4" maxlength="4" class="tel" />'.
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.$value[1].'" size="4" maxlength="4" class="tel" />'.
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.$value[2].'" size="4" maxlength="4" class="tel" />';
|
||||
break;
|
||||
|
||||
// textarea
|
||||
|
|
@ -366,7 +367,7 @@
|
|||
|
||||
$buff .=
|
||||
'<div id="addr_searched_'.$column_name.'" style="display:'.($value[0]?'block':'none').';">'.
|
||||
'<input type="text" readonly="readonly" name="'.$column_name.'" value="'.$value[0].'" class="address" />'.
|
||||
'<input type="text" readonly="readonly" name="'.$column_name.'[]" value="'.$value[0].'" class="address" />'.
|
||||
'<a href="#" onclick="doShowKrZipSearch(this, \''.$column_name.'\'); return false;" class="button red"><span>'.Context::getLang('cmd_cancel').'</span></a>'.
|
||||
'</div>'.
|
||||
|
||||
|
|
@ -381,7 +382,7 @@
|
|||
'<a href="#" onclick="doSearchKrZip(this, \''.$column_name.'\'); return false;" class="button green"><span>'.Context::getLang('cmd_search').'</span></a>'.
|
||||
'</div>'.
|
||||
|
||||
'<input type="text" name="'.$column_name.'" value="'.htmlspecialchars($value[1]).'" class="address" />'.
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.htmlspecialchars($value[1]).'" class="address" />'.
|
||||
'';
|
||||
break;
|
||||
// General text
|
||||
|
|
|
|||
|
|
@ -141,7 +141,8 @@
|
|||
$key = $file->filePath . $file->fileName . "\t" . $file->targetIe;
|
||||
}
|
||||
|
||||
if (!isset($map[$key]) || $mapIndex[$key] != $file->index)
|
||||
(is_null($file->index))?$file->index=0:$file->index=$file->index;
|
||||
if (!isset($map[$file->index][$key]) || $mapIndex[$key] != $file->index)
|
||||
{
|
||||
$this->unloadFile($args[0], $args[2], $args[1]);
|
||||
$map[$file->index][$key] = $file;
|
||||
|
|
@ -207,16 +208,16 @@
|
|||
{
|
||||
if ($type == 'css' || $type == 'all')
|
||||
{
|
||||
$cssMap = array();
|
||||
$cssMapIndex = array();
|
||||
$this->cssMap = array();
|
||||
$this->cssMapIndex = array();
|
||||
}
|
||||
|
||||
if ($type == 'js' || $type == 'all')
|
||||
{
|
||||
$jsHeadMap = array();
|
||||
$jsBodyMap = array();
|
||||
$jsHeadMapIndex = array();
|
||||
$jsBodyMapIndex = array();
|
||||
$this->jsHeadMap = array();
|
||||
$this->jsBodyMap = array();
|
||||
$this->jsHeadMapIndex = array();
|
||||
$this->jsBodyMapIndex = array();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +247,8 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
$fullFilePath = $file->filePath . '/' . $file->fileName;
|
||||
$noneCache = (is_readable($file->cdnPath.'/'.$file->fileName))?'?'.date('YmdHis', filemtime($file->cdnPath.'/'.$file->fileName)):'';
|
||||
$fullFilePath = $file->filePath . '/' . $file->fileName.$noneCache;
|
||||
}
|
||||
$result[] = array('file' => $fullFilePath, 'media' => $file->media, 'targetie' => $file->targetIe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,15 @@
|
|||
exit;
|
||||
}
|
||||
|
||||
if(isset($this->act) && substr($this->act, 0, 4) == 'disp')
|
||||
{
|
||||
if(Context::get('_use_ssl') == 'optional' && Context::isExistsSSLAction($this->act) && $_SERVER['HTTPS'] != 'on')
|
||||
{
|
||||
header('location:https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// execute addon (before module initialization)
|
||||
$called_position = 'before_module_init';
|
||||
$oAddonController = &getController('addon');
|
||||
|
|
@ -407,6 +416,16 @@
|
|||
$rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset, $this->mid);
|
||||
if(!empty($rulesetFile))
|
||||
{
|
||||
if($_SESSION['XE_VALIDATOR_ERROR_LANG'])
|
||||
{
|
||||
$errorLang = $_SESSION['XE_VALIDATOR_ERROR_LANG'];
|
||||
foreach($errorLang as $key => $val)
|
||||
{
|
||||
Context::setLang($key, $val);
|
||||
}
|
||||
unset($_SESSION['XE_VALIDATOR_ERROR_LANG']);
|
||||
}
|
||||
|
||||
$Validator = new Validator($rulesetFile);
|
||||
$result = $Validator->validate();
|
||||
if(!$result)
|
||||
|
|
@ -484,7 +503,11 @@
|
|||
$_SESSION['XE_VALIDATOR_ERROR'] = $error;
|
||||
if ($message != 'success') $_SESSION['XE_VALIDATOR_MESSAGE'] = $message;
|
||||
$_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType;
|
||||
$_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl;
|
||||
|
||||
if(Context::get('xeVirtualRequestMethod') != 'xml')
|
||||
{
|
||||
$_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl;
|
||||
}
|
||||
}
|
||||
|
||||
unset($logged_info);
|
||||
|
|
@ -555,6 +578,9 @@
|
|||
|
||||
if($_SESSION['XE_VALIDATOR_RETURN_URL'])
|
||||
{
|
||||
$display_handler = new DisplayHandler();
|
||||
$display_handler->_debugOutput();
|
||||
|
||||
header('location:'.$_SESSION['XE_VALIDATOR_RETURN_URL']);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@
|
|||
switch($permission_target) {
|
||||
case 'root' :
|
||||
case 'manager' :
|
||||
$this->stop('msg_not_permitted_act');
|
||||
$this->stop('msg_is_not_administrator');
|
||||
return;
|
||||
case 'member' :
|
||||
if(!$is_logged)
|
||||
|
|
@ -334,7 +334,7 @@
|
|||
|
||||
if(isset($this->xml_info->action->{$this->act}) && method_exists($this, $this->act)) {
|
||||
// Check permissions
|
||||
if(!$this->grant->access){
|
||||
if($this->module_srl && !$this->grant->access){
|
||||
$this->stop("msg_not_permitted_act");
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
598
classes/security/EmbedFilter.class.php
Normal file
598
classes/security/EmbedFilter.class.php
Normal file
|
|
@ -0,0 +1,598 @@
|
|||
<?php
|
||||
include "phphtmlparser/src/htmlparser.inc";
|
||||
|
||||
class EmbedFilter
|
||||
{
|
||||
var $whiteUrlXmlFile = './classes/security/conf/embedWhiteUrl.xml';
|
||||
var $whiteUrlCacheFile = './files/cache/embedfilter/embedWhiteUrl.php';
|
||||
var $whiteUrlList = array();
|
||||
var $whiteIframeUrlList = array();
|
||||
var $parser = NULL;
|
||||
var $mimeTypeList = array('application/andrew-inset'=>1, 'application/applixware'=>1, 'application/atom+xml'=>1, 'application/atomcat+xml'=>1, 'application/atomsvc+xml'=>1,
|
||||
'application/ccxml+xml'=>1, 'application/cdmi-capability'=>1, 'application/cdmi-container'=>1, 'application/cdmi-domain'=>1, 'application/cdmi-object'=>1,
|
||||
'application/cdmi-queue'=>1, 'application/cu-seeme'=>1, 'application/davmount+xml'=>1, 'application/docbook+xml'=>1, 'application/dssc+der'=>1, 'application/dssc+xml'=>1,
|
||||
'application/ecmascript'=>1, 'application/emma+xml'=>1, 'application/epub+zip'=>1, 'application/exi'=>1, 'application/font-tdpfr'=>1, 'application/gml+xml'=>1,
|
||||
'application/gpx+xml'=>1, 'application/gxf'=>1, 'application/hyperstudio'=>1, 'application/inkml+xml'=>1, 'application/inkml+xml'=>1, 'application/ipfix'=>1,
|
||||
'application/java-archive'=>1, 'application/java-serialized-object'=>1, 'application/java-vm'=>1, 'application/javascript'=>1, 'application/json'=>1,
|
||||
'application/jsonml+json'=>1, 'application/lost+xml'=>1, 'application/mac-binhex40'=>1, 'application/mac-compactpro'=>1, 'application/mads+xml'=>1,
|
||||
'application/marc'=>1, 'application/marcxml+xml'=>1, 'application/mathematica'=>1, 'application/mathematica'=>1, 'application/mathematica'=>1, 'application/mathml+xml'=>1,
|
||||
'application/mbox'=>1, 'application/mediaservercontrol+xml'=>1, 'application/metalink+xml'=>1, 'application/metalink4+xml'=>1, 'application/mets+xml'=>1,
|
||||
'application/mods+xml'=>1, 'application/mp21'=>1, 'application/mp4'=>1, 'application/msword'=>1, 'application/mxf'=>1, 'application/octet-stream'=>1,
|
||||
'application/octet-stream'=>1, 'application/octet-stream'=>1, 'application/octet-stream'=>1, 'application/octet-stream'=>1, 'application/octet-stream'=>1,
|
||||
'application/octet-stream'=>1, 'application/octet-stream'=>1, 'application/octet-stream'=>1, 'application/octet-stream'=>1, 'application/octet-stream'=>1,
|
||||
'application/octet-stream'=>1, 'application/oda'=>1, 'application/oebps-package+xml'=>1, 'application/ogg'=>1, 'application/omdoc+xml'=>1, 'application/onenote'=>1,
|
||||
'application/onenote'=>1, 'application/onenote'=>1, 'application/onenote'=>1, 'application/oxps'=>1, 'application/patch-ops-error+xml'=>1, 'application/pdf'=>1,
|
||||
'application/pgp-encrypted'=>1, 'application/pgp-signature'=>1, 'application/pgp-signature'=>1, 'application/pics-rules'=>1, 'application/pkcs10'=>1,
|
||||
'application/pkcs7-mime'=>1, 'application/pkcs7-mime'=>1, 'application/pkcs7-signature'=>1, 'application/pkcs8'=>1, 'application/pkix-attr-cert'=>1,
|
||||
'application/pkix-cert'=>1, 'application/pkix-crl'=>1, 'application/pkix-pkipath'=>1, 'application/pkixcmp'=>1, 'application/pls+xml'=>1,
|
||||
'application/postscript'=>1, 'application/postscript'=>1, 'application/postscript'=>1, 'application/prs.cww'=>1, 'application/pskc+xml'=>1,
|
||||
'application/rdf+xml'=>1, 'application/reginfo+xml'=>1, 'application/relax-ng-compact-syntax'=>1, 'application/resource-lists+xml'=>1,
|
||||
'application/resource-lists-diff+xml'=>1, 'application/rls-services+xml'=>1, 'application/rpki-ghostbusters'=>1, 'application/rpki-manifest'=>1,
|
||||
'application/rpki-roa'=>1, 'application/rsd+xml'=>1, 'application/rss+xml'=>1, 'application/rtf'=>1, 'application/sbml+xml'=>1, 'application/scvp-cv-request'=>1,
|
||||
'application/scvp-cv-response'=>1, 'application/scvp-vp-request'=>1, 'application/scvp-vp-response'=>1, 'application/sdp'=>1, 'application/set-payment-initiation'=>1,
|
||||
'application/set-registration-initiation'=>1, 'application/shf+xml'=>1, 'application/smil+xml'=>1, 'application/smil+xml'=>1, 'application/sparql-query'=>1,
|
||||
'application/sparql-results+xml'=>1, 'application/srgs'=>1, 'application/srgs+xml'=>1, 'application/sru+xml'=>1, 'application/ssdl+xml'=>1,
|
||||
'application/ssml+xml'=>1, 'application/tei+xml'=>1, 'application/tei+xml'=>1, 'application/thraud+xml'=>1, 'application/timestamped-data'=>1,
|
||||
'application/vnd.3gpp.pic-bw-large'=>1, 'application/vnd.3gpp.pic-bw-small'=>1, 'application/vnd.3gpp.pic-bw-var'=>1, 'application/vnd.3gpp2.tcap'=>1,
|
||||
'application/vnd.3m.post-it-notes'=>1, 'application/vnd.accpac.simply.aso'=>1, 'application/vnd.accpac.simply.imp'=>1, 'application/vnd.acucobol'=>1,
|
||||
'application/vnd.acucorp'=>1, 'application/vnd.acucorp'=>1, 'application/vnd.adobe.air-application-installer-package+zip'=>1, 'application/vnd.adobe.formscentral.fcdt'=>1,
|
||||
'application/vnd.adobe.fxp'=>1, 'application/vnd.adobe.fxp'=>1, 'application/vnd.adobe.xdp+xml'=>1, 'application/vnd.adobe.xfdf'=>1, 'application/vnd.ahead.space'=>1,
|
||||
'application/vnd.airzip.filesecure.azf'=>1, 'application/vnd.airzip.filesecure.azs'=>1, 'application/vnd.amazon.ebook'=>1, 'application/vnd.americandynamics.acc'=>1,
|
||||
'application/vnd.amiga.ami'=>1, 'application/vnd.android.package-archive'=>1, 'application/vnd.anser-web-certificate-issue-initiation'=>1,
|
||||
'application/vnd.anser-web-funds-transfer-initiation'=>1, 'application/vnd.antix.game-component'=>1, 'application/vnd.apple.installer+xml'=>1,
|
||||
'application/vnd.apple.mpegurl'=>1, 'application/vnd.aristanetworks.swi'=>1, 'application/vnd.astraea-software.iota'=>1, 'application/vnd.audiograph'=>1,
|
||||
'application/vnd.blueice.multipass'=>1, 'application/vnd.bmi'=>1, 'application/vnd.businessobjects'=>1, 'application/vnd.chemdraw+xml'=>1,
|
||||
'application/vnd.chipnuts.karaoke-mmd'=>1, 'application/vnd.cinderella'=>1, 'application/vnd.claymore'=>1, 'application/vnd.cloanto.rp9'=>1,
|
||||
'application/vnd.clonk.c4group'=>1, 'application/vnd.clonk.c4group'=>1, 'application/vnd.clonk.c4group'=>1, 'application/vnd.clonk.c4group'=>1,
|
||||
'application/vnd.clonk.c4group'=>1, 'application/vnd.cluetrust.cartomobile-config'=>1, 'application/vnd.cluetrust.cartomobile-config-pkg'=>1,
|
||||
'application/vnd.commonspace'=>1, 'application/vnd.contact.cmsg'=>1, 'application/vnd.cosmocaller'=>1, 'application/vnd.crick.clicker'=>1,
|
||||
'application/vnd.crick.clicker.keyboard'=>1, 'application/vnd.crick.clicker.palette'=>1, 'application/vnd.crick.clicker.template'=>1,
|
||||
'application/vnd.crick.clicker.wordbank'=>1, 'application/vnd.criticaltools.wbs+xml'=>1, 'application/vnd.ctc-posml'=>1, 'application/vnd.cups-ppd'=>1,
|
||||
'application/vnd.curl.car'=>1, 'application/vnd.curl.pcurl'=>1, 'application/vnd.dart'=>1, 'application/vnd.data-vision.rdz'=>1, 'application/vnd.dece.data'=>1,
|
||||
'application/vnd.dece.data'=>1, 'application/vnd.dece.data'=>1, 'application/vnd.dece.data'=>1, 'application/vnd.dece.ttml+xml'=>1, 'application/vnd.dece.ttml+xml'=>1,
|
||||
'application/vnd.dece.unspecified'=>1, 'application/vnd.dece.unspecified'=>1, 'application/vnd.dece.zip'=>1, 'application/vnd.dece.zip'=>1,
|
||||
'application/vnd.denovo.fcselayout-link'=>1, 'application/vnd.dna'=>1, 'application/vnd.dolby.mlp'=>1, 'application/vnd.dpgraph'=>1, 'application/vnd.dreamfactory'=>1,
|
||||
'application/vnd.ds-keypoint'=>1, 'application/vnd.dvb.ait'=>1, 'application/vnd.dvb.service'=>1, 'application/vnd.dynageo'=>1, 'application/vnd.ecowin.chart'=>1,
|
||||
'application/vnd.enliven'=>1, 'application/vnd.epson.esf'=>1, 'application/vnd.epson.msf'=>1, 'application/vnd.epson.quickanime'=>1, 'application/vnd.epson.salt'=>1,
|
||||
'application/vnd.epson.ssf'=>1, 'application/vnd.eszigno3+xml'=>1, 'application/vnd.eszigno3+xml'=>1, 'application/vnd.ezpix-album'=>1, 'application/vnd.ezpix-package'=>1,
|
||||
'application/vnd.fdf'=>1, 'application/vnd.fdsn.mseed'=>1, 'application/vnd.fdsn.seed'=>1, 'application/vnd.fdsn.seed'=>1, 'application/vnd.flographit'=>1,
|
||||
'application/vnd.fluxtime.clip'=>1, 'application/vnd.framemaker'=>1, 'application/vnd.framemaker'=>1, 'application/vnd.framemaker'=>1, 'application/vnd.framemaker'=>1,
|
||||
'application/vnd.frogans.fnc'=>1, 'application/vnd.frogans.ltf'=>1, 'application/vnd.fsc.weblaunch'=>1, 'application/vnd.fujitsu.oasys'=>1,
|
||||
'application/vnd.fujitsu.oasys2'=>1, 'application/vnd.fujitsu.oasys3'=>1, 'application/vnd.fujitsu.oasysgp'=>1, 'application/vnd.fujitsu.oasysprs'=>1,
|
||||
'application/vnd.fujixerox.ddd'=>1, 'application/vnd.fujixerox.docuworks'=>1, 'application/vnd.fujixerox.docuworks.binder'=>1, 'application/vnd.fuzzysheet'=>1,
|
||||
'application/vnd.genomatix.tuxedo'=>1, 'application/vnd.geogebra.file'=>1, 'application/vnd.geogebra.tool'=>1, 'application/vnd.geometry-explorer'=>1,
|
||||
'application/vnd.geometry-explorer'=>1, 'application/vnd.geonext'=>1, 'application/vnd.geoplan'=>1, 'application/vnd.geospace'=>1, 'application/vnd.gmx'=>1,
|
||||
'application/vnd.google-earth.kml+xml'=>1, 'application/vnd.google-earth.kmz'=>1, 'application/vnd.grafeq'=>1, 'application/vnd.grafeq'=>1,
|
||||
'application/vnd.groove-account'=>1, 'application/vnd.groove-help'=>1, 'application/vnd.groove-identity-message'=>1, 'application/vnd.groove-injector'=>1,
|
||||
'application/vnd.groove-tool-message'=>1, 'application/vnd.groove-tool-template'=>1, 'application/vnd.groove-vcard'=>1, 'application/vnd.hal+xml'=>1,
|
||||
'application/vnd.handheld-entertainment+xml'=>1, 'application/vnd.hbci'=>1, 'application/vnd.hhe.lesson-player'=>1, 'application/vnd.hp-hpgl'=>1,
|
||||
'application/vnd.hp-hpid'=>1, 'application/vnd.hp-hps'=>1, 'application/vnd.hp-jlyt'=>1, 'application/vnd.hp-pcl'=>1, 'application/vnd.hp-pclxl'=>1,
|
||||
'application/vnd.hydrostatix.sof-data'=>1, 'application/vnd.ibm.minipay'=>1, 'application/vnd.ibm.modcap'=>1, 'application/vnd.ibm.modcap'=>1, 'application/vnd.ibm.modcap'=>1,
|
||||
'application/vnd.ibm.rights-management'=>1, 'application/vnd.ibm.secure-container'=>1, 'application/vnd.iccprofile'=>1, 'application/vnd.iccprofile'=>1,
|
||||
'application/vnd.igloader'=>1, 'application/vnd.immervision-ivp'=>1, 'application/vnd.immervision-ivu'=>1, 'application/vnd.insors.igm'=>1, 'application/vnd.intercon.formnet'=>1,
|
||||
'application/vnd.intercon.formnet'=>1, 'application/vnd.intergeo'=>1, 'application/vnd.intu.qbo'=>1, 'application/vnd.intu.qfx'=>1, 'application/vnd.ipunplugged.rcprofile'=>1,
|
||||
'application/vnd.irepository.package+xml'=>1, 'application/vnd.is-xpr'=>1, 'application/vnd.isac.fcs'=>1, 'application/vnd.jam'=>1, 'application/vnd.jcp.javame.midlet-rms'=>1,
|
||||
'application/vnd.jisp'=>1, 'application/vnd.joost.joda-archive'=>1, 'application/vnd.kahootz'=>1, 'application/vnd.kahootz'=>1, 'application/vnd.kde.karbon'=>1,
|
||||
'application/vnd.kde.kchart'=>1, 'application/vnd.kde.kformula'=>1, 'application/vnd.kde.kivio'=>1, 'application/vnd.kde.kontour'=>1, 'application/vnd.kde.kpresenter'=>1,
|
||||
'application/vnd.kde.kpresenter'=>1, 'application/vnd.kde.kspread'=>1, 'application/vnd.kde.kword'=>1, 'application/vnd.kde.kword'=>1, 'application/vnd.kenameaapp'=>1,
|
||||
'application/vnd.kidspiration'=>1, 'application/vnd.kinar'=>1, 'application/vnd.kinar'=>1, 'application/vnd.koan'=>1, 'application/vnd.koan'=>1, 'application/vnd.koan'=>1,
|
||||
'application/vnd.koan'=>1, 'application/vnd.kodak-descriptor'=>1, 'application/vnd.las.las+xml'=>1, 'application/vnd.llamagraphics.life-balance.desktop'=>1,
|
||||
'application/vnd.llamagraphics.life-balance.exchange+xml'=>1, 'application/vnd.lotus-1-2-3'=>1, 'application/vnd.lotus-approach'=>1, 'application/vnd.lotus-freelance'=>1,
|
||||
'application/vnd.lotus-notes'=>1, 'application/vnd.lotus-organizer'=>1, 'application/vnd.lotus-screencam'=>1, 'application/vnd.lotus-wordpro'=>1,
|
||||
'application/vnd.macports.portpkg'=>1, 'application/vnd.mcd'=>1, 'application/vnd.medcalcdata'=>1, 'application/vnd.mediastation.cdkey'=>1, 'application/vnd.mfer'=>1,
|
||||
'application/vnd.mfmp'=>1, 'application/vnd.micrografx.flo'=>1, 'application/vnd.micrografx.igx'=>1, 'application/vnd.mif'=>1, 'application/vnd.mobius.daf'=>1,
|
||||
'application/vnd.mobius.dis'=>1, 'application/vnd.mobius.mbk'=>1, 'application/vnd.mobius.mqy'=>1, 'application/vnd.mobius.msl'=>1, 'application/vnd.mobius.plc'=>1,
|
||||
'application/vnd.mobius.txf'=>1, 'application/vnd.mophun.application'=>1, 'application/vnd.mophun.certificate'=>1, 'application/vnd.mozilla.xul+xml'=>1,
|
||||
'application/vnd.ms-artgalry'=>1, 'application/vnd.ms-cab-compressed'=>1, 'application/vnd.ms-excel'=>1, 'application/vnd.ms-excel'=>1, 'application/vnd.ms-excel'=>1,
|
||||
'application/vnd.ms-excel'=>1, 'application/vnd.ms-excel'=>1, 'application/vnd.ms-excel'=>1, 'application/vnd.ms-excel.addin.macroenabled.12'=>1,
|
||||
'application/vnd.ms-excel.sheet.binary.macroenabled.12'=>1, 'application/vnd.ms-excel.sheet.macroenabled.12'=>1, 'application/vnd.ms-excel.template.macroenabled.12'=>1,
|
||||
'application/vnd.ms-fontobject'=>1, 'application/vnd.ms-htmlhelp'=>1, 'application/vnd.ms-ims'=>1, 'application/vnd.ms-lrm'=>1, 'application/vnd.ms-officetheme'=>1,
|
||||
'application/vnd.ms-pki.seccat'=>1, 'application/vnd.ms-pki.stl'=>1, 'application/vnd.ms-powerpoint'=>1, 'application/vnd.ms-powerpoint'=>1,
|
||||
'application/vnd.ms-powerpoint'=>1, 'application/vnd.ms-powerpoint.addin.macroenabled.12'=>1, 'application/vnd.ms-powerpoint.presentation.macroenabled.12'=>1,
|
||||
'application/vnd.ms-powerpoint.slide.macroenabled.12'=>1, 'application/vnd.ms-powerpoint.slideshow.macroenabled.12'=>1,
|
||||
'application/vnd.ms-powerpoint.template.macroenabled.12'=>1, 'application/vnd.ms-project'=>1, 'application/vnd.ms-project'=>1,
|
||||
'application/vnd.ms-word.document.macroenabled.12'=>1, 'application/vnd.ms-word.template.macroenabled.12'=>1, 'application/vnd.ms-works'=>1,
|
||||
'application/vnd.ms-works'=>1, 'application/vnd.ms-works'=>1, 'application/vnd.ms-works'=>1, 'application/vnd.ms-wpl'=>1, 'application/vnd.ms-xpsdocument'=>1,
|
||||
'application/vnd.mseq'=>1, 'application/vnd.musician'=>1, 'application/vnd.muvee.style'=>1, 'application/vnd.mynfc'=>1, 'application/vnd.neurolanguage.nlu'=>1,
|
||||
'application/vnd.nitf'=>1, 'application/vnd.nitf'=>1, 'application/vnd.noblenet-directory'=>1, 'application/vnd.noblenet-sealer'=>1, 'application/vnd.noblenet-web'=>1,
|
||||
'application/vnd.nokia.n-gage.data'=>1, 'application/vnd.nokia.n-gage.symbian.install'=>1, 'application/vnd.nokia.radio-preset'=>1, 'application/vnd.nokia.radio-presets'=>1,
|
||||
'application/vnd.novadigm.edm'=>1, 'application/vnd.novadigm.edx'=>1, 'application/vnd.novadigm.ext'=>1, 'application/vnd.oasis.opendocument.chart'=>1,
|
||||
'application/vnd.oasis.opendocument.chart-template'=>1, 'application/vnd.oasis.opendocument.database'=>1, 'application/vnd.oasis.opendocument.formula'=>1,
|
||||
'application/vnd.oasis.opendocument.formula-template'=>1, 'application/vnd.oasis.opendocument.graphics'=>1, 'application/vnd.oasis.opendocument.graphics-template'=>1,
|
||||
'application/vnd.oasis.opendocument.image'=>1, 'application/vnd.oasis.opendocument.image-template'=>1, 'application/vnd.oasis.opendocument.presentation'=>1,
|
||||
'application/vnd.oasis.opendocument.presentation-template'=>1, 'application/vnd.oasis.opendocument.spreadsheet'=>1, 'application/vnd.oasis.opendocument.spreadsheet-template'=>1,
|
||||
'application/vnd.oasis.opendocument.text'=>1, 'application/vnd.oasis.opendocument.text-master'=>1, 'application/vnd.oasis.opendocument.text-template'=>1,
|
||||
'application/vnd.oasis.opendocument.text-web'=>1, 'application/vnd.olpc-sugar'=>1, 'application/vnd.oma.dd2+xml'=>1, 'application/vnd.openofficeorg.extension'=>1,
|
||||
'application/vnd.openxmlformats-officedocument.presentationml.presentation'=>1, 'application/vnd.openxmlformats-officedocument.presentationml.slide'=>1,
|
||||
'application/vnd.openxmlformats-officedocument.presentationml.slideshow'=>1, 'application/vnd.openxmlformats-officedocument.presentationml.template'=>1,
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'=>1, 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'=>1,
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document'=>1, 'application/vnd.openxmlformats-officedocument.wordprocessingml.template'=>1,
|
||||
'application/vnd.osgeo.mapguide.package'=>1, 'application/vnd.osgi.dp'=>1, 'application/vnd.osgi.subsystem'=>1, 'application/vnd.palm'=>1, 'application/vnd.palm'=>1,
|
||||
'application/vnd.palm'=>1, 'application/vnd.pawaafile'=>1, 'application/vnd.pg.format'=>1, 'application/vnd.pg.osasli'=>1, 'application/vnd.picsel'=>1, 'application/vnd.pmi.widget'=>1,
|
||||
'application/vnd.pocketlearn'=>1, 'application/vnd.powerbuilder6'=>1, 'application/vnd.previewsystems.box'=>1, 'application/vnd.proteus.magazine'=>1,
|
||||
'application/vnd.publishare-delta-tree'=>1, 'application/vnd.pvi.ptid1'=>1, 'application/vnd.quark.quarkxpress'=>1, 'application/vnd.quark.quarkxpress'=>1,
|
||||
'application/vnd.quark.quarkxpress'=>1, 'application/vnd.quark.quarkxpress'=>1, 'application/vnd.quark.quarkxpress'=>1, 'application/vnd.quark.quarkxpress'=>1,
|
||||
'application/vnd.realvnc.bed'=>1, 'application/vnd.recordare.musicxml'=>1, 'application/vnd.recordare.musicxml+xml'=>1, 'application/vnd.rig.cryptonote'=>1,
|
||||
'application/vnd.rim.cod'=>1, 'application/vnd.rn-realmedia'=>1, 'application/vnd.rn-realmedia-vbr'=>1, 'application/vnd.route66.link66+xml'=>1, 'application/vnd.sailingtracker.track'=>1,
|
||||
'application/vnd.seemail'=>1, 'application/vnd.sema'=>1, 'application/vnd.semd'=>1, 'application/vnd.semf'=>1, 'application/vnd.shana.informed.formdata'=>1,
|
||||
'application/vnd.shana.informed.formtemplate'=>1, 'application/vnd.shana.informed.interchange'=>1, 'application/vnd.shana.informed.package'=>1, 'application/vnd.simtech-mindmapper'=>1,
|
||||
'application/vnd.simtech-mindmapper'=>1, 'application/vnd.smaf'=>1, 'application/vnd.smart.teacher'=>1, 'application/vnd.solent.sdkm+xml'=>1, 'application/vnd.solent.sdkm+xml'=>1,
|
||||
'application/vnd.spotfire.dxp'=>1, 'application/vnd.spotfire.sfs'=>1, 'application/vnd.stardivision.calc'=>1, 'application/vnd.stardivision.draw'=>1,
|
||||
'application/vnd.stardivision.impress'=>1, 'application/vnd.stardivision.math'=>1, 'application/vnd.stardivision.writer'=>1, 'application/vnd.stardivision.writer'=>1,
|
||||
'application/vnd.stardivision.writer-global'=>1, 'application/vnd.stepmania.package'=>1, 'application/vnd.stepmania.stepchart'=>1, 'application/vnd.sun.xml.calc'=>1,
|
||||
'application/vnd.sun.xml.calc.template'=>1, 'application/vnd.sun.xml.draw'=>1, 'application/vnd.sun.xml.draw.template'=>1, 'application/vnd.sun.xml.impress'=>1,
|
||||
'application/vnd.sun.xml.impress.template'=>1, 'application/vnd.sun.xml.math'=>1, 'application/vnd.sun.xml.writer'=>1, 'application/vnd.sun.xml.writer.global'=>1,
|
||||
'application/vnd.sun.xml.writer.template'=>1, 'application/vnd.sus-calendar'=>1, 'application/vnd.sus-calendar'=>1, 'application/vnd.svd'=>1, 'application/vnd.symbian.install'=>1,
|
||||
'application/vnd.symbian.install'=>1, 'application/vnd.syncml+xml'=>1, 'application/vnd.syncml.dm+wbxml'=>1, 'application/vnd.syncml.dm+xml'=>1,
|
||||
'application/vnd.tao.intent-module-archive'=>1, 'application/vnd.tcpdump.pcap'=>1, 'application/vnd.tcpdump.pcap'=>1, 'application/vnd.tcpdump.pcap'=>1,
|
||||
'application/vnd.tmobile-livetv'=>1, 'application/vnd.trid.tpt'=>1, 'application/vnd.triscape.mxs'=>1, 'application/vnd.trueapp'=>1, 'application/vnd.ufdl'=>1, 'application/vnd.ufdl'=>1,
|
||||
'application/vnd.uiq.theme'=>1, 'application/vnd.umajin'=>1, 'application/vnd.unity'=>1, 'application/vnd.uoml+xml'=>1, 'application/vnd.vcx'=>1, 'application/vnd.visio'=>1,
|
||||
'application/vnd.visio'=>1, 'application/vnd.visio'=>1, 'application/vnd.visio'=>1, 'application/vnd.visionary'=>1, 'application/vnd.vsf'=>1, 'application/vnd.wap.wbxml'=>1,
|
||||
'application/vnd.wap.wmlc'=>1, 'application/vnd.wap.wmlscriptc'=>1, 'application/vnd.webturbo'=>1, 'application/vnd.wolfram.player'=>1, 'application/vnd.wordperfect'=>1,
|
||||
'application/vnd.wqd'=>1, 'application/vnd.wt.stf'=>1, 'application/vnd.xara'=>1, 'application/vnd.xfdl'=>1, 'application/vnd.yamaha.hv-dic'=>1, 'application/vnd.yamaha.hv-script'=>1,
|
||||
'application/vnd.yamaha.hv-voice'=>1, 'application/vnd.yamaha.openscoreformat'=>1, 'application/vnd.yamaha.openscoreformat.osfpvg+xml'=>1, 'application/vnd.yamaha.smaf-audio'=>1,
|
||||
'application/vnd.yamaha.smaf-phrase'=>1, 'application/vnd.yellowriver-custom-menu'=>1, 'application/vnd.zul'=>1, 'application/vnd.zul'=>1, 'application/vnd.zzazz.deck+xml'=>1,
|
||||
'application/voicexml+xml'=>1, 'application/widget'=>1, 'application/winhlp'=>1, 'application/wsdl+xml'=>1, 'application/wspolicy+xml'=>1, 'application/x-7z-compressed'=>1,
|
||||
'application/x-abiword'=>1, 'application/x-ace-compressed'=>1, 'application/x-apple-diskimage'=>1, 'application/x-authorware-bin'=>1, 'application/x-authorware-bin'=>1,
|
||||
'application/x-authorware-bin'=>1, 'application/x-authorware-bin'=>1, 'application/x-authorware-map'=>1, 'application/x-authorware-seg'=>1, 'application/x-bcpio'=>1,
|
||||
'application/x-bittorrent'=>1, 'application/x-blorb'=>1, 'application/x-blorb'=>1, 'application/x-bzip'=>1, 'application/x-bzip2'=>1, 'application/x-bzip2'=>1, 'application/x-cbr'=>1,
|
||||
'application/x-cbr'=>1, 'application/x-cbr'=>1, 'application/x-cbr'=>1, 'application/x-cbr'=>1, 'application/x-cdlink'=>1, 'application/x-cfs-compressed'=>1, 'application/x-chat'=>1,
|
||||
'application/x-chess-pgn'=>1, 'application/x-conference'=>1, 'application/x-cpio'=>1, 'application/x-csh'=>1, 'application/x-debian-package'=>1, 'application/x-debian-package'=>1,
|
||||
'application/x-dgc-compressed'=>1, 'application/x-director'=>1, 'application/x-director'=>1, 'application/x-director'=>1, 'application/x-director'=>1, 'application/x-director'=>1,
|
||||
'application/x-director'=>1, 'application/x-director'=>1, 'application/x-director'=>1, 'application/x-director'=>1, 'application/x-doom'=>1, 'application/x-dtbncx+xml'=>1,
|
||||
'application/x-dtbook+xml'=>1, 'application/x-dtbresource+xml'=>1, 'application/x-dvi'=>1, 'application/x-envoy'=>1, 'application/x-eva'=>1, 'application/x-font-bdf'=>1,
|
||||
'application/x-font-ghostscript'=>1, 'application/x-font-linux-psf'=>1, 'application/x-font-otf'=>1, 'application/x-font-pcf'=>1, 'application/x-font-snf'=>1,
|
||||
'application/x-font-ttf'=>1, 'application/x-font-ttf'=>1, 'application/x-font-type1'=>1, 'application/x-font-type1'=>1, 'application/x-font-type1'=>1, 'application/x-font-type1'=>1,
|
||||
'application/x-font-woff'=>1, 'application/x-freearc'=>1, 'application/x-futuresplash'=>1, 'application/x-gca-compressed'=>1, 'application/x-glulx'=>1, 'application/x-gnumeric'=>1,
|
||||
'application/x-gramps-xml'=>1, 'application/x-gtar'=>1, 'application/x-hdf'=>1, 'application/x-install-instructions'=>1, 'application/x-iso9660-image'=>1,
|
||||
'application/x-java-jnlp-file'=>1, 'application/x-latex'=>1, 'application/x-lzh-compressed'=>1, 'application/x-lzh-compressed'=>1, 'application/x-mie'=>1,
|
||||
'application/x-mobipocket-ebook'=>1, 'application/x-mobipocket-ebook'=>1, 'application/x-ms-application'=>1, 'application/x-ms-shortcut'=>1, 'application/x-ms-wmd'=>1,
|
||||
'application/x-ms-wmz'=>1, 'application/x-ms-xbap'=>1, 'application/x-msaccess'=>1, 'application/x-msbinder'=>1, 'application/x-mscardfile'=>1, 'application/x-msclip'=>1,
|
||||
'application/x-msdownload'=>1, 'application/x-msdownload'=>1, 'application/x-msdownload'=>1, 'application/x-msdownload'=>1, 'application/x-msdownload'=>1, 'application/x-msmediaview'=>1,
|
||||
'application/x-msmediaview'=>1, 'application/x-msmediaview'=>1, 'application/x-msmetafile'=>1, 'application/x-msmetafile'=>1, 'application/x-msmetafile'=>1, 'application/x-msmetafile'=>1,
|
||||
'application/x-msmoney'=>1, 'application/x-mspublisher'=>1, 'application/x-msschedule'=>1, 'application/x-msterminal'=>1, 'application/x-mswrite'=>1, 'application/x-netcdf'=>1,
|
||||
'application/x-netcdf'=>1, 'application/x-nzb'=>1, 'application/x-pkcs12'=>1, 'application/x-pkcs12'=>1, 'application/x-pkcs7-certificates'=>1, 'application/x-pkcs7-certificates'=>1,
|
||||
'application/x-pkcs7-certreqresp'=>1, 'application/x-rar-compressed'=>1, 'application/x-research-info-systems'=>1, 'application/x-sh'=>1, 'application/x-shar'=>1,
|
||||
'application/x-shockwave-flash'=>1, 'application/x-silverlight-app'=>1, 'application/x-silverlight-2'=>1, 'application/x-sql'=>1, 'application/x-stuffit'=>1, 'application/x-stuffitx'=>1,
|
||||
'application/x-subrip'=>1, 'application/x-sv4cpio'=>1, 'application/x-sv4crc'=>1, 'application/x-t3vm-image'=>1, 'application/x-tads'=>1, 'application/x-tar'=>1, 'application/x-tcl'=>1,
|
||||
'application/x-tex'=>1, 'application/x-tex-tfm'=>1, 'application/x-texinfo'=>1, 'application/x-texinfo'=>1, 'application/x-tgif'=>1, 'application/x-ustar'=>1, 'application/x-wais-source'=>1,
|
||||
'application/x-x509-ca-cert'=>1, 'application/x-x509-ca-cert'=>1, 'application/x-xfig'=>1, 'application/x-xliff+xml'=>1, 'application/x-xpinstall'=>1, 'application/x-xz'=>1,
|
||||
'application/x-zmachine'=>1, 'application/x-zmachine'=>1, 'application/x-zmachine'=>1, 'application/x-zmachine'=>1, 'application/x-zmachine'=>1, 'application/x-zmachine'=>1,
|
||||
'application/x-zmachine'=>1, 'application/x-zmachine'=>1, 'application/xaml+xml'=>1, 'application/xcap-diff+xml'=>1, 'application/xenc+xml'=>1, 'application/xhtml+xml'=>1,
|
||||
'application/xhtml+xml'=>1, 'application/xml'=>1, 'application/xml'=>1, 'application/xml-dtd'=>1, 'application/xop+xml'=>1, 'application/xproc+xml'=>1, 'application/xslt+xml'=>1,
|
||||
'application/xspf+xml'=>1, 'application/xv+xml'=>1, 'application/xv+xml'=>1, 'application/xv+xml'=>1, 'application/xv+xml'=>1, 'application/yang'=>1, 'application/yin+xml'=>1,
|
||||
'application/zip'=>1, 'audio/adpcm'=>1, 'audio/basic'=>1, 'audio/basic'=>1, 'audio/midi'=>1, 'audio/midi'=>1, 'audio/midi'=>1, 'audio/midi'=>1, 'audio/mp4'=>1, 'audio/mpeg'=>1,
|
||||
'audio/mpeg'=>1, 'audio/mpeg'=>1, 'audio/mpeg'=>1, 'audio/mpeg'=>1, 'audio/mpeg'=>1, 'audio/ogg'=>1, 'audio/ogg'=>1, 'audio/ogg'=>1, 'audio/s3m'=>1, 'audio/silk'=>1,
|
||||
'audio/vnd.dece.audio'=>1, 'audio/vnd.dece.audio'=>1, 'audio/vnd.digital-winds'=>1, 'audio/vnd.dra'=>1, 'audio/vnd.dts'=>1, 'audio/vnd.dts.hd'=>1, 'audio/vnd.lucent.voice'=>1,
|
||||
'audio/vnd.ms-playready.media.pya'=>1, 'audio/vnd.nuera.ecelp4800'=>1, 'audio/vnd.nuera.ecelp7470'=>1, 'audio/vnd.nuera.ecelp9600'=>1, 'audio/vnd.rip'=>1, 'audio/webm'=>1,
|
||||
'audio/x-aac'=>1, 'audio/x-aiff'=>1, 'audio/x-aiff'=>1, 'audio/x-aiff'=>1, 'audio/x-caf'=>1, 'audio/x-flac'=>1, 'audio/x-matroska'=>1, 'audio/x-mpegurl'=>1, 'audio/x-ms-wax'=>1,
|
||||
'audio/x-ms-wma'=>1, 'audio/x-pn-realaudio'=>1, 'audio/x-pn-realaudio'=>1, 'audio/x-pn-realaudio-plugin'=>1, 'audio/x-wav'=>1, 'audio/xm'=>1, 'chemical/x-cdx'=>1, 'chemical/x-cif'=>1,
|
||||
'chemical/x-cmdf'=>1, 'chemical/x-cml'=>1, 'chemical/x-csml'=>1, 'chemical/x-xyz'=>1, 'image/bmp'=>1, 'image/cgm'=>1, 'image/g3fax'=>1, 'image/gif'=>1, 'image/ief'=>1, 'image/jpeg'=>1,
|
||||
'image/jpeg'=>1, 'image/jpeg'=>1, 'image/ktx'=>1, 'image/png'=>1, 'image/prs.btif'=>1, 'image/sgi'=>1, 'image/svg+xml'=>1, 'image/svg+xml'=>1, 'image/tiff'=>1, 'image/tiff'=>1,
|
||||
'image/vnd.adobe.photoshop'=>1, 'image/vnd.dece.graphic'=>1, 'image/vnd.dece.graphic'=>1, 'image/vnd.dece.graphic'=>1, 'image/vnd.dece.graphic'=>1, 'image/vnd.dvb.subtitle'=>1,
|
||||
'image/vnd.djvu'=>1, 'image/vnd.djvu'=>1, 'image/vnd.dwg'=>1, 'image/vnd.dxf'=>1, 'image/vnd.fastbidsheet'=>1, 'image/vnd.fpx'=>1, 'image/vnd.fst'=>1, 'image/vnd.fujixerox.edmics-mmr'=>1,
|
||||
'image/vnd.fujixerox.edmics-rlc'=>1, 'image/vnd.ms-modi'=>1, 'image/vnd.ms-photo'=>1, 'image/vnd.net-fpx'=>1, 'image/vnd.wap.wbmp'=>1, 'image/vnd.xiff'=>1, 'image/webp'=>1,
|
||||
'image/x-3ds'=>1, 'image/x-cmu-raster'=>1, 'image/x-cmx'=>1, 'image/x-freehand'=>1, 'image/x-freehand'=>1, 'image/x-freehand'=>1, 'image/x-freehand'=>1, 'image/x-freehand'=>1,
|
||||
'image/x-icon'=>1, 'image/x-mrsid-image'=>1, 'image/x-pcx'=>1, 'image/x-pict'=>1, 'image/x-pict'=>1, 'image/x-portable-anymap'=>1, 'image/x-portable-bitmap'=>1,
|
||||
'image/x-portable-graymap'=>1, 'image/x-portable-pixmap'=>1, 'image/x-rgb'=>1, 'image/x-tga'=>1, 'image/x-xbitmap'=>1, 'image/x-xpixmap'=>1, 'image/x-xwindowdump'=>1,
|
||||
'message/rfc822'=>1, 'message/rfc822'=>1, 'model/iges'=>1, 'model/iges'=>1, 'model/mesh'=>1, 'model/mesh'=>1, 'model/mesh'=>1, 'model/vnd.collada+xml'=>1, 'model/vnd.dwf'=>1,
|
||||
'model/vnd.gdl'=>1, 'model/vnd.gtw'=>1, 'model/vnd.mts'=>1, 'model/vnd.vtu'=>1, 'model/vrml'=>1, 'model/vrml'=>1, 'model/x3d+binary'=>1, 'model/x3d+binary'=>1, 'model/x3d+vrml'=>1,
|
||||
'model/x3d+vrml'=>1, 'model/x3d+xml'=>1, 'model/x3d+xml'=>1, 'video/3gpp'=>1, 'video/3gpp2'=>1, 'video/h261'=>1, 'video/h263'=>1, 'video/h264'=>1, 'video/jpeg'=>1, 'video/jpm'=>1,
|
||||
'video/jpm'=>1, 'video/mj2'=>1, 'video/mj2'=>1, 'video/mp4'=>1, 'video/mp4'=>1, 'video/mp4'=>1, 'video/mpeg'=>1, 'video/mpeg'=>1, 'video/mpeg'=>1, 'video/mpeg'=>1, 'video/mpeg'=>1,
|
||||
'video/ogg'=>1, 'video/quicktime'=>1, 'video/quicktime'=>1, 'video/vnd.dece.hd'=>1, 'video/vnd.dece.hd'=>1, 'video/vnd.dece.mobile'=>1, 'video/vnd.dece.mobile'=>1, 'video/vnd.dece.pd'=>1,
|
||||
'video/vnd.dece.pd'=>1, 'video/vnd.dece.sd'=>1, 'video/vnd.dece.sd'=>1, 'video/vnd.dece.video'=>1, 'video/vnd.dece.video'=>1, 'video/vnd.dvb.file'=>1, 'video/vnd.fvt'=>1,
|
||||
'video/vnd.mpegurl'=>1, 'video/vnd.mpegurl'=>1, 'video/vnd.ms-playready.media.pyv'=>1, 'video/vnd.uvvu.mp4'=>1, 'video/vnd.uvvu.mp4'=>1, 'video/vnd.vivo'=>1, 'video/webm'=>1,
|
||||
'video/x-f4v'=>1, 'video/x-fli'=>1, 'video/x-flv'=>1, 'video/x-m4v'=>1, 'video/x-matroska'=>1, 'video/x-matroska'=>1, 'video/x-matroska'=>1, 'video/x-mng'=>1, 'video/x-ms-asf'=>1,
|
||||
'video/x-ms-asf'=>1, 'video/x-ms-vob'=>1, 'video/x-ms-wm'=>1, 'video/x-ms-wmv'=>1, 'video/x-ms-wmx'=>1, 'video/x-ms-wvx'=>1, 'video/x-msvideo'=>1, 'video/x-sgi-movie'=>1,
|
||||
'video/x-smv'=>1, 'x-conference/x-cooltalk'=>1
|
||||
);
|
||||
var $extList = array('ez'=>1, 'aw'=>1, 'atom'=>1, 'atomcat'=>1, 'atomsvc'=>1, 'ccxml'=>1, 'cdmia'=>1, 'cdmic'=>1, 'cdmid'=>1, 'cdmio'=>1, 'cdmiq'=>1, 'cu'=>1, 'davmount'=>1,
|
||||
'dbk'=>1, 'dssc'=>1, 'xdssc'=>1, 'ecma'=>1, 'emma'=>1, 'epub'=>1, 'exi'=>1, 'pfr'=>1, 'gml'=>1, 'gpx'=>1, 'gxf'=>1, 'stk'=>1, 'ink'=>1, 'inkml'=>1, 'ipfix'=>1, 'jar'=>1,
|
||||
'ser'=>1, 'class'=>1, 'js'=>1, 'json'=>1, 'jsonml'=>1, 'lostxml'=>1, 'hqx'=>1, 'cpt'=>1, 'mads'=>1, 'mrc'=>1, 'mrcx'=>1, 'ma'=>1, 'nb'=>1, 'mb'=>1, 'mathml'=>1, 'mbox'=>1,
|
||||
'mscml'=>1, 'metalink'=>1, 'meta4'=>1, 'mets'=>1, 'mods'=>1, 'm21 mp21'=>1, 'mp4s'=>1, 'doc dot'=>1, 'mxf'=>1, 'bin'=>1, 'dms'=>1, 'lrf'=>1, 'mar'=>1, 'so'=>1, 'dist'=>1,
|
||||
'distz'=>1, 'pkg'=>1, 'bpk'=>1, 'dump'=>1, 'elc'=>1, 'deploy'=>1, 'oda'=>1, 'opf'=>1, 'ogx'=>1, 'omdoc'=>1, 'onetoc'=>1, 'onetoc2'=>1, 'onetmp'=>1, 'onepkg'=>1, 'oxps'=>1,
|
||||
'xer'=>1, 'pdf'=>1, 'pgp'=>1, 'asc'=>1, 'sig'=>1, 'prf'=>1, 'p10'=>1, 'p7m'=>1, 'p7c'=>1, 'p7s'=>1, 'p8'=>1, 'ac'=>1, 'cer'=>1, 'crl'=>1, 'pkipath'=>1, 'pki'=>1, 'pls'=>1,
|
||||
'ai'=>1, 'eps'=>1, 'ps'=>1, 'cww'=>1, 'pskcxml'=>1, 'rdf'=>1, 'rif'=>1, 'rnc'=>1, 'rl'=>1, 'rld'=>1, 'rs'=>1, 'gbr'=>1, 'mft'=>1, 'roa'=>1, 'rsd'=>1, 'rss'=>1, 'rtf'=>1,
|
||||
'sbml'=>1, 'scq'=>1, 'scs'=>1, 'spq'=>1, 'spp'=>1, 'sdp'=>1, 'setpay'=>1, 'setreg'=>1, 'shf'=>1, 'smi'=>1, 'smil'=>1, 'rq'=>1, 'srx'=>1, 'gram'=>1, 'grxml'=>1, 'sru'=>1,
|
||||
'ssdl'=>1, 'ssml'=>1, 'tei'=>1, 'teicorpus'=>1, 'tfi'=>1, 'tsd'=>1, 'plb'=>1, 'psb'=>1, 'pvb'=>1, 'tcap'=>1, 'pwn'=>1, 'aso'=>1, 'imp'=>1, 'acu'=>1, 'atc'=>1, 'acutc'=>1,
|
||||
'air'=>1, 'fcdt'=>1, 'fxp'=>1, 'fxpl'=>1, 'xdp'=>1, 'xfdf'=>1, 'ahead'=>1, 'azf'=>1, 'azs'=>1, 'azw'=>1, 'acc'=>1, 'ami'=>1, 'apk'=>1, 'cii'=>1, 'fti'=>1, 'atx'=>1, 'mpkg'=>1,
|
||||
'm3u8'=>1, 'swi'=>1, 'iota'=>1, 'aep'=>1, 'mpm'=>1, 'bmi'=>1, 'rep'=>1, 'cdxml'=>1, 'mmd'=>1, 'cdy'=>1, 'cla'=>1, 'rp9'=>1, 'c4g'=>1, 'c4d'=>1, 'c4f'=>1, 'c4p'=>1, 'c4u'=>1,
|
||||
'c11amc'=>1, 'c11amz'=>1, 'csp'=>1, 'cdbcmsg'=>1, 'cmc'=>1, 'clkx'=>1, 'clkk'=>1, 'clkp'=>1, 'clkt'=>1, 'clkw'=>1, 'wbs'=>1, 'pml'=>1, 'ppd'=>1, 'car'=>1, 'pcurl'=>1, 'dart'=>1,
|
||||
'rdz'=>1, 'uvf'=>1, 'uvvf'=>1, 'uvd'=>1, 'uvvd'=>1, 'uvt'=>1, 'uvvt'=>1, 'uvx'=>1, 'uvvx'=>1, 'uvz'=>1, 'uvvz'=>1, 'fe_launch'=>1, 'dna'=>1, 'mlp'=>1, 'dpg'=>1, 'dfac'=>1,
|
||||
'kpxx'=>1, 'ait'=>1, 'svc'=>1, 'geo'=>1, 'mag'=>1, 'nml'=>1, 'esf'=>1, 'msf'=>1, 'qam'=>1, 'slt'=>1, 'ssf'=>1, 'es3'=>1, 'et3'=>1, 'ez2'=>1, 'ez3'=>1, 'fdf'=>1, 'mseed'=>1,
|
||||
'seed'=>1, 'dataless'=>1, 'gph'=>1, 'ftc'=>1, 'fm'=>1, 'frame'=>1, 'maker'=>1, 'book'=>1, 'fnc'=>1, 'ltf'=>1, 'fsc'=>1, 'oas'=>1, 'oa2'=>1, 'oa3'=>1, 'fg5'=>1, 'bh2'=>1, 'ddd'=>1,
|
||||
'xdw'=>1, 'xbd'=>1, 'fzs'=>1, 'txd'=>1, 'ggb'=>1, 'ggt'=>1, 'gex'=>1, 'gre'=>1, 'gxt'=>1, 'g2w'=>1, 'g3w'=>1, 'gmx'=>1, 'kml'=>1, 'kmz'=>1, 'gqf'=>1, 'gqs'=>1, 'gac'=>1, 'ghf'=>1,
|
||||
'gim'=>1, 'grv'=>1, 'gtm'=>1, 'tpl'=>1, 'vcg'=>1, 'hal'=>1, 'zmm'=>1, 'hbci'=>1, 'les'=>1, 'hpgl'=>1, 'hpid'=>1, 'hps'=>1, 'jlt'=>1, 'pcl'=>1, 'pclxl'=>1, 'sfd-hdstx'=>1, 'mpy'=>1,
|
||||
'afp'=>1, 'listafp'=>1, 'list3820'=>1, 'irm'=>1, 'sc'=>1, 'icc'=>1, 'icm'=>1, 'igl'=>1, 'ivp'=>1, 'ivu'=>1, 'igm'=>1, 'xpw'=>1, 'xpx'=>1, 'i2g'=>1, 'qbo'=>1, 'qfx'=>1,
|
||||
'rcprofile'=>1, 'irp'=>1, 'xpr'=>1, 'fcs'=>1, 'jam'=>1, 'rms'=>1, 'jisp'=>1, 'joda'=>1, 'ktz'=>1, 'ktr'=>1, 'karbon'=>1, 'chrt'=>1, 'kfo'=>1, 'flw'=>1, 'kon'=>1, 'kpr'=>1, 'kpt'=>1,
|
||||
'ksp'=>1, 'kwd'=>1, 'kwt'=>1, 'htke'=>1, 'kia'=>1, 'kne'=>1, 'knp'=>1, 'skp'=>1, 'skd'=>1, 'skt'=>1, 'skm'=>1, 'sse'=>1, 'lasxml'=>1, 'lbd'=>1, 'lbe'=>1, '123'=>1, 'apr'=>1,
|
||||
'pre'=>1, 'nsf'=>1, 'org'=>1, 'scm'=>1, 'lwp'=>1, 'portpkg'=>1, 'mcd'=>1, 'mc1'=>1, 'cdkey'=>1, 'mwf'=>1, 'mfm'=>1, 'flo'=>1, 'igx'=>1, 'mif'=>1, 'daf'=>1, 'dis'=>1, 'mbk'=>1,
|
||||
'mqy'=>1, 'msl'=>1, 'plc'=>1, 'txf'=>1, 'mpn'=>1, 'mpc'=>1, 'xul'=>1, 'cil'=>1, 'cab'=>1, 'xls'=>1, 'xlm'=>1, 'xla'=>1, 'xlc'=>1, 'xlt'=>1, 'xlw'=>1, 'xlam'=>1, 'xlsb'=>1, 'xlsm'=>1,
|
||||
'xltm'=>1, 'eot'=>1, 'chm'=>1, 'ims'=>1, 'lrm'=>1, 'thmx'=>1, 'cat'=>1, 'stl'=>1, 'ppt'=>1, 'pps'=>1, 'pot'=>1, 'ppam'=>1, 'pptm'=>1, 'sldm'=>1, 'ppsm'=>1, 'potm'=>1, 'mpp'=>1,
|
||||
'mpt'=>1, 'docm'=>1, 'dotm'=>1, 'wps'=>1, 'wks'=>1, 'wcm'=>1, 'wdb'=>1, 'wpl'=>1, 'xps'=>1, 'mseq'=>1, 'mus'=>1, 'msty'=>1, 'taglet'=>1, 'nlu'=>1, 'nitf'=>1, 'nitf'=>1, 'nnd'=>1,
|
||||
'nns'=>1, 'nnw'=>1, 'ngdat'=>1, 'n-gage'=>1, 'rpst'=>1, 'rpss'=>1, 'edm'=>1, 'edx'=>1, 'ext'=>1, 'odc'=>1, 'otc'=>1, 'odb'=>1, 'odf'=>1, 'odft'=>1, 'odg'=>1, 'otg'=>1, 'odi'=>1,
|
||||
'oti'=>1, 'odp'=>1, 'otp'=>1, 'ods'=>1, 'ots'=>1, 'odt'=>1, 'odm'=>1, 'ott'=>1, 'oth'=>1, 'xo'=>1, 'dd2'=>1, 'oxt'=>1, 'pptx'=>1, 'sldx'=>1, 'ppsx'=>1, 'potx'=>1, 'xlsx'=>1, 'xltx'=>1,
|
||||
'docx'=>1, 'dotx'=>1, 'mgp'=>1, 'dp'=>1, 'esa'=>1, 'pdb'=>1, 'pqa'=>1, 'oprc'=>1, 'paw'=>1, 'str'=>1, 'ei6'=>1, 'efif'=>1, 'wg'=>1, 'plf'=>1, 'pbd'=>1, 'box'=>1, 'mgz'=>1, 'qps'=>1,
|
||||
'ptid'=>1, 'qxd'=>1, 'qxt'=>1, 'qwd'=>1, 'qwt'=>1, 'qxl'=>1, 'qxb'=>1, 'bed'=>1, 'mxl'=>1, 'musicxml'=>1, 'cryptonote'=>1, 'cod'=>1, 'rm'=>1, 'rmvb'=>1, 'link66'=>1, 'st'=>1, 'see'=>1,
|
||||
'sema'=>1, 'semd'=>1, 'semf'=>1, 'ifm'=>1, 'itp'=>1, 'iif'=>1, 'ipk'=>1, 'twd'=>1, 'twds'=>1, 'mmf'=>1, 'teacher'=>1, 'sdkm'=>1, 'sdkd'=>1, 'dxp'=>1, 'sfs'=>1, 'sdc'=>1, 'sda'=>1,
|
||||
'sdd'=>1, 'smf'=>1, 'sdw'=>1, 'vor'=>1, 'sgl'=>1, 'smzip'=>1, 'sm'=>1, 'sxc'=>1, 'stc'=>1, 'sxd'=>1, 'std'=>1, 'sxi'=>1, 'sti'=>1, 'sxm'=>1, 'sxw'=>1, 'sxg'=>1, 'stw'=>1, 'sus'=>1,
|
||||
'susp'=>1, 'svd'=>1, 'sis'=>1, 'sisx'=>1, 'xsm'=>1, 'bdm'=>1, 'xdm'=>1, 'tao'=>1, 'pcap'=>1, 'cap'=>1, 'dmp'=>1, 'tmo'=>1, 'tpt'=>1, 'mxs'=>1, 'tra'=>1, 'ufd'=>1, 'ufdl'=>1, 'utz'=>1,
|
||||
'umj'=>1, 'unityweb'=>1, 'uoml'=>1, 'vcx'=>1, 'vsd'=>1, 'vst'=>1, 'vss'=>1, 'vsw'=>1, 'vis'=>1, 'vsf'=>1, 'wbxml'=>1, 'wmlc'=>1, 'wmlsc'=>1, 'wtb'=>1, 'nbp'=>1, 'wpd'=>1, 'wqd'=>1,
|
||||
'stf'=>1, 'xar'=>1, 'xfdl'=>1, 'hvd'=>1, 'hvs'=>1, 'hvp'=>1, 'osf'=>1, 'osfpvg'=>1, 'saf'=>1, 'spf'=>1, 'cmp'=>1, 'zir'=>1, 'zirz'=>1, 'zaz'=>1, 'vxml'=>1, 'wgt'=>1, 'hlp'=>1, 'wsdl'=>1,
|
||||
'wspolicy'=>1, '7z'=>1, 'abw'=>1, 'ace'=>1, 'dmg'=>1, 'aab'=>1, 'x32'=>1, 'u32'=>1, 'vox'=>1, 'aam'=>1, 'aas'=>1, 'bcpio'=>1, 'torrent'=>1, 'blb'=>1, 'blorb'=>1, 'bz'=>1, 'bz2'=>1,
|
||||
'boz'=>1, 'cbr'=>1, 'cba'=>1, 'cbt'=>1, 'cbz'=>1, 'cb7'=>1, 'vcd'=>1, 'cfs'=>1, 'chat'=>1, 'pgn'=>1, 'nsc'=>1, 'cpio'=>1, 'csh'=>1, 'deb'=>1, 'udeb'=>1, 'dgc'=>1, 'dir'=>1, 'dcr'=>1,
|
||||
'dxr'=>1, 'cst'=>1, 'cct'=>1, 'cxt'=>1, 'w3d'=>1, 'fgd'=>1, 'swa'=>1, 'wad'=>1, 'ncx'=>1, 'dtb'=>1, 'res'=>1, 'dvi'=>1, 'evy'=>1, 'eva'=>1, 'bdf'=>1, 'gsf'=>1, 'psf'=>1, 'otf'=>1,
|
||||
'pcf'=>1, 'snf'=>1, 'ttf'=>1, 'ttc'=>1, 'pfa'=>1, 'pfb'=>1, 'pfm'=>1, 'afm'=>1, 'woff'=>1, 'arc'=>1, 'spl'=>1, 'gca'=>1, 'ulx'=>1, 'gnumeric'=>1, 'gramps'=>1, 'gtar'=>1, 'hdf'=>1,
|
||||
'install'=>1, 'iso'=>1, 'jnlp'=>1, 'latex'=>1, 'lzh'=>1, 'lha'=>1, 'mie'=>1, 'prc'=>1, 'mobi'=>1, 'application'=>1, 'lnk'=>1, 'wmd'=>1, 'wmz'=>1, 'xbap'=>1, 'mdb'=>1, 'obd'=>1,
|
||||
'crd'=>1, 'clp'=>1, 'exe'=>1, 'dll'=>1, 'com'=>1, 'bat'=>1, 'msi'=>1, 'mvb'=>1, 'm13'=>1, 'm14'=>1, 'wmf'=>1, 'wmz'=>1, 'emf'=>1, 'emz'=>1, 'mny'=>1, 'pub'=>1, 'scd'=>1, 'trm'=>1,
|
||||
'wri'=>1, 'nc'=>1, 'cdf'=>1, 'nzb'=>1, 'p12'=>1, 'pfx'=>1, 'p7b'=>1, 'spc'=>1, 'p7r'=>1, 'rar'=>1, 'ris'=>1, 'sh'=>1, 'shar'=>1, 'swf'=>1, 'xap'=>1, 'sql'=>1, 'sit'=>1, 'sitx'=>1,
|
||||
'srt'=>1, 'sv4cpio'=>1, 'sv4crc'=>1, 't3'=>1, 'gam'=>1, 'tar'=>1, 'tcl'=>1, 'tex'=>1, 'tfm'=>1, 'texinfo'=>1, 'texi'=>1, 'obj'=>1, 'ustar'=>1, 'src'=>1, 'der'=>1, 'crt'=>1, 'fig'=>1,
|
||||
'xlf'=>1, 'xpi'=>1, 'xz'=>1, 'z1'=>1, 'z2'=>1, 'z3'=>1, 'z4'=>1, 'z5'=>1, 'z6'=>1, 'z7'=>1, 'z8'=>1, 'xaml'=>1, 'xdf'=>1, 'xenc'=>1, 'xhtml'=>1, 'xht'=>1, 'xml'=>1, 'xsl'=>1, 'dtd'=>1,
|
||||
'xop'=>1, 'xpl'=>1, 'xslt'=>1, 'xspf'=>1, 'mxml'=>1, 'xhvml'=>1, 'xvml'=>1, 'xvm'=>1, 'yang'=>1, 'yin'=>1, 'zip'=>1, 'adp'=>1, 'au'=>1, 'snd'=>1, 'mid'=>1, 'midi'=>1, 'kar'=>1, 'rmi'=>1,
|
||||
'mp4a'=>1, 'mpga'=>1, 'mp2'=>1, 'mp2a'=>1, 'mp3'=>1, 'm2a'=>1, 'm3a'=>1, 'oga'=>1, 'ogg'=>1, 'spx'=>1, 's3m'=>1, 'sil'=>1, 'uva'=>1, 'uvva'=>1, 'eol'=>1, 'dra'=>1, 'dts'=>1, 'dtshd'=>1,
|
||||
'lvp'=>1, 'pya'=>1, 'ecelp4800'=>1, 'ecelp7470'=>1, 'ecelp9600'=>1, 'rip'=>1, 'weba'=>1, 'aac'=>1, 'aif'=>1, 'aiff'=>1, 'aifc'=>1, 'caf'=>1, 'flac'=>1, 'mka'=>1, 'm3u'=>1, 'wax'=>1,
|
||||
'wma'=>1, 'ram'=>1, 'ra'=>1, 'rmp'=>1, 'wav'=>1, 'xm'=>1, 'cdx'=>1, 'cif'=>1, 'cmdf'=>1, 'cml'=>1, 'csml'=>1, 'xyz'=>1, 'bmp'=>1, 'cgm'=>1, 'g3'=>1, 'gif'=>1, 'ief'=>1, 'jpeg'=>1,
|
||||
'jpg'=>1, 'jpe'=>1, 'ktx'=>1, 'png'=>1, 'btif'=>1, 'sgi'=>1, 'svg'=>1, 'svgz'=>1, 'tiff'=>1, 'tif'=>1, 'psd'=>1, 'uvi'=>1, 'uvvi'=>1, 'uvg'=>1, 'uvvg'=>1, 'sub'=>1, 'djvu'=>1, 'djv'=>1,
|
||||
'dwg'=>1, 'dxf'=>1, 'fbs'=>1, 'fpx'=>1, 'fst'=>1, 'mmr'=>1, 'rlc'=>1, 'mdi'=>1, 'wdp'=>1, 'npx'=>1, 'wbmp'=>1, 'xif'=>1, 'webp'=>1, '3ds'=>1, 'ras'=>1, 'cmx'=>1, 'fh'=>1, 'fhc'=>1,
|
||||
'fh4'=>1, 'fh5'=>1, 'fh7'=>1, 'ico'=>1, 'sid'=>1, 'pcx'=>1, 'pic'=>1, 'pct'=>1, 'pnm'=>1, 'pbm'=>1, 'pgm'=>1, 'ppm'=>1, 'rgb'=>1, 'tga'=>1, 'xbm'=>1, 'xpm'=>1, 'xwd'=>1, 'eml'=>1,
|
||||
'mime'=>1, 'igs'=>1, 'iges'=>1, 'msh'=>1, 'mesh'=>1, 'silo'=>1, 'dae'=>1, 'dwf'=>1, 'gdl'=>1, 'gtw'=>1, 'mts'=>1, 'vtu'=>1, 'wrl'=>1, 'vrml'=>1, 'x3db'=>1, 'x3dbz'=>1, 'x3dv'=>1,
|
||||
'x3dvz'=>1, 'x3d'=>1, 'x3dz'=>1, '3gp'=>1, '3g2'=>1, 'h261'=>1, 'h263'=>1, 'h264'=>1, 'jpgv'=>1, 'jpm'=>1, 'jpgm'=>1, 'mj2'=>1, 'mjp2'=>1, 'mp4'=>1, 'mp4v'=>1, 'mpg4'=>1, 'mpeg'=>1,
|
||||
'mpg'=>1, 'mpe'=>1, 'm1v'=>1, 'm2v'=>1, 'ogv'=>1, 'qt'=>1, 'mov'=>1, 'uvh'=>1, 'uvvh'=>1, 'uvm'=>1, 'uvvm'=>1, 'uvp'=>1, 'uvvp'=>1, 'uvs'=>1, 'uvvs'=>1, 'uvv'=>1, 'uvvv'=>1, 'dvb'=>1,
|
||||
'fvt'=>1, 'mxu'=>1, 'm4u'=>1, 'pyv'=>1, 'uvu'=>1, 'uvvu'=>1, 'viv'=>1, 'webm'=>1, 'f4v'=>1, 'fli'=>1, 'flv'=>1, 'm4v'=>1, 'mkv'=>1, 'mk3d'=>1, 'mks'=>1, 'mng'=>1, 'asf'=>1, 'asx'=>1,
|
||||
'vob'=>1, 'wm'=>1, 'wmv'=>1, 'wmx'=>1, 'wvx'=>1, 'avi'=>1, 'movie'=>1, 'smv'=>1, 'ice'=>1,
|
||||
);
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @return void
|
||||
*/
|
||||
function EmbedFilter()
|
||||
{
|
||||
$this->_makeWhiteDomainList();
|
||||
|
||||
include FileHandler::getRealPath($this->whiteUrlCacheFile);
|
||||
$this->whiteUrlList = $whiteUrlList;
|
||||
$this->whiteIframeUrlList = $whiteIframeUrlList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return EmbedFilter object
|
||||
* This method for singleton
|
||||
* @return EmbedFilter
|
||||
*/
|
||||
function getInstance()
|
||||
{
|
||||
if(!isset($GLOBALS['__EMBEDFILTER_INSTANCE__']))
|
||||
{
|
||||
$GLOBALS['__EMBEDFILTER_INSTANCE__'] = new EmbedFilter();
|
||||
}
|
||||
return $GLOBALS['__EMBEDFILTER_INSTANCE__'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the content.
|
||||
* @return void
|
||||
*/
|
||||
function check(&$content)
|
||||
{
|
||||
$this->checkObjectTag($content);
|
||||
$this->checkEmbedTag($content);
|
||||
$this->checkIframeTag($content);
|
||||
$this->checkParamTag($content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check object tag in the content.
|
||||
* @return void
|
||||
*/
|
||||
function checkObjectTag(&$content)
|
||||
{
|
||||
preg_match_all('/<\s*object\s*[^>]+(?:\/?>)/is', $content, $m);
|
||||
$objectTagList = $m[0];
|
||||
if($objectTagList)
|
||||
{
|
||||
foreach($objectTagList AS $key=>$objectTag)
|
||||
{
|
||||
$isWhiteDomain = true;
|
||||
$isWhiteMimetype = true;
|
||||
$isWhiteExt = true;
|
||||
$ext = '';
|
||||
|
||||
$parser = new HtmlParser($objectTag);
|
||||
while($parser->parse())
|
||||
{
|
||||
if(is_array($parser->iNodeAttributes))
|
||||
{
|
||||
foreach($parser->iNodeAttributes AS $attrName=>$attrValue)
|
||||
{
|
||||
// data url check
|
||||
if($attrValue && strtolower($attrName) == 'data')
|
||||
{
|
||||
$ext = strtolower(substr(strrchr($attrValue,"."),1));
|
||||
$isWhiteDomain = $this->isWhiteDomain($attrValue);
|
||||
}
|
||||
|
||||
// mime type check
|
||||
if(strtolower($attrName) == 'type' && $attrValue)
|
||||
{
|
||||
$isWhiteMimetype = $this->isWhiteMimetype($attrValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$isWhiteDomain && !$isWhiteMimetype && $ext)
|
||||
{
|
||||
$isWhiteExt = $this->isWhiteExt($ext);
|
||||
}
|
||||
|
||||
if(!$isWhiteDomain && !$isWhiteMimetype && !$isWhiteExt)
|
||||
{
|
||||
$content = str_replace($objectTag, htmlspecialchars($objectTag), $content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check embed tag in the content.
|
||||
* @return void
|
||||
*/
|
||||
function checkEmbedTag(&$content)
|
||||
{
|
||||
preg_match_all('/<\s*embed\s*[^>]+(?:\/?>)/is', $content, $m);
|
||||
$embedTagList = $m[0];
|
||||
if($embedTagList)
|
||||
{
|
||||
foreach($embedTagList AS $key=>$embedTag)
|
||||
{
|
||||
$isWhiteDomain = true;
|
||||
$isWhiteMimetype = true;
|
||||
$isWhiteExt = true;
|
||||
$ext = '';
|
||||
|
||||
$parser = new HtmlParser($embedTag);
|
||||
while($parser->parse())
|
||||
{
|
||||
if(is_array($parser->iNodeAttributes))
|
||||
{
|
||||
foreach($parser->iNodeAttributes AS $attrName=>$attrValue)
|
||||
{
|
||||
// src url check
|
||||
if($attrValue && strtolower($attrName) == 'src')
|
||||
{
|
||||
$ext = strtolower(substr(strrchr($attrValue,"."),1));
|
||||
$isWhiteDomain = $this->isWhiteDomain($attrValue);
|
||||
}
|
||||
|
||||
// mime type check
|
||||
if(strtolower($attrName) == 'type' && $attrValue)
|
||||
{
|
||||
$isWhiteMimetype = $this->isWhiteMimetype($attrValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$isWhiteDomain && !$isWhiteMimetype && $ext)
|
||||
{
|
||||
$isWhiteExt = $this->isWhiteExt($ext);
|
||||
}
|
||||
|
||||
if(!$isWhiteDomain && !$isWhiteMimetype && !$isWhiteExt)
|
||||
{
|
||||
$content = str_replace($embedTag, htmlspecialchars($embedTag), $content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check iframe tag in the content.
|
||||
* @return void
|
||||
*/
|
||||
function checkIframeTag(&$content)
|
||||
{
|
||||
preg_match_all('/<\s*iframe\s*[^>]+(?:\/?>)/is', $content, $m);
|
||||
$iframeTagList = $m[0];
|
||||
if($iframeTagList)
|
||||
{
|
||||
foreach($iframeTagList AS $key=>$iframeTag)
|
||||
{
|
||||
$isWhiteDomain = true;
|
||||
$ext = '';
|
||||
|
||||
$parser = new HtmlParser($iframeTag);
|
||||
while($parser->parse())
|
||||
{
|
||||
if(is_array($parser->iNodeAttributes))
|
||||
{
|
||||
foreach($parser->iNodeAttributes AS $attrName=>$attrValue)
|
||||
{
|
||||
// src url check
|
||||
if(strtolower($attrName) == 'src' && $attrValue)
|
||||
{
|
||||
$ext = strtolower(substr(strrchr($attrValue,"."),1));
|
||||
$isWhiteDomain = $this->isWhiteIframeDomain($attrValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$isWhiteDomain)
|
||||
{
|
||||
$content = str_replace($iframeTag, htmlspecialchars($iframeTag), $content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check param tag in the content.
|
||||
* @return void
|
||||
*/
|
||||
function checkParamTag(&$content)
|
||||
{
|
||||
preg_match_all('/<\s*param\s*[^>]+(?:\/?>)/is', $content, $m);
|
||||
$paramTagList = $m[0];
|
||||
if($paramTagList)
|
||||
{
|
||||
foreach($paramTagList AS $key=>$paramTag)
|
||||
{
|
||||
$isWhiteDomain = true;
|
||||
$isWhiteExt = true;
|
||||
$ext = '';
|
||||
|
||||
$parser = new HtmlParser($paramTag);
|
||||
while($parser->parse())
|
||||
{
|
||||
if($parser->iNodeAttributes['name'] && $parser->iNodeAttributes['value'])
|
||||
{
|
||||
$name = strtolower($parser->iNodeAttributes['name']);
|
||||
if($name == 'movie' || $name == 'src' || $name == 'href' || $name == 'url' || $name == 'source')
|
||||
{
|
||||
$ext = strtolower(substr(strrchr($parser->iNodeAttributes['value'],"."),1));
|
||||
$isWhiteDomain = $this->isWhiteDomain($parser->iNodeAttributes['value']);
|
||||
|
||||
if(!$isWhiteDomain && $ext)
|
||||
{
|
||||
$isWhiteExt = $this->isWhiteExt($ext);
|
||||
}
|
||||
|
||||
if(!$isWhiteDomain && !$isWhiteExt)
|
||||
{
|
||||
$content = str_replace($paramTag, htmlspecialchars($paramTag), $content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check white domain in object data attribute or embed src attribute.
|
||||
* @return string
|
||||
*/
|
||||
function isWhiteDomain($urlAttribute)
|
||||
{
|
||||
if(is_array($this->whiteUrlList))
|
||||
{
|
||||
foreach($this->whiteUrlList AS $key=>$value)
|
||||
{
|
||||
if(preg_match('@^'.preg_quote($value).'@i', $urlAttribute))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check white domain in iframe src attribute.
|
||||
* @return string
|
||||
*/
|
||||
function isWhiteIframeDomain($urlAttribute)
|
||||
{
|
||||
if(is_array($this->whiteIframeUrlList))
|
||||
{
|
||||
foreach($this->whiteIframeUrlList AS $key=>$value)
|
||||
{
|
||||
if(preg_match('@^'.preg_quote($value).'@i', $urlAttribute))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check white mime type in object type attribute or embed type attribute.
|
||||
* @return string
|
||||
*/
|
||||
function isWhiteMimetype($mimeType)
|
||||
{
|
||||
if(isset($this->mimeTypeList[$mimeType]))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isWhiteExt($ext)
|
||||
{
|
||||
if(isset($this->extList[$ext]))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make white domain list cache file from xml config file.
|
||||
* @return void
|
||||
*/
|
||||
function _makeWhiteDomainList()
|
||||
{
|
||||
$whiteUrlXmlFile = FileHandler::getRealPath($this->whiteUrlXmlFile);
|
||||
$whiteUrlCacheFile = FileHandler::getRealPath($this->whiteUrlCacheFile);
|
||||
|
||||
$isMake = false;
|
||||
if(!file_exists($whiteUrlCacheFile))
|
||||
{
|
||||
$isMake = true;
|
||||
}
|
||||
if( file_exists($whiteUrlCacheFile) && filemtime($whiteUrlCacheFile)<filemtime($whiteUrlXmlFile) )
|
||||
{
|
||||
$isMake = true;
|
||||
}
|
||||
|
||||
if($isMake)
|
||||
{
|
||||
$xmlBuff = FileHandler::readFile($this->whiteUrlXmlFile);
|
||||
|
||||
$xmlParser = new XmlParser();
|
||||
$domainListObj = $xmlParser->parse($xmlBuff);
|
||||
$embedDomainList = $domainListObj->whiteurl->embed->domain;
|
||||
$iframeDomainList = $domainListObj->whiteurl->iframe->domain;
|
||||
|
||||
$buff = '<?php if(!defined("__ZBXE__")) exit();';
|
||||
if(is_array($embedDomainList))
|
||||
{
|
||||
foreach($embedDomainList AS $key=>$value)
|
||||
{
|
||||
$patternList = $value->pattern;
|
||||
if(is_array($patternList))
|
||||
{
|
||||
foreach($patternList AS $key=>$value)
|
||||
{
|
||||
$buff .= sprintf('$whiteUrlList[] = \'%s\';', $value->body);
|
||||
}
|
||||
}
|
||||
else $buff .= sprintf('$whiteUrlList[] = \'%s\';', $patternList->body);
|
||||
}
|
||||
}
|
||||
|
||||
if(is_array($iframeDomainList))
|
||||
{
|
||||
foreach($iframeDomainList AS $key=>$value)
|
||||
{
|
||||
$patternList = $value->pattern;
|
||||
if(is_array($patternList))
|
||||
{
|
||||
foreach($patternList AS $key=>$value)
|
||||
{
|
||||
$buff .= sprintf('$whiteIframeUrlList[] = \'%s\';', $value->body);
|
||||
}
|
||||
}
|
||||
else $buff .= sprintf('$whiteIframeUrlList[] = \'%s\';', $patternList->body);
|
||||
}
|
||||
}
|
||||
$buff .= '?>';
|
||||
FileHandler::writeFile($this->whiteUrlCacheFile, $buff);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* End of file : EmbedFilter.class.php */
|
||||
233
classes/security/conf/embedWhiteUrl.xml
Normal file
233
classes/security/conf/embedWhiteUrl.xml
Normal file
|
|
@ -0,0 +1,233 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<whiteurl>
|
||||
<embed>
|
||||
<domain name="http://www.naver.com" isNHN="true" desc="네이버">
|
||||
<pattern>http://serviceapi.nmv.naver.com/</pattern>
|
||||
<pattern>http://scrap.ad.naver.com/</pattern>
|
||||
<pattern>http://event.dn.naver.com/sbsplayer/vmplayer.xap</pattern>
|
||||
</domain>
|
||||
<domain name="" isNHN="true" desc="네이버 뮤직 서비스">
|
||||
<pattern>http://test-player.naver.com/naverPlayer/posting/</pattern>
|
||||
<pattern>http://alpha-player.naver.com/naverPlayer/posting/</pattern>
|
||||
<pattern>http://beta-player.naver.com/naverPlayer/posting/</pattern>
|
||||
<pattern>http://musicplayer.naver.com/naverPlayer/posting/</pattern>
|
||||
<pattern>http://player.music.naver.com/naverPlayer/posting/</pattern>
|
||||
<pattern>http://dev.player.music.naver.com/</pattern>
|
||||
<pattern>http://test.player.music.naver.com/</pattern>
|
||||
<pattern>http://qa.player.music.naver.com/</pattern>
|
||||
<pattern>http://staging.player.music.naver.com/</pattern>
|
||||
<pattern>http://alpha.player.music.naver.com/</pattern>
|
||||
<pattern>http://beta.player.music.naver.com/</pattern>
|
||||
<pattern>http://stage.player.music.naver.com/</pattern>
|
||||
</domain>
|
||||
<domain name="" isNHN="true" desc="네이버 아이두게임">
|
||||
<pattern>http://dev-idogame.hangame.com/idogame/ClientBin/iDoGamePlayer.xap</pattern>
|
||||
<pattern>http://idogame.hangame.com/idogame/ClientBin/iDoGamePlayer.xap</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.daum.net" desc="다음">
|
||||
<pattern>http://flvs.daum.net/flvPlayer.swf</pattern>
|
||||
<pattern>http://api.v.daum.net/</pattern>
|
||||
<pattern>http://tvpot.daum.net/playlist/playlist.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.mncast.com" desc="엠엔캐스트">
|
||||
<pattern>http://dory.mncast.com/mncHMovie.swf</pattern>
|
||||
<pattern>http://dory.mncast.com/mncastPlayer.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.youtube.com" desc="Youtube">
|
||||
<pattern>http://www.youtube.com/v/</pattern>
|
||||
<pattern>http://www.youtube-nocookie.com/</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.mgoon.com" desc="엠군">
|
||||
<pattern>http://play.mgoon.com/Video/</pattern>
|
||||
<pattern>http://doc.mgoon.com/player/</pattern>
|
||||
<pattern>http://play.mgoon.com/Game/</pattern>
|
||||
<pattern>http://play.mgoon.com/Photo/</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.pandora.tv" desc="판도라TV">
|
||||
<pattern>http://flvr.pandora.tv/flv2pan/</pattern>
|
||||
<pattern>http://imgcdn.pandora.tv/gplayer/pandora_EGplayer.swf</pattern>
|
||||
<pattern>http://imgcdn.pandora.tv/gplayer/flJal.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.tagstory.com" desc="태그스토리">
|
||||
<pattern>http://play.tagstory.com/player/</pattern>
|
||||
<pattern>http://www.tagstory.com/player/basic/</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.pullbbang.com" desc="풀빵닷컴">
|
||||
<pattern>http://play.pullbbang.com/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="미래에셋 미디어">
|
||||
<pattern>http://media.miraeasset.com/swf/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="서울시 인터넷방송">
|
||||
<pattern>http://tv.seoul.go.kr/common/player/posting/window_media_player.asp</pattern>
|
||||
<pattern>http://stream.seoul.go.kr</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="게임스팟 동영상">
|
||||
<pattern>mms://vod.gamespot.lgcdn.com/</pattern>
|
||||
<pattern>http://image.com/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="광고정보센터">
|
||||
<pattern>mms://media.adic.co.kr/</pattern>
|
||||
<pattern>http://static.adwaple.net/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="비법닷컴">
|
||||
<pattern>http://www.vipup.com/scrap/scrap.asp</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="영상 역사관">
|
||||
<pattern>mms://125.60.2.110/e_history/</pattern>
|
||||
<pattern>mms://218.38.152.33/e_history/</pattern>
|
||||
<pattern>http://125.60.2.110/e_history/</pattern>
|
||||
<pattern>http://218.38.152.33/e_history/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="중소기업청">
|
||||
<pattern>http://www.smba.go.kr/mov/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="트라트라고">
|
||||
<pattern>http://ucc.tlatlago.com/html/uccPlayer/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="싸이월드">
|
||||
<pattern>http://dbi.video.cyworld.com/v.sk/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="이글루스 동영상">
|
||||
<pattern>http://v.egloos.com/v.sk/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="뮤직쉐이크">
|
||||
<pattern>http://www.musicshake.com/musicshakePlayer.swf</pattern>
|
||||
<pattern>http://eng.musicshake.com/musicshakePlayer.swf</pattern>
|
||||
<pattern>http://us.musicshake.com/musicshakePlayer.swf</pattern>
|
||||
<pattern>http://ip.musicshake.com/musicshakePlayer.swf</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="아프리카">
|
||||
<pattern>http://live.afreeca.com:8057/</pattern>
|
||||
<pattern>http://afbbs.afreeca.com:8080/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="플레이NC">
|
||||
<pattern>http://static.plaync.co.kr/plaza/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="XTM">
|
||||
<pattern>http://img.xtmtv.com/images/</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="아이서브">
|
||||
<pattern>http://tv.co.kr/pum/tvcell_basic.swf</pattern>
|
||||
<pattern>http://tv.co.kr/pum/tvcell_mini.swf</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="UC씽">
|
||||
<pattern>http://ucsing.mnet.com/L_swf/ucsing_player.swf</pattern>
|
||||
<pattern>http://flvfile.mnet.com</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.snaps.co.kr" desc="SNAPS">
|
||||
<pattern>http://www.snaps.co.kr/swf/LinkedApp.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.nate.com" desc="네이트">
|
||||
<pattern>http://v.nate.com/v.sk/</pattern>
|
||||
<pattern>http://w.blogdoc.nate.com/</pattern>
|
||||
<pattern>http://blogdoc.nate.com/flash/blogdoc_widget_reco.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.paoin.com" desc="파오인 신문지면 뷰어">
|
||||
<pattern>http://www.paoin.com/Common/swf/ArticleViewer02.swf</pattern>
|
||||
<pattern>http://thumb.paoin.com/paoweb/common/flash/ArticleViewer02.swf</pattern>
|
||||
<pattern>http://thumb.paoin.com/paoweb/common/flash/ArticleShare.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.atzine.com" desc="엣진 서비스">
|
||||
<pattern>http://www.atzine.com/swf/TakeOutWrapper.swf?</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.ohmynews.com" desc="오마이뉴스">
|
||||
<pattern>http://www.ohmynews.com/</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.jjanglive.com" desc="짱라이브 위젯">
|
||||
<pattern>http://www.jjanglive.com/flash/webClient.swf</pattern>
|
||||
<pattern>http://www.jjanglive.com/flash/AdShowClient.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.pmang.com" desc="피망">
|
||||
<pattern>http://file.pmang.com/images/pmang/fifaonline/season2/img/squad/squadmaker_ot.swf</pattern>
|
||||
<pattern>http://fifaonline.pmang.com/squad/t.nwz</pattern>
|
||||
<pattern>http://file.pmang.com/images/pmang/gamepub/player/pm_player.swf</pattern>
|
||||
<pattern>http://www.pmang.com/gamepub/media/player.nwz</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.ccmpia.com" desc="CCMPIA">
|
||||
<pattern>http://www.ccmpia.com/scripts/bgm2.php</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.kbs.co.kr" desc="KBS">
|
||||
<pattern>http://www.kbs.co.kr/zzim/vmplayer/vmplayer.xap</pattern>
|
||||
<pattern>http://vmark.kbs.co.kr/zzim/vmplayer/vmplayer.xap</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.sbs.co.kr" desc="SBS">
|
||||
<pattern>http://netv.sbs.co.kr/sbox/silverlight/ClientBin/NeTVPlayer.xap</pattern>
|
||||
<pattern>http://news.sbs.co.kr/</pattern>
|
||||
<pattern>http://wizard2.sbs.co.kr/</pattern>
|
||||
<pattern>http://sbsplayer.sbs.co.kr/</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.imbc.com" desc="MBC">
|
||||
<pattern>http://onemore.imbc.com/ClientBin/oneplus.xap</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.xtmtv.com" desc="XTM">
|
||||
<pattern>http://www.xtmtv.com/xtmPlayer/javascript/XTM_Scrap_Player.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.chtvn.com" desc="TVN">
|
||||
<pattern>http://player.chtvn.com/tvN_Scrap_Player.swf?</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.detailview.co.kr" desc="디테일뷰">
|
||||
<pattern>http://storage.detailview.co.kr/</pattern>
|
||||
<pattern>http://beta.detailview.co.kr/</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.brightcove.com" desc="Brightcove">
|
||||
<pattern>http://c.brightcove.com/services/viewer</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.hyundai-kiamotors.com" desc="현대기아자동차">
|
||||
<pattern>http://vod.hyundai-kiamotors.com/Flash/PlayerTest/WebPlayer.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.techdays.co.kr" desc="techdays">
|
||||
<pattern>http://www.techdays.co.kr/2010spring/remix10/ClientBin/MediaPlayerTemplate.xap</pattern>
|
||||
<pattern>http://www.microsoft.com</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.wowplan.co.kr" desc="와우플랜">
|
||||
<pattern>http://www.wowplan.co.kr/schedule/bin-debug/scheduleBlogPost.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.allblet.net" desc="allblet.net">
|
||||
<pattern>http://showman.allblet.net/abp.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://dotsub.com" desc="dotsub.com">
|
||||
<pattern>http://dotsub.com/static/players/portalplayer.swf</pattern>
|
||||
</domain>
|
||||
<domain name="" isNHN="true" desc="socialsearch">
|
||||
<pattern>http://static.campaign.naver.com/0/campaign/2010/10/socialsearch/swf/</pattern>
|
||||
</domain>
|
||||
</embed>
|
||||
<iframe>
|
||||
<domain name="http://www.youtube.com" desc="유튜브 동영상" mobile="true">
|
||||
<pattern>http://www.youtube.com/</pattern>
|
||||
<pattern>https://www.youtube.com/</pattern>
|
||||
<pattern>http://www.youtube-nocookie.com/</pattern>
|
||||
<pattern>https://www.youtube-nocookie.com/</pattern>
|
||||
</domain>
|
||||
<domain name="http://maps.google.com" desc="구글맵스" mobile="true">
|
||||
<pattern>http://maps.google.com/</pattern>
|
||||
<pattern>http://maps.google.co.kr/</pattern>
|
||||
</domain>
|
||||
<domain name="http://flvs.daum.net" desc="다음 TV 팟 동영상" mobile="false">
|
||||
<pattern>http://flvs.daum.net/</pattern>
|
||||
</domain>
|
||||
<domain name="http://play.pullbbang.com" desc="풀빵 동영상" mobile="false">
|
||||
<pattern>http://play.pullbbang.com/#.swf</pattern>
|
||||
</domain>
|
||||
<domain name="" desc="게임스팟 동영상">
|
||||
<pattern>http://www.gamespot.com</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.sbs.co.kr" desc="SBS">
|
||||
<pattern>http://sbsplayer.sbs.co.kr/</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.techdays.co.kr" desc="techdays">
|
||||
<pattern>http://www.techdays.co.kr/2010spring/remix10/ClientBin/MediaPlayerTemplate.xap</pattern>
|
||||
<pattern>http://www.microsoft.com</pattern>
|
||||
</domain>
|
||||
<domain name="http://dotsub.com" desc="dotsub.com">
|
||||
<pattern>http://dotsub.com/</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.travelro.co.kr" desc="트래블로">
|
||||
<pattern>http://www.travelro.co.kr/</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.vimeo.com" desc="vimeo.com">
|
||||
<pattern>http://player.vimeo.com/</pattern>
|
||||
</domain>
|
||||
</iframe>
|
||||
</whiteurl>
|
||||
4
classes/security/phphtmlparser/CVS/Entries
Executable file
4
classes/security/phphtmlparser/CVS/Entries
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
/LICENSE/1.3/Tue Apr 13 21:22:43 2004//
|
||||
/README/1.1.1.1/Mon Oct 6 19:17:41 2003//
|
||||
/release.sh/1.1.1.1/Mon Oct 6 19:17:41 2003//
|
||||
D/src////
|
||||
4
classes/security/phphtmlparser/CVS/Entries.Extra
Executable file
4
classes/security/phphtmlparser/CVS/Entries.Extra
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
/LICENSE////
|
||||
/README////
|
||||
/release.sh////
|
||||
D/src////
|
||||
3
classes/security/phphtmlparser/CVS/Entries.Extra.Old
Executable file
3
classes/security/phphtmlparser/CVS/Entries.Extra.Old
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
/LICENSE////
|
||||
/README////
|
||||
/release.sh////
|
||||
4
classes/security/phphtmlparser/CVS/Entries.Old
Executable file
4
classes/security/phphtmlparser/CVS/Entries.Old
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
/LICENSE/1.3/Tue Apr 13 21:22:43 2004//
|
||||
/README/1.1.1.1/Mon Oct 6 19:17:41 2003//
|
||||
/release.sh/1.1.1.1/Mon Oct 6 19:17:41 2003//
|
||||
D
|
||||
1
classes/security/phphtmlparser/CVS/Repository
Executable file
1
classes/security/phphtmlparser/CVS/Repository
Executable file
|
|
@ -0,0 +1 @@
|
|||
phphtmlparser
|
||||
1
classes/security/phphtmlparser/CVS/Root
Executable file
1
classes/security/phphtmlparser/CVS/Root
Executable file
|
|
@ -0,0 +1 @@
|
|||
:ext:jhsolorz@cvs.sourceforge.net:/cvsroot/php-html
|
||||
48
classes/security/phphtmlparser/LICENSE
Executable file
48
classes/security/phphtmlparser/LICENSE
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
/* ====================================================================
|
||||
* Based on The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2003 Jose Solorzano. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution,
|
||||
* if any, must include the following acknowledgment:
|
||||
* "This product includes software developed by
|
||||
* Jose Solorzano."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The name "Jose Solorzano" must not be used to endorse or promote
|
||||
* products derived from this software without prior written
|
||||
* permission.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Jose Solorzano",
|
||||
* nor may "Jose Solorzano" appear in their name, without prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL STARNETSYS, LLC. OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
*/
|
||||
|
||||
70
classes/security/phphtmlparser/README
Executable file
70
classes/security/phphtmlparser/README
Executable file
|
|
@ -0,0 +1,70 @@
|
|||
|
||||
HTML Parser for PHP 4
|
||||
---------------------
|
||||
|
||||
This is a simple PHP based HTML parser.
|
||||
|
||||
How to Use
|
||||
----------
|
||||
|
||||
Simply copy src/htmlparser.inc to a location in your
|
||||
codebase where you'd like to be able to include it.
|
||||
The PHP file which uses the parser might look like
|
||||
this:
|
||||
|
||||
<?
|
||||
include ("htmlparser.inc");
|
||||
|
||||
$htmlText = "... HTML text here ...";
|
||||
HtmlParser parser = new HtmlParser ($htmlText);
|
||||
while ($parser->parse()) {
|
||||
|
||||
// Data you can use here:
|
||||
//
|
||||
// $parser->iNodeType
|
||||
// $parser->iNodeName
|
||||
// $parser->iNodeValue
|
||||
// $parser->iNodeAttributes
|
||||
|
||||
}
|
||||
|
||||
You will find additional documentation for each
|
||||
field in the source code.
|
||||
|
||||
?>
|
||||
|
||||
|
||||
Files of Interest
|
||||
-----------------
|
||||
|
||||
src/htmlparser.inc -- Has HtmlParser class
|
||||
src/html2text.inc -- Has Html2Text class
|
||||
src/ex_dumptags.php -- Example: Dumps HTML nodes from test HTML string
|
||||
src/ex_html2text.php -- Example: Dumps text for test HTML string
|
||||
|
||||
Running examples offline
|
||||
------------------------
|
||||
|
||||
On a Unix system, you can run the examples as follows
|
||||
if you have PHP installed:
|
||||
|
||||
cd src
|
||||
php < ex_dumptags.php
|
||||
php < ex_html2text.php
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This is an open source project. The license is
|
||||
based on the Apache Software License. See the file
|
||||
named LICENSE.
|
||||
|
||||
Author
|
||||
------
|
||||
|
||||
The parser and the HTML-to-text example were written
|
||||
by Jose Solorzano of Starnetsys, LLC. If you need a
|
||||
program or website developed, professionally, within
|
||||
budget, and on time, contact us (http://starnetsys.com)
|
||||
|
||||
10
classes/security/phphtmlparser/release.sh
Executable file
10
classes/security/phphtmlparser/release.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$TEMP" = "" ]; then
|
||||
TEMP="/tmp";
|
||||
fi
|
||||
|
||||
rm -f `find . -name '*~'`
|
||||
(cd ..; tar cvf $TEMP/phphtmlparser$1.tar phphtmlparser)
|
||||
|
||||
gzip $TEMP/phphtmlparser$1.tar
|
||||
7
classes/security/phphtmlparser/src/CVS/Entries
Executable file
7
classes/security/phphtmlparser/src/CVS/Entries
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
/ex_dumptags.php/1.2/Wed Oct 29 16:42:53 2003//
|
||||
/ex_dumpurl.php/1.3/Fri Apr 16 15:52:39 2004//
|
||||
/ex_html2text.php/1.2/Fri Apr 16 15:52:39 2004//
|
||||
/html2text.inc/1.3/Wed Oct 29 16:42:53 2003//
|
||||
/htmlparser.inc/1.5/Fri Apr 16 15:52:39 2004//
|
||||
/testfile.html/1.2/Fri Apr 16 15:52:39 2004//
|
||||
D
|
||||
6
classes/security/phphtmlparser/src/CVS/Entries.Extra
Executable file
6
classes/security/phphtmlparser/src/CVS/Entries.Extra
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
/ex_dumptags.php////
|
||||
/ex_dumpurl.php////
|
||||
/ex_html2text.php////
|
||||
/html2text.inc////
|
||||
/htmlparser.inc////
|
||||
/testfile.html////
|
||||
0
classes/security/phphtmlparser/src/CVS/Entries.Extra.Old
Executable file
0
classes/security/phphtmlparser/src/CVS/Entries.Extra.Old
Executable file
0
classes/security/phphtmlparser/src/CVS/Entries.Old
Executable file
0
classes/security/phphtmlparser/src/CVS/Entries.Old
Executable file
1
classes/security/phphtmlparser/src/CVS/Repository
Executable file
1
classes/security/phphtmlparser/src/CVS/Repository
Executable file
|
|
@ -0,0 +1 @@
|
|||
phphtmlparser/src
|
||||
1
classes/security/phphtmlparser/src/CVS/Root
Executable file
1
classes/security/phphtmlparser/src/CVS/Root
Executable file
|
|
@ -0,0 +1 @@
|
|||
:ext:jhsolorz@cvs.sourceforge.net:/cvsroot/php-html
|
||||
11
classes/security/phphtmlparser/src/ex_dumptags.php
Executable file
11
classes/security/phphtmlparser/src/ex_dumptags.php
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
<?
|
||||
include ("htmlparser.inc");
|
||||
$htmlText = "<html><!-- comment --><body>This is the body</body></html>";
|
||||
$parser = new HtmlParser($htmlText);
|
||||
while ($parser->parse()) {
|
||||
echo "-----------------------------------\r\n";
|
||||
echo "Node type: " . $parser->iNodeType . "\r\n";
|
||||
echo "Node name: " . $parser->iNodeName . "\r\n";
|
||||
echo "Node value: " . $parser->iNodeValue . "\r\n";
|
||||
}
|
||||
?>
|
||||
29
classes/security/phphtmlparser/src/ex_dumpurl.php
Executable file
29
classes/security/phphtmlparser/src/ex_dumpurl.php
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
<?
|
||||
// Example:
|
||||
// Dumps nodes from testfile.html.
|
||||
// To run: php < ex_dumpurl.php
|
||||
|
||||
include ("htmlparser.inc");
|
||||
$parser = HtmlParser_ForFile ("testfile.html");
|
||||
//$parser = HtmlParser_ForURL ("http://yahoo.com");
|
||||
while ($parser->parse()) {
|
||||
echo "-----------------------------------\r\n";
|
||||
echo "Name=" . $parser->iNodeName . ";";
|
||||
echo "Type=" . $parser->iNodeType . ";";
|
||||
if ($parser->iNodeType == NODE_TYPE_TEXT || $parser->iNodeType == NODE_TYPE_COMMENT) {
|
||||
echo "Value='" . $parser->iNodeValue . "'";
|
||||
}
|
||||
echo "\r\n";
|
||||
if ($parser->iNodeType == NODE_TYPE_ELEMENT) {
|
||||
echo "ATTRIBUTES: ";
|
||||
$attrValues = $parser->iNodeAttributes;
|
||||
$attrNames = array_keys($attrValues);
|
||||
$size = count($attrNames);
|
||||
for ($i = 0; $i < $size; $i++) {
|
||||
$name = $attrNames[$i];
|
||||
echo $attrNames[$i] . "=\"" . $attrValues[$name] . "\" ";
|
||||
}
|
||||
}
|
||||
echo "\r\n";
|
||||
}
|
||||
?>
|
||||
18
classes/security/phphtmlparser/src/ex_html2text.php
Executable file
18
classes/security/phphtmlparser/src/ex_html2text.php
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
<?
|
||||
// Example: html2text
|
||||
// Converts HTML to formatted ASCII text.
|
||||
// Run with: php < ex_html2text.php
|
||||
|
||||
include ("html2text.inc");
|
||||
|
||||
$htmlText = "Html2text is a tool that allows you to<br>" .
|
||||
"convert HTML to text.<p>" .
|
||||
"Does it work?";
|
||||
|
||||
$htmlToText = new Html2Text ($htmlText, 15);
|
||||
$text = $htmlToText->convert();
|
||||
echo "Conversion follows:\r\n";
|
||||
echo "-------------------\r\n";
|
||||
echo $text;
|
||||
|
||||
?>
|
||||
214
classes/security/phphtmlparser/src/html2text.inc
Executable file
214
classes/security/phphtmlparser/src/html2text.inc
Executable file
|
|
@ -0,0 +1,214 @@
|
|||
<?
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Jose Solorzano. All rights reserved.
|
||||
* Redistribution of source must retain this copyright notice.
|
||||
*/
|
||||
|
||||
include ("htmlparser.inc");
|
||||
|
||||
/**
|
||||
* Class Html2Text. (HtmlParser example.)
|
||||
* Converts HTML to ASCII attempting to preserve
|
||||
* document structure.
|
||||
* To use, create an instance of Html2Text passing
|
||||
* the text to convert and the desired maximum
|
||||
* number of characters per line. Then invoke
|
||||
* convert() which returns ASCII text.
|
||||
*/
|
||||
class Html2Text {
|
||||
|
||||
// Private fields
|
||||
|
||||
var $iCurrentLine = "";
|
||||
var $iCurrentWord = "";
|
||||
var $iCurrentWordArray;
|
||||
var $iCurrentWordIndex;
|
||||
var $iInScript;
|
||||
var $iListLevel = 0;
|
||||
var $iHtmlText;
|
||||
var $iMaxColumns;
|
||||
var $iHtmlParser;
|
||||
|
||||
// Constants
|
||||
|
||||
var $TOKEN_BR = 0;
|
||||
var $TOKEN_P = 1;
|
||||
var $TOKEN_LI = 2;
|
||||
var $TOKEN_AFTERLI = 3;
|
||||
var $TOKEN_UL = 4;
|
||||
var $TOKEN_ENDUL = 5;
|
||||
|
||||
function Html2Text ($aHtmlText, $aMaxColumns) {
|
||||
$this->iHtmlText = $aHtmlText;
|
||||
$this->iMaxColumns = $aMaxColumns;
|
||||
}
|
||||
|
||||
function convert() {
|
||||
$this->iHtmlParser = new HtmlParser($this->iHtmlText);
|
||||
$wholeText = "";
|
||||
while (($line = $this->getLine()) !== false) {
|
||||
$wholeText .= ($line . "\r\n");
|
||||
}
|
||||
return $wholeText;
|
||||
}
|
||||
|
||||
function getLine() {
|
||||
while (true) {
|
||||
if (!$this->addWordToLine($this->iCurrentWord)) {
|
||||
$retvalue = $this->iCurrentLine;
|
||||
$this->iCurrentLine = "";
|
||||
return $retvalue;
|
||||
}
|
||||
$word = $this->getWord();
|
||||
if ($word === false) {
|
||||
if ($this->iCurrentLine == "") {
|
||||
break;
|
||||
}
|
||||
$retvalue = $this->iCurrentLine;
|
||||
$this->iCurrentLine = "";
|
||||
$this->iInText = false;
|
||||
$this->iCurrentWord = "";
|
||||
return $retvalue;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function addWordToLine ($word) {
|
||||
if ($this->iInScript) {
|
||||
return true;
|
||||
}
|
||||
$prevLine = $this->iCurrentLine;
|
||||
if ($word === $this->TOKEN_BR) {
|
||||
$this->iCurrentWord = "";
|
||||
return false;
|
||||
}
|
||||
if ($word === $this->TOKEN_P) {
|
||||
$this->iCurrentWord = $this->TOKEN_BR;
|
||||
return false;
|
||||
}
|
||||
if ($word === $this->TOKEN_UL) {
|
||||
$this->iCurrentWord = $this->TOKEN_BR;
|
||||
return false;
|
||||
}
|
||||
if ($word === $this->TOKEN_ENDUL) {
|
||||
$this->iCurrentWord = $this->TOKEN_BR;
|
||||
return false;
|
||||
}
|
||||
if ($word === $this->TOKEN_LI) {
|
||||
$this->iCurrentWord = $this->TOKEN_AFTERLI;
|
||||
return false;
|
||||
}
|
||||
$toAdd = $word;
|
||||
if ($word === $this->TOKEN_AFTERLI) {
|
||||
$toAdd = "";
|
||||
}
|
||||
if ($prevLine != "") {
|
||||
$prevLine .= " ";
|
||||
}
|
||||
else {
|
||||
$prevLine = $this->getIndentation($word === $this->TOKEN_AFTERLI);
|
||||
}
|
||||
$candidateLine = $prevLine . $toAdd;
|
||||
if (strlen ($candidateLine) > $this->iMaxColumns && $prevLine != "") {
|
||||
return false;
|
||||
}
|
||||
$this->iCurrentLine = $candidateLine;
|
||||
return true;
|
||||
}
|
||||
|
||||
function getWord() {
|
||||
while (true) {
|
||||
if ($this->iHtmlParser->iNodeType == NODE_TYPE_TEXT) {
|
||||
if (!$this->iInText) {
|
||||
$words = $this->splitWords($this->iHtmlParser->iNodeValue);
|
||||
$this->iCurrentWordArray = $words;
|
||||
$this->iCurrentWordIndex = 0;
|
||||
$this->iInText = true;
|
||||
}
|
||||
if ($this->iCurrentWordIndex < count($this->iCurrentWordArray)) {
|
||||
$this->iCurrentWord = $this->iCurrentWordArray[$this->iCurrentWordIndex++];
|
||||
return $this->iCurrentWord;
|
||||
}
|
||||
else {
|
||||
$this->iInText = false;
|
||||
}
|
||||
}
|
||||
else if ($this->iHtmlParser->iNodeType == NODE_TYPE_ELEMENT) {
|
||||
if (strcasecmp ($this->iHtmlParser->iNodeName, "br") == 0) {
|
||||
$this->iHtmlParser->parse();
|
||||
$this->iCurrentWord = $this->TOKEN_BR;
|
||||
return $this->iCurrentWord;
|
||||
}
|
||||
else if (strcasecmp ($this->iHtmlParser->iNodeName, "p") == 0) {
|
||||
$this->iHtmlParser->parse();
|
||||
$this->iCurrentWord = $this->TOKEN_P;
|
||||
return $this->iCurrentWord;
|
||||
}
|
||||
else if (strcasecmp ($this->iHtmlParser->iNodeName, "script") == 0) {
|
||||
$this->iHtmlParser->parse();
|
||||
$this->iCurrentWord = "";
|
||||
$this->iInScript = true;
|
||||
return $this->iCurrentWord;
|
||||
}
|
||||
else if (strcasecmp ($this->iHtmlParser->iNodeName, "ul") == 0 || strcasecmp ($this->iHtmlParser->iNodeName, "ol") == 0) {
|
||||
$this->iHtmlParser->parse();
|
||||
$this->iCurrentWord = $this->TOKEN_UL;
|
||||
$this->iListLevel++;
|
||||
return $this->iCurrentWord;
|
||||
}
|
||||
else if (strcasecmp ($this->iHtmlParser->iNodeName, "li") == 0) {
|
||||
$this->iHtmlParser->parse();
|
||||
$this->iCurrentWord = $this->TOKEN_LI;
|
||||
return $this->iCurrentWord;
|
||||
}
|
||||
}
|
||||
else if ($this->iHtmlParser->iNodeType == NODE_TYPE_ENDELEMENT) {
|
||||
if (strcasecmp ($this->iHtmlParser->iNodeName, "script") == 0) {
|
||||
$this->iHtmlParser->parse();
|
||||
$this->iCurrentWord = "";
|
||||
$this->iInScript = false;
|
||||
return $this->iCurrentWord;
|
||||
}
|
||||
else if (strcasecmp ($this->iHtmlParser->iNodeName, "ul") == 0 || strcasecmp ($this->iHtmlParser->iNodeName, "ol") == 0) {
|
||||
$this->iHtmlParser->parse();
|
||||
$this->iCurrentWord = $this->TOKEN_ENDUL;
|
||||
if ($this->iListLevel > 0) {
|
||||
$this->iListLevel--;
|
||||
}
|
||||
return $this->iCurrentWord;
|
||||
}
|
||||
}
|
||||
if (!$this->iHtmlParser->parse()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function splitWords ($text) {
|
||||
$words = split ("[ \t\r\n]+", $text);
|
||||
for ($idx = 0; $idx < count($words); $idx++) {
|
||||
$words[$idx] = $this->htmlDecode($words[$idx]);
|
||||
}
|
||||
return $words;
|
||||
}
|
||||
|
||||
function htmlDecode ($text) {
|
||||
// TBD
|
||||
return $text;
|
||||
}
|
||||
|
||||
function getIndentation ($hasLI) {
|
||||
$indent = "";
|
||||
$idx = 0;
|
||||
for ($idx = 0; $idx < ($this->iListLevel - 1); $idx++) {
|
||||
$indent .= " ";
|
||||
}
|
||||
if ($this->iListLevel > 0) {
|
||||
$indent = $hasLI ? ($indent . "- ") : ($indent . " ");
|
||||
}
|
||||
return $indent;
|
||||
}
|
||||
}
|
||||
365
classes/security/phphtmlparser/src/htmlparser.inc
Executable file
365
classes/security/phphtmlparser/src/htmlparser.inc
Executable file
|
|
@ -0,0 +1,365 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Jose Solorzano. All rights reserved.
|
||||
* Redistribution of source must retain this copyright notice.
|
||||
*
|
||||
* Jose Solorzano (http://jexpert.us) is a software consultant.
|
||||
*
|
||||
* Contributions by:
|
||||
* - Leo West (performance improvements)
|
||||
*/
|
||||
|
||||
define ("NODE_TYPE_START",0);
|
||||
define ("NODE_TYPE_ELEMENT",1);
|
||||
define ("NODE_TYPE_ENDELEMENT",2);
|
||||
define ("NODE_TYPE_TEXT",3);
|
||||
define ("NODE_TYPE_COMMENT",4);
|
||||
define ("NODE_TYPE_DONE",5);
|
||||
|
||||
/**
|
||||
* Class HtmlParser.
|
||||
* To use, create an instance of the class passing
|
||||
* HTML text. Then invoke parse() until it's false.
|
||||
* When parse() returns true, $iNodeType, $iNodeName
|
||||
* $iNodeValue and $iNodeAttributes are updated.
|
||||
*
|
||||
* To create an HtmlParser instance you may also
|
||||
* use convenience functions HtmlParser_ForFile
|
||||
* and HtmlParser_ForURL.
|
||||
*/
|
||||
class HtmlParser {
|
||||
|
||||
/**
|
||||
* Field iNodeType.
|
||||
* May be one of the NODE_TYPE_* constants above.
|
||||
*/
|
||||
var $iNodeType;
|
||||
|
||||
/**
|
||||
* Field iNodeName.
|
||||
* For elements, it's the name of the element.
|
||||
*/
|
||||
var $iNodeName = "";
|
||||
|
||||
/**
|
||||
* Field iNodeValue.
|
||||
* For text nodes, it's the text.
|
||||
*/
|
||||
var $iNodeValue = "";
|
||||
|
||||
/**
|
||||
* Field iNodeAttributes.
|
||||
* A string-indexed array containing attribute values
|
||||
* of the current node. Indexes are always lowercase.
|
||||
*/
|
||||
var $iNodeAttributes;
|
||||
|
||||
// The following fields should be
|
||||
// considered private:
|
||||
|
||||
var $iHtmlText;
|
||||
var $iHtmlTextLength;
|
||||
var $iHtmlTextIndex = 0;
|
||||
var $iHtmlCurrentChar;
|
||||
var $BOE_ARRAY;
|
||||
var $B_ARRAY;
|
||||
var $BOS_ARRAY;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* Constructs an HtmlParser instance with
|
||||
* the HTML text given.
|
||||
*/
|
||||
function HtmlParser ($aHtmlText) {
|
||||
$this->iHtmlText = $aHtmlText;
|
||||
$this->iHtmlTextLength = strlen($aHtmlText);
|
||||
$this->iNodeAttributes = array();
|
||||
$this->setTextIndex (0);
|
||||
|
||||
$this->BOE_ARRAY = array (" ", "\t", "\r", "\n", "=" );
|
||||
$this->B_ARRAY = array (" ", "\t", "\r", "\n" );
|
||||
$this->BOS_ARRAY = array (" ", "\t", "\r", "\n", "/" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Method parse.
|
||||
* Parses the next node. Returns false only if
|
||||
* the end of the HTML text has been reached.
|
||||
* Updates values of iNode* fields.
|
||||
*/
|
||||
function parse() {
|
||||
$text = $this->skipToElement();
|
||||
if ($text != "") {
|
||||
$this->iNodeType = NODE_TYPE_TEXT;
|
||||
$this->iNodeName = "Text";
|
||||
$this->iNodeValue = $text;
|
||||
return true;
|
||||
}
|
||||
return $this->readTag();
|
||||
}
|
||||
|
||||
function clearAttributes() {
|
||||
$this->iNodeAttributes = array();
|
||||
}
|
||||
|
||||
function readTag() {
|
||||
if ($this->iCurrentChar != "<") {
|
||||
$this->iNodeType = NODE_TYPE_DONE;
|
||||
return false;
|
||||
}
|
||||
$this->clearAttributes();
|
||||
$this->skipMaxInTag ("<", 1);
|
||||
if ($this->iCurrentChar == '/') {
|
||||
$this->moveNext();
|
||||
$name = $this->skipToBlanksInTag();
|
||||
$this->iNodeType = NODE_TYPE_ENDELEMENT;
|
||||
$this->iNodeName = $name;
|
||||
$this->iNodeValue = "";
|
||||
$this->skipEndOfTag();
|
||||
return true;
|
||||
}
|
||||
$name = $this->skipToBlanksOrSlashInTag();
|
||||
if (!$this->isValidTagIdentifier ($name)) {
|
||||
$comment = false;
|
||||
if (strpos($name, "!--") === 0) {
|
||||
$ppos = strpos($name, "--", 3);
|
||||
if (strpos($name, "--", 3) === (strlen($name) - 2)) {
|
||||
$this->iNodeType = NODE_TYPE_COMMENT;
|
||||
$this->iNodeName = "Comment";
|
||||
$this->iNodeValue = "<" . $name . ">";
|
||||
$comment = true;
|
||||
}
|
||||
else {
|
||||
$rest = $this->skipToStringInTag ("-->");
|
||||
if ($rest != "") {
|
||||
$this->iNodeType = NODE_TYPE_COMMENT;
|
||||
$this->iNodeName = "Comment";
|
||||
$this->iNodeValue = "<" . $name . $rest;
|
||||
$comment = true;
|
||||
// Already skipped end of tag
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$comment) {
|
||||
$this->iNodeType = NODE_TYPE_TEXT;
|
||||
$this->iNodeName = "Text";
|
||||
$this->iNodeValue = "<" . $name;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->iNodeType = NODE_TYPE_ELEMENT;
|
||||
$this->iNodeValue = "";
|
||||
$this->iNodeName = $name;
|
||||
while ($this->skipBlanksInTag()) {
|
||||
$attrName = $this->skipToBlanksOrEqualsInTag();
|
||||
if ($attrName != "" && $attrName != "/") {
|
||||
$this->skipBlanksInTag();
|
||||
if ($this->iCurrentChar == "=") {
|
||||
$this->skipEqualsInTag();
|
||||
$this->skipBlanksInTag();
|
||||
$value = $this->readValueInTag();
|
||||
$this->iNodeAttributes[strtolower($attrName)] = $value;
|
||||
}
|
||||
else {
|
||||
$this->iNodeAttributes[strtolower($attrName)] = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->skipEndOfTag();
|
||||
return true;
|
||||
}
|
||||
|
||||
function isValidTagIdentifier ($name) {
|
||||
return ereg ("^[A-Za-z0-9_\\-]+$", $name);
|
||||
}
|
||||
|
||||
function skipBlanksInTag() {
|
||||
return "" != ($this->skipInTag ($this->B_ARRAY));
|
||||
}
|
||||
|
||||
function skipToBlanksOrEqualsInTag() {
|
||||
return $this->skipToInTag ($this->BOE_ARRAY);
|
||||
}
|
||||
|
||||
function skipToBlanksInTag() {
|
||||
return $this->skipToInTag ($this->B_ARRAY);
|
||||
}
|
||||
|
||||
function skipToBlanksOrSlashInTag() {
|
||||
return $this->skipToInTag ($this->BOS_ARRAY);
|
||||
}
|
||||
|
||||
function skipEqualsInTag() {
|
||||
return $this->skipMaxInTag ("=", 1);
|
||||
}
|
||||
|
||||
function readValueInTag() {
|
||||
$ch = $this->iCurrentChar;
|
||||
$value = "";
|
||||
if ($ch == "\"") {
|
||||
$this->skipMaxInTag ("\"", 1);
|
||||
$value = $this->skipToInTag ("\"");
|
||||
$this->skipMaxInTag ("\"", 1);
|
||||
}
|
||||
else if ($ch == "'") {
|
||||
$this->skipMaxInTag ("'", 1);
|
||||
$value = $this->skipToInTag ("'");
|
||||
$this->skipMaxInTag ("'", 1);
|
||||
}
|
||||
else {
|
||||
$value = $this->skipToBlanksInTag();
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
function setTextIndex ($index) {
|
||||
$this->iHtmlTextIndex = $index;
|
||||
if ($index >= $this->iHtmlTextLength) {
|
||||
$this->iCurrentChar = -1;
|
||||
}
|
||||
else {
|
||||
$this->iCurrentChar = $this->iHtmlText{$index};
|
||||
}
|
||||
}
|
||||
|
||||
function moveNext() {
|
||||
if ($this->iHtmlTextIndex < $this->iHtmlTextLength) {
|
||||
$this->setTextIndex ($this->iHtmlTextIndex + 1);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function skipEndOfTag() {
|
||||
while (($ch = $this->iCurrentChar) !== -1) {
|
||||
if ($ch == ">") {
|
||||
$this->moveNext();
|
||||
return;
|
||||
}
|
||||
$this->moveNext();
|
||||
}
|
||||
}
|
||||
|
||||
function skipInTag ($chars) {
|
||||
$sb = "";
|
||||
while (($ch = $this->iCurrentChar) !== -1) {
|
||||
if ($ch == ">") {
|
||||
return $sb;
|
||||
} else {
|
||||
$match = false;
|
||||
for ($idx = 0; $idx < count($chars); $idx++) {
|
||||
if ($ch == $chars[$idx]) {
|
||||
$match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$match) {
|
||||
return $sb;
|
||||
}
|
||||
$sb .= $ch;
|
||||
$this->moveNext();
|
||||
}
|
||||
}
|
||||
return $sb;
|
||||
}
|
||||
|
||||
function skipMaxInTag ($chars, $maxChars) {
|
||||
$sb = "";
|
||||
$count = 0;
|
||||
while (($ch = $this->iCurrentChar) !== -1 && $count++ < $maxChars) {
|
||||
if ($ch == ">") {
|
||||
return $sb;
|
||||
} else {
|
||||
$match = false;
|
||||
for ($idx = 0; $idx < count($chars); $idx++) {
|
||||
if ($ch == $chars[$idx]) {
|
||||
$match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$match) {
|
||||
return $sb;
|
||||
}
|
||||
$sb .= $ch;
|
||||
$this->moveNext();
|
||||
}
|
||||
}
|
||||
return $sb;
|
||||
}
|
||||
|
||||
function skipToInTag ($chars) {
|
||||
$sb = "";
|
||||
while (($ch = $this->iCurrentChar) !== -1) {
|
||||
$match = $ch == ">";
|
||||
if (!$match) {
|
||||
for ($idx = 0; $idx < count($chars); $idx++) {
|
||||
if ($ch == $chars[$idx]) {
|
||||
$match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($match) {
|
||||
return $sb;
|
||||
}
|
||||
$sb .= $ch;
|
||||
$this->moveNext();
|
||||
}
|
||||
return $sb;
|
||||
}
|
||||
|
||||
function skipToElement() {
|
||||
$sb = "";
|
||||
while (($ch = $this->iCurrentChar) !== -1) {
|
||||
if ($ch == "<") {
|
||||
return $sb;
|
||||
}
|
||||
$sb .= $ch;
|
||||
$this->moveNext();
|
||||
}
|
||||
return $sb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns text between current position and $needle,
|
||||
* inclusive, or "" if not found. The current index is moved to a point
|
||||
* after the location of $needle, or not moved at all
|
||||
* if nothing is found.
|
||||
*/
|
||||
function skipToStringInTag ($needle) {
|
||||
$pos = strpos ($this->iHtmlText, $needle, $this->iHtmlTextIndex);
|
||||
if ($pos === false) {
|
||||
return "";
|
||||
}
|
||||
$top = $pos + strlen($needle);
|
||||
$retvalue = substr ($this->iHtmlText, $this->iHtmlTextIndex, $top - $this->iHtmlTextIndex);
|
||||
$this->setTextIndex ($top);
|
||||
return $retvalue;
|
||||
}
|
||||
}
|
||||
|
||||
function HtmlParser_ForFile ($fileName) {
|
||||
return HtmlParser_ForURL($fileName);
|
||||
}
|
||||
|
||||
function HtmlParser_ForURL ($url) {
|
||||
$fp = fopen ($url, "r");
|
||||
$content = "";
|
||||
while (true) {
|
||||
$data = fread ($fp, 8192);
|
||||
if (strlen($data) == 0) {
|
||||
break;
|
||||
}
|
||||
$content .= $data;
|
||||
}
|
||||
fclose ($fp);
|
||||
return new HtmlParser ($content);
|
||||
}
|
||||
|
||||
php?>
|
||||
8
classes/security/phphtmlparser/src/testfile.html
Executable file
8
classes/security/phphtmlparser/src/testfile.html
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
<!-- first comment --> <!-- second comment -->
|
||||
<elem attribute1="foobar" attribute2=""/>Text After Elem
|
||||
<!--comment1-->
|
||||
<elem2>Text</elem2>
|
||||
<!-- comment2-->
|
||||
<elem3 attribute3='insinglequotes'/>
|
||||
<!--comment3 -->Text between comments<!-- comment4 -->
|
||||
<elem4/>
|
||||
|
|
@ -187,7 +187,7 @@ class TemplateHandler {
|
|||
$buff = preg_replace('@<!--//.*?-->@s', '', $buff);
|
||||
|
||||
// replace value of src in img/input/script tag
|
||||
$buff = preg_replace_callback('/<(?:img|input|script)(?:(?!["\'\/]\s*>).)* src="(?!https?:\/\/|[\/\{])([^"]+)"/is', array($this, '_replacePath'), $buff);
|
||||
$buff = preg_replace_callback('/<(?:img|input|script)[^<>]*src="(?!https?:\/\/|[\/\{])([^"]+)"/is', array($this, '_replacePath'), $buff);
|
||||
|
||||
// replace loop and cond template syntax
|
||||
$buff = $this->_parseInline($buff);
|
||||
|
|
@ -199,7 +199,11 @@ class TemplateHandler {
|
|||
$buff = preg_replace('@</?block\s*>@is','',$buff);
|
||||
|
||||
// form auto generation
|
||||
$buff = preg_replace_callback('/(<form(?:<\?php.+?\?>|[^<>]+)*?>)(.*?)(<\/form>)/is', array($this, '_compileFormAuthGeneration'), $buff);
|
||||
$temp = preg_replace_callback('/(<form(?:<\?php.+?\?>|[^<>]+)*?>)(.*?)(<\/form>)/is', array($this, '_compileFormAuthGeneration'), $buff);
|
||||
if($temp)
|
||||
{
|
||||
$buff = $temp;
|
||||
}
|
||||
|
||||
// prevent from calling directly before writing into file
|
||||
$buff = '<?php if(!defined("__XE__"))exit;?>'.$buff;
|
||||
|
|
@ -219,6 +223,7 @@ class TemplateHandler {
|
|||
* @param array $matches
|
||||
* @return string
|
||||
**/
|
||||
|
||||
function _compileFormAuthGeneration($matches)
|
||||
{
|
||||
// form ruleset attribute move to hidden tag
|
||||
|
|
@ -319,6 +324,12 @@ class TemplateHandler {
|
|||
**/
|
||||
function _replacePath($match)
|
||||
{
|
||||
//return origin code when src value include variable.
|
||||
if(preg_match('/^[\'|"]\s*\.\s*\$/', $match[1]))
|
||||
{
|
||||
return $match[0];
|
||||
}
|
||||
|
||||
$src = preg_replace('@^(\./)+@', '', trim($match[1]));
|
||||
|
||||
$src = $this->web_path.$src;
|
||||
|
|
@ -327,7 +338,7 @@ class TemplateHandler {
|
|||
// for backward compatibility
|
||||
$src = preg_replace('@/((?:[\w-]+/)+)\1@', '/\1', $src);
|
||||
|
||||
while(($tmp=preg_replace('@[^/]+/\.\./@', '', $src))!==$src) $src = $tmp;
|
||||
while(($tmp=preg_replace('@[^/]+/\.\./@', '', $src, 1))!==$src) $src = $tmp;
|
||||
|
||||
return substr($match[0],0,-strlen($match[1])-6)."src=\"{$src}\"";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class Validator
|
|||
|
||||
// predefined rules
|
||||
$this->addRule(array(
|
||||
'email' => '/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/',
|
||||
'email' => '/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/',
|
||||
'userid' => '/^[a-z]+[\w-]*[a-z0-9_]+$/i',
|
||||
'url' => '/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/',
|
||||
'alpha' => '/^[a-z]*$/i',
|
||||
|
|
@ -199,7 +199,7 @@ class Validator
|
|||
$fields = array_map(array($this, 'arrayTrim'), $fields);
|
||||
$field_names = array_keys($fields);
|
||||
|
||||
$filters = $this->_filters;
|
||||
$filters = array();
|
||||
|
||||
// get field names matching patterns
|
||||
foreach($this->_filters as $key=>$filter) {
|
||||
|
|
@ -210,6 +210,10 @@ class Validator
|
|||
$filters[substr($key,0,-2)] = $filter;
|
||||
unset($filters[$key]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$filters[$key] = $filter;
|
||||
}
|
||||
|
||||
if(!count($names)) continue;
|
||||
|
||||
|
|
@ -222,9 +226,18 @@ class Validator
|
|||
|
||||
foreach($filters as $key=>$filter) {
|
||||
$fname = preg_replace('/\[\]$/', '', $key);
|
||||
$exists = array_key_exists($key, $fields);
|
||||
$filter = array_merge($filter_default, $filter);
|
||||
$value = $exists ? $fields[$fname] : null;
|
||||
|
||||
if(preg_match("/(^[a-z_]*)[\[](?:\'|\")?([a-z_]*)(?:\'|\")?[\]]$/i", $key, $matches))
|
||||
{
|
||||
$exists = array_key_exists($matches[1], $fields);
|
||||
$value = $exists ? $fields[$matches[1]][$matches[2]] : null;
|
||||
}
|
||||
else
|
||||
{
|
||||
$exists = array_key_exists($key, $fields);
|
||||
$value = $exists ? $fields[$fname] : null;
|
||||
}
|
||||
|
||||
if(is_array($value)) $value = implode('', $value);
|
||||
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ class Argument {
|
|||
switch ($filter_type) {
|
||||
case 'email' :
|
||||
case 'email_address' :
|
||||
if (!preg_match('/^[_0-9a-z-]+(\.[_0-9a-z-]+)*@[0-9a-z-]+(\.[0-9a-z-]+)*$/is', $val)) {
|
||||
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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,50 +53,63 @@
|
|||
$this->operation = $condition->attrs->operation;
|
||||
$this->pipe = $condition->attrs->pipe;
|
||||
$dbParser = DB::getParser();
|
||||
$this->column_name = $dbParser->parseExpression($condition->attrs->column);
|
||||
$this->column_name = $dbParser->parseExpression($condition->attrs->column);
|
||||
|
||||
// If default value is column name, it should be escaped
|
||||
if($isColumnName = strpos($condition->attrs->default, '.')){
|
||||
$condition->attrs->default = $dbParser->parseColumnName($condition->attrs->default);
|
||||
}
|
||||
// If default value is column name, it should be escaped
|
||||
if($isColumnName = (strpos($condition->attrs->default, '.') !== false
|
||||
&& strpos($condition->attrs->default, '.') !== 0
|
||||
&& strpos($condition->attrs->default, '%') === false ))
|
||||
{
|
||||
$condition->attrs->default = $dbParser->parseExpression($condition->attrs->default);
|
||||
}
|
||||
|
||||
if($condition->node_name == 'query'){
|
||||
$this->query = new QueryTag($condition, true);
|
||||
$this->default_column = $this->query->toString();
|
||||
}
|
||||
else if($condition->attrs->var && !strpos($condition->attrs->var, '.')){
|
||||
if($condition->node_name == 'query')
|
||||
{
|
||||
$this->query = new QueryTag($condition, TRUE);
|
||||
$this->default_column = $this->query->toString();
|
||||
}
|
||||
else if($condition->attrs->var && !strpos($condition->attrs->var, '.'))
|
||||
{
|
||||
$this->argument = new QueryArgument($condition);
|
||||
$this->argument_name = $this->argument->getArgumentName();
|
||||
}
|
||||
else {
|
||||
if(isset($condition->attrs->default)){
|
||||
$operationList = array('in'=>1, 'between'=>1, 'not in'=>1);
|
||||
if(isset($operationList[$this->operation])){
|
||||
$default_value = $condition->attrs->default;
|
||||
if(strpos($default_value, "'") !== false)
|
||||
$default_value = "\"" . $default_value . "\"";
|
||||
else
|
||||
$default_value = "'" . $default_value . "'";
|
||||
}
|
||||
else {
|
||||
$default_value_object = new DefaultValue($this->column_name, $condition->attrs->default);
|
||||
$default_value = $default_value_object->toString();
|
||||
else
|
||||
{
|
||||
if(isset($condition->attrs->default))
|
||||
{
|
||||
$operationList = array('in' => 1, 'between' => 1, 'not in' => 1);
|
||||
if(isset($operationList[$this->operation]))
|
||||
{
|
||||
$default_value = $condition->attrs->default;
|
||||
if(strpos($default_value, "'") !== FALSE)
|
||||
$default_value = "\"" . $default_value . "\"";
|
||||
else
|
||||
{
|
||||
$default_value = "'" . $default_value . "'";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$default_value_object = new DefaultValue($this->column_name, $condition->attrs->default);
|
||||
$default_value = $default_value_object->toString();
|
||||
|
||||
if($default_value_object->isStringFromFunction()){
|
||||
$default_value = '"\'".' . $default_value . '."\'"';
|
||||
}
|
||||
if($default_value_object->isStringFromFunction())
|
||||
{
|
||||
$default_value = '"\'".' . $default_value . '."\'"';
|
||||
}
|
||||
|
||||
if($default_value_object->isString() && !$isColumnName && !is_numeric( $condition->attrs->default)){
|
||||
if(strpos($default_value, "'") !== false)
|
||||
$default_value = "\"" . $default_value . "\"";
|
||||
else
|
||||
$default_value = "'" . $default_value . "'";
|
||||
}
|
||||
}
|
||||
$this->default_column = $default_value;
|
||||
}
|
||||
else
|
||||
$this->default_column = "'" . $dbParser->parseColumnName($condition->attrs->var) . "'" ;
|
||||
if($default_value_object->isString() && !$isColumnName && !is_numeric($condition->attrs->default))
|
||||
{
|
||||
if(strpos($default_value, "'") !== FALSE)
|
||||
$default_value = "\"" . $default_value . "\"";
|
||||
else
|
||||
$default_value = "'" . $default_value . "'";
|
||||
}
|
||||
}
|
||||
$this->default_column = $default_value;
|
||||
}
|
||||
else
|
||||
$this->default_column = "'" . $dbParser->parseColumnName($condition->attrs->var) . "'";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,22 @@ jQuery(function($) {
|
|||
$(this).hide().prev('button').show().parent().next(fold_container).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
jQuery('input[type="submit"]').click(function(ev){
|
||||
var $el = jQuery(ev.currentTarget);
|
||||
|
||||
setTimeout(function(){
|
||||
return function(){
|
||||
$el.attr('disabled', 'disabled');
|
||||
};
|
||||
}(), 0);
|
||||
|
||||
setTimeout(function(){
|
||||
return function(){
|
||||
$el.removeAttr('disabled');
|
||||
};
|
||||
}(), 3000);
|
||||
});
|
||||
});
|
||||
|
||||
(function(){ // String extension methods
|
||||
|
|
@ -349,18 +364,18 @@ function sendMailTo(to) {
|
|||
/**
|
||||
* @brief url이동 (open_window 값이 N 가 아니면 새창으로 띄움)
|
||||
**/
|
||||
function move_url(url, open_wnidow) {
|
||||
function move_url(url, open_window) {
|
||||
if(!url) return false;
|
||||
if(typeof(open_wnidow) == 'undefined') open_wnidow = 'N';
|
||||
if(open_wnidow=='N') {
|
||||
open_wnidow = false;
|
||||
if(typeof(open_window) == 'undefined') open_window = 'N';
|
||||
if(open_window=='N') {
|
||||
open_window = false;
|
||||
} else {
|
||||
open_wnidow = true;
|
||||
open_window = true;
|
||||
}
|
||||
|
||||
if(/^\./.test(url)) url = request_uri+url;
|
||||
|
||||
if(open_wnidow) {
|
||||
if(open_window) {
|
||||
winopen(url);
|
||||
} else {
|
||||
location.href=url;
|
||||
|
|
|
|||
|
|
@ -73,12 +73,13 @@ function doSelectKrZip(form, column_name) {
|
|||
$zone_list.hide();
|
||||
$zone_search.hide();
|
||||
|
||||
$form.get(0).elements[column_name][0].value = $select.val();
|
||||
$form.get(0).elements[column_name][1].focus();
|
||||
$form.get(0).elements[column_name + '[]'][0].value = $select.val();
|
||||
$form.get(0).elements[column_name + '[]'][1].focus();
|
||||
}
|
||||
|
||||
function doShowKrZipSearch(obj, column_name) {
|
||||
var $=jQuery;
|
||||
$('input[name="'+column_name+'[]"]').val('');
|
||||
$('#addr_list_'+column_name).hide();
|
||||
$('#addr_search_'+column_name).show();
|
||||
$('#addr_searched_'+column_name).hide();
|
||||
|
|
|
|||
|
|
@ -473,7 +473,22 @@ jQuery(function($) {
|
|||
$(this).hide().prev('button').show().parent().next(fold_container).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
jQuery('input[type="submit"]').click(function(ev){
|
||||
var $el = jQuery(ev.currentTarget);
|
||||
|
||||
setTimeout(function(){
|
||||
return function(){
|
||||
$el.attr('disabled', 'disabled');
|
||||
};
|
||||
}(), 0);
|
||||
|
||||
setTimeout(function(){
|
||||
return function(){
|
||||
$el.removeAttr('disabled');
|
||||
};
|
||||
}(), 3000);
|
||||
});
|
||||
});
|
||||
|
||||
(function(){ // String extension methods
|
||||
|
|
@ -633,18 +648,18 @@ function sendMailTo(to) {
|
|||
/**
|
||||
* @brief url이동 (open_window 값이 N 가 아니면 새창으로 띄움)
|
||||
**/
|
||||
function move_url(url, open_wnidow) {
|
||||
function move_url(url, open_window) {
|
||||
if(!url) return false;
|
||||
if(typeof(open_wnidow) == 'undefined') open_wnidow = 'N';
|
||||
if(open_wnidow=='N') {
|
||||
open_wnidow = false;
|
||||
if(typeof(open_window) == 'undefined') open_window = 'N';
|
||||
if(open_window=='N') {
|
||||
open_window = false;
|
||||
} else {
|
||||
open_wnidow = true;
|
||||
open_window = true;
|
||||
}
|
||||
|
||||
if(/^\./.test(url)) url = request_uri+url;
|
||||
|
||||
if(open_wnidow) {
|
||||
if(open_window) {
|
||||
winopen(url);
|
||||
} else {
|
||||
location.href=url;
|
||||
|
|
@ -1706,7 +1721,7 @@ var Validator = xe.createApp('Validator', {
|
|||
init : function() {
|
||||
// {{{ add filters
|
||||
// email
|
||||
var regEmail = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
|
||||
var regEmail = /^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
|
||||
this.cast('ADD_RULE', ['email', regEmail]);
|
||||
this.cast('ADD_RULE', ['email_address', regEmail]);
|
||||
|
||||
|
|
|
|||
257
common/js/xe.min.js
vendored
257
common/js/xe.min.js
vendored
|
|
@ -3,190 +3,73 @@
|
|||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief XE Common JavaScript
|
||||
**/
|
||||
(function($){var _xe_base,_app_base,_plugin_base;var _apps=[];_xe_base={getName:function(){return'Core';},createApp:function(sName,oDef){var _base=getTypeBase();$.extend(_base.prototype,_app_base,oDef);_base.prototype.getName=function(){return sName;};return _base;},createPlugin:function(sName,oDef){var _base=getTypeBase();$.extend(_base.prototype,_plugin_base,oDef);_base.prototype.getName=function(){return sName;};return _base;},getApps:function(){return $.makeArray(_apps);},getApp:function(indexOrName){indexOrName=(indexOrName||'').toLowerCase();if(typeof _apps[indexOrName]!='undefined'){return _apps[indexOrName];}else{return null;}},registerApp:function(oApp){var sName=oApp.getName().toLowerCase();_apps.push(oApp);if(!$.isArray(_apps[sName])){_apps[sName]=[];}
|
||||
_apps[sName].push(oApp);oApp.parent=this;if($.isFunction(oApp.activate))oApp.activate();},unregisterApp:function(oApp){var sName=oApp.getName().toLowerCase();var nIndex=$.inArray(oApp,_apps);if(nIndex>=0)_apps=_apps.splice(nIndex,1);if($.isArray(_apps[sName])){nIndex=$.inArray(oApp,_apps[sName]);if(nIndex>=0)_apps[sName]=_apps[sName].splice(nIndex,1);}
|
||||
if($.isFunction(oApp.deactivate))oApp.deactivate();},broadcast:function(msg,params){this._broadcast(this,msg,params);},_broadcast:function(sender,msg,params){for(var i=0;i<_apps.length;i++){_apps[i]._cast(sender,msg,params);}
|
||||
this._cast(sender,msg,params);}}
|
||||
_app_base={_plugins:[],_messages:{},getPlugin:function(sPluginName){sPluginName=sPluginName.toLowerCase();if($.isArray(this._plugins[sPluginName])){return this._plugins[sPluginName];}else{return[];}},registerPlugin:function(oPlugin){var self=this;var sName=oPlugin.getName().toLowerCase();if($.inArray(oPlugin,this._plugins)>=0)return false;this._plugins.push(oPlugin);if(!$.isArray(this._plugins[sName]))this._plugins[sName]=[];this._plugins[sName].push(oPlugin);$.each(oPlugin._binded_fn,function(api,fn){self.registerHandler(api,fn);});oPlugin.oApp=this;if($.isFunction(oPlugin.activate))oPlugin.activate();return true;},registerHandler:function(api,func){var msgs=this._messages;api=api.toUpperCase();if(!$.isArray(msgs[api]))msgs[api]=[];msgs[api].push(func);},cast:function(msg,params){return this._cast(this,msg,params||[]);},broadcast:function(sender,msg,params){if(this.parent&&this.parent._broadcast){this.parent._broadcast(sender,msg,params);}},_cast:function(sender,msg,params){var i,len;var aMsg=this._messages;msg=msg.toUpperCase();if(aMsg['BEFORE_'+msg]||this['API_BEFORE_'+msg]){var bContinue=this._cast(sender,'BEFORE_'+msg,params);if(!bContinue)return;}
|
||||
var vRet=[],sFn='API_'+msg;if($.isArray(aMsg[msg])){for(i=0;i<aMsg[msg].length;i++){vRet.push(aMsg[msg][i](sender,params));}}
|
||||
if(vRet.length<2)vRet=vRet[0];if(aMsg['AFTER_'+msg]||this['API_AFTER_'+msg]){this._cast(sender,'AFTER_'+msg,params);}
|
||||
if(!/^(?:AFTER|BEFORE)_/.test(msg)){return vRet;}else{return $.isArray(vRet)?($.inArray(false,vRet)<0):((typeof vRet=='undefined')?true:!!vRet);}}};_plugin_base={oApp:null,cast:function(msg,params){if(this.oApp&&this.oApp._cast){return this.oApp._cast(this,msg,params||[]);}},broadcast:function(msg,params){if(this.oApp&&this.oApp.broadcast){this.oApp.broadcast(this,mag,params||[]);}}};function getTypeBase(){var _base=function(){var self=this;var pool=null;if($.isArray(this._plugins))this._plugins=[];if(this._messages)this._messages={};else this._binded_fn={};$.each(this,function(key,val){if(!$.isFunction(val))return true;if(!/^API_([A-Z0-9_]+)$/.test(key))return true;var api=RegExp.$1;var fn=function(sender,params){return self[key](sender,params)};if(self._messages)self._messages[api]=[fn];else self._binded_fn[api]=fn;});if($.isFunction(this.init))this.init.apply(this,arguments);};return _base;}
|
||||
window.xe=$.extend(_app_base,_xe_base);window.xe.lang={};$(function(){xe.broadcast('ONREADY');});$(window).load(function(){xe.broadcast('ONLOAD');});})(jQuery);if(jQuery)jQuery.noConflict();(function($){var UA=navigator.userAgent.toLowerCase();$.os={Linux:/linux/.test(UA),Unix:/x11/.test(UA),Mac:/mac/.test(UA),Windows:/win/.test(UA)};$.os.name=($.os.Windows)?'Windows':($.os.Linux)?'Linux':($.os.Unix)?'Unix':($.os.Mac)?'Mac':'';window.XE={loaded_popup_menus:new Array(),addedDocument:new Array(),checkboxToggleAll:function(itemName){if(!is_def(itemName))itemName='cart';var options={wrap:null,checked:'toggle',doClick:false};switch(arguments.length){case 1:if(typeof(arguments[0])=="string"){itemName=arguments[0];}else{$.extend(options,arguments[0]||{});itemName='cart';}
|
||||
break;case 2:itemName=arguments[0];$.extend(options,arguments[1]||{});}
|
||||
if(options.doClick==true)options.checked=null;if(typeof(options.wrap)=="string")options.wrap='#'+options.wrap;if(options.wrap){var obj=$(options.wrap).find('input[name='+itemName+']:checkbox');}else{var obj=$('input[name='+itemName+']:checkbox');}
|
||||
if(options.checked=='toggle'){obj.each(function(){$(this).attr('checked',($(this).attr('checked'))?false:true);});}else{(options.doClick==true)?obj.click():obj.attr('checked',options.checked);}},displayPopupMenu:function(ret_obj,response_tags,params){var target_srl=params["target_srl"];var menu_id=params["menu_id"];var menus=ret_obj['menus'];var html="";if(this.loaded_popup_menus[menu_id]){html=this.loaded_popup_menus[menu_id];}else{if(menus){var item=menus['item'];if(typeof(item.length)=='undefined'||item.length<1)item=new Array(item);if(item.length){for(var i=0;i<item.length;i++){var url=item[i].url;var str=item[i].str;var icon=item[i].icon;var target=item[i].target;var styleText="";var click_str="";switch(target){case"popup":click_str=" onclick=\"popopen(this.href,'"+target+"'); return false;\"";break;case"javascript":click_str=" onclick=\""+url+"; return false; \"";url="#";break;default:click_str=" onclick=\"window.open(this.href); return false;\"";break;}
|
||||
html+='<li '+styleText+'><a href="'+url+'"'+click_str+'>'+str+'</a></li> ';}}}
|
||||
this.loaded_popup_menus[menu_id]=html;}
|
||||
if(html){var area=$('#popup_menu_area').html('<ul>'+html+'</ul>');var areaOffset={top:params['page_y'],left:params['page_x']};if(area.outerHeight()+areaOffset.top>$(window).height()+$(window).scrollTop())
|
||||
areaOffset.top=$(window).height()-area.outerHeight()+$(window).scrollTop();if(area.outerWidth()+areaOffset.left>$(window).width()+$(window).scrollLeft())
|
||||
areaOffset.left=$(window).width()-area.outerWidth()+$(window).scrollLeft();area.css({top:areaOffset.top,left:areaOffset.left}).show();}}}})(jQuery);jQuery(function($){if($.browser.msie){$('select').each(function(i,sels){var disabled_exists=false;var first_enable=new Array();for(var j=0;j<sels.options.length;j++){if(sels.options[j].disabled){sels.options[j].style.color='#CCCCCC';disabled_exists=true;}else{first_enable[i]=(first_enable[i]>-1)?first_enable[i]:j;}}
|
||||
if(!disabled_exists)return;sels.oldonchange=sels.onchange;sels.onchange=function(){if(this.options[this.selectedIndex].disabled){this.selectedIndex=first_enable[i];}else{if(this.oldonchange)this.oldonchange();}};if(sels.selectedIndex>=0&&sels.options[sels.selectedIndex].disabled)sels.onchange();});}
|
||||
var drEditorFold=$('.xe_content .fold_button');if(drEditorFold.size()){var fold_container=$('div.fold_container',drEditorFold);$('button.more',drEditorFold).click(function(){$(this).hide().next('button').show().parent().next(fold_container).show();});$('button.less',drEditorFold).click(function(){$(this).hide().prev('button').show().parent().next(fold_container).hide();});}});(function(){function isSameUrl(a,b){return(a.replace(/#.*$/,'')===b.replace(/#.*$/,''));}
|
||||
var isArray=Array.isArray||function(obj){return Object.prototype.toString.call(obj)=='[object Array]'};String.prototype.getQuery=function(key){var loc=isSameUrl(this,window.location.href)?current_url:this;var idx=loc.indexOf('?');if(idx==-1)return null;var query_string=loc.substr(idx+1,this.length),args={};query_string.replace(/([^=]+)=([^&]*)(&|$)/g,function(){args[arguments[1]]=arguments[2];});var q=args[key];if(typeof(q)=='undefined')q='';return q;}
|
||||
String.prototype.setQuery=function(key,val){var loc=isSameUrl(this,window.location.href)?current_url:this;var idx=loc.indexOf('?');var uri=loc.replace(/#$/,'');var act,re,v;if(typeof(val)=='undefined')val='';if(idx!=-1){var query_string=uri.substr(idx+1,loc.length),args={},q_list=[];uri=loc.substr(0,idx);query_string.replace(/([^=]+)=([^&]*)(&|$)/g,function(all,key,val){args[key]=val;});args[key]=val;for(var prop in args){if(!args.hasOwnProperty(prop))continue;if(!(v=String(args[prop]).trim()))continue;q_list.push(prop+'='+decodeURI(v));}
|
||||
query_string=q_list.join('&');uri=uri+(query_string?'?'+query_string:'');}else{if(String(val).trim())uri=uri+'?'+key+'='+val;}
|
||||
re=/^https:\/\/([^:\/]+)(:\d+|)/i;if(re.test(uri)){var toReplace='http://'+RegExp.$1;if(window.http_port&&http_port!=80)toReplace+=':'+http_port;uri=uri.replace(re,toReplace);}
|
||||
var bUseSSL=!!window.enforce_ssl;if(!bUseSSL&&isArray(window.ssl_actions)&&(act=uri.getQuery('act'))){for(var i=0,c=ssl_actions.length;i<c;i++){if(ssl_actions[i]===act){bUseSSL=true;break;}}}
|
||||
re=/http:\/\/([^:\/]+)(:\d+|)/i;if(bUseSSL&&re.test(uri)){var toReplace='https://'+RegExp.$1
|
||||
if(window.https_port&&https_port!=443)toReplace+=':'+https_port;uri=uri.replace(re,toReplace);}
|
||||
uri=uri.replace(/\/(index\.php)?\?/,'/index.php?');return encodeURI(uri);}
|
||||
String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");}})();function xSleep(sec){sec=sec/1000;var now=new Date();var sleep=new Date();while(sleep.getTime()-now.getTime()<sec){sleep=new Date();}}
|
||||
function isDef(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=="undefined")return false;}
|
||||
return true;}
|
||||
var winopen_list=new Array();function winopen(url,target,attribute){if(typeof(xeVid)!='undefined'&&url.indexOf(request_uri)>-1&&!url.getQuery('vid'))url=url.setQuery('vid',xeVid);try{if(target!="_blank"&&winopen_list[target]){winopen_list[target].close();winopen_list[target]=null;}}catch(e){}
|
||||
if(typeof(target)=='undefined')target='_blank';if(typeof(attribute)=='undefined')attribute='';var win=window.open(url,target,attribute);win.focus();if(target!="_blank")winopen_list[target]=win;}
|
||||
function popopen(url,target){if(typeof(target)=="undefined")target="_blank";if(typeof(xeVid)!='undefined'&&url.indexOf(request_uri)>-1&&!url.getQuery('vid'))url=url.setQuery('vid',xeVid);winopen(url,target,"width=650,height=500,scrollbars=yes,resizable=yes,toolbars=no");}
|
||||
function sendMailTo(to){location.href="mailto:"+to;}
|
||||
function move_url(url,open_wnidow){if(!url)return false;if(typeof(open_wnidow)=='undefined')open_wnidow='N';if(open_wnidow=='N'){open_wnidow=false;}else{open_wnidow=true;}
|
||||
if(/^\./.test(url))url=request_uri+url;if(open_wnidow){winopen(url);}else{location.href=url;}
|
||||
return false;}
|
||||
function displayMultimedia(src,width,height,options){var html=_displayMultimedia(src,width,height,options);if(html)document.writeln(html);}
|
||||
function _displayMultimedia(src,width,height,options){if(src.indexOf('files')==0)src=request_uri+src;var defaults={wmode:'transparent',allowScriptAccess:'sameDomain',quality:'high',flashvars:'',autostart:false};var params=jQuery.extend(defaults,options||{});var autostart=(params.autostart&¶ms.autostart!='false')?'true':'false';delete(params.autostart);var clsid="";var codebase="";var html="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(src)){html='<img src="'+src+'" width="'+width+'" height="'+height+'" />';}else if(/\.flv$/i.test(src)||/\.mov$/i.test(src)||/\.moov$/i.test(src)||/\.m4v$/i.test(src)){html='<embed src="'+request_uri+'common/img/flvplayer.swf" allowfullscreen="true" autostart="'+autostart+'" width="'+width+'" height="'+height+'" flashvars="&file='+src+'&width='+width+'&height='+height+'&autostart='+autostart+'" wmode="'+params.wmode+'" />';}else if(/\.swf/i.test(src)){clsid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';if(typeof(enforce_ssl)!='undefined'&&enforce_ssl){codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0";}
|
||||
else{codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0";}
|
||||
html='<object classid="'+clsid+'" codebase="'+codebase+'" width="'+width+'" height="'+height+'" flashvars="'+params.flashvars+'">';html+='<param name="movie" value="'+src+'" />';for(var name in params){if(params[name]!='undefined'&¶ms[name]!=''){html+='<param name="'+name+'" value="'+params[name]+'" />';}}
|
||||
html+=''
|
||||
+'<embed src="'+src+'" autostart="'+autostart+'" width="'+width+'" height="'+height+'" flashvars="'+params.flashvars+'" wmode="'+params.wmode+'"></embed>'
|
||||
+'</object>';}else{if(jQuery.browser.mozilla||jQuery.browser.opera){autostart=(params.autostart&¶ms.autostart!='false')?'1':'0';}
|
||||
html='<embed src="'+src+'" autostart="'+autostart+'" width="'+width+'" height="'+height+'"';if(params.wmode=='transparent'){html+=' windowlessvideo="1"';}
|
||||
html+='></embed>';}
|
||||
return html;}
|
||||
function zbxe_folder_open(id){jQuery("#folder_open_"+id).hide();jQuery("#folder_close_"+id).show();jQuery("#folder_"+id).show();}
|
||||
function zbxe_folder_close(id){jQuery("#folder_open_"+id).show();jQuery("#folder_close_"+id).hide();jQuery("#folder_"+id).hide();}
|
||||
function setFixedPopupSize(){var $=jQuery,$win=$(window),$pc=$('body>.popup'),w,h,dw,dh,offset;offset=$pc.css({overflow:'scroll'}).offset();w=$pc.width(10).height(10000).get(0).scrollWidth+offset.left*2;h=$pc.height(10).width(10000).get(0).scrollHeight+offset.top*2;if(w<600)w=600+offset.left*2;dw=$win.width();dh=$win.height();if(w!=dw)window.resizeBy(w-dw,0);if(h!=dh)window.resizeBy(0,h-dh);$pc.width(w-offset.left*2).css({overflow:'',height:''});}
|
||||
function doCallModuleAction(module,action,target_srl){var params={target_srl:target_srl,cur_mid:current_mid,mid:current_mid};exec_xml(module,action,params,completeCallModuleAction);}
|
||||
function completeCallModuleAction(ret_obj,response_tags){if(ret_obj['message']!='success')alert(ret_obj['message']);location.reload();}
|
||||
function completeMessage(ret_obj){alert(ret_obj['message']);location.reload();}
|
||||
function doChangeLangType(obj){if(typeof(obj)=="string"){setLangType(obj);}else{var val=obj.options[obj.selectedIndex].value;setLangType(val);}
|
||||
location.href=location.href.setQuery('l','');}
|
||||
function setLangType(lang_type){var expire=new Date();expire.setTime(expire.getTime()+(7000*24*3600000));setCookie('lang_type',lang_type,expire,'/');}
|
||||
function doDocumentPreview(obj){var fo_obj=obj;while(fo_obj.nodeName!="FORM"){fo_obj=fo_obj.parentNode;}
|
||||
if(fo_obj.nodeName!="FORM")return;var editor_sequence=fo_obj.getAttribute('editor_sequence');var content=editorGetContent(editor_sequence);var win=window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");var dummy_obj=jQuery("#previewDocument");if(!dummy_obj.length){jQuery('<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'">'+'<input type="hidden" name="module" value="document" />'+'<input type="hidden" name="act" value="dispDocumentPreview" />'+'<input type="hidden" name="content" />'+'</form>').appendTo(document.body);dummy_obj=jQuery("#previewDocument")[0];}else{dummy_obj=dummy_obj[0];}
|
||||
if(dummy_obj){dummy_obj.content.value=content;dummy_obj.submit();}}
|
||||
function doDocumentSave(obj){var editor_sequence=obj.form.getAttribute('editor_sequence');var prev_content=editorRelKeys[editor_sequence]['content'].value;if(typeof(editor_sequence)!='undefined'&&editor_sequence&&typeof(editorRelKeys)!='undefined'&&typeof(editorGetContent)=='function'){var content=editorGetContent(editor_sequence);editorRelKeys[editor_sequence]['content'].value=content;}
|
||||
var params={},responses=['error','message','document_srl'],elms=obj.form.elements,data=jQuery(obj.form).serializeArray();;jQuery.each(data,function(i,field){var val=jQuery.trim(field.value);if(!val)return true;if(/\[\]$/.test(field.name))field.name=field.name.replace(/\[\]$/,'');if(params[field.name])params[field.name]+='|@|'+val;else params[field.name]=field.value;});exec_xml('document','procDocumentTempSave',params,completeDocumentSave,responses,params,obj.form);editorRelKeys[editor_sequence]['content'].value=prev_content;return false;}
|
||||
function completeDocumentSave(ret_obj){jQuery('input[name=document_srl]').eq(0).val(ret_obj['document_srl']);alert(ret_obj['message']);}
|
||||
var objForSavedDoc=null;function doDocumentLoad(obj){objForSavedDoc=obj.form;popopen(request_uri.setQuery('module','document').setQuery('act','dispTempSavedList'));}
|
||||
function doDocumentSelect(document_srl){if(!opener||!opener.objForSavedDoc){window.close();return;}
|
||||
opener.location.href=opener.current_url.setQuery('document_srl',document_srl).setQuery('act','dispBoardWrite');window.close();}
|
||||
function viewSkinInfo(module,skin){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+module+"&skin="+skin,'SkinInfo');}
|
||||
var addedDocument=new Array();function doAddDocumentCart(obj){var srl=obj.value;addedDocument[addedDocument.length]=srl;setTimeout(function(){callAddDocumentCart(addedDocument.length);},100);}
|
||||
function callAddDocumentCart(document_length){if(addedDocument.length<1||document_length!=addedDocument.length)return;var params=new Array();params["srls"]=addedDocument.join(",");exec_xml("document","procDocumentAddCart",params,null);addedDocument=new Array();}
|
||||
function transRGB2Hex(value){if(!value)return value;if(value.indexOf('#')>-1)return value.replace(/^#/,'');if(value.toLowerCase().indexOf('rgb')<0)return value;value=value.replace(/^rgb\(/i,'').replace(/\)$/,'');value_list=value.split(',');var hex='';for(var i=0;i<value_list.length;i++){var color=parseInt(value_list[i],10).toString(16);if(color.length==1)color='0'+color;hex+=color;}
|
||||
return hex;}
|
||||
function toggleSecuritySignIn(){var href=location.href;if(/https:\/\//i.test(href))location.href=href.replace(/^https/i,'http');else location.href=href.replace(/^http/i,'https');}
|
||||
function reloadDocument(){location.reload();}
|
||||
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=Base64._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}
|
||||
output=output+
|
||||
this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+
|
||||
this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4);}
|
||||
return output;},decode:function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2);}
|
||||
if(enc4!=64){output=output+String.fromCharCode(chr3);}}
|
||||
output=Base64._utf8_decode(output);return output;},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}
|
||||
else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}
|
||||
else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
|
||||
return utftext;},_utf8_decode:function(utftext){var string="";var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}
|
||||
else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}
|
||||
else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
|
||||
return string;}}
|
||||
if(typeof(resizeImageContents)=='undefined'){function resizeImageContents(){}}
|
||||
if(typeof(activateOptionDisabled)=='undefined'){function activateOptionDisabled(){}}
|
||||
objectExtend=jQuery.extend;function toggleDisplay(objId){jQuery('#'+objId).toggle();}
|
||||
function checkboxSelectAll(formObj,name,checked){var itemName=name;var option={};if(typeof(formObj)!="undefined")option.wrap=formObj;if(typeof(checked)!="undefined")option.checked=checked;XE.checkboxToggleAll(itemName,option);}
|
||||
function clickCheckBoxAll(formObj,name){var itemName=name;var option={doClick:true};if(typeof(formObj)!="undefined")option.wrap=formObj;XE.checkboxToggleAll(itemName,option);}
|
||||
function svc_folder_open(id){jQuery("#_folder_open_"+id).hide();jQuery("#_folder_close_"+id).show();jQuery("#_folder_"+id).show();}
|
||||
function svc_folder_close(id){jQuery("#_folder_open_"+id).show();jQuery("#_folder_close_"+id).hide();jQuery("#_folder_"+id).hide();}
|
||||
function open_calendar(fo_id,day_str,callback_func){if(typeof(day_str)=="undefined")day_str="";var url="./common/tpl/calendar.php?";if(fo_id)url+="fo_id="+fo_id;if(day_str)url+="&day_str="+day_str;if(callback_func)url+="&callback_func="+callback_func;popopen(url,'Calendar');}
|
||||
var loaded_popup_menus=XE.loaded_popup_menus;function createPopupMenu(){}
|
||||
function chkPopupMenu(){}
|
||||
function displayPopupMenu(ret_obj,response_tags,params){XE.displayPopupMenu(ret_obj,response_tags,params);}
|
||||
function GetObjLeft(obj){return jQuery(obj).offset().left;}
|
||||
function GetObjTop(obj){return jQuery(obj).offset().top;}
|
||||
function replaceOuterHTML(obj,html){jQuery(obj).replaceWith(html);}
|
||||
function getOuterHTML(obj){return jQuery(obj).html().trim();}
|
||||
function setCookie(name,value,expire,path){var s_cookie=name+"="+escape(value)+
|
||||
((!expire)?"":("; expires="+expire.toGMTString()))+"; path="+((!path)?"/":path);document.cookie=s_cookie;}
|
||||
function getCookie(name){var match=document.cookie.match(new RegExp(name+'=(.*?)(?:;|$)'));if(match)return unescape(match[1]);}
|
||||
function is_def(v){return(typeof(v)!='undefined');}
|
||||
function ucfirst(str){return str.charAt(0).toUpperCase()+str.slice(1);}
|
||||
function get_by_id(id){return document.getElementById(id);}
|
||||
jQuery(function($){$('.lang_code').each(function()
|
||||
{var objText=$(this);var targetName=objText.attr("id");if(typeof(targetName)=="undefined")targetName=objText.attr("name");if(typeof(targetName)=="undefined")return;objText.after("<a href='"+request_uri.setQuery('module','module').setQuery('act','dispModuleAdminLangcode').setQuery('target',targetName)+"' class='buttonSet buttonSetting' onclick='popopen(this.href);return false;'><span>find_langcode</span></a>");});$(document).click(function(evt){var $area=$('#popup_menu_area');if(!$area.length)$area=$('<div id="popup_menu_area" style="display:none;z-index:9999" />').appendTo(document.body);$area.hide();var $target=$(evt.target).filter('a,div,span');if(!$target.length)$target=$(evt.target).closest('a,div,span');if(!$target.length)return;var cls=$target.attr('class'),match;if(cls)match=cls.match(new RegExp('(?:^| )((document|comment|member)_([1-9]\\d*))(?: |$)',''));if(!match)return;var action='get'+ucfirst(match[2])+'Menu';var params={mid:current_mid,cur_mid:current_mid,menu_id:match[1],target_srl:match[3],cur_act:current_url.getQuery('act'),page_x:evt.pageX,page_y:evt.pageY};var response_tags='error message menus'.split(' ');evt.preventDefault();evt.stopPropagation();if(is_def(window.xeVid))params.vid=xeVid;if(is_def(XE.loaded_popup_menus[params.menu_id]))return XE.displayPopupMenu(params,response_tags,params);show_waiting_message=false;exec_xml('member',action,params,XE.displayPopupMenu,response_tags,params);show_waiting_message=true;});$('a._xe_popup').click(function(){var $this=$(this),name=$this.attr('name'),href=$this.attr('href'),win;if(!name)name='_xe_popup_'+Math.floor(Math.random()*1000);win=window.open(href,name,'left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');if(win)win.focus();return false;});if($.datepicker){$.datepicker.setDefaults({dateFormat:'yy-mm-dd'});}});var show_waiting_message=true;function xml2json(xml,tab,ignoreAttrib){var X={toObj:function(xml){var o={};if(xml.nodeType==1){if(ignoreAttrib&&xml.attributes.length)
|
||||
for(var i=0;i<xml.attributes.length;i++)
|
||||
o["@"+xml.attributes[i].nodeName]=(xml.attributes[i].nodeValue||"").toString();if(xml.firstChild){var textChild=0,cdataChild=0,hasElementChild=false;for(var n=xml.firstChild;n;n=n.nextSibling){if(n.nodeType==1)hasElementChild=true;else if(n.nodeType==3&&n.nodeValue.match(/[^ \f\n\r\t\v]/))textChild++;else if(n.nodeType==4)cdataChild++;}
|
||||
if(hasElementChild){if(textChild<2&&cdataChild<2){X.removeWhite(xml);for(var n=xml.firstChild;n;n=n.nextSibling){if(n.nodeType==3)
|
||||
o=X.escape(n.nodeValue);else if(n.nodeType==4)
|
||||
o=X.escape(n.nodeValue);else if(o[n.nodeName]){if(o[n.nodeName]instanceof Array)
|
||||
o[n.nodeName][o[n.nodeName].length]=X.toObj(n);else
|
||||
o[n.nodeName]=[o[n.nodeName],X.toObj(n)];}
|
||||
else
|
||||
o[n.nodeName]=X.toObj(n);}}
|
||||
else{if(!xml.attributes.length)
|
||||
o=X.escape(X.innerXml(xml));else
|
||||
o["#text"]=X.escape(X.innerXml(xml));}}
|
||||
else if(textChild){if(!xml.attributes.length)
|
||||
o=X.escape(X.innerXml(xml));else
|
||||
o["#text"]=X.escape(X.innerXml(xml));}
|
||||
else if(cdataChild){if(cdataChild>1)
|
||||
o=X.escape(X.innerXml(xml));else
|
||||
for(var n=xml.firstChild;n;n=n.nextSibling){o=X.escape(n.nodeValue);}}}
|
||||
if(!xml.attributes.length&&!xml.firstChild)o=null;}
|
||||
else if(xml.nodeType==9){o=X.toObj(xml.documentElement);}
|
||||
else
|
||||
alert("unhandled node type: "+xml.nodeType);return o;},toJson:function(o,name,ind){var json=name?("\""+name+"\""):"";if(o instanceof Array){for(var i=0,n=o.length;i<n;i++)
|
||||
o[i]=X.toJson(o[i],"",ind+"\t");json+=(name?":[":"[")+(o.length>1?("\n"+ind+"\t"+o.join(",\n"+ind+"\t")+"\n"+ind):o.join(""))+"]";}
|
||||
else if(o==null)
|
||||
json+=(name&&":")+"null";else if(typeof(o)=="object"){var arr=[];for(var m in o)
|
||||
arr[arr.length]=X.toJson(o[m],m,ind+"\t");json+=(name?":{":"{")+(arr.length>1?("\n"+ind+"\t"+arr.join(",\n"+ind+"\t")+"\n"+ind):arr.join(""))+"}";}
|
||||
else if(typeof(o)=="string")
|
||||
json+=(name&&":")+"\""+o.toString()+"\"";else
|
||||
json+=(name&&":")+o.toString();return json;},innerXml:function(node){var s=""
|
||||
if("innerHTML"in node)
|
||||
s=node.innerHTML;else{var asXml=function(n){var s="";if(n.nodeType==1){s+="<"+n.nodeName;for(var i=0;i<n.attributes.length;i++)
|
||||
s+=" "+n.attributes[i].nodeName+"=\""+(n.attributes[i].nodeValue||"").toString()+"\"";if(n.firstChild){s+=">";for(var c=n.firstChild;c;c=c.nextSibling)
|
||||
s+=asXml(c);s+="</"+n.nodeName+">";}
|
||||
else
|
||||
s+="/>";}
|
||||
else if(n.nodeType==3)
|
||||
s+=n.nodeValue;else if(n.nodeType==4)
|
||||
s+="<![CDATA["+n.nodeValue+"]]>";return s;};for(var c=node.firstChild;c;c=c.nextSibling)
|
||||
s+=asXml(c);}
|
||||
return s;},escape:function(txt){return txt.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,'\\n').replace(/[\r]/g,'\\r');},removeWhite:function(e){e.normalize();for(var n=e.firstChild;n;){if(n.nodeType==3){if(!n.nodeValue.match(/[^ \f\n\r\t\v]/)){var nxt=n.nextSibling;e.removeChild(n);n=nxt;}
|
||||
else
|
||||
n=n.nextSibling;}
|
||||
else if(n.nodeType==1){X.removeWhite(n);n=n.nextSibling;}
|
||||
else
|
||||
n=n.nextSibling;}
|
||||
return e;}};if(xml.nodeType==9)
|
||||
xml=xml.documentElement;var json_obj=X.toObj(X.removeWhite(xml)),json_str;if(typeof(JSON)=='object'&&jQuery.isFunction(JSON.stringify)&&false){var obj={};obj[xml.nodeName]=json_obj;json_str=JSON.stringify(obj);return json_str;}else{json_str=X.toJson(json_obj,xml.nodeName,"");return"{"+(tab?json_str.replace(/\t/g,tab):json_str.replace(/\t|\n/g,""))+"}";}}
|
||||
(function($){$.exec_xml=window.exec_xml=function(module,act,params,callback_func,response_tags,callback_func_arg,fo_obj){var xml_path=request_uri+"index.php"
|
||||
if(!params)params={};if($.isArray(params))params=arr2obj(params);params['module']=module;params['act']=act;if(typeof(xeVid)!='undefined')params['vid']=xeVid;if(typeof(response_tags)=="undefined"||response_tags.length<1)response_tags=['error','message'];else{response_tags.push('error','message');}
|
||||
if($.isArray(ssl_actions)&¶ms['act']&&$.inArray(params['act'],ssl_actions)>=0)
|
||||
{var url=default_url||request_uri;var port=window.https_port||443;var _ul=$('<a>').attr('href',url)[0];var target='https://'+_ul.hostname.replace(/:\d+$/,'');if(port!=443)target+=':'+port;if(_ul.pathname[0]!='/')target+='/';target+=_ul.pathname;xml_path=target.replace(/\/$/,'')+'/index.php';}
|
||||
var _u1=$('<a>').attr('href',location.href)[0];var _u2=$('<a>').attr('href',xml_path)[0];if(_u1.protocol!=_u2.protocol||_u1.port!=_u2.port)return send_by_form(xml_path,params);var xml=[],i=0;xml[i++]='<?xml version="1.0" encoding="utf-8" ?>';xml[i++]='<methodCall>';xml[i++]='<params>';$.each(params,function(key,val){xml[i++]='<'+key+'><![CDATA['+val+']]></'+key+'>';});xml[i++]='</params>';xml[i++]='</methodCall>';var _xhr=null;if(_xhr&&_xhr.readyState!=0)_xhr.abort();function onsuccess(data,textStatus,xhr){var resp_xml=$(data).find('response')[0],resp_obj,txt='',ret=[],tags={},json_str='';waiting_obj.css('display','none').trigger('cancel_confirm');if(!resp_xml){alert(_xhr.responseText);return null;}
|
||||
json_str=xml2json(resp_xml,false,false);resp_obj=(typeof(JSON)=='object'&&$.isFunction(JSON.parse))?JSON.parse(json_str):eval('('+json_str+')');resp_obj=resp_obj.response;if(typeof(resp_obj)=='undefined'){ret['error']=-1;ret['message']='Unexpected error occured.';try{if(typeof(txt=resp_xml.childNodes[0].firstChild.data)!='undefined')ret['message']+='\r\n'+txt;}catch(e){};return ret;}
|
||||
$.each(response_tags,function(key,val){tags[val]=true;});tags["redirect_url"]=true;tags["act"]=true;$.each(resp_obj,function(key,val){if(tags[key])ret[key]=val;});if(ret['error']!=0){if($.isFunction($.exec_xml.onerror)){return $.exec_xml.onerror(module,act,ret,callback_func,response_tags,callback_func_arg,fo_obj);}
|
||||
alert((ret['message']||'An unknown error occured while loading ['+module+'.'+act+']').replace(/\\n/g,'\n'));return null;}
|
||||
if(ret['redirect_url']){location.href=ret['redirect_url'].replace(/&/g,'&');return null;}
|
||||
if($.isFunction(callback_func))callback_func(ret,response_tags,callback_func_arg,fo_obj);}
|
||||
try{$.ajax({url:xml_path,type:'POST',dataType:'xml',data:xml.join('\n'),contentType:'text/plain',beforeSend:function(xhr){_xhr=xhr;},success:onsuccess,error:function(xhr,textStatus){waiting_obj.css('display','none');var msg='';if(textStatus=='parsererror'){msg='The result is not valid XML :\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;}
|
||||
var waiting_obj=$('.wfsr');if(show_waiting_message&&waiting_obj.length){waiting_obj.html(waiting_message).show();}}
|
||||
function send_by_form(url,params){var frame_id='xeTmpIframe';var form_id='xeVirtualForm';if(!$('#'+frame_id).length){$('<iframe name="%id%" id="%id%" style="position:absolute;left:-1px;top:1px;width:1px;height:1px"></iframe>'.replace(/%id%/g,frame_id)).appendTo(document.body);}
|
||||
$('#'+form_id).remove();var form=$('<form id="%id%"></form>'.replace(/%id%/g,form_id)).attr({'id':form_id,'method':'post','action':url,'target':frame_id});params['xeVirtualRequestMethod']='xml';params['xeRequestURI']=location.href.replace(/#(.*)$/i,'');params['xeVirtualRequestUrl']=request_uri;$.each(params,function(key,value){$('<input type="hidden">').attr('name',key).attr('value',value).appendTo(form);});form.appendTo(document.body).submit();}
|
||||
function arr2obj(arr){var ret={};for(var key in arr){if(arr.hasOwnProperty(key))ret[key]=arr[key];}
|
||||
return ret;}
|
||||
$.exec_json=function(action,data,func){if(typeof(data)=='undefined')data={};action=action.split(".");if(action.length==2){if(show_waiting_message)$(".wfsr").html(waiting_message).show();$.extend(data,{module:action[0],act:action[1]});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)alert(data.message);if($.isFunction(func))func(data);}});}};$.fn.exec_html=function(action,data,type,func,args){if(typeof(data)=='undefined')data={};if(!$.inArray(type,['html','append','prepend']))type='html';var self=$(this);action=action.split(".");if(action.length==2){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);}});}};function beforeUnloadHandler(){return'';}
|
||||
$(function($){$('.wfsr').ajaxStart(function(){$(window).bind('beforeunload',beforeUnloadHandler);}).bind('ajaxStop cancel_confirm',function(){$(window).unbind('beforeunload',beforeUnloadHandler);});});})(jQuery);(function($){var messages=[];var rules=[];var filters={};var callbacks=[];var extras={};var Validator=xe.createApp('Validator',{init:function(){var regEmail=/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;this.cast('ADD_RULE',['email',regEmail]);this.cast('ADD_RULE',['email_address',regEmail]);var regUserid=/^[a-z]+[\w-]*[a-z0-9_]+$/i;this.cast('ADD_RULE',['userid',regUserid]);this.cast('ADD_RULE',['user_id',regUserid]);var regUrl=/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/;this.cast('ADD_RULE',['url',regUrl]);this.cast('ADD_RULE',['homepage',regUrl]);var regKor=new RegExp('^[\uAC00-\uD7A3]*$');this.cast('ADD_RULE',['korean',regKor]);var regKorNum=new RegExp('^[\uAC00-\uD7A30-9]*$');this.cast('ADD_RULE',['korean_number',regKorNum]);var regAlpha=/^[a-z]*$/i;this.cast('ADD_RULE',['alpha',regAlpha]);var regAlphaNum=/^[a-z][a-z0-9_]*$/i;this.cast('ADD_RULE',['alpha_number',regAlphaNum]);var regNum=/^[0-9]*$/;this.cast('ADD_RULE',['number',regNum]);},run:function(oForm){var filter='';if(oForm._filter)filter=oForm._filter.value;var params=[oForm,filter];var result=this.cast('VALIDATE',params);if(typeof result=='undefined')result=false;return result;},API_ONREADY:function(){var self=this;$('form').each(function(){if(this.onsubmit){this['xe:onsubmit']=this.onsubmit;this.onsubmit=null;}}).submit(function(e){var legacyFn=this['xe:onsubmit'];var hasLegacyFn=$.isFunction(legacyFn);var bResult=hasLegacyFn?legacyFn.apply(this):self.run(this);if(!bResult)
|
||||
{e.stopImmediatePropagation();}
|
||||
return bResult;});},API_VALIDATE:function(sender,params){var result=true,form=params[0],elems=form.elements,filter,filter_to_add,ruleset,callback;var fields,names,name,el,val,mod,len,lenb,max,min,maxb,minb,rules,e_el,e_val,i,c,r,if_,fn;if(elems['ruleset'])filter=form.elements['ruleset'].value;else if(elems['_filter'])filter=form.elements['_filter'].value;if(!filter)return true;if($.isFunction(callbacks[filter]))callback=callbacks[filter];filter=$.extend({},filters[filter.toLowerCase()]||{},extras);function regex_quote(str){return str.replace(/([\.\+\-\[\]\{\}\(\)\\])/g,'\\$1');};fields=[];for(i=0,c=form.elements.length;i<c;i++){el=elems[i];name=el.name;if(!name||!elems[name])continue;if(!elems[name].length||elems[name][0]===el)fields.push(name);};fields=fields.join('\n');filter_to_add={};for(name in filter){if(!filter.hasOwnProperty(name))continue;names=[];if(name.substr(0,1)=='^'){names=fields.match((new RegExp('^'+regex_quote(name.substr(1))+'.*$','gm')));}else{continue;}
|
||||
if(!names)names=[];for(i=0,c=names.length;i<c;i++){filter_to_add[names[i]]=filter[name];}
|
||||
filter[name]=null;delete filter[name];};filter=$.extend(filter,filter_to_add);for(name in filter){if(!filter.hasOwnProperty(name))continue;f=filter[name];el=elems[name];if(!el)
|
||||
{el=elems[name+'[]'];}
|
||||
val=el?$.trim(get_value($(el))):'';mod=(f.modifier||'')+',';if(!el||el.disabled)continue;if(f['if']){if(!$.isArray(f['if']))f['if']=[f['if']];for(i=0;i<f['if'].length;i++){if_=f['if'][i];fn=new Function('el','return !!('+(if_.test.replace(/\$(\w+)/g,'(jQuery(\'[name=$1]\').is(\':radio, :checkbox\') ? jQuery(\'[name=$1]:checked\').val() : jQuery(\'[name=$1]\').val())'))+')');if(fn(elems))f[if_.attr]=if_.value;else delete f[if_.attr];}}
|
||||
if(!val){if(f['default'])val=f['default'];if(f.required)return this.cast('ALERT',[form,name,'isnull'])&&false;else continue;}
|
||||
min=parseInt(f.minlength)||0;max=parseInt(f.maxlength)||0;minb=/b$/.test(f.minlength||'');maxb=/b$/.test(f.maxlength||'');len=val.length;if(minb||maxb)lenb=get_bytes(val);if((min&&min>(minb?lenb:len))||(max&&max<(maxb?lenb:len))){return this.cast('ALERT',[form,name,'outofrange',min,max])&&false;}
|
||||
if(f.equalto){e_el=elems[f.equalto];e_val=e_el?$.trim(get_value($(e_el))):'';if(e_el&&e_val!==val){return this.cast('ALERT',[form,name,'equalto'])&&false;}}
|
||||
rules=(f.rule||'').split(',');for(i=0,c=rules.length;i<c;i++){if(!(r=rules[i]))continue;result=this.cast('APPLY_RULE',[r,val]);if(mod.indexOf('not,')>-1)result=!result;if(!result){return this.cast('ALERT',[form,name,'invalid_'+r])&&false;}}};if($.isFunction(callback))return callback(form);return true;},API_ADD_RULE:function(sender,params){var name=params[0].toLowerCase();rules[name]=params[1];},API_DEL_RULE:function(sender,params){var name=params[0].toLowerCase();delete rules[name];},API_GET_RULE:function(sender,params){var name=params[0].toLowerCase();if(rules[name]){return rules[name];}else{return null;}},API_ADD_FILTER:function(sender,params){var name=params[0].toLowerCase();var filter=params[1];filters[name]=filter;},API_DEL_FILTER:function(sender,params){var name=params[0].toLowerCase();delete filters[name];},API_GET_FILTER:function(sender,params){var name=params[0].toLowerCase();if(filters[name]){return filters[name];}else{return null;}},API_ADD_EXTRA_FIELD:function(sender,params){var name=params[0].toLowerCase();var prop=params[1];extras[name]=prop;},API_GET_EXTRA_FIELD:function(sender,params){var name=params[0].toLowerCase();return extras[name];},API_DEL_EXTRA_FIELD:function(sender,params){var name=params[0].toLowerCase();delete extras[name];},API_APPLY_RULE:function(sender,params){var name=params[0];var value=params[1];if(typeof(rules[name])=='undefined')return true;if($.isFunction(rules[name]))return rules[name](value);if(rules[name]instanceof RegExp)return rules[name].test(value);if($.isArray(rules[name]))return($.inArray(value,rules[name])>-1);return true;},API_ALERT:function(sender,params){var form=params[0];var field_name=params[1];var msg_code=params[2];var minlen=params[3];var maxlen=params[4];var field_msg=this.cast('GET_MESSAGE',[field_name]);var msg=this.cast('GET_MESSAGE',[msg_code]);if(msg!=msg_code)msg=(msg.indexOf('%s')<0)?(field_msg+msg):(msg.replace('%s',field_msg));if(minlen||maxlen)msg+='('+(minlen||'')+'~'+(maxlen||'')+')';this.cast('SHOW_ALERT',[msg]);$(form.elements[field_name]).focus();},API_SHOW_ALERT:function(sender,params){alert(params[0]);},API_ADD_MESSAGE:function(sender,params){var msg_code=params[0];var msg_str=params[1];messages[msg_code]=msg_str;},API_GET_MESSAGE:function(sender,params){var msg_code=params[0];return messages[msg_code]||msg_code;},API_ADD_CALLBACK:function(sender,params){var name=params[0];var func=params[1];callbacks[name]=func;},API_REMOVE_CALLBACK:function(sender,params){var name=params[0];delete callbacks[name];}});var oValidator=new Validator;xe.registerApp(oValidator);var EditorStub=xe.createPlugin('editor_stub',{API_BEFORE_VALIDATE:function(sender,params){var form=params[0];var seq=form.getAttribute('editor_sequence');if(seq&&typeof seq=='object')seq=seq.value;if(seq){try{editorRelKeys[seq].content.value=editorRelKeys[seq].func(seq)||'';}catch(e){}}}});oValidator.registerPlugin(new EditorStub);function get_value($elem){var vals=[];if($elem.is(':radio')){return $elem.filter(':checked').val();}else if($elem.is(':checkbox')){$elem.filter(':checked').each(function(){vals.push(this.value);});return vals.join('|@|');}else{return $elem.val();}}
|
||||
function get_bytes(str){str+='';if(!str.length)return 0;str=encodeURI(str);var c=str.split('%').length-1;return str.length-c*2;}})(jQuery);function filterAlertMessage(ret_obj){var error=ret_obj["error"];var message=ret_obj["message"];var act=ret_obj["act"];var redirect_url=ret_obj["redirect_url"];var url=location.href;if(typeof(message)!="undefined"&&message&&message!="success")alert(message);if(typeof(act)!="undefined"&&act)url=current_url.setQuery("act",act);else if(typeof(redirect_url)!="undefined"&&redirect_url)url=redirect_url;if(url==location.href)url=url.replace(/#(.*)$/,'');location.href=url;}
|
||||
function procFilter(form,filter_func){filter_func(form);return false;}
|
||||
function legacy_filter(filter_name,form,module,act,callback,responses,confirm_msg,rename_params){var v=xe.getApp('Validator')[0],$=jQuery,args=[];if(!v)return false;if(!form.elements['_filter'])$(form).prepend('<input type="hidden" name="_filter" />');form.elements['_filter'].value=filter_name;args[0]=filter_name;args[1]=function(f){var params={},res=[],elms=f.elements,data=$(f).serializeArray();$.each(data,function(i,field){var v=$.trim(field.value),n=field.name;if(!v||!n)return true;if(rename_params[n])n=rename_params[n];if(/\[\]$/.test(n))n=n.replace(/\[\]$/,'');if(params[n])params[n]+='|@|'+v;else params[n]=field.value;});if(confirm_msg&&!confirm(confirm_msg))return false;exec_xml(module,act,params,callback,responses,params,form);};v.cast('ADD_CALLBACK',args);v.cast('VALIDATE',[form,filter_name]);return false;}
|
||||
(function(a){function b(){return function(){var g=this;a.isArray(this._plugins)&&(this._plugins=[]);this._messages?this._messages={}:this._binded_fn={};a.each(this,function(c,b){if(!a.isFunction(b)||!/^API_([A-Z0-9_]+)$/.test(c))return true;var d=RegExp.$1,e=function(a,b){return g[c](a,b)};g._messages?g._messages[d]=[e]:g._binded_fn[d]=e});a.isFunction(this.init)&&this.init.apply(this,arguments)}}var d,c,e=[];d={_plugins:[],_messages:{},getPlugin:function(g){g=g.toLowerCase();return a.isArray(this._plugins[g])?
|
||||
this._plugins[g]:[]},registerPlugin:function(g){var c=this,b=g.getName().toLowerCase();if(0<=a.inArray(g,this._plugins))return!1;this._plugins.push(g);a.isArray(this._plugins[b])||(this._plugins[b]=[]);this._plugins[b].push(g);a.each(g._binded_fn,function(a,g){c.registerHandler(a,g)});g.oApp=this;a.isFunction(g.activate)&&g.activate();return!0},registerHandler:function(g,c){var b=this._messages,g=g.toUpperCase();a.isArray(b[g])||(b[g]=[]);b[g].push(c)},cast:function(a,c){return this._cast(this,a,
|
||||
c||[])},broadcast:function(a,c,b){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,c,b)},_cast:function(c,b,d){var e,m=this._messages,b=b.toUpperCase();if(!m["BEFORE_"+b]&&!this["API_BEFORE_"+b]||this._cast(c,"BEFORE_"+b,d)){var h=[];if(a.isArray(m[b]))for(e=0;e<m[b].length;e++)h.push(m[b][e](c,d));2>h.length&&(h=h[0]);(m["AFTER_"+b]||this["API_AFTER_"+b])&&this._cast(c,"AFTER_"+b,d);return!/^(?:AFTER|BEFORE)_/.test(b)?h:a.isArray(h)?0>a.inArray(!1,h):"undefined"==typeof h?!0:!!h}}};
|
||||
c={oApp:null,cast:function(a,c){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,c||[])},broadcast:function(a,c){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,c||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(c,e){var i=b();a.extend(i.prototype,d,e);i.prototype.getName=function(){return c};return i},createPlugin:function(g,d){var e=b();a.extend(e.prototype,c,d);e.prototype.getName=function(){return g};return e},getApps:function(){return a.makeArray(e)},
|
||||
getApp:function(a){a=(a||"").toLowerCase();return"undefined"!=typeof e[a]?e[a]:null},registerApp:function(c){var b=c.getName().toLowerCase();e.push(c);a.isArray(e[b])||(e[b]=[]);e[b].push(c);c.parent=this;a.isFunction(c.activate)&&c.activate()},unregisterApp:function(c){var b=c.getName().toLowerCase(),d=a.inArray(c,e);0<=d&&(e=e.splice(d,1));a.isArray(e[b])&&(d=a.inArray(c,e[b]),0<=d&&(e[b]=e[b].splice(d,1)));a.isFunction(c.deactivate)&&c.deactivate()},broadcast:function(a,c){this._broadcast(this,
|
||||
a,c)},_broadcast:function(a,c,b){for(var d=0;d<e.length;d++)e[d]._cast(a,c,b);this._cast(a,c,b)}});window.xe.lang={};a(function(){xe.broadcast("ONREADY")});a(window).load(function(){xe.broadcast("ONLOAD")})})(jQuery);jQuery&&jQuery.noConflict();
|
||||
(function(a){var b=navigator.userAgent.toLowerCase();a.os={Linux:/linux/.test(b),Unix:/x11/.test(b),Mac:/mac/.test(b),Windows:/win/.test(b)};a.os.name=a.os.Windows?"Windows":a.os.Linux?"Linux":a.os.Unix?"Unix":a.os.Mac?"Mac":"";window.XE={loaded_popup_menus:[],addedDocument:[],checkboxToggleAll:function(b){is_def(b)||(b="cart");var c={wrap:null,checked:"toggle",doClick:!1};switch(arguments.length){case 1:"string"==typeof arguments[0]?b=arguments[0]:(a.extend(c,arguments[0]||{}),b="cart");break;case 2:b=
|
||||
arguments[0],a.extend(c,arguments[1]||{})}!0==c.doClick&&(c.checked=null);"string"==typeof c.wrap&&(c.wrap="#"+c.wrap);var e=c.wrap?a(c.wrap).find("input[name="+b+"]:checkbox"):a("input[name="+b+"]:checkbox");"toggle"==c.checked?e.each(function(){a(this).attr("checked",a(this).attr("checked")?false:true)}):!0==c.doClick?e.click():e.attr("checked",c.checked)},displayPopupMenu:function(b,c,e){var c=e.menu_id,g=b.menus,b="";if(this.loaded_popup_menus[c])b=this.loaded_popup_menus[c];else{if(g){g=g.item;
|
||||
if("undefined"==typeof g.length||1>g.length)g=Array(g);if(g.length)for(var j=0;j<g.length;j++){var i=g[j].url,l=g[j].str,m=g[j].target,h="";switch(m){case "popup":h=" onclick=\"popopen(this.href,'"+m+"'); return false;\"";break;case "javascript":h=' onclick="'+i+'; return false; "';i="#";break;default:h=' onclick="window.open(this.href); return false;"'}b+='<li ><a href="'+i+'"'+h+">"+l+"</a></li> "}}this.loaded_popup_menus[c]=b}b&&(c=a("#popup_menu_area").html("<ul>"+b+"</ul>"),b=e.page_y,e=e.page_x,
|
||||
c.outerHeight()+b>a(window).height()+a(window).scrollTop()&&(b=a(window).height()-c.outerHeight()+a(window).scrollTop()),c.outerWidth()+e>a(window).width()+a(window).scrollLeft()&&(e=a(window).width()-c.outerWidth()+a(window).scrollLeft()),c.css({top:b,left:e}).show())}}})(jQuery);
|
||||
jQuery(function(a){a.browser.msie&&a("select").each(function(a,b){for(var g=!1,d=[],i=0;i<b.options.length;i++)b.options[i].disabled?(b.options[i].style.color="#CCCCCC",g=!0):d[a]=-1<d[a]?d[a]:i;if(g&&(b.oldonchange=b.onchange,b.onchange=function(){this.options[this.selectedIndex].disabled?this.selectedIndex=d[a]:this.oldonchange&&this.oldonchange()},0<=b.selectedIndex&&b.options[b.selectedIndex].disabled))b.onchange()});var b=a(".xe_content .fold_button");if(b.size()){var d=a("div.fold_container",
|
||||
b);a("button.more",b).click(function(){a(this).hide().next("button").show().parent().next(d).show()});a("button.less",b).click(function(){a(this).hide().prev("button").show().parent().next(d).hide()})}jQuery('input[type="submit"]').click(function(a){var b=jQuery(a.currentTarget);setTimeout(function(){b.attr("disabled","disabled")},0);setTimeout(function(){b.removeAttr("disabled")},3E3)})});
|
||||
(function(){var a=Array.isArray||function(a){return"[object Array]"==Object.prototype.toString.call(a)};String.prototype.getQuery=function(a){var d=this.replace(/#.*$/,"")===window.location.href.replace(/#.*$/,"")?current_url:this,c=d.indexOf("?");if(-1==c)return null;var e={};d.substr(c+1,this.length).replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,c){e[b]=c});a=e[a];"undefined"==typeof a&&(a="");return a};String.prototype.setQuery=function(b,d){var c=this.replace(/#.*$/,"")===window.location.href.replace(/#.*$/,
|
||||
"")?current_url:this,e=c.indexOf("?"),g=c.replace(/#$/,""),j,i;"undefined"==typeof d&&(d="");if(-1!=e){var l=g.substr(e+1,c.length),m={},h=[],g=c.substr(0,e);l.replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,c){m[b]=c});m[b]=d;for(var n in m)m.hasOwnProperty(n)&&(i=String(m[n]).trim())&&h.push(n+"="+decodeURI(i));l=h.join("&");g+=l?"?"+l:""}else String(d).trim()&&(g=g+"?"+b+"="+d);e=/^https:\/\/([^:\/]+)(:\d+|)/i;e.test(g)&&(c="http://"+RegExp.$1,window.http_port&&80!=http_port&&(c+=":"+http_port),g=
|
||||
g.replace(e,c));c=!!window.enforce_ssl;if(!c&&a(window.ssl_actions)&&(j=g.getQuery("act"))){e=0;for(i=ssl_actions.length;e<i;e++)if(ssl_actions[e]===j){c=!0;break}}e=/http:\/\/([^:\/]+)(:\d+|)/i;c&&e.test(g)&&(c="https://"+RegExp.$1,window.https_port&&443!=https_port&&(c+=":"+https_port),g=g.replace(e,c));g=g.replace(/\/(index\.php)?\?/,"/index.php?");return encodeURI(g)};String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")}})();
|
||||
function xSleep(a){for(var a=a/1E3,b=new Date,d=new Date;d.getTime()-b.getTime()<a;)d=new Date}function isDef(){for(var a=0;a<arguments.length;++a)if("undefined"==typeof arguments[a])return!1;return!0}var winopen_list=[];
|
||||
function winopen(a,b,d){"undefined"!=typeof xeVid&&(-1<a.indexOf(request_uri)&&!a.getQuery("vid"))&&(a=a.setQuery("vid",xeVid));try{"_blank"!=b&&winopen_list[b]&&(winopen_list[b].close(),winopen_list[b]=null)}catch(c){}"undefined"==typeof b&&(b="_blank");"undefined"==typeof d&&(d="");a=window.open(a,b,d);a.focus();"_blank"!=b&&(winopen_list[b]=a)}
|
||||
function popopen(a,b){"undefined"==typeof b&&(b="_blank");"undefined"!=typeof xeVid&&(-1<a.indexOf(request_uri)&&!a.getQuery("vid"))&&(a=a.setQuery("vid",xeVid));winopen(a,b,"width=650,height=500,scrollbars=yes,resizable=yes,toolbars=no")}function sendMailTo(a){location.href="mailto:"+a}function move_url(a,b){if(!a)return!1;"undefined"==typeof b&&(b="N");b="N"==b?!1:!0;/^\./.test(a)&&(a=request_uri+a);b?winopen(a):location.href=a;return!1}
|
||||
function displayMultimedia(a,b,d,c){(a=_displayMultimedia(a,b,d,c))&&document.writeln(a)}
|
||||
function _displayMultimedia(a,b,d,c){0==a.indexOf("files")&&(a=request_uri+a);var c=jQuery.extend({wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:!1},c||{}),e=c.autostart&&"false"!=c.autostart?"true":"false";delete c.autostart;var g="",g="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(a))g='<img src="'+a+'" width="'+b+'" height="'+d+'" />';else if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a))g='<embed src="'+request_uri+'common/img/flvplayer.swf" allowfullscreen="true" autostart="'+
|
||||
e+'" width="'+b+'" height="'+d+'" flashvars="&file='+a+"&width="+b+"&height="+d+"&autostart="+e+'" wmode="'+c.wmode+'" />';else if(/\.swf/i.test(a)){var g="undefined"!=typeof enforce_ssl&&enforce_ssl?"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0":"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0",g='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+g+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+
|
||||
'">',g=g+('<param name="movie" value="'+a+'" />'),j;for(j in c)"undefined"!=c[j]&&""!=c[j]&&(g+='<param name="'+j+'" value="'+c[j]+'" />');g+='<embed src="'+a+'" autostart="'+e+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+'" wmode="'+c.wmode+'"></embed></object>'}else{if(jQuery.browser.mozilla||jQuery.browser.opera)e=c.autostart&&"false"!=c.autostart?"1":"0";g='<embed src="'+a+'" autostart="'+e+'" width="'+b+'" height="'+d+'"';"transparent"==c.wmode&&(g+=' windowlessvideo="1"');g+="></embed>"}return g}
|
||||
function zbxe_folder_open(a){jQuery("#folder_open_"+a).hide();jQuery("#folder_close_"+a).show();jQuery("#folder_"+a).show()}function zbxe_folder_close(a){jQuery("#folder_open_"+a).show();jQuery("#folder_close_"+a).hide();jQuery("#folder_"+a).hide()}
|
||||
function setFixedPopupSize(){var a=jQuery,b=a(window),a=a("body>.popup"),d,c,e,g;g=a.css({overflow:"scroll"}).offset();d=a.width(10).height(1E4).get(0).scrollWidth+2*g.left;c=a.height(10).width(1E4).get(0).scrollHeight+2*g.top;600>d&&(d=600+2*g.left);e=b.width();b=b.height();d!=e&&window.resizeBy(d-e,0);c!=b&&window.resizeBy(0,c-b);a.width(d-2*g.left).css({overflow:"",height:""})}
|
||||
function doCallModuleAction(a,b,d){exec_xml(a,b,{target_srl:d,cur_mid:current_mid,mid:current_mid},completeCallModuleAction)}function completeCallModuleAction(a){"success"!=a.message&&alert(a.message);location.reload()}function completeMessage(a){alert(a.message);location.reload()}function doChangeLangType(a){"string"==typeof a?setLangType(a):setLangType(a.options[a.selectedIndex].value);location.href=location.href.setQuery("l","")}
|
||||
function setLangType(a){var b=new Date;b.setTime(b.getTime()+6048E8);setCookie("lang_type",a,b,"/")}
|
||||
function doDocumentPreview(a){for(;"FORM"!=a.nodeName;)a=a.parentNode;if("FORM"==a.nodeName){a=a.getAttribute("editor_sequence");a=editorGetContent(a);window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");var b=jQuery("#previewDocument");b.length?b=b[0]:(jQuery('<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'"><input type="hidden" name="module" value="document" /><input type="hidden" name="act" value="dispDocumentPreview" /><input type="hidden" name="content" /></form>').appendTo(document.body),b=
|
||||
jQuery("#previewDocument")[0]);b&&(b.content.value=a,b.submit())}}
|
||||
function doDocumentSave(a){var b=a.form.getAttribute("editor_sequence"),d=editorRelKeys[b].content.value;if("undefined"!=typeof b&&b&&"undefined"!=typeof editorRelKeys&&"function"==typeof editorGetContent){var c=editorGetContent(b);editorRelKeys[b].content.value=c}var e={},c=jQuery(a.form).serializeArray();jQuery.each(c,function(a,b){var c=jQuery.trim(b.value);if(!c)return!0;/\[\]$/.test(b.name)&&(b.name=b.name.replace(/\[\]$/,""));e[b.name]=e[b.name]?e[b.name]+("|@|"+c):b.value});exec_xml("document",
|
||||
"procDocumentTempSave",e,completeDocumentSave,["error","message","document_srl"],e,a.form);editorRelKeys[b].content.value=d;return!1}function completeDocumentSave(a){jQuery("input[name=document_srl]").eq(0).val(a.document_srl);alert(a.message)}var objForSavedDoc=null;function doDocumentLoad(a){objForSavedDoc=a.form;popopen(request_uri.setQuery("module","document").setQuery("act","dispTempSavedList"))}
|
||||
function doDocumentSelect(a){opener&&opener.objForSavedDoc&&(opener.location.href=opener.current_url.setQuery("document_srl",a).setQuery("act","dispBoardWrite"));window.close()}function viewSkinInfo(a,b){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+a+"&skin="+b,"SkinInfo")}var addedDocument=[];function doAddDocumentCart(a){addedDocument[addedDocument.length]=a.value;setTimeout(function(){callAddDocumentCart(addedDocument.length)},100)}
|
||||
function callAddDocumentCart(a){1>addedDocument.length||a!=addedDocument.length||(a=[],a.srls=addedDocument.join(","),exec_xml("document","procDocumentAddCart",a,null),addedDocument=[])}
|
||||
function transRGB2Hex(a){if(!a)return a;if(-1<a.indexOf("#"))return a.replace(/^#/,"");if(0>a.toLowerCase().indexOf("rgb"))return a;a=a.replace(/^rgb\(/i,"").replace(/\)$/,"");value_list=a.split(",");for(var a="",b=0;b<value_list.length;b++){var d=parseInt(value_list[b],10).toString(16);1==d.length&&(d="0"+d);a+=d}return a}function toggleSecuritySignIn(){var a=location.href;location.href=/https:\/\//i.test(a)?a.replace(/^https/i,"http"):a.replace(/^http/i,"https")}
|
||||
function reloadDocument(){location.reload()}
|
||||
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){for(var b="",d,c,e,g,j,i,l=0,a=Base64._utf8_encode(a);l<a.length;)d=a.charCodeAt(l++),c=a.charCodeAt(l++),e=a.charCodeAt(l++),g=d>>2,d=(d&3)<<4|c>>4,j=(c&15)<<2|e>>6,i=e&63,isNaN(c)?j=i=64:isNaN(e)&&(i=64),b=b+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(j)+this._keyStr.charAt(i);return b},decode:function(a){for(var b="",d,c,e,g,j,i=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<
|
||||
a.length;)d=this._keyStr.indexOf(a.charAt(i++)),c=this._keyStr.indexOf(a.charAt(i++)),g=this._keyStr.indexOf(a.charAt(i++)),j=this._keyStr.indexOf(a.charAt(i++)),d=d<<2|c>>4,c=(c&15)<<4|g>>2,e=(g&3)<<6|j,b+=String.fromCharCode(d),64!=g&&(b+=String.fromCharCode(c)),64!=j&&(b+=String.fromCharCode(e));return b=Base64._utf8_decode(b)},_utf8_encode:function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",d=0;d<a.length;d++){var c=a.charCodeAt(d);128>c?b+=String.fromCharCode(c):(127<c&&2048>c?b+=String.fromCharCode(c>>
|
||||
6|192):(b+=String.fromCharCode(c>>12|224),b+=String.fromCharCode(c>>6&63|128)),b+=String.fromCharCode(c&63|128))}return b},_utf8_decode:function(a){for(var b="",d=0,c=c1=c2=0;d<a.length;)c=a.charCodeAt(d),128>c?(b+=String.fromCharCode(c),d++):191<c&&224>c?(c2=a.charCodeAt(d+1),b+=String.fromCharCode((c&31)<<6|c2&63),d+=2):(c2=a.charCodeAt(d+1),c3=a.charCodeAt(d+2),b+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63),d+=3);return b}};
|
||||
if("undefined"==typeof resizeImageContents)var resizeImageContents=function(){};if("undefined"==typeof activateOptionDisabled)var activateOptionDisabled=function(){};objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function checkboxSelectAll(a,b,d){var c={};"undefined"!=typeof a&&(c.wrap=a);"undefined"!=typeof d&&(c.checked=d);XE.checkboxToggleAll(b,c)}function clickCheckBoxAll(a,b){var d={doClick:!0};"undefined"!=typeof a&&(d.wrap=a);XE.checkboxToggleAll(b,d)}
|
||||
function svc_folder_open(a){jQuery("#_folder_open_"+a).hide();jQuery("#_folder_close_"+a).show();jQuery("#_folder_"+a).show()}function svc_folder_close(a){jQuery("#_folder_open_"+a).show();jQuery("#_folder_close_"+a).hide();jQuery("#_folder_"+a).hide()}function open_calendar(a,b,d){"undefined"==typeof b&&(b="");var c="./common/tpl/calendar.php?";a&&(c+="fo_id="+a);b&&(c+="&day_str="+b);d&&(c+="&callback_func="+d);popopen(c,"Calendar")}var loaded_popup_menus=XE.loaded_popup_menus;
|
||||
function createPopupMenu(){}function chkPopupMenu(){}function displayPopupMenu(a,b,d){XE.displayPopupMenu(a,b,d)}function GetObjLeft(a){return jQuery(a).offset().left}function GetObjTop(a){return jQuery(a).offset().top}function replaceOuterHTML(a,b){jQuery(a).replaceWith(b)}function getOuterHTML(a){return jQuery(a).html().trim()}function setCookie(a,b,d,c){a=a+"="+escape(b)+(!d?"":"; expires="+d.toGMTString())+"; path="+(!c?"/":c);document.cookie=a}
|
||||
function getCookie(a){if(a=document.cookie.match(RegExp(a+"=(.*?)(?:;|$)")))return unescape(a[1])}function is_def(a){return"undefined"!=typeof a}function ucfirst(a){return a.charAt(0).toUpperCase()+a.slice(1)}function get_by_id(a){return document.getElementById(a)}
|
||||
jQuery(function(a){a(".lang_code").each(function(){var b=a(this),d=b.attr("id");"undefined"==typeof d&&(d=b.attr("name"));"undefined"!=typeof d&&b.after("<a href='"+request_uri.setQuery("module","module").setQuery("act","dispModuleAdminLangcode").setQuery("target",d)+"' class='buttonSet buttonSetting' onclick='popopen(this.href);return false;'><span>find_langcode</span></a>")});a(document).click(function(b){var d=a("#popup_menu_area");d.length||(d=a('<div id="popup_menu_area" style="display:none;z-index:9999" />').appendTo(document.body));
|
||||
d.hide();d=a(b.target).filter("a,div,span");d.length||(d=a(b.target).closest("a,div,span"));if(d.length){var d=d.attr("class"),c;d&&(c=d.match(/(?:^| )((document|comment|member)_([1-9]\d*))(?: |$)/));if(c){d="get"+ucfirst(c[2])+"Menu";c={mid:current_mid,cur_mid:current_mid,menu_id:c[1],target_srl:c[3],cur_act:current_url.getQuery("act"),page_x:b.pageX,page_y:b.pageY};var e=["error","message","menus"];b.preventDefault();b.stopPropagation();is_def(window.xeVid)&&(c.vid=xeVid);if(is_def(XE.loaded_popup_menus[c.menu_id]))return XE.displayPopupMenu(c,
|
||||
e,c);show_waiting_message=!1;exec_xml("member",d,c,XE.displayPopupMenu,e,c);show_waiting_message=!0}}});a("a._xe_popup").click(function(){var b=a(this),d=b.attr("name"),b=b.attr("href");d||(d="_xe_popup_"+Math.floor(1E3*Math.random()));(d=window.open(b,d,"left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no"))&&d.focus();return!1});a.datepicker&&a.datepicker.setDefaults({dateFormat:"yy-mm-dd"})});var show_waiting_message=!0;
|
||||
function xml2json(a,b,d){var c={toObj:function(a){var b={};if(1==a.nodeType){if(d&&a.attributes.length)for(var e=0;e<a.attributes.length;e++)b["@"+a.attributes[e].nodeName]=(a.attributes[e].nodeValue||"").toString();if(a.firstChild){for(var l=e=0,m=!1,h=a.firstChild;h;h=h.nextSibling)1==h.nodeType?m=!0:3==h.nodeType&&h.nodeValue.match(/[^ \f\n\r\t\v]/)?e++:4==h.nodeType&&l++;if(m)if(2>e&&2>l){c.removeWhite(a);for(h=a.firstChild;h;h=h.nextSibling)3==h.nodeType?b=c.escape(h.nodeValue):4==h.nodeType?
|
||||
b=c.escape(h.nodeValue):b[h.nodeName]?b[h.nodeName]instanceof Array?b[h.nodeName][b[h.nodeName].length]=c.toObj(h):b[h.nodeName]=[b[h.nodeName],c.toObj(h)]:b[h.nodeName]=c.toObj(h)}else a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(e)a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(l)if(1<l)b=c.escape(c.innerXml(a));else for(h=a.firstChild;h;h=h.nextSibling)b=c.escape(h.nodeValue)}!a.attributes.length&&!a.firstChild&&
|
||||
(b=null)}else 9==a.nodeType?b=c.toObj(a.documentElement):alert("unhandled node type: "+a.nodeType);return b},toJson:function(a,b,d){var e=b?'"'+b+'"':"";if(a instanceof Array){for(var m=0,h=a.length;m<h;m++)a[m]=c.toJson(a[m],"",d+"\t");e+=(b?":[":"[")+(1<a.length?"\n"+d+"\t"+a.join(",\n"+d+"\t")+"\n"+d:a.join(""))+"]"}else if(null==a)e+=(b&&":")+"null";else if("object"==typeof a){m=[];for(h in a)m[m.length]=c.toJson(a[h],h,d+"\t");e+=(b?":{":"{")+(1<m.length?"\n"+d+"\t"+m.join(",\n"+d+"\t")+"\n"+
|
||||
d:m.join(""))+"}"}else e="string"==typeof a?e+((b&&":")+'"'+a.toString()+'"'):e+((b&&":")+a.toString());return e},innerXml:function(a){var b="";if("innerHTML"in a)b=a.innerHTML;else for(var c=function(a){var b="";if(1==a.nodeType){for(var b=b+("<"+a.nodeName),d=0;d<a.attributes.length;d++)b+=" "+a.attributes[d].nodeName+'="'+(a.attributes[d].nodeValue||"").toString()+'"';if(a.firstChild){b+=">";for(d=a.firstChild;d;d=d.nextSibling)b+=c(d);b+="</"+a.nodeName+">"}else b+="/>"}else 3==a.nodeType?b+=
|
||||
a.nodeValue:4==a.nodeType&&(b+="<![CDATA["+a.nodeValue+"]]\>");return b},a=a.firstChild;a;a=a.nextSibling)b+=c(a);return b},escape:function(a){return a.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(a){a.normalize();for(var b=a.firstChild;b;)if(3==b.nodeType)if(b.nodeValue.match(/[^ \f\n\r\t\v]/))b=b.nextSibling;else{var d=b.nextSibling;a.removeChild(b);b=d}else 1==b.nodeType&&c.removeWhite(b),b=b.nextSibling;return a}};9==a.nodeType&&
|
||||
(a=a.documentElement);var e=c.toObj(c.removeWhite(a));"object"==typeof JSON&&jQuery.isFunction(JSON.stringify);a=c.toJson(e,a.nodeName,"");return"{"+(b?a.replace(/\t/g,b):a.replace(/\t|\n/g,""))+"}"}
|
||||
(function(a){function b(){return""}a.exec_xml=window.exec_xml=function(b,c,e,g,j,i,l){function m(e){var e=a(e).find("response")[0],h,m="",n=[],k={};h="";s.css("display","none").trigger("cancel_confirm");if(!e)return alert(v.responseText),null;h=xml2json(e,!1,!1);h="object"==typeof JSON&&a.isFunction(JSON.parse)?JSON.parse(h):eval("("+h+")");h=h.response;if("undefined"==typeof h){n.error=-1;n.message="Unexpected error occured.";try{if("undefined"!=typeof(m=e.childNodes[0].firstChild.data))n.message+=
|
||||
"\r\n"+m}catch(o){}return n}a.each(j,function(a,b){k[b]=!0});k.redirect_url=!0;k.act=!0;a.each(h,function(a,b){k[a]&&(n[a]=b)});if(0!=n.error){if(a.isFunction(a.exec_xml.onerror))return a.exec_xml.onerror(b,c,n,g,j,i,l);alert((n.message||"An unknown error occured while loading ["+b+"."+c+"]").replace(/\\n/g,"\n"));return null}if(n.redirect_url)return location.href=n.redirect_url.replace(/&/g,"&"),null;a.isFunction(g)&&g(n,j,i,l)}var h=request_uri+"index.php";e||(e={});if(a.isArray(e)){var n={},
|
||||
k;for(k in e)e.hasOwnProperty(k)&&(n[k]=e[k]);e=n}e.module=b;e.act=c;"undefined"!=typeof xeVid&&(e.vid=xeVid);"undefined"==typeof j||1>j.length?j=["error","message"]:j.push("error","message");a.isArray(ssl_actions)&&(e.act&&0<=a.inArray(e.act,ssl_actions))&&(k=default_url||request_uri,h=window.https_port||443,k=a("<a>").attr("href",k)[0],n="https://"+k.hostname.replace(/:\d+$/,""),443!=h&&(n+=":"+h),"/"!=k.pathname[0]&&(n+="/"),n+=k.pathname,h=n.replace(/\/$/,"")+"/index.php");k=a("<a>").attr("href",
|
||||
location.href)[0];n=a("<a>").attr("href",h)[0];if(k.protocol!=n.protocol||k.port!=n.port){a("#xeTmpIframe").length||a('<iframe name="%id%" id="%id%" style="position:absolute;left:-1px;top:1px;width:1px;height:1px"></iframe>'.replace(/%id%/g,"xeTmpIframe")).appendTo(document.body);a("#xeVirtualForm").remove();var z=a('<form id="%id%"></form>'.replace(/%id%/g,"xeVirtualForm")).attr({id:"xeVirtualForm",method:"post",action:h,target:"xeTmpIframe"});e.xeVirtualRequestMethod="xml";e.xeRequestURI=location.href.replace(/#(.*)$/i,
|
||||
"");e.xeVirtualRequestUrl=request_uri;a.each(e,function(b,c){a('<input type="hidden">').attr("name",b).attr("value",c).appendTo(z)});z.appendTo(document.body).submit()}else{var w=[],o=0;w[o++]='<?xml version="1.0" encoding="utf-8" ?>';w[o++]="<methodCall>";w[o++]="<params>";a.each(e,function(a,b){w[o++]="<"+a+"><![CDATA["+b+"]]\></"+a+">"});w[o++]="</params>";w[o++]="</methodCall>";var v=null;v&&0!=v.readyState&&v.abort();try{a.ajax({url:h,type:"POST",dataType:"xml",data:w.join("\n"),contentType:"text/plain",
|
||||
beforeSend:function(a){v=a},success:m,error:function(a,b){s.css("display","none");var c="";if(b=="parsererror"){if(a.responseText=="")return;c="The result is not valid XML :\n-------------------------------------\n"+a.responseText.replace(/<[^>]+>/g,"")}else c=b;try{console.log(c)}catch(d){}}})}catch(t){alert(t);return}var s=a(".wfsr");show_waiting_message&&s.length&&s.html(waiting_message).show()}};a.exec_json=function(b,c,e){"undefined"==typeof c&&(c={});b=b.split(".");2==b.length&&(show_waiting_message&&
|
||||
a(".wfsr").html(waiting_message).show(),a.extend(c,{module:b[0],act:b[1]}),"undefined"!=typeof xeVid&&a.extend(c,{vid:xeVid}),a.ajax({type:"POST",dataType:"json",url:request_uri,contentType:"application/json",data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");0<b.error&&alert(b.message);a.isFunction(e)&&e(b)}}))};a.fn.exec_html=function(b,c,e,g,j){"undefined"==typeof c&&(c={});a.inArray(e,["html","append","prepend"])||(e="html");var i=a(this),b=b.split(".");2==b.length&&
|
||||
(show_waiting_message&&a(".wfsr").html(waiting_message).show(),a.extend(c,{module:b[0],act:b[1]}),a.ajax({type:"POST",dataType:"html",url:request_uri,data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");i[e](b);a.isFunction(g)&&g(j)}}))};a(function(a){a(".wfsr").ajaxStart(function(){a(window).bind("beforeunload",b)}).bind("ajaxStop cancel_confirm",function(){a(window).unbind("beforeunload",b)})})})(jQuery);
|
||||
(function(a){function b(a){var b=[];return a.is(":radio")?a.filter(":checked").val():a.is(":checkbox")?(a.filter(":checked").each(function(){b.push(this.value)}),b.join("|@|")):a.val()}var d=[],c=[],e={},g=[],j={},i=new (xe.createApp("Validator",{init:function(){var a=/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/;this.cast("ADD_RULE",["email",a]);this.cast("ADD_RULE",["email_address",a]);a=/^[a-z]+[\w-]*[a-z0-9_]+$/i;this.cast("ADD_RULE",["userid",a]);this.cast("ADD_RULE",["user_id",a]);a=/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/;
|
||||
this.cast("ADD_RULE",["url",a]);this.cast("ADD_RULE",["homepage",a]);this.cast("ADD_RULE",["korean",RegExp("^[\uac00-\ud7a3]*$")]);this.cast("ADD_RULE",["korean_number",RegExp("^[\uac00-\ud7a30-9]*$")]);this.cast("ADD_RULE",["alpha",/^[a-z]*$/i]);this.cast("ADD_RULE",["alpha_number",/^[a-z][a-z0-9_]*$/i]);this.cast("ADD_RULE",["number",/^[0-9]*$/])},run:function(a){var b="";a._filter&&(b=a._filter.value);a=this.cast("VALIDATE",[a,b]);"undefined"==typeof a&&(a=!1);return a},API_ONREADY:function(){var b=
|
||||
this;a("form").each(function(){this.onsubmit&&(this["xe:onsubmit"]=this.onsubmit,this.onsubmit=null)}).submit(function(c){var d=this["xe:onsubmit"];(d=a.isFunction(d)?d.apply(this):b.run(this))||c.stopImmediatePropagation();return d})},API_VALIDATE:function(c,d){function n(a){return a.replace(/([\.\+\-\[\]\{\}\(\)\\])/g,"\\$1")}var k=!0,i=d[0],l=i.elements,o,v,t,s,q,p,u,r,x,y;l.ruleset?o=i.elements.ruleset.value:l._filter&&(o=i.elements._filter.value);if(!o)return!0;a.isFunction(g[o])&&(t=g[o]);o=
|
||||
a.extend({},e[o.toLowerCase()]||{},j);s=[];p=0;for(r=i.elements.length;p<r;p++)k=l[p],(q=k.name)&&l[q]&&(!l[q].length||l[q][0]===k)&&s.push(q);s=s.join("\n");v={};for(q in o)if(o.hasOwnProperty(q)&&(k=[],"^"==q.substr(0,1))){(k=s.match(RegExp("^"+n(q.substr(1))+".*$","gm")))||(k=[]);p=0;for(r=k.length;p<r;p++)v[k[p]]=o[q];o[q]=null;delete o[q]}o=a.extend(o,v);for(q in o)if(o.hasOwnProperty(q)&&(f=o[q],(k=l[q])||(k=l[q+"[]"]),s=k?a.trim(b(a(k))):"",v=(f.modifier||"")+",",k&&!k.disabled)){if(f["if"]){a.isArray(f["if"])||
|
||||
(f["if"]=[f["if"]]);for(p=0;p<f["if"].length;p++)r=f["if"][p],k=new Function("el","return !!("+r.test.replace(/\$(\w+)/g,"(jQuery('[name=$1]').is(':radio, :checkbox') ? jQuery('[name=$1]:checked').val() : jQuery('[name=$1]').val())")+")"),k(l)?f[r.attr]=r.value:delete f[r.attr]}if(s){k=parseInt(f.minlength)||0;r=parseInt(f.maxlength)||0;y=/b$/.test(f.minlength||"");x=/b$/.test(f.maxlength||"");p=s.length;if(y||x)if(u=s,u+="",u.length){u=encodeURI(u);var A=u.split("%").length-1;u=u.length-2*A}else u=
|
||||
0;if(k&&k>(y?u:p)||r&&r<(x?u:p))return this.cast("ALERT",[i,q,"outofrange",k,r])&&!1;if(f.equalto&&(r=(p=l[f.equalto])?a.trim(b(a(p))):"",p&&r!==s))return this.cast("ALERT",[i,q,"equalto"])&&!1;x=(f.rule||"").split(",");p=0;for(r=x.length;p<r;p++)if(y=x[p])if(k=this.cast("APPLY_RULE",[y,s]),-1<v.indexOf("not,")&&(k=!k),!k)return this.cast("ALERT",[i,q,"invalid_"+y])&&!1}else if(f["default"]&&(s=f["default"]),f.required)return this.cast("ALERT",[i,q,"isnull"])&&!1}return a.isFunction(t)?t(i):!0},API_ADD_RULE:function(a,
|
||||
b){var d=b[0].toLowerCase();c[d]=b[1]},API_DEL_RULE:function(a,b){var d=b[0].toLowerCase();delete c[d]},API_GET_RULE:function(a,b){var d=b[0].toLowerCase();return c[d]?c[d]:null},API_ADD_FILTER:function(a,b){var c=b[0].toLowerCase();e[c]=b[1]},API_DEL_FILTER:function(a,b){var c=b[0].toLowerCase();delete e[c]},API_GET_FILTER:function(a,b){var c=b[0].toLowerCase();return e[c]?e[c]:null},API_ADD_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();j[c]=b[1]},API_GET_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();
|
||||
return j[c]},API_DEL_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();delete j[c]},API_APPLY_RULE:function(b,d){var e=d[0],g=d[1];return"undefined"==typeof c[e]?!0:a.isFunction(c[e])?c[e](g):c[e]instanceof RegExp?c[e].test(g):a.isArray(c[e])?-1<a.inArray(g,c[e]):!0},API_ALERT:function(b,c){var d=c[0],e=c[1],g=c[2],i=c[3],j=c[4],l=this.cast("GET_MESSAGE",[e]),t=this.cast("GET_MESSAGE",[g]);t!=g&&(t=0>t.indexOf("%s")?l+t:t.replace("%s",l));if(i||j)t+="("+(i||"")+"~"+(j||"")+")";this.cast("SHOW_ALERT",
|
||||
[t]);a(d.elements[e]).focus()},API_SHOW_ALERT:function(a,b){alert(b[0])},API_ADD_MESSAGE:function(a,b){d[b[0]]=b[1]},API_GET_MESSAGE:function(a,b){var c=b[0];return d[c]||c},API_ADD_CALLBACK:function(a,b){g[b[0]]=b[1]},API_REMOVE_CALLBACK:function(a,b){delete g[b[0]]}}));xe.registerApp(i);var l=xe.createPlugin("editor_stub",{API_BEFORE_VALIDATE:function(a,b){var c=b[0].getAttribute("editor_sequence");c&&"object"==typeof c&&(c=c.value);if(c)try{editorRelKeys[c].content.value=editorRelKeys[c].func(c)||
|
||||
""}catch(d){}}});i.registerPlugin(new l)})(jQuery);function filterAlertMessage(a){var b=a.message,d=a.act,a=a.redirect_url,c=location.href;"undefined"!=typeof b&&(b&&"success"!=b)&&alert(b);"undefined"!=typeof d&&d?c=current_url.setQuery("act",d):"undefined"!=typeof a&&a&&(c=a);c==location.href&&(c=c.replace(/#(.*)$/,""));location.href=c}function procFilter(a,b){b(a);return!1}
|
||||
function legacy_filter(a,b,d,c,e,g,j,i){var l=xe.getApp("Validator")[0],m=jQuery,h=[];if(!l)return!1;b.elements._filter||m(b).prepend('<input type="hidden" name="_filter" />');b.elements._filter.value=a;h[0]=a;h[1]=function(a){var h={},a=m(a).serializeArray();m.each(a,function(a,b){var c=m.trim(b.value),d=b.name;if(!c||!d)return!0;i[d]&&(d=i[d]);/\[\]$/.test(d)&&(d=d.replace(/\[\]$/,""));h[d]=h[d]?h[d]+("|@|"+c):b.value});if(j&&!confirm(j))return!1;exec_xml(d,c,h,e,g,h,b)};l.cast("ADD_CALLBACK",h);
|
||||
l.cast("VALIDATE",[b,a]);return!1};
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var Validator = xe.createApp('Validator', {
|
|||
init : function() {
|
||||
// {{{ add filters
|
||||
// email
|
||||
var regEmail = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
|
||||
var regEmail = /^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
|
||||
this.cast('ADD_RULE', ['email', regEmail]);
|
||||
this.cast('ADD_RULE', ['email_address', regEmail]);
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,9 @@
|
|||
{@
|
||||
$db_info = Context::getDBInfo();
|
||||
$lang_type = Context::getLangType();
|
||||
$ssl_actions = Context::getSSLActions();
|
||||
$css_files=Context::getCssFile();
|
||||
$js_files=Context::getJsFile();
|
||||
}
|
||||
<!--@if($db_info->use_html5=='Y')-->
|
||||
<!DOCTYPE html>
|
||||
|
|
@ -9,8 +12,6 @@
|
|||
<!--@end-->
|
||||
<html lang="{$lang_type}" xmlns="http://www.w3.org/1999/xhtml"|cond="$db_info->use_html5!='Y'">
|
||||
<head>
|
||||
{@$css_files=Context::getCssFile()}
|
||||
{@$js_files=Context::getJsFile()}
|
||||
<!-- META -->
|
||||
<meta charset="UTF-8" cond="$db_info->use_html5=='Y'"/><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" cond="$db_info->use_html5!='Y'" />
|
||||
|
||||
|
|
@ -48,10 +49,10 @@
|
|||
var current_url = "{$current_url}";
|
||||
var request_uri = "{$request_uri}";
|
||||
<block cond="$vid">var xeVid = "{$vid}";</block>
|
||||
var current_mid = "{$mid}";
|
||||
var waiting_message = "{$lang->msg_call_server}";
|
||||
var ssl_actions = new Array(<block cond="count($ssl_actions)">"{implode('","',$ssl_actions)}"</block>);
|
||||
var default_url = "{Context::getDefaultUrl()}";
|
||||
var current_mid = "{$mid}";
|
||||
var waiting_message = "{$lang->msg_call_server}";
|
||||
var ssl_actions = new Array(<block cond="count($ssl_actions)">"{implode('","',array_keys($ssl_actions))}"</block>);
|
||||
var default_url = "{Context::getDefaultUrl()}";
|
||||
<block cond="Context::get('_http_port')">var http_port = {Context::get("_http_port")};</block>
|
||||
<block cond="Context::get('_https_port')">var https_port = {Context::get("_https_port")};</block>
|
||||
<block cond="Context::get('_use_ssl') && Context::get('_use_ssl') == 'always'">var enforce_ssl = true;</block>
|
||||
|
|
@ -65,7 +66,6 @@
|
|||
{Context::getHtmlFooter()}
|
||||
<!-- ETC -->
|
||||
<div class="wfsr"></div>
|
||||
{@$ssl_actions=Context::getSSLActions()}
|
||||
{@ $js_body_files = Context::getJsFile('body') }
|
||||
<block loop="$js_body_files => $key, $js_file">
|
||||
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]></block><script type="text/javascript"|cond="$db_info->use_html5!='Y'" src="{$js_file['file']}"></script><block cond="$js_file['targetie']"><![endif]--></block>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<!--@if($vid)-->var xeVid = "{$vid}";<!--@end-->
|
||||
var current_mid = "{$mid}";
|
||||
var waiting_message = "{$lang->msg_call_server}";
|
||||
var ssl_actions = new Array(<!--@if(count($ssl_actions))-->"{implode('","',$ssl_actions)}"<!--@end-->);
|
||||
var ssl_actions = new Array(<!--@if(count($ssl_actions))-->"{implode('","',array_keys($ssl_actions))}"<!--@end-->);
|
||||
var default_url = "{Context::getDefaultUrl()}";
|
||||
<!--@if(Context::get("_http_port"))-->var http_port = {Context::get("_http_port")};<!--@end-->
|
||||
<!--@if(Context::get("_https_port"))-->var https_port = {Context::get("_https_port")};<!--@end-->
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
* Display XE's full version
|
||||
* Even The file should be revised when releasing altough no change is made
|
||||
*/
|
||||
define('__XE_VERSION__', '1.5.3');
|
||||
define('__XE_VERSION__', '1.5.3.2');
|
||||
|
||||
/**
|
||||
* @deprecated __ZBXE_VERSION__ will be removed. Use __XE_VERSION__ instead.
|
||||
|
|
|
|||
|
|
@ -775,8 +775,12 @@
|
|||
* @return string
|
||||
**/
|
||||
function removeHackTag($content) {
|
||||
require_once(_XE_PATH_.'classes/security/EmbedFilter.class.php');
|
||||
$oEmbedFilter = EmbedFilter::getInstance();
|
||||
$oEmbedFilter->check($content);
|
||||
|
||||
// change the specific tags to the common texts
|
||||
$content = preg_replace('@<(\/?(?:html|body|head|title|meta|base|link|script|style|applet|iframe)(/*)[\w\s>])@i', '<$1', $content);
|
||||
$content = preg_replace('@<(\/?(?:html|body|head|title|meta|base|link|script|style|applet)(/*)[\w\s>])@i', '<$1', $content);
|
||||
|
||||
/**
|
||||
* Remove codes to abuse the admin session in src by tags of imaages and video postings
|
||||
|
|
@ -851,6 +855,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($tag == 'img')
|
||||
{
|
||||
$attribute = strtolower(trim($name));
|
||||
if(strpos(strtolower($val), 'data:') === 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$val = str_replace('"', '"', $val);
|
||||
$attr[] = $name."=\"{$val}\"";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@
|
|||
$this->ftp_debug("Error : fsockopen() ".$errstr." (".$errno.")\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(substr($this->ftp_resp, 0, 3) !== '220')
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$this->ftp_debug("Connected to remote host \"".$server.":".$port."\"\n");
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -477,10 +483,43 @@
|
|||
function ftp_ok()
|
||||
{
|
||||
$this->ftp_resp = "";
|
||||
do {
|
||||
$res = fgets($this->ftp_sock, 512);
|
||||
$this->ftp_resp .= $res;
|
||||
} while (substr($res, 3, 1) != " ");
|
||||
|
||||
// 한줄을 읽는다.
|
||||
$line = '';
|
||||
while(($char = fgetc($this->ftp_sock)) !== FALSE)
|
||||
{
|
||||
$line .= $char;
|
||||
if($char === "\n") break;
|
||||
}
|
||||
|
||||
// 세자리 응답 코드가 나와야 한다.
|
||||
if(!preg_match('@^[0-9]{3}@', $line))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$this->ftp_resp = $line;
|
||||
|
||||
// 4번째 문자가 -이면 여러줄인 응답이다.
|
||||
if($line[3] === '-')
|
||||
{
|
||||
$code = substr($line, 0, 3);
|
||||
|
||||
// 한줄 단위로 읽어 나간다.
|
||||
do
|
||||
{
|
||||
$line = '';
|
||||
while(($char = fgetc($this->ftp_sock)) !== FALSE)
|
||||
{
|
||||
$line .= $char;
|
||||
if($char === "\n") break;
|
||||
}
|
||||
$this->ftp_resp .= $line;
|
||||
|
||||
// 응답 코드와 같은 코드가 나오고 공백이 있으면 끝
|
||||
if($code . ' ' === substr($line, 0, 4)) break;
|
||||
}while($line);
|
||||
}
|
||||
|
||||
$this->ftp_debug(str_replace("\r\n", "\n", $this->ftp_resp));
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,10 @@ class tar {
|
|||
// PRIVATE ACCESS FUNCTION
|
||||
function __parseNullPaddedString($string) {
|
||||
$position = strpos($string,chr(0));
|
||||
if(!$position)
|
||||
{
|
||||
$position = strlen($string);
|
||||
}
|
||||
return substr($string,0,$position);
|
||||
}
|
||||
|
||||
|
|
@ -109,6 +113,7 @@ class tar {
|
|||
// Read Files from archive
|
||||
$tar_length = strlen($this->tar_file);
|
||||
$main_offset = 0;
|
||||
$flag_longlink = false;
|
||||
while($main_offset < $tar_length) {
|
||||
// If we read a block of 512 nulls, we are at the end of the archive
|
||||
if(substr($this->tar_file,$main_offset,512) == str_repeat(chr(0),512))
|
||||
|
|
@ -141,6 +146,8 @@ class tar {
|
|||
// Parse Group name
|
||||
$file_gname = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset + 297,32));
|
||||
|
||||
$file_type = substr($this->tar_file,$main_offset + 156,1);
|
||||
|
||||
// Make sure our file is valid
|
||||
if($this->__computeUnsignedChecksum(substr($this->tar_file,$main_offset,512)) != $file_chksum)
|
||||
return false;
|
||||
|
|
@ -159,42 +166,67 @@ class tar {
|
|||
$activeFile["endheader"] = substr($this->tar_file,$main_offset + 500,12);
|
||||
*/
|
||||
|
||||
if($file_size > 0) {
|
||||
// Increment number of files
|
||||
$this->numFiles++;
|
||||
if(strtolower($file_type) == 'l' || $file_name == '././@LongLink')
|
||||
{
|
||||
$flag_longlink = true;
|
||||
$longlink_name = $this->__parseNullPaddedString($file_contents);
|
||||
}
|
||||
elseif($file_type == '0') {
|
||||
// Increment number of files
|
||||
$this->numFiles++;
|
||||
|
||||
// Create us a new file in our array
|
||||
$activeFile = &$this->files[];
|
||||
// Create us a new file in our array
|
||||
$activeFile = &$this->files[];
|
||||
|
||||
// Asign Values
|
||||
$activeFile["name"] = $file_name;
|
||||
$activeFile["mode"] = $file_mode;
|
||||
$activeFile["size"] = $file_size;
|
||||
$activeFile["time"] = $file_time;
|
||||
$activeFile["user_id"] = $file_uid;
|
||||
$activeFile["group_id"] = $file_gid;
|
||||
$activeFile["user_name"] = $file_uname;
|
||||
$activeFile["group_name"] = $file_gname;
|
||||
$activeFile["checksum"] = $file_chksum;
|
||||
$activeFile["file"] = $file_contents;
|
||||
// Asign Values
|
||||
if($flag_longlink)
|
||||
{
|
||||
$activeFile["name"] = $longlink_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$activeFile["name"] = $file_name;
|
||||
}
|
||||
$activeFile["type"] = $file_type;
|
||||
$activeFile["mode"] = $file_mode;
|
||||
$activeFile["size"] = $file_size;
|
||||
$activeFile["time"] = $file_time;
|
||||
$activeFile["user_id"] = $file_uid;
|
||||
$activeFile["group_id"] = $file_gid;
|
||||
$activeFile["user_name"] = $file_uname;
|
||||
$activeFile["group_name"] = $file_gname;
|
||||
$activeFile["checksum"] = $file_chksum;
|
||||
$activeFile["file"] = $file_contents;
|
||||
|
||||
} else {
|
||||
// Increment number of directories
|
||||
$this->numDirectories++;
|
||||
$flag_longlink = false;
|
||||
|
||||
// Create a new directory in our array
|
||||
$activeDir = &$this->directories[];
|
||||
} elseif($file_type == '5') {
|
||||
// Increment number of directories
|
||||
$this->numDirectories++;
|
||||
|
||||
// Assign values
|
||||
$activeDir["name"] = $file_name;
|
||||
$activeDir["mode"] = $file_mode;
|
||||
$activeDir["time"] = $file_time;
|
||||
$activeDir["user_id"] = $file_uid;
|
||||
$activeDir["group_id"] = $file_gid;
|
||||
$activeDir["user_name"] = $file_uname;
|
||||
$activeDir["group_name"] = $file_gname;
|
||||
$activeDir["checksum"] = $file_chksum;
|
||||
}
|
||||
// Create a new directory in our array
|
||||
$activeDir = &$this->directories[];
|
||||
|
||||
// Assign values
|
||||
if($flag_longlink)
|
||||
{
|
||||
$activeDir["name"] = $longlink_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$activeDir["name"] = $file_name;
|
||||
}
|
||||
$activeDir["type"] = $file_type;
|
||||
$activeDir["mode"] = $file_mode;
|
||||
$activeDir["time"] = $file_time;
|
||||
$activeDir["user_id"] = $file_uid;
|
||||
$activeDir["group_id"] = $file_gid;
|
||||
$activeDir["user_name"] = $file_uname;
|
||||
$activeDir["group_name"] = $file_gname;
|
||||
$activeDir["checksum"] = $file_chksum;
|
||||
|
||||
$flag_longlink = false;
|
||||
}
|
||||
|
||||
// Move our offset the number of blocks we have processed
|
||||
$main_offset += 512 + (ceil($file_size / 512) * 512);
|
||||
|
|
|
|||
|
|
@ -142,6 +142,11 @@
|
|||
$addon_info->mid_list = array();
|
||||
}
|
||||
|
||||
if($extra_vals->xe_run_method)
|
||||
{
|
||||
$addon_info->xe_run_method = $extra_vals->xe_run_method;
|
||||
}
|
||||
|
||||
|
||||
// Add information
|
||||
if($xml_obj->version && $xml_obj->attrs->version == '0.2') {
|
||||
|
|
@ -187,7 +192,10 @@
|
|||
$obj->title = $val->title->body;
|
||||
$obj->type = $val->attrs->type;
|
||||
$obj->description = $val->description->body;
|
||||
$obj->value = $extra_vals->{$obj->name};
|
||||
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); }
|
||||
|
||||
|
|
@ -280,7 +288,10 @@
|
|||
$obj->title = $val->title->body;
|
||||
$obj->type = $val->type->body ? $val->type->body : 'text';
|
||||
$obj->description = $val->description->body;
|
||||
$obj->value = $extra_vals->{$obj->name};
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -163,14 +163,33 @@
|
|||
$extra_vars = unserialize($val->extra_vars);
|
||||
$mid_list = $extra_vars->mid_list;
|
||||
if(!is_array($mid_list)||!count($mid_list)) $mid_list = null;
|
||||
$mid_list = base64_encode(serialize($mid_list));
|
||||
|
||||
$buff .= '$rm = \'' . $extra_vars->xe_run_method . "';";
|
||||
$buff .= '$ml = array(';
|
||||
if($mid_list)
|
||||
{
|
||||
foreach($mid_list as $mid)
|
||||
{
|
||||
$buff .= "'$mid' => 1,";
|
||||
}
|
||||
}
|
||||
$buff .= ');';
|
||||
$buff .= sprintf('$addon_file = \'./addons/%s/%s.addon.php\';', $addon, $addon);
|
||||
|
||||
if($val->extra_vars) {
|
||||
unset($extra_vars);
|
||||
$extra_vars = base64_encode($val->extra_vars);
|
||||
}
|
||||
$addon_include = sprintf('unset($addon_info); $addon_info = unserialize(base64_decode(\'%s\')); @include($addon_file);', $extra_vars);
|
||||
|
||||
$buff .= sprintf(' $_ml = unserialize(base64_decode("%s")); $addon_path = "%saddons/%s/"; $addon_file = "%s.addon.php"; if(file_exists($addon_path.$addon_file) && (!is_array($_ml) || in_array($_m, $_ml))) { unset($addon_info); $addon_info = unserialize(base64_decode("%s")); @include($addon_path.$addon_file); }', $mid_list, './', $addon, $addon, $extra_vars);
|
||||
$buff .= 'if(file_exists($addon_file)){';
|
||||
$buff .= 'if($rm === \'no_run_selected\'){';
|
||||
$buff .= 'if(!isset($ml[$_m])){';
|
||||
$buff .= $addon_include;
|
||||
$buff .= '}}else{';
|
||||
$buff .= 'if(isset($ml[$_m]) || count($ml) === 0){';
|
||||
$buff .= $addon_include;
|
||||
$buff .= '}}}';
|
||||
}
|
||||
|
||||
$buff = sprintf('<?php if(!defined("__XE__")) exit(); $_m = Context::get(\'mid\'); %s ?>', $buff);
|
||||
|
|
|
|||
|
|
@ -115,4 +115,13 @@
|
|||
<value xml:lang="zh-CN"><![CDATA[此插件不存在设置。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[此附加元件的設定不存在。]]></value>
|
||||
</item>
|
||||
<item name="run_method">
|
||||
<value xml:lang="ko"><![CDATA[작동 방식]]></value>
|
||||
</item>
|
||||
<item name="run_selected_module">
|
||||
<value xml:lang="ko"><![CDATA[선택한 모듈에서 사용]]></value>
|
||||
</item>
|
||||
<item name="no_run_selected_module">
|
||||
<value xml:lang="ko"><![CDATA[선택한 모듈에서 사용안함]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
|
|
@ -49,6 +49,13 @@
|
|||
<block cond="$mid_list">
|
||||
<h3 class="h3">{$lang->module}</h3>
|
||||
<p>{$lang->about_addon_mid}</p>
|
||||
<p class="q">{$lang->run_method}</p>
|
||||
<p class="a">
|
||||
<select name="xe_run_method">
|
||||
<option value="run_selected" selected="selected"|cond="$addon_info->xe_run_method === 'run_selected'">{$lang->run_selected_module}</option>
|
||||
<option value="no_run_selected" selected="selected"|cond="$addon_info->xe_run_method === 'no_run_selected'">{$lang->no_run_selected_module}</option>
|
||||
</select>
|
||||
</p>
|
||||
<p><input type="checkbox" id="check_all" /> <label for="check_all">Check all</label></p>
|
||||
<fieldset loop="$mid_list => $module_category_srl, $modules" style="border: 1px solid #ccc; margin:1em 0; padding:.5em 1em">
|
||||
<legend cond="$modules->title">{$modules->title}</legend>
|
||||
|
|
|
|||
|
|
@ -123,10 +123,16 @@
|
|||
|
||||
$args->site_srl = $site_info->site_srl;
|
||||
$args->layout_srl = $vars->layout;
|
||||
|
||||
// layout submit
|
||||
$output = executeQuery('layout.updateAllLayoutInSiteWithTheme', $args);
|
||||
if (!$output->toBool()) return $output;
|
||||
|
||||
// set layout info member
|
||||
$oModuleController = &getController('module');
|
||||
$memberConfig->layout_srl = $vars->layout;
|
||||
$oModuleController->updateModuleConfig('member', $memberConfig);
|
||||
|
||||
$skin_args->site_srl = $site_info->site_srl;
|
||||
|
||||
foreach($vars as $key=>$val){
|
||||
|
|
@ -148,13 +154,13 @@
|
|||
$skin_args->module_srls = implode(',', $article_module_srls);
|
||||
}
|
||||
}
|
||||
|
||||
$skin_output = executeQuery('module.updateAllModuleSkinInSiteWithTheme', $skin_args);
|
||||
if (!$skin_output->toBool()) return $skin_output;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_config = $oModuleModel->getModuleConfig($module, $site_info->site_srl);
|
||||
$module_config->skin = $val;
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModuleConfig($module, $module_config, $site_info->site_srl);
|
||||
}
|
||||
}
|
||||
|
|
@ -169,6 +175,7 @@
|
|||
// Save File
|
||||
FileHandler::writeFile($theme_file, $theme_buff);
|
||||
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdminTheme');
|
||||
return $this->setRedirectUrl($returnUrl, $output);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,10 +215,9 @@
|
|||
|
||||
$oXmlParser = new XmlParser();
|
||||
$_xml_obj = $oXmlParser->loadXmlFile($info_file);
|
||||
if(!$_xml_obj->theme) return;
|
||||
|
||||
if(!$_xml_obj->theme) return;
|
||||
$xml_obj = $_xml_obj->theme;
|
||||
if(!$_xml_obj->theme) return;
|
||||
|
||||
// 스킨이름
|
||||
$theme_info->name = $theme_name;
|
||||
|
|
@ -247,7 +246,7 @@
|
|||
$layout_parse = explode('/',$layout_path);
|
||||
switch($layout_parse[1]){
|
||||
case 'themes' : {
|
||||
$layout_info->name = $theme_name.'.'.$layout_parse[count($layout_parse)-1];
|
||||
$layout_info->name = $theme_name.'|@|'.$layout_parse[count($layout_parse)-1];
|
||||
break;
|
||||
}
|
||||
case 'layouts' : {
|
||||
|
|
@ -255,6 +254,7 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
$layout_info->title = $layout_parse[count($layout_parse)-1];
|
||||
$layout_info->path = $layout_path;
|
||||
|
||||
$site_info = Context::get('site_module_info');
|
||||
|
|
@ -278,7 +278,7 @@
|
|||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
$args->layout_srl = getNextSequence();
|
||||
$args->layout = $layout_info->name;
|
||||
$args->title = $layout_info->name;
|
||||
$args->title = $layout_info->title;
|
||||
$args->layout_type = "P";
|
||||
// Insert into the DB
|
||||
$oLayoutAdminController = &getAdminController('layout');
|
||||
|
|
@ -302,7 +302,7 @@
|
|||
case 'themes' : {
|
||||
$is_theme = true;
|
||||
$module_name = $skin_parse[count($skin_parse)-1];
|
||||
$skin_info->name = $theme_name.'.'.$module_name;
|
||||
$skin_info->name = $theme_name.'|@|'.$module_name;
|
||||
break;
|
||||
}
|
||||
case 'modules' : {
|
||||
|
|
@ -469,6 +469,31 @@
|
|||
$output = executeQueryArray('admin.getSiteAllList', $args, $columnList);
|
||||
if($output->toBool()) $siteList = $output->data;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
foreach($siteList as $key => $value)
|
||||
{
|
||||
$args->site_srl = $value->site_srl;
|
||||
$list = $oModuleModel->getModuleSrlList($args);
|
||||
|
||||
if(!is_array($list))
|
||||
{
|
||||
$list = array($list);
|
||||
}
|
||||
|
||||
foreach($list as $k => $v)
|
||||
{
|
||||
if(!is_dir('./modules/' . $v->module))
|
||||
{
|
||||
unset($list[$k]);
|
||||
}
|
||||
}
|
||||
|
||||
if(!count($list))
|
||||
{
|
||||
unset($siteList[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->add('site_list', $siteList);
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -3,7 +3,7 @@
|
|||
<p class="power">
|
||||
Powered by <strong><a href="{_XE_LOCATION_SITE_}" target="_blank">XE</a></strong>. <span class="vr">|</span>
|
||||
<strong>Your version</strong>: {__XE_VERSION__} <span class="vr">|</span>
|
||||
<!--@if(isset($latestVersion))--><strong>Latest version</strong>: <a href="{$latestVersion->url}" target="_blank" title="{zdate($latestVersion->date, 'Y-m-d')}">{$latestVersion->title}</a><!--@end-->
|
||||
<!--@if(isset($latestVersion))--><strong>Latest version</strong>: <a href="{htmlspecialchars(html_entity_decode($latestVersion->url))}" target="_blank" title="{zdate($latestVersion->date, 'Y-m-d')}">{$latestVersion->title}</a><!--@end-->
|
||||
</p>
|
||||
<p class="cache">
|
||||
<button type="button" class="text" onclick="doResetAdminMenu();">{$lang->cmd_admin_menu_reset}</button> <span class="vr">|</span>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="gnb">
|
||||
<ul class="nav">
|
||||
<ul class="nav-gnb">
|
||||
<li loop="$gnbUrlList=>$key,$value" class="activeOn"|cond="$parentSrl==$key"><a href="{getFullUrl('')}{$value['href']}"><span>{$value['text']}</span></a>
|
||||
<ul cond="count($value['list'])">
|
||||
<li loop="$value['list']=>$key2,$value2"><a href="{getFullUrl('')}{$value2['href']}">{$value2['text']}</a></li>
|
||||
|
|
@ -31,23 +31,6 @@
|
|||
<option cond="count($value['list']) == 0" value="{getFullUrl('')}{$value['href']}" selected="selected"|cond="!$subMenuTitle">{$value['text']}</option>
|
||||
</block>
|
||||
</select>
|
||||
<div class="bmk active">
|
||||
<a href="#bmk" class="bmAnchor" data-effect="fade" data-duration="200">{$lang->favorite}</a>
|
||||
<ul id="bmk" class="bmContent">
|
||||
<li loop="$favorite_list => $favorite">
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', $favorite->admin_index_act)}">{$favorite->title}</a>
|
||||
<form class="action" action="">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procAdminToggleFavorite" />
|
||||
<input type="hidden" name="site_srl" value="0" />
|
||||
<input type="hidden" name="module_name" value="{$favorite->module}" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
|
||||
<button type="submit" class="text" title="{$lang->cmd_delete}">x</button>
|
||||
</form>
|
||||
</li>
|
||||
<li cond="!is_array($favorite_list) || count($favorite_list) < 1">{$lang->no_data}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<select class="mnv">
|
||||
<option>{$lang->favorite}</option>
|
||||
<option loop="$favorite_list => $favorite" value="{getUrl('', 'module', 'admin', 'act', $favorite->admin_index_act)}">{$favorite->title}</option>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<ul>
|
||||
<!--@if(count($gnbUrlList[$parentSrl]['list']) > 0)-->
|
||||
<!--@foreach($gnbUrlList[$parentSrl]['list'] AS $key=>$value)-->
|
||||
<li <!--@if($value['text'] == $subMenuTitle)-->class="active"<!--@end-->><a href="{html_entity_decode($value['href'])}">{$value['text']}</a></li>
|
||||
<li <!--@if($value['text'] == $subMenuTitle)-->class="active"<!--@end-->><a href="{htmlspecialchars(html_entity_decode($value['href']))}">{$value['text']}</a></li>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</ul>
|
||||
|
|
|
|||
17
modules/admin/tpl/_spShortcut.html
Normal file
17
modules/admin/tpl/_spShortcut.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<div class="sct well">
|
||||
<h2>{$lang->favorite}</h2>
|
||||
<ul class="nav nav-list">
|
||||
<li loop="$favorite_list => $favorite">
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', $favorite->admin_index_act)}">{$favorite->title}</a>
|
||||
<form class="action" action="./">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procAdminToggleFavorite" />
|
||||
<input type="hidden" name="site_srl" value="0" />
|
||||
<input type="hidden" name="module_name" value="{$favorite->module}" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
|
||||
<button type="submit" class="text" title="{$lang->cmd_delete}">×</button>
|
||||
</form>
|
||||
</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>
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
<h2 class="h2">{$lang->admin_menu_add}</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q"><label for="name">{$lang->module}</label></p>
|
||||
<p class="q"><label for="menuNameList">{$lang->module}</label></p>
|
||||
<div class="a">
|
||||
<select name="menu_name" id="menuNameList">
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -30,21 +30,21 @@
|
|||
<p class="a"><input type="text" name="ftp_port" id="ftp_port" value="{$ftp_info->ftp_port}" /><span class="desc">Default : 21</span></p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="ftp_passive">{$lang->about_use_ftp_passive_mode}</label></p>
|
||||
<p class="q"><label>{$lang->about_use_ftp_passive_mode}</label></p>
|
||||
<p class="a">
|
||||
<input type="radio" name="ftp_pasv" id="ftp_passive_y" value="Y" <!--@if($ftp_info->ftp_pasv == 'Y')-->checked="checked" <!--@end-->/> <label for="ftp_passive_y">{$lang->cmd_yes}</label>
|
||||
<input type="radio" name="ftp_pasv" id="ftp_passive_n" value="N" <!--@if($ftp_info->ftp_pasv != 'Y')-->checked="checked" <!--@end-->/> <label for="ftp_passive_n">{$lang->cmd_no}</label>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="sftp">{$lang->about_use_sftp_support}</label><span cond="!$sftp_support"><label for="sftp"> ({$lang->disable_sftp_support})</label></span></p>
|
||||
<p class="q"><label>{$lang->about_use_sftp_support}</label><span cond="!$sftp_support"><label> ({$lang->disable_sftp_support})</label></span></p>
|
||||
<p class="a">
|
||||
<input type="radio" name="sftp" id="sftp_y" value="Y" <!--@if($ftp_info->sftp == 'Y')-->checked="checked" <!--@end--> <!--@if(!$sftp_support)-->disabled<!--@end-->/> <label for="sftp_y">{$lang->cmd_yes}</label>
|
||||
<input type="radio" name="sftp" id="sftp_y" value="Y" <!--@if($ftp_info->sftp == 'Y')-->checked="checked" <!--@end--><!--@if(!$sftp_support)-->disabled <!--@end-->/> <label for="sftp_y">{$lang->cmd_yes}</label>
|
||||
<input type="radio" name="sftp" id="sftp_n" value="N" <!--@if($ftp_info->sftp != 'Y')-->checked="checked" <!--@end-->/> <label for="sftp_n">{$lang->cmd_no}</label>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="ftp_path">{$lang->msg_ftp_installed_ftp_realpath}</label></p>
|
||||
<p class="q"><label for="ftp_root_path">{$lang->msg_ftp_installed_ftp_realpath}</label></p>
|
||||
<p class="a">
|
||||
<input type="text" name="ftp_root_path" id="ftp_root_path" value="{$ftp_info->ftp_root_path}" />
|
||||
<a href="#ftpSuggestion" onclick="getFTPList(); return false;" class="tgAnchor">{$lang->ftp_get_list}</a>
|
||||
|
|
|
|||
|
|
@ -20,33 +20,64 @@ jQuery(function($){
|
|||
<load target="../install/lang/lang.xml" usecdn="true" />
|
||||
<load target="../../session/tpl/js/session.js" usecdn="true" />
|
||||
|
||||
<form action="" method="post" id="ftp_form" class="form" enctype="multipart/form-data">
|
||||
<script>
|
||||
jQuery(function($){
|
||||
$('.moduleSearch').bind('moduleSelect', function(e, aSelected){
|
||||
var sType, sName, sSrl;
|
||||
|
||||
sType = aSelected[0].type;
|
||||
sName = aSelected[0].browser_title;
|
||||
sSrl = aSelected[0].module_srl;
|
||||
|
||||
$('#_target_module').val(sName);
|
||||
$('#index_module_srl').val(sSrl);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<form action="./" method="post" id="ftp_form" class="form" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="install" />
|
||||
<input type="hidden" name="act" value="procInstallAdminConfig" />
|
||||
<h1 class="h1">{$lang->menu_gnb_sub['adminConfigurationGeneral']}</h1>
|
||||
<fieldset class="section">
|
||||
<h2 class="h2">{$lang->subtitle_primary}</h2>
|
||||
<ul>
|
||||
<li class="modulefinder">
|
||||
<li class="modulefinder moduleSearch">
|
||||
<p class="q">{$lang->about_start_module}</p>
|
||||
<p class="a">
|
||||
<div class="a">
|
||||
<input type="hidden" name="index_module_srl" id="index_module_srl" value="{$start_module->index_module_srl}" />
|
||||
<input type="text" name="_target_module" id="_target_module" value="{$start_module->browser_title} ({$start_module->mid})" readonly />
|
||||
<a href="#modalWindow" class="modalAnchor" onClick="viewSiteSearch()">{$lang->cmd_find}</a> </p>
|
||||
<p class="site_keyword_search" style="display:none">
|
||||
<input type="text" name="site_keyword" /> <a href="#suggestion3" class="tgAnchor findsite">{$lang->cmd_confirm}</a>
|
||||
<div id="suggestion3" class="tgContent suggestion" >
|
||||
<ul></ul>
|
||||
<a href="#moduleSearchWindow" class="tgAnchor moduleSearch">{$lang->cmd_find}</a>
|
||||
<div id="moduleSearchWindow" class="moduleSearchWindow tgContent">
|
||||
<div class="siteList sectionDiv">
|
||||
<h2>{$lang->select_site}</h2>
|
||||
<div class="siteListSearchBox">
|
||||
<div class="siteListSearchBoxBorder">
|
||||
<div class="searchImg icon-search"></div>
|
||||
<input type="text" class="siteListSearchInput" name="site_filter">
|
||||
</div>
|
||||
</div>
|
||||
<div class="siteListUL">
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<select class="moduleList" style="width:290px"></select>
|
||||
</p>
|
||||
<p>
|
||||
<select class="moduleIdList" style="width:290px"></select>
|
||||
<a href="#" id="sitefind_addBtn" onclick="setStartModule()" style="display:none;">{$lang->cmd_select}</a>
|
||||
</p>
|
||||
</p>
|
||||
<div class="moduleTypeList sectionDiv">
|
||||
<h2>{$lang->select_module_type}</h2>
|
||||
<div>
|
||||
<ul class="moduleTypeListUL">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="moduleInstanceList sectionDiv">
|
||||
<h2>{$lang->select_module_instance}</h2>
|
||||
<div>
|
||||
<select class="moduleInstanceListSelect" size="8">
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn btn_primary moduleSearch_ok">{$lang->cmd_select}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->about_lang_select}</p>
|
||||
|
|
@ -64,13 +95,13 @@ jQuery(function($){
|
|||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="">{$lang->about_default_lang}</label></p>
|
||||
<p class="q"><label for="change_lang_type">{$lang->about_default_lang}</label></p>
|
||||
<p class="a">
|
||||
<select name="change_lang_type">
|
||||
<select name="change_lang_type" id="change_lang_type">
|
||||
<!--@foreach($lang_supported as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($key==$selected_lang)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</select>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
|
|
@ -132,7 +163,7 @@ jQuery(function($){
|
|||
<h2 class="h2">{$lang->subtitle_advanced}</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q"><label for="admin_ip">{$lang->about_admin_ip_limit}</label>[<a href="#helpAdminip" class="tgAnchor">?</a>]</p>
|
||||
<p class="q"><label for="admin_ip_list">{$lang->about_admin_ip_limit}</label>[<a href="#helpAdminip" class="tgAnchor">?</a>]</p>
|
||||
<div class="tgContent layer" id="helpAdminip">
|
||||
<p>{$lang->detail_about_admin_ip_limit}</p>
|
||||
</div>
|
||||
|
|
@ -148,7 +179,7 @@ jQuery(function($){
|
|||
<p class="a"><input type="text" name="default_url" id="default_url" value="{$default_url}"/></p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="use_ssl">{$lang->use_ssl}</label>[<a href="#helpUsessl" class="tgAnchor">?</a>]</p>
|
||||
<p class="q"><label>{$lang->use_ssl}</label>[<a href="#helpUsessl" class="tgAnchor">?</a>]</p>
|
||||
<div class="tgContent layer" id="helpUsessl">
|
||||
<p>{$lang->about_use_ssl}</p>
|
||||
</div>
|
||||
|
|
@ -159,11 +190,11 @@ jQuery(function($){
|
|||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->server_ports}</p>
|
||||
<p class="q"><label>{$lang->server_ports}</label></p>
|
||||
<p class="a">
|
||||
<label for="">HTTP:</label> <input type="text" name="http_port" id="http_port" size="5" value="{$http_port}" style="width:40px" />
|
||||
<label for="http_port">HTTP:</label> <input type="text" name="http_port" id="http_port" size="5" value="{$http_port}" style="width:40px" />
|
||||
|
||||
<label for="">HTTPS:</label> <input type="text" name="https_port" id="https_port" size="5" value="{$https_port}" style="width:40px" />
|
||||
<label for="https_port">HTTPS:</label> <input type="text" name="https_port" id="https_port" size="5" value="{$https_port}" style="width:40px" />
|
||||
</p>
|
||||
</li>
|
||||
<li cond="__XE_CDN_VERSION__!='%__XE_CDN_VERSION__%'">
|
||||
|
|
@ -174,14 +205,14 @@ jQuery(function($){
|
|||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="">{$lang->about_use_rewrite}</label></p>
|
||||
<p class="q"><label>{$lang->about_use_rewrite}</label></p>
|
||||
<p class="a">
|
||||
<input type="radio" name="use_rewrite" id="use_rewrite_y" value="Y" <!--@if($use_rewrite == 'Y')-->checked="checked" <!--@end-->/> <label for="use_rewrite_y">{$lang->cmd_yes}</label>
|
||||
<input type="radio" name="use_rewrite" id="use_rewrite_n" value="N" <!--@if($use_rewrite != 'Y')-->checked="checked" <!--@end-->/> <label for="use_rewrite_n">{$lang->cmd_no}</label>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="use_sso">{$lang->about_use_sso}</label>[<a href="#helpUsesso" class="tgAnchor">?</a>]</p>
|
||||
<p class="q"><label>{$lang->about_use_sso}</label>[<a href="#helpUsesso" class="tgAnchor">?</a>]</p>
|
||||
<div class="tgContent layer" id="helpUsesso">
|
||||
<p>{$lang->about_sso}</p>
|
||||
</div>
|
||||
|
|
@ -191,7 +222,7 @@ jQuery(function($){
|
|||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="">{$lang->use_db_session}</label>[<a href="#helpUsedbSession" class="tgAnchor">?</a>]</p>
|
||||
<p class="q"><label>{$lang->use_db_session}</label>[<a href="#helpUsedbSession" class="tgAnchor">?</a>]</p>
|
||||
<div class="tgContent layer" id="helpUsedbSession">
|
||||
<p>{$lang->about_db_session}</p>
|
||||
</div>
|
||||
|
|
@ -201,7 +232,7 @@ jQuery(function($){
|
|||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="">{$lang->qmail_compatibility}</label>[<a href="#helpQmail" class="tgAnchor">?</a>]</p>
|
||||
<p class="q"><label>{$lang->qmail_compatibility}</label>[<a href="#helpQmail" class="tgAnchor">?</a>]</p>
|
||||
<div class="tgContent layer" id="helpQmail">
|
||||
<p>{$lang->about_qmail_compatibility}</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@charset "utf-8";
|
||||
@charset "utf-8";
|
||||
/* Element Reset */
|
||||
header,footer,section,article,aside,nav,hgroup,details,menu,figure,figcaption{display:block}
|
||||
.x,
|
||||
|
|
@ -6,7 +6,7 @@ header,footer,section,article,aside,nav,hgroup,details,menu,figure,figcaption{di
|
|||
.x input,
|
||||
.x textarea,
|
||||
.x select,
|
||||
.x button{font-family:Tahoma,Geneva,sans-serif;font-size:12px;color:#333}
|
||||
.x button{font-size:13px;color:#333}
|
||||
.x button,
|
||||
.x input[type=submit],
|
||||
.x input[type=reset],
|
||||
|
|
@ -15,11 +15,10 @@ header,footer,section,article,aside,nav,hgroup,details,menu,figure,figcaption{di
|
|||
.x p{line-height:1.5}
|
||||
/* Section & Heading */
|
||||
.x .section{margin:1em 0;padding:0;border:0}
|
||||
.x .h1,
|
||||
.x .h2,
|
||||
.x .h3,
|
||||
.x .h4{position:relative;border-style:solid;border-top:0;border-right:0;zoom:1;padding-left:8px}
|
||||
.x .h1{border-width:4px;font-size:24px;border-color:#666}
|
||||
.x .h1{background:#444;border-radius:4px;color:#fff;margin:0 0 1em 0;font-size:16px;padding:0 15px;line-height:36px}
|
||||
.x .h2{border-width:3px;font-size:20px;border-color:#888}
|
||||
.x .h3{border-width:2px;font-size:16px;border-color:#aaa}
|
||||
.x .h4{border-width:1px;font-size:12px;border-color:#ccc}
|
||||
|
|
@ -74,7 +73,7 @@ header,footer,section,article,aside,nav,hgroup,details,menu,figure,figcaption{di
|
|||
.x .table th.text,
|
||||
.x .table td.text{width:100%}
|
||||
/* Form */
|
||||
.x .form{margin:1em 0;padding:0}
|
||||
.x .form{margin:0 0 1em 0;padding:0}
|
||||
.x .form fieldset{margin:0 0 2em 0;padding:0;border:0}
|
||||
.x .form.search fieldset{border:1px solid #ccc;padding:5px 15px;border-radius:3px}
|
||||
.x .form em{font-style:normal;color:#e00}
|
||||
|
|
@ -119,49 +118,40 @@ header,footer,section,article,aside,nav,hgroup,details,menu,figure,figcaption{di
|
|||
/* Global Navigation Bar */
|
||||
.x .gnb{height:34px;clear:both;border:1px solid #c1c1c1;border-left:0;border-right:0;background-color:#efefef;background:#efefef -webkit-gradient(linear, 0% 0%, 0% 100%, from(#efefef), to(#dcdcdc));background:#efefef -moz-linear-gradient(top, #efefef, #dcdcdc);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#efefef, endColorStr=#dcdcdc);zoom:1}
|
||||
.x .gnb:after{content:"";display:block;clear:both}
|
||||
.x .gnb .nav{float:left;position:relative;display:inline-block;*display:inline;zoom:1;margin:0 0 0 20px;padding:1px;list-style:none}
|
||||
.x .gnb .nav ul{_position:absolute;display:block;_display:inline;zoom:1;clear:both;margin:0;padding:0;border:0;overflow:hidden}
|
||||
.x .gnb.active .nav{top:-5px;padding:5px 5px 5px 0;margin:0 0 -100% 20px;border:1px solid #aaa;background:#fff;box-shadow:0 0 10px #999;border-radius:5px}
|
||||
.x .gnb.active .nav ul{top:0;_position:relative;box-shadow:none;display:block;_display:inline;clear:both;padding:0;margin:0;border:0}
|
||||
.x .gnb .nav:after{content:"";display:block;clear:both}
|
||||
.x .gnb .nav li{position:relative;display:inline-block;*display:inline;zoom:1;vertical-align:top;overflow:hidden;margin:0}
|
||||
.x .gnb .nav li.activeOn{z-index:10}
|
||||
.x .gnb .nav li.activeOn>a{border:1px solid #ccc}
|
||||
.x .gnb .nav li li{display:block;_float:left;clear:both;overflow:hidden;border:0;margin:0}
|
||||
.x .gnb .nav li li:first-child{border:0}
|
||||
.x .gnb .nav li a{display:block;_float:left;font-weight:bold;color:#333;font-size:12px;height:14px;padding:9px 0;white-space:nowrap;text-decoration:none;text-shadow:0 1px 0 #fff;zoom:1}
|
||||
.x .gnb .nav li a span{padding:0 15px;border-left:1px solid #fff}
|
||||
.x .gnb.active .nav li a span,
|
||||
.x .gnb .nav li:first-child a span,
|
||||
.x .gnb .nav li.activeOn+li a span{border:0;margin:0 0 0 1px}
|
||||
.x .gnb .nav li a:hover,
|
||||
.x .gnb .nav li a:active,
|
||||
.x .gnb .nav li a:focus{background:#f4f4f4}
|
||||
.x .gnb .nav li.activeOn>a{background:#fff;padding:8px 0}
|
||||
.x .gnb .nav li li a{color:#555;background:#fff;padding:5px 15px !important;font-weight:normal !important;border:0 !important}
|
||||
.x .gnb .nav li li a:hover,
|
||||
.x .gnb .nav li li a:active,
|
||||
.x .gnb .nav li li a:focus{border:0;background:#eee}
|
||||
.x .gnb .bmk{position:relative;float:right;padding:8px 15px;margin:0 20px -100% 0;text-align:right;display:inline}
|
||||
.x .gnb .bmk.active{top:-5px;padding:12px 14px 10px 15px;background-color:#fff;border:1px solid #aaa;box-shadow:0 0 10px #999;border-radius:5px}
|
||||
.x .gnb .bmk .bmAnchor{height:16px;text-shadow:0 1px 0 #fff;display:inline-block;padding:0 0 0 20px;background:url(../img/iconFavorite.gif) no-repeat 0 -16px}
|
||||
.x .gnb .bmk ul{display:none}
|
||||
.x .gnb .bmk.active ul{position:relative;list-style:none;display:block !important;text-align:left;background:none;margin:0 !important;padding:10px 0 0 0 !important;border:0;box-shadow:none;border-radius:0}
|
||||
.x .gnb .bmk li{display:block;position:relative;padding:3px 15px 3px 0 !important;white-space:nowrap}
|
||||
.x .gnb .bmk li a{display:inline;padding:0;background:none !important;font-weight:normal}
|
||||
.x .gnb .bmk li .action{position:absolute;top:0;right:0}
|
||||
.x .gnb .bmk li .action .text{text-decoration:none;width:16px;text-align:center;margin:0;padding:0;border:0;background:none;overflow:visible}
|
||||
.x .gnb .nav-gnb{float:left;position:relative;display:inline-block;*display:inline;zoom:1;margin:0 0 0 20px;padding:1px;list-style:none}
|
||||
.x .gnb .nav-gnb ul{_position:absolute;display:block;_display:inline;zoom:1;clear:both;margin:0;padding:0;border:0;overflow:hidden;height:0}
|
||||
.x .gnb.active .nav-gnb{top:-5px;padding:5px 5px 5px 0;margin:0 0 -100% 20px;border:1px solid #aaa;background:#fff;box-shadow:0 0 10px #999;border-radius:5px}
|
||||
.x .gnb.active .nav-gnb ul{top:0;_position:relative;box-shadow:none;display:block;_display:inline;clear:both;padding:0;margin:0;border:0}
|
||||
.x .gnb .nav-gnb:after{content:"";display:block;clear:both}
|
||||
.x .gnb .nav-gnb li{position:relative;display:inline-block;*display:inline;zoom:1;vertical-align:top;overflow:hidden;margin:0}
|
||||
.x .gnb .nav-gnb li.activeOn{z-index:10}
|
||||
.x .gnb .nav-gnb li.activeOn>a{border:1px solid #ccc}
|
||||
.x .gnb .nav-gnb li li{display:block;_float:left;clear:both;overflow:hidden;border:0;margin:0}
|
||||
.x .gnb .nav-gnb li li:first-child{border:0}
|
||||
.x .gnb .nav-gnb li a{display:block;_float:left;font-weight:bold;color:#333;font-size:12px;height:14px;padding:9px 0;white-space:nowrap;text-decoration:none;text-shadow:0 1px 0 #fff;zoom:1}
|
||||
.x .gnb .nav-gnb li a span{padding:0 15px;border-left:1px solid #fff}
|
||||
.x .gnb.active .nav-gnb li a span,
|
||||
.x .gnb .nav-gnb li:first-child a span,
|
||||
.x .gnb .nav-gnb li.activeOn+li a span{border:0;margin:0 0 0 1px}
|
||||
.x .gnb .nav-gnb li a:hover,
|
||||
.x .gnb .nav-gnb li a:active,
|
||||
.x .gnb .nav-gnb li a:focus{background:#f4f4f4}
|
||||
.x .gnb .nav-gnb li.activeOn>a{background:#fff;padding:8px 0}
|
||||
.x .gnb .nav-gnb li li a{color:#555;background:#fff;padding:5px 15px !important;font-weight:normal !important;border:0 !important}
|
||||
.x .gnb .nav-gnb li li a:hover,
|
||||
.x .gnb .nav-gnb li li a:active,
|
||||
.x .gnb .nav-gnb li li a:focus{border:0;background:#eee}
|
||||
.x .gnb .mnv{width:100%;height:32px;display:none}
|
||||
@media only all and (max-width:860px){
|
||||
@media all and (max-width:860px){
|
||||
.x .gnb{height:auto}
|
||||
.x .gnb .nav,
|
||||
.x .gnb .bmk{display:none}
|
||||
.x .gnb .nav-gnb,
|
||||
.x .sct{display:none}
|
||||
.x .gnb .mnv{display:block}
|
||||
}
|
||||
/* Local Navigation */
|
||||
.x .lnb{position:relative;float:left;width:210px;margin:1em 0 1em -240px;line-height:normal;zoom:1;display:inline}
|
||||
.x .lnb .h2{margin-top:0;border-left:0;padding-left:0}
|
||||
.x .lnb ul{margin:0 !important;padding:0;list-style:none}
|
||||
.x .lnb{position:relative;float:left;width:210px;margin:0 0 1em -230px;line-height:normal;zoom:1;display:inline}
|
||||
.x .lnb .h2{position:relative;z-index:2;margin:0 0 -1px 0;padding:0 10px;border:1px solid #444;border-bottom:0;border-radius:4px 4px 0 0;background:#555;font-size:13px;color:#fff;line-height:36px}
|
||||
.x .lnb ul{margin:0 !important;padding:0;list-style:none;position:relative;z-index:1}
|
||||
.x .lnb li{position:relative;margin:0 0 -1px 0;vertical-align:top;zoom:1}
|
||||
.x .lnb li a{display:block;position:relative;padding:8px 10px;text-decoration:none;color:#666;font-weight:bold;background:#fafafa;border:1px solid #eee;zoom:1}
|
||||
.x .lnb li a .i{position:absolute;top:50%;left:100%;margin:-4px 0 0 -16px;width:8px;height:8px;color:#ccc;background:url(../img/iconNavVr.gif) no-repeat left top}
|
||||
|
|
@ -177,6 +167,19 @@ header,footer,section,article,aside,nav,hgroup,details,menu,figure,figcaption{di
|
|||
.x .lnb li.active li a{border:0}
|
||||
.x .lnb li.active ul{display:block;border-top:1px solid #eee}
|
||||
.x .lnb li.active li.active a span{color:#13b200;font-weight:bold;letter-spacing:-1px}
|
||||
.x .lnb li:last-child a,
|
||||
.x .lnb li.active:last-child{border-radius:0 0 4px 4px !important}
|
||||
/* Shortcut */
|
||||
.x .sct{float:right;width:138px;position:relative;right:-160px;margin:0 0 0 -140px;padding:8px 0}
|
||||
.x .sct h2{margin:0 0 5px 15px;font-size:13px}
|
||||
.x .sct ul{margin:0;font-size:12px}
|
||||
.x .sct li{position:relative}
|
||||
.x .sct a{text-decoration:none}
|
||||
.x .sct form{position:absolute;margin:0;padding:0;top:2px;right:-10px}
|
||||
.x .sct .text{text-decoration:none;font-weight:bold;color:#999 !important;width:16px;height:16px;margin:0}
|
||||
.x .sct .text:hover,
|
||||
.x .sct .text:active,
|
||||
.x .sct .text:focus{color:#333 !important}
|
||||
/* Content Navigation */
|
||||
.x .cnb{margin:1em 0;position:relative;zoom:1}
|
||||
.x .cnb:after{content:"";display:block;clear:both}
|
||||
|
|
@ -252,7 +255,7 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */
|
|||
.x .h2Anchor{position:absolute;right:0;border:0;background:none;color:#00f;text-decoration:underline}
|
||||
/* Skip Navigation */
|
||||
.x .skipNav{margin:0;text-align:center}
|
||||
@media only all and (max-width:860px){
|
||||
@media all and (max-width:860px){
|
||||
.x .skipNav{display:none}
|
||||
}
|
||||
.x .skipNav a{position:absolute;width:1px;height:1px;display:block;padding:10px 0;font-weight:bold;overflow:hidden}
|
||||
|
|
@ -281,7 +284,7 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */
|
|||
.x .header .account a{color:#fff;display:inline-block;height:14px}
|
||||
.x .header .account a.language{padding-right:16px;background:url(../img/iconArrow.gif) no-repeat right -160px}
|
||||
.x .header #language{position:absolute;top:19px;right:-20px;padding:6px 4px !important;border:1px solid #666;border-top:0;background:#333}
|
||||
@media only all and (max-width:860px){
|
||||
@media all and (max-width:860px){
|
||||
.x .header #language{right:-10px}
|
||||
}
|
||||
.x .header #language li{border:0;display:block;padding:1px 8px 1px 10px;text-align:left;line-height:1}
|
||||
|
|
@ -295,16 +298,17 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */
|
|||
.x .header .account a:focus{color:#6e9cf2;text-decoration:underline}
|
||||
/* Footer */
|
||||
.x .footer{border-top:1px solid #ddd;text-align:center;font-size:12px;padding:1.5em 0;zoom:1}
|
||||
.x .footer *{font-size:12px}
|
||||
.x .footer:after{content:"";display:block;clear:both}
|
||||
.x .footer p{margin:0}
|
||||
.x .footer .power{float:left}
|
||||
.x .footer .cache{float:right}
|
||||
.x .footer .vr{color:#ccc}
|
||||
/* Body */
|
||||
.x .body{position:relative;z-index:1;padding:1em 20px 1em 260px;zoom:1}
|
||||
.x .body{position:relative;z-index:1;padding:30px 170px 30px 240px;zoom:1}
|
||||
.x .body:after{content:"";display:block;clear:both}
|
||||
/* Content */
|
||||
.x .content{float:right;width:100%;margin-left:-230px;zoom:1}
|
||||
.x .content{float:right;width:100%;margin-left:-100%;zoom:1;outline:0}
|
||||
.x .content:after{content:"";display:block;clear:both}
|
||||
.x .content a{color:#33a}
|
||||
.x .content a:hover,
|
||||
|
|
@ -315,15 +319,16 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */
|
|||
.x .content .portlet a:active,
|
||||
.x .content .portlet a:focus{text-decoration:underline}
|
||||
/* Dashboard */
|
||||
.x .dashboard{position:relative;float:none;width:auto;margin-left:-230px}
|
||||
.x .dashboard .portlet{float:left;width:48%;margin-right:1em}
|
||||
.x .dashboard .section{margin-top:0}
|
||||
.x .dashboard .portlet{float:left;width:48%;margin-right:1em;margin-top:0}
|
||||
.x .dashboard .portlet:nth-of-type(odd){float:left;width:49%;margin-right:0}
|
||||
.x .dashboard .portlet:nth-of-type(even){float:right;width:49%;margin-right:0}
|
||||
@media only all and (min-width:1300px){
|
||||
@media all and (min-width:1300px){
|
||||
.x .dashboard .portlet{float:left !important;width:32% !important;margin-right:1em !important}
|
||||
}
|
||||
/* Single Column*/
|
||||
.x .single{position:relative;float:none;width:auto;margin-left:-240px}
|
||||
.x .single{padding-left:10px}
|
||||
.x .single .content{position:relative;float:left;width:100%;margin:0}
|
||||
/* Search */
|
||||
.x .search{zoom:1}
|
||||
.x .search:after{content:"";display:block;clear:both}
|
||||
|
|
@ -578,9 +583,9 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */
|
|||
.x a.cMenu{display:inline-block;width:16px;height:0;padding:16px 0 0 0;overflow:hidden;vertical-align:middle;background:url(../../../../common/img/icon.bubble.png) no-repeat}
|
||||
.x .sTog{float:right;border:0;background-color:transparent;width:28px;height:18px;opacity:.5;filter:alpha(opacity=50)}
|
||||
/* Responsive Layout */
|
||||
@media only all and (max-width:860px){
|
||||
@media all and (max-width:860px){
|
||||
.x .header .account ul{padding-right:10px}
|
||||
.x .body{padding:0}
|
||||
.x .body{padding:1em 0 0 0}
|
||||
.x .content{float:none;margin-left:0}
|
||||
.x .lnb{float:none;width:auto;margin:1em 0}
|
||||
.x .dashboard .portlet{float:none !important;width:auto !important;margin-right:0}
|
||||
|
|
@ -678,6 +683,28 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */
|
|||
.x .crossTable input[type=file]{height:22px;line-height:22px;vertical-align:middle;padding:0 4px}
|
||||
.x .clear:after{content:"";display:block;clear:both}
|
||||
|
||||
.x .moduleSearchWindow{position:absolute;width:700px;z-index:100}
|
||||
.x .moduleSearchWindow, .moduleSearchWindow div{margin:0;padding:0;color:#2d2c2d;font-size:12px}
|
||||
.x .moduleSearchWindow h2{margin:0;padding:4px;height:24px;line-height:24px;background:#666;text-align:left;color:#fff;font-size:12px}
|
||||
.x .moduleSearchWindow .sectionDiv{position:relative;margin:0px;background:#fff;border:1px solid}
|
||||
.x .moduleSearchWindow .siteList{float:left;width:295px}
|
||||
.x .moduleSearchWindow .highlight{background:yellow;color:red;font-style:italic}
|
||||
.x .moduleSearchWindow .moduleTypeList{margin-left:5px;float:left;width:200px}
|
||||
.x .moduleSearchWindow .moduleInstanceList{float:right;width:190px}
|
||||
.x .moduleSearchWindow ul{margin:0;padding:0;border:0}
|
||||
.x .moduleSearchWindow li{font-size:12px;border:0;border-bottom:1px solid #ccc;margin:0;padding: 4px 4px;font-family: 나눔고딕,NanumGothic,"맑은 고딕","Malgun Gothic",AppleGothic,돋움,Dotum,굴림,Gulim,sans-serif}
|
||||
.x .moduleSearchWindow li:hover, .moduleSearchWindow li.on{background:#eee;cursor:pointer}
|
||||
.x .moduleSearchWindow li div{margin:0;padding:0;display:inline-block;white-space: nowrap;overflow: hidden;text-overflow: ellipsis}
|
||||
.x .moduleSearchWindow .siteList li div{width:270px}
|
||||
.x .moduleSearchWindow .siteListSearchBox{margin:0;padding:4px 0;height:24px;border-bottom:1px solid #888}
|
||||
.x .moduleSearchWindow .siteListSearchBoxBorder{margin-left:3px;height: 22px;width: 287px;border: 1px solid #ccc}
|
||||
.x .moduleSearchWindow input.siteListSearchInput{margin:0;padding:0;position:relative;float:right;width: 260px;margin-right:4px;border:0}
|
||||
.x .moduleSearchWindow .siteListSearchBox .searchImg{position:relative;float:left;margin-top:4px;margin-left:4px}
|
||||
.x .moduleSearchWindow .moduleTypeList li div{width:170px}
|
||||
.x .moduleSearchWindow .moduleInstanceList li div{width:190px}
|
||||
.x .moduleSearchWindow .moduleSearch_ok {float:right}
|
||||
.x .moduleSearchWindow select.moduleInstanceListSelect {width:100%}
|
||||
|
||||
/*!
|
||||
* Bootstrap v2.0.4
|
||||
*
|
||||
|
|
@ -687,7 +714,7 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */
|
|||
*
|
||||
* Designed and built with all the love in the world@twitter by@mdo and@fat.
|
||||
*/
|
||||
/* Bootstrap - Icon */
|
||||
/* Bootstrap - Icons */
|
||||
[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}
|
||||
[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0}
|
||||
.icon-white{background-image:url("../img/glyphicons-halflings-white.png")}
|
||||
|
|
@ -830,4 +857,69 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */
|
|||
.icon-tasks{background-position:-384px -144px}
|
||||
.icon-filter{background-position:-408px -144px}
|
||||
.icon-briefcase{background-position:-432px -144px}
|
||||
.icon-fullscreen{background-position:-456px -144px}
|
||||
.icon-fullscreen{background-position:-456px -144px}
|
||||
/* Bootstrap - Nav */
|
||||
.nav{margin-bottom:18px;margin-left:0;list-style:none}
|
||||
.nav > li > a{display:block}
|
||||
.nav > li > a:hover{text-decoration:none;background-color:#eeeeee}
|
||||
.nav > .pull-right{float:right}
|
||||
.nav .nav-header{display:block;padding:3px 15px;font-weight:bold;line-height:18px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase}
|
||||
.nav li + .nav-header{margin-top:9px}
|
||||
.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}
|
||||
.nav-list > li > a,
|
||||
.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5)}
|
||||
.nav-list > li > a{padding:3px 15px}
|
||||
.nav-list > .active > a,
|
||||
.nav-list > .active > a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc}
|
||||
.nav-list [class^="icon-"]{margin-right:2px}
|
||||
.nav-list .divider{*width:100%;height:1px;margin:8px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff}
|
||||
.nav-tabs,
|
||||
.nav-pills{ *zoom:1}
|
||||
.nav-tabs:before,
|
||||
.nav-pills:before,
|
||||
.nav-tabs:after,
|
||||
.nav-pills:after{display:table;content:""}
|
||||
.nav-tabs:after,
|
||||
.nav-pills:after{clear:both}
|
||||
.nav-tabs > li,
|
||||
.nav-pills > li{float:left}
|
||||
.nav-tabs > li > a,
|
||||
.nav-pills > li > a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}
|
||||
.nav-tabs{border-bottom:1px solid #ddd}
|
||||
.nav-tabs > li{margin-bottom:-1px}
|
||||
.nav-tabs > li > a{padding-top:8px;padding-bottom:8px;line-height:18px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}
|
||||
.nav-tabs > li > a:hover{border-color:#eeeeee #eeeeee #dddddd}
|
||||
.nav-tabs > .active > a,
|
||||
.nav-tabs > .active > a:hover{color:#555555;cursor:default;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent}
|
||||
.nav-pills > li > a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}
|
||||
.nav-pills > .active > a,
|
||||
.nav-pills > .active > a:hover{color:#ffffff;background-color:#0088cc}
|
||||
.nav-stacked > li{float:none}
|
||||
.nav-stacked > li > a{margin-right:0}
|
||||
.nav-tabs.nav-stacked{border-bottom:0}
|
||||
.nav-tabs.nav-stacked > li > a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}
|
||||
.nav-tabs.nav-stacked > li:first-child > a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}
|
||||
.nav-tabs.nav-stacked > li:last-child > a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}
|
||||
.nav-tabs.nav-stacked > li > a:hover{z-index:2;border-color:#ddd}
|
||||
.nav-pills.nav-stacked > li > a{margin-bottom:3px}
|
||||
.nav-pills.nav-stacked > li:last-child > a{margin-bottom:1px}
|
||||
.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px}
|
||||
.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}
|
||||
.nav-tabs .dropdown-toggle .caret,
|
||||
.nav-pills .dropdown-toggle .caret{margin-top:6px;border-top-color:#0088cc;border-bottom-color:#0088cc}
|
||||
.nav-tabs .dropdown-toggle:hover .caret,
|
||||
.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}
|
||||
.nav-tabs .active .dropdown-toggle .caret,
|
||||
.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;border-bottom-color:#333333}
|
||||
.nav > .dropdown.active > a:hover{color:#000000;cursor:pointer}
|
||||
.nav-tabs .open .dropdown-toggle,
|
||||
.nav-pills .open .dropdown-toggle,
|
||||
.nav > li.dropdown.open.active > a:hover{color:#ffffff;background-color:#999999;border-color:#999999}
|
||||
.nav li.dropdown.open .caret,
|
||||
.nav li.dropdown.open.active .caret,
|
||||
.nav li.dropdown.open a:hover .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100)}
|
||||
/* Bootstrap - Miscellaneous */
|
||||
.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05)}
|
||||
.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15)}
|
||||
.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}
|
||||
.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}
|
||||
|
|
|
|||
3
modules/admin/tpl/css/admin.min.css
vendored
3
modules/admin/tpl/css/admin.min.css
vendored
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,7 @@
|
|||
@charset "utf-8";
|
||||
.x,
|
||||
.x table,
|
||||
.x input,
|
||||
.x textarea,
|
||||
.x select,
|
||||
.x button{font-family:Tahoma,Geneva,sans-serif}
|
||||
|
|
@ -4,4 +4,4 @@
|
|||
.x input,
|
||||
.x textarea,
|
||||
.x select,
|
||||
.x button{font-family:나눔고딕,NanumGothic,"맑은 고딕","Malgun Gothic",AppleGothic,돋움,Dotum,굴림,Gulim,sans-serif}
|
||||
.x button{font-family:나눔고딕,NanumGothic,"맑은 고딕","Malgun Gothic",돋움,Dotum,sans-serif}
|
||||
|
|
|
|||
|
|
@ -101,4 +101,5 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<include target="./_spShortcut.html" />
|
||||
<include target="./_spFooter.html" />
|
||||
|
|
|
|||
|
|
@ -154,14 +154,13 @@ jQuery(function($){
|
|||
$.fn.xeMenu = function(){
|
||||
this
|
||||
.attr('role', 'navigation') // WAI-ARIA role
|
||||
.find('>.nav>li')
|
||||
.find('>.nav-gnb>li')
|
||||
.attr('role', 'menuitem') // WAI-ARIA role
|
||||
.find('>ul').css('height','0').end()
|
||||
.filter(':has(>ul)')
|
||||
.attr('aria-haspopup', 'true') // WAI-ARIA
|
||||
.end()
|
||||
.end()
|
||||
.find('>.nav')
|
||||
.find('>.nav-gnb')
|
||||
.mouseover(function(){
|
||||
$(this)
|
||||
.parent('.gnb').addClass('active').end()
|
||||
|
|
@ -185,28 +184,6 @@ jQuery(function($){
|
|||
$(this).mouseover();
|
||||
}
|
||||
});
|
||||
this
|
||||
.find('>.bmk')
|
||||
.removeClass('active')
|
||||
.mouseover(function(){
|
||||
$(this).addClass('active')
|
||||
})
|
||||
.mouseleave(function(){
|
||||
$(this).removeClass('active')
|
||||
})
|
||||
.focusout(function(){
|
||||
var $this = $(this);
|
||||
setTimeout(function(){
|
||||
if(!$this.find(':focus').length) {
|
||||
$this.mouseleave();
|
||||
}
|
||||
}, 1);
|
||||
})
|
||||
.delegate('a', {
|
||||
focus : function(){
|
||||
$(this).mouseover();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$('div.gnb').xeMenu();
|
||||
|
|
@ -576,6 +553,202 @@ $('.modulefinder').xeModuleFinder();
|
|||
|
||||
});
|
||||
|
||||
// Module Search : A New Version Of Module Finder
|
||||
jQuery(function($){
|
||||
|
||||
_xeModuleSearch = function(){
|
||||
var t = this;
|
||||
var $t = $(this);
|
||||
|
||||
var $moduleSearchWindow = $t.find(".moduleSearchWindow");
|
||||
|
||||
var $siteListDiv = $moduleSearchWindow.find('.siteList');
|
||||
var $moduleTypeListDiv = $moduleSearchWindow.find('.moduleTypeList');
|
||||
var $moduleInstanceListDiv = $moduleSearchWindow.find('.moduleInstanceList');
|
||||
|
||||
var $siteList = $siteListDiv.find('UL');
|
||||
var $moduleTypeList = $moduleTypeListDiv.find('UL');
|
||||
var $moduleInstanceList = $moduleInstanceListDiv.find('SELECT');
|
||||
|
||||
var $siteListSearchInput = $moduleSearchWindow.find('INPUT.siteListSearchInput');
|
||||
var aSiteListData;
|
||||
|
||||
var MAX_LIST_HEIGHT = 280;
|
||||
|
||||
function setListSize($UL, nHeight){
|
||||
var nWidth, $div;
|
||||
$UL.find('li div').width('');
|
||||
$UL.css('height', '');
|
||||
$UL.css('overflow-y', '');
|
||||
if($UL.height() > nHeight){
|
||||
$div = $UL.find('li div');
|
||||
$div.width($div.width()-20+'px');
|
||||
$UL.css('height', nHeight+'px');
|
||||
$UL.css('overflow-y', 'auto');
|
||||
}
|
||||
}
|
||||
|
||||
function setSiteList(sFilter){
|
||||
var sDomain;
|
||||
var rxFilter = new RegExp(sFilter, "ig");
|
||||
var list = aSiteListData;
|
||||
|
||||
$siteList.empty();
|
||||
|
||||
for(i=0,c=list.length; i < c; i++) {
|
||||
sDomain = list[i].domain;
|
||||
if(sFilter){
|
||||
if(!sDomain.match(rxFilter)) continue;
|
||||
sDomain = sDomain.replace(rxFilter, function(sKeyword){
|
||||
return '<span class="highlight">'+sKeyword+'</span>';
|
||||
});
|
||||
}
|
||||
|
||||
$li = $('<li />').appendTo($siteList);
|
||||
$('<a>').attr('href', '#').html(
|
||||
'<div>' + sDomain + '</div>' +
|
||||
'<span class="icon-circle-arrow-right" style="display:inline-block;float:right;width:16px;height:16px;"></span>'
|
||||
).data('site_srl', list[i].site_srl).appendTo($li);
|
||||
}
|
||||
|
||||
setListSize($siteList, MAX_LIST_HEIGHT - $siteListSearchInput.parent("DIV").height());
|
||||
}
|
||||
|
||||
$siteListSearchInput.keyup(function(){
|
||||
setSiteList($siteListSearchInput.val());
|
||||
});
|
||||
|
||||
if(typeof console == 'undefined'){
|
||||
console={log:function(){}};
|
||||
}
|
||||
|
||||
$t
|
||||
.not('.xe-module-search')
|
||||
.addClass('xe-module-search')
|
||||
.find('a.tgAnchor.moduleSearch')
|
||||
.bind('before-open.tc', function(){
|
||||
var $this;
|
||||
|
||||
$this = $(this);
|
||||
|
||||
function on_complete(data) {
|
||||
var $li, list = data.site_list, i, c;
|
||||
|
||||
if(data.error || !$.isArray(list)) {
|
||||
$this.trigger('close.tc');
|
||||
return;
|
||||
}
|
||||
|
||||
aSiteListData = list;
|
||||
|
||||
setSiteList($siteListSearchInput.val());
|
||||
|
||||
$siteListSearchInput.focus();
|
||||
};
|
||||
|
||||
$siteList.empty();
|
||||
$moduleInstanceList.empty();
|
||||
$moduleTypeListDiv.hide();
|
||||
$moduleInstanceListDiv.hide();
|
||||
$.exec_json('admin.getSiteAllList', {domain:""}, on_complete);
|
||||
})
|
||||
.end()
|
||||
.find('.tgContent .siteListUL')
|
||||
.delegate('a','click',function(oEvent){
|
||||
var $this, $finder;
|
||||
|
||||
$this = $(this);
|
||||
$finder = $this.closest('.modulefinder');
|
||||
|
||||
function on_complete(data) {
|
||||
|
||||
var list = data.module_list, x;
|
||||
|
||||
if(data.error || !list) return;
|
||||
|
||||
for(x in list) {
|
||||
if(!list.hasOwnProperty(x)) continue;
|
||||
$li = $('<li />').appendTo($moduleTypeList);
|
||||
$('<a>').attr('href', '#').html(
|
||||
'<div>'+list[x].title+'</div>' +
|
||||
'<span class="icon-circle-arrow-right" style="display:inline-block;float:right;width:16px;height:16px;"></span>'
|
||||
).data('moduleInstanceList', list[x].list).appendTo($li);
|
||||
//$('<option />').attr('value', x).text(list[x].title).appendTo($mod_select);
|
||||
}
|
||||
|
||||
$moduleSearchWindow.find('.moduleTypeList').show();
|
||||
setListSize($moduleTypeList, MAX_LIST_HEIGHT);
|
||||
|
||||
$siteList.find('li').removeClass('on');
|
||||
$this.parent('li').addClass('on');
|
||||
};
|
||||
|
||||
//$finder.find('a.tgAnchor.findsite').trigger('close.tc');
|
||||
$moduleTypeList.empty();
|
||||
$moduleInstanceListDiv.hide();
|
||||
|
||||
$.exec_json('module.procModuleAdminGetList', {site_srl:$this.data('site_srl')}, on_complete);
|
||||
|
||||
oEvent.preventDefault();
|
||||
})
|
||||
.end()
|
||||
//.find('.moduleList,.moduleIdList').hide().end()
|
||||
.find('.moduleTypeListUL')
|
||||
.delegate('a', 'click', function(oEvent){
|
||||
|
||||
var $this, $mid_select, val, list;
|
||||
|
||||
$this = $(this);
|
||||
list = $this.data('moduleInstanceList');
|
||||
if(!list) return;
|
||||
|
||||
t.sSelectedModuleType = $this.text();
|
||||
$moduleInstanceList.empty();
|
||||
|
||||
for(var x in list) {
|
||||
if(!list.hasOwnProperty(x)) continue;
|
||||
|
||||
$li = $('<option />').html(list[x].browser_title).appendTo($moduleInstanceList).val(list[x].module_srl).data('mid', list[x].module_srl)
|
||||
.data('module_srl', list[x].module_srl).data('layout_srl', list[x].layout_srl).data('browser_title', list[x].browser_title);
|
||||
}
|
||||
|
||||
$moduleInstanceListDiv.show();
|
||||
setListSize($moduleInstanceList, MAX_LIST_HEIGHT);
|
||||
|
||||
$moduleTypeList.find('li').removeClass('on');
|
||||
$this.parent('li').addClass('on');
|
||||
|
||||
oEvent.preventDefault();
|
||||
})
|
||||
.end()
|
||||
.find('.moduleSearch_ok').click(function(oEvent){
|
||||
var aSelected = [];
|
||||
$t.find('.moduleInstanceListSelect option:selected').each(function(){
|
||||
aSelected.push({
|
||||
'type' : t.sSelectedModuleType,
|
||||
'module_srl' : $(this).data('module_srl'),
|
||||
'layout_srl' : $(this).data('layout_srl'),
|
||||
'browser_title' : $(this).data('browser_title')
|
||||
});
|
||||
});
|
||||
|
||||
$t.trigger('moduleSelect', [aSelected]);
|
||||
$('.tgAnchor.moduleSearch').trigger('close.tc');
|
||||
|
||||
oEvent.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
$.fn.xeModuleSearch = function(){
|
||||
$(this).each(_xeModuleSearch);
|
||||
};
|
||||
|
||||
$('.moduleSearch').xeModuleSearch();
|
||||
});
|
||||
|
||||
// Sortable table
|
||||
jQuery(function($){
|
||||
|
||||
|
|
@ -769,10 +942,10 @@ $('.multiLangEdit')
|
|||
function on_complete(data, idx){
|
||||
var results = data.results, $btn, i, c;
|
||||
|
||||
if(data.error || !results || (r_idx != idx+1)) return;
|
||||
|
||||
$this.removeClass('loading');
|
||||
|
||||
if(data.error || !results || results.length === 0 || (r_idx != idx+1)) return;
|
||||
|
||||
$ul.empty();
|
||||
for(i=0,c=results.length; i < c; i++) {
|
||||
$btn = $('<button type="button" class="_btnLang" />').data('langkey', results[i].name).text(results[i].value);
|
||||
|
|
@ -799,6 +972,8 @@ $('.multiLangEdit')
|
|||
$active = $ul.find('button.active');
|
||||
|
||||
if(key == ENTER) {
|
||||
if($active.length === 0) return true;
|
||||
|
||||
$active.click();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -904,8 +1079,17 @@ $('.multiLangEdit')
|
|||
var $li = $('<li />').appendTo($langlist);
|
||||
|
||||
var anchor_id = $layer.data('layer_index');
|
||||
|
||||
var lang_text = this[xe.current_lang];
|
||||
if(!lang_text) {
|
||||
for(lang_code in this) {
|
||||
lang_text = this[lang_code];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$('<a href="#langInput_'+anchor_id+'" class="langItem" />')
|
||||
.text(this[xe.current_lang])
|
||||
.text(lang_text)
|
||||
.data('multilang-name', key)
|
||||
.appendTo($li);
|
||||
});
|
||||
|
|
@ -1204,17 +1388,11 @@ function completeInstallModule(ret_obj) {
|
|||
|
||||
jQuery(function($){
|
||||
$('body').ajaxComplete(function(){ hideWaitingFogLayer() });
|
||||
});
|
||||
|
||||
// admin single column layout
|
||||
jQuery(function($){
|
||||
if($('.x>.body>.lnb').length == 0){ // When it have no lnb
|
||||
$('.x>.body>.content').addClass('single'); // Add class single
|
||||
if($('.x>.body .lnb').length == 0){ // When it have no lnb
|
||||
$('.x>.body').addClass('single'); // Add class single
|
||||
}
|
||||
});
|
||||
|
||||
// Details toggle in admin table
|
||||
jQuery(function($){
|
||||
var viewBtn = $('.x .dsTg span.side>button.text');
|
||||
var tdTitle = $('.x .dsTg td.title');
|
||||
tdTitle.each(function(){
|
||||
|
|
@ -1230,10 +1408,7 @@ jQuery(function($){
|
|||
viewBtn.toggleClass('details');
|
||||
details.slideToggle(200);
|
||||
});
|
||||
});
|
||||
|
||||
// Toggle Content
|
||||
jQuery(function($){
|
||||
var $h2h3 = $('.x .content .h2, .x .content .h3').not('.portlet .h2, .modal .h2');
|
||||
$h2h3.each(function(){
|
||||
var $sTog = $('<button type="button" class="sTog" title="Open/Close"><i class="icon-chevron-up"></i></button>');
|
||||
|
|
@ -1250,4 +1425,4 @@ jQuery(function($){
|
|||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
47
modules/admin/tpl/js/admin.min.js
vendored
47
modules/admin/tpl/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
2
modules/admin/tpl/js/menu_setup.min.js
vendored
2
modules/admin/tpl/js/menu_setup.min.js
vendored
|
|
@ -2,7 +2,7 @@ jQuery(function(b){function k(a){if(moduleList=a.menuList){var c=b("#menuNameLis
|
|||
b(this).parent().prevAll("._parent_key").val();a.find("input[name=menu_item_srl]").val(i);a.submit()});b("a._child_delete").click(function(){var i=b(this).parents("li").find("._item_key").val();a.find("input[name=menu_item_srl]").val(i);a.submit()})});
|
||||
jQuery(function(b){function k(a,b){for(var c=0,e=0;a&&a!=b;)c+=a.offsetTop,e+=a.offsetLeft,a=a.offsetParent;return{top:c,left:e}}b("form.siteMap").delegate("li:not(.placeholder)","dropped.st",function(){var a=b(this),d;d=a.find(">input._parent_key");a.parent("ul").parent("li").length?d.val(a.parent("ul").parent("li").find(">input._item_key").val()):d.val("0")});var d=!1,h=b('<li class="placeholder">');b("div.adminMenu").delegate("li:not(.placeholder,.parent)",{"mousedown.st":function(a){var i,c,e,
|
||||
f,m,n,j,l,g;if(!(b(a.target).is("a,input,label,textarea")||1!=a.which)){d=!0;c=b(this);n=c.height();m=c.width();e=c.parentsUntil(".siteMap").filter("ul");f=e.eq(-1);f.css("position","relative");i=a.pageY;j=k(this,f.get(0));$clone=c.clone(!0).attr("target",!0);for(a=e.length-1;a;a--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();l=[];f.find("li").each(function(){if(c[0]===this||c.has(this).length)return!0;var a=k(this,f.get(0));l.push({top:a.top,bottom:a.top+32,$item:b(this)})});$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",
|
||||
opacity:0.6,width:m,height:n,left:j.left,top:j.top,zIndex:100}).appendTo(f.eq(0));h.css({position:"absolute",opacity:0.6,width:m,height:"10px",left:j.left,top:j.top,zIndex:99}).appendTo(f.eq(0));c.css("opacity",0.6);b(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,d;g=null;a=j.top-(i-a.pageY);for(b=0,c=l.length;b<c;b++)d=l[b],d.top>a||d.bottom<a||(g={element:d.$item},d.$item.hasClass("parent")?(g.state="prepend",h.css("top",d.bottom-5)):d.top>a-12?(g.state="before",
|
||||
opacity:0.6,width:m,height:n,left:j.left,top:j.top,zIndex:100}).appendTo(f.eq(0));h.css({position:"absolute",opacity:0.6,width:m,height:"10px",left:j.left,top:j.top,zIndex:99}).appendTo(f.eq(0));c.css("opacity",0.6);b(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,d;g=null;a=j.top-(i-a.pageY);b=0;for(c=l.length;b<c;b++)d=l[b],d.top>a||d.bottom<a||(g={element:d.$item},d.$item.hasClass("parent")?(g.state="prepend",h.css("top",d.bottom-5)):d.top>a-12?(g.state="before",
|
||||
h.css("top",d.top-5)):(g.state="after",h.css("top",d.bottom-5)));$clone.css({top:a})}).bind("mouseup.st",function(){var a,e;d=!1;b(document).unbind("mousemove.st mouseup.st");c.css("opacity","");$clone.remove();h.remove();e=b("<li />").height(c.height());if(g){a=b(g.element);c.before(e);if("prepend"==g.state)a.find(">ul").length||a.find(">.side").after("<ul>"),a.find(">ul").prepend(c.hide());else a[g.state](c.hide());c.slideDown(100,function(){c.removeClass("active")});e.slideUp(100,function(){var a=
|
||||
e.parent();e.remove();a.children("li").length||a.remove()});c.trigger("dropped.st")}});return!1}},"mouseover.st":function(){d||b(this).addClass("active");return!1},"mouseout.st":function(){d||b(this).removeClass("active");return!1}}).find("li").prepend('<button type="button" class="moveTo">Move to</button>').filter(".parent").find(">button.moveTo").css({visibility:"hidden","margin-left":"-12px"}).end().end().end();b('<div id="dropzone-marker" />').css({display:"none",position:"absolute",backgroundColor:"#000",
|
||||
opacity:0.7}).appendTo("body")});
|
||||
|
|
|
|||
2
modules/admin/tpl/js/sitemap.min.js
vendored
2
modules/admin/tpl/js/sitemap.min.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
jQuery(function(c){function o(a,c){for(var b=0,g=0;a&&a!=c;)b+=a.offsetTop,g+=a.offsetLeft,a=a.offsetParent;return{top:b,left:g}}var l=!1,k=c('<li class="placeholder">');c("form.siteMap").delegate("li:not(.placeholder)",{"mousedown.st":function(a){var d,b,g,h,n,p,i,m,j;if(!(c(a.target).is("a,input,label,textarea")||1!=a.which)){l=!0;b=c(this);p=b.height();n=b.width();g=b.parentsUntil(".siteMap").filter("ul");h=g.eq(-1);h.css("position","relative");d=a.pageY;i=o(this,h.get(0));$clone=b.clone(!0).attr("target",
|
||||
!0);for(a=g.length-1;a;a--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();m=[];h.find("li").each(function(){if(b[0]===this||b.has(this).length)return!0;var a=o(this,h.get(0));m.push({top:a.top,bottom:a.top+32,item:this})});$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:0.6,width:n,height:p,left:i.left,top:i.top,zIndex:100}).appendTo(h.eq(0));k.css({position:"absolute",opacity:0.6,width:n,height:"5px",left:i.left,top:i.top,zIndex:99}).appendTo(h.eq(0));
|
||||
b.css("opacity",0.6);c(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f;j=null;a=i.top-(d-a.pageY);for(b=0,c=m.length;b<c;b++)if(f=a,e=m[b],0==b&&f<e.top&&(f=e.top),b==c-1&&f>e.bottom&&(f=e.bottom),e.top<=f&&e.bottom>=f){b=e.item;3>=Math.abs(e.top-f)?(k.css({top:e.top-3,height:"5px"}),f="before"):3>=Math.abs(e.bottom-f)?(k.css({top:e.bottom-3,height:"5px"}),f="after"):(k.css({top:e.top+3,height:"27px"}),f="prepend");j={element:b,state:f};break}$clone.css({top:a})}).bind("mouseup.st",
|
||||
b.css("opacity",0.6);c(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f;j=null;a=i.top-(d-a.pageY);b=0;for(c=m.length;b<c;b++)if(f=a,e=m[b],0==b&&f<e.top&&(f=e.top),b==c-1&&f>e.bottom&&(f=e.bottom),e.top<=f&&e.bottom>=f){b=e.item;3>=Math.abs(e.top-f)?(k.css({top:e.top-3,height:"5px"}),f="before"):3>=Math.abs(e.bottom-f)?(k.css({top:e.bottom-3,height:"5px"}),f="after"):(k.css({top:e.top+3,height:"27px"}),f="prepend");j={element:b,state:f};break}$clone.css({top:a})}).bind("mouseup.st",
|
||||
function(){var a,d;l=!1;c(document).unbind("mousemove.st mouseup.st");b.css("opacity","");$clone.remove();k.remove();d=c("<li />").height(b.height());if(j){a=c(j.element);b.before(d);if("prepend"==j.state)a.find(">ul").length||a.find(">.side").after("<ul>"),a.find(">ul").prepend(b.hide());else a[j.state](b.hide());b.slideDown(100,function(){b.removeClass("active")});d.slideUp(100,function(){var a=d.parent();d.remove();a.children("li").length||a.remove()});b.trigger("dropped.st")}});return!1}},"mouseover.st":function(){l||
|
||||
c(this).addClass("active");return!1},"mouseout.st":function(){l||c(this).removeClass("active");return!1}}).find("li").prepend('<button type="button" class="moveTo">Move to</button>').append('<span class="vr"></span><span class="hr"></span>').find("input:text").focus(function(){var a=c(this),d=a.prev("label"),b=a.parent();a.width(b.width()-(parseInt(b.css("text-indent"))||0)-a.next(".side").width()-60).css("opacity","");d.hide()}).blur(function(){var a=c(this),d=a.prev("label"),b=a.val();a.width(0).css("opacity",
|
||||
0);d.removeClass("no-text").empty().text(b).show();b||d.addClass("no-text").text("---")}).each(function(a){var d=c(this),a="sitemap-id-"+a;d.attr("id",a).css({width:0,opacity:0,overflow:"hidden"}).before("<label />").prev("label").attr("for",a).text(d.val())}).end().end()});
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<!--#include("./_spHeader.html")-->
|
||||
<div class="content" id="content">
|
||||
<include target="./_spHeader.html" />
|
||||
<div class="content" id="content" tabindex="0">
|
||||
{$content}
|
||||
</div>
|
||||
<!--@if($parentSrl != 0)-->
|
||||
<!--#include("./_spLnb.content.html")-->
|
||||
<!--@end-->
|
||||
<!--#include("./_spFooter.html")-->
|
||||
<include target="./_spLnb.content.html" cond="$parentSrl != 0" />
|
||||
<include target="./_spShortcut.html" />
|
||||
<include target="./_spFooter.html" />
|
||||
|
|
|
|||
|
|
@ -323,6 +323,11 @@
|
|||
{
|
||||
$package->depends[$key]->need_update = true;
|
||||
$package->package_srl .= ",". $dep->package_srl;
|
||||
|
||||
if($dep->path === '.')
|
||||
{
|
||||
Context::set('contain_core', TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -338,6 +343,11 @@
|
|||
$package->need_update = version_compare($package->version, $installedPackage->current_version, ">");
|
||||
}
|
||||
Context::set("package", $package);
|
||||
|
||||
if($package->path === '.')
|
||||
{
|
||||
Context::set('contain_core', TRUE);
|
||||
}
|
||||
}
|
||||
if(!$_SESSION['ftp_password'])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -328,4 +328,7 @@
|
|||
<value xml:lang="en"><![CDATA[Cannot delete this package (no moduleUninstall() in the module class).]]></value>
|
||||
<value xml:lang="jp"><![CDATA[このパッケージは、削除をサポートしません(モジュールクラスにmoduleUninstall()がありません)。]]></value>
|
||||
</item>
|
||||
<item name="msg_update_core">
|
||||
<value xml:lang="ko"><![CDATA[<strong style="color:red">XE core가 업데이트 됩니다.</strong><br />core 업데이트 시 설치된 프로그램의 호환성을 반드시 점검하시기 바랍니다.]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
<load target="js/waiting.js" usecdn="true" />
|
||||
|
||||
<h2 class="h2">{$package->title} ver. {$package->version}</h2>
|
||||
<div cond="$contain_core" class="message info">
|
||||
<p>{$lang->msg_update_core}</p>
|
||||
</div>
|
||||
<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">
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
$document_srl = $obj->document_srl;
|
||||
if(!$document_srl) return new Object();
|
||||
|
||||
return $this->deleteComments($document_srl, true);
|
||||
return $this->deleteComments($document_srl, $obj);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -206,7 +206,11 @@
|
|||
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
|
||||
if(Mobile::isFromMobilePhone())
|
||||
{
|
||||
$obj->content = nl2br(htmlspecialchars($obj->content));
|
||||
if($obj->use_html != 'Y')
|
||||
{
|
||||
$obj->content = htmlspecialchars($obj->content);
|
||||
}
|
||||
$obj->content = nl2br($obj->content);
|
||||
}
|
||||
if(!$obj->regdate) $obj->regdate = date("YmdHis");
|
||||
// remove iframe and script if not a top administrator on the session.
|
||||
|
|
@ -545,16 +549,55 @@
|
|||
$oCommentModel = &getModel('comment');
|
||||
// check if comment already exists
|
||||
$comment = $oCommentModel->getComment($comment_srl);
|
||||
if($comment->comment_srl != $comment_srl) return new Object(-1, 'msg_invalid_request');
|
||||
if($comment->comment_srl != $comment_srl)
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
$document_srl = $comment->document_srl;
|
||||
// call a trigger (before)
|
||||
$output = ModuleHandler::triggerCall('comment.deleteComment', 'before', $comment);
|
||||
if(!$output->toBool()) return $output;
|
||||
// check if child comment exists on the comment
|
||||
$child_count = $oCommentModel->getChildCommentCount($comment_srl);
|
||||
if($child_count>0) return new Object(-1, 'fail_to_delete_have_children');
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
// check if permission is granted
|
||||
if(!$is_admin && !$comment->isGranted()) return new Object(-1, 'msg_not_permitted');
|
||||
if(!$is_admin && !$comment->isGranted())
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
// check if child comment exists on the comment
|
||||
$childs = $oCommentModel->getChildComments($comment_srl);
|
||||
if(count($childs) > 0)
|
||||
{
|
||||
$deleteAllComment = true;
|
||||
if (!$is_admin)
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
foreach($childs as $val)
|
||||
{
|
||||
if($val->member_srl != $logged_info->member_srl)
|
||||
{
|
||||
$deleteAllComment = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$deleteAllComment)
|
||||
{
|
||||
return new Object(-1, 'fail_to_delete_have_children');
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($childs as $val)
|
||||
{
|
||||
$output = $this->deleteComment($val->comment_srl, $is_admin, $isMoveToTrash);
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// begin transaction
|
||||
$oDB = &DB::getInstance();
|
||||
|
|
@ -623,12 +666,21 @@
|
|||
* @param int $document_srl
|
||||
* @return object
|
||||
*/
|
||||
function deleteComments($document_srl) {
|
||||
function deleteComments($document_srl, $obj = NULL) {
|
||||
// create the document model object
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oCommentModel = &getModel('comment');
|
||||
// check if permission is granted
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
// check if permission is granted
|
||||
if(is_object($obj))
|
||||
{
|
||||
$oDocument = new documentItem();
|
||||
$oDocument->setAttribute($obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
}
|
||||
if(!$oDocument->isExists() || !$oDocument->isGranted()) return new Object(-1, 'msg_not_permitted');
|
||||
// get a list of comments and then execute a trigger(way to reduce the processing cost for delete all)
|
||||
$args->document_srl = $document_srl;
|
||||
|
|
@ -742,6 +794,10 @@
|
|||
return new Object(-1, $failed_voted);
|
||||
}
|
||||
|
||||
// begin transaction
|
||||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// update the number of votes
|
||||
if($point < 0) {
|
||||
$args->blamed_count = $oComment->get('blamed_count') + $point;
|
||||
|
|
@ -753,6 +809,23 @@
|
|||
// leave logs
|
||||
$args->point = $point;
|
||||
$output = executeQuery('comment.insertCommentVotedLog', $args);
|
||||
|
||||
$obj->member_srl = $oComment->get('member_srl');
|
||||
$obj->module_srl = $oComment->get('module_srl');
|
||||
$obj->comment_srl = $oComment->get('comment');
|
||||
$obj->update_target = ($point < 0) ? 'blamed_count' : 'voted_count';
|
||||
$obj->point = $point;
|
||||
$obj->before_point = ($point < 0) ? $oComment->get('blamed_count') : $oComment->get('voted_count');
|
||||
$obj->after_point = ($point < 0) ? $args->blamed_count : $args->voted_count;
|
||||
$trigger_output = ModuleHandler::triggerCall('comment.updateVotedCount', 'after', $obj);
|
||||
if(!$trigger_output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $trigger_output;
|
||||
}
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
// leave into session information
|
||||
$_SESSION['voted_comment'][$comment_srl] = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
$url = getUrl('','module','admin','act','dispCommentAdminList','search_target','ipaddress','search_keyword',$oComment->getIpAddress());
|
||||
$oCommentController->addCommentPopupMenu($url,'cmd_search_by_ipaddress',$icon_path,'TraceByIpaddress');
|
||||
|
||||
$url = sprintf("var params = new Array(); params['ipaddress']='%s'; exec_xml('spamfilter', 'procSpamfilterAdminInsertDeniedIP', params, completeCallModuleAction)", $oComment->getIpAddress());
|
||||
$url = sprintf("var params = new Array(); params['ipaddress_list']='%s'; exec_xml('spamfilter', 'procSpamfilterAdminInsertDeniedIP', params, completeCallModuleAction)", $oComment->getIpAddress());
|
||||
$oCommentController->addCommentPopupMenu($url,'cmd_add_ip_to_spamfilter','','javascript');
|
||||
}
|
||||
}
|
||||
|
|
@ -107,6 +107,17 @@
|
|||
return (int)$output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of child comments
|
||||
* @param int $comment_srl
|
||||
* @return int
|
||||
*/
|
||||
function getChildComments($comment_srl) {
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = executeQueryArray('comment.getChildComments', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the comment
|
||||
* @param int $comment_srl
|
||||
|
|
|
|||
|
|
@ -251,9 +251,11 @@
|
|||
<item name="published_name_list" type="array">
|
||||
<item name="Y">
|
||||
<value xml:lang="en"><![CDATA[Published]]></value>
|
||||
<value xml:lang="ko"><![CDATA[공개 발행]]></value>
|
||||
</item>
|
||||
<item name="N">
|
||||
<value xml:lang="en"><![CDATA[Unpublished]]></value>
|
||||
<value xml:lang="ko"><![CDATA[발행 대기]]></value>
|
||||
</item>
|
||||
</item>
|
||||
<item name="comment_manager">
|
||||
|
|
@ -266,7 +268,7 @@
|
|||
<value xml:lang="ko"><![CDATA[선택한 댓글]]></value>
|
||||
<value xml:lang="en"><![CDATA[Selected Comment]]></value>
|
||||
<value xml:lang="jp"><![CDATA[選択したコメント]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[已選回覆]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[已選回覆]]></value>
|
||||
</item>
|
||||
<item name="cmd_comment_validation">
|
||||
<value xml:lang="en"><![CDATA[Use comment validation]]></value>
|
||||
|
|
@ -276,11 +278,22 @@
|
|||
</item>
|
||||
<item name="published">
|
||||
<value xml:lang="en"><![CDATA[Publish status]]></value>
|
||||
<value xml:lang="ko"><![CDATA[발행 상태]]></value>
|
||||
</item>
|
||||
<item name="cmd_publish">
|
||||
<value xml:lang="en"><![CDATA[Publish]]></value>
|
||||
<value xml:lang="ko"><![CDATA[발행]]></value>
|
||||
</item>
|
||||
<item name="cmd_unpublish">
|
||||
<value xml:lang="en"><![CDATA[Unpublish]]></value>
|
||||
<value xml:lang="ko"><![CDATA[발행 중지]]></value>
|
||||
</item>
|
||||
<item name="select_module">
|
||||
<value xml:lang="ko"><![CDATA[모듈 선택]]></value>
|
||||
<value xml:lang="en"><![CDATA[Select Module]]></value>
|
||||
</item>
|
||||
<item name="page">
|
||||
<value xml:lang="ko"><![CDATA[페이지]]></value>
|
||||
<value xml:lang="en"><![CDATA[Page]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
12
modules/comment/queries/getChildComments.xml
Normal file
12
modules/comment/queries/getChildComments.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getChildComments" action="select">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="comment_srl" />
|
||||
<column name="member_srl" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="parent_srl" var="comment_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -18,8 +18,8 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
| <a href="{getUrl('search_target','is_published','search_keyword', 'Y')}" <!--@if($search_target == 'is_published' && $search_keyword == 'Y')-->class="active"<!--@end-->>{$lang->published_name_list['Y']}</a>
|
||||
|
||||
<block cond="$modules_list">
|
||||
| <label for="comment_modules" <!--@if($search_target == 'module')-->class="active"<!--@end-->>Select Module:
|
||||
<select id="comment_modules" name="comment_modules" onchange="location.href='{getUrl('search_target','module','search_keyword','')}&search_keyword='+this.value">
|
||||
| <label for="comment_modules" <!--@if($search_target == 'module')-->class="active"<!--@end-->>{$lang->select_module}:
|
||||
<select id="comment_modules" name="comment_modules" onchange="location.href='{getUrl('search_target','module','search_keyword','')}&search_keyword='+this.value">
|
||||
<option></option>
|
||||
<!--@foreach($modules_list as $key => $node)-->
|
||||
<option value="{$key}"<!--@if($key==$search_keyword)-->selected<!--@end-->>{$node}</option>
|
||||
|
|
@ -136,14 +136,14 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
</form>
|
||||
</div>
|
||||
<div class="search">
|
||||
<form action="" class="pagination">
|
||||
<form action="./" class="pagination">
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
|
||||
<input cond="$search_target" type="hidden" name="search_target" value="{$search_target}" />
|
||||
|
||||
<a href="{getUrl('page', '')}" class="direction">« FIRST</a>
|
||||
<a href="{getUrl('page', '')}" class="direction">« {$lang->first_page}</a>
|
||||
<block cond="$page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page && $page_navigation->page_count != $page_navigation->total_page">
|
||||
{@$isGoTo = true}
|
||||
<a href="{getUrl('page', '')}">1</a>
|
||||
|
|
@ -159,7 +159,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
|
||||
</block>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}" class="direction">LAST »</a>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}" class="direction">{$lang->last_page} »</a>
|
||||
<span cond="$isGoTo" id="goTo" class="tgContent">
|
||||
<input name="page" title="{$lang->cmd_go_to_page}" />
|
||||
<button type="submit">Go</button>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<!-- 목록 -->
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<caption>Total {number_format($total_count)}, Page {number_format($page)}/{number_format($total_page)}</caption>
|
||||
<caption>{$lang->all} {number_format($total_count)}, {$lang->page} {number_format($page)}/{number_format($total_page)}</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><input type="checkbox" onclick="XE.checkboxToggleAll(); return false;" /></th>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<!-- 페이지 네비게이션 -->
|
||||
<div class="pagination">
|
||||
<a href="{getUrl('page','','module_srl','')}" class="direction">‹ {$lang->first_page}</a>
|
||||
<a href="{getUrl('page','','module_srl','')}" class="direction">« {$lang->first_page}</a>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<!--@if($page == $page_no)-->
|
||||
<strong>{$page_no}</strong>
|
||||
|
|
@ -57,5 +57,5 @@
|
|||
<a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} ›</a>
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} »</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -19,11 +19,13 @@
|
|||
**/
|
||||
function procCommunicationAdminInsertConfig() {
|
||||
// get the default information
|
||||
$args = Context::gets('skin','colorset','editor_skin','editor_colorset');
|
||||
$args = Context::gets('skin','colorset','editor_skin','editor_colorset', 'mskin');
|
||||
|
||||
if(!$args->skin) $args->skin = 'default';
|
||||
if(!$args->colorset) $args->colorset = 'white';
|
||||
if(!$args->editor_skin) $args->editor_skin = 'default';
|
||||
if(!$args->mskin) $args->mskin = 'default';
|
||||
|
||||
if(!$args->skin) $args->skin = "default";
|
||||
if(!$args->colorset) $args->colorset = "white";
|
||||
if(!$args->editor_skin) $args->editor_skin = "default";
|
||||
// create the module module Controller object
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('communication',$args);
|
||||
|
|
|
|||
|
|
@ -28,10 +28,14 @@
|
|||
Context::set('editor_skin_list', $oEditorModel->getEditorSkinList() );
|
||||
// get a list of communication skins
|
||||
Context::set('communication_skin_list', $oModuleModel->getSkins($this->module_path) );
|
||||
// get a list of communication skins
|
||||
Context::set('communication_mobile_skin_list', $oModuleModel->getSkins($this->module_path, 'm.skins') );
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('communication_config..');
|
||||
$security->encodeHTML('editor_skin_list..');
|
||||
$security->encodeHTML('communication_skin_list..title');
|
||||
$security->encodeHTML('communication_skin_list..title');
|
||||
$security->encodeHTML('communication_mobile_skin_list..title');
|
||||
|
||||
// specify a template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
|
|
|
|||
|
|
@ -23,6 +23,19 @@
|
|||
**/
|
||||
function checkUpdate() {
|
||||
if(!is_dir("./files/member_extra_info/new_message_flags")) return true;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('message');
|
||||
|
||||
if($config->skin)
|
||||
{
|
||||
$config_parse = explode('.', $config->skin);
|
||||
if (count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/communication/', $config_parse[0]);
|
||||
if(is_dir($template_path)) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -33,6 +46,24 @@
|
|||
function moduleUpdate() {
|
||||
if(!is_dir("./files/member_extra_info/new_message_flags"))
|
||||
FileHandler::makeDir('./files/member_extra_info/new_message_flags');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('message');
|
||||
|
||||
if($config->skin)
|
||||
{
|
||||
$config_parse = explode('.', $config->skin);
|
||||
if (count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/communication/', $config_parse[0]);
|
||||
if(is_dir($template_path))
|
||||
{
|
||||
$config->skin = implode('|@|', $config_parse);
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->updateModuleConfig('communication', $config);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
68
modules/communication/communication.mobile.php
Normal file
68
modules/communication/communication.mobile.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
require_once(_XE_PATH_.'modules/communication/communication.view.php');
|
||||
class communicationMobile extends communicationView {
|
||||
function init() {
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
|
||||
$this->communication_config = $oCommunicationModel->getConfig();
|
||||
$skin = $this->communication_config->mskin;
|
||||
|
||||
Context::set('communication_config', $this->communication_config);
|
||||
|
||||
$tpl_path = sprintf('%sm.skins/%s', $this->module_path, $skin);
|
||||
$this->setTemplatePath($tpl_path);
|
||||
}
|
||||
|
||||
function dispCommunicationMessages()
|
||||
{
|
||||
// Error appears if not logged-in
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
return $this->stop('msg_not_logged');
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!array_key_exists('dispCommunicationMessages', $logged_info->menu_list))
|
||||
{
|
||||
return $this->stop('msg_invalid_request');
|
||||
}
|
||||
|
||||
// Set the variables
|
||||
$message_srl = Context::get('message_srl');
|
||||
$message_type = 'R';
|
||||
Context::set('message_type', $message_type);
|
||||
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
// extract contents if message_srl exists
|
||||
if($message_srl)
|
||||
{
|
||||
$templateFile = 'read_message';
|
||||
$columnList = array('message_srl', 'sender_srl', 'receiver_srl', 'message_type', 'title', 'content', 'readed', 'regdate');
|
||||
$message = $oCommunicationModel->getSelectedMessage($message_srl, $columnList);
|
||||
if($message->message_srl == $message_srl && ($message->receiver_srl == $logged_info->member_srl) )
|
||||
{
|
||||
stripEmbedTagForAdmin($message->content, $message->sender_srl);
|
||||
Context::set('message', $message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$templateFile = 'messages';
|
||||
}
|
||||
// Extract a list
|
||||
$columnList = array('message_srl', 'readed', 'title', 'member.member_srl', 'member.nick_name', 'message.regdate', 'readed_date');
|
||||
$output = $oCommunicationModel->getMessages($message_type, $columnList);
|
||||
|
||||
// set a template file
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('message_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('message_list..nick_name');
|
||||
|
||||
$this->setTemplateFile($templateFile);
|
||||
}
|
||||
}
|
||||
|
|
@ -25,6 +25,7 @@
|
|||
if(!$communication_config->skin) $communication_config->skin = 'default';
|
||||
if(!$communication_config->colorset) $communication_config->colorset = 'white';
|
||||
if(!$communication_config->editor_skin) $communication_config->editor_skin = 'default';
|
||||
if(!$communication_config->mskin) $communication_config->mskin = 'default';
|
||||
|
||||
return $communication_config;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
Context::set('communication_config', $this->communication_config);
|
||||
|
||||
$config_parse = explode('.', $skin);
|
||||
$config_parse = explode('|@|', $skin);
|
||||
if (count($config_parse) > 1){
|
||||
$tpl_path = sprintf('./themes/%s/modules/communication/', $config_parse[0]);
|
||||
}else{
|
||||
|
|
|
|||
127
modules/communication/m.skins/default/css/mcommunication.css
Normal file
127
modules/communication/m.skins/default/css/mcommunication.css
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
@charset "utf-8";
|
||||
/* Mobile XE (/modules/board/m.skins/default) */
|
||||
body{margin:0;background:#fff;color:#000;word-wrap:break-word}
|
||||
body,input,textarea,select,button,table{font-family:Tahoma,Geneva,sans-serif}
|
||||
img{border:0}
|
||||
em{font-style:normal}
|
||||
form{margin:0;padding:0}
|
||||
fieldset{margin:0;padding:0;border:0}
|
||||
textarea{resize:vertical}
|
||||
input[type=checkbox],
|
||||
input[type=radio]{width:13px;height:13px;margin:0;padding:0}
|
||||
/* Common */
|
||||
.fl{float:left}
|
||||
.fr{float:right}
|
||||
/* Background */
|
||||
.rp li li,
|
||||
.rp .answer,
|
||||
.rp .btn,
|
||||
/* Body */
|
||||
.bd{background:#f8f8f8;padding:1px 0}
|
||||
.co{margin:10px;line-height:1.4;font-size:14px;color:#333}
|
||||
.co:after{content:"";display:block;clear:both;zoom:1}
|
||||
/* Hx */
|
||||
.hx{position:relative;border-bottom:1px solid #ccc8be;padding:8px 10px;margin:0}
|
||||
.hx:after{content:"";margin:0 -10px;position:relative;top:10px;display:block;clear:both;height:1px;background:#fff}
|
||||
.hx.h2{background:#e5e5e5;text-shadow:1px 1px 0 #fff;padding-right:40px}
|
||||
.hx.h2 em{font-size:12px;color:#6352d2}
|
||||
.hx.h3{background:#868686;color:#fff}
|
||||
.hx.h3 em{font-size:12px}
|
||||
.hx h2, .hx h3{margin:0 10px 0 0;display:inline}
|
||||
.hx h2{font-size:16px;line-height:1.4}
|
||||
.hx h3{font-size:14px}
|
||||
.hx a{color:#000}
|
||||
.hx .ex{font-size:12px}
|
||||
.hx .tg{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;padding:0;overflow:visible;border:0;cursor:pointer;opacity:0;background:none}
|
||||
.hx .ca{font-size:12px;text-decoration:underline;color:#333}
|
||||
.hx .ca:after{content:"";display:inline-block;position:relative;left:4px;width:0;height:0;border:4px solid;border-color:transparent;border-left-color:#8d7de1;margin:0 -8px 0 0}
|
||||
.hx .write{position:absolute;top:8px;right:10px;background-position:0 0;display:inline-block;width:28px;height:27px;font-size:0;overflow:hidden;text-indent:-28px}
|
||||
/* Global Navigation */
|
||||
.gn{margin:0;padding:0;list-style:none;background:#d3d1cc;text-shadow:1px 1px 0 #fff}
|
||||
.gn li{background:#c3c3c3;border:1px solid #a3a09a;border-left:0;border-right:0;margin:0 0 -1px 0}
|
||||
.gn li li{background:#f8f8f8;border:1px solid #c9c9c9;border-left:0;border-right:0}
|
||||
.gn li li li{background:#e8e8e8}
|
||||
.gn ul{margin:0 0 -1px 0;padding:0;list-style:none}
|
||||
.gn a{position:relative;text-decoration:none;display:block;padding:10px;font-size:16px}
|
||||
.gn li a{color:#333}
|
||||
.gn li a:after{position:absolute;top:7px;right:10px;content:"›";color:#888;font-size:18px;font-weight:bold;font-family:Verdana, Geneva, sans-serif}
|
||||
.gn li li a:before{content:"";display:inline-block;width:6px;height:6px;border:1px dotted #666;border-top:0;border-right:0;margin:0 4px 0 0;vertical-align:top}
|
||||
.gn li li a{padding-left:15px}
|
||||
.gn li li li a{padding-left:30px}
|
||||
.gn li li li li a{padding-left:45px}
|
||||
.gn li li li li li a{padding-left:60px}
|
||||
.gn em{color:#6352d2;font-size:12px}
|
||||
/* List */
|
||||
.lt{margin:0;padding:0;list-style:none;background:#f8f8f8;font-size:14px}
|
||||
.lt li{border-bottom:1px solid #ccc8be;overflow:hidden}
|
||||
.lt .read{background:url(../img/read.png) no-repeat 10px center;padding:5px 5px 5px 52px}
|
||||
.lt .unread{background:url(../img/unread.png) no-repeat 10px center;padding:5px 5px 5px 52px}
|
||||
.lt a{float:left;display:inline-block;text-decoration:none;color:#000;padding:5px}
|
||||
.lt .memberInfo{float:right;padding:5px 5px 5px 34px;background:url(../img/member.png) no-repeat 10px center;}
|
||||
.lt .notice{display:inline-block;background:#a06acd;font-weight:bold;color:#fff;font-size:12px;padding:1px;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px}
|
||||
.lt .title{display:block;margin:0 0 5px 0}
|
||||
.lt .title strong{font-size:14px;font-weight:bold}
|
||||
.lt .title em{font-size:12px;color:#333;color:#6352d2}
|
||||
.lt .auth{display:block;font-size:12px}
|
||||
.lt .auth .time{padding:0 5px;border-left:1px solid #bfbfbf}
|
||||
/* Toggle Open */
|
||||
.tgo{display:none;background:#f8f8f8;color:#333;margin:0;padding:0;list-style:none;font-size:14px;color:#333}
|
||||
.tgo.open{display:block}
|
||||
.file{margin:0;padding:0;list-style:none}
|
||||
.file li{border-top:1px solid #c9c9c9;border-bottom:1px solid #c9c9c9;margin:0 0 -1px 0}
|
||||
.file a{text-decoration:none;display:block;padding:10px 0 10px 10px;color:#333}
|
||||
.file .size{font-size:12px;border-left:1px solid #bfbfbf;margin:0 5px;padding:0 10px;color:#666}
|
||||
.rp ul{margin:10px 0 -11px -10px;padding:0;list-style:none}
|
||||
.rp li{border-top:1px solid #c9c9c9;border-bottom:1px solid #c9c9c9;padding:10px 0 10px 10px;margin:0 0 -1px 0}
|
||||
.rp .xe_content, .rp p{margin:0 0 5px 0}
|
||||
.rp ul ul{margin-left:-25px}
|
||||
.rp ul ul ul{margin-left:-40px}
|
||||
.rp ul ul ul ul{margin-left:-55px}
|
||||
.rp ul ul ul ul ul{margin-left:-70px}
|
||||
.rp ul ul ul ul ul ul{margin-left:-85px}
|
||||
.rp li li,
|
||||
.rp .answer{padding-left:25px;background-position:10px -145px}
|
||||
.rp li li li{padding-left:40px;background-position:25px -145px}
|
||||
.rp li li li li{padding-left:55px;background-position:40px -145px}
|
||||
.rp li li li li li{padding-left:70px;background-position:55px -145px}
|
||||
.rp li li li li li li{padding-left:85px;background-position:70px -145px}
|
||||
.rp .btn{display:inline-block;width:15px;height:15px;overflow:hidden;vertical-align:middle;text-indent:15px}
|
||||
.rp .btn.ed{background-position:0 -32px}
|
||||
.rp .btn.de{background-position:-15px -32px}
|
||||
.rp .btn.re{background-position:-30px -32px}
|
||||
.rp .auth{font-size:12px}
|
||||
.rp .auth .time{padding:0 5px;border-left:1px solid #bfbfbf}
|
||||
/* Form Field */
|
||||
.origin{padding:10px 0;margin:0 10px;font-size:14px}
|
||||
.ff{margin:0;padding:10px 0}
|
||||
.ff ul{margin:0 10px 10px 10px;padding:10px 0 0 0;list-style:none}
|
||||
.ff li{margin:0 0 5px 0;padding:0}
|
||||
.ff label{margin-right:10px}
|
||||
.ff label+input[type=text],
|
||||
.ff label+input[type=password],
|
||||
.ff label+textarea,
|
||||
.ff label+select{display:block;width:96%;font-size:14px;margin:0 0 5px 0}
|
||||
.ff label+input[type=text],
|
||||
.ff label+input[type=password],
|
||||
.ff label+textarea{padding:5px}
|
||||
/* Button Area */
|
||||
.bna{text-align:center;padding:0 10px;margin:10px 0;zoom:1}
|
||||
.bna:after{content:"";display:block;clear:both}
|
||||
.bn{display:inline-block;line-height:26px !important;padding:0 10px;font-size:12px;font-weight:bold;border:1px solid;text-decoration:none;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;cursor:pointer;vertical-align:middle}
|
||||
.bn[type=submit],
|
||||
.bn[type=button]{height:28px}
|
||||
.bn[href]{height:26px}
|
||||
.bn.dark{border-color:#666;background:#777 -webkit-gradient(linear,0% 0%,0% 100%,from(#7e7c78),to(#5c5b58));background:#777 -moz-linear-gradient(top,#7e7c78,#5c5b58);background-color:#777;color:#fff;box-shadow:0 0 1px #fff inset;-moz-box-shadow:0 0 1px #fff inset;-webkit-box-shadow:0 0 1px #fff inset}
|
||||
.bn.white{border-color:#b5b5b5;background:#1b1b1b -webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#f6f6f6),color-stop(0.5,#f0f0f0),color-stop(0.5,#e4e4e4));background:#1b1b1b -moz-linear-gradient(top,#fff,#e4e4e4);background-color:#fff;color:#000}
|
||||
/* Pagination */
|
||||
.pn{font-size:12px;text-align:center;background:#f2f0ec;padding:15px 0;border-top:1px solid #fff}
|
||||
.pn a{color:#333;text-decoration:none}
|
||||
.pn strong{margin:0 10px}
|
||||
.pn .prev:before{content:"";display:inline-block;width:0;height:0;margin:0 4px 0 0;border:4px solid;border-color:transparent;border-right-color:#999}
|
||||
.pn .next:after{content:"";display:inline-block;width:0;height:0;margin:0 0 0 4px;border:4px solid;border-color:transparent;border-left-color:#999}
|
||||
/* Search */
|
||||
.sh{border:1px solid #bfbfbf;border-left:0;border-right:0;background:#e8e8e8;padding:10px;text-align:center}
|
||||
.sh *{vertical-align:top}
|
||||
.sh select{width:80px;font-size:14px;margin:0 0 5px 0}
|
||||
.sh input[type=text]{width:160px;margin:0;font-size:14px;padding:5px}
|
||||
.sh .shbn{width:28px;height:28px;border:1px solid #666;background:#777 url(../img/mx.png) no-repeat 5px -60px;box-shadow:0 0 1px #fff inset;-moz-box-shadow:0 0 1px #fff inset;-webkit-box-shadow:0 0 1px #fff inset;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;cursor:pointer}
|
||||
BIN
modules/communication/m.skins/default/img/member.png
Normal file
BIN
modules/communication/m.skins/default/img/member.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1 KiB |
BIN
modules/communication/m.skins/default/img/read.png
Normal file
BIN
modules/communication/m.skins/default/img/read.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
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