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,030

HOME > PHP > PHP Forum > ขอโค้ดทำปฏิทินเหตุการณ์หน่อยสิครับ ขอโค้ดทำปฏิทินเหตุการณ์หน่อยสิครับ มีไหนครับ จะเอาไปทำระบบการยืมรถยนต์อ่ะครับ



 

ขอโค้ดทำปฏิทินเหตุการณ์หน่อยสิครับ ขอโค้ดทำปฏิทินเหตุการณ์หน่อยสิครับ มีไหนครับ จะเอาไปทำระบบการยืมรถยนต์อ่ะครับ

 



Topic : 010375

Guest




ขอโค้ดทำปฏิทินเหตุการณ์หน่อยสิครับ มีไหนครับ จะเอาไปทำระบบการยืมรถยนต์อ่ะครับ ขอบคุณครับ


Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 11 ต.ค. 2549 11:50:23 By : lufc View : 2121 Reply : 2
 

 

No. 1

Guest


<?
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Modify / Update : &Ccedil;&Ntilde;&sup1;&uml;&Ntilde;&sup1;&middot;&Atilde;&igrave;&middot;&Otilde;&egrave; 24 &micro;&Oslash;&Aring;&Ograve;&curren;&Aacute; 2548 &agrave;&Ccedil;&Aring;&Ograve; 1:36 &sup1;. / &Ccedil;&Ntilde;&sup1;&uml;&Ntilde;&sup1;&middot;&Atilde;&igrave;&middot;&Otilde;&egrave; 24 &micro;&Oslash;&Aring;&Ograve;&curren;&Aacute; 2548 &agrave;&Ccedil;&Aring;&Ograve; 1:36 &sup1;.
#Description : &ordm;&Atilde;&Ocirc;&Euml;&Ograve;&Atilde;&aacute;&Aring;&ETH;&uml;&Ntilde;&acute;&Atilde;&Ugrave;&raquo;&aacute;&ordm;&ordm;&cent;&eacute;&Iacute;&Aacute;&Ugrave;&Aring;&Ccedil;&Ntilde;&sup1;&middot;&Otilde;&egrave;
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------


