merge from 1.5.3.2(r11162 ~ r11201)

and from luminous (r11141 ~ r11193)

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11202 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2012-09-11 02:52:49 +00:00
parent 773a666d12
commit 42eb19ae10
32 changed files with 340 additions and 131 deletions

View file

@ -1 +1 @@
.xe_content img { max-width:100%; height:auto; }
.xe_content img{max-width:100%;height:auto !important}

View file

@ -90,10 +90,14 @@ function getScreen() {
$("#xe_gallery_controls,#xe_gallery_screen").css({
display:"block",
width : clientWidth + "px",
height : clientHeight + "px",
left : $(document).scrollLeft(),
top : $(document).scrollTop()
width : $(document).width() + "px",
height : $(document).height() + "px",
left : 0,
top : 0
//width : clientWidth + "px",
//height : clientHeight + "px",
// left : $(document).scrollLeft(),
// top : $(document).scrollTop()
});
closebtn.css("left", Math.round((clientWidth-60)/2) + "px");
@ -126,8 +130,13 @@ function getScreen() {
if(!src) src = this.list.eq(this.index).attr("src");
imgframe.attr("src", src).css({
left : Math.round( Math.max( (clientWidth-imgframe.width()-14)/2, 0 ) ) + "px",
top : Math.round( Math.max( (clientHeight-imgframe.height()-14)/2, 0 ) ) + "px"
left : Math.round( Math.max( parseInt($(document).scrollLeft()) + (clientWidth-imgframe.width()-14)/2, 0 ) ) + "px",
top : Math.round( Math.max( parseInt($(document).scrollTop()) + (clientHeight-imgframe.height()-14)/2, 0 ) ) + "px"
});
closebtn.css({
left : Math.round( Math.max( parseInt($(document).scrollLeft()) + (clientWidth-closebtn.width())/2, 0 ) ) + "px",
top : Math.round( Math.max( parseInt($(document).scrollTop()) + 10, 0 ) ) + "px"
});
};

View file

@ -1,9 +1,7 @@
/**
* @brief 화면내에서 상위 영역보다 이미지가 크면 리사이즈를 하고 클릭시 원본을 보여줄수 있도록 변경
**/
(function($){var xScreen=null;function getScreen(){var body=$(document.body);var controls,imgframe,closebtn,prevbtn,nextbtn;if(!xScreen){xScreen=$("<div>").attr("id","xe_gallery_screen").css({position:"absolute",display:"none",backgroundColor:"black",zIndex:500,opacity:0.5});controls=$("<div>").attr("id","xe_gallery_controls").css({position:"absolute",display:"none",overflow:"hidden",zIndex:510});closebtn=$("<img>").attr("id","xe_gallery_closebtn").attr("src",request_uri+"addons/resize_image/iconClose.png").css({top:"10px"}).click(function(){xScreen.xeHide()}).appendTo(controls);prevbtn=$("<img>").attr("id","xe_gallery_prevbtn").attr("src",request_uri+"addons/resize_image/iconLeft.png").css("left","10px").click(function(){xScreen.xePrev()}).appendTo(controls);nextbtn=$("<img>").attr("id","xe_gallery_nextbtn").attr("src",request_uri+"addons/resize_image/iconRight.png").css("right","10px").click(function(){xScreen.xeNext()}).appendTo(controls);controls.find("img").attr({width:60,height:60,className:"iePngFix"}).css({position:"absolute",width:"60px",height:"60px",zIndex:530,cursor:"pointer"});imgframe=$("<img>").attr("id","xe_gallery_holder").css("border","7px solid white").css("zIndex",520).appendTo(controls).draggable();body.append(xScreen).append(controls);xScreen.xeShow=function(){var clientWidth=$(window).width();var clientHeight=$(window).height();$("#xe_gallery_controls,#xe_gallery_screen").css({display:"block",width:clientWidth+"px",height:clientHeight+"px",left:$(document).scrollLeft(),top:$(document).scrollTop()});closebtn.css("left",Math.round((clientWidth-60)/2)+"px");$("#xe_gallery_prevbtn,#xe_gallery_nextbtn").css("top",Math.round((clientHeight-60)/2)+"px");this.xeMove(0);};xScreen.xeHide=function(event){xScreen.css("display","none");controls.css("display","none");};xScreen.xePrev=function(){this.xeMove(-1);};xScreen.xeNext=function(){this.xeMove(1);};xScreen.xeMove=function(val){var clientWidth=$(window).width();var clientHeight=$(window).height();this.index+=val;prevbtn.css("visibility",(this.index>0)?"visible":"hidden");nextbtn.css("visibility",(this.index<this.list.size()-1)?"visible":"hidden");var src=this.list.eq(this.index).attr("rawsrc");if(!src)src=this.list.eq(this.index).attr("src");imgframe.attr("src",src).css({left:Math.round(Math.max((clientWidth-imgframe.width()-14)/2,0))+"px",top:Math.round(Math.max((clientHeight-imgframe.height()-14)/2,0))+"px"});};$(document).keydown(xScreen.xeHide);}else{controls=$("#xe_gallery_controls");imgframe=$("#xe_gallery_holder");closebtn=$("#xe_gallery_closebtn");prevbtn=$("#xe_gallery_prevbtn");nextbtn=$("#xe_gallery_nextbtn");}
return xScreen;}
function slideshow(event){var container=$(this).closest('.xe_content');var imglist=container.find("img[rel=xe_gallery]");var currentIdx=$.inArray($(this).get(0),imglist.get());var xScreen=getScreen();xScreen.list=imglist;xScreen.index=currentIdx;xScreen.xeShow();}
$(function(){var regx_skip=/(?:(modules|addons|classes|common|layouts|libs|widgets|widgetstyles)\/)/i;var regx_allow_i6pngfix=/(?:common\/tpl\/images\/blank\.gif$)/i;var dummy=$('<div style="height:1; overflow:hidden; opacity:0; display:block; clear:both;"></div>');function doResize(contentWidth,count){if(!count)count=0;if(count>=10)return;var $img=this;var beforSize={'width':$img.width(),'height':$img.height()};if(!beforSize.width||!beforSize.height){setTimeout(function(){doResize.call($img,contentWidth,++count)},200);return;}
if(beforSize.width<=contentWidth)return;var resize_ratio=contentWidth/beforSize.width;$img.removeAttr('width').removeAttr('height').css({'width':contentWidth,'height':parseInt(beforSize.height*resize_ratio,10)});}
$('div.xe_content').each(function(){dummy.appendTo(this);var contentWidth=dummy.width();dummy.remove();if(!contentWidth)return;$('img',this).each(function(){var $img=$(this);var imgSrc=$img.attr('src');if(regx_skip.test(imgSrc)&&!regx_allow_i6pngfix.test(imgSrc))return;$img.attr('rel','xe_gallery');doResize.call($img,contentWidth);});$('img[rel=xe_gallery]',this).live('mouseover',function(){var $img=$(this);if(!$img.parent('a').length&&!$img.attr('onclick')){$img.css('cursor','pointer').click(slideshow);}});});});})(jQuery);
(function($){var xScreen=null
function getScreen(){var body=$(document.body),controls,imgframe,closebtn,prevbtn,nextbtn;if(!xScreen){xScreen=$("<div>").attr("id","xe_gallery_screen").css({position:"absolute",display:"none",backgroundColor:"black",zIndex:500,opacity:0.5});controls=$("<div>").attr("id","xe_gallery_controls").css({position:"absolute",display:"none",overflow:"hidden",zIndex:510});closebtn=$("<img>").attr("id","xe_gallery_closebtn").attr("src",request_uri+"addons/resize_image/iconClose.png").css({top:"10px"}).click(function(){xScreen.xeHide()}).appendTo(controls);prevbtn=$("<img>").attr("id","xe_gallery_prevbtn").attr("src",request_uri+"addons/resize_image/iconLeft.png").css("left","10px").click(function(){xScreen.xePrev()}).appendTo(controls);nextbtn=$("<img>").attr("id","xe_gallery_nextbtn").attr("src",request_uri+"addons/resize_image/iconRight.png").css("right","10px").click(function(){xScreen.xeNext()}).appendTo(controls);controls.find("img").attr({width:60,height:60,className:"iePngFix"}).css({position:"absolute",width:"60px",height:"60px",zIndex:530,cursor:"pointer"});imgframe=$("<img>").attr("id","xe_gallery_holder").css("border","7px solid white").css("zIndex",520).appendTo(controls).draggable();body.append(xScreen).append(controls);xScreen.xeShow=function(){var clientWidth=$(window).width(),clientHeight=$(window).height();$("#xe_gallery_controls,#xe_gallery_screen").css({display:"block",width:$(document).width()+"px",height:$(document).height()+"px",left:0,top:0});closebtn.css("left",Math.round((clientWidth-60)/2)+"px");$("#xe_gallery_prevbtn,#xe_gallery_nextbtn").css("top",Math.round((clientHeight-60)/2)+"px");this.xeMove(0)};xScreen.xeHide=function(event){xScreen.css("display","none");controls.css("display","none")};xScreen.xePrev=function(){this.xeMove(-1)};xScreen.xeNext=function(){this.xeMove(1)};xScreen.xeMove=function(val){var clientWidth=$(window).width(),clientHeight=$(window).height();this.index+=val;prevbtn.css("visibility",(this.index>0)?"visible":"hidden");nextbtn.css("visibility",(this.index<this.list.size()-1)?"visible":"hidden");var src=this.list.eq(this.index).attr("rawsrc");if(!src)src=this.list.eq(this.index).attr("src");imgframe.attr("src",src).css({left:Math.round(Math.max(parseInt($(document).scrollLeft())+(clientWidth-imgframe.width()-14)/2,0))+"px",top:Math.round(Math.max(parseInt($(document).scrollTop())+(clientHeight-imgframe.height()-14)/2,0))+"px"});closebtn.css({left:Math.round(Math.max(parseInt($(document).scrollLeft())+(clientWidth-closebtn.width())/2,0))+"px",top:Math.round(Math.max(parseInt($(document).scrollTop())+10,0))+"px"})};$(document).keydown(xScreen.xeHide)}else{controls=$("#xe_gallery_controls");imgframe=$("#xe_gallery_holder");closebtn=$("#xe_gallery_closebtn");prevbtn=$("#xe_gallery_prevbtn");nextbtn=$("#xe_gallery_nextbtn")};return xScreen}
function slideshow(event){var container=$(this).closest('.xe_content'),imglist=container.find("img[rel=xe_gallery]"),currentIdx=$.inArray($(this).get(0),imglist.get()),xScreen=getScreen();xScreen.list=imglist;xScreen.index=currentIdx;xScreen.xeShow()};$(function(){var regx_skip=/(?:(modules|addons|classes|common|layouts|libs|widgets|widgetstyles)\/)/i,regx_allow_i6pngfix=/(?:common\/tpl\/images\/blank\.gif$)/i,dummy=$('<div style="height:1; overflow:hidden; opacity:0; display:block; clear:both;"></div>')
function doResize(contentWidth,count){if(!count)count=0;if(count>=10)return;var $img=this,beforSize={width:$img.width(),height:$img.height()};if(!beforSize.width||!beforSize.height){setTimeout(function(){doResize.call($img,contentWidth,++count)},200);return};if(beforSize.width<=contentWidth)return;var resize_ratio=contentWidth/beforSize.width;$img.removeAttr('width').removeAttr('height').css({width:contentWidth,height:parseInt(beforSize.height*resize_ratio,10)})};$('div.xe_content').each(function(){var contentWidth=dummy.appendTo(this).width();dummy.remove();if(!contentWidth)return;$('img',this).each(function(){var $img=$(this),imgSrc=$img.attr('src');if(regx_skip.test(imgSrc)&&!regx_allow_i6pngfix.test(imgSrc))return;$img.attr('rel','xe_gallery');doResize.call($img,contentWidth)});$('img[rel=xe_gallery]',this).live('mouseover',function(){var $img=$(this);if(!$img.parent('a').length&&!$img.attr('onclick'))$img.css('cursor','pointer').click(slideshow)})})})})(jQuery)

View file

@ -151,7 +151,17 @@
$this->mid = $module_info->mid;
$this->module_info = $module_info;
Context::setBrowserTitle($module_info->browser_title);
$part_config= $oModuleModel->getModulePartConfig('layout',$module_info->layout_srl);
if($module_info->use_mobile && Mobile::isFromMobilePhone())
{
$layoutSrl = $module_info->mlayout_srl;
}
else
{
$layoutSrl = $module_info->layout_srl;
}
$part_config= $oModuleModel->getModulePartConfig('layout',$layoutSrl);
Context::addHtmlHeader($part_config->header_script);
}

