그누보드 관리자페이지에서 게시판 글쓰기 페이지로 링크.. 채택완료
noobmaster
5년 전
조회 1,798
</p>
<p><tr class="<?php echo $bg; ?>">
<td>
<?php echo $row['gr_id'] ?>
</td>
<td>
<a href="<?php echo get_pretty_url($row['bo_table']) ?>" target='_blank'><?php echo get_text($row['bo_subject']) ?></a>
</td>
<td>
//글쓰기 페이지로 넘어가는 링크!
</td>
</tr></p>
<p>
관리자 메인에 각 게시판 바로가기 영역을 추가하는 중입니다.
다른건 다 괜찮은데 해당 게시판의 '글쓰기'페이지로 넘어가는 링크를 불러오려면
get_pretty_url($row['bo_table'] 에서 bo_table을 어떻게 고쳐야할까요>..?
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
5년 전
// 쓰기 링크 $write_href = ''; if ($member['mb_level'] >= $row['bo_write_level']) { $write_href = short_url_clean(G5_BBS_URL.'/write.php?bo_table='.$row['bo_table']); }</pre> <p>이런식으로 쓰시면되겠네요
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
P
Policia
5년 전
아 관리자니 if문은 빼도 상관없겠네요 if문은빼주시고 $write_href 부분만 가져가서 쓰시면될듯합니다
n
noobmaster
5년 전
허 ㅠㅠ 정말 감사드립니다 뉴비는 한수 또 배워갑니다.. 좋은하루되세요!!
댓글을 작성하려면 로그인이 필요합니다.
5년 전
어떤식으로 관리자메인에 각 게시판들이 뿌려지는지 알수있으면 어떻게 해야할지 알것같네요
$row['bo_table']은 게시판 ID입니다 각 게시판가져올때 bo_table 사용한값을 그대로 넣으면 될듯합니다.
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
n
noobmaster
5년 전
[code]
<?php
$sub_menu = '100000';
include_once('./_common.php');
@include_once('./safe_check.php');
if(function_exists('social_log_file_delete')){
social_log_file_delete(86400); //소셜로그인 디버그 파일 24시간 지난것은 삭제
}
$g5['title'] = '관리자메인';
include_once ('./admin.head.php');
$new_write_rows = 5;
auth_check($auth[$sub_menu], 'r');
$sql_common = " from {$g5['board_table']} a ";
$sql_search = " where (1) ";
if ($is_admin != "super") {
$sql_common .= " , {$g5['group_table']} b ";
$sql_search .= " and (a.gr_id = b.gr_id and b.gr_admin = '{$member['mb_id']}') ";
}
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "bo_table" :
$sql_search .= " ($sfl like '$stx%') ";
break;
case "a.gr_id" :
$sql_search .= " ($sfl = '$stx') ";
break;
default :
$sql_search .= " ($sfl like '%$stx%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "a.gr_id, a.bo_table";
$sod = "asc";
}
$sql_order = " order by $sst $sod ";
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
$g5['title'] = '게시판관리';
include_once('./admin.head.php');
$colspan = 15;
?>
<div class="wrapper clearfix">
<!--게시판 바로가기 링크-->
<section class="board_link" style=" float: left; width: 48%; margin-right: 4%;">
<h2>게시판 바로가기</h2>
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col" style="width: 20%;">게시판 그룹명</th>
<th scope="col">게시판 제목</th>
<th scope="col">글쓰기</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$one_update = '<a href="./board_form.php?w=u&bo_table='.$row['bo_table'].'&'.$qstr.'" class="btn btn_03">수정</a>';
$one_copy = '<a href="./board_copy.php?bo_table='.$row['bo_table'].'" class="board_copy btn btn_02" target="win_board_copy">복사</a>';
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td>
<?php echo $row['gr_id'] ?>
</td>
<td>
<a href="<?php echo get_pretty_url($row['bo_table']) ?>" target='_blank'><?php echo get_text($row['bo_subject']) ?></a>
</td>
<td>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
</form>
</section>
[/code]
답변주셔서 감사드립니다!
아직 직접 짜는 수준은 못되서 게시판 리스트페이지에 있는 코드를 그대로 긁어서 붙여넣었거든요..
<?php echo get_pretty_url($row['bo_table']) ?>
요기서 어떻게 코드를 추가해야 글쓰기페이지를 의미하는지 궁금해서요.. !
<?php
$sub_menu = '100000';
include_once('./_common.php');
@include_once('./safe_check.php');
if(function_exists('social_log_file_delete')){
social_log_file_delete(86400); //소셜로그인 디버그 파일 24시간 지난것은 삭제
}
$g5['title'] = '관리자메인';
include_once ('./admin.head.php');
$new_write_rows = 5;
auth_check($auth[$sub_menu], 'r');
$sql_common = " from {$g5['board_table']} a ";
$sql_search = " where (1) ";
if ($is_admin != "super") {
$sql_common .= " , {$g5['group_table']} b ";
$sql_search .= " and (a.gr_id = b.gr_id and b.gr_admin = '{$member['mb_id']}') ";
}
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "bo_table" :
$sql_search .= " ($sfl like '$stx%') ";
break;
case "a.gr_id" :
$sql_search .= " ($sfl = '$stx') ";
break;
default :
$sql_search .= " ($sfl like '%$stx%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "a.gr_id, a.bo_table";
$sod = "asc";
}
$sql_order = " order by $sst $sod ";
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목록</a>';
$g5['title'] = '게시판관리';
include_once('./admin.head.php');
$colspan = 15;
?>
<div class="wrapper clearfix">
<!--게시판 바로가기 링크-->
<section class="board_link" style=" float: left; width: 48%; margin-right: 4%;">
<h2>게시판 바로가기</h2>
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col" style="width: 20%;">게시판 그룹명</th>
<th scope="col">게시판 제목</th>
<th scope="col">글쓰기</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$one_update = '<a href="./board_form.php?w=u&bo_table='.$row['bo_table'].'&'.$qstr.'" class="btn btn_03">수정</a>';
$one_copy = '<a href="./board_copy.php?bo_table='.$row['bo_table'].'" class="board_copy btn btn_02" target="win_board_copy">복사</a>';
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td>
<?php echo $row['gr_id'] ?>
</td>
<td>
<a href="<?php echo get_pretty_url($row['bo_table']) ?>" target='_blank'><?php echo get_text($row['bo_subject']) ?></a>
</td>
<td>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
</form>
</section>
[/code]
답변주셔서 감사드립니다!
아직 직접 짜는 수준은 못되서 게시판 리스트페이지에 있는 코드를 그대로 긁어서 붙여넣었거든요..
<?php echo get_pretty_url($row['bo_table']) ?>
요기서 어떻게 코드를 추가해야 글쓰기페이지를 의미하는지 궁금해서요.. !
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인