<meta http-equiv=refresh content="60; url=<?php echo $_SERVER['PHP_SELF']; ?>"><link href="images/index.css" rel="stylesheet" type="text/css">
<?
include "smscenter.db.php";
$sql="select UpdatedInDB,ReceivingDateTime,SenderNumber,TextDecoded,ID from inbox Where info='0'order by ID desc limit 100";
$data=mysql_query($sql);
?>
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
body {
	margin-left: 0px;
	margin-top: 0px;
}
-->
</style>



 <table width="100%"  border="0" cellspacing="2" cellpadding="2">
   <tr>
     <td bgcolor="#996633"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
       <tr>
         <td><span class="style1">PESAN MASUK </span></td>
       </tr>
     </table></td>
   </tr>
 </table>
<table width="100%" border=0 cellpadding=2 cellspacing=2>

<tr bgcolor="#FF9900" class="headlist" >


<td width="3%" ><div align="center">NO</div></td>
<td width="15%" >DITERIMA TANGGAL / WAKTU</td>
<td width="15%" >NOMOR PENGIRIM</td>
<td width="45%" >ISI PESAN </td>
<td width="14%" >AKSI</td>
<td width="8%" >HAPUS</td>
</tr>

<?
while($row=mysql_fetch_array($data)){

    $UpdatedInDB=stripslashes($row["UpdatedInDB"]);
    $ReceivingDateTime=stripslashes($row["ReceivingDateTime"]);
    $Text=stripslashes($row["Text"]);
    $SenderNumber=stripslashes($row["SenderNumber"]);
    $Coding=stripslashes($row["Coding"]);
    $UDH=stripslashes($row["UDH"]);
    $SMSCNumber=stripslashes($row["SMSCNumber"]);
    $Class=stripslashes($row["Class"]);
    $TextDecoded=stripslashes($row["TextDecoded"]);
    $ID=stripslashes($row["ID"]);
    $RecipientID=stripslashes($row["RecipientID"]);
    $Processed=stripslashes($row["Processed"]);

$i++;
if ($i % 2 != 0) {
    $bgcolor = "#DFDFFF";
}else{
    $bgcolor = "#EEEEEE";
}

?>

<tr bgcolor="<?=$bgcolor?>" onMouseOver="this.style.background='#F0FFB8';" onMouseOut="this.style.background='<?=$bgcolor?>'">


<td ><center><?=$i?></center></td>
<td ><?=$ReceivingDateTime?></td>
<td ><?=$SenderNumber?></td>
<td align="left" ><?=$TextDecoded?></td>
  <? $nomor = str_replace("+62", "0", $SenderNumber); ?>
<td align="left" ><a href="index.php?nomor=<?=$nomor?>&pesan=<?=$TextDecoded?>&g=smsbalas" class="menu">BALAS PESAN </a></td>
<td align="left" ><a href="index.php?hapus=<?=$ID?>&g=smshapus" class="menu">HAPUS</a></td>
</tr>

<? } ?>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

<?
include "smscenter.db.php";
$sql="select UpdatedInDB,ReceivingDateTime,SenderNumber,TextDecoded,ID,balasan from inbox Where info='1'order by ID desc limit 100";
$data=mysql_query($sql);
?>
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
body {
	margin-left: 0px;
	margin-top: 0px;
}
-->
</style>



 <table width="100%"  border="0" cellspacing="2" cellpadding="2">
   <tr>
     <td bgcolor="#996633"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
       <tr>
         <td><span class="style1">PESAN SUDAH DIBALAS </span></td>
       </tr>
     </table></td>
   </tr>
 </table>
<table width="100%" border=0 cellpadding=2 cellspacing=2>

<tr bgcolor="#FF9900" class="headlist" >


<td width="3%" ><div align="center">NO</div></td>
<td width="15%" >DITERIMA TANGGAL / WAKTU</td>
<td width="15%" >NOMOR PENGIRIM</td>
<td width="30%" >ISI PESAN </td>
<td width="29%" >BALASAN PESAN </td>
<td width="8%" >HAPUS</td>
</tr>

<?
while($row=mysql_fetch_array($data)){

    $UpdatedInDB=stripslashes($row["UpdatedInDB"]);
    $ReceivingDateTime=stripslashes($row["ReceivingDateTime"]);
    $Text=stripslashes($row["Text"]);
    $SenderNumber=stripslashes($row["SenderNumber"]);
    $Coding=stripslashes($row["Coding"]);
    $UDH=stripslashes($row["UDH"]);
    $SMSCNumber=stripslashes($row["SMSCNumber"]);
    $Class=stripslashes($row["Class"]);
    $TextDecoded=stripslashes($row["TextDecoded"]);
    $ID=stripslashes($row["ID"]);
	
    $RecipientID=stripslashes($row["RecipientID"]);
    $Processed=stripslashes($row["Processed"]);
$balasan=stripslashes($row["balasan"]);
$i++;
if ($i % 2 != 0) {
    $bgcolor = "#DFDFFF";
}else{
    $bgcolor = "#EEEEEE";
}

?>

<tr bgcolor="<?=$bgcolor?>" onMouseOver="this.style.background='#F0FFB8';" onMouseOut="this.style.background='<?=$bgcolor?>'">


<td ><center><?=$i?></center></td>
<td ><?=$ReceivingDateTime?></td>
<td ><?=$SenderNumber?></td>
<td align="left" ><?=$TextDecoded?></td>
<td align="left" ><?=$balasan?></td>
<td align="left" ><a href="index.php?hapus=<?=$ID?>&g=smshapus" class="menu">HAPUS</a></td>
</tr>

<? } ?>
</table>

