관리자메인의 최근게시물과 비슷한 스킨을 찾습니다

관리자메인의 최근게시물과 비슷한 스킨을 찾습니다

QA

관리자메인의 최근게시물과 비슷한 스킨을 찾습니다

본문

관리자메인에 보면 최근게시물이라고

최신글과 최신 댓글을 동시에 출력하는게 있던데

 

스킨 자료실에는 이것과 비슷한 스킨이 없네요;;

어디 있는지 알려주실 수 있나요?

 

461161212_1560744294.9427.png

이 질문에 댓글 쓰기 :

답변 2

new 스킨을 갖다 쓰면 될 겁니다.

https://sir.kr/g5_skin/6828

adm 폴더 > index.php  파일 소스중

136~233줄으 소스를 참고하면 될듯 싶네요.

 

예를 든다면...

 

<?php
include_once($_SERVER['DOCUMENT_ROOT'] ."/common.php");
include_once($_SERVER['DOCUMENT_ROOT'] ."/_head.php");

 

$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id ";

if ($gr_id)
$sql_common .= " and b.gr_id = '$gr_id' ";
if ($view) {
if ($view == 'w')
$sql_common .= " and a.wr_id = a.wr_parent ";
else if ($view == 'c')
$sql_common .= " and a.wr_id <> a.wr_parent ";
}
$sql_order = " order by a.bn_id desc ";

$sql = " select count(*) as cnt {$sql_common} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];

$colspan = 5;
?>

<section>
<h2>최근게시물</h2>

<div class="tbl_head01 tbl_wrap">
<table>
<caption>최근게시물</caption>
<thead>
<tr>
<th scope="col">그룹</th>
<th scope="col">게시판</th>
<th scope="col">제목</th>
<th scope="col">이름</th>
<th scope="col">일시</th>
</tr>
</thead>
<tbody>
<?php
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];

if ($row['wr_id'] == $row['wr_parent']) // 원글
{
$comment = "";
$comment_link = "";
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '{$row['wr_id']}' ");

$name = get_sideview($row2['mb_id'], get_text(cut_str($row2['wr_name'], $config['cf_cut_name'])), $row2['wr_email'], $row2['wr_homepage']);
// 당일인 경우 시간으로 표시함
$datetime = substr($row2['wr_datetime'],0,10);
$datetime2 = $row2['wr_datetime'];
if ($datetime == G5_TIME_YMD)
$datetime2 = substr($datetime2,11,5);
else
$datetime2 = substr($datetime2,5,5);

}
else // 코멘트
{
$comment = '댓글. ';
$comment_link = '#c_'.$row['wr_id'];
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");

$name = get_sideview($row3['mb_id'], get_text(cut_str($row3['wr_name'], $config['cf_cut_name'])), $row3['wr_email'], $row3['wr_homepage']);
// 당일인 경우 시간으로 표시함
$datetime = substr($row3['wr_datetime'],0,10);
$datetime2 = $row3['wr_datetime'];
if ($datetime == G5_TIME_YMD)
$datetime2 = substr($datetime2,11,5);
else
$datetime2 = substr($datetime2,5,5);
}
?>

<tr>
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/new.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo cut_str($row['gr_subject'],10) ?></a></td>
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo cut_str($row['bo_subject'],20) ?></a></td>
<td><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>&wr_id=<?php echo $row2['wr_id'] ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
<td class="td_mbname"><div><?php echo $name ?></div></td>
<td class="td_datetime"><?php echo $datetime ?></td>
</tr>

<?php
}
if ($i == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_list03 btn_list">
<a href="<?php echo G5_BBS_URL ?>/new.php">최근게시물 더보기</a>
</div>
</section>
<?php
include_once($_SERVER['DOCUMENT_ROOT'] ."/tail.php");
?>

 

버튼 관련 css 소스는 아래와 같습니다.

 

.btn_list {margin:10px 0} /* 목록용 */
.btn_list .btn_02{height:28px;padding:0 5px;border:0;}
.btn_list03 {text-align:right}
.btn_list03 a {display:inline-block;padding:0 15px;height:28px;background:#617d46;color:#fff;text-decoration:none;line-height:2.4em;vertical-align:middle}
.btn_list03 a:focus {background:#555}

답변을 작성하시기 전에 로그인 해주세요.
전체 8
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT