#51 에 따른 get_list_skin_options 함수 수정
This commit is contained in:
@ -163,7 +163,9 @@ $pg_anchor ="<ul class=\"anchor\">
|
||||
<td>
|
||||
<label for="de_type1_list_use">출력</label> <input type="checkbox" name="de_type1_list_use" value="1" id="de_type1_list_use" <?=$default['de_type1_list_use']?"checked":"";?>>
|
||||
<label for="de_type1_list_skin">스킨 </label>
|
||||
<select name="de_type1_list_skin" id="de_type1_list_skin"><?=get_list_skin_options("^maintype(.*)\.php", G4_SHOP_PATH);?></select><script>document.getElementById('de_type1_list_skin').value='<?=$default['de_type1_list_skin']?>';</script>
|
||||
<select name="de_type1_list_skin" id="de_type1_list_skin">
|
||||
<?=get_list_skin_options("^maintype(.*)\.php", G4_SHOP_PATH, $default['de_type1_list_skin'] );?>
|
||||
</select>
|
||||
<label for="de_type1_list_mod">1라인이미지수</label>
|
||||
<input type="text" name="de_type1_list_mod" value="<?=$default['de_type1_list_mod']?>" id="de_type1_list_mod" class="frm_input" size="3">
|
||||
<label for="de_type1_list_row">라인</label>
|
||||
|
||||
@ -556,9 +556,9 @@ function get_goods($uq_id)
|
||||
|
||||
|
||||
// 패턴의 내용대로 해당 디렉토리에서 정렬하여 <select> 태그에 적용할 수 있게 반환
|
||||
function get_list_skin_options($pattern, $dirname="./")
|
||||
function get_list_skin_options($pattern, $dirname='./', $sval='')
|
||||
{
|
||||
$str = "";
|
||||
$str = '<option value="">선택</option>'.PHP_EOL;
|
||||
|
||||
unset($arr);
|
||||
$handle = opendir($dirname);
|
||||
@ -571,7 +571,12 @@ function get_list_skin_options($pattern, $dirname="./")
|
||||
|
||||
sort($arr);
|
||||
foreach($arr as $key=>$value) {
|
||||
$str .= "<option value=\"$arr[$key]\">$arr[$key]</option>\n";
|
||||
if($key == $sval)
|
||||
$selected = ' selected="selected"';
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
$str .= '<option value="'.$arr[$key].'"'.$selected.'>'.$arr[$key].'</option>'.PHP_EOL;
|
||||
}
|
||||
|
||||
return $str;
|
||||
|
||||
Reference in New Issue
Block a user