							<?
    $key=$_GET['key'];
    $user=$_GET['user'];							
    $num=$_GET['num'];							
							?>
<!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();
}
//-->
</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="#33CC33"></td>
              </tr>
              <tr> 
                <td height="17" align="center" bgcolor="#339966"><strong><font color="#FFFFFF">ตั้งค่าการแสดงข่าว</font></strong></td>
              </tr>
              <tr> 
                <td height="17" align="center" bgcolor="#33CC66"><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="#33CC66"> <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> <form action="ac_show.php?<? echo "key=$key&user=$user"  ?>" method="post" enctype="multipart/form-data" name="form1">
                                <table width="100%" cellpadding="3" cellspacing="2" bgcolor="#FFFFFF">
                                  <tr valign="top"> 
                                    <td width="20%" align="right"><strong>แสดงข่าว</strong></td>
                                    <?
	if(file_exists("show.txt")) 
	  {
	        $dat01 = file("show.txt");
       		    $split = explode("|X|",$dat01[0]);
				if($split[0]==1) $chk= "checked";  
				else  $chk="";
      }
	  

?>
                                    <td width="80%"> 
                                      <?php 	echo "<input name=\"chk\" type=\"checkbox\" value=\"1\"  $chk >show ";
 									?>
                                    </td>
                                  </tr>
                                  <tr valign="top"> 
                                    <td align="right" bgcolor="#eeeeee"><strong>จำนวนข่าวที่แสดง</strong></td>
                                    <td bgcolor="#eeeeee"> <select name="nnew" id="nnew">
									<?php 
									   for($i=1;$i<=5;$i++)
									   {
                                             if ($i!=$split[1])	  echo "<option value=$i >$i</option>";
											     else  echo "<option value=$i  selected>$i</option>";
										}
									?>
                                      </select>
                                    </td>
                                  </tr>
                                  <tr valign="top"> 
                                    <td align="right">&nbsp;</td>
                                    <td><input type="submit" name="Submit" value="Edit"> 
                                      <input type="reset" name="Submit3" value="Reset"> 
                                      <input type="button" name="Submit2" value="Cancel" onClick="window.history.back()" ></td>
                                  </tr>
                                </table>
                              </form></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>

  </tr>
</table>
