조회수 순으로 추출하는 소스인데 정보
조회수 순으로 추출하는 소스인데본문
업로드한 이미지는 못 불로오나요.?
게시물에 파일1에 업로드한 이미지를 같이 불러오고 싶은데
<img src=/data/file/".$value->bo_table."/{$value->wr_file1} width=70 height=30 border=0>
전에 이런씩으로하면 나오던데.. 이건 G3였을땐가 잘 모르겟네요.
아래 소스에서 게시물 파일1에 업로드한 이미지를 같이 불러오는 코드 아시는 분 계신지 도움 좀 부탁 드릴께요.
<?
include_once("./_common.php");
$before_day = 30;
$before_time = date("Y-m-d H:i:s", $g4[server_time] - (86400 * $before_day));
$list1 = array();
$top1 = $top2 = 5;
$gr_id = "그룹ID";
$sql = " select bo_table, bo_notice from $g4[board_table]
where gr_id = '$gr_id'
and bo_use_search = 1 ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
{
$sql2 = " select * from $g4[write_prefix]$row[bo_table]
where wr_comment > -1
and wr_datetime >= '$before_time' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
{
$key = substr('00000'.$row2[wr_hit],-5) . '-' . $row2[wr_id];
$list2[$key][subject] = conv_subject($row2[wr_subject],26,'');
$list2[$key][href] = "$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row2[wr_id]";
$list2[$key][bo_table] = $row[bo_table];
$list2[$key][wr_id] = $row2[wr_id];
$list2[$key][wr_name] = $row2[wr_name];
$list2[$key][is_notice] = preg_match("/[^0-9]{0,1}{$row2[wr_id]}[\r]{0,1}/",$row[bo_notice]);
$list2[$key][wr_hit] = $row2[wr_hit];
$list2[$key][hit] = "($row2[wr_hit])";
}
}
krsort($list2);
?>
<style type="text/css">
<!--
body,td {font-size:9pt;}
a:link, a:visited, a:active { text-decoration:none; color:black; font-size:9pt }
a:hover { text-decoration:underline; color:black; }
a: { text-decoration:none; color:black; font-size:9pt }
</style>
<body >
<table border="0" cellspacing="0" cellpadding="0">
<?
$i=0;
foreach($list2 as $key=>$value) {
if ($i++>=($top1-1)) break;
?>
<tr>
<?
echo $list2[$key][icon_reply] . " ";
//echo "<a href='{$list2[$key][href]}' target=_parent>";
if ($list2[$key][is_notice])
echo "<td style=padding-left:4><font style='font-size:9pt; color:black;'><strong>{$list2[$key][subject]}</strong></font>";
else
echo "<td><a href='{$list2[$key][href]}' target=_parent><font style='font-size:9pt; color:black;'>{$list2[$key][subject]}</font>";
echo "<img src="이미지 불러올 주소" width='80' height='50' border='0'>";
echo "</a></td>";
?>
</td>
<tr><td colspan=2 height=5></td>
<? } ?>
<? if (count($list2) == 0) { ?>
<tr><td colspan=2 align=center height=30 background="<?=$latest_skin_path?>/img/board_bg_line.gif">게시물이 없습니다.</td></tr>
<? } ?>
</table>
게시물에 파일1에 업로드한 이미지를 같이 불러오고 싶은데
<img src=/data/file/".$value->bo_table."/{$value->wr_file1} width=70 height=30 border=0>
전에 이런씩으로하면 나오던데.. 이건 G3였을땐가 잘 모르겟네요.
아래 소스에서 게시물 파일1에 업로드한 이미지를 같이 불러오는 코드 아시는 분 계신지 도움 좀 부탁 드릴께요.
<?
include_once("./_common.php");
$before_day = 30;
$before_time = date("Y-m-d H:i:s", $g4[server_time] - (86400 * $before_day));
$list1 = array();
$top1 = $top2 = 5;
$gr_id = "그룹ID";
$sql = " select bo_table, bo_notice from $g4[board_table]
where gr_id = '$gr_id'
and bo_use_search = 1 ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
{
$sql2 = " select * from $g4[write_prefix]$row[bo_table]
where wr_comment > -1
and wr_datetime >= '$before_time' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
{
$key = substr('00000'.$row2[wr_hit],-5) . '-' . $row2[wr_id];
$list2[$key][subject] = conv_subject($row2[wr_subject],26,'');
$list2[$key][href] = "$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row2[wr_id]";
$list2[$key][bo_table] = $row[bo_table];
$list2[$key][wr_id] = $row2[wr_id];
$list2[$key][wr_name] = $row2[wr_name];
$list2[$key][is_notice] = preg_match("/[^0-9]{0,1}{$row2[wr_id]}[\r]{0,1}/",$row[bo_notice]);
$list2[$key][wr_hit] = $row2[wr_hit];
$list2[$key][hit] = "($row2[wr_hit])";
}
}
krsort($list2);
?>
<style type="text/css">
<!--
body,td {font-size:9pt;}
a:link, a:visited, a:active { text-decoration:none; color:black; font-size:9pt }
a:hover { text-decoration:underline; color:black; }
a: { text-decoration:none; color:black; font-size:9pt }
</style>
<body >
<table border="0" cellspacing="0" cellpadding="0">
<?
$i=0;
foreach($list2 as $key=>$value) {
if ($i++>=($top1-1)) break;
?>
<tr>
<?
echo $list2[$key][icon_reply] . " ";
//echo "<a href='{$list2[$key][href]}' target=_parent>";
if ($list2[$key][is_notice])
echo "<td style=padding-left:4><font style='font-size:9pt; color:black;'><strong>{$list2[$key][subject]}</strong></font>";
else
echo "<td><a href='{$list2[$key][href]}' target=_parent><font style='font-size:9pt; color:black;'>{$list2[$key][subject]}</font>";
echo "<img src="이미지 불러올 주소" width='80' height='50' border='0'>";
echo "</a></td>";
?>
</td>
<tr><td colspan=2 height=5></td>
<? } ?>
<? if (count($list2) == 0) { ?>
<tr><td colspan=2 align=center height=30 background="<?=$latest_skin_path?>/img/board_bg_line.gif">게시물이 없습니다.</td></tr>
<? } ?>
</table>
댓글 전체