Merge branch 'develop'

This commit is contained in:
conory 2015-12-26 23:09:12 +09:00
commit e8af9dacfe
37 changed files with 1124 additions and 184 deletions

View file

@ -21,8 +21,14 @@ function memberTransImageName($matches)
$oMemberModel = getModel('member');
$nick_name = $matches[5];
// Initialize global variable for cache
if(!isset($GLOBALS['_transImageNameList'][$member_srl]))
{
$GLOBALS['_transImageNameList'][$member_srl] = new stdClass();
}
$_tmp = &$GLOBALS['_transImageNameList'][$member_srl];
// If pre-defined data in the global variablesm return it
// If pre-defined data in the global variables, return it
if(!$_tmp->cached)
{
$_tmp->cached = true;
@ -32,6 +38,7 @@ function memberTransImageName($matches)
if(file_exists(_XE_PATH_ . $image_name_file))
{
$_tmp->image_name_file = $image_name_file . '?' . date('YmdHis', filemtime(_XE_PATH_ . $image_name_file));
$image_name_file = $_tmp->image_name_file;
}
else
{
@ -41,6 +48,7 @@ function memberTransImageName($matches)
if(file_exists(_XE_PATH_ . $image_mark_file))
{
$_tmp->image_mark_file = $image_mark_file . '?' . date('YmdHis', filemtime(_XE_PATH_ . $image_mark_file));
$image_mark_file = $_tmp->image_mark_file;
}
else
{

View file

@ -88,7 +88,8 @@ class CacheFile extends CacheBase
* Return whether cache is valid or invalid
*
* @param string $key Cache key
* @param int $modified_time Not used
* @param int $modified_time Unix time of data modified.
* If stored time is older then modified time, return false.
* @return bool Return true on valid or false on invalid.
*/
function isValid($key, $modified_time = 0)
@ -113,7 +114,8 @@ class CacheFile extends CacheBase
* Fetch a stored variable from the cache
*
* @param string $key The $key used to store the value.
* @param int $modified_time Not used
* @param int $modified_time Unix time of data modified.
* If stored time is older then modified time, return false.
* @return false|mixed Return false on failure. Return the string associated with the $key on success.
*/
function get($key, $modified_time = 0)
@ -169,6 +171,7 @@ class CacheFile extends CacheBase
function truncate()
{
FileHandler::removeFilesInDir($this->cache_dir);
return true;
}
}

View file

@ -15,7 +15,7 @@ class FileHandler
* @param string $source path to change into absolute path
* @return string Absolute path
*/
function getRealPath($source)
public static function getRealPath($source)
{
if(strlen($source) >= 2 && substr_compare($source, './', 0, 2) === 0)
{
@ -36,7 +36,7 @@ class FileHandler
* @param string $type If set as 'force'. Even if the file exists in target, the file is copied.
* @return void
*/
function copyDir($source_dir, $target_dir, $filter = null, $type = null)
public static function copyDir($source_dir, $target_dir, $filter = null, $type = null)
{
$source_dir = self::getRealPath($source_dir);
$target_dir = self::getRealPath($target_dir);
@ -101,7 +101,7 @@ class FileHandler
* @param string $force Y: overwrite
* @return void
*/
function copyFile($source, $target, $force = 'Y')
public static function copyFile($source, $target, $force = 'Y')
{
setlocale(LC_CTYPE, 'en_US.UTF8', 'ko_KR.UTF8');
$source = self::getRealPath($source);
@ -124,7 +124,7 @@ class FileHandler
* @param string $filename Path of target file
* @return string The content of the file. If target file does not exist, this function returns nothing.
*/
function readFile($filename)
public static function readFile($filename)
{
if(($filename = self::exists($filename)) === FALSE || filesize($filename) < 1)
{
@ -142,7 +142,7 @@ class FileHandler
* @param string $mode a(append) / w(write)
* @return void
*/
function writeFile($filename, $buff, $mode = "w")
public static function writeFile($filename, $buff, $mode = "w")
{
$filename = self::getRealPath($filename);
$pathinfo = pathinfo($filename);
@ -164,7 +164,7 @@ class FileHandler
* @param string $filename path of target file
* @return bool Returns TRUE on success or FALSE on failure.
*/
function removeFile($filename)
public static function removeFile($filename)
{
return (($filename = self::exists($filename)) !== FALSE) && @unlink($filename);
}
@ -178,7 +178,7 @@ class FileHandler
* @param string $target Path of target file
* @return bool Returns TRUE on success or FALSE on failure.
*/
function rename($source, $target)
public static function rename($source, $target)
{
return @rename(self::getRealPath($source), self::getRealPath($target));
}
@ -190,7 +190,7 @@ class FileHandler
* @param string $target Path of target file
* @return bool Returns TRUE on success or FALSE on failure.
*/
function moveFile($source, $target)
public static function moveFile($source, $target)
{
if(($source = self::exists($source)) !== FALSE)
{
@ -209,7 +209,7 @@ class FileHandler
* @param string $target_dir Path of target directory
* @return void
*/
function moveDir($source_dir, $target_dir)
public static function moveDir($source_dir, $target_dir)
{
self::rename($source_dir, $target_dir);
}
@ -225,7 +225,7 @@ class FileHandler
* @param bool $concat_prefix If TRUE, return file name as absolute path
* @return string[] Array of the filenames in the path
*/
function readDir($path, $filter = '', $to_lower = FALSE, $concat_prefix = FALSE)
public static function readDir($path, $filter = '', $to_lower = FALSE, $concat_prefix = FALSE)
{
$path = self::getRealPath($path);
$output = array();
@ -277,7 +277,7 @@ class FileHandler
* @param string $path_string Path of target directory
* @return bool TRUE if success. It might return nothing when ftp is used and connection to the ftp address failed.
*/
function makeDir($path_string)
public static function makeDir($path_string)
{
if(self::exists($path_string) !== FALSE)
{
@ -358,7 +358,7 @@ class FileHandler
* @param string $path Path of the target directory
* @return void
*/
function removeDir($path)
public static function removeDir($path)
{
if(($path = self::isDir($path)) === FALSE)
{
@ -399,7 +399,7 @@ class FileHandler
* @param string $path Path of the target directory
* @return void
*/
function removeBlankDir($path)
public static function removeBlankDir($path)
{
if(($path = self::isDir($path)) === FALSE)
{
@ -433,7 +433,7 @@ class FileHandler
* @param string $path Path of the target directory
* @return void
*/
function removeFilesInDir($path)
public static function removeFilesInDir($path)
{
if(($path = self::getRealPath($path)) === FALSE)
{
@ -475,7 +475,7 @@ class FileHandler
* @param int $size Number of the size
* @return string File size string
*/
function filesize($size)
public static function filesize($size)
{
if(!$size)
{
@ -515,7 +515,7 @@ class FileHandler
* @param string $post_data Request arguments array for POST method
* @return string If success, the content of the target file. Otherwise: none
*/
function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array(), $request_config = array())
public static function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array(), $request_config = array())
{
try
{
@ -621,7 +621,7 @@ class FileHandler
* @param string[] $headers Headers key value array.
* @return bool TRUE: success, FALSE: failed
*/
function getRemoteFile($url, $target_filename, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array(), $request_config = array())
public static function getRemoteFile($url, $target_filename, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array(), $request_config = array())
{
if(!($body = self::getRemoteResource($url, $body, $timeout, $method, $content_type, $headers,$cookies,$post_data,$request_config)))
{
@ -639,7 +639,7 @@ class FileHandler
* @param $val Size in string (ex., 10, 10K, 10M, 10G )
* @return int converted size
*/
function returnBytes($val)
public static function returnBytes($val)
{
$unit = strtoupper(substr($val, -1));
$val = (float)$val;
@ -660,7 +660,7 @@ class FileHandler
* @param array $imageInfo Image info retrieved by getimagesize function
* @return bool TRUE: it's ok, FALSE: otherwise
*/
function checkMemoryLoadImage(&$imageInfo)
public static function checkMemoryLoadImage(&$imageInfo)
{
$K64 = 65536;
$TWEAKFACTOR = 2.0;
@ -689,7 +689,7 @@ class FileHandler
* @param string $thumbnail_type Thumbnail type(crop, ratio)
* @return bool TRUE: success, FALSE: failed
*/
function createImageFile($source_file, $target_file, $resize_width = 0, $resize_height = 0, $target_type = '', $thumbnail_type = 'crop')
public static function createImageFile($source_file, $target_file, $resize_width = 0, $resize_height = 0, $target_type = '', $thumbnail_type = 'crop')
{
// check params
if (($source_file = self::exists($source_file)) === FALSE)
@ -892,7 +892,7 @@ class FileHandler
* @param string $filename Path of the ini file
* @return array ini array (if the target file does not exist, it returns FALSE)
*/
function readIniFile($filename)
public static function readIniFile($filename)
{
if(($filename = self::exists($filename)) === FALSE)
{
@ -923,7 +923,7 @@ class FileHandler
* @param array $arr Array
* @return bool if array contains nothing it returns FALSE, otherwise TRUE
*/
function writeIniFile($filename, $arr)
public static function writeIniFile($filename, $arr)
{
if(!is_array($arr) || count($arr) == 0)
{
@ -939,7 +939,7 @@ class FileHandler
* @param array $arr Array
* @return string
*/
function _makeIniBuff($arr)
public static function _makeIniBuff($arr)
{
$return = array();
foreach($arr as $key => $val)
@ -976,7 +976,7 @@ class FileHandler
* @param string $mode File mode for fopen
* @return FileObject File object
*/
function openFile($filename, $mode)
public static function openFile($filename, $mode)
{
$pathinfo = pathinfo($filename);
self::makeDir($pathinfo['dirname']);
@ -991,7 +991,7 @@ class FileHandler
* @param string $filename Target file name
* @return bool Returns TRUE if the file exists and contains something.
*/
function hasContent($filename)
public static function hasContent($filename)
{
return (is_readable($filename) && (filesize($filename) > 0));
}
@ -1002,7 +1002,7 @@ class FileHandler
* @param string $filename Target file name
* @return bool Returns FALSE if the file does not exists, or Returns full path file(string).
*/
function exists($filename)
public static function exists($filename)
{
$filename = self::getRealPath($filename);
return file_exists($filename) ? $filename : FALSE;
@ -1014,7 +1014,7 @@ class FileHandler
* @param string $dir Target dir path
* @return bool Returns FALSE if the dir is not dir, or Returns full path of dir(string).
*/
function isDir($path)
public static function isDir($path)
{
$path = self::getRealPath($path);
return is_dir($path) ? $path : FALSE;
@ -1026,7 +1026,7 @@ class FileHandler
* @param string $path Target dir path
* @return bool
*/
function isWritableDir($path)
public static function isWritableDir($path)
{
$path = self::getRealPath($path);
if(is_dir($path)==FALSE)

View file

@ -238,4 +238,3 @@ class Mobile
return ($db_info->use_mobile_view === 'Y');
}
}
?>

View file

@ -477,7 +477,7 @@ class ModuleObject extends Object
{
if(Context::getResponseMethod() == 'XMLRPC' || Context::getResponseMethod() == 'JSON')
{
$oAPI = getAPI($this->module_info->module, 'api');
$oAPI = getAPI($this->module_info->module);
if(method_exists($oAPI, $this->act))
{
$oAPI->{$this->act}($this);

View file

@ -12,6 +12,24 @@
*/
class Password
{
/**
* @brief Custom algorithms are stored here
* @var array
*/
protected static $_custom = array();
/**
* @brief Register a custom algorithm for password checking
* @param string $name The name of the algorithm
* @param string $regexp The regular expression to detect the algorithm
* @param callable $callback The function to call to regenerate the hash
* @return void
*/
public static function registerCustomAlgorithm($name, $regexp, $callback)
{
self::$_custom[$name] = array('regexp' => $regexp, 'callback' => $callback);
}
/**
* @brief Return the list of hashing algorithms supported by this server
* @return array
@ -162,6 +180,16 @@ class Password
return $this->strcmpConstantTime($hash_to_compare, $hash);
default:
if($algorithm && isset(self::$_custom[$algorithm]))
{
$hash_callback = self::$_custom[$algorithm]['callback'];
$hash_to_compare = $hash_callback($password, $hash);
return $this->strcmpConstantTime($hash_to_compare, $hash);
}
if(in_array($algorithm, hash_algos()))
{
return $this->strcmpConstantTime(hash($algorithm, $password), $hash);
}
return false;
}
}
@ -173,6 +201,14 @@ class Password
*/
function checkAlgorithm($hash)
{
foreach(self::$_custom as $name => $definition)
{
if(preg_match($definition['regexp'], $hash))
{
return $name;
}
}
if(preg_match('/^\$2[axy]\$([0-9]{2})\$/', $hash, $matches))
{
return 'bcrypt';
@ -185,6 +221,22 @@ class Password
{
return 'md5';
}
elseif(strlen($hash) === 40 && ctype_xdigit($hash))
{
return 'sha1';
}
elseif(strlen($hash) === 64 && ctype_xdigit($hash))
{
return 'sha256';
}
elseif(strlen($hash) === 96 && ctype_xdigit($hash))
{
return 'sha384';
}
elseif(strlen($hash) === 128 && ctype_xdigit($hash))
{
return 'sha512';
}
elseif(strlen($hash) === 16 && ctype_xdigit($hash))
{
return 'mysql_old_password';
@ -246,8 +298,13 @@ class Password
$entropy_capped_bytes = min(32, $entropy_required_bytes);
// Find and use the most secure way to generate a random string
$entropy = false;
$is_windows = (defined('PHP_OS') && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
if(function_exists('openssl_random_pseudo_bytes') && (!$is_windows || version_compare(PHP_VERSION, '5.4', '>=')))
if(function_exists('random_bytes')) // PHP 7
{
$entropy = random_bytes($entropy_capped_bytes);
}
elseif(function_exists('openssl_random_pseudo_bytes') && (!$is_windows || version_compare(PHP_VERSION, '5.4', '>=')))
{
$entropy = openssl_random_pseudo_bytes($entropy_capped_bytes);
}
@ -262,10 +319,16 @@ class Password
elseif(!$is_windows && @is_readable('/dev/urandom'))
{
$fp = fopen('/dev/urandom', 'rb');
if (function_exists('stream_set_read_buffer')) // This function does not exist in HHVM
{
stream_set_read_buffer($fp, 0); // Prevent reading several KB of unnecessary data from urandom
}
$entropy = fread($fp, $entropy_capped_bytes);
fclose($fp);
}
else
// Use built-in source of entropy if an error occurs while using other functions
if($entropy === false || strlen($entropy) < $entropy_capped_bytes)
{
$entropy = '';
for($i = 0; $i < $entropy_capped_bytes; $i += 2)

View file

@ -1724,10 +1724,10 @@ class PHPMailer {
switch (strtolower($position)) {
case 'phrase':
$encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
$encoded = preg_replace_callback('/([^A-Za-z0-9!*+\/ -])/', function($n) { return '='.sprintf('%02X', ord('\\1')); }, $encoded);
break;
case 'comment':
$encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
$encoded = preg_replace_callback('/([\(\)\"])/', function($n) { return '='.sprintf('%02X', ord('\\1')); }, $encoded);
case 'text':
default:
// Replace every high ascii, control =, ? and _ characters

View file

@ -25,9 +25,9 @@ class boardModel extends module
// get the list config value, if it is not exitsted then setup the default value
$list_config = $oModuleModel->getModulePartConfig('board', $module_srl);
if(!$list_config || count($list_config) <= 0)
if(!is_array($list_config) || count($list_config) <= 0)
{
$list_config = array( 'no', 'title', 'nick_name','regdate','readed_count');
$list_config = array('no', 'title', 'nick_name','regdate','readed_count');
}
// get the extra variables

View file

@ -321,23 +321,29 @@ class commentController extends comment
// remove XE's own tags from the contents
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
if(Mobile::isFromMobilePhone() && !$manual_inserted && $obj->use_editor != 'Y')
// if use editor of nohtml, Remove HTML tags from the contents.
if(!$manual_inserted)
{
if($obj->use_html != 'Y')
if(Mobile::isFromMobilePhone() && $obj->use_editor != 'Y')
{
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
if($obj->use_html != 'Y')
{
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
}
$obj->content = nl2br($obj->content);
}
$obj->content = nl2br($obj->content);
}
else
{
$oModuleModel = getModel('module');
$editor_config = $oModuleModel->getModuleConfig('editor');
if(substr_compare($editor_config->sel_comment_editor_colorset, 'nohtml', -6) === 0 && !$manual_inserted)
else
{
$obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)));
$oEditorModel = getModel('editor');
$editor_config = $oEditorModel->getEditorConfig($obj->module_srl);
if(strpos($editor_config->sel_comment_editor_colorset, 'nohtml') !== FALSE)
{
$obj->content = preg_replace('/\<br(\s*)?\/?\>/i', PHP_EOL, $obj->content);
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
$obj->content = str_replace(array("\r\n", "\r", "\n"), '<br />', $obj->content);
}
}
}
@ -741,22 +747,28 @@ class commentController extends comment
// remove XE's wn tags from contents
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
if(Mobile::isFromMobilePhone() && !$manual_inserted && $obj->use_editor != 'Y')
// if use editor of nohtml, Remove HTML tags from the contents.
if(!$manual_updated)
{
if($obj->use_html != 'Y')
if(Mobile::isFromMobilePhone() && $obj->use_editor != 'Y')
{
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
if($obj->use_html != 'Y')
{
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
}
$obj->content = nl2br($obj->content);
}
$obj->content = nl2br($obj->content);
}
else
{
$oModuleModel = getModel('module');
$editor_config = $oModuleModel->getModuleConfig('editor');
if(substr_compare($editor_config->sel_comment_editor_colorset, 'nohtml', -6) === 0)
else
{
$obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)));
$oEditorModel = getModel('editor');
$editor_config = $oEditorModel->getEditorConfig($obj->module_srl);
if(strpos($editor_config->sel_comment_editor_colorset, 'nohtml') !== FALSE)
{
$obj->content = preg_replace('/\<br(\s*)?\/?\>/i', PHP_EOL, $obj->content);
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
$obj->content = str_replace(array("\r\n", "\r", "\n"), '<br />', $obj->content);
}
}
}

View file

@ -584,7 +584,7 @@ class commentItem extends Object
}
else
{
return $thumbnail_url;
return $thumbnail_url . '?' . date('YmdHis', filemtime($thumbnail_file));
}
}
@ -693,7 +693,7 @@ class commentItem extends Object
// Return the thumbnail path if it was successfully generated
if($output)
{
return $thumbnail_url;
return $thumbnail_url . '?' . date('YmdHis');
}
// Create an empty file if thumbnail generation failed
else

View file

@ -5,8 +5,8 @@
<conditions>
<condition operation="equal" column="message_type" var="message_type" />
<group pipe="and">
<condition operation="equal" column="sender_srl" var="sender_srl" />
<condition operation="equal" column="receiver_srl" var="receiver_srl" pipe="or" />
<condition operation="equal" column="sender_srl" var="sender_srl" />
<condition operation="equal" column="receiver_srl" var="receiver_srl" pipe="or" />
</group>
</conditions>
</query>

View file

@ -281,22 +281,28 @@ class documentController extends document
if($obj->title == '') $obj->title = 'Untitled';
// Remove XE's own tags from the contents.
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
if(Mobile::isFromMobilePhone() && !$manual_inserted && $obj->use_editor != 'Y')
// if use editor of nohtml, Remove HTML tags from the contents.
if(!$manual_inserted)
{
if($obj->use_html != 'Y')
if(Mobile::isFromMobilePhone() && $obj->use_editor != 'Y')
{
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
if($obj->use_html != 'Y')
{
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
}
$obj->content = nl2br($obj->content);
}
$obj->content = nl2br($obj->content);
}
else
{
$oModuleModel = getModel('module');
$editor_config = $oModuleModel->getModuleConfig('editor');
if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0 && !$manual_inserted)
else
{
$obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)));
$oEditorModel = getModel('editor');
$editor_config = $oEditorModel->getEditorConfig($obj->module_srl);
if(strpos($editor_config->sel_editor_colorset, 'nohtml') !== FALSE)
{
$obj->content = preg_replace('/\<br(\s*)?\/?\>/i', PHP_EOL, $obj->content);
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
$obj->content = str_replace(array("\r\n", "\r", "\n"), '<br />', $obj->content);
}
}
}
// Remove iframe and script if not a top adminisrator in the session.
@ -491,22 +497,28 @@ class documentController extends document
if($obj->title == '') $obj->title = 'Untitled';
// Remove XE's own tags from the contents.
$obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content);
if(Mobile::isFromMobilePhone() && !$manual_inserted && $obj->use_editor != 'Y')
// if use editor of nohtml, Remove HTML tags from the contents.
if(!$manual_updated)
{
if($obj->use_html != 'Y')
if(Mobile::isFromMobilePhone() && $obj->use_editor != 'Y')
{
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
if($obj->use_html != 'Y')
{
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
}
$obj->content = nl2br($obj->content);
}
$obj->content = nl2br($obj->content);
}
else
{
$oModuleModel = getModel('module');
$editor_config = $oModuleModel->getModuleConfig('editor');
if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0)
else
{
$obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)));
$oEditorModel = getModel('editor');
$editor_config = $oEditorModel->getEditorConfig($obj->module_srl);
if(strpos($editor_config->sel_editor_colorset, 'nohtml') !== FALSE)
{
$obj->content = preg_replace('/\<br(\s*)?\/?\>/i', PHP_EOL, $obj->content);
$obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
$obj->content = str_replace(array("\r\n", "\r", "\n"), '<br />', $obj->content);
}
}
}
// Change not extra vars but language code of the original document if document's lang_code is different from author's setting.
@ -774,7 +786,7 @@ class documentController extends document
$trash_args->document_srl = $obj->document_srl;
$trash_args->description = $obj->description;
// Insert member's information only if the member is logged-in and not manually registered.
if(Context::get('is_logged')&&!$manual_inserted)
if(Context::get('is_logged'))
{
$logged_info = Context::get('logged_info');
$trash_args->member_srl = $logged_info->member_srl;

View file

@ -844,7 +844,7 @@ class documentItem extends Object
}
else
{
return $thumbnail_url;
return $thumbnail_url . '?' . date('YmdHis', filemtime($thumbnail_file));
}
}
@ -938,7 +938,7 @@ class documentItem extends Object
// Return the thumbnail path if it was successfully generated
if($output)
{
return $thumbnail_url;
return $thumbnail_url . '?' . date('YmdHis');
}
// Create an empty file if thumbnail generation failed
else

View file

@ -144,7 +144,8 @@ class editorAdminController extends editor
{
$oModuleController = getController('module');
$configVars = Context::getRequestVars();
$config = new stdClass;
if($configVars->font_defined != 'Y') $config->font_defined = $configVars->font_defined = 'N';
else $config->font_defined = 'Y';

View file

@ -34,7 +34,7 @@ function editorGetContentTextarea(editor_sequence) {
content = content.replace(/>/g, "&gt;");
content = content.replace(/\"/g, "&quot;");
}
content = content.replace(/(\r\n|\n)/g, "<br />");
}
return content;
}
}

View file

@ -0,0 +1,20 @@
<?php
/* Copyright (C) XETOWN CMS <https://www.xetown.com> */
/**
* The view class of the integration_search module
*
* @author MinSoo Kim <misol.kr@gmail.com>
*/
class integration_searchMobile extends integration_searchView
{
/**
* Search Result
*
* @return Object
*/
function IS()
{
parent::IS();
}
}

View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 MinSoo Kim
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,38 @@
<!--// 페이지 버튼 영역 -->
<div class="misolTab misolTabCenter" cond="$where == $misolSection && $output->page_navigation && count($output->data)">
<!--@if(!$page)-->
{@$page = 1}
<!--@end-->
<ol class="misolSearchTabA misolPC">
<li cond="$page != 1"><a href="{getAutoEncodedUrl('page','')}" class="prevEnd"><span>{$lang->first_page}</span></a></li>
<!--@while($page_no = $output->page_navigation->getNextPage())-->
<li class="active"|cond="$page == $page_no">
<span>
<a href="{getAutoEncodedUrl('page',$page_no)}"><span>{$page_no}</span></a>
</span>
</li>
<!--@end-->
<li cond="$page != $output->page_navigation->last_page"><a href="{getAutoEncodedUrl('page',$output->page_navigation->last_page)}" <!--@if(!$last_division)-->class="nextEnd"<!--@end-->><span>{$lang->last_page}</span></a></li>
<!--@if($last_division)-->
<li><a href="{getAutoEncodedUrl('page',1,'document_srl','','search_target',$search_target,'is_keyword',$is_keyword,'division',$last_division,'last_division','')}" class="nextEnd"><span>{$lang->cmd_search_next}</span></a></li>
<!--@end-->
</ol>
<!--// 좁은 화면의 페이지 버튼-->
<ol class="misolSearchTabA misolMobile">
<!--@if($page != 1)-->
<li><a href="{getAutoEncodedUrl('page',$page-1)}" class="prevEnd"><span>{$lang->cmd_prev}</span></a></li>
<!--@endif-->
<li class="active"><a href="{getAutoEncodedUrl('page',$page)}"><span><strong>{$page} / {$output->page_navigation->last_page}</strong></span></a></li>
<!--@if($page != $output->page_navigation->last_page)-->
<li><a href="{getAutoEncodedUrl('page',$page+1)}" <!--@if(!$last_division)-->class="nextEnd"<!--@end-->><span>{$lang->cmd_next}</span></a></li>
<!--@endif-->
<!--@if($last_division)-->
<li><a href="{getAutoEncodedUrl('page',1,'document_srl','','search_target',$search_target,'is_keyword',$is_keyword,'division',$last_division,'last_division','')}" class="nextEnd"><span>{$lang->cmd_search_next}</span></a></li>
<!--@end-->
</ol>
</div>

View file

@ -0,0 +1,40 @@
<!--#include("header.html")-->
<section class="misolSearchSection">
<div class="misolTop" cond="$where != 'comment'">
<a href="{getAutoEncodedUrl('where','comment','page',1)}" class="misol_top_a"><h1 class="subTitle"><span><i class="xi-comments" title="{$lang->comment}"></i> {$lang->comment} <span>({number_format($output->total_count)})</span></span></h1><span class="misol_more"><i class="xi-angle-right" title="{$lang->more}"></i></span></a>
</div>
<div class="misolTop" cond="$where == 'comment'">
<h1 class="subTitle"><span><i class="xi-comments" title="{$lang->comment}"></i> {$lang->comment} <span>({number_format($output->total_count)})</span></span></h1>
</div>
<!--@if(!count($output->data))-->
<span class="noResult">{$lang->msg_no_result}</span>
<!--@else-->
<ul class="misolSearch_list">
<!--@foreach($output->data as $no => $comment)-->
<li>
<a href="{$comment->getPermanentUrl()}" class="cont_a" onclick="window.open(this.href);return false;">
<div class="content_basic<!--@if($comment->thumbnailExists(240))--> left_img<!--@end-->">
<section class="item">
<span cond="$comment->thumbnailExists(240)" class="content_image">
<img src="{$comment->getThumbnail(240)}" width="80" height="80" alt="{str_replace(array('&amp;amp;','&amp;lt;','&amp;gt;','&amp;quot;','&amp;apos;'),array('&amp;','&lt;','&gt;','&quot;','&apos;'),$comment->getSummary(100))}" />
</span>
<h1 class="left_img"|cond="$comment->thumbnailExists(240)">{$lang->comment}</h1>
<p class="left_img"|cond="$comment->thumbnailExists(240)">{$comment->getSummary(400)}</p>
<address class="left_img"|cond="$comment->thumbnailExists(240)"><strong><i class="xi-user"></i>{$comment->getNickName()}</strong> | <time><i class="xi-time"></i><span class="time">{$comment->getRegdate("Y-m-d H:i")}</span></time></address>
</section>
</div>
</a>
</li>
<!--@end-->
</ul>
<!--@end-->
</section>
<!--// 페이지 버튼 영역 -->
{@$misolSection = 'comment'}
<!--#include("_page.html")-->
{@ $_misolSearch--; }
<!--#include("footer.html")-->

View file

@ -0,0 +1,259 @@
@charset "UTF-8";
/* 파란색 #153888 */
/* 전체 스타일 */
.misolSearch
{
background-color:#ffffff;
font-family: "맑은 고딕", "Apple SD Gothic Neo","나눔고딕",NanumGothic,'Nanum Gothic',"돋움",Dotum,"굴림",Gulim,Helvetica,sans-serif;
font-size: 14px;
background-color: #fff;
margin: 5px 0px;
padding: 0px;
}
.misolSearch section.misolSearchSection
{
background-color:#ffffff;
font-size: 14px;
background-color: #fff;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
margin: 10px;
padding: 0 5px;
}
/* 검색 상자 스타일 */
.misolSearch .searchBox {
padding:15px 0px;
text-align: center;
}
#misolSearchForm{
display:inline-block;
}
.misolSearch .searchBox input[type="submit"]{vertical-align:top;background:#616161;border:1px solid #e0e0e0;color:#fff;height:32px;padding:0 15px;margin:0;}
.misolSearch .searchBox input[type="submit"]:hover, .misolSearch .searchBox input[type='submit']:focus {background:#153888;}
.misolSearch .searchBox input.keyword[type='text'] {
width: 450px;
line-height: 18px;
font-size: 14px;
margin: 0;
padding: 8px 8px 6px 8px;
position: relative;
display: inline-block;
outline: none;
border: none;
border-bottom:1px solid #e0e0e0;
}
.misolSearch .searchBox input.keyword[type='text']:hover, .misolSearch .searchBox input.keyword[type='text']:focus {
border-bottom:1px solid #153888;
}
/* 글 목록 스타일 */
.misolSearch address {
font-style:normal;
}
.misolSearch .misolSearch_list .cont_a {
color: #222;
display: block;
letter-spacing: -1px;
line-height: 18px;
margin: 0 -5px;
overflow: hidden;
padding: 0.667em 10px 0.733em;
text-overflow: ellipsis;
white-space: nowrap;
text-decoration: none;
}
.misolSearch .misolSearch_list .cont_a:hover {
color: #153888;
}
.misolSearch .cont_a {
color: #222;
display: block;
letter-spacing: -1px;
overflow: hidden;
padding: 0.467em 0;
text-overflow: ellipsis;
white-space: nowrap;
text-decoration: none;
}
.misolSearch .cont_a dt {
font-weight: bold;
}
.misolSearch .content_basic{
position:relative;
display:block;
width:100%;
vertical-align: middle;
overflow:hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.misolSearch .content_basic section.item{
width:100%;
}
.misolSearch .content_basic section.item h1, .misolSearch .content_basic section.item p, .misolSearch .content_basic section.item address{
padding:0px;
margin:3px 0px;
color: #212121;
font-size: 14px;
position:relative;
box-sizing: border-box;
width:auto;
overflow:hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.misolSearch .content_image {
display:block;
position:absolute;
left:0px;
width: 80px;
}
.misolSearch .content_image img{
width:80px;
height:80px;
}
.misolSearch span.left_img{
height:80px;
}
.misolSearch .content_basic section.item .left_img{
margin-left:85px;
}
.misolSearch ul.misolSearch_list, .misolSearch ul.misolSearchTabA, .misolSearch ol.misolSearchTabA {
list-style: outside none none;
padding: 0px 0px 6px;
margin: 0;
}
.misolSearch .misolSearch_list li {
position:relative;
border-top: 1px solid #e0e0e0;
overflow: hidden;
padding:0;
}
.misolSearch .misolSearch_list li:first-child, .misolSearch.misolSearch_list li.first-child{
border-top: 0 none;
}
.misolSearch .misolSearch_list li i{ /* 아이콘 */
margin-right:3px;
font-size:0.9em;
}
.misolSearch .misolSearchSection .noResult{
display:inline-block;
margin: 10px;
}
/* 상단 제목 스타일 */
.misolSearch .misolTop {
border-bottom: 1px solid #e0e0e0;
height: 45px;
line-height: 20px;
margin: 0px 5px;
position: relative;
}
.misolSearch div.misolTop h1
{
color: #000;
font-weight: 400;
letter-spacing: -1px;
line-height: 45px;
font-size: 16.3833px;
}
.misolSearch div.misolTop .misol_top_a {
color: #000;
font-weight: 400;
display: block;
margin: 0 -10px;
padding: 0 10px;
text-decoration: none;
}
.misolSearch div.misolTop .misol_more {
position: absolute;
right: 5px;
top: 15px;
height: 12.5px;
width: 9px;
}
/* 상단 탭 스타일 */
.misolSearch div.misolTab{
overflow: hidden;
width:100%;
height: 52px;
white-space: nowrap;
border-bottom: 1px solid #e0e0e0;
box-sizing: border-box;
}
.misolSearch ul.misolSearchTabA, .misolSearch ol.misolSearchTabA{
display: block;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
padding: 6px 0px 100px;
text-decoration: none;
}
.misolSearch div.misolTabCenter{
text-align: center;
border-bottom: none;
}
.misolSearch ol.misolSearchTabA{
display: inline-block;
}
.misolSearch ul.misolSearchTabA>li, .misolSearch ol.misolSearchTabA>li {
display:inline-block;
height: 40px;
line-height: 18px;
position: relative;
}
.misolSearch ul.misolSearchTabA>li a, .misolSearch ol.misolSearchTabA>li a{
display:inline-block;
color: #000;
font-weight: 400;
letter-spacing: -1px;
line-height: 40px;
text-decoration: none;
}
.misolSearch ul.misolSearchTabA>li a:hover, .misolSearch ul.misolSearchTabA>li.active a, .misolSearch ol.misolSearchTabA>li a:hover, .misolSearch ol.misolSearchTabA>li.active a {
color: #153888;
font-weight: 700;
}
.misolSearch ul.misolSearchTabA>li a span, .misolSearch ol.misolSearchTabA>li a span {
border-left: 1px solid #e0e0e0;
padding: 0 15px;
}
.misolSearch ul.misolSearchTabA>li:first-child a span, .misolSearch ol.misolSearchTabA>li:first-child a span {
border-left: 0 none;
}
.misolSearch section ul.misolSearchTabA>li:first-child a span, .misolSearch section ol.misolSearchTabA>li:first-child a span {
padding-left: 10px;
}
/* 페이지 */
.misolSearch .pagination{
font-size:16px;
line-height:16px;
}
.misolSearch .prevEnd:before{
font-family:xeicon;
content:"\e60b"
}
.misolSearch .nextEnd:after{
font-family:xeicon;
content:"\e60d"
}
/* PC / Mobile */
.misolSearch ol.misolMobile{
display:none;
}
@media screen and (max-width: 750px) {
.misolSearch ol.misolMobile{
display: inline-block;
}
.misolSearch ol.misolPC{
display: none;
}
.misolSearch .searchBox input.keyword[type='text'] {
width: 200px;
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,259 @@
@charset "UTF-8";
/* 크림슨 #872434 */
/* 전체 스타일 */
.misolSearch
{
background-color:#ffffff;
font-family: "맑은 고딕", "Apple SD Gothic Neo","나눔고딕",NanumGothic,'Nanum Gothic',"돋움",Dotum,"굴림",Gulim,Helvetica,sans-serif;
font-size: 14px;
background-color: #fff;
margin: 5px 0px;
padding: 0px;
}
.misolSearch section.misolSearchSection
{
background-color:#ffffff;
font-size: 14px;
background-color: #fff;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
margin: 10px;
padding: 0 5px;
}
/* 검색 상자 스타일 */
.misolSearch .searchBox {
padding:15px 0px;
text-align: center;
}
#misolSearchForm{
display:inline-block;
}
.misolSearch .searchBox input[type="submit"]{vertical-align:top;background:#616161;border:1px solid #e0e0e0;color:#fff;height:32px;padding:0 15px;margin:0;}
.misolSearch .searchBox input[type="submit"]:hover, .misolSearch .searchBox input[type='submit']:focus {background:#872434;}
.misolSearch .searchBox input.keyword[type='text'] {
width: 450px;
line-height: 18px;
font-size: 14px;
margin: 0;
padding: 8px 8px 6px 8px;
position: relative;
display: inline-block;
outline: none;
border: none;
border-bottom:1px solid #e0e0e0;
}
.misolSearch .searchBox input.keyword[type='text']:hover, .misolSearch .searchBox input.keyword[type='text']:focus {
border-bottom:1px solid #872434;
}
/* 글 목록 스타일 */
.misolSearch address {
font-style:normal;
}
.misolSearch .misolSearch_list .cont_a {
color: #222;
display: block;
letter-spacing: -1px;
line-height: 18px;
margin: 0 -5px;
overflow: hidden;
padding: 0.667em 10px 0.733em;
text-overflow: ellipsis;
white-space: nowrap;
text-decoration: none;
}
.misolSearch .misolSearch_list .cont_a:hover {
color: #872434;
}
.misolSearch .cont_a {
color: #222;
display: block;
letter-spacing: -1px;
overflow: hidden;
padding: 0.467em 0;
text-overflow: ellipsis;
white-space: nowrap;
text-decoration: none;
}
.misolSearch .cont_a dt {
font-weight: bold;
}
.misolSearch .content_basic{
position:relative;
display:block;
width:100%;
vertical-align: middle;
overflow:hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.misolSearch .content_basic section.item{
width:100%;
}
.misolSearch .content_basic section.item h1, .misolSearch .content_basic section.item p, .misolSearch .content_basic section.item address{
padding:0px;
margin:3px 0px;
color: #212121;
font-size: 14px;
position:relative;
box-sizing: border-box;
width:auto;
overflow:hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.misolSearch .content_image {
display:block;
position:absolute;
left:0px;
width: 80px;
}
.misolSearch .content_image img{
width:80px;
height:80px;
}
.misolSearch span.left_img{
height:80px;
}
.misolSearch .content_basic section.item .left_img{
margin-left:85px;
}
.misolSearch ul.misolSearch_list, .misolSearch ul.misolSearchTabA, .misolSearch ol.misolSearchTabA {
list-style: outside none none;
padding: 0px 0px 6px;
margin: 0;
}
.misolSearch .misolSearch_list li {
position:relative;
border-top: 1px solid #e0e0e0;
overflow: hidden;
padding:0;
}
.misolSearch .misolSearch_list li:first-child, .misolSearch.misolSearch_list li.first-child{
border-top: 0 none;
}
.misolSearch .misolSearch_list li i{ /* 아이콘 */
margin-right:3px;
font-size:0.9em;
}
.misolSearch .misolSearchSection .noResult{
display:inline-block;
margin: 10px;
}
/* 상단 제목 스타일 */
.misolSearch .misolTop {
border-bottom: 1px solid #e0e0e0;
height: 45px;
line-height: 20px;
margin: 0px 5px;
position: relative;
}
.misolSearch div.misolTop h1
{
color: #000;
font-weight: 400;
letter-spacing: -1px;
line-height: 45px;
font-size: 16.3833px;
}
.misolSearch div.misolTop .misol_top_a {
color: #000;
font-weight: 400;
display: block;
margin: 0 -10px;
padding: 0 10px;
text-decoration: none;
}
.misolSearch div.misolTop .misol_more {
position: absolute;
right: 5px;
top: 15px;
height: 12.5px;
width: 9px;
}
/* 상단 탭 스타일 */
.misolSearch div.misolTab{
overflow: hidden;
width:100%;
height: 52px;
white-space: nowrap;
border-bottom: 1px solid #e0e0e0;
box-sizing: border-box;
}
.misolSearch ul.misolSearchTabA, .misolSearch ol.misolSearchTabA{
display: block;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
padding: 6px 0px 100px;
text-decoration: none;
}
.misolSearch div.misolTabCenter{
text-align: center;
border-bottom: none;
}
.misolSearch ol.misolSearchTabA{
display: inline-block;
}
.misolSearch ul.misolSearchTabA>li, .misolSearch ol.misolSearchTabA>li {
display:inline-block;
height: 40px;
line-height: 18px;
position: relative;
}
.misolSearch ul.misolSearchTabA>li a, .misolSearch ol.misolSearchTabA>li a{
display:inline-block;
color: #000;
font-weight: 400;
letter-spacing: -1px;
line-height: 40px;
text-decoration: none;
}
.misolSearch ul.misolSearchTabA>li a:hover, .misolSearch ul.misolSearchTabA>li.active a, .misolSearch ol.misolSearchTabA>li a:hover, .misolSearch ol.misolSearchTabA>li.active a {
color: #872434;
font-weight: 700;
}
.misolSearch ul.misolSearchTabA>li a span, .misolSearch ol.misolSearchTabA>li a span {
border-left: 1px solid #e0e0e0;
padding: 0 15px;
}
.misolSearch ul.misolSearchTabA>li:first-child a span, .misolSearch ol.misolSearchTabA>li:first-child a span {
border-left: 0 none;
}
.misolSearch section ul.misolSearchTabA>li:first-child a span, .misolSearch section ol.misolSearchTabA>li:first-child a span {
padding-left: 10px;
}
/* 페이지 */
.misolSearch .pagination{
font-size:16px;
line-height:16px;
}
.misolSearch .prevEnd:before{
font-family:xeicon;
content:"\e60b"
}
.misolSearch .nextEnd:after{
font-family:xeicon;
content:"\e60d"
}
/* PC / Mobile */
.misolSearch ol.misolMobile{
display:none;
}
@media screen and (max-width: 750px) {
.misolSearch ol.misolMobile{
display: inline-block;
}
.misolSearch ol.misolPC{
display: none;
}
.misolSearch .searchBox input.keyword[type='text'] {
width: 200px;
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,55 @@
<!--#include("header.html")-->
<section class="misolSearchSection">
<!--// 제목 또는 탭 영역 -->
<div class="misolTop" cond="$where != 'document'">
<a href="{getAutoEncodedUrl('where','document','page',1)}" class="misol_top_a"><h1 class="subTitle"><span><i class="xi-file-text" title="{$lang->document}"></i> {$lang->document} <span>({number_format($output->total_count)})</span></span></h1><span class="misol_more"><i class="xi-angle-right" title="{$lang->more}"></i></span></a>
</div>
<div class="misolTop" cond="$where == 'document'">
<h1 class="subTitle"><span><i class="xi-file-text" title="{$lang->document}"></i> {$lang->document} <span>({number_format($output->total_count)})</span></span></h1>
</div>
<div class="misolTab">
<ul class="misolSearchTabA">
<!--@foreach($lang->is_search_option['document'] as $key => $val)-->
<li class="<!--@if($search_target == $key)-->active<!--@end--><!--@if($key=="tag")--> last<!--@end-->"><a href="{getUrl('where','document','search_target',$key,'page',1,'division','')}"><span>{$val}</span></a></li>
<!--@end-->
</ul>
</div>
<!--// 리스트 영역 -->
<!--@if(!count($output->data))-->
<span class="noResult">
{$lang->msg_no_result}
<!--@if($last_division)-->
<br>{$lang->msg_document_more_search}
<br><a class="btn" href="{getUrl('where','document','page',1,'document_srl','','search_target',$search_target,'is_keyword',$is_keyword,'division',$last_division,'last_division','')}">{$lang->cmd_search_next}</a>
<!--@end-->
</span>
<!--@else-->
<ul class="misolSearch_list">
<!--@foreach($output->data as $no => $document)-->
<li>
<a href="{getUrl('','document_srl',$document->document_srl)}" class="cont_a" onclick="window.open(this.href);return false;">
<div class="content_basic<!--@if($document->thumbnailExists(240))--> left_img<!--@end-->">
<section class="item">
<span cond="$document->thumbnailExists(240)" class="content_image">
<img src="{$document->getThumbnail(240)}" width="80" height="80" alt="{str_replace(array('&amp;amp;','&amp;lt;','&amp;gt;','&amp;quot;','&amp;apos;'),array('&amp;','&lt;','&gt;','&quot;','&apos;'),$document->getTitle())}" />
</span>
<h1 class="left_img"|cond="$document->thumbnailExists(240)">{$document->getTitle()}</h1>
<p class="left_img"|cond="$document->thumbnailExists(240)">{$document->getSummary(200)}</p>
<address class="left_img"|cond="$document->thumbnailExists(240)"><strong><i class="xi-user"></i>{$document->getNickName()}</strong> | <time><i class="xi-time"></i><span class="time">{$document->getRegdate("Y-m-d H:i")}</span></time> | <i class="xi-eye" title="{$lang->readed_count}"></i><span class="readNum">{$document->get('readed_count')}</span> | <i class="xi-message"></i>{$document->getCommentCount()}<!--@if($document->get('voted_count'))--> | <i class="xi-thumbs-up" title="{$lang->voted_count}"></i><span class="recomNum">{$document->get('voted_count')}</span><!--@end--></address>
</section>
</div>
</a>
</li>
<!--@end-->
</ul>
<!--@end-->
</section>
<!--// 페이지 버튼 영역 -->
{@$misolSection = 'document'}
<!--#include("_page.html")-->
{@ $_misolSearch--; }
<!--#include("footer.html")-->

View file

@ -0,0 +1,40 @@
<!--#include("header.html")-->
<section class="misolSearchSection">
<!--// 제목 또는 탭 영역 -->
<div class="misolTop" cond="$where != 'file'">
<a href="{getAutoEncodedUrl('where','file','page',1)}" class="misol_top_a"><h1 class="subTitle"><span><i class="xi-clip" title="{$lang->file}"></i> {$lang->file} <span>({number_format($output->total_count)})</span></span></h1><span class="misol_more"><i class="xi-angle-right" title="{$lang->more}"></i></span></a>
</div>
<div class="misolTop" cond="$where == 'file'">
<h1 class="subTitle"><span><i class="xi-clip" title="{$lang->file}"></i> {$lang->file} <span>({number_format($output->total_count)})</span></span></h1>
</div>
<!--// 리스트 영역 -->
<!--@if(!count($output->data))-->
<span class="noResult">
{$lang->msg_no_result}
</span>
<!--@else-->
<ul class="misolSearch_list">
<!--@foreach($output->data as $no => $file)-->
<li>
<a href="{$file->url}" class="cont_a" onclick="window.open(this.href);return false;">
<div class="content_basic">
<section class="item">
<h1>{$file->filename} ({FileHandler::filesize($file->file_size)})</h1>
<address><strong><i class="xi-user"></i>{$file->nick_name}</strong> | <i class="xi-time"></i><span class="time"><time>{$file->regdate}</time></span> | {number_format($file->download_count)}</address>
</section>
</div>
</a>
</li>
<!--@end-->
</ul>
<!--@end-->
</section>
<!--// 페이지 버튼 영역 -->
{@$misolSection = 'file'}
<!--#include("_page.html")-->
{@ $_misolSearch--; }
<!--#include("footer.html")-->

View file

@ -0,0 +1,3 @@
<!--@if($_misolSearch == 1905)-->
</main>
<!--@end-->

View file

@ -0,0 +1,37 @@
<!--// 헤더는 한번만 작성-->
<!--@if(!$_misolSearch)-->
<!--// 스타일 불러오기 -->
<!--@if($module_info->colorset != "crimson")-->
<load target="./css/blue.css" />
<!--@else-->
<load target="./css/crimson.css" />
<!--@end-->
<load target="./../../../../common/xeicon/xeicon.min.css" />
<main class="misolSearch">
{@ $_misolSearch = 1905; }
<div class="searchBox">
<form action="{getUrl()}" method="post" class="search" id="misolSearchForm" no-error-return-url="true" >
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="IS" />
<input type="hidden" name="where" value="{$where}" />
<input type="hidden" name="search_target" value="title_content" />
<input name="is_keyword" class="keyword" type="text" required="required" value="{$is_keyword}"/>
<input type="submit" value="{$lang->cmd_search}" />
</form>
</div>
<div class="misolTab">
<ul class="misolSearchTabA">
<li <!--@if(!$where)-->class="active"<!--@end-->><a href="{getAutoEncodedUrl('where','','page','','division','')}"><span>{$lang->integration_search}</span></a></li>
<li <!--@if($where=='document')-->class="active"<!--@end-->><a href="{getAutoEncodedUrl('where','document','page',1,'division','')}"><span>{$lang->document}</span></a></li>
<li <!--@if($where=='comment')-->class="active"<!--@end-->><a href="{getAutoEncodedUrl('where','comment','page',1,'division','')}"><span>{$lang->comment}</span></a></li>
<li <!--@if($where=='trackback')-->class="active"<!--@end-->><a href="{getAutoEncodedUrl('where','trackback','page',1,'division','')}"><span>{$lang->trackback}</span></a></li>
<li <!--@if($where=='multimedia')-->class="active"<!--@end-->><a href="{getAutoEncodedUrl('where','multimedia','page',1,'division','')}"><span>{$lang->multimedia}</span></a></li>
<li <!--@if($where=='file')-->class="active"<!--@end-->><a href="{getAutoEncodedUrl('where','file','page',1,'division','')}"><span>{$lang->file}</span></a></li>
</ul>
</div>
<!--@end-->
{@ $_misolSearch++; }

View file

@ -0,0 +1,20 @@
<!--#include("header.html")-->
{@ $output = $search_result['document'] }
<!--#include("document.html")-->
{@ $output = $search_result['comment'] }
<!--#include("comment.html")-->
{@ $output = $search_result['trackback'] }
{@ $search_target = 'title'; }
<!--#include("trackback.html")-->
{@ $output = $search_result['multimedia'] }
<!--#include("multimedia.html")-->
{@ $output = $search_result['file'] }
<!--#include("file.html")-->
{@ $_misolSearch--; }
<!--#include("footer.html")-->

View file

@ -0,0 +1,43 @@
<!--#include("header.html")-->
<section class="misolSearchSection">
<!--// 제목 또는 탭 영역 -->
<div class="misolTop" cond="$where != 'multimedia'">
<a href="{getAutoEncodedUrl('where','multimedia','page',1)}" class="misol_top_a"><h1 class="subTitle"><span><i class="xi-images" title="{$lang->multimedia}"></i> {$lang->multimedia} <span>({number_format($output->total_count)})</span></span></h1><span class="misol_more"><i class="xi-angle-right" title="{$lang->more}"></i></span></a>
</div>
<div class="misolTop" cond="$where == 'multimedia'">
<h1 class="subTitle"><span><i class="xi-images" title="{$lang->multimedia}"></i> {$lang->multimedia} <span>({number_format($output->total_count)})</span></span></h1>
</div>
<!--// 리스트 영역 -->
<!--@if(!count($output->data))-->
<span class="noResult">
{$lang->msg_no_result}
</span>
<!--@else-->
<ul class="misolSearch_list">
<!--@foreach($output->data as $no => $image)-->
<li>
<a href="{$image->url}" class="cont_a" onclick="window.open(this.href);return false;">
<div class="content_basic left_img">
<section class="item">
<span class="content_image">
{$image->src}
</span>
<h1 class="left_img">{$image->filename}</h1>
<address class="left_img"><strong><i class="xi-user"></i>{$image->nick_name}</strong> | <time><i class="xi-time"></i><span class="time">{$image->regdate}</span></time></address>
</section>
</div>
</a>
</li>
<!--@end-->
</ul>
<!--@end-->
</section>
<!--// 페이지 버튼 영역 -->
{@$misolSection = 'multimedia'}
<!--#include("_page.html")-->
{@ $_misolSearch--; }
<!--#include("footer.html")-->

View file

@ -0,0 +1,14 @@
<!--#include("header.html")-->
<section class="misolSearchSection">
<!--// 제목 또는 탭 영역 -->
<div class="misolTop">
<h1 class="subTitle"><span><i class="xi-info-triangle" title="{$lang->notify}"></i> {$lang->notify}</span></h1>
</div>
<span class="noResult">
{$lang->msg_no_keyword}
</span>
</section>
{@ $_misolSearch--; }
<!--#include("footer.html")-->

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<skin version="0.2">
<title xml:lang="ko">미솔 스킨</title>
<title xml:lang="en">misol skin</title>
<description xml:lang="ko">통합검색 모바일에 검색에 대응하는 미솔 스킨입니다.</description>
<description xml:lang="en">The skin for mobile and PC environment of Integrated Search Module</description>
<version>1.0</version>
<date>2015-12-18</date>
<author email_address="misol.kr@gmail.com" link="https://github.com/misol">
<name xml:lang="ko">김민수</name>
<name xml:lang="en">MinSoo Kim</name>
</author>
<license>MIT License</license>
<colorset>
<color name="blue">
<title xml:lang="ko">파랑</title>
<title xml:lang="en">Blue</title>
</color>
<color name="crimson">
<title xml:lang="ko">크림슨</title>
<title xml:lang="en">Crimson</title>
</color>
</colorset>
</skin>

View file

@ -0,0 +1,47 @@
<!--#include("header.html")-->
<section class="misolSearchSection">
<!--// 제목 또는 탭 영역 -->
<div class="misolTop" cond="$where != 'trackback'">
<a href="{getAutoEncodedUrl('where','trackback','page',1)}" class="misol_top_a"><h1 class="subTitle"><span><i class="xi-note" title="{$lang->trackback}"></i> {$lang->trackback} <span>({number_format($output->total_count)})</span></span></h1><span class="misol_more"><i class="xi-angle-right" title="{$lang->more}"></i></span></a>
</div>
<div class="misolTop" cond="$where == 'trackback'">
<h1 class="subTitle"><span><i class="xi-note" title="{$lang->trackback}"></i> {$lang->trackback} <span>({number_format($output->total_count)})</span></span></h1>
</div>
<div class="misolTab">
<ul class="misolSearchTabA">
<!--@foreach($lang->is_search_option['trackback'] as $key => $val)-->
<li class="<!--@if($search_target == $key)-->active<!--@end--><!--@if($key=="tag")--> last<!--@end-->"><a href="{getUrl('where','trackback','search_target',$key,'page',1)}"><span>{$val}</span></a></li>
<!--@end-->
</ul>
</div>
<!--// 리스트 영역 -->
<!--@if(!count($output->data))-->
<span class="noResult">
{$lang->msg_no_result}
</span>
<!--@else-->
<ul class="misolSearch_list">
<!--@foreach($output->data as $no => $trackback)-->
<li>
<a href="{getUrl('','document_srl',$trackback->document_srl)}" class="cont_a" onclick="window.open(this.href);return false;">
<div class="content_basic">
<section class="item">
<h1>{htmlspecialchars($trackback->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</h1>
<p>{cut_str(htmlspecialchars($trackback->excerpt, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))}</p>
<address><strong><i class="xi-user"></i><a href="{$trackback->url}">{htmlspecialchars($trackback->blog_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}</a></strong> | <time><i class="xi-time"></i><span class="time">{zdate($trackback->regdate, "Y-m-d H:i")}</span></time></address>
</section>
</div>
</a>
</li>
<!--@end-->
</ul>
<!--@end-->
</section>
<!--// 페이지 버튼 영역 -->
{@$misolSection = 'trackback'}
<!--#include("_page.html")-->
{@ $_misolSearch--; }
<!--#include("footer.html")-->

View file

@ -85,7 +85,7 @@
</block>
</div>
</div>
<block loop="$skin_info->extra_vars => $key, $val">
<block loop="$skin_info->extra_vars => $key, $val" cond="$skin_info->extra_vars">
<block cond="$val->group && ((!$group) || $group != $val->group)">
{@$group = $val->group}
</section>

View file

@ -865,18 +865,7 @@ class memberAdminController extends member
}
$this->setMessage('success_updated');
break;
}
case 'spam':
{
$output = $this->spammerManage($member_srl);
if(!$output->toBool())
{
$oDB->rollback();
return $output;
}
$this->setMessage('success_deleted');
break;
}
}
case 'delete':
{
$oMemberController->memberInfo = null;
@ -1535,74 +1524,6 @@ class memberAdminController extends member
return new Object();
}
/**
* Delete spammer's Activity
* @param int $member_srl
* @return Object
*/
function spammerManage($member_srl)
{
// 스팸 유저가 쓴 모든 글 자동 삭제
$oDocumentModel = &getModel('document');
$oDocumentController = &getController('document');
$obj->member_srl = $member_srl;
$obj->list_count = '99999999999';
$columnList = array('document_srl','ipaddress');
$document_list = $oDocumentModel->getDocumentList($obj,false,true,$columnList);
foreach($document_list->data as $key_document => $val_document)
{
// 회원 IP 스팸에 등록
$args_spam->ipaddress = $val_document->get('ipaddress');
if($args_spam->ipaddress && ($ipaddress_bk != $args_spam->ipaddress ))
{
$output_spam = executeQuery('spamfilter.isDeniedIP', $args_spam);
if(!$output_spam->data->count)
{
$ipaddress_bk = $args_spam->ipaddress;
executeQuery('spamfilter.insertDeniedIP', $args_spam);
}
}
// 글 삭제
$oDocumentController->deleteDocument($val_document->document_srl);
}
// 스팸 유저가 쓴 모든 댓글 자동 삭제
$oCommentModel = &getModel('comment');
$obj->search_target = 'member_srl';
$obj->search_keyword = $member_srl;
$comment_list = $oCommentModel->getTotalCommentList($obj);
$oCommentController = &getController('comment');
foreach($comment_list->data as $key_comment => $val_comment)
{
// 회원 IP 스팸에 등록
$args_spam->ipaddress = $val_comment->get('ipaddress');
if($args_spam->ipaddress && ($ipaddress_bk != $args_spam->ipaddress ))
{
$output_spam = executeQuery('spamfilter.isDeniedIP', $args_spam);
if(!$output_spam->data->count)
{
$ipaddress_bk = $args_spam->ipaddress;
executeQuery('spamfilter.insertDeniedIP', $args_spam);
}
}
$oCommentController->deleteComment($val_comment->comment_srl);
}
// 쪽지 삭제
$args_message->sender_srl = $obj->member_srl;
$args_message->receiver_srl = $obj->member_srl;
$output_message = executeQuery('communication.deleteMessagesMember', $args_message);
// 회원정보 삭제
$oMemberController = &getController('member');
$oMemberController->memberInfo = null;
$oMemberController = &getController('member');
$output = $oMemberController->deleteMember($obj->member_srl);
return $output;
}
}
/* End of file member.admin.controller.php */
/* Location: ./modules/member/member.admin.controller.php */

View file

@ -631,7 +631,7 @@ class memberAdminView extends member
}
$replace = array_merge($extentionReplace, $replace);
$inputTag = preg_replace('@%(\w+)%@e', '$replace[$1]', $template);
$inputTag = preg_replace_callback('@%(\w+)%@', function($n) { return $replace[$n[1]]; }, $template);
if($extendForm->description)
$inputTag .= '<p class="help-block">'.$extendForm->description.'</p>';

View file

@ -24,7 +24,6 @@
<a class="x_btn x_btn-inverse" href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminInsert')}">{$lang->msg_new_member}</a>
<a href="#listManager" data-value="modify" class="modalAnchor _member x_btn">{$lang->modify}</a>
<a href="#listManager" data-value="delete" class="modalAnchor _member x_btn">{$lang->delete}</a>
<a href="#listManager" data-value="spam" class="modalAnchor _member x_btn">{$lang->cmd_spammer}</a>
</div>
</caption>
<thead>
@ -113,7 +112,6 @@
<a class="x_btn x_btn-inverse" href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminInsert')}">{$lang->msg_new_member}</a>
<a href="#listManager" data-value="modify" class="modalAnchor _member x_btn">{$lang->modify}</a>
<a href="#listManager" data-value="delete" class="modalAnchor _member x_btn">{$lang->delete}</a>
<a href="#listManager" data-value="spam" class="modalAnchor _member x_btn">{$lang->cmd_spammer}</a>
</div>
</div>
<form action="./" method="get" class="search center x_input-append" no-error-return-url="true">
@ -171,7 +169,7 @@
<div class="x_modal-footer">
<button type="button" class="x_btn x_pull-left" data-hide="#listManager">{$lang->cmd_close}</button>
<span class="x_btn-group x_pull-right">
<button type="submit" name="type" value="modify|delete|spam" class="x_btn x_btn-inverse">{$lang->confirm}</button>
<button type="submit" name="type" value="modify|delete" class="x_btn x_btn-inverse">{$lang->confirm}</button>
</span>
</div>
</form>

View file

@ -1421,7 +1421,7 @@ class moduleModel extends module
$args->module_srl = $module_srl;
$output = executeQuery('module.getModulePartConfig', $args);
if($output->data->config) $config = unserialize($output->data->config);
else $config = new stdClass;
else $config = null;
//insert in cache
if($oCacheHandler->isSupport())