<marquee behavior="scroll" direction="up"><LINK href="images/index.css" rel="stylesheet" type="text/css">
<?
include("../tamu/tamu_postdb.php");
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 10;
$start = $hits*($page-1);
$query = "SELECT * FROM $mytable";
$res = mysql_query("$query"); 
$xnum = mysql_num_rows($res);
$stw2 = (int)($xnum/$hits);
if ($xnum%$hits > 0) {$stw2++;}
$np = $page+1;
$pp = $page-1;
if ($page == 1) { $pp=1; }
if ($np > $stw2) { $np = $stw2;} 
echo "Jumlah Tamu <strong>$xnum</strong> | ";
//for ($i=1;$i<=$stw2;$i++) {if($page==$i){
//echo "Halaman <b>$i</b> ";} 
//else{echo " <font size=\"2\"><a href=\"?id=$id1&page=$i\">$i</A></font> ";}}
print ('<br><br>');
$query  = "SELECT * FROM ".$mytable." ";
if(!empty($squery)) { $query .= "WHERE tamu_id LIKE \"%$squery%\" ";}
$query .= "ORDER BY tamu_id DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="2" cellpadding="2">
        <thead><tr>
<td width="100%"><strong>TAMU HARI INI</strong></td>



</tr></thead><tbody>');
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "FFFFFF";$x=0;} else {$barva = "FFFFD9";$x=1;}


print ('<tr bgcolor=#'.$barva.'>');
print ('<td><center>'.$row['tamu_id'].'<br>');
print ('<img src="../tamu/'.$row['tamu_foto'].'" width="160" height="63"><br>');
print (''.$row['tamu_nama'].' <br>Alamat '.$row['tamu_alamat'].' <br>Ket: '.$row['tamu_ket'].' <br>Visited. '.$row['tamu_tgl'].'');
print ('</center><td>');
print ('</tr>');
}
print ('</tbody></table>');
}
?></marquee>
