묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
통합추출 게시판에 목록번호를....
2006.05.11 19:51
http://www.nzeo.com/bbs/data/cgi_zskins2/furjeiwke.gif역순으로 할순 없는지 궁금합니다.
천사님의 통합추출 게시판을 사용하고 있는중인데 목록번호가 1번부터 시작하게 되있어서 항상
변함없는 일련번호가 되더군요....
통합게시물 목록수가 늘어나면 늘어나는데로 전체번호부터, 즉 위에 링크된 목록에서라면 10번부터 9,8,7,~1 이렇게 나타나게 할려면 소스의 어느부분을 고쳐야되는지 고수님들의 답변 부탁드립니다.
소스는 아래와 같습니다.
<?
$_zb_url = "http://vijasup.namoweb.net/bbs/";
$_zb_path = "/home/vijasup/bbs/";
include $_zb_path."outlogin.php";
require_once $_zb_path."_head.php";
require_once $_zb_path."whitetotal/latest.php";
print_latest_total("오늘 하루도 좋은시간 되시길 기원합니다...", 99, 50);
?>
<style type="text/css">
body{
scrollbar-face-color: #464646;
scrollbar-shadow-color: #FDB402;
scrollbar-highlight-color: #606060;
scrollbar-3dlight-color: #FDB402;
scrollbar-darkshadow-color: #606060;
scrollbar-track-color:#606060;
scrollbar-arrow-color: #FDB402
}
</style>
<body style="background-color:transparent">
<?
#제로보드용 멀티 최근 게시물
#버전 : whitetotalTm1.0
#Xhtml 1.0을 기준으로 만들어 졌으며,IE,모질라에서 완벽하게 작동됩니다.
#http://1004.wo.tc:88(천사)
#본 소스를 수정해서 배포하실경우 위 주소로 문의해주세요.
function print_latest_total($title = '최근 업데이트 목록', $textlen = '30', $limits = '15', $close_name = '없음') {
global $admin_table, $_zb_url, $_zb_path;
if(!file_exists($_zb_path."whitetotal")) exit ("whitetotal폴더가 존재하지않습니다.<br />폴더이름을 변경하신듯합니다.");
$result = @mysql_query("select name,title from $admin_table") or die(mysql_error());
$der = 0;
while($data = @mysql_fetch_array($result)) {
$board_id[$der] = $data[name];
$board_title[$der] = $data[title];
$der++;
}
unset($der);
unset($data);
unset($result);
$abc=0;
for($i=0; $i<count($board_id); $i++) {
if(!preg_match("/($close_name)/",$board_id[$i])) {
$result = @mysql_query("select * from zetyx_board_".$board_id[$i]." order by no asc limit 50, $limits") or die(mysql_error());
}
while($data = @mysql_fetch_array($result)) {
$uline[$abc][name] = stripslashes($data[name]);
$uline[$abc][subject] = stripslashes($data[subject]);
$uline[$abc][comment] = $data[total_comment];
$uline[$abc][target] = $_zb_url."view.php?id=".$board_id[$i]."&no=".$data[no];
$uline[$abc][id] = $board_id[$i];
$uline[$abc][title] = $board_title[$i];
$uline[$abc][no] = $data[no];
$uline[$abc][secret] = $data[is_secret];
$uline[$abc][date] = $data[reg_date];
$order[$abc] = $data[reg_date];
$sort[$data[reg_date]] = $abc;
$abc++;
}
}
if($abc) @rsort($order);
?>
<style type="text/css">
a.aa0arr:link {
font-size:12px;
color:white;
text-decoration:none;
font-family: "tahoma","Verdana","Arial","굴림";
}
a.aa0arr:visited {
font-size:12px;
color:white;
text-decoration:none;
font-family: "tahoma","Verdana","Arial","굴림";
}
a.aa0arr:active {
font-size:12px;
color:white;
text-decoration:none;
font-family: "tahoma","Verdana","Arial","굴림";
}
a.aa0arr:hover {
font-size:12px;
color:white;
text-decoration:none;
font-family: "tahoma","Verdana","Arial","굴림";
}
td {
line-height:140%;
}
.no10arr {
text-align: center;
color:white;
font-size:11px;
font-family: "tahoma","Verdana","Arial","굴림";
}
.dates0arr {
text-align: right;
color:white;
font-size:11px;
font-family: "tahoma","Verdana","Arial","굴림";
}
.names0arr {
text-align: right;
color:white;
font-size:12px;
font-family: "tahoma","Verdana","Arial","굴림";
}
.subject0arr {
text-align: left;
color:white;
font-size:14px;
font-family: "굴림체","Verdana","Arial","굴림";
}
.linesrr {
height:1px;
padding: 0px;
background-image: url(<?=$_zb_url?>whitetotal/dot.gif);
}
</style>
<table cellspacing="1" cellpadding="4" style="width:100%;border:0px solid #eeeeee;table-layout:fixed">
<col width="40" /><col width="*" /><col width="100" /><col width="80" />
<tr>
<td colspan="4"class="subject0arr"><div style="float: left;"><span style="color:white;"><?=$title?></span></div><div style="float: right;"><img src="<?=$_zb_url?>whitetotal/arrow.gif" border="0" style="vertical-align: middle;" alt="" /></div></td>
</tr>
<tr><td colspan="4" class="linesrr"></td></tr>
<?
$limit = $limits;
$i=0;
$nn = 1;
while($i<$limit && $uline[$sort[$order[$i]]][subject]) {
$nso = $sort[$order[$i]];
$name = stripslashes($uline[$nso][name]);
$subject = cut_str(strip_tags(stripslashes($uline[$nso][subject])),$textlen);
$id = $uline[$nso][id];
$title = $uline[$nso][title];
$target = $uline[$nso][target];
$secret = $uline[$nso][secret];
$date = $uline[$nso][date];
$datetime = date('Y/m/d', $date);
$total_comment = $uline[$nso][comment];
if($total_comment =="0") $total =""; else $total = "(".$total_comment.")";
$check_time = (time()-$date)/60/60;
if($check_time<=24) $new = " <img src="{$_zb_url}whitetotal/new.gif" border="0" alt="new" />"; else $new = '';
if(!$title) $title = $id;
if($secret) $secret = "<img src="{$_zb_url}whitetotal/secret.gif" border="0" style="vertical-align: middle;" alt="비밀글" />";
?>
<tr>
<td class="no10arr" nowrap="nowrap"><?=$nn?></td>
<td class="subject0arr" nowrap="nowrap"> <img src="<?=$_zb_url?>whitetotal/arrow.gif" border="0" style="vertical-align: middle;" alt="" /> <a href="<?=$_zb_url?>zboard.php?id=<?=$id?>" class="aa0arr">[<?=$title?>]</a> <a href="<?=$target?>" class="aa0arr"><?=$subject?></a><span style="font-size: 10px;"><?=$total?></span><?=$new?><?=$secret?></td>
<td class="names0arr" nowrap="nowrap"><?=$name?></td>
<td class="dates0arr" style="padding-right: 4px;" nowrap="nowrap"><?=$datetime?></td>
</tr>
<tr><td colspan="4" class="linesrr"></td></tr>
<?
$nn++;
$i++;
}
echo '</table>';
}
?>
천사님의 통합추출 게시판을 사용하고 있는중인데 목록번호가 1번부터 시작하게 되있어서 항상
변함없는 일련번호가 되더군요....
통합게시물 목록수가 늘어나면 늘어나는데로 전체번호부터, 즉 위에 링크된 목록에서라면 10번부터 9,8,7,~1 이렇게 나타나게 할려면 소스의 어느부분을 고쳐야되는지 고수님들의 답변 부탁드립니다.
소스는 아래와 같습니다.
<?
$_zb_url = "http://vijasup.namoweb.net/bbs/";
$_zb_path = "/home/vijasup/bbs/";
include $_zb_path."outlogin.php";
require_once $_zb_path."_head.php";
require_once $_zb_path."whitetotal/latest.php";
print_latest_total("오늘 하루도 좋은시간 되시길 기원합니다...", 99, 50);
?>
<style type="text/css">
body{
scrollbar-face-color: #464646;
scrollbar-shadow-color: #FDB402;
scrollbar-highlight-color: #606060;
scrollbar-3dlight-color: #FDB402;
scrollbar-darkshadow-color: #606060;
scrollbar-track-color:#606060;
scrollbar-arrow-color: #FDB402
}
</style>
<body style="background-color:transparent">
<?
#제로보드용 멀티 최근 게시물
#버전 : whitetotalTm1.0
#Xhtml 1.0을 기준으로 만들어 졌으며,IE,모질라에서 완벽하게 작동됩니다.
#http://1004.wo.tc:88(천사)
#본 소스를 수정해서 배포하실경우 위 주소로 문의해주세요.
function print_latest_total($title = '최근 업데이트 목록', $textlen = '30', $limits = '15', $close_name = '없음') {
global $admin_table, $_zb_url, $_zb_path;
if(!file_exists($_zb_path."whitetotal")) exit ("whitetotal폴더가 존재하지않습니다.<br />폴더이름을 변경하신듯합니다.");
$result = @mysql_query("select name,title from $admin_table") or die(mysql_error());
$der = 0;
while($data = @mysql_fetch_array($result)) {
$board_id[$der] = $data[name];
$board_title[$der] = $data[title];
$der++;
}
unset($der);
unset($data);
unset($result);
$abc=0;
for($i=0; $i<count($board_id); $i++) {
if(!preg_match("/($close_name)/",$board_id[$i])) {
$result = @mysql_query("select * from zetyx_board_".$board_id[$i]." order by no asc limit 50, $limits") or die(mysql_error());
}
while($data = @mysql_fetch_array($result)) {
$uline[$abc][name] = stripslashes($data[name]);
$uline[$abc][subject] = stripslashes($data[subject]);
$uline[$abc][comment] = $data[total_comment];
$uline[$abc][target] = $_zb_url."view.php?id=".$board_id[$i]."&no=".$data[no];
$uline[$abc][id] = $board_id[$i];
$uline[$abc][title] = $board_title[$i];
$uline[$abc][no] = $data[no];
$uline[$abc][secret] = $data[is_secret];
$uline[$abc][date] = $data[reg_date];
$order[$abc] = $data[reg_date];
$sort[$data[reg_date]] = $abc;
$abc++;
}
}
if($abc) @rsort($order);
?>
<style type="text/css">
a.aa0arr:link {
font-size:12px;
color:white;
text-decoration:none;
font-family: "tahoma","Verdana","Arial","굴림";
}
a.aa0arr:visited {
font-size:12px;
color:white;
text-decoration:none;
font-family: "tahoma","Verdana","Arial","굴림";
}
a.aa0arr:active {
font-size:12px;
color:white;
text-decoration:none;
font-family: "tahoma","Verdana","Arial","굴림";
}
a.aa0arr:hover {
font-size:12px;
color:white;
text-decoration:none;
font-family: "tahoma","Verdana","Arial","굴림";
}
td {
line-height:140%;
}
.no10arr {
text-align: center;
color:white;
font-size:11px;
font-family: "tahoma","Verdana","Arial","굴림";
}
.dates0arr {
text-align: right;
color:white;
font-size:11px;
font-family: "tahoma","Verdana","Arial","굴림";
}
.names0arr {
text-align: right;
color:white;
font-size:12px;
font-family: "tahoma","Verdana","Arial","굴림";
}
.subject0arr {
text-align: left;
color:white;
font-size:14px;
font-family: "굴림체","Verdana","Arial","굴림";
}
.linesrr {
height:1px;
padding: 0px;
background-image: url(<?=$_zb_url?>whitetotal/dot.gif);
}
</style>
<table cellspacing="1" cellpadding="4" style="width:100%;border:0px solid #eeeeee;table-layout:fixed">
<col width="40" /><col width="*" /><col width="100" /><col width="80" />
<tr>
<td colspan="4"class="subject0arr"><div style="float: left;"><span style="color:white;"><?=$title?></span></div><div style="float: right;"><img src="<?=$_zb_url?>whitetotal/arrow.gif" border="0" style="vertical-align: middle;" alt="" /></div></td>
</tr>
<tr><td colspan="4" class="linesrr"></td></tr>
<?
$limit = $limits;
$i=0;
$nn = 1;
while($i<$limit && $uline[$sort[$order[$i]]][subject]) {
$nso = $sort[$order[$i]];
$name = stripslashes($uline[$nso][name]);
$subject = cut_str(strip_tags(stripslashes($uline[$nso][subject])),$textlen);
$id = $uline[$nso][id];
$title = $uline[$nso][title];
$target = $uline[$nso][target];
$secret = $uline[$nso][secret];
$date = $uline[$nso][date];
$datetime = date('Y/m/d', $date);
$total_comment = $uline[$nso][comment];
if($total_comment =="0") $total =""; else $total = "(".$total_comment.")";
$check_time = (time()-$date)/60/60;
if($check_time<=24) $new = " <img src="{$_zb_url}whitetotal/new.gif" border="0" alt="new" />"; else $new = '';
if(!$title) $title = $id;
if($secret) $secret = "<img src="{$_zb_url}whitetotal/secret.gif" border="0" style="vertical-align: middle;" alt="비밀글" />";
?>
<tr>
<td class="no10arr" nowrap="nowrap"><?=$nn?></td>
<td class="subject0arr" nowrap="nowrap"> <img src="<?=$_zb_url?>whitetotal/arrow.gif" border="0" style="vertical-align: middle;" alt="" /> <a href="<?=$_zb_url?>zboard.php?id=<?=$id?>" class="aa0arr">[<?=$title?>]</a> <a href="<?=$target?>" class="aa0arr"><?=$subject?></a><span style="font-size: 10px;"><?=$total?></span><?=$new?><?=$secret?></td>
<td class="names0arr" nowrap="nowrap"><?=$name?></td>
<td class="dates0arr" style="padding-right: 4px;" nowrap="nowrap"><?=$datetime?></td>
</tr>
<tr><td colspan="4" class="linesrr"></td></tr>
<?
$nn++;
$i++;
}
echo '</table>';
}
?>