mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-16 09:49:54 +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
|
|
@ -567,6 +567,10 @@
|
|||
<value xml:lang="tr"><![CDATA[Dış Görünümleri Yönet]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Quản lý Skin]]></value>
|
||||
</item>
|
||||
<item name="cmd_manage_mobile_skin">
|
||||
<value xml:lang="ko"><![CDATA[모바일 스킨 관리]]></value>
|
||||
<value xml:lang="en"><![CDATA[Manage Mobile Skins]]></value>
|
||||
</item>
|
||||
<item name="cmd_manage_document">
|
||||
<value xml:lang="ko"><![CDATA[게시글 관리]]></value>
|
||||
<value xml:lang="en"><![CDATA[Manage Articles]]></value>
|
||||
|
|
@ -1039,4 +1043,14 @@ Le module [Administration des Modules] montera tous les modules installés et vo
|
|||
<value xml:lang="en"><![CDATA[Add]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[新增]]></value>
|
||||
</item>
|
||||
<item name="keep_existing_value">
|
||||
<value xml:lang="ko"><![CDATA[기존 값 유지]]></value>
|
||||
<value xml:lang="en"><![CDATA[Keep existing value]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Keep existing value]]></value>
|
||||
</item>
|
||||
<item name="about_maintain_existing">
|
||||
<value xml:lang="ko"><![CDATA[공란일 경우 기존 값을 따릅니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[If content empty, maintain existing value.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[If content empty, maintain existing value.]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@
|
|||
/**
|
||||
* @brief Copy Module
|
||||
**/
|
||||
function procModuleAdminCopyModule() {
|
||||
function procModuleAdminCopyModule()
|
||||
{
|
||||
// Get information of the target module to copy
|
||||
$module_srl = Context::get('module_srl');
|
||||
if(!$module_srl) return;
|
||||
|
|
@ -114,6 +115,7 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
// Copy a module
|
||||
|
|
@ -130,6 +132,19 @@
|
|||
// Create a module
|
||||
$output = $oModuleController->insertModule($clone_args);
|
||||
$module_srl = $output->get('module_srl');
|
||||
|
||||
if($module_info->module == 'page' && $extra_vars->page_type == 'ARTICLE')
|
||||
{
|
||||
// copy document
|
||||
$oDocumentAdminController = &getAdminController('document');
|
||||
$copyOutput = $oDocumentAdminController->copyDocumentModule(array($extra_vars->document_srl), $module_srl, $module_info->category_srl);
|
||||
$document_srls = $copyOutput->get('copied_srls');
|
||||
if($document_srls && count($document_srls) > 0)
|
||||
{
|
||||
$extra_vars->document_srl = array_pop($document_srls);
|
||||
}
|
||||
}
|
||||
|
||||
// Grant module permissions
|
||||
if(count($grant)) $oModuleController->insertModuleGrants($module_srl, $grant);
|
||||
if ($extra_vars) $oModuleController->insertModuleExtraVars($module_srl, $extra_vars);
|
||||
|
|
@ -232,23 +247,45 @@
|
|||
function procModuleAdminUpdateSkinInfo() {
|
||||
// Get information of the module_srl
|
||||
$module_srl = Context::get('module_srl');
|
||||
$mode = Context::get('_mode');
|
||||
$mode = $mode === 'P' ? 'P' : 'M';
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$columnList = array('module_srl', 'module', 'skin');
|
||||
$columnList = array('module_srl', 'module', 'skin', 'mskin');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
if($module_info->module_srl) {
|
||||
$skin = $module_info->skin;
|
||||
if($mode === 'M')
|
||||
{
|
||||
$skin = $module_info->mskin;
|
||||
}
|
||||
else
|
||||
{
|
||||
$skin = $module_info->skin;
|
||||
}
|
||||
|
||||
// Get skin information (to check extra_vars)
|
||||
$module_path = './modules/'.$module_info->module;
|
||||
$skin_info = $oModuleModel->loadSkinInfo($module_path, $skin);
|
||||
$skin_vars = $oModuleModel->getModuleSkinVars($module_srl);
|
||||
|
||||
if($mode === 'M')
|
||||
{
|
||||
$skin_info = $oModuleModel->loadSkinInfo($module_path, $skin, 'm.skins');
|
||||
$skin_vars = $oModuleModel->getModuleMobileSkinVars($module_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$skin_info = $oModuleModel->loadSkinInfo($module_path, $skin);
|
||||
$skin_vars = $oModuleModel->getModuleSkinVars($module_srl);
|
||||
}
|
||||
|
||||
// Check received variables (unset such variables as act, module_srl, page, mid, module)
|
||||
$obj = Context::getRequestVars();
|
||||
unset($obj->act);
|
||||
unset($obj->error_return_url);
|
||||
unset($obj->module_srl);
|
||||
unset($obj->page);
|
||||
unset($obj->mid);
|
||||
unset($obj->module);
|
||||
unset($obj->_mode);
|
||||
// Separately handle if a type of extra_vars is an image in the original skin_info
|
||||
if($skin_info->extra_vars) {
|
||||
foreach($skin_info->extra_vars as $vars) {
|
||||
|
|
@ -306,21 +343,24 @@
|
|||
}
|
||||
*/
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->deleteModuleSkinVars($module_srl);
|
||||
// Register
|
||||
$oModuleController->insertModuleSkinVars($module_srl, $obj);
|
||||
}
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport()){
|
||||
$cache_key = 'object:'.$module_srl;
|
||||
$oCacheHandler->delete($cache_key);
|
||||
|
||||
if($mode === 'M')
|
||||
{
|
||||
$output = $oModuleController->insertModuleMobileSkinVars($module_srl, $obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = $oModuleController->insertModuleSkinVars($module_srl, $obj);
|
||||
}
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->setLayoutPath('./common/tpl');
|
||||
$this->setLayoutFile('default_layout.html');
|
||||
$this->setTemplatePath('./modules/module/tpl');
|
||||
$this->setTemplateFile("top_refresh.html");
|
||||
$this->setMessage('success_saved');
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -336,15 +376,24 @@
|
|||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController= &getController('module');
|
||||
$columnList = array('module_srl', 'module', 'use_mobile', 'mlayout_srl', 'menu_srl', 'site_srl', 'mid', 'mskin', 'browser_title', 'is_default', 'content', 'mcontent', 'open_rss', 'regdate');
|
||||
$columnList = array('module_srl', 'module', 'menu_srl', 'site_srl', 'mid', 'browser_title', 'is_default', 'content', 'mcontent', 'open_rss', 'regdate');
|
||||
$updateList = array('module_category_srl','layout_srl','skin','mlayout_srl','mskin','description','header_text','footer_text'); //use_mobile
|
||||
foreach($updateList as $key=>$val)
|
||||
{
|
||||
if(!$vars->{$val} && $vars->{$val} !== 0)
|
||||
{
|
||||
unset($updateList[$key]);
|
||||
$columnList[] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($module_srls as $module_srl) {
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
$module_info->module_category_srl = $vars->module_category_srl;
|
||||
$module_info->layout_srl = $vars->layout_srl;
|
||||
$module_info->skin = $vars->skin;
|
||||
$module_info->description = $vars->description;
|
||||
$module_info->header_text = $vars->header_text;
|
||||
$module_info->footer_text = $vars->footer_text;
|
||||
|
||||
foreach($updateList as $val)
|
||||
{
|
||||
$module_info->{$val} = $vars->{$val};
|
||||
}
|
||||
$output = $oModuleController->updateModule($module_info);
|
||||
}
|
||||
|
||||
|
|
@ -583,6 +632,13 @@
|
|||
foreach($mid_list as $module => $val) {
|
||||
if(!$selected_module) $selected_module = $module;
|
||||
$xml_info = $oModuleModel->getModuleInfoXml($module);
|
||||
|
||||
if(!$xml_info)
|
||||
{
|
||||
unset($mid_list[$module]);
|
||||
continue;
|
||||
}
|
||||
|
||||
$mid_list[$module]->title = $xml_info->title;
|
||||
|
||||
// change module category srl to title
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@
|
|||
$security = new Security();
|
||||
$security->encodeHTML('group_list..title');
|
||||
$security->encodeHTML('group_list..description');
|
||||
$security->encodeHTML('admin_member..nick_name');
|
||||
|
||||
// Get information of module_grants
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
|
|
@ -116,16 +117,57 @@
|
|||
* @brief Common:: skin setting page for the module
|
||||
**/
|
||||
function getModuleSkinHTML($module_srl) {
|
||||
return $this->_getModuleSkinHTML($module_srl, 'P');
|
||||
}
|
||||
|
||||
/**
|
||||
* Common:: skin setting page for the module (mobile)
|
||||
*
|
||||
* @param $module_srl sequence of module
|
||||
* @return string The html code
|
||||
*/
|
||||
function getModuleMobileSkinHTML($module_srl)
|
||||
{
|
||||
return $this->_getModuleSkinHtml($module_srl, 'M');
|
||||
}
|
||||
|
||||
/**
|
||||
* Skin setting page for the module
|
||||
*
|
||||
* @param $module_srl sequence of module
|
||||
* @param $mode P or M
|
||||
* @return string The HTML code
|
||||
*/
|
||||
function _getModuleSkinHTML($module_srl, $mode)
|
||||
{
|
||||
$mode = $mode === 'P' ? 'P' : 'M';
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
if(!$module_info) return;
|
||||
|
||||
$skin = $module_info->skin;
|
||||
if($mode === 'P')
|
||||
{
|
||||
$skin = $module_info->skin;
|
||||
}
|
||||
else
|
||||
{
|
||||
$skin = $module_info->mskin;
|
||||
}
|
||||
|
||||
$module_path = './modules/'.$module_info->module;
|
||||
// Get XML information of the skin
|
||||
$skin_info = $oModuleModel->loadSkinInfo($module_path, $skin);
|
||||
// Get skin information set in DB
|
||||
$skin_vars = $oModuleModel->getModuleSkinVars($module_srl);
|
||||
|
||||
// Get XML information of the skin and skin sinformation set in DB
|
||||
if($mode === 'P')
|
||||
{
|
||||
$skin_info = $oModuleModel->loadSkinInfo($module_path, $skin);
|
||||
$skin_vars = $oModuleModel->getModuleSkinVars($module_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$skin_info = $oModuleModel->loadSkinInfo($module_path, $skin, 'm.skins');
|
||||
$skin_vars = $oModuleModel->getModuleMobileSkinVars($module_srl);
|
||||
}
|
||||
|
||||
if(count($skin_info->extra_vars)) {
|
||||
foreach($skin_info->extra_vars as $key => $val) {
|
||||
|
|
@ -143,7 +185,8 @@
|
|||
Context::set('module_info', $module_info);
|
||||
Context::set('mid', $module_info->mid);
|
||||
Context::set('skin_info', $skin_info);
|
||||
Context::set('skin_vars', $skin_vars);
|
||||
Context::set('skin_vars', $skin_vars);
|
||||
Context::set('mode', $mode);
|
||||
|
||||
//Security
|
||||
$security = new Security();
|
||||
|
|
@ -153,7 +196,7 @@
|
|||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($this->module_path.'tpl', 'skin_config');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get values for a particular language code
|
||||
|
|
|
|||
|
|
@ -79,6 +79,18 @@
|
|||
|
||||
if(!is_dir('./files/ruleset')) return true;
|
||||
|
||||
$args->skin = '.';
|
||||
$output = executeQueryArray('module.getModuleSkinDotList', $args);
|
||||
if($output->data && count($output->data) > 0)
|
||||
{
|
||||
foreach($output->data as $item)
|
||||
{
|
||||
$skin_path = explode('.', $item->skin);
|
||||
if(count($skin_path) != 2) continue;
|
||||
if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/modules/%s', $skin_path[0], $skin_path[1]))) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -315,6 +327,24 @@
|
|||
$oDB->addColumn('module_config', 'site_srl', 'number', 11, 0, true);
|
||||
}
|
||||
FileHandler::makeDir('./files/ruleset');
|
||||
|
||||
$args->skin = '.';
|
||||
$output = executeQueryArray('module.getModuleSkinDotList', $args);
|
||||
if($output->data && count($output->data) > 0)
|
||||
{
|
||||
foreach($output->data as $item)
|
||||
{
|
||||
$skin_path = explode('.', $item->skin);
|
||||
if(count($skin_path) != 2) continue;
|
||||
if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/modules/%s', $skin_path[0], $skin_path[1])))
|
||||
{
|
||||
unset($args);
|
||||
$args->skin = $item->skin;
|
||||
$args->new_skin = implode('|@|', $skin_path);
|
||||
$output = executeQuery('module.updateSkinAll', $args);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -472,23 +472,10 @@
|
|||
|
||||
/**
|
||||
* @brief Change other information of the module
|
||||
**/
|
||||
* @deprecated
|
||||
*/
|
||||
function updateModuleSkinVars($module_srl, $skin_vars) {
|
||||
// skin_vars setting
|
||||
$args->module_srl = $module_srl;
|
||||
$args->skin_vars = $skin_vars;
|
||||
$output = executeQuery('module.updateModuleSkinVars', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_module_skin_vars:'.$module_srl;
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
|
||||
return $output;
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -590,12 +577,44 @@
|
|||
return executeQuery('module.deleteAdminId', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Insert skin vars to a module
|
||||
* @param $module_srl Sequence of module
|
||||
* @param $obj Skin variables
|
||||
*/
|
||||
function insertModuleSkinVars($module_srl, $obj)
|
||||
{
|
||||
return $this->_insertModuleSkinVars($module_srl, $obj, 'P');
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert mobile skin vars to a module
|
||||
* @param $module_srl Sequence of module
|
||||
* @param $obj Skin variables
|
||||
*/
|
||||
function insertModuleMobileSkinVars($module_srl, $obj)
|
||||
{
|
||||
return $this->_insertModuleSkinVars($module_srl, $obj, 'M');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Insert skin vars to a module
|
||||
**/
|
||||
function insertModuleSkinVars($module_srl, $obj) {
|
||||
$this->deleteModuleSkinVars($module_srl);
|
||||
if(!$obj || !count($obj)) return;
|
||||
function _insertModuleSkinVars($module_srl, $obj, $mode) {
|
||||
$mode = $mode === 'P' ? 'P' : 'M';
|
||||
|
||||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$output = $this->_deleteModuleSkinVars($module_srl, $mode);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
if(!$obj || !count($obj)) return new Object();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
foreach($obj as $key => $val) {
|
||||
|
|
@ -609,25 +628,70 @@
|
|||
$args->name = trim($key);
|
||||
$args->value = trim($val);
|
||||
if(!$args->name || !$args->value) continue;
|
||||
executeQuery('module.insertModuleSkinVars', $args);
|
||||
|
||||
if($mode === 'P')
|
||||
{
|
||||
$output = executeQuery('module.insertModuleSkinVars', $args);
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = executeQuery('module.insertModuleMobileSkinVars', $args);
|
||||
}
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
$oDB->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
$oDB->commit;
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove skin vars ofa module
|
||||
* @param $module_srl seqence of module
|
||||
*/
|
||||
function deleteModuleSkinVars($module_srl)
|
||||
{
|
||||
return $this->_deleteModuleSkinVars($module_srl, 'P');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove mobile skin vars ofa module
|
||||
* @param $module_srl seqence of module
|
||||
*/
|
||||
function deleteModuleMobileSkinVars($module_srl)
|
||||
{
|
||||
return $this->_deleteModuleSkinVars($module_srl, 'M');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Remove skin vars of a module
|
||||
**/
|
||||
function deleteModuleSkinVars($module_srl) {
|
||||
function _deleteModuleSkinVars($module_srl, $mode) {
|
||||
$args->module_srl = $module_srl;
|
||||
$mode = $mode === 'P' ? 'P' : 'M';
|
||||
|
||||
if($mode === 'P')
|
||||
{
|
||||
$cache_key = 'object_module_skin_vars:'.$module_srl;
|
||||
$query = 'module.deleteModuleSkinVars';
|
||||
}
|
||||
else
|
||||
{
|
||||
$cache_key = 'object_module_mobile_skin_vars:'.$module_srl;
|
||||
$query = 'module.deleteModuleMobileSkinVars';
|
||||
}
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_module_skin_vars:'.$module_srl;
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
|
||||
return executeQuery('module.deleteModuleSkinVars', $args);
|
||||
return executeQuery($query, $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@
|
|||
}
|
||||
if($output->toBool() && $output->data && $vid) {
|
||||
Context::set('vid', $output->data->domain, true);
|
||||
if($mid==$output->data->domain) Context::set('mid',$output->data->mid,true);
|
||||
if(strtolower($mid)==strtolower($output->data->domain)) Context::set('mid',$output->data->mid,true);
|
||||
}
|
||||
if(!$output || !$output->data) { $domain = ''; unset($output); }
|
||||
}
|
||||
|
|
@ -740,6 +740,10 @@
|
|||
|
||||
foreach($extra_var_groups as $group) {
|
||||
$extra_vars = $group->var;
|
||||
if(!$extra_vars)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if(!is_array($group->var)) $extra_vars = array($group->var);
|
||||
|
||||
foreach($extra_vars as $key => $val) {
|
||||
|
|
@ -895,7 +899,7 @@
|
|||
$title = $color->title->body;
|
||||
$screenshot = $color->attrs->src;
|
||||
if($screenshot) {
|
||||
$screenshot = sprintf("%sskins/%s/%s", $path, $skin, $screenshot);
|
||||
$screenshot = sprintf("%s%s/%s/%s", $path, $dir, $skin, $screenshot);
|
||||
if(!file_exists($screenshot)) $screenshot = "";
|
||||
} else $screenshot = "";
|
||||
|
||||
|
|
@ -1128,17 +1132,17 @@
|
|||
if(!is_dir(FileHandler::getRealPath($path))) continue;
|
||||
|
||||
// Get the number of xml files to create a table in schemas
|
||||
$tmp_files = FileHandler::readDir($path."schemas", '/(\.xml)$/');
|
||||
$tmp_files = FileHandler::readDir($path.'schemas', '/(\.xml)$/');
|
||||
$table_count = count($tmp_files);
|
||||
// Check if the table is created
|
||||
$created_table_count = 0;
|
||||
for($j=0;$j<count($tmp_files);$j++) {
|
||||
list($table_name) = explode(".",$tmp_files[$j]);
|
||||
for($j=0;$j<$table_count;$j++) {
|
||||
list($table_name) = explode('.',$tmp_files[$j]);
|
||||
if($oDB->isTableExists($table_name)) $created_table_count ++;
|
||||
}
|
||||
// Get information of the module
|
||||
$info = NULL;
|
||||
$info = $this->getModuleInfoXml($module_name);
|
||||
unset($obj);
|
||||
|
||||
$info->module = $module_name;
|
||||
$info->category = $info->category;
|
||||
|
|
@ -1292,15 +1296,67 @@
|
|||
**/
|
||||
function syncSkinInfoToModuleInfo(&$module_info) {
|
||||
if(!$module_info->module_srl) return;
|
||||
|
||||
if(Mobile::isFromMobilePhone())
|
||||
{
|
||||
$cache_key = 'object_module_mobile_skin_vars:' . $module_info->module_srl;
|
||||
$query = 'module.getModuleMobileSkinVars';
|
||||
}
|
||||
else
|
||||
{
|
||||
$cache_key = 'object_module_skin_vars:' . $module_info->module_srl;
|
||||
$query = 'module.getModuleSkinVars';
|
||||
}
|
||||
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport()){
|
||||
$cache_key = 'object_module_skin_vars:'.$module_info->module_srl;
|
||||
$output = $oCacheHandler->get($cache_key);
|
||||
}
|
||||
if(!$output) {
|
||||
$args->module_srl = $module_info->module_srl;
|
||||
$output = executeQueryArray('module.getModuleSkinVars',$args);
|
||||
$output = executeQueryArray($query,$args);
|
||||
//insert in cache
|
||||
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key,$output);
|
||||
}
|
||||
if(!$output->toBool() || !$output->data) return;
|
||||
|
||||
foreach($output->data as $val) {
|
||||
if(isset($module_info->{$val->name})) continue;
|
||||
$module_info->{$val->name} = $val->value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mobile skin information of the module
|
||||
* @param $module_srl Sequence of module
|
||||
* @return array
|
||||
**/
|
||||
function getModuleMobileSkinVars($module_srl) {
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQueryArray('module.getModuleMobileSkinVars',$args);
|
||||
if(!$output->toBool() || !$output->data) return;
|
||||
|
||||
$skin_vars = array();
|
||||
foreach($output->data as $val) $skin_vars[$val->name] = $val;
|
||||
return $skin_vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Combine skin information with module information
|
||||
* @param $module_info Module information
|
||||
**/
|
||||
function syncMobileSkinInfoToModuleInfo(&$module_info) {
|
||||
if(!$module_info->module_srl) return;
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport()){
|
||||
$cache_key = 'object_module_mobile_skin_vars:'.$module_info->module_srl;
|
||||
$output = $oCacheHandler->get($cache_key);
|
||||
}
|
||||
if(!$output) {
|
||||
$args->module_srl = $module_info->module_srl;
|
||||
$output = executeQueryArray('module.getModuleMobileSkinVars',$args);
|
||||
//insert in cache
|
||||
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key,$output);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
<query id="updateModuleSkinVars" action="update">
|
||||
<query id="deleteModuleMobileSkinVars" action="delete">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
<table name="module_mobile_skins" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="skin_vars" var="skin_vars" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
8
modules/module/queries/getModuleMobileSkinVars.xml
Normal file
8
modules/module/queries/getModuleMobileSkinVars.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="getModuleMobileSkinVars" action="select">
|
||||
<tables>
|
||||
<table name="module_mobile_skins" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="in" column="module_srl" var="module_srl" notnull="notnull" filter="number" />
|
||||
</conditions>
|
||||
</query>
|
||||
15
modules/module/queries/getModuleSkinDotList.xml
Normal file
15
modules/module/queries/getModuleSkinDotList.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<query id="getModuleSkinDotList" action="select">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module" />
|
||||
<column name="skin" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="like" column="skin" var="skin" default="." />
|
||||
</conditions>
|
||||
<groups>
|
||||
<group column="skin" />
|
||||
</groups>
|
||||
</query>
|
||||
10
modules/module/queries/insertModuleMobileSkinVars.xml
Normal file
10
modules/module/queries/insertModuleMobileSkinVars.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<query id="insertModuleMobileSkinVars" action="insert">
|
||||
<tables>
|
||||
<table name="module_mobile_skins" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="name" var="name" notnull="notnull" />
|
||||
<column name="value" var="value" notnull="notnull" />
|
||||
</columns>
|
||||
</query>
|
||||
11
modules/module/queries/updateSkinAll.xml
Normal file
11
modules/module/queries/updateSkinAll.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="updateSkinAll" action="update">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="skin" var="new_skin" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="skin" var="skin" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -6,6 +6,5 @@
|
|||
<field name="module_srls" required="true" />
|
||||
<field name="module_category_srl" rule="number" />
|
||||
<field name="layout_srl" rule="number" />
|
||||
<field name="skin" required="true" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
|
|||
5
modules/module/schemas/module_mobile_skins.xml
Normal file
5
modules/module/schemas/module_mobile_skins.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<table name="module_mobile_skins">
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" unique="unique_module_mobile_skins" />
|
||||
<column name="name" type="varchar" size="80" notnull="notnull" unique="unique_module_mobile_skins" />
|
||||
<column name="value" type="text" />
|
||||
</table>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
<h1 class="h1">{$lang->menu_gnb_sub['filebox']}</h1>
|
||||
<div class="fileBox">
|
||||
<form action="" class="portlet form" method="post" enctype="multipart/form-data">
|
||||
<form action="./" class="portlet form" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="module" />
|
||||
<input type="hidden" name="act" value="procModuleFileBoxAdd" />
|
||||
<input type="hidden" name="vid" value="{$vid}" />
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form action="" class="form">
|
||||
<form action="./" class="form">
|
||||
<ul>
|
||||
<li loop="$filebox_list=>$key,$val">
|
||||
<!--@foreach($val->attributes as $key => $value)-->
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
<form action="" class="pagination" method="post">
|
||||
<form action="./" class="pagination" method="post">
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
<input cond="$childrenList" type="hidden" name="childrenList" value="{$childrenList}" />
|
||||
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
|
||||
|
||||
<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}
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
<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}" />
|
||||
|
|
|
|||
|
|
@ -56,5 +56,5 @@
|
|||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} ›</a>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="{getUrl('','module','module','act','dispModuleFileBoxAdd','filter',$filter,'input',$input)}">{$lang->cmd_registration}</a></span>
|
||||
<span class="btn"><a href="{getUrl('','module','module','act','dispModuleFileBoxAdd','filter',$filter,'input',$input)}">{$lang->cmd_registration}</a></span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<p class="q"><label for="module_category_srl">{$lang->module_category}</label></p>
|
||||
<p class="a">
|
||||
<select name="module_category_srl" id="module_category_srl">
|
||||
<option value="" selected="selected">{$lang->keep_existing_value}</option>
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<!--@foreach($module_category as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($module_info->module_category_srl==$key)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
|
|
@ -22,6 +23,7 @@
|
|||
<p class="q"><label for="layout_srl">{$lang->layout}</label></p>
|
||||
<p class="a">
|
||||
<select name="layout_srl" id="layout_srl">
|
||||
<option value="" selected="selected">{$lang->keep_existing_value}</option>
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<!--@foreach($layout_list as $key => $val)-->
|
||||
<option value="{$val->layout_srl}" <!--@if($module_info->layout_srl==$val->layout_srl)-->selected="selected"<!--@end-->>{$val->title} ({$val->layout})</option>
|
||||
|
|
@ -34,13 +36,41 @@
|
|||
<p class="q"><label for="skin">{$lang->skin}</label></p>
|
||||
<p class="a">
|
||||
<select name="skin" id="skin">
|
||||
<option value="" selected="selected">{$lang->keep_existing_value}</option>
|
||||
<!--@foreach($skin_list as $key=>$val)-->
|
||||
<option value="{$key}" <!--@if($module_info->skin==$key ||(!$module_info->skin && $key=='xe_board'))-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<option value="{$key}" <!--@if($module_info->skin==$key)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</p>
|
||||
<p class="desc">{$lang->about_skin}</p>
|
||||
</li>
|
||||
<!--li>
|
||||
<p class="q"><label for="layout_srl">{$lang->mobile_view}</label></p>
|
||||
<p class="a">
|
||||
<input type="checkbox" name="use_mobile" id="use_mobile" value="Y" checked="checked"|cond="$module_info->use_mobile == 'Y'" /> <label for="use_mobile">{$lang->mobile_view}</label>
|
||||
<input type="checkbox" name="keep_mobile_value" id="keep_mobile_value" value="Y" checked="checked"|cond="$module_info->use_mobile == 'Y'" /> <label for="use_mobile">{$lang->mobile_view}</label>
|
||||
|
||||
</p>
|
||||
</li-->
|
||||
<li>
|
||||
<p class="q"><label for="mlayout_srl">{$lang->mobile_layout}</label></p>
|
||||
<p class="a">
|
||||
<select name="mlayout_srl" id="layout_srl">
|
||||
<option value="" selected="selected">{$lang->keep_existing_value}</option>
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<option loop="$mlayout_list => $key, $val" value="{$val->layout_srl}" selected="selected"|cond="$module_info->mlayout_srl== $val->layout_srl">{$val->title} ({$val->layout})</option>
|
||||
</select>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="mskin">{$lang->mobile_skin}</label></p>
|
||||
<p class="a">
|
||||
<select name="mskin" id="mskin">
|
||||
<option value="" selected="selected">{$lang->keep_existing_value}</option>
|
||||
<option loop="$mskin_list=> $key, $val" value="{$key}" selected="selected"|cond="$module_info->mskin== $key">{$val->title}</option>
|
||||
</select>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="description">{$lang->description}</label></p>
|
||||
<p class="a">
|
||||
|
|
@ -73,4 +103,4 @@
|
|||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
<p class="q"><label for="module_category_srl">{$lang->module_category}</label></p>
|
||||
<p class="a">
|
||||
<select name="module_category_srl" id="module_category_srl">
|
||||
<option value="" selected="selected">{$lang->keep_existing_value}</option>
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<!--@foreach($module_category as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($module_info->module_category_srl==$key)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
|
|
@ -24,6 +25,7 @@
|
|||
<p class="q"><label for="layout_srl">{$lang->layout}</label></p>
|
||||
<p class="a">
|
||||
<select name="layout_srl" id="layout_srl">
|
||||
<option value="" selected="selected">{$lang->keep_existing_value}</option>
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<!--@foreach($layout_list as $key => $val)-->
|
||||
<option value="{$val->layout_srl}" <!--@if($module_info->layout_srl==$val->layout_srl)-->selected="selected"<!--@end-->>{$val->title} ({$val->layout})</option>
|
||||
|
|
@ -36,8 +38,9 @@
|
|||
<p class="q"><label for="skin">{$lang->skin}</label></p>
|
||||
<p class="a">
|
||||
<select name="skin" id="skin">
|
||||
<option value="" selected="selected">{$lang->keep_existing_value}</option>
|
||||
<!--@foreach($skin_list as $key=>$val)-->
|
||||
<option value="{$key}" <!--@if($module_info->skin==$key ||(!$module_info->skin && $key=='xe_board'))-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<option value="{$key}" <!--@if($module_info->skin==$key)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -1,142 +1,133 @@
|
|||
<form action="{Context::getRequestUri()}" method="post" enctype="multipart/form-data" target="hidden_iframe" class="form">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<form action="./" method="post" enctype="multipart/form-data" class="form">
|
||||
<input type="hidden" name="module" value="module" />
|
||||
<input type="hidden" name="vid" value="{$vid}" />
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="act" value="procModuleAdminUpdateSkinInfo" />
|
||||
<input type="hidden" name="_mode" value="{$mode}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
|
||||
<h2 class="h2">{$lang->skin_default_info}</h2>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin}</th>
|
||||
<td >{$skin_info->title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin_author}</th>
|
||||
<td loop="$skin_info->author=>$author">
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q">{$lang->skin}</p>
|
||||
<p class="a">{$skin_info->title}</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->skin_author}</p>
|
||||
<p class="a">
|
||||
<block loop="$skin_info->author=>$author">
|
||||
{$author->name}
|
||||
<block cond="$author->homepage || $author->email_address">
|
||||
(<a href="{$author->homepage}" onclick="window.open(this.href);return false;" cond="$author->homepage">{$author->homepage}</a>
|
||||
<block cond="$author->homepage && $author->email_address">, </block>
|
||||
<a href="mailto:{$author->email_address}" cond="$author->email_address">{$author->email_address}</a>)
|
||||
</block><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr cond="$skin_info->homepage">
|
||||
<th scope="row">{$lang->homepage}</th>
|
||||
<td><a href="{$skin_info->homepage}" onclick="window.open(this.href);return false;">{$skin_info->homepage}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->date}</th>
|
||||
<td>{zdate($skin_info->date, 'Y-m-d')} </td>
|
||||
</tr>
|
||||
<tr cond="$skin_info->license || $skin_info->license_link">
|
||||
<th scope="row">{$lang->skin_license}</th>
|
||||
<td>
|
||||
{nl2br(trim($skin_info->license))}
|
||||
<p cond="$skin_info->license_link"><a href="{$skin_info->license_link}" onclick="window.close(); return false;">{$skin_info->license_link}</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr cond="$skin_info->description">
|
||||
<th scope="row">{$lang->description}</th>
|
||||
<td>{nl2br(trim($skin_info->description))}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</block>
|
||||
</p>
|
||||
</li>
|
||||
<li cond="$skin_info->homepage">
|
||||
<p class="q">{$lang->homepage}</p>
|
||||
<p class="a"><a href="{$skin_info->homepage}" onclick="window.open(this.href);return false;">{$skin_info->homepage}</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->date}</p>
|
||||
<p class="a">{zdate($skin_info->date, 'Y-m-d')}</p>
|
||||
</li>
|
||||
<li cond="$skin_info->license || $skin_info->license_link">
|
||||
<p class="q">{$lang->skin_license}</p>
|
||||
<p class="a">{nl2br(trim($skin_info->license))}</p>
|
||||
<p cond="$skin_info->license_link"><a href="{$skin_info->license_link}" onclick="window.close(); return false;">{$skin_info->license_link}</a></p>
|
||||
</li>
|
||||
<li cond="$skin_info->description">
|
||||
<p class="q">{$lang->description}</p>
|
||||
<p class="a">{nl2br(trim($skin_info->description))}</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2 class="h2">{$lang->extra_vars}</h2>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr valign="top" cond="$skin_info->colorset">
|
||||
<th scope="row">{$lang->colorset}</th>
|
||||
<td>
|
||||
<!--@foreach($skin_info->colorset as $key => $val)-->
|
||||
<ul>
|
||||
<li cond="$skin_info->colorset" class="colorset">
|
||||
<p class="q">{$lang->colorset}</p>
|
||||
<div class="a">
|
||||
<block loop="$skin_info->colorset => $key, $val">
|
||||
<!--@if($val->screenshot)-->
|
||||
{@ $_img_info = getImageSize($val->screenshot); $_height = $_img_info[1]+40; $_width = $_img_info[0]+20; $_talign = "center"; }
|
||||
<!--@else-->
|
||||
{@ $_width = 200; $_height = 20; $_talign = "left"; }
|
||||
<!--@end-->
|
||||
<div style="float:left;text-align:{$_talign};margin-bottom:1em;width:{$_width}px;height:{$_height}px;margin-right:10px;">
|
||||
<input type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" <!--@if($skin_vars['colorset']->value==$val->name)-->checked="checked"<!--@end-->/>
|
||||
<div style="display:inline-block;text-align:{$_talign};margin-bottom:1em;width:{$_width}px;height:{$_height}px;margin-right:10px;">
|
||||
<input type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" checked="checked"|cond="$skin_vars['colorset']->value==$val->name" />
|
||||
<label for="colorset_{$key}">{$val->title}</label>
|
||||
<!--@if($val->screenshot)-->
|
||||
<br />
|
||||
<img src="../../../{$val->screenshot}" alt="{$val->title}" style="border:1px solid #888888;padding:2px;margin:2px;"/>
|
||||
<!--@end-->
|
||||
<block cond="$val->screenshot">
|
||||
<br />
|
||||
<img src="../../../{$val->screenshot}" alt="{$val->title}" style="border:1px solid #888888;padding:2px;margin:2px;"/>
|
||||
</block>
|
||||
</div>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@foreach($skin_info->extra_vars as $key => $val)-->
|
||||
|
||||
<!--@if($val->group && ((!$group) || $group != $val->group))-->
|
||||
{@$group = $val->group}
|
||||
</table>
|
||||
</div>
|
||||
<h2 class="h2">{$group}</h2>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th scope="row">{$val->title}</th>
|
||||
<td >
|
||||
<!--@if($val->type=="text")-->
|
||||
<input type="text" name="{$val->name}" value="{$val->value}" id="target{$val->name}" />
|
||||
<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','target'.$val->name)}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
|
||||
|
||||
<!--@elseif($val->type=="textarea")-->
|
||||
<textarea name="{$val->name}" id="target{$val->name}" rows="8" cols="42">{$val->value}</textarea>
|
||||
<a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','target'.$val->name)}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>
|
||||
|
||||
<!--@elseif($val->type=="select")-->
|
||||
</block>
|
||||
</div>
|
||||
</li>
|
||||
<block loop="$skin_info->extra_vars => $key, $val">
|
||||
<block cond="$val->group && ((!$group) || $group != $val->group)">
|
||||
{@$group = $val->group}
|
||||
</ul>
|
||||
<h2 class="h2">{$group}</h2>
|
||||
<ul>
|
||||
</block>
|
||||
<li>
|
||||
<p class="q">{$val->title}</p>
|
||||
<p cond="$val->type == 'text'" class="a multiLangEdit">
|
||||
{@$use_multilang = true}
|
||||
<input type="hidden" name="{$val->name}" value="<!--@if(strpos($val->value, '$user_lang->') === false)-->{$val->value}<!--@else-->{htmlspecialchars($val->value)}<!--@end-->" class="vLang" />
|
||||
<input type="text" value="{$val->value}" class="vLang" />
|
||||
<span class="desc"><a href="#langEdit" class="editUserLang tgAnchor">{$lang->cmd_set_multilingual}</a></span>
|
||||
</p>
|
||||
<div cond="$val->type == 'textarea'" class="a multiLangEdit">
|
||||
{@$use_multilang_textarea = true}
|
||||
<input type="hidden" name="{$val->name}" value="<!--@if(strpos($val->value, '$user_lang->') === false)-->{$val->value}<!--@else-->{htmlspecialchars($val->value)}<!--@end-->" class="vLang" />
|
||||
<textarea rows="8" cols="42" class="vLang">{$val->value}</textarea>
|
||||
<span class="desc"><a href="#langEditTextarea" class="editUserLang tgAnchor">{$lang->cmd_set_multilingual}</a></span>
|
||||
</div>
|
||||
<p cond="$val->type == 'select'" class="a">
|
||||
<select name="{$val->name}">
|
||||
<!--@foreach($val->options as $k=>$v)-->
|
||||
<option value="{$v->value}" selected="selected"|cond="$v->value == $val->value">{$v->title}</option>
|
||||
<!--@end-->
|
||||
<option loop="$val->options => $k, $v" value="{$v->value}" selected="selected"|cond="$v->value == $val->value">{$v->title}</option>
|
||||
</select>
|
||||
|
||||
<!--@elseif($val->type=="checkbox")-->
|
||||
<!--@foreach($val->options as $k=>$v)-->
|
||||
<span>
|
||||
</p>
|
||||
<p cond="$val->type == 'checkbox'" class="a">
|
||||
<span loop="$val->options => $k, $v">
|
||||
<input type="checkbox" name="{$val->name}[]" value="{$v->value}" id="ch_{$key}_{$k}" checked="checked"|cond="in_array($v->value, $val->value)" class="checkbox" />
|
||||
<label for="ch_{$key}_{$k}">{$v->title}</label>
|
||||
</span>
|
||||
<!--@end-->
|
||||
|
||||
<!--@elseif($val->type=="radio")-->
|
||||
<!--@foreach($val->options as $k=>$v)-->
|
||||
<span>
|
||||
</p>
|
||||
<p cond="$val->type == 'radio'" class="a">
|
||||
<span loop="$val->options => $k, $v">
|
||||
<input type="radio" name="{$val->name}" value="{$v->value}" id="ch_{$key}_{$k}" checked="checked"|cond="$v->value==$val->value" />
|
||||
<label for="ch_{$key}_{$k}">{$v->title}</label>
|
||||
</span>
|
||||
<!--@end-->
|
||||
|
||||
<!--@elseif($val->type=="image")-->
|
||||
<!--@if($val->value)-->
|
||||
<div>
|
||||
</p>
|
||||
<div cond="$val->type == 'image'" class="a">
|
||||
<div cond="$val->value">
|
||||
<img src="{$val->value}" /><br />
|
||||
<input type="checkbox" name="del_{$val->name}" value="Y" id="del_{$val->name}" class="checkbox" />
|
||||
<label for="del_{$val->name}">{$lang->cmd_delete}</label>
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<input type="file" name="{$val->name}" value="" />
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
<!--@if($val->description)-->
|
||||
<p class="desc">{nl2br(trim($val->description))}</p>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
</div>
|
||||
<p cond="$val->description" class="desc">{nl2br(trim($val->description))}</p>
|
||||
</li>
|
||||
</block>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<iframe name="hidden_iframe" frameborder="0" style="display:none"></iframe>
|
||||
<include target="../../module/tpl/include.multilang.html" />
|
||||
<include target="../../module/tpl/include.multilang.textarea.html" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue