 |
|
เวลาสั่งพิมพ์งานผลลัพธ์ออกมาไม่ครบ
วันที่ พิมพ์ออกมาเป็น วั
ชื่อร้านค้า พิมพ์ออกมาเป็น ช านค้า
ใบส่งสินค้าเคลม พิมพ์เป็น ใบส่ าเคลม
ตามรูปด้านล่าง


พิมพ์ออกเครื่อง Dot Matrix (แต่ทดสอบเครื่องอิงค์เจ็คปกติครับ) ผ่าน google chrome ครับ
ปัญหานี้เพิ่งเป็นเมื่อวานนี้ (31-10-2016) ปกติใช้งานไม่เคยเป็นเลย ตอนนี้พยายามไล่ดูโค้ตครับ
มีพี่ ๆ คนไหนเคยเกิดแบบผมบ้างครับ ขอคำปรึกษาหน่อยครับ
ชื่อไฟล์ header.php
<?
session_start();
error_reporting(E_ALL^E_NOTICE);
include '../inc/connect_db.php';
$dbname = "claim";
$selectdocdetail = "select cd.clacode, cd.cladoc, cs.shopname, cs.address, cd.smcode, cd.cladate from claim_docdetail as cd, claim_shop as cs where cs.shop_id=cd.shopcode and cd.cladoc_id='$claprint_id' and cd.clacode='$claprint_code' ";
?>
<!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=windows-874" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.box_data1 { font-family:Arial, "times New Roman", tahoma;
height:18px;
border:0px dotted #333333;
border-bottom-width:1px;
}
.headTitle { font-size:12px;
font-weight:bold;
text-transform:uppercase;
}
.style16 {font-family: Arial, "times New Roman", tahoma}
.style17 {
font-size: 22px;
font-family: "Angsana New";
}
.style20 {font-size: 16px; font-weight: bold; text-transform: uppercase; }
.style22 {font-size: 21px; font-weight: bold; text-transform: uppercase; font-family: "Angsana New"; }
.style23 {font-size: 22px; font-weight: bold; text-transform: uppercase; font-family: "Angsana New"; }
-->
</style>
</head>
<body>
<?
$dbdocdetail=mysql_db_query($dbname, $selectdocdetail);
$resultdocdetail=mysql_fetch_array($dbdocdetail);
$clacode=$resultdocdetail[clacode];
$cladoc=$resultdocdetail[cladoc];
$shopname=$resultdocdetail[shopname];
$address=$resultdocdetail[address];
$smcode=$resultdocdetail[smcode];
$cladate=$resultdocdetail[cladate];
// date split
list($year, $month, $day) = split('[-]', $cladate);
$year = $year+543;
if($month == '01'){ $month = "มกราคม";
}else if($month == '02'){ $month = "กุมภาพันธ์";
}else if($month == '03') {$month = "มีนาคม";
}else if($month == '04') {$month = "เมษายน";
}else if($month == '05') {$month = "พฤษภาคม";
}else if($month == '06') {$month = "มิถุนายน";
}else if($month == '07') {$month = "กรกฎาคม";
}else if($month == '08') {$month = "สิงหาคม";
}else if($month == '09') {$month = "กันยายน";
}else if($month == '10') {$month = "ตุลาคม";
}else if($month == '11') {$month = "พฤศจิกายน";
}else if($month == '12') {$month = "ธันวาคม";}
$cladate="$day $month $year ";
//claim addreess bk is bangkok else follow province
$substringaddress = substr($smcode, 0, 2);
if($substringaddress=="BK"){
$address = "กรุงเทพมหานคร";
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="16%" class="headTitle"> </td>
<td width="20%" > </td>
<td> </td>
<td rowspan="2"><div align="center"><span class="style20">บริษัท xxxxxxxxxxxxxxxxx</span></div></td>
<td> </td>
<td width="21%" align="right" valign="middle" class="headTitle"> </td>
<td width="16%" align="right" valign="middle"> </td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" class="headTitle"> </td>
<td> </td>
<td> </td>
<td colspan="2" align="right" valign="top" class="headTitle"> </td>
</tr>
<tr>
<td colspan="2" class="headTitle"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="headTitle"><div align="right" class="style23">วันที่เคลม</div></td>
<td class="headTitle"><input name="textfield5" type="text" class="style16" id="textfield5" style=" font-size:14px;text-align:left;width:100%;; height: 18px; border: 0px dotted #333333; border-bottom-width: 1px;" value="<? echo " ".$cladate; ?>" /></td>
</tr>
<tr>
<td class="headTitle"><div align="right" class="style17">ชื่อร้านค้า</div></td>
<td class="headTitle"><input name="textfield4" type="text" class="style16" id="textfield4" style=" font-size:14px;text-align:left;width:100%;; height: 18px; border: 0px dotted #333333; border-bottom-width: 1px;" value="<? echo " ".$shopname. " ($address)"; ?>" /></td>
</tr>
</table></td>
<td width="1%"> </td>
<td width="26%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td><div align="center" class="style22">ใบส่งสินค้าเคลม</div></td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<td width="0%"> </td>
<td colspan="2" align="right" valign="middle" class="headTitle"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right" valign="middle" class="style23">เลขที่เคลม</td>
<td align="right" valign="middle"><input name="textfield" type="text" class="box_data1" id="textfield" value="<? echo " ".$clacode; ?>"style=" font-size:13px;text-align:left;width:100%;" /></td>
</tr>
<tr>
<td align="right" valign="middle" class="style23">เอกสารที่เคลม</td>
<td align="right" valign="middle"><input name="textfield3" type="text" class="box_data1" id="textfield3" value="<?
// claim doc
$substringdocbefore = substr($cladoc, 0, 3); // xxx
$substringdocafter = substr($cladoc, 3); // xxxxx
$cladoc = $substringdocbefore ." / ". $substringdocafter; // merge string
echo " ".$cladoc; ?>"style=" font-size:13px;text-align:left;width:100%;" /></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
ผมใช้ The AppServ Open Project 2.5.9 , Windows Server 2003
Tag : PHP, HTML/CSS
|
|
 |
 |
 |
 |
Date :
2016-11-01 13:22:30 |
By :
fad1412 |
View :
1247 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |