최신글 전체목록에서 제목에 '싱글쿼트'와 "더블쿼트"입력시 최신글 목록에 > 그누보드&그샵

본문 바로가기
사이트 내 전체검색

그누보드&그샵

팁텍 최신글 전체목록에서 제목에 '싱글쿼트'와 "더블쿼트"입력시 최신글 목록에

페이지 정보

본문

<!--현재 사용중인 newlist.php 파일 소스 내용시작-->
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

define("_DOCTYPE_", "DESIGN");

if ($hours < 1 || $hours > 72) {
  $hours = 24;
}

$html_title = "$hours 시간 이내에 올라온 새글만 보기";
?>

<table width=100% cellpadding=3 cellspacing=0>
<tr><td height=1 background='./<?=$cfg[bbs_dir]?>/line.gif'></td></tr>
<tr><td  class='subject subjectbg ht'> <?=$html_title?> [<b><a href='<?="./?doc=insert/new_cnt.php&hours=$hours"?>'>덧글보기 </a></b>]</td></tr>
<tr><td height=1 background='./<?=$cfg[bbs_dir]?>/line.gif'></td></tr>
</table>
<p>

<table width=100% cellpadding=0 cellspacing=0>
<tr>
  <td width='' valign=top>

<?
$intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * $hours));

$sql = " select bo_subject, bo_table
          from $cfg[table_board]
        where bo_use_search = '1'
        order by bo_order_search ";
$result = sql_query($sql);
while ($row = mysql_fetch_array($result)) {
  $tbl = "{$cfg[write_table_prefix]}{$row[bo_table]}";
  $sql2 = " select wr_id,
                    wr_parent_id,
                    mb_id,
                    wr_name,
                    wr_email,
                    wr_homepage,
                    wr_num,
                    wr_subject,
                    wr_comment,
                    wr_commentcnt,
                    wr_datetime,
                    wr_hit
              from $tbl
              where wr_datetime >= '$intime'
                and wr_comment = '0'
              order by wr_id desc ";
  $result2 = sql_query($sql2);
  for ($i = 0; $row2 = mysql_fetch_array($result2); $i++) {
      /*
      if ($row2[wr_comment] > 0) {
          $sql3 = " select wr_subject
                      from $tbl
                      where wr_comment = 0
                        and wr_parent_id = '$row2[wr_parent_id]' ";
          $row3 = sql_fetch($sql3);
          $wr_subject = $row3[wr_subject];
      } else {
          $wr_subject = $row2[wr_subject];
      }
      $wr_subject = get_text($wr_subject);
      */
      $wr_subject = get_text($row2[wr_subject]);

      $key = $row2[wr_datetime] . $row[bo_table] . $row2[wr_id];
      $list[$key]->bo_subject = $row[bo_subject];
      $list[$key]->bo_table = $row[bo_table];
      $list[$key]->mb_id = $row2[mb_id];
      $list[$key]->mb_open = $row2[mb_open];
      $list[$key]->wr_id = $row2[wr_id];
      $list[$key]->wr_parent_id = $row2[wr_parent_id];
      $list[$key]->wr_email = $row2[wr_email];
      $list[$key]->wr_homepage = $row2[wr_homepage];
      $list[$key]->wr_name = get_text(cut_str($row2[wr_name],12));
      $list[$key]->wr_subject = cut_str($wr_subject,70,'…');
//      $list[$key]->wr_subject = get_text(cut_str($wr_subject,70,'…')); //최신글에서 싱글쿼트와 더블쿼트 코드화 출력방지
      $list[$key]->wr_comment = $row2[wr_comment];
      $list[$key]->wr_commentcnt = $row2[wr_commentcnt];
      $list[$key]->wr_datetime = $row2[wr_datetime];
      $list[$key]->wr_hit = $row2[wr_hit];
  }
  mysql_free_result($result2);
}
mysql_free_result($result);
?>

<table width=100% border=0 cellspacing=0 cellpadding=0>
<tr><td colspan=3 height=1 background='./<?=$cfg[bbs_dir]?>/line.gif'></td></tr>
<tr class='subject subjectbg ht' align="center">
  <td>게시판</td>
  <td>제목</td>
  <td>작성자</td>
