<table width="100%"  border="0" cellspacing="8" cellpadding="8">
  <tr>
    <td><?

mysql_connect("localhost", "root", "benk");
mysql_select_db("cma_tahap2");
$mytable = "pidum";
$conid1 = $_GET["conid"];
$table1 = $_GET["table"];
$query = "Select * from $mytable where t_idcon = '$conid1'"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){
$page2 = $_GET["page2"];
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page2))  $page2  =  1;
if (empty($hits))  $hits  = 500;
$start = $hits*($page2-1);
$query = "SELECT * FROM $mytable WHERE t_idcon ='$conid1' ORDER BY uid DESC";
$res = mysql_query("$query"); 
$xnum = mysql_num_rows($res);
$stw2 = (int)($xnum/$hits);
if ($xnum%$hits > 0) {$stw2++;}
$np = $page2+1;
$pp = $page2-1;
if ($page2 == 1) { $pp=1; }
if ($np > $stw2) { $np = $stw2;} 
echo "Detail $edisi SEBANYAK <strong>$xnum</strong> TERSANGKA | ";
for ($i=1;$i<=$stw2;$i++) {if($page2==$i){
echo "<b> HAL $i |</b> ";} 
else{echo "<a href=\"?g=pratut&i=index&page2=$i#tab1\"> $i |</a>";}}
print ('<br><br>');
$query  = "SELECT * FROM $mytable ";
if(!empty($squery)) { $query .= "LIKE \"%$squery%\" ";}
$query .= "WHERE t_idcon ='$conid1' ORDER BY uid DESC LIMIT $start,$hits";
$res = mysql_query($query);

print ('<table class="tableWithFloatingHeader" width="100%"  border="0" cellspacing="6" cellpadding="6" bgcolor="#B05800">
        <thead><tr>
<th width="80%"><strong>NAMA TERSANGKA</strong></th>
<th width="20%"><strong>PROSES</strong></th>
</tr></thead>');
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "FF6600";$x=0;} else {$barva = "FFFFCC";$x=1;}
   
//---------kolom 1
print ('<tbody><tr bgcolor=#'.$barva.'>');
print ('<td><b>'.$row["t_identitasterdakwa"].'</b></td>');
print ('<td><center><a href="index.php?g=digrecviewpidum&d=inc&conid='.$conid1.'&uid='.$row["uid"].'&table='.$table1.'&do=digrec" class="menu"><b>VIEW</b></a></center></td>');


print ('</tr>');} 
print ('</tbody> </table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}
}
?>
    </td>
  </tr>
</table>
