|
|
(同じ利用者による、間の29版が非表示) |
1行目: |
1行目: |
− | <php>
| + | [http://pokpok.jp/cgi-bin/awstats.pl アクセス解析] |
− | include_once("./includes/rokuyou.inc");
| + | |
| | | |
− | print("<form method=GET action=");
| + | *[[family:法話ノート|法話ノート]] |
− | print $_SERVER['PHP_SELF'];
| + | *[[family:挨拶|挨拶]] |
− | print("family:month");
| + | *[[family:命のつながり|命のつながり]] |
− | print(">");
| + | |
| | | |
− | if(isset($_GET['num'])){
| + | *[[Media:棚経予定表.xls|秋彼岸予定表]] |
− | $dteDate=mktime(0,0,0,date("m")+$_GET['num'],1,date("Y"));
| + | |
− | $num=$_GET['num'];
| + | |
− | }else{
| + | |
− | $dteDate=mktime(0,0,0,date("m"),1,date("Y"));
| + | |
− | $num=0;
| + | |
− | }
| + | |
− | $intFirst=(int)date("w",$dteDate);
| + | |
− | $intLast=(int)date("t",$dteDate);
| + | |
− | | + | |
− | print("<font face='Arial Black'>");
| + | |
− | print(date("Y 年 m 月",$dteDate)."の予定");
| + | |
− | print("</font>");
| + | |
− | print("<br />");
| + | |
− | print("<table border=1 align=left 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 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]);
| + | |
− | print("<font size=1>・$yotei</font></a><br>");
| + | |
− | | + | |
− | }
| + | |
− | mysql_free_result($rs);
| + | |
− | }
| + | |
− | print("</td>");
| + | |
− | if($i % 7==0){print("</tr><tr>");}
| + | |
− | }
| + | |
− | }
| + | |
− | print("</table>");
| + | |
− | | + | |
− | print("<a href=./family:month?num=");
| + | |
− | print($num-1);
| + | |
− | print(">前の月へ</a>");
| + | |
− | print("<a href=./family:month?num=");
| + | |
− | print($num+1);
| + | |
− | print(">次の月へ</a>");
| + | |
− | print("</form>");
| + | |
− | </php>
| + | |