open(0); $categoryArray = $categoryTable->getAllRecord(); $eventTable = new EventTable; $eventTable->open(0); $PAGEROW = 10; //ページング $conv1="euc-jp"; //変換後エンコード $conv2="euc-jp"; //変換前エンコード if (isset($_GET[category])){ $eventResult = $eventTable->findRows(1, $_GET[category],4); }elseif (isset($_GET[y])){ $eventResult = $eventTable->findRowsStr(4, 0, 4, $_GET[y], 4); }else{ $eventResult = $eventTable->getAllRecord(); } $eventResult1 = array(); $sess_flg; if (array_key_exists("username", $_SESSION)){ $sess_flg = true; }else{ $sess_flg = false; } if (isset($_GET[kid])){ $categoryResult = $categoryTable->findRowsLastColumn(8, $_GET[kid], 1); }else{ $categoryResult = $categoryTable->findRows(3, "1", 1); } //delete category flg = 0 and delete passwd_flg $prevNo = 0; $nextNo = 0; if(isset($_GET[event_no])){ $eventResult1 = $eventTable->findRow(0, $_GET[event_no]); //get prev and next event_no $tmp_eventResult = $eventResult; $i = 0; while($i < count($tmp_eventResult)){ if($_GET[event_no] == $tmp_eventResult[$i][0]){ if($i == 0){ $prevNo = 0; if(count($tmp_eventResult) - 1 > $i){ $nextNo = $tmp_eventResult[$i+1][0]; }else{ $nextNo = 0; } }else if(count($tmp_eventResult) - 1 == $i){ $prevNo = $tmp_eventResult[$i-1][0]; $nextNo = 0; }else{ $prevNo = $tmp_eventResult[$i-1][0]; $nextNo = $tmp_eventResult[$i+1][0]; } break; } $i++; } }else{ $i=0; while($i < count($eventResult)){ $j=0; $k=false; while($j < count($categoryResult)){ if($sess_flg){ if($eventResult[$i][1] == $categoryResult[$j][0]){ $k = true; break; } }else{ 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"; } ?> 賀茂ボールNEWS|東広島市のボウリング場 賀茂ボール window.location = \"".$page."\";"; } } } ?>