그누보드 [G5] 게시물의 날짜(작성일)와 조회수 변경
페이지 정보
본문
스킨을 이용해서 게시글 날짜와 조회수 등을 변경하는 방법입니다.
1. 그누보드5 / skin / board / 폴더 / view.skin.php 적정한 위치에 추가
그누보드5 / mobile / skin / board / 폴더 / view.skin.php 적정한 위치에 추가
<?php if($is_admin == 'super') { ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<tbody>
<form name="update_date" action="<?php echo $board_skin_url; ?>/update_date.php" method="post" style="padding:0; margin:0;">
<input type="hidden" name="bo_table" value="<?php echo $g5['write_prefix'] . $bo_table; ?>">
<input type="hidden" name="REQUEST_URI" value="<?php echo $_SERVER['REQUEST_URI']; ?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id; ?>">
<tr>
<th scope="row">작성일</th>
<td><input type="text" name="wr_datetime" style="width:120px;" class="frm_input" value="<?php echo $view['wr_datetime']; ?>"></td>
<th scope="row">조회수</th>
<td><input type="text" name="wr_hit" style="width:80px;" class="frm_input" value="<?php echo $view['wr_hit']; ?>"></td>
<th style="text-align:center;"><div class="btn_list"><input type="submit" value=" 저장 " class="btn_list"></div></th>
</tr>
</form>
</tbody>
</table>
</div>
<?php } ?>
2-1. 그누보드5 / skin / board / 폴더 / update_date.php 생성
그누보드5 / mobile / skin / board / 폴더 / update_date.php 생성
<?php
include_once "_common.php";
if($is_admin=='super') {
$sql = " update {$_POST['bo_table']} set wr_datetime = '{$_POST['wr_datetime']} ', wr_hit = '{$_POST['wr_hit']}' where wr_id = '{$_POST['wr_id']}' ";
sql_query($sql);
}
?>
<script>
location.href="<?php echo $_POST['REQUEST_URI']; ?>" ;
</script>
3-1. 그누보드5 / skin / board / 폴더 / _common.php 생성
<?php
include_once('../../../common.php');
// 테마사용할때는 아래꺼 사용
//include_once('../../../../common.php');
3-2. 그누보드5 / mobile / skin / board / 폴더 / _common.php 생성
<?php
include_once('../../../../common.php');
1. 그누보드5 / skin / board / 폴더 / view.skin.php 적정한 위치에 추가
그누보드5 / mobile / skin / board / 폴더 / view.skin.php 적정한 위치에 추가
<?php if($is_admin == 'super') { ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<tbody>
<form name="update_date" action="<?php echo $board_skin_url; ?>/update_date.php" method="post" style="padding:0; margin:0;">
<input type="hidden" name="bo_table" value="<?php echo $g5['write_prefix'] . $bo_table; ?>">
<input type="hidden" name="REQUEST_URI" value="<?php echo $_SERVER['REQUEST_URI']; ?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id; ?>">
<tr>
<th scope="row">작성일</th>
<td><input type="text" name="wr_datetime" style="width:120px;" class="frm_input" value="<?php echo $view['wr_datetime']; ?>"></td>
<th scope="row">조회수</th>
<td><input type="text" name="wr_hit" style="width:80px;" class="frm_input" value="<?php echo $view['wr_hit']; ?>"></td>
<th style="text-align:center;"><div class="btn_list"><input type="submit" value=" 저장 " class="btn_list"></div></th>
</tr>
</form>
</tbody>
</table>
</div>
<?php } ?>
2-1. 그누보드5 / skin / board / 폴더 / update_date.php 생성
그누보드5 / mobile / skin / board / 폴더 / update_date.php 생성
<?php
include_once "_common.php";
if($is_admin=='super') {
$sql = " update {$_POST['bo_table']} set wr_datetime = '{$_POST['wr_datetime']} ', wr_hit = '{$_POST['wr_hit']}' where wr_id = '{$_POST['wr_id']}' ";
sql_query($sql);
}
?>
<script>
location.href="<?php echo $_POST['REQUEST_URI']; ?>" ;
</script>
3-1. 그누보드5 / skin / board / 폴더 / _common.php 생성
<?php
include_once('../../../common.php');
// 테마사용할때는 아래꺼 사용
//include_once('../../../../common.php');
3-2. 그누보드5 / mobile / skin / board / 폴더 / _common.php 생성
<?php
include_once('../../../../common.php');