「:Note」の版間の差分
1行目: | 1行目: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<php> | <php> | ||
include_once("./includes/rokuyou.inc"); | include_once("./includes/rokuyou.inc"); | ||
− | print("<form | + | print("<form>"); |
− | + | ||
− | + | ||
if(isset($_GET['num'])){ | if(isset($_GET['num'])){ | ||
22行目: | 14行目: | ||
$intLast=(int)date("t",$dteDate); | $intLast=(int)date("t",$dteDate); | ||
− | print("<font face='Arial Black'>"); | + | print("<CENTER><font face='Arial Black'>"); |
print(date("Y 年 m 月",$dteDate)."の予定"); | print(date("Y 年 m 月",$dteDate)."の予定"); | ||
− | print("</font> | + | print("</font></CENTER>"); |
− | + | print("<table border=1 align=center width=600>"); | |
− | print("<table border=1 align= | + | |
print("<tr valign='middle'>"); | print("<tr valign='middle'>"); | ||
print("<small><th><font color=red>日</font></th><th>月</th><th>火</th><th>水</th><th>木</th><th>金</th><th><font color=blue>土</font></th></small>"); | print("<small><th><font color=red>日</font></th><th>月</th><th>火</th><th>水</th><th>木</th><th>金</th><th><font color=blue>土</font></th></small>"); | ||
83行目: | 74行目: | ||
print("</table>"); | print("</table>"); | ||
+ | if(isset($_GET['num'])){ | ||
+ | $dteDate=mktime(0,0,0,date("m")+$_GET['num'],1,date("Y")); | ||
+ | $num=$_GET['num']; | ||
+ | }else{ | ||
+ | $dteDate=mktime(0,0,0,date("4"),1,date("2008")); | ||
+ | $num=0; | ||
+ | } | ||
+ | $intFirst=(int)date("w",$dteDate); | ||
+ | $intLast=(int)date("t",$dteDate); | ||
− | print("</ | + | print("<CENTER><font face='Arial Black'>"); |
+ | print(date("Y 年 m 月",$dteDate)."の予定"); | ||
+ | print("</font></CENTER>"); | ||
+ | print("<table border=1 align=center width=600>"); | ||
+ | print("<tr valign='middle'>"); | ||
+ | print("<small><th><font color=red>日</font></th><th>月</th><th>火</th><th>水</th><th>木</th><th>金</th><th><font color=blue>土</font></th></small>"); | ||
+ | print("</tr>"); | ||
+ | print("<tr>"); | ||
+ | |||
+ | $db = mysql_connect("localhost", "root", "ukkose"); | ||
+ | mysql_select_db("pokwikidb",$db); | ||
+ | |||
+ | for($i=1;$i<=$intFirst+$intLast;$i++){ | ||
+ | $intDay=$i-$intFirst; | ||
+ | $dteTmp=date("Y-m-d",mktime(0,0,0,date("m",$dteDate),$intDay,date("Y",$dteDate))); | ||
+ | if($i<=$intFirst){ | ||
+ | print("<td width='10'><br /></td>"); | ||
+ | }else{ | ||
+ | if($i % 7==0){ | ||
+ | if($dteTmp == date("Y-m-d")){ | ||
+ | print("<td width='10%' height='70' valign='top' Bgcolor=#ffff99>"); | ||
+ | }else{ print("<td width='10%' height='70' valign='top' Bgcolor=#b0b0ff>"); | ||
+ | } | ||
+ | }elseif($i % 7==1){ | ||
+ | if($dteTmp == date("Y-m-d")){ | ||
+ | print("<td width='10%' height='70' valign='top' Bgcolor=#ffff99>"); | ||
+ | }else{ print("<td width='10%' height='70' valign='top' Bgcolor=#ff9999>"); | ||
+ | } | ||
+ | }else{ | ||
+ | if($dteTmp == date("Y-m-d")){ | ||
+ | print("<td width='10%' height='70' valign='top' Bgcolor=#ffff99>"); | ||
+ | }else{ print("<td width='10%' height='70' valign='top'>"); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | print($intDay); | ||
+ | if (get_rokuyou(date("Y",$dteDate),date("m",$dteDate),$intDay) == 3) { | ||
+ | print ("<font size=1 color=red>友引</font>"); | ||
+ | } | ||
+ | print("<br />"); | ||
+ | |||
+ | $rs=mysql_query("SELECT pname,cate,basyo,memo FROM pok_yotei_tab where pdate = '$dteTmp' order by btime",$db); | ||
+ | if(mysql_num_rows($rs)>0){ | ||
+ | while($aryCol=mysql_fetch_array($rs,MYSQL_ASSOC)){ | ||
+ | $yotei=($aryCol[pname]); | ||
+ | $zoku=($aryCol[cate]); | ||
+ | $basyo=('('.$aryCol[basyo].')'); | ||
+ | //$sesyu=(' 施主:'.$aryCol[memo]); | ||
+ | print("<font size=1>・$zoku$yotei$basyo</font></a><br>"); | ||
+ | |||
+ | } | ||
+ | mysql_free_result($rs); | ||
+ | } | ||
+ | print("</td>"); | ||
+ | if($i % 7==0){print("</tr><tr>");} | ||
+ | } | ||
+ | } | ||
+ | print("</table>"); | ||
+ | |||
+ | |||
+ | print("</form>"); | ||
</php> | </php> | ||
+ | |||
+ | |||
+ | *[[family:命のつながり|命のつながり]] | ||
+ | |||
+ | *[[Media:棚経予定表.xls|秋彼岸予定表]] |
2008年3月7日 (金) 16:12時点における版
<php> include_once("./includes/rokuyou.inc");
print("<form>");
if(isset($_GET['num'])){ $dteDate=mktime(0,0,0,date("m")+$_GET['num'],1,date("Y")); $num=$_GET['num']; }else{ $dteDate=mktime(0,0,0,date("3"),1,date("2008")); $num=0; } $intFirst=(int)date("w",$dteDate); $intLast=(int)date("t",$dteDate);
print("print(date("Y 年 m 月",$dteDate)."の予定");
print("日 | 月 | 火 | 水 | 木 | 金 | 土 | "); print("
---|---|---|---|---|---|---|
"); }else{ print(" | ");
} }elseif($i % 7==1){ if($dteTmp == date("Y-m-d")){ print(" | "); }else{ print(" | ");
} }else{ if($dteTmp == date("Y-m-d")){ print(" | "); }else{ print(" | ");
} } print($intDay);
if (get_rokuyou(date("Y",$dteDate),date("m",$dteDate),$intDay) == 3) {
print ("友引");
}
print(" $rs=mysql_query("SELECT pname,cate,basyo,memo FROM pok_yotei_tab where pdate = '$dteTmp' order by btime",$db); if(mysql_num_rows($rs)>0){ while($aryCol=mysql_fetch_array($rs,MYSQL_ASSOC)){ $yotei=($aryCol[pname]); $zoku=($aryCol[cate]); $basyo=('('.$aryCol[basyo].')'); //$sesyu=(' 施主:'.$aryCol[memo]); print("・$zoku$yotei$basyo</a> } mysql_free_result($rs); } print(" | ");
if($i % 7==0){print("|
if(isset($_GET['num'])){ $dteDate=mktime(0,0,0,date("m")+$_GET['num'],1,date("Y")); $num=$_GET['num']; }else{ $dteDate=mktime(0,0,0,date("4"),1,date("2008")); $num=0; } $intFirst=(int)date("w",$dteDate); $intLast=(int)date("t",$dteDate);
print("print(date("Y 年 m 月",$dteDate)."の予定");
print("日 | 月 | 火 | 水 | 木 | 金 | 土 | "); print("
---|---|---|---|---|---|---|
"); }else{ print(" | ");
} }elseif($i % 7==1){ if($dteTmp == date("Y-m-d")){ print(" | "); }else{ print(" | ");
} }else{ if($dteTmp == date("Y-m-d")){ print(" | "); }else{ print(" | ");
} } print($intDay);
if (get_rokuyou(date("Y",$dteDate),date("m",$dteDate),$intDay) == 3) {
print ("友引");
}
print(" $rs=mysql_query("SELECT pname,cate,basyo,memo FROM pok_yotei_tab where pdate = '$dteTmp' order by btime",$db); if(mysql_num_rows($rs)>0){ while($aryCol=mysql_fetch_array($rs,MYSQL_ASSOC)){ $yotei=($aryCol[pname]); $zoku=($aryCol[cate]); $basyo=('('.$aryCol[basyo].')'); //$sesyu=(' 施主:'.$aryCol[memo]); print("・$zoku$yotei$basyo</a> } mysql_free_result($rs); } print(" | ");
if($i % 7==0){print("|
print("</form>");
</php>