2026 년 4 월

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

 
그누스킨 그누소스 소스변경 소스문법 홈준비 기타
 
작성일 : 07-01-10 11:22
[그누소스] bbs/scrap.php
 글쓴이 : morning (124.♡.110.138)
조회 : 3,912  
   http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&sca=&sfl=wr_subject… [1227]
bbs/scrap.php 입니다.

<?
include_once("./_common.php");

if (!$member[mb_id])
    alert_close("회원만 조회하실 수 있습니다.");

$g4[title] = $member[mb_nick] . "님의 스크랩";
include_once("$g4[path]/head.sub_t.php");

$list = array();

$sql_common = " from $g4[scrap_table] where mb_id = '$member[mb_id]' ";
$sql_order = " order by ms_id desc ";

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

$rows = $config[cf_page_rows];
$total_page  = ceil($total_count / $rows);  // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함

$list = array();

$sql = " select *
          $sql_common
          $sql_order
          limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
    $list[$i] = $row;

    // 순차적인 번호 (순번)
    $num = $total_count - ($page - 1) * $rows - $i;

    // 게시판 제목
    $sql2 = " select bo_subject from $g4[board_table] where bo_table = '$row[bo_table]' ";
    $row2 = sql_fetch($sql2);
    if (!$row2[bo_subject]) $row2[bo_subject] = "[게시판 없음]";

    // 게시물 제목
    $tmp_write_table = $g4[write_prefix] . $row[bo_table];
    $sql3 = " select wr_subject from $tmp_write_table where wr_id = '$row[wr_id]' ";
    $row3 = sql_fetch($sql3, FALSE);
    $subject = get_text(cut_str($row3[wr_subject], 100));
    if (!$row3[wr_subject])
        $row3[wr_subject] = "[글 없음]";

    //첫번째 이미지를 뽑자(천상재회 2006/11/29)
$sql4 = " select * from $g4[board_file_table] where bo_table = '$row[bo_table]' and wr_id = '$row[wr_id]' and bf_no = '0' ";
    $result4 = sql_query($sql4);
    $row4 = sql_fetch_array($result4);
$list[$i][bf_file] = $row4['bf_file'];
    $list[$i][bf_source] = $row4['bf_source'];
$list[$i][bo_table] = $row4['bo_table'];
    //이미지 관련 끝

    $list[$i][num] = $num;
    $list[$i][opener_href] = "./board.php?bo_table=$row[bo_table]";
    $list[$i][opener_href_wr_id] = "./board.php?bo_table=$row[bo_table]&wr_id=$row[wr_id]";
    $list[$i][bo_subject] = $row2[bo_subject];
    $list[$i][subject] = $subject;
    $list[$i][del_href] = "./scrap_delete.php?ms_id=$row[ms_id]&page=$page";
}

$member_skin_path = "$g4[path]/skin/member/$config[cf_member_skin]";
include_once("$member_skin_path/scrap.skin.php");

include_once("$g4[path]/tail.sub.php");
?>

skin/member/basic/scrap.skin.php 입니다.
해당 스킨 이미지 경로에 noimage.gif 하나 맹글어 넣으세요...

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<table width="600" height="50" border="0" cellpadding="0" cellspacing="0">
<tr>
    <td align="center" valign="middle" bgcolor="#EBEBEB">
        <table width="590" height="40" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td width="25" align="center" bgcolor="#FFFFFF" ><img src="<?=$member_skin_path?>/img/icon_01.gif" width="5" height="5"></td>
            <td width="75" align="left" bgcolor="#FFFFFF" ><font color="#666666"><b>스크랩</b></font></td>
            <td width="490" bgcolor="#FFFFFF" ></td>
        </tr>
        </table></td>
</tr>
</table>

