그누보드 질문은 아닌데 도와주세요..ㅜㅜ 정보
그누보드 질문은 아닌데 도와주세요..ㅜㅜ본문
그누보드 관련 질문은 아닌데 제가 스킨을 찾다찾다 못찾아서 억지로 프로그램을 자맞추고 있거든요..근데,...
알바몬이나 다른 구직 구인사이트들처럼 등록된 이미지를 모두 불러와서 새로고침 할때마다 각기 다른 위치에서 뜨게 하는 소스가 없나요?
정해진 이미지들을 새로고침으로 다른 이미지로 부르는건 자바스크립으로 해결이 되는데 정작 데이터 베이스에서 이미지들을 불러와서 하는건..ㅜㅜ
위의 내용으로 얼마전에 다른 곳에 질문 올리고 답변을 받았습니다..근데 제가 머리가 나빠서인지 아무리해도 안돼요..ㅠㅠ
그래서 감히 제 데이터베이스자료 불러오는 php를 올리오니 고수님들 이거 제대로 수정해주세요..ㅜㅜ
정말 능력의 한계를 느껴요..ㅠㅠ
포인트는 제가 걸수 있는 최대로 걸겠습니다.
소스수정 가능하신분....꼭 좀 도와주세요
<?
$d_no =5;
$lines =10;
if(!$start){
$start =0;
}
$sql= mysql_query("select * from g4_write_gupsite order by wr_datetime desc");
$total=mysql_num_rows($sql);
$total_page =ceil($total/$lines);
$num_page =$start/$lines;
$cur_page =$start/$lines +1;
$row=mysql_fetch_array($sql);
$d_no =5;
$lines =10;
if(!$start){
$start =0;
}
$sql= mysql_query("select * from g4_write_gupsite order by wr_datetime desc");
$total=mysql_num_rows($sql);
$total_page =ceil($total/$lines);
$num_page =$start/$lines;
$cur_page =$start/$lines +1;
$row=mysql_fetch_array($sql);
$sql2= mysql_query("select * from g4_board_file where bo_table='gupsite' order by bf_datetime desc");
$total2=mysql_num_rows($sql2);
$total_page =ceil($total2/$lines);
$num_page =$start/$lines;
$cur_page =$start/$lines +1;
$row2=mysql_fetch_array($sql2);
echo"
<table cellspacing=3></tr>";
$loop_i=0;
$number =$total -$start;
for($i=$start;$i<$total;$i++){
$a =@mysql_data_seek($sql2,$i);
$row2 =mysql_fetch_array($sql2);
$wm = $row[wr_id];
$wr = $row2[wr_id];
$ii=$row2[bf_file];
$sub=$row[wr_subject];
$price=$row[wr_2];
if($loop_i % $d_no == 0){
echo "</tr><tr>";
}
if($wr==$wm){
$img="<img src='data/file/gupsite/$ii' width=100 height=100 border=0>";
$subject=$sub;
}else{
$img="<img src='./img/noimage.gif' width=100 height=100 border=0 style=>";
$sub=$sub;
}
echo "<td valign=top ><table cellpadding=0 cellspacing=5 border=0>
<tr><td heigth=100 width=100 align=center style='width:100px;height:100px;border:1px solid #CCCCCC; padding:3px'>";
if($wm==""){
echo "<img src='./img/noimage.gif' width=100 height=100 border=0 style=>";}else{echo "
<a href='bbs/board.php?bo_table=gupsite&wr_id=$wm'>$img</a>";}
echo"</td><td width=15> </td>
</tr>
<tr>
<td align=center style='font-size:8pt'><b>$sub</b></td><td width=15> </td>
</tr>
<tr>
<td align=center style='font-size:8pt'><b>$price 원</b></td><td width=15> </td>
</tr>
</table>";
$loop_i++;
$number--;
}
$total2=mysql_num_rows($sql2);
$total_page =ceil($total2/$lines);
$num_page =$start/$lines;
$cur_page =$start/$lines +1;
$row2=mysql_fetch_array($sql2);
echo"
<table cellspacing=3></tr>";
$loop_i=0;
$number =$total -$start;
for($i=$start;$i<$total;$i++){
$a =@mysql_data_seek($sql2,$i);
$row2 =mysql_fetch_array($sql2);
$wm = $row[wr_id];
$wr = $row2[wr_id];
$ii=$row2[bf_file];
$sub=$row[wr_subject];
$price=$row[wr_2];
if($loop_i % $d_no == 0){
echo "</tr><tr>";
}
if($wr==$wm){
$img="<img src='data/file/gupsite/$ii' width=100 height=100 border=0>";
$subject=$sub;
}else{
$img="<img src='./img/noimage.gif' width=100 height=100 border=0 style=>";
$sub=$sub;
}
echo "<td valign=top ><table cellpadding=0 cellspacing=5 border=0>
<tr><td heigth=100 width=100 align=center style='width:100px;height:100px;border:1px solid #CCCCCC; padding:3px'>";
if($wm==""){
echo "<img src='./img/noimage.gif' width=100 height=100 border=0 style=>";}else{echo "
<a href='bbs/board.php?bo_table=gupsite&wr_id=$wm'>$img</a>";}
echo"</td><td width=15> </td>
</tr>
<tr>
<td align=center style='font-size:8pt'><b>$sub</b></td><td width=15> </td>
</tr>
<tr>
<td align=center style='font-size:8pt'><b>$price 원</b></td><td width=15> </td>
</tr>
</table>";
$loop_i++;
$number--;
}
echo "</td>";
$cnt = $i%$d_no;
if ($cnt)
for ($i=$cnt; $i<$d_no; $i++)
echo "<td><table cellpadding=0 cellspacing=5 border=0 height=100%>
<tr><td width=100 height=100% align=center style='width:100px;height:100px;border:1px solid #CCCCCC; padding:3px'><img src='./img/noimage.gif' width=100 height=100 border=0 style=></td><td width=15> </td></tr></table></td>";
echo"</tr> </table>";
?>
댓글 전체
order by rand() 이렇게하면 랜덤으로 db에서 뽑아요..
인재 됩니다... 너무감사합니다.
4000포인트가 하나도 안아까워요
4000포인트가 하나도 안아까워요