/home/mjc1/public_html/adm/shop_admin/bannerform.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
$sub_menu 
'100720';
include_once(
'./_common.php');

auth_check($auth[$sub_menu], "w");

$html_title '배너';
$g5['title'] = $html_title.'관리';

if (
$w=="u")
{
    
$html_title .= ' 수정';
    
$sql " select * from {$g5['g5_shop_banner_table']} where bn_id = '$bn_id' ";
    
$bn sql_fetch($sql);
}
else
{
    
$html_title .= ' 입력';
    
$bn['bn_url']        = "http://";
    
$bn['bn_begin_time'] = date("Y-m-d 00:00:00"time());
    
$bn['bn_end_time']   = date("Y-m-d 00:00:00"time()+(60*60*24*91));
}

include_once (
G5_ADMIN_PATH.'/admin.head.php');
?>

<form name="fbanner" action="./bannerformupdate.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="w" value="<?php echo $w?>">
<input type="hidden" name="bn_id" value="<?php echo $bn_id?>">

<div class="tbl_frm01 tbl_wrap">
    <table>
    <caption><?php echo $g5['title']; ?></caption>
    <colgroup>
        <col class="grid_4">
        <col>
    </colgroup>
    <tbody>
    <tr>
        <th scope="row">이미지</th>
        <td>
            <input type="file" name="bn_bimg">
            <?php
            $bimg_str 
"";
            
$bimg G5_DATA_PATH."/banner/{$bn['bn_id']}";
            if (
file_exists($bimg) && $bn['bn_id']) {
                
$size = @getimagesize($bimg);
                if(
$size[0] && $size[0] > 750)
                    
$width 750;
                else
                    
$width $size[0];

                echo 
'<input type="checkbox" name="bn_bimg_del" value="1" id="bn_bimg_del"> <label for="bn_bimg_del">삭제</label>';
                
$bimg_str '<img src="'.G5_DATA_URL.'/banner/'.$bn['bn_id'].'" width="'.$width.'">';
                
//$size = getimagesize($bimg);
                //echo "<img src='$g5[admin_path]/img/icon_viewer.gif' border=0 align=absmiddle onclick=\"imageview('bimg', $size[0], $size[1]);\"><input type=checkbox name=bn_bimg_del value='1'>삭제";
                //echo "<div id='bimg' style='left:0; top:0; z-index:+1; display:none; position:absolute;'><img src='$bimg' border=1></div>";
            
}
            if (
$bimg_str) {
                echo 
'<div class="banner_or_img">';
                echo 
$bimg_str;
                echo 
'</div>';
            }
            
