Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > รบกวนพี่ๆทุกคนหน่อยครับ คือผมใส่ function แล้วไม่แสดงอ่ะครับ



 

รบกวนพี่ๆทุกคนหน่อยครับ คือผมใส่ function แล้วไม่แสดงอ่ะครับ

 



Topic : 110922



โพสกระทู้ ( 48 )
บทความ ( 0 )



สถานะออฟไลน์




คือผมใส่ function header center footer แล้วไม่แสดงอ่ะครับ พอรันมันขึ้นเป็นหน้าเปล่าๆอ่ะครับ รบกวนพี่ๆช่วยดูหน่อยครับ


Code (PHP)
<?php
include_once"connect.php";
	
	$id=$_POST['id'];
	$explode=explode(":",$id[0]);
	$ex_id=$explode[0];
	$ex_cus=$explode[1];
	
	$customer=$_POST['customer'];
	$sql_number=mysql_query("SELECT * FROM customer_info where cust_name like '".$ex_cus."' ");
	$rs_number=mysql_fetch_array($sql_number);
	
	?>
<?php
define('FPDF_FONTPATH','font/');
 
require('fpdf.php');
class PDF extends FPDF
{
  function Header()
    {
		 $this->Image('images/logo.jpg',10,10,0,15,'jpg','');  
// กำหนดฟ้อนต์ที่จะใช้  อังสนา ตัวธรรมดา ขนาด 14
 $this->SetFont('angsana','',14);

   $this->Cell(50,5,'',0,1,'C',0);//เว้นบรรทัด
   $this->Cell(50,5,'',0,0,'C',0);//จัดอยู่กึ่งกลาง
   $this->Cell(75 ,10, iconv( 'UTF-8','cp874' ,'ใบส่งสินค้าซ่อม / Repair Note'),1,1,'C' );
    $this->Cell(50,5,'',0,1,'C',0);//เว้นบรรทัด
	}
  function Center()
	{
		 $this->Cell(35 , 8, iconv( 'UTF-8','cp874' ,'บริษัท / Company'),0,0,'U' );
      $this->Cell(106 , 8, iconv( 'UTF-8','cp874',$rs_number['cust_name']),0,0,'U' );  
	 $this->Cell(15 , 8, iconv( 'UTF-8','cp874' ,'NO'),0,0,'U' );
	  $this->Cell(34 , 8, iconv( 'UTF-8','cp874' ,$rs_number['cust_id']),0,1,'U' );
  $this->Cell(35 , 8, iconv( 'UTF-8','cp874' ,'ที่อยู่ / Address'),0,0,'L' ); 
   $this->Cell(155 , 8, iconv( 'UTF-8','cp874' ,$rs_number['cust_add']),0,1,'L' );  
   $this->Cell(35 , 8, iconv( 'UTF-8','cp874' ,'โทร. / Tel.'),0,0,'L' );  
  $this->Cell(106 , 8, iconv( 'UTF-8','cp874' ,$rs_number['cust_phone']),0,0,'L' );
   $this->Cell(15 , 8, iconv( 'UTF-8','cp874' ,'Date:'),0,0,'L' );
   $this->Cell(34 , 8, iconv( 'UTF-8','cp874' ,date("d/m/Y")),0,1,'L' );  
  $this->Cell(35 , 8, iconv( 'UTF-8','cp874' ,'ผู้สั่งซ่อม'),0,0,'L' );
    $this->Cell(15 , 8, iconv( 'UTF-8','cp874' ,$rs_number['name']),0,0,'L' );     
    $this->Cell(10 , 8, iconv( 'UTF-8','cp874' ,'โทร.'),0,0,'L' ); 
     $this->Cell(34 , 8, iconv( 'UTF-8','cp874' ,$rs_number['cust_phone2']),0,0,'L' ); 
  $this->Cell(15 , 8, iconv( 'UTF-8','cp874' ,'Email:'),0,0,'L' ); 
  $this->Cell(34 , 8, iconv( 'UTF-8','cp874' ,$rs_number['cust_mail']),0,1,'L' );    
 $this->Cell(0,1,'',0,1,'C',0);//เว้นบรรทัด  

	$sql=mysql_query("SELECT  * from exstock where id='".$ex_id."'");
	$num=mysql_num_rows($sql);


 $this->Cell(15,15,iconv( 'UTF-8','cp874' ,'รายการ'),1,0,'C',0);
 $this->Cell(30,15,iconv( 'UTF-8','cp874' ,'รหัสสินค้า'),1,0,'C',0);
 $this->Cell(90,15,iconv( 'UTF-8','cp874' ,'รายละเอียดสินค้า'),1,0,'C',0);
 $this->Cell(15,15,iconv( 'UTF-8','cp874' ,'จำนวน'),1,0,'C',0);
 $this->Cell(40,15,iconv( 'UTF-8','cp874' ,'หมายเลขเครื่อง'),1,1,'C',0);



	for($i=0;$i<count($id);$i++){
		
		$ex_id=explode(":",$id[$i]);
		$select=mysql_query("SELECT * FROM exstock WHERE id='".$ex_id[0]."'") or die (mysql_error());
		$row=mysql_fetch_array($select);



 $this->Cell(15,11,++$n,'LR',0,'C',0);
 $this->Cell(30,11,$row['product_id'],'LR',0,'C',0);
 $this->Cell(90,11,$row['product_des'],'LR',0,'C',0);
 $this->Cell(15,11,$row['quantity'],'LR',0,'C',0);
 $this->Cell(40,11,$row['serial'],'LR',1,'C',0);



	}
 $this->Cell(15,60,'','LR',0,'C',0);
 $this->Cell(30,60,'','LR',0,'C',0);
 $this->Cell(90,60,'','LR',0,'C',0);
 $this->Cell(15,60,'','LR',0,'C',0);
 $this->Cell(40,60,'','LR',1,'C',0);

 $this->Cell(190,30,iconv( 'UTF-8','cp874' ,'หมายเหตุ / Note :                             อาการเสีย:-                                                                                           project:'),1,1,'L',0);
}
  function Footer()
  {
	  $this->Cell(0,8,'',0,1,'C',0);//เว้นบรรทัด
 $this->Cell(20,5,'',0,0,'C',0);//จัดอยู่กึ่งกลาง
  $this->Cell(0 , 8, iconv( 'UTF-8','cp874' ,'ผู้ส่งสินค้า / Delivered By                                                                                      ผู้รับสินค้า(ลงชื่อตัวบรรจง)'),0,1,'L' );
 $this->Cell(0,1,'',0,1,'C',0);//เว้นบรรทัด
 $this->Cell(20,5,'',0,0,'C',0);//จัดอยู่กึ่งกลา

   $this->Cell(0 , 1, iconv( 'UTF-8','cp874' ,'                                                                                                                                        Received by'),0,1,'L' );
 $this->Cell(0,8,'',0,1,'C',0);//เว้นบรรทัด   
 $this->Cell(15,5,'',0,0,'C',0);//จัดอยู่กึ่งกลาง                                 
  $this->Cell(0,8,'....................................................                                                                            ........................................................',0,1,'L',0);
  $this->Cell(14,5,'',0,0,'C',0);//จัดอยู่กึ่งกลาง                 
  $this->Cell(0,8,'(....................................................)                                                                          (........................................................)',0,1,'L',0);
  $this->Cell(14,5,'',0,0,'C',0);//จัดอยู่กึ่งกลาง 
  $this->Cell(0,8,'      .........../............./..............                                                                                              ........../............./............',0,1,'L',0);
  }}
	  
		
		
 
$pdf=new FPDF();
//Disable automatic page break
$pdf->SetAutoPageBreak(false);
// เพิ่มฟ้อนต์ภาษาไทยเข้ามา ตัวธรรมดา กำหนด ชื่อ เป็น angsana
$pdf->AddFont('angsana','','angsa.php');
 
//สร้างหน้าเอกสาร
$pdf->AddPage();
  

$pdf->Output();
	
?>




Tag : PHP







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2014-08-28 10:14:19 By : chaolea View : 710 Reply : 1
 

 

No. 1



โพสกระทู้ ( 3,748 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์
Facebook

ไม่ได้ return $this ครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-08-28 14:05:34 By : Dragons_first
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : รบกวนพี่ๆทุกคนหน่อยครับ คือผมใส่ function แล้วไม่แสดงอ่ะครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่