<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td height="200" align="center" valign="top">
        <table width="540" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td height="20"></td>
        </tr>
        <tr>
            <td height="2" bgcolor="#808080"></td>
        </tr>
        <tr>
            <td width="540" bgcolor="#FFFFFF">
                <table width=100% cellpadding=1 cellspacing=1 border=0>
                <tr bgcolor=#E1E1E1 align=center>
                    <td width="10%" height="24"><b>번호</b></td>
                    <td width="12%"><b>게시판</b></td>
                    <td width="38%"><b>제목</b></td>
                    <td width="25%"><b>보관일시</b></td>
                    <td width="10%"><b>삭제</b></td>
                </tr>

                <? for ($i=0; $i<count($list); $i++) {
$sf = $list[$i][bf_file];
$img_1 = "$g4[path]/data/file/" .$list[$i][bo_table] ."/" .$list[$i][bf_file];
if ((file_exists($img_1)) && (preg_match("/\.($config[cf_image_extension])$/i", $sf))) {

                    } else {
                    $img_1 = "$member_skin_path/img/noimage.gif";
                    }

?>
                    <tr height=25 bgcolor="#F6F6F6" align="center">
                        <td height="24"><?=$list[$i][num]?></td>
                        <td><img src='<?=$img_1?>' style='border:1px solid #E8ECEF;padding:2px;' width='120' height='80' alt=''><br><a href="javascript:;" onclick="opener.document.location.href='<?=$list[$i][opener_href]?>';"><?=$list[$i][bo_subject]?></a></td>
                        <td align="left" style='word-break:break-all;'>&nbsp;<a href="javascript:;" onclick="opener.document.location.href='<?=$list[$i][opener_href_wr_id]?>';"><?=$list[$i][subject]?></a></td>
                        <td><?=$list[$i][ms_datetime]?></td>
                        <td><a href="javascript:del('<?=$list[$i][del_href]?>');"><img src="<?=$member_skin_path?>/img/btn_comment_delete.gif" width="45" height="14" border="0"></a></td>
                    </tr>
                <? } ?>

                <? if ($i == 0) echo "<tr><td colspan=5 align=center height=100>자료가 없습니다.</td></tr>"; ?>
                </table></td>
        </tr>
        </table></td>
</tr>
<tr>
    <td height="30" align="center"><?=get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");?></td>
</tr>
<tr>
    <td height="2" align="center" valign="top" bgcolor="#D5D5D5"></td>
</tr>
<tr>
    <td height="2" align="center" valign="top" bgcolor="#E6E6E6"></td>
</tr>
<tr>
    <td height="40" align="center" valign="bottom"><a href="javascript:window.close();"><img src="<?=$member_skin_path?>/img/btn_close.gif" width="48" height="20" border="0"></a></td>
</tr>
</table>
<br>
[이 게시물은 morning님에 의해 2009-11-22 17:49:48 홈관리자료실에서 이동 됨] [이 게시물은 morning님에 의해 2009-11-22 17:56:43 알림판에서 이동 됨]
주님과 함께 모닝커피를

 
 

Total 167
번호 제   목 글쓴이 날짜 조회
77 [그누소스] 게시판에 필드늘리는 소스 Morning 01-14 3538
76 [소스문법] if a=b or c=d (3) Morning 01-14 4205
75 [그누스킨] morning_webzine Morning 01-13 4143
74 [그누소스] 여분필드 나눠쓰기 Morning 01-13 3423
73 [그누소스] 블로그최신글 Morning 01-12 3190
72 [그누소스] 홈관리페이지 Morning 01-12 3434
71 [소스변경] 블로그에 그림이 나타나게하기위해서 Morning 01-12 4274
70 [그누소스] 내블로그 바로가기 Morning 01-12 3714
69 [소스변경] 검색 강화를 위해 (1) Morning 01-12 4152
68 [그누소스] key word (1) morning 01-10 3602
67 [그누소스] bbs/scrap.php morning 01-10 3913
66 [소스문법] 제외그룹설정방법, 특정그룹설정방법 Morning 01-01 4107
65 [그누스킨] 짤방_dq morning 01-01 4502
64 [그누스킨] 그룹최신글스킨 morning 01-01 3877
63 [그누소스] 그룹최신글 morning 01-01 3596
 1  2  3  4  5  6  7  8  9  10    

Therefore, holy brothers, who share in the heavenly calling,
fix your thoughts on Jesus, the apostle and high priest whom we confess.
Let us fix our eyes on Jesus, the author and perfecter of our faith,
who for the joy set before him endured the cross, scorning its shame,
and sat down at the right hand of the throne of God