|
|
|
22년 전
|
조회 1,589
|
|
|
|
22년 전
|
조회 5,680
|
|
|
|
22년 전
|
조회 5,315
|
|
|
|
22년 전
|
조회 5,774
|
|
|
관리자
|
22년 전
|
조회 8,684
|
|
|
관리자
|
22년 전
|
조회 5,466
|
|
|
|
22년 전
|
조회 5,409
|
|
|
|
22년 전
|
조회 5,322
|
|
|
|
22년 전
|
조회 5,835
|
|
|
|
22년 전
|
조회 5,462
|
|
|
|
22년 전
|
조회 5,341
|
|
|
|
22년 전
|
조회 5,507
|
|
|
|
22년 전
|
조회 5,705
|
|
|
|
22년 전
|
조회 5,435
|
|
|
|
22년 전
|
조회 5,258
|
|
|
|
22년 전
|
조회 5,336
|
|
|
|
22년 전
|
조회 5,291
|
|
|
|
22년 전
|
조회 5,450
|
|
|
|
22년 전
|
조회 1,639
|
|
|
|
22년 전
|
조회 1,729
|
댓글 6개
{
global $cfg, $absdir, $reldir, $uc1, $uc2, $uc3;
$sql = " select * from $cfg[table_board] where bo_table = '$bo_table' ";
$bd = sql_fetch_array($sql);
if ($subjectlen == '') $subjectlen = $bd[bo_subject_len];
$cfg[board_table_prefix] = "gb_write_"; // 게시판 테이블의 접두사
$게시판제목 = $subject;
$게시판 = $bo_table;
$절대경로 = $cfg[url];
$새글스킨경로 = "$cfg[url]/$cfg[dir_skin]/";
$스킨 = $skins;
$table = "{$cfg[board_table_prefix]}{$bo_table}";
$result = sql_query_error(" select * from $table where wr_comment = 0 order by wr_id desc limit {$rows} ");
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td height=10 colspan=4></td></tr>";
for ($i = 0; $row = mysql_fetch_array($result); $i++) {
$temp[$i]->icon_file = ($row[wr_file1] || $row[wr_file2]) ? true : false;
$temp[$i]->icon_link = ($row[wr_link1] || $row[wr_link2]) ? true : false;
$temp[$i]->icon_new = ($row[wr_datetime] >= date("Y-m-d H:i:s", time() - ($board[bo_new] * 3600))) ? true : false;
$temp[$i]->icon_hot = ($row[wr_hit] >= $bd[bo_hot]) ? true : false;
$temp[$i]->icon_battle = ($row[wr_commentcnt] >= $bd[bo_battle]) ? true : false;
$temp[$i]->icon_secret = $row[wr_secret] ? true : false;
$temp[$i]->wr_commentcnt = ($row[wr_commentcnt]) ? $row[wr_commentcnt] : null;
$temp[$i]->wr_subject = get_text(cut_str($row[wr_subject], $subjectlen, '…'));
$temp[$i]->wr_id = $row[wr_id];
$temp[$i]->bo_table = $bo_table;
$temp[$i]->wr_datetime = $row[wr_datetime];
echo "<tr height=20><td style='font-size:9pt;'>";
echo "<img src=$새글스킨경로/$스킨/images/arrow.gif border=0> ";
if ($temp[$i]->icon_file) echo "<img src='$새글스킨경로/$스킨/images/icon_file.gif' align=absmiddle>";
if ($temp[$i]->icon_link) echo "<img src='$새글스킨경로/$스킨/images/icon_link.gif' align=absmiddle>";
echo("
<a href='$절대경로/gbview.php?bo_table={$게시판}&wr_id={$temp[$i]->wr_id}&type=$type'>
{$temp[$i]->wr_subject};</a>
");
echo "
</td></tr>
<tr><td width=100% height=1 background='$새글스킨경로/images/underline.gif' colspan=4></td></tr>
";
}
echo "</table>";
mysql_free_result($result);
}
그래도 문제를 찾아서 스킨방식으로 해야겠네요 *^^* 그전까지는
<?
// 새글 추출
function newlist($skins, $bo_table, $subject, $rows, $subjectlen='')
{
global $cfg, $uc1, $uc2, $uc3;
$sql = " select * from gb_board where bo_table = '$bo_table' ";
$bd = sql_fetch_array($sql);
if ($subjectlen == '') $subjectlen = $bd[bo_subject_len];
$cfg[board_table_prefix] = "gb_write_"; // 게시판 테이블의 접두사
$게시판제목 = $subject;
$게시판 = $bo_table;
$절대경로 = $cfg[url];
$새글스킨경로 = "$cfg[url]/$cfg[dir_skin]/";
$스킨 = $skins;
$table = "{$cfg[board_table_prefix]}{$bo_table}";
$result = sql_query_error(" select * from $table where wr_comment = 0 order by wr_id desc limit {$rows} ");
for ($i = 0; $row = mysql_fetch_array($result); $i++) {
$temp[$i]->icon_file = ($row[wr_file1] || $row[wr_file2]) ? true : false;
$temp[$i]->icon_link = ($row[wr_link1] || $row[wr_link2]) ? true : false;
$temp[$i]->icon_new = ($row[wr_datetime] >= date("Y-m-d H:i:s", time() - ($board[bo_new] * 3600))) ? true : false;
$temp[$i]->icon_hot = ($row[wr_hit] >= $board[bo_hot]) ? true : false;
$temp[$i]->icon_battle = ($row[wr_commentcnt] >= $board[bo_battle]) ? true : false;
$temp[$i]->icon_secret = $row[wr_secret] ? true : false;
$temp[$i]->wr_commentcnt = ($row[wr_commentcnt]) ? $row[wr_commentcnt] : null;
$temp[$i]->wr_subject = get_text(cut_str($row[wr_subject], $subjectlen, '…'));
$temp[$i]->wr_id = $row[wr_id];
$temp[$i]->bo_table = $bo_table;
$temp[$i]->wr_datetime = $row[wr_datetime];
}
mysql_free_result($result);
echo "
<table border=0 cellpadding=0 cellspacing=0 width=100% align=center height=20 style='font-family:Verdana; font-size:9pt;'>
<tr>
<td width=22 height=22 style='font-size:9pt; font:돋움'>
<img src='$새글스킨경로/$스킨/images/qaz_lost_02.gif' width='22' height='29' border='0'></td>
<td height=22 width=343 background='$새글스킨경로/$스킨/images/qaz_lost_04.gif' >
<b>$게시판제목</b></td>
<td height=22 background='$새글스킨경로/$스킨/images/qaz_lost_04.gif' >
<a href='$절대경로/gblist.php?bo_table=$게시판'>
<img src='$새글스킨경로/$스킨/images/more.gif' width='40' height='15' border='0'></a></td>
<td width=22 height=22 align=right>
<img src='$새글스킨경로/$스킨/images/qaz_lost_03.gif' width='22' height='29' border='0'></td>
</tr>
</table>
<tr>
<td height=2 colspan=4></td>
</tr>
<tr>
<td height=20 colspan=4 >
<table border='0' cellpadding='0' cellspacing='0' width='100%'> ";
for ($i=0; $i<count($temp); $i++) {
echo "
<tr>
<td style='font-size:9pt;'> <img src='$새글스킨경로/$스킨/images/arrow.gif' border=0> ";
if ($temp[$i]->icon_file) echo "<img src='$새글스킨경로/$스킨/images/icon_file.gif' align=absmiddle>";
if ($temp[$i]->icon_link) echo "<img src='$새글스킨경로/$스킨/images/icon_link.gif' align=absmiddle>";
echo "<a href='$절대경로/gbview.php?bo_table=$게시판&wr_id={$temp[$i]->wr_id}'>{$temp[$i]->wr_subject}</a>";
if ($temp[$i]->wr_commentcnt) echo "[{$temp[$i]->wr_commentcnt}]";
if ($temp[$i]->icon_new) echo "<img src='$새글스킨경로/$스킨/images/icon_new.gif' align=absmiddle>";
if ($temp[$i]->icon_hot) echo "<img src='$새글스킨경로/$스킨/images/icon_hot.gif' align=absmiddle>";
if ($temp[$i]->icon_battle) echo "<img src='$새글스킨경로/$스킨/images/icon_battle.gif' align=absmiddle>";
if ($temp[$i]->icon_secret) echo "<img src='$새글스킨경로/$스킨/images/icon_secret.gif' align=absmiddle>";
echo " </td>
</tr> ";
}
echo " </table>
</td>
</tr>
<tr>
<td width=100% height=1 background='$새글스킨경로/images/underline.gif' colspan=4></td>
</tr>
</table> ";
}
발생한 문제인데요. lib.inc.php 와 스킨파일 둘중에 하나가 문제인데요
머 복잡한 내용은 필요없고 무엇을 고쳐야 하느냐면요
스킨파일을 포기하시고 직접 echo되도록 하세요. 그럼 해결됩니다.
userlib.inc.php 에 for문을 돌려서 최신글아이콘과 배틀아이콘등을 출력하도록 하는 부분있조? 그부분에
직접 스킨부분에서 출력하는부분을 따다 넣으세요.그리고 스킨링크 걸어놓는부분을 막아 놓으시구요.
전 그렇게 해결했습니다. 그럼..좀더 궁금한건 리플 달아주세요