<?  
    $key=$_GET['key'];
    $user=$_GET['user'];
 ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Admin</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="../css/main.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function mOvr(src, clrOver){ 
	if (!src.contains(event.fromElement)){ 
		src.style.cursor = 'hand'; 
		src.bgColor = clrOver; 
	} 
} 
function mOut(src, clrIn){ 
	if (!src.contains(event.toElement)){ 
		src.style.cursor = 'default'; 
		src.bgColor = clrIn; 
	} 
} 
function mClk(src, clrOver, clrIn){ 
	if((event.srcElement.tagName=='TD') && (src.children.tags('A')[0]))
		src.children.tags('A')[0].click();
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>

</head>
<body bgcolor="#F4F4F4" leftmargin="1" topmargin="1" marginwidth="1" marginheight="1">
<table width="100%" height="100%" cellpadding="0" cellspacing="1">
  <tr>
    <td align="center" valign="middle"><table width="696" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
        <tr>
          <td height="19" bgcolor="#FFFFFF"><table width="100%" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="3" align="center" bgcolor="#CC6600"></td>
              </tr>
              <tr>
                <td height="17" align="center" bgcolor="#990000"><strong><font color="#FFFFFF" size="1" face="MS Sans Serif, AngsanaUPC, CordiaUPC">ลบข่าว</font></strong></td>
              </tr>
              <tr> 
                <td height="17" align="center" bgcolor="#FF9900"><table width="100%" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width="1%">&nbsp;</td>
                      <td width="10%" ><table cellpadding="0" cellspacing="1" bgcolor="#89B700">
                          <tr> 
                            <td align="center" bgcolor="#CCFF33" onMouseOver="mOvr(this, '#88EA35')"  onMouseOut="mOut(this, '#CCFF33')"  ><strong><a href="../manager.php?<? echo "num=$num&key=$key&user=$user"  ?>">&nbsp;Manager&nbsp;</a></strong></td>
                          </tr>
                        </table></td>
                      <td width="79%">&nbsp;</td>
                      <td width="10%"><table cellpadding="0" cellspacing="1" bgcolor="#89B700">
                          <tr> 
                            <td align="center" bgcolor="#CCFF33" onMouseOver="mOvr(this, '#88EA35')"  onMouseOut="mOut(this, '#CCFF33')"  ><strong><a href="../logout.php?<? echo "id=$split[1]"; ?>">&nbsp;Logout&nbsp;</a></strong></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td valign="top" bgcolor="#FFCC00"> <table width="100%" height="100%" cellpadding="0" cellspacing="1">
                    <tr> 
                      <td height="38" valign="top" bgcolor="#F7FAED"><table width="100%" cellspacing="5" cellpadding="0">
                          <tr> 
                            <td><table width="100%" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF">
                                <tr> 
                                  <td width="16%"><strong>ข่าวที่</strong></td>
                                  <td width="56%"><strong onClick="MM_goToURL('parent','view01.php');return document.MM_returnValue">ห้วข้อข่าว</strong></td>
                                  <td width="28%"><strong>เวลา</strong></td>
                                </tr>
                                
<?
  

	if(file_exists("new.txt")) 
	  {
	        $dat01 = file("new.txt");
			for ($i=0 ; $i<sizeof($dat01) ; $i++)
			{
       		    $split = explode("|X|",$dat01[$i]);							
				$No = sprintf("%04d",$split[0]);
				if (($i%2)==1)$bgc="eeeeee"; else $bgc="f8f8f8";
				echo "<tr  bgcolor=$bgc onMouseOver=\"mOvr(this, '#C6EA35')\"  onMouseOut=\"mOut(this, '$bgc')\"    onClick=\"MM_goToURL('parent','del_confirm.php?num=$i&user=$user&key=$key');return document.MM_returnValue\"  > ";
				echo "<td>$No</td>";
				echo "<td >$split[1]</td>";
				echo "<td>$split[4]</td></tr> ";
			}	
      }
?>								
                              </table> </td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
