메뉴 이미지 버튼 등록시 확장자 처리 오류 수정. png파일일 경우 메뉴의link값에 iePngFix class 자동 연결하도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3581 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-01-23 12:24:22 +00:00
parent bd6d7f2723
commit 890664fd39
3 changed files with 16 additions and 30 deletions

View file

@ -280,7 +280,7 @@
// 요건을 만족하고 업로드된 파일이면 지정된 위치로 이동
} else {
$tmp_arr = explode('/',$target_file['type']);
$tmp_arr = explode('.',$target_file['name']);
$ext = $tmp_arr[count($tmp_arr)-1];
$path = sprintf('./files/attach/menu_button/%d/', $menu_srl);
@ -415,9 +415,11 @@
$group_srls = $node->group_srls;
if($normal_btn) {
if(preg_match('/\.png$/',$normal_btn)) $classname = 'class="iePngFix"';
else $classname = '';
if($hover_btn) $hover_str = sprintf('onmouseover="this.src=\'%s\'"', $hover_btn); else $hover_str = '';
if($active_btn) $active_str = sprintf('onmousedown="this.src=\'%s\'"', $active_btn); else $active_str = '';
$link = sprintf('&lt;img src=&quot;%s&quot; onmouseout=&quot;this.src=\'%s\'&quot; alt=&quot;<?php print htmlspecialchars($_names[$_SESSION["lang_type"]]) ?>&quot; %s %s /&gt;', $normal_btn, $normal_btn, $hover_str, $active_str);
$link = sprintf('&lt;img src=&quot;%s&quot; onmouseout=&quot;this.src=\'%s\'&quot; alt=&quot;<?php print htmlspecialchars($_names[$_SESSION["lang_type"]]) ?>&quot; %s %s %s /&gt;', $normal_btn, $normal_btn, $hover_str, $active_str, $classname);
} else {
$link = '<? print $_names[$_SESSION["lang_type"]]; ?>';
}
@ -510,9 +512,11 @@
$group_srls = $node->group_srls;
if($normal_btn) {
if(preg_match('/\.png$/',$normal_btn)) $classname = 'class=\"iePngFix\"';
else $classname = '';
if($hover_btn) $hover_str = sprintf('onmouseover=\"this.src=\'%s\'\"', $hover_btn); else $hover_str = '';
if($active_btn) $active_str = sprintf('onmousedown=\"this.src=\'%s\'\"', $active_btn); else $active_str = '';
$link = sprintf('"<img src=\"%s\" onmouseout=\"this.src=\'%s\'\" alt=\"".$_menu_names[%d][$lang_type]."\" %s %s />"', $normal_btn, $normal_btn, $node->menu_item_srl, $hover_str, $active_str);
$link = sprintf('"<img src=\"%s\" onmouseout=\"this.src=\'%s\'\" alt=\"".$_menu_names[%d][$lang_type]."\" %s %s %s />"', $normal_btn, $normal_btn, $node->menu_item_srl, $hover_str, $active_str, $classname);
} else {
$link = sprintf('$_menu_names[%d][$lang_type]', $node->menu_item_srl);
}