?
Path : /home/admin/domains/happytokorea.com/public_html_bk/promice/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/promice/confirm.php |
<? @session_start(); ob_start(); $useradmin = $_SESSION["useradmin"]; if(empty($useradmin)) { echo "<script>alert('˹éÒ¹Õé¨Ó¡Ñ´à©¾ÒÐ Admin à·èÒ¹Ñé¹');history.back();</script>"; exit(); } require_once "../include/tdate.php"; require_once "../include/connect.php"; require_once "../include/connectdb.php"; $sql="select * from useradmin where useradmin='$useradmin'"; $db_query=mysql_db_query($db,$sql); $result=mysql_fetch_array($db_query); $id=$result[id]; $adminname=$result[name]; $user_admin=$result[useradmin]; $pass_admin=$result[passadmin]; ?> <td width="555" valign="top"> <link rel="shortcut icon" type="../editor/image/x-icon" href="../favicon.ico"> <link rel="stylesheet" type="text/css" href="../editor/styles.css" /> <link rel="stylesheet" type="text/css" href="../editor/jquery.cleditor.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="../editor/jquery.cleditor.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#input").cleditor({width:700, height:300})[0].focus(); }); </script> <div class=mainPanel> <div class=leftPanel> <style type="text/css"> <!-- .style1 { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000000; } --> </style> <div> <td width="100%" valign="top"><br /> <div align="left"> <? if($_POST[Submit] == "Submit"){ if($_SESSION[mem_id]!="" && $_POST[co_bill]!="" && $_POST[co_slip]!="" && $_POST[co_cost]!="" && $_POST[co_date]!=""){ $sql="select * from confirm where co_mem_id='$_SESSION[mem_id]' and co_bill='$_POST[co_bill]' and co_slip='$_POST[co_slip]'"; $result=mysql_query($sql); //echo mysql_num_rows($result); if(mysql_num_rows($result)==0){ $time = time(); $pic1 = $_FILES['co_doc1']['name']; $tmp1 = $_FILES['co_doc1']['tmp_name']; if(copy($tmp1,"slip/".$time."_".$pic1)){ $_POST[co_doc]= $time."_".$pic1;} $_POST[co_mem_id]=$_SESSION[mem_id]; $_POST[co_date1] =date("Y-m-d "); unset($_POST[Submit]); unset($_POST[co_doc1]); $db->insert_array("confirm",$_POST); echo '<script> alert("เรียบร้อย");</script>'; } else{ echo '<script> alert("ทำการยืนยันแล้ว"); </script>'; } }else{ echo '<script> alert("ทำการ Log in ก่อน หรือ ข้อมูลไม่ครบ"); </script>'; } } ?> <div align="left"> <img src="images/confirm.jpg" width="64" height="42" /> <span style=" font-family: "Times New Roman", Times, serif; font-size: 16pt"><? if($_SESSION[lan]==0){echo "ยืนยันการชำระเงิน"; }else{ echo "Confirmation of payment";}?></span> <br /> <br /> <form action="" method="post" enctype="multipart/form-data"> <table width="99%" border="0" cellspacing="3"> <tr> <td width="38%"><div align="right"><? if($_SESSION[lan]==0){echo "ใส่เลขที่ Slip"; }else{ echo "No. Slip";}?> :</div></td> <td width="62%"><label> <input type="text" name="co_slip" id="co_slip" /> </label></td> </tr> <tr> <td><div align="right"><? if($_SESSION[lan]==0){echo "รหัสรายการสั่งซื้อ"; }else{ echo "Code order";}?> :</div></td> <td><label> <input type="text" name="co_bill" id="co_bill" /> </label></td> </tr> <tr> <td><div align="right"><? if($_SESSION[lan]==0){echo "จำนวนเงิน"; }else{ echo "Amount";}?> :</div></td> <td><label> <input type="text" name="co_cost" id="co_cost" /> </label></td> </tr> <tr> <td><div align="right"><? if($_SESSION[lan]==0){echo "วันที่ชำระ"; }else{ echo "Paid Date";}?> :</div></td> <td><label> <input type="text" name="co_date" id="co_date" /> <span style="color: #FF0000; font-size: 9pt">*( 2010-12-31 )</span></label></td> </tr> <tr> <td><div align="right"><? if($_SESSION[lan]==0){echo "เอกสาร"; }else{ echo "Document";}?> :</div></td> <td><label> <input type="file" name="co_doc1" id="co_doc1" /> </label></td> </tr> <tr> <td> </td> <td><label> <input type="submit" name="Submit" id="Submit" value="Submit" /> <input type="reset" name="button2" id="button2" value="Reset" /> </label></td> </tr> </table> </form> </div> </div> </td> </div>