							<? 
							    $num=$_GET['num'];
    $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">ยันยันการลบโครงการ</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="#E4F3AB"> <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 name="form1" method="post" action="ac_del.php?<? echo "num=$num&key=$key&user=$user"  ?>">
                                <table width="100%" cellpadding="3" cellspacing="2" bgcolor="#FFFFFF">
                                  <tr valign="top"> 
                                    <td width="27%" align="right"><strong>โครงการที่</strong></td>
                                    <?
	if(file_exists("new.txt")) 
	  {
	        $dat01 = file("new.txt");
       		    $split = explode("|X|",$dat01[$num]);
				$imgn="data/imagefiles/$split[3]";
				$No = sprintf("%04d",$split[0]);
      }
	  

	  	// อ่านข้อมูลจากไฟล์ คำถามขึ้นมาแสดง
	if(file_exists("./data/$split[0].txt")) {
		$FILE=file("./data/$split[0].txt");
		for ($i=0;$i<count($FILE);$i++){
			$FData="$FData$FILE[$i]";
		}
	}
	
?>
                                    <td width="73%"><?php echo $No ?>&nbsp;</td>
                                  </tr>
                                  <tr valign="top"> 
                                    <td align="right" bgcolor="#eeeeee"><strong onClick="MM_goToURL('parent','view01.php');return document.MM_returnValue">ห้วข้อโครงการ</strong></td>
                                    <td bgcolor="#eeeeee"><?php echo "$split[1]" ?></td>
                                  </tr>
                                  <tr valign="top"> 
                                    <td align="right"><strong><font color="#000000" size="1" face="MS Sans Serif, AngsanaUPC, CordiaUPC"><strong>ที่ตั้งโครงการ</strong></font></strong></td>
                                    <?
	if(file_exists("new.txt")) 
	  {
	        $dat01 = file("new.txt");
       		    $split = explode("|X|",$dat01[$num]);
				$imgn="data/imagefiles/$split[3]";
				$No = sprintf("%04d",$split[0]);
      }
?>
                                    <td><?php echo "$split[5]" ?>&nbsp;</td>
                                  </tr>
                                  <tr valign="top" bgcolor="#eeeeee"> 
                                    <td align="right"><strong>รายละเอียด</strong></td>
                                    <td> <table width="95%" cellpadding="5" cellspacing="1" bgcolor="#999999">
                                        <tr> 
                                          <td bgcolor="#FFFFFF">
                                            <?php   $FData= str_replace(" ","&nbsp;",$FData);	?>
                                            <?php echo "$FData" ?> </td>
                                        </tr>
                                      </table></td>
                                  </tr>
                                  <?
                           if($split[3]!="0")
						   {
                                 echo "   <tr valign=top> ";
                                 echo "    <td height=24 align=right><strong>รูปภาพ</strong></td>";
                                 echo "     <td><img src=$imgn> ";
                                 echo "     </td></tr>";
                            } 
?>
                                  <tr valign="top"> 
                                    <td align="right">&nbsp;</td>
                                    <td><input type="submit" name="Submit" value="Delete"> 
                                      <input type="button" name="Submit2" value="Cancel"></td>
                                  </tr>
                                </table>
                              </form></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>

  </tr>
</table>