View file

@ -187,7 +187,7 @@ class TemplateHandler {
$buff = preg_replace('@<!--//.*?-->@s', '', $buff);
// replace value of src in img/input/script tag
$buff = preg_replace_callback('/<(?:img|input|script)(?:(?!["\'\/]\s*>).)* src="(?!https?:\/\/|[\/\{])([^"]+)"/is', array($this, '_replacePath'), $buff);
$buff = preg_replace_callback('/<(?:img|input|script)[^<>]*src="(?!https?:\/\/|[\/\{])([^"]+)"/is', array($this, '_replacePath'), $buff);
// replace loop and cond template syntax
$buff = $this->_parseInline($buff);
@ -223,6 +223,7 @@ class TemplateHandler {
* @param array $matches
* @return string
**/
function _compileFormAuthGeneration($matches)
{
// form ruleset attribute move to hidden tag

View file

@ -163,11 +163,50 @@ class Argument {
* @return string
*/
function _escapeStringValue($value) {
// Remove non-utf8 chars.
$regex = <<<'END'
/
(
(?:
[\x00-\x7F] # single-byte sequences 0xxxxxxx
|[\xC0-\xDF][\x80-\xBF] # double-byte sequences 110xxxxx 10xxxxxx
|[\xE0-\xEF][\x80-\xBF]{2} # triple-byte sequences 1110xxxx 10xxxxxx * 2
)+
)
|([\xF0-\xF7][\x80-\xBF]{3}) # quadruple-byte sequence 11110xxx 10xxxxxx * 3
|([\x80-\xBF]) # invalid byte in range 10000000 - 10111111
|([\xC0-\xFF]) # invalid byte in range 11000000 - 11111111
/x
END;
$value = preg_replace_callback($regex, array($this, 'utf8Replacer'), $value);
$db = &DB::getInstance();
$value = $db->addQuotes($value);
return '\'' . $value . '\'';
}
function utf8Replacer($captures) {
if (!empty($captures[1]))
{
// Valid byte sequence. Return unmodified.
return $captures[1];
}
elseif(!empty($captures[2]))
{
// Remove user defined area
if("\xF3\xB0\x80\x80" <= $captures[2])
{
return;
}
return $captures[2];
}
else
{
return;
}
}
function isValid() {
return $this->isValid;
}

View file

@ -364,18 +364,18 @@ function sendMailTo(to) {
/**
* @brief url이동 (open_window 값이 N 아니면 새창으로 띄움)
**/
function move_url(url, open_wnidow) {
function move_url(url, open_window) {
if(!url) return false;
if(typeof(open_wnidow) == 'undefined') open_wnidow = 'N';
if(open_wnidow=='N') {
open_wnidow = false;
if(typeof(open_window) == 'undefined') open_window = 'N';
if(open_window=='N') {
open_window = false;
} else {
open_wnidow = true;
open_window = true;
}
if(/^\./.test(url)) url = request_uri+url;
if(open_wnidow) {
if(open_window) {
winopen(url);
} else {
location.href=url;

View file

@ -648,18 +648,18 @@ function sendMailTo(to) {
/**
* @brief url이동 (open_window 값이 N 아니면 새창으로 띄움)
**/
function move_url(url, open_wnidow) {
function move_url(url, open_window) {
if(!url) return false;
if(typeof(open_wnidow) == 'undefined') open_wnidow = 'N';
if(open_wnidow=='N') {
open_wnidow = false;
if(typeof(open_window) == 'undefined') open_window = 'N';
if(open_window=='N') {
open_window = false;
} else {
open_wnidow = true;
open_window = true;
}
if(/^\./.test(url)) url = request_uri+url;
if(open_wnidow) {
if(open_window) {
winopen(url);
} else {
location.href=url;

View file

@ -2935,6 +2935,10 @@
<value xml:lang="vi"><![CDATA[Đã phê bình.]]></value>
<value xml:lang="mn"><![CDATA[Санал болгогдоогүй]]></value>
</item>
<item name="success_copied">
<value xml:lang="ko"><![CDATA[복사했습니다.]]></value>
<value xml:lang="en"><![CDATA[Copied successfully.]]></value>
</item>
<item name="success_moved">
<value xml:lang="ko"><![CDATA[이동했습니다.]]></value>
<value xml:lang="en"><![CDATA[Moved successfully.]]></value>

View file

@ -326,7 +326,7 @@
$request_uri = Context::getRequestUri();
if(!$num_args) return $request_uri;
$url = Context::getUrl($num_args, $args_list);
$url = Context::getUrl($num_args, $args_list, null, false);
if(!preg_match('/^http/i',$url)){
preg_match('/^(http|https):\/\/([^\/]+)\//',$request_uri,$match);
$url = Context::getUrl($num_args, $args_list, null, false);

View file

@ -99,6 +99,10 @@ class tar {
// PRIVATE ACCESS FUNCTION
function __parseNullPaddedString($string) {
$position = strpos($string,chr(0));
if(!$position)
{
$position = strlen($string);
}
return substr($string,0,$position);
}
@ -109,6 +113,7 @@ class tar {
// Read Files from archive
$tar_length = strlen($this->tar_file);
$main_offset = 0;
$flag_longlink = false;
while($main_offset < $tar_length) {
// If we read a block of 512 nulls, we are at the end of the archive
if(substr($this->tar_file,$main_offset,512) == str_repeat(chr(0),512))
@ -141,6 +146,8 @@ class tar {
// Parse Group name
$file_gname = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset + 297,32));
$file_type = substr($this->tar_file,$main_offset + 156,1);
// Make sure our file is valid
if($this->__computeUnsignedChecksum(substr($this->tar_file,$main_offset,512)) != $file_chksum)
return false;
@ -159,42 +166,67 @@ class tar {
$activeFile["endheader"] = substr($this->tar_file,$main_offset + 500,12);
*/
if($file_size > 0) {
// Increment number of files
$this->numFiles++;
if(strtolower($file_type) == 'l' || $file_name == '././@LongLink')
{
$flag_longlink = true;
$longlink_name = $this->__parseNullPaddedString($file_contents);
}
elseif($file_type == '0') {
// Increment number of files
$this->numFiles++;
// Create us a new file in our array
$activeFile = &$this->files[];
// Create us a new file in our array
$activeFile = &$this->files[];
// Asign Values
$activeFile["name"] = $file_name;
$activeFile["mode"] = $file_mode;
$activeFile["size"] = $file_size;
$activeFile["time"] = $file_time;
$activeFile["user_id"] = $file_uid;
$activeFile["group_id"] = $file_gid;
$activeFile["user_name"] = $file_uname;
$activeFile["group_name"] = $file_gname;
$activeFile["checksum"] = $file_chksum;
$activeFile["file"] = $file_contents;
// Asign Values
if($flag_longlink)
{
$activeFile["name"] = $longlink_name;
}
else
{
$activeFile["name"] = $file_name;
}
$activeFile["type"] = $file_type;
$activeFile["mode"] = $file_mode;
$activeFile["size"] = $file_size;
$activeFile["time"] = $file_time;
$activeFile["user_id"] = $file_uid;
$activeFile["group_id"] = $file_gid;
$activeFile["user_name"] = $file_uname;
$activeFile["group_name"] = $file_gname;
$activeFile["checksum"] = $file_chksum;
$activeFile["file"] = $file_contents;
} else {
// Increment number of directories
$this->numDirectories++;
$flag_longlink = false;
// Create a new directory in our array
$activeDir = &$this->directories[];
} elseif($file_type == '5') {
// Increment number of directories
$this->numDirectories++;
// Assign values
$activeDir["name"] = $file_name;
$activeDir["mode"] = $file_mode;
$activeDir["time"] = $file_time;
$activeDir["user_id"] = $file_uid;
$activeDir["group_id"] = $file_gid;
$activeDir["user_name"] = $file_uname;
$activeDir["group_name"] = $file_gname;
$activeDir["checksum"] = $file_chksum;
}
// Create a new directory in our array
$activeDir = &$this->directories[];
// Assign values
if($flag_longlink)
{
$activeDir["name"] = $longlink_name;
}
else
{
$activeDir["name"] = $file_name;
}
$activeDir["type"] = $file_type;
$activeDir["mode"] = $file_mode;
$activeDir["time"] = $file_time;
$activeDir["user_id"] = $file_uid;
$activeDir["group_id"] = $file_gid;
$activeDir["user_name"] = $file_uname;
$activeDir["group_name"] = $file_gname;
$activeDir["checksum"] = $file_chksum;
$flag_longlink = false;
}
// Move our offset the number of blocks we have processed
$main_offset += 512 + (ceil($file_size / 512) * 512);

View file

@ -942,10 +942,10 @@ $('.multiLangEdit')
function on_complete(data, idx){
var results = data.results, $btn, i, c;
if(data.error || !results || (r_idx != idx+1)) return;
$this.removeClass('loading');
if(data.error || !results || results.length === 0 || (r_idx != idx+1)) return;
$ul.empty();
for(i=0,c=results.length; i < c; i++) {
$btn = $('<button type="button" class="_btnLang" />').data('langkey', results[i].name).text(results[i].value);
@ -972,6 +972,8 @@ $('.multiLangEdit')
$active = $ul.find('button.active');
if(key == ENTER) {
if($active.length === 0) return true;
$active.click();
return false;
}

View file

@ -27,13 +27,13 @@ jQuery(function(a){function d(a,b){for(var d=0,f=0;a&&a!=b;)d+=a.offsetTop,f+=a.
k.trigger(before_event);if(before_event.isDefaultPrevented())return!1;j=e.pageY;h=d(f.get(0),q);$clone=f.attr("target",!0).clone(!0).appendTo(k);l=(e=k.find("thead th")).length;e.filter("[colspan]").attr("colspan",function(a,b){l+=b-1});b.find("td").attr("colspan",l);o=[];k.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b=a(this),e;e=d(this,q);o.push({top:e.top,bottom:e.top+b.height(),$item:b})});$clone.addClass("draggable").css({position:"absolute",opacity:0.6,width:n,height:g,
left:h.left,top:h.top,zIndex:100});b.css({position:"absolute",opacity:0.6,width:n,height:"10px",left:h.left,top:h.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(k);f.css("opacity",0.6);a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(a){var e,d,f;m=null;a=h.top-(j-a.pageY);e=0;for(d=o.length;e<d;e++)f=o[e],e&&f.top>a||e<d-1&&f.bottom<a||(m={element:f.$item},f.top>a-12?(m.state="before",b.css("top",f.top-5)):(m.state="after",b.css("top",f.bottom-5)));$clone.css({top:a})}).bind("mouseup.st",
function(){var e;a(document).unbind("mousemove.st mouseup.st");f.removeAttr("target").css("opacity","");$clone.remove();b.remove();m&&(e=a(m.element),e[m.state](f),k.trigger("after-drag.st"))})}});return this};a("table.sortable").xeSortableTable()});
jQuery(function(a){var d=null,b=null,e=0,j=null,g=!1,f=!1,k;a(".multiLangEdit").delegate("input.vLang:text,textarea.vLang",{textchange:function(){function d(){f.addClass("loading");l.parent().is(":visible")&&l.parent().hide();show_waiting_message=!1;a.exec_json("module.getLangListByLangcodeForAutoComplete",{search_keyword:m},function(b){return function(d){var h=d.results,g,m;if(!d.error&&h&&e==b+1){f.removeClass("loading");l.empty();g=0;for(m=h.length;g<m;g++)d=a('<button type="button" class="_btnLang" />').data("langkey",
jQuery(function(a){var d=null,b=null,e=0,j=null,g=!1,f=!1,k;a(".multiLangEdit").delegate("input.vLang:text,textarea.vLang",{textchange:function(){function d(){f.addClass("loading");l.parent().is(":visible")&&l.parent().hide();show_waiting_message=!1;a.exec_json("module.getLangListByLangcodeForAutoComplete",{search_keyword:m},function(b){return function(d){var h=d.results,g,m;f.removeClass("loading");if(!d.error&&h&&!(0===h.length||e!=b+1)){l.empty();g=0;for(m=h.length;g<m;g++)d=a('<button type="button" class="_btnLang" />').data("langkey",
h[g].name).text(h[g].value),a("<li />").append(d).appendTo(l);k.trigger("show")}}}(e++));show_waiting_message=!0}var f=a(this),m=a.trim(f.val()),l;b&&(clearTimeout(b),b=null);f.data("mle-container");l=k.find(">ul");!m||g?(g=!1,l.parent().hide(),f.prev("input.vLang").val("")):(f.data("mle-langkey").val(""),f.prev("input.vLang").val(m),b=setTimeout(d,100))},keydown:function(b){var e,d,f=b.which;a(this);b=k.find(">ul");if(!k.is(":visible")||0>a.inArray(f,[38,40,13,27]))return!0;if(27==f)return k.trigger("hide"),
!1;e=b.find("button.active");if(13==f)return e.click(),!1;if(!e.length)return b.find("li>button:first").addClass("active"),!1;38==f?(d=e.parent().prev("li").find(">button"),d.length||(d=b.find(">li:last>button"))):40==f&&(d=e.parent().next("li").find(">button"),d.length||(d=b.find(">li:first>button")));e.removeClass("active");d.addClass("active");return!1},focus:function(){var b=a(this),e=a.trim(b.val()),f=b.closest(".multiLangEdit");b.after(k);b.data("mle-container")||b.data("mle-container",f);b.data("mle-langkey")||
b.data("mle-langkey",f.find("input.vLang:first"));(function(){var f=a.trim(b.val());f!=e&&(e=f,b.trigger("textchange"));d=setTimeout(arguments.callee,50)})()},blur:function(){clearTimeout(d);d=null;a(this).closest(".multiLangEdit").focusout()},focusout:function(){var b=a(this);clearTimeout(j);j=setTimeout(function(){f?f=!1:b.find(":focus").is(".vLang,button._btnLang")||k.trigger("hide")},10)}}).delegate("a.tgAnchor.editUserLang",{"before-open.tc":function(){var b,e,d;b=a(this);e=a(b.attr("href")).insertBefore(b);
d=b.closest(".multiLangEdit").find("input.vLang,textarea.vLang");b=d.eq(0).val();d=d.eq(1).val();var f=e,g=function(){var a=[];v.each(function(){a.push(this.value)});return a.join("\n")},j=function(){f.data("multilang-current-name")?f.find("h2").find("strong").text(p==y?t:z).end().find("a").text(p==y?z:t).show().end():f.find("h2").find("strong").text(t).end().find("a").hide()},r,v,w="",s=0,p,t,z,u=[],y=0;f.data("init-multilang-editor")||(f.data("init-multilang-editor",!0).bind("multilang-reset",function(){f.data("multilang-current-name",
"").find(".langInput li").find(">input:text,>textarea").val("").prev("label").css("visibility","visible");p=y;j()}).find("h2 a").click(function(){p=!p;j();return!1}).end().delegate("a.langItem","click",function(){var b=a(this),e,d,h;d=f.data("multilang-list");h=b.data("multilang-name");if(d&&d[h]){d=d[h];e=f.find(".langInput");f.trigger("multilang-reset").find(".langList li.active").removeClass("active").end().data("multilang-current-name",h);b.parent("li").addClass("active");for(var k in d)d.hasOwnProperty(k)&&
e.find("li."+k).find(">input:text,>textarea").data("multilang-value",d[k]).val(d[k]).prev("label").css("visibility","hidden");w=g();s=0;r.val(u[s]);p=1;j();return!1}}).data("layer_index",n).find(".langInput").attr("id","langInput_"+n++),z=f.find("h2 strong").text(),t=f.find("h2 a").text(),v=f.find("input:text,textarea").change(function(){var a=g()==w?0:1;a!=s&&r.val(u[s=a])}),r=f.find("input[type=submit]").click(function(){function b(){f.hide().closest(".multiLangEdit").find(".vLang").eq(0).val("$user_lang->"+
!1;e=b.find("button.active");if(13==f){if(0===e.length)return!0;e.click();return!1}if(!e.length)return b.find("li>button:first").addClass("active"),!1;38==f?(d=e.parent().prev("li").find(">button"),d.length||(d=b.find(">li:last>button"))):40==f&&(d=e.parent().next("li").find(">button"),d.length||(d=b.find(">li:first>button")));e.removeClass("active");d.addClass("active");return!1},focus:function(){var b=a(this),e=a.trim(b.val()),f=b.closest(".multiLangEdit");b.after(k);b.data("mle-container")||b.data("mle-container",
f);b.data("mle-langkey")||b.data("mle-langkey",f.find("input.vLang:first"));(function(){var f=a.trim(b.val());f!=e&&(e=f,b.trigger("textchange"));d=setTimeout(arguments.callee,50)})()},blur:function(){clearTimeout(d);d=null;a(this).closest(".multiLangEdit").focusout()},focusout:function(){var b=a(this);clearTimeout(j);j=setTimeout(function(){f?f=!1:b.find(":focus").is(".vLang,button._btnLang")||k.trigger("hide")},10)}}).delegate("a.tgAnchor.editUserLang",{"before-open.tc":function(){var b,e,d;b=a(this);
e=a(b.attr("href")).insertBefore(b);d=b.closest(".multiLangEdit").find("input.vLang,textarea.vLang");b=d.eq(0).val();d=d.eq(1).val();var f=e,g=function(){var a=[];v.each(function(){a.push(this.value)});return a.join("\n")},j=function(){f.data("multilang-current-name")?f.find("h2").find("strong").text(p==y?t:z).end().find("a").text(p==y?z:t).show().end():f.find("h2").find("strong").text(t).end().find("a").hide()},r,v,w="",s=0,p,t,z,u=[],y=0;f.data("init-multilang-editor")||(f.data("init-multilang-editor",
!0).bind("multilang-reset",function(){f.data("multilang-current-name","").find(".langInput li").find(">input:text,>textarea").val("").prev("label").css("visibility","visible");p=y;j()}).find("h2 a").click(function(){p=!p;j();return!1}).end().delegate("a.langItem","click",function(){var b=a(this),e,d,h;d=f.data("multilang-list");h=b.data("multilang-name");if(d&&d[h]){d=d[h];e=f.find(".langInput");f.trigger("multilang-reset").find(".langList li.active").removeClass("active").end().data("multilang-current-name",
h);b.parent("li").addClass("active");for(var k in d)d.hasOwnProperty(k)&&e.find("li."+k).find(">input:text,>textarea").data("multilang-value",d[k]).val(d[k]).prev("label").css("visibility","hidden");w=g();s=0;r.val(u[s]);p=1;j();return!1}}).data("layer_index",n).find(".langInput").attr("id","langInput_"+n++),z=f.find("h2 strong").text(),t=f.find("h2 a").text(),v=f.find("input:text,textarea").change(function(){var a=g()==w?0:1;a!=s&&r.val(u[s=a])}),r=f.find("input[type=submit]").click(function(){function b(){f.hide().closest(".multiLangEdit").find(".vLang").eq(0).val("$user_lang->"+
d).end().eq(1).val(f.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val()).end()}function e(a){a&&(!a.error&&a.name)&&(d=a.name,b())}var d=f.data("multilang-current-name");if(g()==w)b();else{var h={};d&&1==p&&(h.lang_name=d);v.each(function(){var b=a(this);h[b.parent("li").attr("class")]=b.val()});a.exec_json("module.procModuleAdminInsertLang",h,e)}return!1}),u=r.val().split("|"),r.val(u[0]));e.trigger("multilang-reset").removeClass("showChild").find(".langList").empty().end();
e.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val(d).prev("label").css("visibility","hidden");k.trigger("hide");/^\$user_lang->(.+)$/.test(b)?(b="module.getModuleAdminLangListByName",d={lang_name:RegExp.$1}):(b="module.getModuleAdminLangListByValue",d={value:d});show_waiting_message=!1;a.exec_json(b,d,function(b){var d=b.lang_list,f;if(!b.error&&d){var b=d,g,h={},j,d=0;for(g=b.length;d<g;d++){j=b[d];h[j.name]||(h[j.name]={});h[j.name][j.lang_code]=j.value}d=h;e.data("multilang-list",
d);f=e.find(".langList");a.each(d,function(b){var d=a("<li />").appendTo(f),g=e.data("layer_index"),h=this[xe.current_lang];if(!h)for(lang_code in this){h=this[lang_code];break}a('<a href="#langInput_'+g+'" class="langItem" />').text(h).data("multilang-name",b).appendTo(d)});var b=d,d=0,k;for(k in b)b.hasOwnProperty(k)&&d++;d>1&&e.addClass("showChild");e.find(".langList>li>a:first").click()}});show_waiting_message=!0}}).delegate("button._btnLang",{click:function(){var b=a(this);g=!0;k.trigger("hide");

View file

@ -114,6 +114,11 @@
*/
function isModuleUsingPublishValidation($module_srl=null)
{
if(!$module_srl == null)
{
return false;
}
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
$module_part_config = $oModuleModel->getModulePartConfig('comment',$module_info->module_srl);
@ -666,7 +671,7 @@
* @param int $document_srl
* @return object
*/
function deleteComments($document_srl, &$obj = NULL) {
function deleteComments($document_srl, $obj = NULL) {
// create the document model object
$oDocumentModel = &getModel('document');
$oCommentModel = &getModel('comment');

View file

@ -24,6 +24,6 @@
<column name="last_update" var="last_update" default="curdate()" />
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
<column name="list_order" var="list_order" default="0" />
<column name="status" var="status" notnull="notnull" default="0" />
<column name="status" var="status" notnull="notnull" default="1" />
</columns>
</query>

View file

@ -361,6 +361,7 @@
}
// Call a trigger (before)
$triggerObj->copied_srls = $copied_srls;
$output = ModuleHandler::triggerCall('document.copyDocumentModule', 'after', $triggerObj);
if(!$output->toBool()) {
$oDB->rollback();

View file

@ -1918,14 +1918,14 @@ class documentController extends document {
$msg_code = 'success_moved';
}
elseif($type == 'copy') {
elseif($type == 'copy')
{
if(!$module_srl) return new Object(-1, 'fail_to_move');
$output = $oDocumentAdminController->copyDocumentModule($document_srl_list, $module_srl, $category_srl);
if(!$output->toBool()) return new Object(-1, 'fail_to_move');
$msg_code = 'success_copy';
$msg_code = 'success_copied';
}
elseif($type =='delete') {
$oDB = &DB::getInstance();

View file

@ -19,10 +19,19 @@ var slideShow = xe.createPlugin('slideShow', {
API_SHOW_SLIDE : function(sender, params) {
var self=this, srl = params[0], key = '@'+srl, imgs, $zone, $thumb, $holder, i, c;
var p = params;
imgs = this.cast('GET_IMAGES', [srl]);
if(!imgs.length) return;
for(var i=0, nLen=imgs.length; i<nLen; i++){
if(!imgs[i].loaded){
setTimeout(function(){
self.cast('SHOW_SLIDE', params);
}, 200);
return;
}
}
$zone = $('#zone_slide_gallery_'+srl);
$holder = $zone.find('.slide_gallery_placeholder').css('overflow', 'hidden');

View file

@ -3,7 +3,7 @@
* @brief Slideshow type image gallery plugin
* @author NHN (developers@xpressengine.com)
**/
(function(k){var m=xe.createPlugin("slideShow",{_holders:{},_thumbs:{},_current:{},init:function(){this._holders={};this._thumbs={};this._current={}},API_SHOW_SLIDE:function(g,f){var b=this,a=f[0],c="@"+a,d,e,j,i,h,l;d=this.cast("GET_IMAGES",[a]);if(d.length){e=k("#zone_slide_gallery_"+a);i=e.find(".slide_gallery_placeholder").css("overflow","hidden");e.find(".slide_gallery_loading_text").remove();j=e.find(".slide_gallery_thumbnail_image_box").show();h=0;for(l=d.length;h<l;h++)d[h].$obj.clone().css({cursor:"pointer",
width:"60px",height:"60px",margin:"5px",opacity:0.5}).click({idx:h},function(c){b.cast("SET_SLIDE",[a,c.data.idx])}).appendTo(j);k("#zone_gallery_navigator_status_"+a).click(function(){j.toggle()});e.find(".__prev").click(function(){b.cast("PREV_SLIDE",[a]);return!1}).end().find(".__next").click(function(){b.cast("NEXT_SLIDE",[a]);return!1});this._holders[c]=i;this._thumbs[c]=j;this._current[c]=0;this.cast("SET_SLIDE",[a,0])}},_showSideSlide:function(g,f){var b,a;b=this.cast("GET_IMAGES",[g]);b.length&&
(a=this._current["@"+g],a+=f,0>a?a=b.length-1:a>=b.length&&(a=0),this.cast("SET_SLIDE",[g,a]))},API_NEXT_SLIDE:function(g,f){this._showSideSlide(f[0],1)},API_PREV_SLIDE:function(g,f){this._showSideSlide(f[0],-1)},API_SET_SLIDE:function(g,f){var b=f[0],a=f[1],c,d,e;c=this.cast("GET_IMAGES",[b]);if(c.length&&is_def(d=c[a]))this._current["@"+b]=a,k("#zone_gallery_navigator_status_"+b).text(a+1+"/"+c.length),this._thumbs["@"+b].find("img").eq(a).animate({opacity:1}).end().not(":eq("+a+")").animate({opacity:0.5}),
b=this._holders["@"+b],c=b.parent().innerWidth(),a=d.$obj.prop("width"),e=d.$obj.prop("height"),0==a&&(a=d.$obj.attr("width")),0==e&&(e=d.$obj.attr("height")),a>c-20&&(c-=20,e=Math.floor(e*(c/a)),a=c,d.$obj.css("cursor","pointer"),d.$obj.attr("rel","xe_gallery")),d.$obj.css({width:a,height:e,margin:"0 10px"}),b.empty().append(d.$obj)}}),i=xe.getApp("Gallery")[0];i&&i.registerPlugin(new m)})(jQuery);
(function(k){var m=xe.createPlugin("slideShow",{_holders:{},_thumbs:{},_current:{},init:function(){this._holders={};this._thumbs={};this._current={}},API_SHOW_SLIDE:function(h,f){var b=this,a=f[0],d="@"+a,c,e,j,i,g,l;c=this.cast("GET_IMAGES",[a]);if(c.length){g=0;for(e=c.length;g<e;g++)if(!c[g].loaded){setTimeout(function(){b.cast("SHOW_SLIDE",f)},200);return}e=k("#zone_slide_gallery_"+a);i=e.find(".slide_gallery_placeholder").css("overflow","hidden");e.find(".slide_gallery_loading_text").remove();
j=e.find(".slide_gallery_thumbnail_image_box").show();g=0;for(l=c.length;g<l;g++)c[g].$obj.clone().css({cursor:"pointer",width:"60px",height:"60px",margin:"5px",opacity:0.5}).click({idx:g},function(c){b.cast("SET_SLIDE",[a,c.data.idx])}).appendTo(j);k("#zone_gallery_navigator_status_"+a).click(function(){j.toggle()});e.find(".__prev").click(function(){b.cast("PREV_SLIDE",[a]);return!1}).end().find(".__next").click(function(){b.cast("NEXT_SLIDE",[a]);return!1});this._holders[d]=i;this._thumbs[d]=j;
this._current[d]=0;this.cast("SET_SLIDE",[a,0])}},_showSideSlide:function(h,f){var b,a;b=this.cast("GET_IMAGES",[h]);b.length&&(a=this._current["@"+h],a+=f,0>a?a=b.length-1:a>=b.length&&(a=0),this.cast("SET_SLIDE",[h,a]))},API_NEXT_SLIDE:function(h,f){this._showSideSlide(f[0],1)},API_PREV_SLIDE:function(h,f){this._showSideSlide(f[0],-1)},API_SET_SLIDE:function(h,f){var b=f[0],a=f[1],d,c,e;d=this.cast("GET_IMAGES",[b]);if(d.length&&is_def(c=d[a]))this._current["@"+b]=a,k("#zone_gallery_navigator_status_"+
b).text(a+1+"/"+d.length),this._thumbs["@"+b].find("img").eq(a).animate({opacity:1}).end().not(":eq("+a+")").animate({opacity:0.5}),b=this._holders["@"+b],d=b.parent().innerWidth(),a=c.$obj.prop("width"),e=c.$obj.prop("height"),0==a&&(a=c.$obj.attr("width")),0==e&&(e=c.$obj.attr("height")),a>d-20&&(d-=20,e=Math.floor(e*(d/a)),a=d,c.$obj.css("cursor","pointer"),c.$obj.attr("rel","xe_gallery")),c.$obj.css({width:a,height:e,margin:"0 10px"}),b.empty().append(c.$obj)}}),i=xe.getApp("Gallery")[0];i&&i.registerPlugin(new m)})(jQuery);

View file

@ -484,8 +484,7 @@
if($header_script)
{
$header_script = str_replace('"','\\"',$header_script);
$buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace('$','\$',$header_script));
$buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace(array('$','"'),array('\$','\\"'),$header_script));
}
$buff = '<?php if(!defined("__ZBXE__")) exit(); '.$buff.' ?>';

View file

@ -163,8 +163,11 @@
<div class="btnArea">
<span class="etc">
<span class="btn"><a href="{getUrl('', 'module', 'admin', 'act', 'dispLayoutAdminAllInstanceList')}">{$lang->instance_layout}&nbsp;{$lang->cmd_list}</a></span>
<span class="btn"><a href="{getUrl('', 'module', 'admin', 'act', 'dispLayoutAdminInstanceList', 'layout', $selected_layout->layout)}">{$selected_layout->title} ver {$selected_layout->version}({$selected_layout->layout})&nbsp;{$lang->cmd_list}</a></span>
<!--@if($layout)-->
<span class="btn"><a href="{getUrl('', 'module', 'admin', 'act', 'dispLayoutAdminInstanceList', 'layout', $selected_layout->layout)}">{$lang->cmd_list}</a></span>
<!--@else-->
<span class="btn"><a href="{getUrl('', 'module', 'admin', 'act', 'dispLayoutAdminAllInstanceList')}">{$lang->cmd_list}</a></span>
<!--@end-->
</span>
<span class="btn medium">
<input type="submit" value="{$lang->cmd_insert}"|cond="$act == 'dispLayoutAdminInsert'" value="{$lang->cmd_save}"|cond="$act == 'dispLayoutAdminModify'" onclick="doSubmitConfig()"/>
@ -173,4 +176,4 @@
<include target="include.multilang.html" />
<include target="include.multilang.textarea.html" />
</div>
<iframe name="hiddenIframe" src="about:blank" width="0" height="0" frameborder="0"></iframe>
<iframe name="hiddenIframe" src="about:blank" width="1000px" height="1000px" frameborder="0" style="position:absolute;top:-9999px;left:-9999px"></iframe>

View file

@ -47,6 +47,7 @@
$layout_info = $oLayoutModel->getLayout($this->member_config->layout_srl);
if($layout_info)
{
$this->module_info->layout_srl = $this->member_config->layout_srl;
$this->setLayoutPath($layout_info->path);
}
}

View file

@ -606,16 +606,24 @@
//$info = $oModuleModel->getModuleInfoXml($moduleName);
$info = $oModuleModel->getModuleActionXml($moduleName);
$url = getNotEncodedUrl('', 'module', 'admin', 'act', $info->menu->{$menuName}->index);
if(empty($url)) $url = getNotEncodedUrl('', 'module', 'admin', 'act', $info->admin_index_act);
if(empty($url)) $url = getNotEncodedUrl('', 'module', 'admin');
$url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->menu->{$menuName}->index);
if(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->admin_index_act);
if(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin');
$dbInfo = Context::getDBInfo();
$args->menu_item_srl = (!$requestArgs->menu_item_srl) ? getNextSequence() : $requestArgs->menu_item_srl;
$args->parent_srl = $requestArgs->parent_srl;
$args->menu_srl = $requestArgs->menu_srl;
$args->name = sprintf('{$lang->menu_gnb_sub[\'%s\']}', $menuName);
$args->url = str_replace($dbInfo->default_url, '', $url);
//if now page is https...
if(strpos($url, 'https') !== false)
{
$args->url = str_replace('https'.substr($dbInfo->default_url, 4), '', $url);
}
else
{
$args->url = str_replace($dbInfo->default_url, '', $url);
}
$args->open_window = 'N';
$args->expand = 'N';
$args->normal_btn = '';

View file

@ -50,11 +50,51 @@
return $output;
}
function getSelectedManageHTML($grantList)
{
// Grant virtual permission for access and manager
$grantList->access->title = Context::getLang('grant_access');
$grantList->access->default = 'guest';
if(count($grantList))
{
foreach($grantList as $key => $val) {
if(!$val->default) $val->default = 'guest';
if($val->default == 'root') $val->default = 'manager';
$grant_list->{$key} = $val;
}
}
$grant_list->manager->title = Context::getLang('grant_manager');
$grant_list->manager->default = 'manager';
Context::set('grant_list', $grant_list);
// Get a list of groups
$oMemberModel = &getModel('member');
$group_list = $oMemberModel->getGroups(0);
Context::set('group_list', $group_list);
Context::set('module_srls', 'dummy');
$content = '';
// Call a trigger for additional settings
// Considering uses in the other modules, trigger name cen be publicly used
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
Context::set('setup_content', $content);
// Get information of module_grants
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($this->module_path.'tpl', 'include.manage_selected.html');
}
/**
* @brief Common:: module's permission displaying page in the module
* Available when using module instance in all the modules
**/
function getModuleGrantHTML($module_srl, $source_grant_list) {
if(!$module_srl)
{
return;
}
// get member module's config
$oMemberModel = &getModel('member');
$member_config = $oMemberModel->getMemberConfig();

View file

@ -244,7 +244,7 @@
if(isSiteID($args->domain) && $oModuleModel->isIDExists($args->domain)) return new Object(-1,'msg_already_registed_vid');
if($args->domain && !isSiteID($args->domain)) {
$args->domain = strtolower($args->domain);
$args->domain = $args->domain;
}
}

View file

@ -80,12 +80,19 @@
/**
* @brief Delete the poll (when several questions are registered in one poll, delete this question)
**/
function deletePollTitle($poll_index_srl) {
function deletePollTitle($poll_index_srl)
{
$args->poll_index_srl = $poll_index_srl;
$oDB = &DB::getInstance();
$oDB->begin();
$output = executeQueryArray('poll.getPollByDeletePollTitle', $args);
if($output->toBool() && $output->data && $output->data[0]->count == 1)
{
$dargs->poll_srl = $output->data[0]->poll_srl;
}
$output = $oDB->executeQuery('poll.deletePollTitle', $args);
if(!$output) {
$oDB->rollback();
@ -98,6 +105,20 @@
return $output;
}
if($dargs->poll_srl)
{
$output = executeQuery('poll.deletePoll', $dargs);
if(!$output) {
$oDB->rollback();
return $output;
}
$output = executeQuery('poll.deletePollLog', $dargs);
if(!$output) {
$oDB->rollback();
return $output;
}
}
$oDB->commit();
return new Object();

View file

@ -0,0 +1,25 @@
<query id="getPollByDeletePollTitle" action="select">
<tables>
<table name="poll_title" alias="PT"/>
</tables>
<columns>
<column name="poll_srl" />
<column name="count(poll_index_srl)" alias="count" />
</columns>
<conditions>
<query operation="equal" column="PT.poll_srl" notnull="notnull" alias="getPollSrl">
<tables>
<table name="poll_title" alias="SPT"/>
</tables>
<columns>
<column name="poll_srl" alias="poll_srl" />
</columns>
<conditions>
<condition operation="equal" column="SPT.poll_index_srl" var="poll_index_srl" notnull="notnull" />
</conditions>
</query>
</conditions>
<groups>
<group column="poll_srl" />
</groups>
</query>

View file

@ -47,29 +47,29 @@
<span class="btn small"><input type="submit" value="{$lang->cmd_save}" /></span>
</div>
</form>
<form action="" class="form">
<h2 class="h2">{$lang->feed} {$lang->cmd_management}</h2>
<div class="table">
<table width="100%" border="1" cellspacing="0">
<thead>
<tr>
<th scope="col">{$lang->mid}</th>
<th scope="col" class="title">{$lang->description}</th>
<th scope="col">{$lang->open_rss}</th>
<th scope="col">
<label for="feed_integration">{$lang->open_feed_to_total}</label>
</th>
<th scope="col">{$lang->cmd_save}</th>
</tr>
</thead>
<tbody>
<!--@foreach($feed_config AS $key=>$value)-->
<h2 class="h2">{$lang->feed} {$lang->cmd_management}</h2>
<div class="table form">
<table width="100%" border="1" cellspacing="0">
<thead>
<tr>
<th scope="col">{$lang->mid}</th>
<th scope="col" class="title">{$lang->description}</th>
<th scope="col">{$lang->open_rss}</th>
<th scope="col">
<label for="feed_integration">{$lang->open_feed_to_total}</label>
</th>
<th scope="col">{$lang->cmd_save}</th>
</tr>
</thead>
<tbody>
<tr loop="$feed_config => $key,$value">
<form ruleset="insertRssModuleConfig" action="./" method="post">
<input type="hidden" name="act" value="procRssAdminInsertModuleConfig" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', $module, 'act', 'dispRssAdminIndex')}" />
<input type="hidden" name="target_module_srl" value="{$key}" />
<tr>
<th scope="row" class="nowr"><!--@if($value['url'])--><a href="{$value['url']}" target="_blank"><!--@endif-->{$value['mid']}<!--@if($value['url'])--></a><!--@endif--></th>
<input type="hidden" name="act" value="procRssAdminInsertModuleConfig" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', $module, 'act', 'dispRssAdminIndex')}" />
<input type="hidden" name="target_module_srl" value="{$key}" />
<th scope="row" class="nowr">
<!--@if($value['url'])--><a href="{$value['url']}" target="_blank"><!--@endif-->{$value['mid']}<!--@if($value['url'])--></a><!--@endif-->
</th>
<td class="title">{$value['feed_description']}</td>
<td class="nowr">
<!--@foreach($lang->open_rss_types as $key2=>$value2)-->
@ -83,10 +83,8 @@
<label for="open_total_feed_T_N">{$lang->notuse}</label>
</td>
<td class="nowr"><input type="submit" value="{$lang->cmd_save}" class="text" /></td>
</tr>
</form>
<!--@end-->
</tbody>
</table>
</div>
</form>
</tr>
</tbody>
</table>
</div>

View file

@ -1,9 +1,9 @@
<form ruleset="insertRssModuleConfig" action="./" method="post" class="form">
<input type="hidden" name="module" value="rss" />
<input type="hidden" name="act" value="procRssAdminInsertModuleConfig" />
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
<input type="hidden" name="target_module_srl" value="{$rss_config->module_srl?$rss_config->module_srl:$module_srls}" />
<input type="hidden" name="module" value="rss" />
<input type="hidden" name="act" value="procRssAdminInsertModuleConfig" />
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
<input type="hidden" name="target_module_srl" value="{$rss_config->module_srl?$rss_config->module_srl:$module_srls}" />
<h3 class="h3">{$lang->open_rss}</h3>
<p>{$lang->about_open_rss}</p>
<div class="table">

View file

@ -140,7 +140,7 @@
$ipaddress_list = str_replace("\r","",$ipaddress_list);
$ipaddress_list = explode("\n",$ipaddress_list);
foreach($ipaddress_list as $ipaddressValue) {
preg_match("/(\d{1,3}(?:.(\d{1,3}|\*)){3})\s*(\/\/\s*(.*))?/",$ipaddressValue,$matches);
preg_match("/(\d{1,3}(?:.(\d{1,3}|\*)){3})\s*(\/\/(.*)\s*)?/",$ipaddressValue,$matches);
if($ipaddress=trim($matches[1])) {
$args->ipaddress = $ipaddress;
if(!$description && $matches[4]) $args->description = $matches[4];

View file

@ -21,8 +21,8 @@ function doDeleteDeniedWord(word) {
}
function doInsertDeniedIP(msg_invalid_format){
var fo_obj = get_by_id('spamfilterInsert');
var reg_ipaddress = /^(\d{1,3}(?:.(\d{1,3}|\*)){3}\s*(\/\/[^\r\n]*)?[\r\n]*)*$/;
var matchStr_ipaddress = fo_obj.ipaddressList.value;
var reg_ipaddress = /^((\d{1,3}(?:.(\d{1,3}|\*)){3})\s*(\/\/(.*)\s*)?)*\s*$/;
var matchStr_ipaddress = fo_obj.ipaddress_list.value;
if(!matchStr_ipaddress.match(reg_ipaddress)) {
alert(msg_invalid_format); return false;
}
@ -32,8 +32,8 @@ function doInsertDeniedIP(msg_invalid_format){
}
function doInsertDeniedWord(msg_invalid_format){
var fo_obj = get_by_id('spamfilterInsert');
var reg_word = /^(.{2,40}[\r\n]+)*.{0,40}$/;
var matchStr_word = fo_obj.wordList.value;
var reg_word = /^(.{2,40}\s*)*$/;
var matchStr_word = fo_obj.word_list.value;
if(!matchStr_word.match(reg_word)) {
alert(msg_invalid_format); return false;
}

View file

@ -19,11 +19,15 @@
$site_module_info = Context::get('site_module_info');
$output = $oCounterModel->getStatus(array('00000000', date('Ymd', time()-60*60*24), date('Ymd')), $site_module_info->site_srl);
foreach($output as $key => $val) {
if(!$key) Context::set('total_counter', $val);
elseif($key == date("Ymd")) Context::set('today_counter', $val);
else Context::set('yesterday_counter', $val);
}
if(count($output))
{
foreach($output as $key => $val)
{
if(!$key) Context::set('total_counter', $val);
elseif($key == date("Ymd")) Context::set('today_counter', $val);
else Context::set('yesterday_counter', $val);
}
}
// Set a path of the template skin (values of skin, colorset settings)
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
Context::set('colorset', $args->colorset);