<? session_start(); if($_SESSION['LOGIN_NAME']==""){ echo "<meta http-equiv=\"refresh\" content=\"0;URL=../login.php\" />"; } include "../include/connect.php"; ?> <html> <head> <title>โปรแกรมบันทึกรายรับรายจ่าย</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="../style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="lightbox.js"></script> <script type="text/javascript" src="autocomplete/autocomplete.js"></script> <link rel="stylesheet" href="autocomplete/autocomplete.css" type="text/css"/> <script language="javascript"> function PrintWindow() { var address address = "../report/report_exM.php?mount=<? echo $mount;?>" window.open(address,"","HEIGHT=600, WIDTH=800, toolbar=0, location=0, status=0, menubar=0, scrollbars=1, resizeable=0, left=0, top=380 "); } </script> <style type="text/css"> <!-- body { margin: 0px background-image: url(../image/g11line25.gif); background-attachment:fixed; background-image: url(../image/g11line25.gif); font-size: 14px; } .ป { font-size: 12px; } #Table_01 tr td marquee { font-size: 12px; } .b {color: #F00; } #Table_01 tr td #form1 strong { font-size: 12px; } .x1 {color: #F00; } .x1 {color: #F00; } .x11 {color: #F00; } .x11 {color: #F00; } .x11 {color: #F00; } .x11 {color: #F00; } --> </style></head> <?php $in_id = $_POST["user_id"]; $total_in=0; $sql="select * from income "; $data=mysql_query($sql); //สั่ง Run SQL //ดึงข้อมูล while($rowdata=mysql_fetch_array($data)){ $in=$rowdata["price"]; $total_in=$total_in+$in; } $total_ex=0; $sql="select * from expense "; $data=mysql_query($sql); //สั่ง Run SQL //ดึงข้อมูล while($rowdata=mysql_fetch_array($data)){ $ex=$rowdata["price"]; $total_ex=$total_ex-$ex; } ?> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <!-- ImageReady Slices (bg1.png) --> <table id="Table_01" width="930" height="464" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td width="15" rowspan="2" background="../image/1ll.gif"><img src="../image/1ll.gif" width="15" height="8"></td> <td width="900" height="129"><img src="../image/bn.jpg" width="930" height="129" alt=""></td> <td width="15" rowspan="2" background="../image/1rr.gif"><img src="../image/1rr.gif" width="15" height="8"></td> </tr> <tr> <td background="../image/test_05.jpg" align="center" valign="top"> <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1" onSubmit=" return chkData(this);"> <p> </p> <div id="MainMenu"> <ul> <li><a href="Index_Admin.php">รายรับรายจ่าย</a></li> | <a href="Account.php">บัญชี </a>| <a href="Report_In_Ex.php">รายงาน</a> | <a href="Category.php">ประเภท</a> |<a href="../logout.php">ออกจากระบบ</a> </ul> </div> <strong>ยินดีต้อนรับคุณ</strong> : <? echo $_SESSION['LOGIN_NAME']; ?> </p> </form> <form action="" method="post" enctype="multipart/form-data" name="form1" id="form2" onSubmit=" return chkData(this);"> <div class="table2"> <table width="69%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border:ridge; font-size: 14px; color: #000;"> <!--DWLayoutTable--> <tr> <td height="24" colspan="3" align="center" valign="top" bgcolor="#ebeff9"><p><span class="set"> <legend></legend> </span> <span class="set"> <legend></legend> </span></td> </tr> <tr> <td width="374" align="right" valign="top" bgcolor="#ebeff9">ค้นหา :: <input name="search" type="text" id="search" value="<?=$_POST['search']?>" size="20" /></td> <td width="11" align="right" valign="top" bgcolor="#ebeff9"><!--DWLayoutEmptyCell--> </td> <td width="355" height="50" align="left" valign="top" bgcolor="#ebeff9"><div class="buttons" align="center"> <div align="left"> <button type="submit" class="positive" name="Submit" value="Submit"><img src="../image/save.png" alt=""/> ตกลง </button> </div> </div></td> </tr> <tr> <td height="131" colspan="3" align="center" valign="top" bgcolor="#ebeff9"><? if($Submit){?> <table width="92%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="683" height="131"><table width="86%" border="0" align="center"> <tr></tr> <!--DWLayoutTable--> <tr> <td width="210" height="26" align="center" bgcolor="#A4CDFF">ชื่อ</td> <td width="158" align="center" bgcolor="#A4CDFF">รายรับทั้งหมด</td> <td width="164" align="center" bgcolor="#A4CDFF">รายจ่ายทั้งหมด</td> </tr> <? if($Submit ){ $sql="SELECT * FROM users WHERE username LIKE '%$_POST[search]%' "; $data=mysql_query($sql);//สั่ง Run SQL } //ดึงข้อมูล while($rowdata=mysql_fetch_array($data)){ if($bg == "CCE3FF"){ $bg="ECF4FF"; }else{ $bg="CCE3FF"; } ?> <? echo "<tr bgcolor=\"$bg\" align='center'> "?> <tr> <td bgcolor="<? echo $bg;?>"><div align="center"><span class="style155"><? echo $rowdata['username'];?></span></div></td> <td bgcolor="<? echo $bg;?>"><div align="center"><span class="style155"><strong><font color="#FF6600"><strong><font color="#FF6600"> <?=number_format($total_in);?> </font></strong></font></strong></span></div></td> <td bgcolor="<? echo $bg;?>"><div align="center"><strong><font color="#FF6600"> <?=number_format($total_ex);?> </font></strong></div></td> </tr> <? }?> <tr> <td height="32"><!--DWLayoutEmptyCell--> </td> <td><!--DWLayoutEmptyCell--> </td> <td><!--DWLayoutEmptyCell--> </td> </tr> </table></td> </tr> </table> <? }?></td> </tr> <tr> <td height="33" colspan="3" valign="top" bgcolor="#ebeff9"><!--DWLayoutEmptyCell--> </td> </tr> </table> <p> </p> </div> <p> </p> <p> </p> <p align="center"> </p> </form> <p> </p></td> </tr> </table> <!-- End ImageReady Slices --> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง