git-svn-id: http://xe-core.googlecode.com/svn/trunk@441 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-14 12:37:43 +00:00
parent b1a8c6406f
commit a41ab13b9b
5 changed files with 20 additions and 6 deletions

View file

@ -111,7 +111,8 @@
* ./files/_debug_message.php 파일에 $buff 내용을 출력한다.
* tail -f ./files/_debug_message.php 하여 계속 살펴 있다
**/
function debugPrint($buff, $display_line = true) {
function debugPrint($buff = null, $display_line = true) {
if($buff == null) $buff = $GLOBALS['HTTP_RAW_POST_DATA'];
$debug_file = "./files/_debug_message.php";
$buff = sprintf("%s\n",print_r($buff,true));

View file

@ -67,7 +67,6 @@
// 템플릿 파일 지정
$this->setTemplateFile('category_update_form');
debugPrint($selected_category);
// 아니면 전체 목록
} else {

View file

@ -4,6 +4,7 @@
<action name="dispDownloadedPluginList" type="view" standalone="true" admin_index="true" />
<action name="dispPluginInfo" type="view" standalone="true" />
<action name="dispGenerateCode" type="view" standalone="true" />
<action name="procGenerateCode" type="controller" standalone="true" />
</actions>
</module>

View file

@ -18,14 +18,27 @@
**/
function procGenerateCode() {
// 변수 정리
//$vars = Context::getRequestVars();
$vars = Context::getRequestVars();
$plugin = $vars->selected_plugin;
unset($vars->module);
unset($vars->act);
unset($vars->selected_plugin);
if($vars) foreach($vars as $key=>$val) $vars->{$key} = str_replace(array('"','\''),array('\"','\\\''),$val);
$attribute = array();
if($vars) {
foreach($vars as $key=>$val) {
debugPrint($val);
debugPrint(strpos('|@|', $val));
if(strpos('|@|', $val)>0) $val = str_replace('|@|',',',$val);
$attribute[] = sprintf('%s="%s"', $key, str_replace('"','\"',$val));
}
}
$plugin_code = sprintf('<div plugin="%s" %s></div>', $plugin, implode(' ',$attribute));
// 코드 출력
$this->add('plugin_code', 'hahaha');
$this->add('plugin_code', $plugin_code);
}
}

View file

@ -35,7 +35,7 @@
<td>
<!--@foreach($mid_list as $key => $val)-->
<div>
<input type="checkbox" value="{$key}" name="{$var->name}" id="chk_mid_list_{$key}" />
<input type="checkbox" value="{$key}" name="{$id}" id="chk_mid_list_{$key}" />
<label for="chk_mid_list_{$key}">{$key} ({$val->browser_title})</label>
</div>
<!--@end-->