107 lines
3.9 KiB
PHP
107 lines
3.9 KiB
PHP
<?php
|
|
//$sub_menu = '100900';
|
|
include_once('./_common.php');
|
|
|
|
auth_check_menu($auth, $sub_menu, 'w');
|
|
|
|
$html_title = '구글 애드센스';
|
|
$g5['title'] = $html_title . ' 관리';
|
|
|
|
if ($w == 'u') {
|
|
$html_title .= ' 수정';
|
|
$ga = sql_fetch("select * from g5_google_ads where ga_id = '$ga_id'");
|
|
if (!$ga['ga_id']) alert('존재하지 않는 자료입니다.');
|
|
} else {
|
|
$html_title .= ' 입력';
|
|
$ga = array(
|
|
'ga_use' => 1,
|
|
'ga_responsive' => 1,
|
|
'ga_format' => 'auto'
|
|
);
|
|
}
|
|
|
|
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
|
?>
|
|
|
|
<form name="fgoogleads" action="./google_ads_form_update.php" method="post" onsubmit="return fgoogleads_submit(this);">
|
|
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
|
<input type="hidden" name="ga_id" value="<?php echo $ga_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"><label for="ga_name">광고 이름</label></th>
|
|
<td>
|
|
<input type="text" name="ga_name" value="<?php echo get_text($ga['ga_name']); ?>" id="ga_name" required class="required frm_input" size="50">
|
|
<?php echo help("관리용 이름입니다. (예: 메인 상단, 뉴스 리스트 중간)"); ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><label for="ga_client_id">클라이언트 ID</label></th>
|
|
<td>
|
|
<input type="text" name="ga_client_id" value="<?php echo get_text($ga['ga_client_id']); ?>" id="ga_client_id" required class="required frm_input" size="50">
|
|
<?php echo help("구글 애드센스 data-ad-client 값 (예: ca-pub-1234567890123456)"); ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><label for="ga_slot_id">슬롯 ID</label></th>
|
|
<td>
|
|
<input type="text" name="ga_slot_id" value="<?php echo get_text($ga['ga_slot_id']); ?>" id="ga_slot_id" required class="required frm_input" size="50">
|
|
<?php echo help("구글 애드센스 data-ad-slot 값 (예: 1234567890)"); ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row"><label for="ga_format">광고 형식</label></th>
|
|
<td>
|
|
<select name="ga_format" id="ga_format">
|
|
<option value="auto" <?php echo get_selected($ga['ga_format'], 'auto'); ?>>auto (자동)</option>
|
|
<option value="fluid" <?php echo get_selected($ga['ga_format'], 'fluid'); ?>>fluid (유동적)</option>
|
|
<option value="rectangle" <?php echo get_selected($ga['ga_format'], 'rectangle'); ?>>rectangle (직사각형)</option>
|
|
<option value="horizontal" <?php echo get_selected($ga['ga_format'], 'horizontal'); ?>>horizontal (가로형)</option>
|
|
<option value="vertical" <?php echo get_selected($ga['ga_format'], 'vertical'); ?>>vertical (세로형)</option>
|
|
</select>
|
|
<?php echo help("data-ad-format 값"); ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">반응형 여부</th>
|
|
<td>
|
|
<input type="checkbox" name="ga_responsive" value="1" id="ga_responsive" <?php echo ($ga['ga_responsive'] ? 'checked' : ''); ?>>
|
|
<label for="ga_responsive">사용 (data-full-width-responsive="true")</label>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">사용 여부</th>
|
|
<td>
|
|
<input type="checkbox" name="ga_use" value="1" id="ga_use" <?php echo ($ga['ga_use'] ? 'checked' : ''); ?>>
|
|
<label for="ga_use">사용</label>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="btn_fixed_top">
|
|
<a href="./google_ads_list.php" class="btn btn_02">목록</a>
|
|
<input type="submit" value="확인" class="btn_submit btn" accesskey="s">
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<script>
|
|
function fgoogleads_submit(f)
|
|
{
|
|
return true;
|
|
}
|
|
</script>
|
|
|
|
<?php
|
|
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
|
?>
|