|
|
|
ช่วยดูไห้หน่อยคับ ผมทำ popup เอาไว้แก้ไขข้อมูล แต่มันไม่ส่งค่าไปคับ |
|
|
|
|
|
|
|
View Source ตรงเปิด Popup ในหน้า Web Browser หน่อยครับ
|
|
|
|
|
Date :
2013-09-06 16:56:27 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
คับเดี๋ยวผมดูอีกที ขอบคุณคับ
|
|
|
|
|
Date :
2013-09-07 08:34:46 |
By :
เอ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="css/csspos.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/popup.js"></script>
</head>
<body>
<div class="tem_body" style="border-style: outset; border-color: #FFF">
<div class="head" style="border-style: outset; border-color:#006C00 " >
<h5>POS</h5>
</div>
<div class="menu">
<?
include("conn.php");
include("menu.php");
?>
</div>
<div class="canter">
<?
$strSort = $_GET["sort"];
if($strSort == "")
{
$strSort = "item.barcode_item";
}
$strOrder = $_GET["order"];
if($strOrder == "")
{
$strOrder = "ASC";
}
$strNewOrder = $strOrder == 'DESC' ? 'ASC' : 'DESC';
?>
<?
if($strSearch=="Z"){
}else{
$sql="select * from item where UserID = '$UserID' ";
$Qtotal = mysql_query($sql);
$qr =@mysql_db_query($dbname,$sql) or die("error $sql");
$row =@mysql_num_rows($qr);
while($result = mysql_fetch_array($qr)){
$number = $result['SUM(number)'];
}
$Per_Page =30; // แสดงหน้าละ 25
if(!$Page)
$Page=1;
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$result = mysql_query($sql);
$Page_start = ($Per_Page*$Page)-$Per_Page;
$Num_Rows = @mysql_num_rows($result);
if($Num_Rows<=$Per_Page)
$Num_Pages =1;
else if(($Num_Rows % $Per_Page)==0)
$Num_Pages =($Num_Rows/$Per_Page) ;
else
$Num_Pages =($Num_Rows/$Per_Page) +1;
$Num_Pages = (int)$Num_Pages;
if(($Page>$Num_Pages) || ($Page<0))
print "<center><b>จำนวน $Page มากกว่า $Num_Pages ยังไม่มีข้อความ<b></center>"; }
?>
<form id="form1" name="form1" method="post" action="stock.php?show=OK&strSearch=Z">
<table width="803" border="1" align="center" cellpadding="0" cellspacing="0" style="border-style: outset; border-color: #FFF">
<tr>
<td bgcolor="#E6E6E6">ค้นหา
<select name="Search2" id="Search2" style="background: #F2F2F2" >
<option value="name_item">ชื่อสินค้า</option>
<option value="barcode_item">บาร์โค้ด</option>
</select>
<input type="text" name="Search" id="Search" style="background: #F2F2F2" />
<input type="submit" name="button" id="button" value="ตกลง" style=" border-color: #CCC; background-color:#D8D8D8" /></td>
</tr>
</table>
</form>
<table width="803" border="1" align="center" cellpadding="0" cellspacing="0" style="border-style: outset; border-color: #FFF">
<tr>
<td bgcolor="#E6E6E6"><div class="aaa"></div>
<table width="786" border="1" align="center" cellpadding="0" cellspacing="0" style="border-style: outset; border-color: #FFF">
<tr>
<td width="83" bgcolor="#4E59C7"><a href="<?=$_SERVER["PHP_SELF"];?>?sort=item.barcode_item&order=<?=$strNewOrder?>" class="style2"><h3>บาร์โค็ต</h3></a></td>
<td width="261" bgcolor="#4E59C7"><a href="<?=$_SERVER["PHP_SELF"];?>?sort=name_item&order=<?=$strNewOrder?>" class="style2"><h3>รหัสสินค้า</h3></a></td>
<td width="55" bgcolor="#4E59C7"><a href="<?=$_SERVER["PHP_SELF"];?>?sort=stock&order=<?=$strNewOrder?>" class="style2"><h3>จำนวน</h3></a></td>
<td width="65" bgcolor="#4E59C7"><h3>ราคาทุน</h3></td>
<td width="65" bgcolor="#4E59C7"><h3>ราคาขาย</h3></td>
<td width="112" bgcolor="#4E59C7"><h3>ยอดรวมราคาทุน</h3></td>
<td width="99" bgcolor="#4E59C7"><h3>ยอดรวมราคาขาย</h3></td>
<td width="22" bgcolor="#4E59C7"> </td>
</tr>
<?
if($strSearch=="Z"){
$sql1="select * from item where ".$Search2." like '%".$Search."%' and UserID = '$UserID' order by ".$strSort." ".$strOrder." " ;
}else{
$sql1="select * from item where UserID = '$UserID' order by ".$strSort." ".$strOrder." LIMIT $Page_start , $Per_Page";
}
$qr1 =@mysql_db_query($dbname,$sql1) or die("error $sql1");
$row1 =@mysql_num_rows($qr1);
$i=0;
while ($i<$row1){
$rs1=mysql_fetch_array($qr1);
$barcode_item = $rs1[barcode_item];
$name_item = $rs1[name_item];
$number = $rs1[stock];
$cost_price = $rs1[cost_price];
$sell_price = $rs1[sell_price];
$sum_cost = $number * $cost_price;
$sum_sell = $sell_price * $number;
?>
<tr>
<td bgcolor="#DFE6DF"><? echo $barcode_item;?></td>
<td bgcolor="#DFE6DF"><? echo $name_item;?></td>
<td bgcolor="#DFE6DF"><? echo $number;?></td>
<td bgcolor="#DFE6DF"><? echo $cost_price;?></td>
<td bgcolor="#DFE6DF"><? echo $sell_price;?></td>
<td bgcolor="#DFE6DF"><? echo number_format($sum_cost);?></td>
<td bgcolor="#DFE6DF"><? echo number_format($sum_sell);?></td>
<td bgcolor="#DFE6DF">
<div id="modal" style="border:3px solid black; background-color:#9999ff; padding:25px; font-size:150%; text-align:center; display:none; ">
<?
include("conn.php");
$sqle="select * from `item` where barcode_item = '$barcode_item_edit' and UserID = '$UserID'";
$qre =@mysql_db_query($dbname,$sqle) or die("error $sqle");
$rse=mysql_fetch_array($qre);
$barcode_item2 = $rse[barcode_item];
$name_item2= $rse[name_item];
$cost_price2 = $rse[cost_price];
$color2 = $rse[color];
$size2 = $rse[size];
$sell_price2 = $rse[sell_price];
$stock2 = $rse[stock];
?>
<form id="form2" name="form2" method="post" action="">
<table width="274" border="0">
<tr>
<td width="73" class="rr">บาร์โค้ด : </td>
<td width="157" class="ll">
<? echo $barcode_item2;?>
<input name="barcode_item" type="hidden" id="barcode_item" value="<? echo $barcode_item2;?>" /></td>
</tr>
<tr>
<td class="rr">ชื้อสินค้า : </td>
<td class="ll"><input name="name_item" type="text" id="name_item" style="background: #F2F2F2" value="<? echo $name_item2;?>" size="25" /></td>
</tr>
<tr>
<td class="rr">สี : </td>
<td class="ll"><label for="color"></label>
<input name="color" type="text" id="color"style="background: #F2F2F2" value="<? echo $color2;?>" size="3" /></td>
</tr>
<tr>
<td class="rr">size : </td>
<td class="ll"><label for="size"></label>
<input name="size" type="text" id="size"style="background: #F2F2F2" value="<? echo $size2;?>" size="3" /></td>
</tr>
<tr>
<td class="rr">ราคาทุน : </td>
<td class="ll"><label for="cost_price"></label>
<input name="cost_price" type="text" id="cost_price" style="background: #F2F2F2"onkeypress = check_number(); value="<? echo $cost_price2;?>" size="1" /></td>
</tr>
<tr>
<td class="rr">ราคาขาย : </td>
<td class="ll"><label for="sell_price"></label>
<input name="sell_price" type="text" id="sell_price"style="background: #F2F2F2" onkeypress = check_number(); value="<? echo $sell_price2;?>" size="1" /></td>
</tr>
<tr>
<td class="rr">สต๊อก : </td>
<td class="ll"><label for="stock"></label>
<input name="stock" type="text" id="stock" style="background: #F2F2F2"onkeypress = check_number(); value="<? echo $stock2;?>" size="1" /></td>
</tr>
<tr>
<td colspan="2" class="rr"><input type="submit" name="button" id="button" value="บันทึก"style=" border-color: #CCC; background-color:#D8D8D8" />
</td>
</tr>
</table></form></div>
<a href="#?barcode_item_edit=<? echo $barcode_item;?>" onclick="Popup.showModal('modal',null,null,{'screenColor':'#99ff99','screenOpacity':.6});return false;"><img src="images/b_edit.png" width="16" height="16" /></a>
</td>
</tr>
<?
$i++;
}
?>
</table>
<?
if($strSearch=="Z"){
}else{
if($Prev_Page)
echo " <a href='$PHP_SELF?Page=$Prev_Page&keyword&Per_Page=$Per_Page&sort=$strSort&order=$strOrder '><< ย้อนกลับ </a>";
for($i=1; $i<$Num_Pages; $i++){
if($i != $Page)
echo "[<a href='$PHP_SELF?Page=$i&keyword=$keyword&Per_Page=$Per_Page&sort=$strSort&order=$strOrder '>$i</a>]";
else
echo "<b><font color=red> $i </font></b>";
}
/*สร้างปุ่มเดินหน้า */
if($Page!=$Num_Pages)
echo "<a href ='$PHP_SELF?Page=$Next_Page&keyword&Per_Page=$Per_Page&sort=$strSort&order=$strOrder'> หน้าถัดไป>> </a>";
//mysql_close();
}
?> </td>
</tr>
</table>
</div>
<div id="tfooter_wrapper">
<div class="footer" id="footer">
<p> </p>
</div>
</div>
</div>
</body>
|
|
|
|
|
Date :
2013-09-07 08:36:11 |
By :
เอ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
พอผมเอาเมาไปชี้ที่ 3333333333333
สังเกข้างล้างมันก็มีค้านะคับ
แต่พอคลิกค่าไม่ส่งไป popup เด้งมาเเต่ไม่มีค่าอะไรเลย
|
|
|
|
|
Date :
2013-09-07 08:58:41 |
By :
เอ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|