open(0); $eventTable = new EventTable; $eventTable->open(0); session_start(); ?> 賀茂ボールNEWS getAllRecord(); $eventResult1 = array(); if(isset($_GET[tik])){ $s = $_GET[tik]; if($s==1 || $s==2){ $categoryResult = $categoryTable->findRowsLastColumn(8, "$s", 1); }else{ $categoryResult = $categoryTable->findRows(3, "1", 1); } }else{ $categoryResult = $categoryTable->findRows(3, "1", 1); } //delete category flg = 0 and delete passwd_flg $i=0; while($i < count($eventResult)){ $j=0; $k=false; while($j < count($categoryResult)){ if($eventResult[$i][1] == $categoryResult[$j][0] && $categoryResult[$j][4] == "1"){ $k = true; break; } $j++; } if($k){ array_push($eventResult1, $eventResult[$i]); } $i++; } $yResult = $eventTable->findRowsStrDist(4, 0, 4, true); function getCategoryName($no, $categoryResult){ $i=0; while($i < count($categoryResult)){ if($no == $categoryResult[$i][0]){ return $categoryResult[$i][2]; } $i++; } return "null"; } function getCategoryColor($no, $categoryResult){ $i=0; while($i < count($categoryResult)){ if($no == $categoryResult[$i][0]){ if($categoryResult[$i][5] < 10){ return "0" . $categoryResult[$i][5]; }else{ return $categoryResult[$i][5]; } } $i++; } return "01"; } $i=0; $date2 = substr(date('Y-m-d H:i:s',mktime(date('H'), date('i'), date('s'), date('m'), date('d')-7, date('Y'))), 0, 19); while($i $date2){ $new = 1; } if($record[6] == ""){ $url = "event.php?event_no=" . $record[0]; }else{ $url = $record[6]; } echo "

". substr($record[4],0,4) . "年" . substr($record[4],5,2) . "月" . substr($record[4],8,2) . "日"; echo "" . getCategoryName($record[1], $categoryResult) . "

"; if($new == 1){ echo "

" . $record[2] . ""; }else{ echo "

" . $record[2] . ""; } echo "


"; echo "
"; } ?>