?>
        </td>
    </tr>
    <tr>
        <th scope="row"><label for="bn_alt">이미지 설명</label></th>
        <td>
            <?php echo help("img 태그의 alt, title 에 해당되는 내용입니다.\n배너에 마우스를 오버하면 이미지의 설명이 나옵니다."); ?>
            <input type="text" name="bn_alt" value="<?php echo $bn['bn_alt']; ?>" id="bn_alt" class="frm_input" size="80">
        </td>
    </tr>
    <tr>
        <th scope="row"><label for="bn_url">링크</label></th>
        <td>
            <?php echo help("배너클릭시 이동하는 주소입니다."); ?>
            <input type="text" name="bn_url" size="80" value="<?php echo $bn['bn_url']; ?>" id="bn_url" class="frm_input">
        </td>
    </tr>
    <tr>
        <th scope="row"><label for="bn_position">출력위치</label></th>
        <td>
            <?php echo help("메인 : 쇼핑몰 메인화면(index.php)에만 출력합니다.\n 메인 이외에 배너들은 디자인 레이아웃과 연동되어야할 부분이 있습니다. 무조건 추가한다고 다 적용되는것은 아닙니다."50); ?>
            <select name="bn_position" id="bn_position">
                <option value="메인" <?php echo get_selected($bn['bn_position'], '메인'); ?>>메인</option>
                <option value="모바일메인" <?php echo get_selected($bn['bn_position'], '모바일메인'); ?>>모바일메인</option>
                <option value="왼쪽" <?php echo get_selected($bn['bn_position'], '왼쪽'); ?>>왼쪽</option>
                <option value="우측" <?php echo get_selected($bn['bn_position'], '우측'); ?>>우측</option>
                <option value="하단" <?php echo get_selected($bn['bn_position'], '하단'); ?>>하단</option>
                <option value="기타1" <?php echo get_selected($bn['bn_position'], '기타1'); ?>>기타1</option>
                <option value="기타2" <?php echo get_selected($bn['bn_position'], '기타2'); ?>>기타2</option>
                <option value="기타3" <?php echo get_selected($bn['bn_position'], '기타3'); ?>>기타3</option>
            </select>
        </td>
    </tr>
    <tr>
        <th scope="row"><label for="bn_border">테두리</label></th>
        <td>
             <?php echo help("배너이미지에 테두리를 넣을지를 설정합니다."50); ?>
            <select name="bn_border" id="bn_border">
                <option value="0" <?php echo get_selected($bn['bn_border'], 0); ?>>사용안함</option>
                <option value="1" <?php echo get_selected($bn['bn_border'], 1); ?>>사용</option>
            </select>
        </td>
    </tr>
    <tr>
        <th scope="row"><label for="bn_new_win">새창</label></th>
        <td>
            <?php echo help("배너클릭시 새창을 띄울지를 설정합니다."50); ?>
            <select name="bn_new_win" id="bn_new_win">
                <option value="0" <?php echo get_selected($bn['bn_new_win'], 0); ?>>사용안함</option>
                <option value="1" <?php echo get_selected($bn['bn_new_win'], 1); ?>>사용</option>
            </select>
        </td>
    </tr>
    <tr>
        <th scope="row"><label for="bn_begin_time">시작일시</label></th>
        <td>
            <?php echo help("배너 게시 시작일시를 설정합니다."); ?>
            <input type="text" name="bn_begin_time" value="<?php echo $bn['bn_begin_time']; ?>" id="bn_begin_time" class="frm_input"  size="21" maxlength="19">
            <input type="checkbox" name="bn_begin_chk" value="<?php echo date("Y-m-d 00:00:00"time()); ?>" id="bn_begin_chk" onclick="if (this.checked == true) this.form.bn_begin_time.value=this.form.bn_begin_chk.value; else this.form.bn_begin_time.value = this.form.bn_begin_time.defaultValue;">
            <label for="bn_begin_chk">오늘</label>
        </td>
    </tr>
    <tr>
        <th scope="row"><label for="bn_end_time">종료일시</label></th>
        <td>
            <?php echo help("배너 게시 종료일시를 설정합니다."); ?>
            <input type="text" name="bn_end_time" value="<?php echo $bn['bn_end_time']; ?>" id="bn_end_time" class="frm_input" size=21 maxlength=19>
            <input type="checkbox" name="bn_end_chk" value="<?php echo date("Y-m-d 23:59:59"time()+60*60*24*31); ?>" id="bn_end_chk" onclick="if (this.checked == true) this.form.bn_end_time.value=this.form.bn_end_chk.value; else this.form.bn_end_time.value = this.form.bn_end_time.defaultValue;">
            <label for="bn_end_chk">오늘+31일</label>
        </td>
    </tr>
    <tr>
        <th scope="row"><label for="bn_order">출력 순서</label></th>
        <td>
           <?php echo help("배너를 출력할 때 순서를 정합니다. 숫자가 작을수록 먼저 출력됩니다."); ?>
           <?php echo order_select("bn_order"$bn['bn_order']); ?>
        </td>
    </tr>
    </tbody>
    </table>
</div>

<div class="btn_confirm01 btn_confirm">
    <input type="submit" value="확인" class="btn_submit" accesskey="s">
    <a href="./bannerlist.php">목록</a>
</div>

</form>

<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>