Class System_Date
{
var $monthfull_en=array(' January ',' February ',' March ',' April ',' May ',' June ',' July ',' August ',' September ',' October ',' November ',' December ');
var $monthfull_th=array('&Aacute;&iexcl;&Atilde;&Ograve;&curren;&Aacute;','&iexcl;&Oslash;&Aacute;&Agrave;&Ograve;&frac34;&Ntilde;&sup1;&cedil;&igrave;','&Aacute;&Otilde;&sup1;&Ograve;&curren;&Aacute;','&agrave;&Aacute;&Eacute;&Ograve;&Acirc;&sup1;','&frac34;&Auml;&Eacute;&Agrave;&Ograve;&curren;&Aacute;','&Aacute;&Ocirc;&para;&Oslash;&sup1;&Ograve;&Acirc;&sup1;','&iexcl;&Atilde;&iexcl;&macr;&Ograve;&curren;&Aacute;','&Ecirc;&Ocirc;&sect;&Euml;&Ograve;&curren;&Aacute;','&iexcl;&Ntilde;&sup1;&Acirc;&Ograve;&Acirc;&sup1;','&micro;&Oslash;&Aring;&Ograve;&curren;&Aacute;','&frac34;&Auml;&Egrave;&uml;&Ocirc;&iexcl;&Ograve;&Acirc;&sup1;','&cedil;&Ntilde;&sup1;&Ccedil;&Ograve;&curren;&Aacute;');
var $monthshort_en=array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
var $monthshort_th=array('&Aacute;.&curren;.','&iexcl;.&frac34;.','&Aacute;&Otilde;.&curren;.','&agrave;&Aacute;.&Acirc;.','&frac34;.&curren;.','&Aacute;&Ocirc;.&Acirc;.','&iexcl;.&curren;.','&Ecirc;.&curren;.','&iexcl;.&Acirc;.','&micro;.&curren;.','&frac34;.&Acirc;.','&cedil;.&curren;.');
var $montnumber=array('1','2','3','4','5','6','7','8','9','10','11','12');
var $monthdisplay=array('01','02','03','04','05','06','07','08','09','10','11','12');
var $datelist=array('00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31');
var $DateShortTh=array('&Iacute;&Ograve;','&uml;','&Iacute;','&frac34;','&frac34;&Auml;','&Egrave;','&Ecirc;');
var $DateFullTh=array('&Iacute;&Ograve;&middot;&Ocirc;&micro;&Acirc;&igrave;','&uml;&Ntilde;&sup1;&middot;&Atilde;&igrave;','&Iacute;&Ntilde;&sect;&curren;&Ograve;&Atilde;','&frac34;&Oslash;&cedil;','&frac34;&Auml;&Euml;&Ntilde;&Ecirc;&ordm;&acute;&Otilde;','&Egrave;&Oslash;&iexcl;&Atilde;&igrave;','&agrave;&Ecirc;&Ograve;&Atilde;&igrave;');
var $CurrentYear,$CurrentMonth,$CurrentDate;
var $temp,$temp1;
var $DateFormat;
var $SignOfDate,$CurrentDateLanguage;

/*
Update : Thu 1 September,2005 23:26 PM
Description : Function System_Date is define current data or time.
*/
function System_Date()
{
global $System_Date_Format,$System_Date_Language;
$this->CurrentYear=date('Y');
$this->CurrentMonth=date('m');
$this->CurrentDate=date('d');
$this->CurrentDateFormat=$System_Date_Format;
$this->CurrentDateLanguage=$System_Date_Language;
}
/*
Update : Thu 1 September,2005 23:27 PM
Description : Function ListAllMonth is make select object for display month
*/
function ListAllMonth($MonthID)
{
$this->temp="";
for($i=0;$i<count($this->monthfull_en);$i++)
{
$this->temp.="<option value=\"".($i+1)."\"";
if($MonthID==$i){
$this->temp.=" selected";
}
$this->temp.=">".$this->monthfull_en[$i]."</option>".chr(13);
}
return $this->temp;
}
/*
Update : Thu 1 September,2005 23:27 PM
Description : List All year.
*/
function ListAllYear($YearID)
{
$start=date('Y')-40;
$stop=date('Y')+40;
for($i=$start;$i<=$stop;$i++)
{
$this->tempyear.="<option value=\"".$i."\" ";
if($YearID==$i)
{
$this->tempyear.= "selected";
}
$this->tempyear.=">".$i."</option>";
}
return $this->tempyear;
}
/*
Update : Thu 1 September,2005 23:29 PM
Description : List All date
*/
function ListAllDate($DateID)
{
for($i=1;$i<=31;$i++)
{
$this->temp.="<option value=\"".$i."\" ";
if($DateID==$i){
$this->temp.="selected";
}
$this->temp.=">".$i."</option>".chr(13);
}
return $this->temp;
}

function DateFormate($DateTime,$Format)
{
if($DateTime=="0000-00-00 00:00:00" || empty($DateTime)) { return "N/A"; }
$myDate = split("00:00:00",$DateTime);
$myTime = explode(" ",$DateTime);
$myDates = split("-",$myDate[0]);
switch($Format)
{
case "ThaiFormat1" : return $this->DateThaiFormat($myDates[2],$myDates[1],$myDates[0]); break;
case "ThaiFormat2" : return $this->DateThaiFormat1($myDates[2],$myDates[1],$myDates[0]); break;
case "ThaiFormat3" : return $this->DateThaiFormat2($myDates[2],$myDates[1],$myDates[0],$myTime[1]); break;
case "ThaiFormat4" : return $this->DateThaiFormat3($myDates[2],$myDates[1],$myDates[0],$myTime[1]); break;
case "ThaiFormat5" : return $this->DateThaiFormat4($myDates[2],$myDates[1],$myDates[0]); break;
case "EngFormat1" : return $this->DateEngFormat1($myDates[2],$myDates[1],$myDates[0]); break;
case "Short" : return $myDate[0]; break;
}
}

function DateEngFormat1($Day,$Month,$Year)
{
// 14/07/2006
return $Day."/".$Month."/".$Year;
}
function DateThaiFormat($Day,$Month,$Year)
{
$this->temp = ($Day*1)." ".$this->monthfull_th[($Month*1)-1]." ".($Year+543);
return $this->temp;
}

# Funciton Name -> DateThaiFormat1
# Function Desc -> &uml;&Ntilde;&acute;&Atilde;&Ugrave;&raquo;&aacute;&ordm;&ordm;&Ccedil;&Ntilde;&sup1;&middot;&Otilde;&egrave;&Ecirc;&Oacute;&Euml;&Atilde;&Ntilde;&ordm;&iquest;&Iacute;&Atilde;&igrave;&Aacute;&aacute;&iexcl;&eacute;&auml;&cent;&cent;&eacute;&Iacute;&Aacute;&Ugrave;&Aring;
function DateThaiFormat1($Day,$Month,$Year)
{
$this->temp="";
$Month = $Month*1;
$Day = $Day*1;
$Year = $Year*1;
$mLocalDate = mktime(0,0,0,$Month,$Day,$Year);
$this->temp = $this->DateShortTh[date("w",$mLocalDate)].".,";
$this->temp.= ($Day*1)."/".($Month*1)."/".($Year+543);
return $this->temp;
}

# Function Name -> DateThaiFormat2
# Function Desc -> &uml;&Ntilde;&acute;&Atilde;&Ugrave;&raquo;&aacute;&ordm;&ordm;&Ccedil;&Ntilde;&sup1;&middot;&Otilde;&egrave;&aacute;&ordm;&ordm;&auml;&middot;&Acirc;&aacute;&Aring;&ETH;&uml;&Ntilde;&acute;&agrave;&Ccedil;&Aring;&Ograve;&acute;&eacute;&Ccedil;&Acirc;&sup1;&ETH;
function DateThaiFormat2($Day,$Month,$Year,$Time)
{
$Month = $Month*1;
$Day = $Day*1;
$Year = $Year*1;
$mLocalDate = mktime(0,0,0,$Month,$Day,$Year);
$this->temp = "";
$this->temp= "&Ccedil;&Ntilde;&sup1;".$this->DateFullTh[date("w",$mLocalDate)]." &middot;&Otilde;&egrave; ".$this->DateThaiFormat($Day,$Month,$Year)." ".$this->TimeFormat1($Time);
return $this->temp;
}

# Function Name -> DateThaiFormat3
# Function Desc -> &uml;&Ntilde;&acute;&Atilde;&Ugrave;&raquo;&aacute;&ordm;&ordm;&Ccedil;&Ntilde;&sup1;&middot;&Otilde;&egrave;&aacute;&ordm;&ordm;&auml;&middot;&Acirc;&aacute;&Aring;&ETH;&uml;&Ntilde;&acute;&agrave;&Ccedil;&Aring;&Ograve;&acute;&eacute;&Ccedil;&Acirc;&sup1;&ETH;
function DateThaiFormat3($Day,$Month,$Year,$Time)
{
$this->temp = "";
$this->temp= $this->DateThaiFormat($Day,$Month,$Year)." ".$this->TimeFormat1($Time);
return $this->temp;
}

# Function Name -> DateThaiFormat4
# Function Desc -> &uml;&Ntilde;&acute;&Atilde;&Ugrave;&raquo;&aacute;&ordm;&ordm;&Ccedil;&Ntilde;&sup1;&middot;&Otilde;&egrave;&aacute;&ordm;&ordm;&auml;&middot;&Acirc;
function DateThaiFormat4($Day,$Month,$Year)
{
$Month = $Month*1;
$Day = $Day*1;
$Year = $Year*1;
$mLocalDate = mktime(0,0,0,$Month,$Day,$Year);
$this->temp = "";
$this->temp= "&Ccedil;&Ntilde;&sup1;".$this->DateFullTh[date("w",$mLocalDate)]." &middot;&Otilde;&egrave; ".$this->DateThaiFormat($Day,$Month,$Year);
return $this->temp;

}

# Function Name -> TimeFormat1
# Function Desc -> &uml;&Ntilde;&acute;&Atilde;&Ugrave;&raquo;&aacute;&ordm;&ordm;&agrave;&Ccedil;&Aring;&Ograve;
function TimeFormat1($Time)
{
list($hour,$min,$sec) = explode(":",$Time);
return "&agrave;&Ccedil;&Aring;&Ograve; ".$hour.":".$min." &sup1;.";
}

# Function Name -> NextWeek
# Function Desc -> &Euml;&Ograve;&Ccedil;&Ntilde;&sup1;&middot;&Otilde;&egrave;&atilde;&sup1;&Ecirc;&Ntilde;&raquo;&acute;&Ograve;&Euml;&igrave;&micro;&egrave;&Iacute;&auml;&raquo;
function NextWeek($DateType)
{
strtotime("now");
switch($DateType)
{
case "LastWeek" : return date('Y-m-d h:m:s',strtotime("last sunday")); break;
case "ThisWeek" : return date('Y-m-d h:m:s',strtotime("this sunday")); break;
case "NextWeek" : return date('Y-m-d h:m:s',strtotime("next sunday")); break;
}
}

# Function Name -> ChangeDateFormat1
# Function Desc -> &agrave;&raquo;&Aring;&Otilde;&egrave;&Acirc;&sup1;&Atilde;&Ugrave;&raquo;&aacute;&ordm;&ordm;&Ccedil;&Ntilde;&sup1;&middot;&Otilde;&egrave;&uml;&Ograve;&iexcl; &Iacute;.,01/11/2548 &agrave;&raquo;&ccedil;&sup1; 0000-00-00 00:00:00
function ChangeDateFormat1($DateFormat)
{
$this->temp = "";
$this->temp = explode(".,",$DateFormat);
$this->temp1 = explode("/",$this->temp[1]);
return ($this->temp1[2]-543)."-".$this->temp1[1]."-".$this->temp1[0]." 00:00:00";
}


}
?>






Date : 11 ต.ค. 2549 17:08:32 By : noname
 


 

No. 2

Guest


ช่วยบอกวิธีวางโค้ดหน่อยสิครับ เขียน PHP ไม่ค่อยจะเป็นอ่ะครับ ขอบคุณครับ ไหนๆ ก็ให้โค้ดมาแล้ว ช่วยแนะนำหน่อยดิ ครับ หรือท่านผู้รู้ก็ได้ครับ
Date : 11 ต.ค. 2549 17:20:15 By : lufc
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ขอโค้ดทำปฏิทินเหตุการณ์หน่อยสิครับ ขอโค้ดทำปฏิทินเหตุการณ์หน่อยสิครับ มีไหนครับ จะเอาไปทำระบบการยืมรถยนต์อ่ะครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 01
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 อัตราราคา คลิกที่นี่