begini saya mau tanya masalah menampilkan page,,,
tolong y di lihat script saya dan tolong dibantu y,,,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Data Soal</title>
<style type="text/css">
<!--
body {
background-color: #CCCCCC;
}
.style6 {color: #FFFFFF; font-weight: bold; }
.style10 {font-size: 24px; font-weight: bold;}
.style11 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 14px;
color: #FFFFFF;
}
.style12 {color: #FFFFFF; font-weight: bold; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; }
.style13 {color: #FFFFFF}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="21%" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="33" height="33">
<param name="movie" value="button1.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#F0F0F0" />
<embed src="button1.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="33" height="33" bgcolor="#F0F0F0"></embed>
</object></td>
<td width="70%" valign="top"><div align="center"><span class="style10">DATA SOAL </span></div></td>
<td width="9%"> </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1" background="../images/templatemo_body.jpg">
<tr>
<td width="3%" bgcolor="#A2A251"><div align="center" class="style12">id </div></td>
<td width="32%" bgcolor="#A2A251"><div align="center" class="style12">
<div align="center">soal </div>
</div></td>
<td width="14%" bgcolor="#A2A251"><div align="center" class="style12">
<div align="center">j1 </div>
</div></td>
<td width="14%" bgcolor="#A2A251"><div align="center" class="style12">
<div align="center">j2 </div>
</div></td>
<td width="14%" bgcolor="#A2A251"><div align="center" class="style12">
<div align="center">j3 </div>
</div></td>
<td width="14%" bgcolor="#A2A251"><div align="center" class="style13">
<div align="center"><strong>jbenar </strong></div>
</div></td>
<td width="9%" colspan="2" bgcolor="#A2A251"><div align="center" class="style6">
<div align="center">Action</div>
</div></td>
</tr>
<?php
include "koneksi.php";
$tampil = mysql_query("SELECT *
FROM `soal`
LIMIT 0 , 30");
if (isset($_GET))
{
$nopage = $_GET;
}
else $nopage = 1;
$offset = ($nopage - 1) * $dataperpage;
$pilih_database = "SELECT * FROM soalq order by kata asc LIMIT $offset, $dataperpage";
$query=mysql_query($pilih_database);
$no=1;
$warnaGenap = "#FFFFFF"; // warna abu-abu
$warnaGanjil = "#FFFFFF"; // warna putih
$counter = 1;
while($c=mysql_fetch_row($tampil)){
if ($counter % 2 == 0) $warna = $warnaGenap;
else $warna = $warnaGanjil;
echo"
<tr bgcolor='$warna'>
<td><div align='left'><span class='style31'>$c[0]</span></div></td>
<td><div align='left'><span class='style31'>$c[1]</span></div></td>
<td><div align='left'><span class='style31'>$c[2]</span></div></td>
<td><div align='left'><span class='style31'>$c[3]</span></div></td>
<td><div align='left'><span class='style31'>$c[4]</span></div></td>
<td><div align='left'><span class='style31'>$c[5]</span></div></td>
<td><div align='center'><span class='style31'><a title='Edit Data'href='edit.php?id=$c[0]'><img src='images/menggambar6 copy.gif' /></a></span></div>
<td><div align='center'><span class='style31'><a title='Hapus Data' href='hapusdata.php?id=$c[0]'><img src='images/menggambar9 copy.gif' /></a></span></div></td>
</tr>";
{
$id++;
$counter++;
?>
<?
}
}
?>
</table>
<div align="center">
<body>
<html>
<head>
<p align="left">
<?
$query = "SELECT COUNT(*) AS jumData FROM soal";//mencari jumlah semua data dalam tabel soal
$hasil = mysql_query($query);
$data = mysql_fetch_array($hasil);
$jumData = $data;
$jumPage = ceil($jumData/$dataperpage);//menentukan jumlah halaman yang muncul berdasarkan jumlah semua data
for($page = 1; $page <= $jumPage; $page++)//memunculkan nomor halaman dan linknya
{
if ((($page >= $noPage - 335) && ($page <= $noPage + 335)) || ($page == 1) || ($page == $jumPage))
{
if (($showPage == 1) && ($page != 2)) echo "...";
if (($showPage != ($jumPage - 1)) && ($page == $jumPage)) echo "...";
if ($page == $noPage) echo " <b>".$page."</b> ";
else echo " <a href='".$_SERVER."?page=".$page."'>".$page."</a> ";
$showPage = $page;
}
}
?> </p>
</div>
</body>
</html></body>
</html>
</html>
</body>
</html>
Silahkan
login untuk menjawab!