mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-10 14:02:12 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5318 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
de647f4362
commit
59af6d8a9d
3 changed files with 18 additions and 16 deletions
|
|
@ -55,7 +55,7 @@
|
|||
**/
|
||||
function getBodyScript($content) {
|
||||
// 내용 추출
|
||||
preg_match('!<body([^>]*)>(.*?)<\/body>!is', $content, $body_buff);
|
||||
preg_match('!<body([^>]*)>(.*)<\/body>!is', $content, $body_buff);
|
||||
$body_script = $body_buff[2];
|
||||
|
||||
// link, style, script등 제거
|
||||
|
|
@ -71,11 +71,11 @@
|
|||
if(substr($path,-1)!='/') $path.='/';
|
||||
$this->target_path = $path;
|
||||
|
||||
// element의 속성중 value에 " 로 안 묶여 있는 것을 검사하여 묶어줌
|
||||
$content = preg_replace_callback('/([^=^"^ ]*)=([^ ^>]*)/i', fixQuotation, $content);
|
||||
// element의 속성중 value에 " 로 안 묶여 있는 것을 검사하여 묶어줌 - 에러날 수 있음 ex) window.open('*','*','width=320, height=240 ,left=100,top=100')
|
||||
//$content = preg_replace_callback('/([^=^"^ ]*)=([^ ^>]*)/i', fixQuotation, $content);
|
||||
|
||||
// img, input, a, link등의 href, src값 변경
|
||||
$content = preg_replace_callback('!(script|link|a|img|input)([^>]*)(href|src)=[\'"](.*?)[\'"]!is', array($this, '_replaceSrc'), $content);
|
||||
$content = preg_replace_callback('!<(script|link|a|img|input|iframe)([^>]*)(href|src)=[\'"](.*?)[\'"]!is', array($this, '_replaceSrc'), $content);
|
||||
|
||||
// background:url의 값 변경
|
||||
$content = preg_replace_callback('!url\((.*?)\)!is', array($this, '_replaceBackgroundUrl'), $content);
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
if(substr($href,0,1)=='/') $href = substr($href,1);
|
||||
$href = $this->target_path.$href;
|
||||
|
||||
$buff = sprintf('%s%s%s="%s"', $matches[1], $matches[2], $matches[3], $href);
|
||||
$buff = sprintf('<%s%s%s="%s"', $matches[1], $matches[2], $matches[3], $href);
|
||||
return $buff;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
$cache_file = sprintf("./files/cache/opage/%d.cache.php", $module_info->module_srl);
|
||||
|
||||
// http 인지 내부 파일인지 점검
|
||||
if(preg_match("/^http:\/\//i",$path)) $content = $this->getHtmlPage($path, $caching_interval, $cache_file);
|
||||
if(preg_match("/^([a-z]+):\/\//i",$path)) $content = $this->getHtmlPage($path, $caching_interval, $cache_file);
|
||||
else $content = $this->executeFile($path, $caching_interval, $cache_file);
|
||||
|
||||
Context::set('opage_content', $content);
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
$body_script = $oOpageController->getBodyScript($content);
|
||||
if(!$body_script) $body_script = $content;
|
||||
|
||||
return $content;
|
||||
return $body_script;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -76,9 +76,10 @@
|
|||
$module_srl = $oModuleModel->getModuleSrlByMid($mid_list);
|
||||
}
|
||||
}
|
||||
} else $module_srl = explode(',',$args->module_srls);
|
||||
}
|
||||
else $module_srl = explode(',' ,$args->module_srls);
|
||||
|
||||
$obj->module_srls = implode(',',$module_srl);
|
||||
if(is_array($module_srl)) $obj->module_srls = implode(',' ,$module_srl);
|
||||
|
||||
// 모듈 목록을 구함
|
||||
$module_list = $oModuleModel->getMidList($obj);
|
||||
|
|
@ -92,6 +93,7 @@
|
|||
$obj->list_count = $widget_info->list_count;
|
||||
$obj->sort_index = $widget_info->order_target;
|
||||
$obj->order_type = $widget_info->order_type=="desc"?"asc":"desc";
|
||||
if(is_array($tab_list)) {
|
||||
foreach($tab_list as $mid => $module) {
|
||||
$obj->module_srl = $module->module_srl;
|
||||
$output = executeQueryArray("widgets.tab_newest_document.getNewestDocuments", $obj);
|
||||
|
|
@ -99,16 +101,16 @@
|
|||
|
||||
if($output->data && count($output->data)) {
|
||||
foreach($output->data as $k => $v) {
|
||||
$oDocument = null;
|
||||
$oDocument = $oDocumentModel->getDocument();
|
||||
$oDocument->setAttribute($v);
|
||||
$tab_list[$mid]->document_list[] = $oDocument;
|
||||
$oDocument = null;
|
||||
$oDocument = $oDocumentModel->getDocument();
|
||||
$oDocument->setAttribute($v);
|
||||
$tab_list[$mid]->document_list[] = $oDocument;
|
||||
}
|
||||
} else {
|
||||
$tab_list[$mid]->document_list = array();
|
||||
}
|
||||
} else {
|
||||
$tab_list[$mid]->document_list = array();
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('widget_info', $widget_info);
|
||||
Context::set('tab_list', $tab_list);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue