「:Note」の版間の差分

提供: wikipokpok
移動先: 案内検索
1行目: 1行目:
 
<php>
 
<php>
 
include_once("./includes/rokuyou.inc");
 
include_once("./includes/rokuyou.inc");
 +
 +
print("<form target=_self>");
 +
print("<input type=text name=year size=7 MAXLENGTH=4 value=");
 +
print date("Y");
 +
print(">年");
 +
print("<input type=text name=year size=2 value=");
 +
print date("n");
 +
print(">月");
 +
print("</form>");
 +
  
 
if(isset($_GET['num'])){
 
if(isset($_GET['num'])){
6行目: 16行目:
 
$num=$_GET['num'];
 
$num=$_GET['num'];
 
}else{
 
}else{
$dteDate=mktime(0,0,0,date("m"),1,date("Y"));
+
$dteDate=mktime(0,0,0,9,1,2007);
 
$num=0;
 
$num=0;
 
}
 
}
76行目: 86行目:
 
print($num+1);
 
print($num+1);
 
print(">次の月へ</a>");
 
print(">次の月へ</a>");
 +
print $intFirst . "-" . $intLast;
 
</php>
 
</php>

2007年8月30日 (木) 16:49時点における版

<php> include_once("./includes/rokuyou.inc");

print("<form target=_self>"); print("<input type=text name=year size=7 MAXLENGTH=4 value="); print date("Y"); print(">年"); print("<input type=text name=year size=2 value="); print date("n"); print(">月"); 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,9,1,2007); $num=0; } $intFirst=(int)date("w",$dteDate); $intLast=(int)date("t",$dteDate);

print(""); print(date("Y 年 m 月",$dteDate)."の予定"); print(""); print("
");

print(""); print(""); print(""); print(""); print(""); $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("");

}else{ if($i % 7==0){ if($dteTmp == date("Y-m-d")){

print(""); if($i % 7==0){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 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("・$yotei</a>
");

} mysql_free_result($rs); }

print("
");

print("<a href=./family:month?num="); print($num-1); print(">前の月へ</a>"); print("<a href=./family:month?num="); print($num+1); print(">次の月へ</a>"); print $intFirst . "-" . $intLast; </php>