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 > ขอโค้ดปฎิทินการทำงานหน่อย คร้า ขอโค้ดปฎิทินการทำงานหน่อย คร้า แบบว่า สามารถเพิ่มการทำงานแต่ละวันได้ค่ะ



 

ขอโค้ดปฎิทินการทำงานหน่อย คร้า ขอโค้ดปฎิทินการทำงานหน่อย คร้า แบบว่า สามารถเพิ่มการทำงานแต่ละวันได้ค่ะ

 



Topic : 035938



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



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




ขอโค้ดปฎิทินการทำงานหน่อย คร้า แบบว่า สามารถเพิ่มการทำงานแต่ละวันได้ค่ะ



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-12-17 18:25:17 By : wave777 View : 1269 Reply : 15
 

 

No. 1



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

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

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


ค้นหาเอาเลย php event calendar






Date : 2009-12-17 18:32:44 By : plakrim
 


 

No. 2



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



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


calendar.php

style type="text/css">
<!--
body { margin: 0px 0px; padding: 0px 0px}
a:link { color: #005CA2; text-decoration: none}
a:visited { color: #005CA2; text-decoration: none}
a:active { color: #0099FF; text-decoration: underline}
a:hover { color: #0099FF; text-decoration: underline}
-->
</style>

<form id="form1" name="form1" method="post" action="">
<table width="0" border="0" cellpadding="1" cellspacing="1">
<tr>
<td bgcolor="f2f2f2"><div align="center"><font color="#0000FF" style="font-family:sans-serif"


size="+6">
<?
<?
$a= date(j); // , 1 to 31
$b = date(a); // am,
$c = date(A); // AM,
$d = date(B); // Swatch Internet time 000 -999
$e = date(d); // , 01 to 31
$f = date(D); // , sat
$g = date(F); // , November
$h = date(g); // , 1 through 12
$hh = date(G); // , 0 through 23
$i = date(h); // , 01 through 12
$j = date(H); // , 00 through 23
$k = date(i); // , 00 to 59
$l = date(I); // 0, 1 if Daylight Savings Time, 0 otherwise.
$m = date(l); // , Sunday through Saturday
$n = date(L); // 0, 1 if it is a leap year, 0 otherwise.
$o = date(m); // , 01 through 12
$p = date(M); // , Jan through Dec
$q = date(n); // , 1 through 12
$r = date(o); // Example: +0200
$s = date(r); // Example: Thu, 21 Dec 2000 16:01:07 +0200
$t = date(s); // 00 through 59
$u = date(S); // st, nd, rd or th. Works well with j
$v = date(t); // 28 through 31
$w = date(T); // time zoneseting Examples: EST, MDT ...
$x = date(u); // See also time()
$y = date(w); // 0 (for Sunday) through 6 (for Saturday)
$z = date(W); // Example: 42 (the 42nd week in the year)
$aa = date(y); // Examples: 99 or 03
$bb = date(Y); // Examples: 1999 or 2003
$cc = date(z);
$dd = date(Z);


if(!$mon){
$mon = $o ;
}else{
$mon = $mon ;

}
if(!$year){
$year = $bb ;
}else{
$year = $year;
}
$firstday = mktime(0,0,0,$mon,1,$bb);
$firstdays = date('w',$firstday);
$lastdays = date('t',$firstday);
$year_view = date('Y',$firstday);
$mon_view = date('m',$firstday);
echo"
<script>
function d_s( su , mnp){
if(mnp == 'm'){
document.dat_form.mon.value = su - 1 ;
}else{
document.dat_form.mon.value = su + 1 ;
}
document.dat_form.submit();
}
</script>
<form name=dat_form action='$PHP_SELF' method=post>
<input type=hidden name=mon value=''>

<table border=1 width=140 cellpadding=0 cellspacing=0 bordercolor=#999999>
<tr bgcolor=pink>
<td colspan=7 align=center><a href=\"javascript:d_s($mon,'m')\"><</a>&nbsp;$year_view -


$mon_view <a href=\"javascript:d_s($mon,'p')\">></a></td>
</tr>
</form>
<tr align=center><td><font color=red>อา</a></td><td>จ</td><td>อ</td><td>พ</td><td>


พฤ</td><td>ศ</td><td><font color=blue>ส</font></td></tr>
<tr align=right>";
////
for($i = 0; $i < 7 ; $i++){
if($firstdays == $i){
break;
}
else{
echo"<td width=8>&nbsp;</td>";
}
$week++;
}

for($i=1; $i<=$lastdays ;$i++){
if($week % 7 == 0){
echo"</tr><tr align=right>";
}
if($a == $i){
$bgcolor = "bgcolor=pink";
}else{
$bgcolor = '';
}

if($week%7==0){
echo"<td $bgcolor><font size=2 color=red><a href=\"calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}else if($week%7==6){
echo"<td $bgcolor><font size=2 color=blue><a href=\"calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}else{ //
echo"<td $bgcolor><font size=2><a href=\"calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}
$week++;
}

while($week%7!=0){
echo"<td>&nbsp;</td>";
$week++;
}
echo"</tr>
</table>
";
?>
</font></div></td>
<td bgcolor="f2f2f2"><div align="center">เลือกวันที่ต้องการบันทึกตารางนัด</div></td>
</tr>
<tr>
<td bgcolor="f2f2f2"></td>
<td bgcolor="f2f2f2"><img name="" src="" width="250" height="2" alt="ห" /></td>
</tr>
<tr>
<td bgcolor="f2f2f2">วัน/เดือน/ปี</td>
<td bgcolor="f2f2f2"><label>
<input name="textfield" type="text" value="<? echo $test; ?>" />
</label></td>
</tr>
<tr>
<td bgcolor="f2f2f2">เรื่อง</td>
<td bgcolor="f2f2f2"><label>
<input type="text" name="textfield2" />
</label></td>
</tr>
<tr>
<td valign="top" bgcolor="f2f2f2">รายระเอียด</td>
<td bgcolor="f2f2f2"><label>
<textarea name="textarea" cols="50" rows="5" wrap="virtual"></textarea>
</label></td>
</tr>
<tr>
<td bgcolor="f2f2f2">&nbsp;</td>
<td bgcolor="f2f2f2"><label>
<div align="center">
<input type="submit" name="Submit" value="บันทึก" />
</div>
</label></td>
</tr>
</table>
</form>

if($week%7==0){
echo"<td $bgcolor><font size=2 color=red><a href=\"calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}else if($week%7==6){
echo"<td $bgcolor><font size=2 color=blue><a href=\"calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}else{ //
echo"<td $bgcolor><font size=2><a href=\"calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}
$week++;
}

while($week%7!=0){
echo"<td>&nbsp;</td>";
$week++;
}
echo"</tr>
</table>
";
?>
</font></div></td>
<td bgcolor="f2f2f2"><div align="center">เลือกวันที่ต้องการบันทึกตารางนัด</div></td>
</tr>
<tr>
<td bgcolor="f2f2f2"></td>
<td bgcolor="f2f2f2"><img name="" src="" width="250" height="2" alt="ห" /></td>
</tr>
<tr>
<td bgcolor="f2f2f2">วัน/เดือน/ปี</td>
<td bgcolor="f2f2f2"><label>
<input name="textfield" type="text" value="<? echo $test; ?>" />
</label></td>
</tr>
<tr>
<td bgcolor="f2f2f2">เรื่อง</td>
<td bgcolor="f2f2f2"><label>
<input type="text" name="textfield2" />
</label></td>
</tr>
<tr>
<td valign="top" bgcolor="f2f2f2">รายระเอียด</td>
<td bgcolor="f2f2f2"><label>
<textarea name="textarea" cols="50" rows="5" wrap="virtual"></textarea>
</label></td>
</tr>
<tr>
<td bgcolor="f2f2f2">&nbsp;</td>
<td bgcolor="f2f2f2"><label>
<div align="center">
<input type="submit" name="Submit" value="บันทึก" />
</div>
</label></td>
</tr>
</table>
</form>
Date : 2009-12-17 18:57:21 By : parita
 

 

No. 3



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



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


ฐานข้อมูลชื่อ datatest นะครับ สร้าง table ชื่อ diary

CREATE TABLE `diary` ( `id` INT( 2 ) NOT NULL AUTO_INCREMENT ,
`date` VARCHAR( 10 ) NOT NULL ,
`subject` VARCHAR( 50 ) NOT NULL ,
`detail` TEXT NOT NULL ,
PRIMARY KEY ( `id` ) );
Date : 2009-12-17 18:58:17 By : parita
 


 

No. 4



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



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


sample.php เพื่อบันทึกตารางนัดหมายนี้ลงฐานข้อมูลนะครับ

<?
$hostname="localhost";
$user="root";
$passwd="";
$dbname="datatest";
$tbname="diary";
mysql_connect($hostname,$user,$password) or die("Not Connection Mysql");
mysql_select_db($dbname) or die("Not Select Date Base");
$sql="INSERT INTO `diary` ( `date` , `subject` , `detail` ) VALUES ('$date', '$subject', '$detail่')";
$dbquery=mysql_db_query($dbname,$sql);
mysql_close();
echo "บันทึกข้อมูลเรียบร้อยแล้ว";
?>
Date : 2009-12-17 18:59:34 By : parita
 


 

No. 5



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



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


ใจดีเกินไปหรือป่าวเนี้ย
Date : 2009-12-17 19:00:07 By : parita
 


 

No. 6



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



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


y


'' งงมานเปนแบบนี้อ่า
Date : 2009-12-17 20:14:52 By : wave777
 


 

No. 7



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



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


[img=rrrrrrrrrrrrrrrrrrrrrrrrr]https://www.thaicreate.com/upload/stock/20091217201810.jpg[/img



มานเปนแบบนี้ แล้วกดปุ่มก้อไม่มีไรเกิดขึ้น ดาต้าเบสก้อใส่แล้ว
Date : 2009-12-17 20:18:48 By : wave777
 


 

No. 8



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



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


rrrrrrrrrrrrrrrrrrrrrrrrr
Date : 2009-12-17 20:19:31 By : wave777
 


 

No. 9



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



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


ก็พียังหัยไม่หมดงัย
Date : 2009-12-17 22:07:49 By : parita
 


 

No. 10



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



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


สร้างไฟล์ชื่อ sample2.php เพื่อทำหน้าที่รับข้อมูลจากไฟล์ fine_diary.php

<?
$hostname="localhost";
$user="root";
$passwd="";
$dbname="datatest";
$tbname="diary";
mysql_connect($hostname,$user,$password) or die("Not Connection Mysql");
mysql_select_db($dbname) or die("Not Select Date Base");
$sql="select * from $tbname where date='$_POST[date]'";
$dbquery=mysql_db_query($dbname,$sql);
$row=mysql_num_rows($dbquery);
?>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>

<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="59" bgcolor="#CCCCCC" scope="row"><div align="center">ลำดับที่</div></th>
<td width="59" bgcolor="#CCCCCC"><div align="center">วันเวลา</div></td>
<td width="44" bgcolor="#CCCCCC"><div align="center">เรื่อง</div></td>
<td width="220" bgcolor="#CCCCCC"><div align="center">รายระเีอียด</div></td>
</tr>
<?
for($i=1;$i<=$row;$i++){
$result=mysql_fetch_array($dbquery);
?>
<tr>
<th bgcolor="f2f2f2" scope="row"><div align="center"><? echo $i; ?></div></th>
<td bgcolor="#99CCCC"><div align="center"><? echo $result['date'];?></div></td>
<td bgcolor="f2f2f2"><div align="center"><? echo $result[subject]; ?></div></td>
<td bgcolor="#FFCCCC"><div align="center"><? echo $result[detail]; ?></div></td>
</tr>
<?
}
?>
</table>
</body>
</html>
Date : 2009-12-17 22:11:52 By : parita
 


 

No. 11



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



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


คราวนี้ ได้แน่นอน
Date : 2009-12-17 22:13:14 By : parita
 


 

No. 12



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



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


สร้างไฟล์ fine_diary.php เพื่อค้นหาตารางนัดหมายกันตาม code ด้านล่างนี้

<style type="text/css">
<!--
body { margin: 0px 0px; padding: 0px 0px}
a:link { color: #005CA2; text-decoration: none}
a:visited { color: #005CA2; text-decoration: none}
a:active { color: #0099FF; text-decoration: underline}
a:hover { color: #0099FF; text-decoration: underline}
-->
</style>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
<form id="form1" name="form1" method="post" action="sample2.php">
<table width="0" border="0" cellpadding="1" cellspacing="1">
<tr>
<td bgcolor="f2f2f2"><div align="center"><font color="#0000FF" style="font-family:sans-serif"


size="+6">
<?
$a= date(j); // , 1 to 31
$b = date(a); // am,
$c = date(A); // AM,
$d = date(B); // Swatch Internet time 000 -999
$e = date(d); // , 01 to 31
$f = date(D); // , sat
$g = date(F); // , November
$h = date(g); // , 1 through 12
$hh = date(G); // , 0 through 23
$i = date(h); // , 01 through 12
$j = date(H); // , 00 through 23
$k = date(i); // , 00 to 59
$l = date(I); // 0, 1 if Daylight Savings Time, 0 otherwise.
$m = date(l); // , Sunday through Saturday
$n = date(L); // 0, 1 if it is a leap year, 0 otherwise.
$o = date(m); // , 01 through 12
$p = date(M); // , Jan through Dec
$q = date(n); // , 1 through 12
$r = date(o); // Example: +0200
$s = date(r); // Example: Thu, 21 Dec 2000 16:01:07 +0200
$t = date(s); // 00 through 59
$u = date(S); // st, nd, rd or th. Works well with j
$v = date(t); // 28 through 31
$w = date(T); // time zoneseting Examples: EST, MDT ...
$x = date(u); // See also time()
$y = date(w); // 0 (for Sunday) through 6 (for Saturday)
$z = date(W); // Example: 42 (the 42nd week in the year)
$aa = date(y); // Examples: 99 or 03
$bb = date(Y); // Examples: 1999 or 2003
$cc = date(z);
$dd = date(Z);


if(!$mon){
$mon = $o ;
}else{
$mon = $mon ;

}
if(!$year){
$year = $bb ;
}else{
$year = $year;
}
$firstday = mktime(0,0,0,$mon,1,$bb);
$firstdays = date('w',$firstday);
$lastdays = date('t',$firstday);
$year_view = date('Y',$firstday);
$mon_view = date('m',$firstday);
echo"
<script>
function d_s( su , mnp){
if(mnp == 'm'){
document.dat_form.mon.value = su - 1 ;
}else{
document.dat_form.mon.value = su + 1 ;
}
document.dat_form.submit();
}
</script>
<table border=1 width=140 cellpadding=0 cellspacing=0 bordercolor=#999999>
<tr bgcolor=pink>
<td colspan=7 align=center><a href=\"javascript:d_s($mon,'m')\"><</a>&nbsp;$year_view - $mon_view <a href=\"javascript:d_s($mon,'p')\">></a></td>
</tr>
<tr align=center><td><font color=red>อา</a></td><td>จ</td><td>อ</td><td>พ</td><td>พฤ</td><td>ศ</td><td><font color=blue>ส</font></td></tr>
<tr align=right>";
////
for($i = 0; $i < 7 ; $i++){
if($firstdays == $i){
break;
}
else{
echo"<td width=8>&nbsp;</td>";
}
$week++;
}

for($i=1; $i<=$lastdays ;$i++){
if($week % 7 == 0){
echo"</tr><tr align=right>";
}
if($a == $i){
$bgcolor = "bgcolor=pink";
}else{
$bgcolor = '';
}

if($week%7==0){
echo"<td $bgcolor><font size=2 color=red><a href=\"sample2.php?date=$i/$mon_view/$year_view\">$i</a></font></td>";
}else if($week%7==6){
echo"<td $bgcolor><font size=2 color=blue><a href=\"sample2.php?date=$i/$mon_view/$year_view\">$i</a></font></td>";
}else{ //
echo"<td $bgcolor><font size=2><a href=\"sample2.php?date=$i/$mon_view/$year_view\">$i</a></font></td>";
}
$week++;
}

while($week%7!=0){
echo"<td>&nbsp;</td>";
$week++;
}
echo"</tr>
</table>
";
?>
</font></div></td>
<td bgcolor="f2f2f2"><div align="center">เลือกวันที่ต้องการค้นหาตารางนัด</div></td>
</tr>
<tr>
<td bgcolor="f2f2f2"></td>
<td bgcolor="f2f2f2"><img name="" src="" width="250" height="2" alt="ห" /></td>
</tr>
<tr>
<td bgcolor="f2f2f2">วัน/เดือน/ปี</td>
<td bgcolor="f2f2f2"><label>
<input name="date" type="text" id="date" value="<? echo $test; ?>" />
</label></td>
</tr>
<tr>
<td bgcolor="f2f2f2">&nbsp;</td>
<td bgcolor="f2f2f2"><label>
<label></label>
</label>
<label>
<div align="center">
<input type="submit" name="Submit" value="ค้นหา""/>
</div>
</label></td>
</tr>
</table>
</form>
Date : 2009-12-17 22:23:02 By : parita
 


 

No. 13



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

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

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


เดี๋ยววันหน้าผมปลอมตัวเป็นผู้หญิง ใส่รูปแจ่มๆ มาขอโคดมั่งดีกว่า
Date : 2009-12-17 22:59:19 By : panyapol
 


 

No. 14



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

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

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


Code
เดี๋ยววันหน้าผมปลอมตัวเป็นผู้หญิง ใส่รูปแจ่มๆ มาขอโคดมั่งดีกว่า


ใช่น้อ มีแต่คนดูถูกคนตอบ ว่าเป็นผู้ชายแล้วจะไม่มีใครตอบ ถึงได้มีคนสับสนทางเพสในบอร์ดเยอะ

ถ้าผู้ชายคนนั้น ถามรู้เรื่อง จะขอโค๊ดก็อย่าให้น่าเกลียด มันก็คงได้ แต่ผมไม่มีโค๊ดจะให้อะ ไม่ค่อยมีอะไรจะโชว์ มีแต่หาเว็บมาให้พอได้
Date : 2009-12-17 23:08:40 By : plakrim
 


 

No. 15



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



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


555+

พี P@e เห็นด้วยน่ะคราบ วิธีของพี

เดียวจัดหัยเอง
Date : 2009-12-17 23:15:06 By : parita
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
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 03
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 อัตราราคา คลิกที่นี่