|
|
|
รบกวนด้วยครับ ติดปัญหาการอัพเดทข้อมูลไปใชว์ในหน้าฟอร์มหลัก ใน Textbox |
|
|
|
|
|
|
|
รบกวนด้วยครับ ติดปัญหาการอัพเดทข้อมูลไปใชว์ในหน้าฟอร์มหลัก ใน Textbox ผมต้องแก้ไขยังไงครับ รบกวนด้วยครับ
หน้าฟอร์มหลัก
report_statement_plan.php
Code (PHP)
<?
include ("includes/function_validate.php" );
mysql_connect("localhost","root","root") or die(mysql_error());
mysql_select_db("AccountCenter");
$charset = "SET NAMES UTF8";
mysql_query($charset) or die('Invalid query: ' . mysql_error());
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>รายงานงบกำไรขาดทุน (แบบประมาณการ)</title>
<script language="JavaScript" type="text/javascript" src="function_reportpopup.js"></script>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>
<!--popup เลือกสาขา -->
<script language="JavaScript">
function windowOpen() {
var myWindow=window.open('popup_branch_test.php','windowRef','width=640,height=500');
if (!myWindow.opener) myWindow.opener = self;
}
</script>
<link rel="stylesheet" type="text/css" href="css/smoothness/jquery-ui-1.7.2.custom.css">
<!--กำหนดความกว้างของปฏิทินและอื่นๆ -->
<style type="text/css">
/* Overide css code กำหนดความกว้างของปฏิทินและอื่นๆ */
.ui-datepicker{
width:300px;
font-family:tahoma;
font-size:11px;
text-align:center;
}
</style>
</head>
<body onLoad="form1.PONo.focus();">
<link href="<?=$path;?>css/style_form.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="css/smoothness/jquery-ui-1.7.2.custom.css">
<style type="text/css">
.classy0 { background-color: #E8EFFD;}
.classy1 { background-color: #FFFFFF;}
</style>
<table width="203" border="0" cellpadding="0" cellspacing="0" style="display:none" id="diplaymenu">
<tr>
<td width="200" height="50" background="<?=$path;?>images/msg/tab-btm-right-bg.gif">
</table>
</td>
</tr>
</table>
</td></tr>
<tr valign="top" align="center">
<td>
<form name="form1" id="form1" action="insert_cash_flows.php" method="post">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr align="center">
<td width="100%" height="420" align="center" valign="top">
<div id="head">
<table width="550" height="402" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="0%" height="25" class="grtopleft"> </td>
<td width="99%" class="grtopcenter">
<table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="76%" height="25"> <b>» รายงานงบกำไรขาดทุน (แบบประมาณการ)</b></td>
<td width="24%" align="right" valign="bottom"> </td>
</tr>
</table>
</td>
<td width="1%" class="grtopright"> </td>
</tr>
<tr>
<td width="0%" height="372" class="grcenterleft"></td>
<td class="grcentercenter"><table width="100%" height="375" border="1" cellpadding="3" cellspacing="0" bordercolor="#CCCCCC" class="ActiverowBG" style="border-collapse:collapse">
<tr>
<td td width="100%" height="50" align="left" valign="middle">
<input name="but_preview" type="image" id="but_preview" src="images/button/bt12.jpg" onMouseOver="this.src='images/button/bt12_b.jpg'" onMouseOut="this.src='images/button/bt12.jpg'" onClick="form1.submit();"/>
<input name="but_print" type="image" id="but_print" src="images/button/bt6.jpg" onMouseOver="this.src='images/button/bt6_b.jpg'" onMouseOut="this.src='images/button/bt6.jpg'" onClick="form1.submit();"/>
<input name="but_cancel" type="image" id="but_cancel" src="images/button/bt5.jpg" onMouseOver="this.src='images/button/bt5_b.jpg'" onMouseOut="this.src='images/button/bt5.jpg'" onClick="form1.submit();"/>
<!-- <input type="submit" name="s_save" value="บันทึกข้อมูล"> -->
</tr>
<tr>
<td width="100%" height="60" align="center" valign="center"><table width="71%" height="50" border="0" cellpadding="3" cellspacing="1" class="BGTABLE">
<tr>
<th width="50%" height="18" align="center" nowrap class="TR6"><strong>เลือกฟอร์มที่ต้องการพิมพ์</strong></th>
</tr>
<tr>
<td width="50%" height="30" align="center" valign="middle" nowrap class="TR3"><select name="sel_comp1" id="sel_comp1" style="width:80%;">
<option value="">-- กรุณาเลือกข้อมูล --</option><?
$strSQL1 = "SELECT * FROM tbl_month ORDER BY RunNo ASC";
$Month_Query = mysql_query($strSQL1);
while($Month = mysql_fetch_array($Month_Query))
{
?><option value="<?=$Month["RunNo"];?>"><?=$Month["Month"];?></option><?
/* ?><option value="<?=$Month["RunNo"];?>"><?=$Month["RunNo"]." - ".$Month["Month"];?></option><? */
}
?>
</select></td>
</tr>
</table></td>
</tr>
<tr>
<td width="100%" height="200" align="left" valign="top"><fieldset style="width:520px;height:80px;" align="center">
<legend> <b>เลือกข้อมูลที่ต้องการค้นหา</b> </legend>
<table width="98%" cellspacing="2" cellpadding="1">
<tr>
<th width="18%" height="27" align="right" scope="row">บริษัท</th>
<td width="41%"><input type="text" name="txt_CmpNo" id="txt_CmpNo" style="width:70%" value="<?=$objResult["CmpNo"];?>">
<input name="but_search" type="button" id="but_search" <?=buttondetail("images/button/search.jpg","images/button/search_b.jpg");?> onClick="Javascript:windowOpen();"> <!--onClick="window.location='popup_branch_fancybox.php'" onClick="Javascript:windowOpen();"-->
</td>
<td width="41%" align="left"><input type="text" name="txt_CmpName" id="txt_CmpName" class="Bg_readOnly" style="width:90%" value="<?=$objResult["BranchName"];?>" readonly>
</td>
</tr>
<tr>
<th height="27" align="right" scope="row">ช่วงวันที่</th>
<td><input type="text" name="txt_Datein" id="dateInput" style="width:70%" value="<?php $thaimonth=array("01","02","03","04","05","06","07","08","09","10","11","12"); echo date("j"),"-", $thaimonth[date("m")-1] , "-",date(" Y ")+543;?>" readonly> </td>
<td align="left"><input type="text" name="txt_Dateto" id="dateInput2" style="width:70%" value="<?php $thaimonth=array("01","02","03","04","05","06","07","08","09","10","11","12"); echo date("j"),"-", $thaimonth[date("m")-1] , "-",date(" Y ")+543;?>" readonly></td>
</tr>
</table>
</fieldset>
</tr>
</table></td>
<td class="grcenterright"></td>
</tr>
<tr>
<td class="grbottomleft" height="5"></td>
<td class="grbottomcenter"></td>
<td class="grbottomright" height="5"></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</form></td>
</tr>
<tr valign="bottom" style="display:none"><td height="30"> </td></tr>
</body>
</html>
หน้าของการเลือกข้อมูล
popup_branch_test.php
Code (PHP)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Popup Branch</title>
<script type="text/javascript" src="js/scripts/jquery-1.4.3.min.js"></script>
<link rel="stylesheet" href="css/style/style.css" />
</head>
<body>
<form action="report_statement_plan.php?CmpNo=<?=$_GET["CmpNo"];?>" name="frmEdit" method="post">
<link href="<?=$path;?>css/style_form.css" rel="stylesheet" type="text/css">
<?
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("accountcenter");
mysql_query("SET NAMES UTF8");
$strSQL = "SELECT * FROM tbl_company";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
<div align="center">
<table width="600" border="0" nowrap class="TR3" id="popup">
<tr>
<th width="91" nowrap class="TR6"><strong> <div align="center">รหัสบริษัท </div></strong></th>
<th width="98" nowrap class="TR6"><strong> <div align="center">ชื่อบริษัท </div></strong></th>
<th width="90" nowrap class="TR6"><strong> <div align="center">เลือกข้อมูล </div></strong></th>
</tr>
<?
$i=0;
while($objResult = mysql_fetch_array($objQuery))
{
$i++;
?>
<tr>
<td><div align="center"><?=$objResult["CmpNo"];?></div></td>
<td><?=$objResult["BranchName"];?></td>
<td align="center"><a id="OK<?=$i;?>" href="report_statement_plan.php?CmpNo=<?=$objResult["CmpNo"];?>">OK</a></td>
</tr>
<?
}
?>
</table>
</div>
<?
mysql_close($objConnect);
?>
</body>
</html>
Tag : PHP, MySQL, JAVA
|
|
|
|
|
|
Date :
2013-03-19 10:16:23 |
By :
SOREE |
View :
803 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|