<style type="text/css"> .linkstyle02{font-family:Tahoma;font-size:12;color:#333333; font-weight:bold;font-weight:normal; text-decoration:none;} .linkstyle02:hover {color:#ff9301;} .linkstyle02:link {color:#000000;} .linkstyle02:visited {color:#000000;} </style> <? $sql="select * from tb_day"; $result=mysql_db_query($dbname,$sql); echo"<ul>"; while($rs=mysql_fetch_array($result)){ $id_day=$rs[id_day]; $num_day=$rs[num_day]; $num_month=$rs[num_month]; $num_year=$rs[num_year]; echo"<LI class=linkstyle02><a href='detail_add.php?id_day=$id_day' target='_blank' class=linkstyle02> $num_day-$num_month-$num_year</a></li>"; } echo"</UL>"; ?>
<? session_start(); if($sess_adminid<>session_id()) { header("location: admin.php"); exit(); } ?> <? include "connectbanshee.php"; $id_day_select=$_GET[id_day]; ?> <? $sql="select * from tb_day where id_day='$id_day_select'"; $result=mysql_db_query($dbname,$sql); $rs=mysql_fetch_array($result); $num_day=$rs[num_day]; $num_month=$rs[num_month]; $num_year=$rs[num_year]; ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <form method="post" action="detail_addrev.php"> <table width="1075"> <tr> <td width="90"> </td> <td width="198">เพิ่มรายการรายรับ</td> <td width="144"> </td> <td width="300"> </td> </tr> <tr> <td>รหัสวันที่</td> <td>วันที่</td> <td>ชื่อรายการ</td> <td>รายละเอียด</td> <td width="319">จำนวนเงิน</td> </tr> <tr> <td><input name="ref_id_day" value="<?echo"$id_day"?>" type="text" id="textfield4" size="15" /></td> <td><?echo"$num_day-$num_month-$num_year"?></td> <td><input type="test" name="name_rev" id="textfield3" /></td> <td><input name="detail_rev" type="text" id="textfield2" size="50" /></td> <td><input name="value_rev" type="text" id="textfield" size="15" /> บาท</td> </tr> <tr> <td> </td> <td><div align="right"> <input type="submit" name="button" id="button" value="Submit" /> </div></td> <td><input type="reset" name="button2" id="button2" value="reset" /></td> <td> </td> </tr> </table> </form> <form method="post" action="detail_addexp.php"> <table width="1073"> <tr> <td width="119"> </td> <td width="317">เพิ่มรายการรายจ่าย</td> <td width="300"> </td> <td width="317"> </td> </tr> <tr> <td>รหัสวันที่</td> <td>วันที่</td> <td>ชื่อรายการ</td> <td>รายละเอียด</td> <td>จำนวนเงิน</td> </tr> <tr> <td><input name="textfield8" type="text" id="textfield8" size="15" /></td> <td><?echo"$num_day-$num_month-$num_year"?></td> <td><input type="text" name="textfield7" id="textfield7" /></td> <td><input name="textfield6" type="text" id="textfield6" size="50" /></td> <td><input name="textfield5" type="text" id="textfield5" size="15" /> บาท</td> </tr> <tr> <td> </td> <td><div align="right"> <input type="submit" name="button3" id="button3" value="Submit" /> </div></td> <td><input type="reset" name="button4" id="button4" value="reset" /></td> <td> </td> </tr> </table> </form>
<? session_start(); if($sess_adminid<>session_id()) { header("location: admin.php"); exit(); } ?> <? $name_rev=$_POST[name_rev]; $ref_id_day=$_POST[ref_id_day]; $detail_rev=$_POST[detail_rev]; $value_rev=$_POST[value_rev]; if($name_rev==""){ echo "<h3>ERROR : กรุณากรอกชื่อรายการ</h3>"; exit(); } else if($ref_id_day=="0"){ echo "<h3>ERROR : วันที่ทำรายการไม่ถูกต้อง</h3>"; exit(); } else if($detail_rev==""){ echo "<h3>ERROR : กรุณากรอกรายละเอียด</h3>"; exit(); } else if($value_rev==""){ echo "<h3>ERROR : กรุณากรอกจำนวนเงิน</h3>"; exit(); } include "connectbanshee.php"; $sql="insert into tb_revenue values('null','$ref_id_day','$name_rev','$detail_rev','$value_rev')"; $result=mysql_db_query($dbname,$sql); if($result){ echo "<h3>บันทึกข้อมูลเรียบร้อยแล้ว</h3>"; echo "<a href='detail_add.php?id_day=$id_day_select'>กลับไปหน้าสำหรับบันทึกข้อมูล</a>"; } else{ echo"<h3>ERROR : ไม่สามารถบันทึกข้อมูลได้ </h3>"; } mysql_close(); ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
echo "<a href='javascript:history.back(-1);'>กลับไปหน้าสำหรับบันทึกข้อมูล</a>";
$_SESSION['url']=$_SERVER['REQUEST_URI'];
//บันทัดบน ob_start(); header("Location:$url");
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง