이전 다음 목록 나타내기
페이지 정보
본문
//====================이전 목록 나타내기
$result=mysql_query("select count(g_uid) from general");
$max = mysql_result($result,0,0);
$order = $g_uid + 1;
for($i=0; $i<$max; $i++){
$sql ="select * from general where g_uid = '$order' AND g_kind='$g_kind' and language='kor'";
$rs = mysql_query($sql);
$row=mysql_fetch_row($rs);
if($row==0){
$order = $order + 1;
} else{
$re_sql ="select * from general where g_uid = '$order' AND g_kind='$g_kind' and language='kor'";
$re_rs = mysql_query($re_sql);
$re_row = mysql_fetch_object($re_rs);
break;
}
}
$uid = $order;
if($row==0){
echo("
<tr>
<td width=\"500\" colspan=\"4\">
<p> <font color=red>더이상 게시물이 없습니다.</font>
</td>
</tr>
");
}else{
echo("
<tr>
<td width=\"500\" colspan=\"4\">
<p> <font color=red><a href='$PHP_SELF?g_uid=$uid&g_kind=$g_kind&theme=$theme'>$re_row->g_subject</a></font>
</td>
</tr>
");
}
//====================목록 사이에 줄 넣기
echo("
<tr>
<td width=522 colspan=4 bgcolor=#ff9900>
<spacer type=block height=1 color=#000000>
</td>
</tr>
");
//====================다음 목록 나타내기
$order = $g_uid - 1;
for($i=0; $i < $g_uid; $i++){
$sql ="select * from general where g_uid = '$order' AND g_kind='$g_kind' and language='kor'";
$rs = mysql_query($sql);
$row=mysql_fetch_row($rs);
if($row==0){
$order = $order - 1;
} else {
$re_sql ="select * from general where g_uid = '$order' AND g_kind='$g_kind' and language='kor'";
$re_rs = mysql_query($re_sql);
$re_row = mysql_fetch_object($re_rs);
break;
}
}
$uid = $order;
if($order <= -1){
echo("
<tr>
<td width=\"500\" colspan=\"4\">
<p> <font color=red>더이상 게시물이 없습니다.</font>
</td>
</tr>
");
}else{
echo("
<tr>
<td width=\"500\" colspan=\"4\">
<p> <font color=red><a href='$PHP_SELF?g_uid=$uid&g_kind=$g_kind&theme=$theme'>$re_row->g_subject</a></font>
</td>
</tr>
");
}
$result=mysql_query("select count(g_uid) from general");
$max = mysql_result($result,0,0);
$order = $g_uid + 1;
for($i=0; $i<$max; $i++){
$sql ="select * from general where g_uid = '$order' AND g_kind='$g_kind' and language='kor'";
$rs = mysql_query($sql);
$row=mysql_fetch_row($rs);
if($row==0){
$order = $order + 1;
} else{
$re_sql ="select * from general where g_uid = '$order' AND g_kind='$g_kind' and language='kor'";
$re_rs = mysql_query($re_sql);
$re_row = mysql_fetch_object($re_rs);
break;
}
}
$uid = $order;
if($row==0){
echo("
<tr>
<td width=\"500\" colspan=\"4\">
<p> <font color=red>더이상 게시물이 없습니다.</font>
</td>
</tr>
");
}else{
echo("
<tr>
<td width=\"500\" colspan=\"4\">
<p> <font color=red><a href='$PHP_SELF?g_uid=$uid&g_kind=$g_kind&theme=$theme'>$re_row->g_subject</a></font>
</td>
</tr>
");
}
//====================목록 사이에 줄 넣기
echo("
<tr>
<td width=522 colspan=4 bgcolor=#ff9900>
<spacer type=block height=1 color=#000000>
</td>
</tr>
");
//====================다음 목록 나타내기
$order = $g_uid - 1;
for($i=0; $i < $g_uid; $i++){
$sql ="select * from general where g_uid = '$order' AND g_kind='$g_kind' and language='kor'";
$rs = mysql_query($sql);
$row=mysql_fetch_row($rs);
if($row==0){
$order = $order - 1;
} else {
$re_sql ="select * from general where g_uid = '$order' AND g_kind='$g_kind' and language='kor'";
$re_rs = mysql_query($re_sql);
$re_row = mysql_fetch_object($re_rs);
break;
}
}
$uid = $order;
if($order <= -1){
echo("
<tr>
<td width=\"500\" colspan=\"4\">
<p> <font color=red>더이상 게시물이 없습니다.</font>
</td>
</tr>
");
}else{
echo("
<tr>
<td width=\"500\" colspan=\"4\">
<p> <font color=red><a href='$PHP_SELF?g_uid=$uid&g_kind=$g_kind&theme=$theme'>$re_row->g_subject</a></font>
</td>
</tr>
");
}
- 이전글변수를 변수 만들기.. 21.02.09
- 다음글select 셀렉트박스, 자바스크립을 이용한 동적폼~ 21.02.09
댓글목록
등록된 댓글이 없습니다.