</tr>
<tr><td colspan=3 height=1 background='./<?=$cfg[bbs_dir]?>/line.gif'></td></tr>
<?
if (count($list) > 0) {
  $i=0;
  krsort($list);
  foreach ($list as $key=>$value) {
      $comment = "";
      $atag_comment = "";
      if ($value->wr_comment > 0) {
          $comment = "<span style='font-size:8pt;'>[c]</span> ";
          $atag_comment = "#c{$value->wr_id}";
      }

      $commentcnt = "";
      if ($value->wr_commentcnt > 0) {
          $commentcnt = "<font size=-2>({$value->wr_commentcnt})</font>";
      }

      $name = gblayer($value->mb_id, cut_str($value->wr_name,12), $value->wr_email, $value->wr_homepage);

      $value->bo_subject = cut_str($value->bo_subject, 20);

      $list = $i++%2;

      echo "<tr class='list$list ht' align=center>";
      echo "<td width=150><a href='./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=".$value->bo_table."'>".$value->bo_subject."</a></td>";
      echo "<td align=left>  <a href='./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=".$value->bo_table."&wr_id=".$value->wr_parent_id."$atag_comment'>$comment{$value->wr_subject}</a> {$commentcnt}</td>";
      echo "<td width=120> $name </td>";
      //echo "<td width=110 align=center>[".substr($value->wr_datetime,2,14)."]</td>";
      echo "</tr>\n";

      //echo "<tr><td colspan=4 background='{$gnu_path}image/line_width.gif'></td></tr>\n";
  }
} else
  echo "<td height=100 align=center colspan=3>등록된 글이 없습니다.</td>";
?>
<tr><td colspan=3 height=1 background='./<?=$cfg[bbs_dir]?>/line.gif'></td></tr>
</table>

<p>
 
<a href='./?doc=<?=$doc?>&hours=1'>1시간</a> |
<a href='./?doc=<?=$doc?>&hours=2'>2시간</a> |
<a href='./?doc=<?=$doc?>&hours=3'>3시간</a> |
<a href='./?doc=<?=$doc?>&hours=6'>6시간</a> |
<a href='./?doc=<?=$doc?>&hours=12'>12시간</a> |
<a href='./?doc=<?=$doc?>&hours=24'>24시간</a> |
<a href='./?doc=<?=$doc?>&hours=48'>48시간</a> |
<a href='./?doc=<?=$doc?>&hours=72'>72시간</a>
<p>

</td>
</tr>
</table>
<!--현재 사용중인 newlist.php 파일 소스 내용 끝-->

72라인 정도에 주석처리 되어 있는 get_text부분을 참조하시기 바랍니다.
게시물의 제목을 불러오는 소스코드 중에서 get_text를 삭제하시면,
전체 최신글 목록에서 제목에 포함된 '싱글쿼트'와 "더블쿼트"의 코드화 출력현상이
사라지는 군요.

//나스카님

댓글목록

등록된 댓글이 없습니다.

Total 167건 9 페이지
  • RSS
그누보드&그샵 목록
번호 제목 글쓴이 조회 날짜
열람중 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1587 06-25
46 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2164 06-23
45 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1260 06-23
44 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1519 06-24
43 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1857 06-22
42 그샵 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1489 06-13
41 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1390 05-16
40 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1425 04-06
39 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1389 02-25
38 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1642 02-25
37 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1525 02-23
36 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1868 02-21
35 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1614 02-21
34 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1427 02-21
33 팁텍 까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1453 02-06

검색

회원로그인

회원가입

사이트 정보

회사명 : 회사명 / 대표 : 대표자명
주소 : OO도 OO시 OO구 OO동 123-45
사업자 등록번호 : 123-45-67890
전화 : 02-123-4567 팩스 : 02-123-4568
통신판매업신고번호 : 제 OO구 - 123호
개인정보관리책임자 : 정보책임자명

  • 게시물이 없습니다.

접속자집계

오늘
281
어제
375
최대
385
전체
37,745
Copyright © 소유하신 도메인. All rights reserved.