selected_widget; $blank_img_path = Context::getRequestUri()."common/tpl/images/widget_bg.jpg"; unset($vars->module); unset($vars->act); unset($vars->selected_widget); if($vars->widget_sequence) { $cache_path = './files/cache/widget_cache/'; $cache_file = sprintf('%s%d.%s.cache', $cache_path, $vars->widget_sequence, Context::getLangType()); @unlink($cache_file); } $vars->widget_sequence = getNextSequence(); if(!$vars->widget_cache) $vars->widget_cache = 0; $attribute = array(); if($vars) { foreach($vars as $key => $val) { if(strpos($val,'|@|')>0) $val = str_replace('|@|',',',$val); $attribute[] = sprintf('%s="%s"', $key, str_replace('"','\"',$val)); } } if($vars->widget_fix_width == 'Y') { $widget_width_type = strtolower($vars->widget_width_type); if(!$widget_width_type||!in_array($widget_width_type,array("px","%"))) $widget_width_type = "px"; $style .= sprintf("%s:%s%s;", "width", trim($vars->widget_width), $widget_width_type); if($vars->widget_position) $style .= sprintf("%s:%s;", "float", trim($vars->widget_position)); else $style .= "float:left;"; $widget_code = sprintf('', $blank_img_path, $widget, implode(' ',$attribute), $style); } else { $style = "clear:both;"; $widget_code = sprintf('', "100%", $blank_img_path, $style, $widget, implode(' ',$attribute)); } $cache_path = './files/cache/widget_cache/'; $cache_file = sprintf('%s%d.%s.cache', $cache_path, $vars->widget_sequence, Context::getLangType()); @unlink($cache_file); // 코드 출력 $this->add('widget_code', $widget_code); } /** * @brief 선택된 위젯 - 스킨의 컬러셋을 return **/ function procWidgetGetColorsetList() { $widget = Context::get('selected_widget'); $skin = Context::get('skin'); $path = sprintf('./widgets/%s/', $widget); $oModuleModel = &getModel('module'); $skin_info = $oModuleModel->loadSkinInfo($path, $skin); for($i=0;$icolorset);$i++) { $colorset = sprintf('%s|@|%s', $skin_info->colorset[$i]->name, $skin_info->colorset[$i]->title); $colorset_list[] = $colorset; } if(count($colorset_list)) $colorsets = implode("\n", $colorset_list); $this->add('colorset_list', $colorsets); } } ?>