上野毛道場入賞者

上野毛道場入賞者

2016年6月19日

$row[0] ,’tournament’=>$row[1], ‘place’=>$row[2], ‘fdate’=>$row[3], ‘tdate’=>$row[4] ,’category’=>$row[5], ‘result’=>$row[6], ‘player’=>$row[7] , ‘dojo’=>$row[8] );
}
fclose($file);

// 列方向の配列を得る
// $no,$tournament,$place,$fdate,$tdate,$category,$result,$player,$dojo
foreach ($data as $key => $row) {
$no[$key] = $row[‘no’];
$tournament[$key] = $row[‘tournament’];
$place[$key] = $row[‘place’];
$fdate[$key] = $row[‘fdate’];
$tdate[$key] = $row[‘tdate’];
$category[$key] = $row[‘category’];
$result[$key] = $row[‘result’];
$player[$key] = $row[‘player’];
$dojo[$key] = $row[‘dojo’];
}

// データを 日付の降順にソートする
array_multisort($fdate, SORT_DESC, $tdate, SORT_DESC, $tournament, SORT_ASC, $category, SORT_ASC, $result, SORT_ASC, $no, SORT_DESC, $place, SORT_ASC, $player, SORT_ASC, $dojo, SORT_ASC, $data);

// 結果の表示
echo”

\n”;

$ii=0;
for( $i=0 ; $i \n”;
echo”

●”.$old_tournament.”/”.$old_place.” “.$date.” 入賞者 “.$cnt.” 名

\n”;
echo” \n”;
echo $prizewinner;
$cnt=0;
$ii++;
$prizewinner = “”;
}

$fyy = substr($fdate[$i], 0, 4);
$fmm = substr($fdate[$i], 4, 2);
$fdd = substr($fdate[$i], 6, 2);
$tyy = substr($tdate[$i], 0, 4);
$tmm = substr($tdate[$i], 4, 2);
$tdd = substr($tdate[$i], 6, 2);
if (($old_fyy !=””) && ($old_fyy !=$fyy)) {
break;
}

if (isset($_POST{‘select_y’})) {
$w_yy = $_POST{‘select_y’};
} elseif ($old_fyy == “”) {
$w_yy = $fyy;
}

$_POST{‘select_b’} = “上野毛”;

if ($_POST{‘select_b’} ==”all”) {
$w_dojo = “all”;
} else {
$w_dojo = $dojo[$i];
}

if (($w_yy == $fyy) && (($_POST{‘select_b’} == “”) || (is_numeric(mb_strrpos($w_dojo, $_POST{‘select_b’}))))) {

$cnt++;

if (!$tdate[$i]){
$date = $fyy.”/”.$fmm.”/”.$fdd;
}else{
$date = $fyy.”/”.$fmm.”/”.$fdd.”〜”.$tdd;
}

if ($cnt % 2 == 0) {
$bgcolor = “#FFDDFF”;
}else{
$bgcolor = “#FFFFCC”;
}

if ($result[$i] == 1) { $w_result = “優勝”;}
elseif ($result[$i] == 2) { $w_result = “準優勝”;}
elseif ($result[$i] == 3) { $w_result = “第3位”;}
elseif ($result[$i] == 4) { $w_result = “第4位”;}
elseif ($result[$i] == 9) { $w_result = “勝利者賞”;}
elseif ($result[$i] == 10) { $w_result = “ベスト8”;}
elseif ($result[$i] == 5) { $w_result = “第5位”;}
elseif ($result[$i] == 6) { $w_result = “第6位”;}
elseif ($result[$i] == 7) { $w_result = “第7位”;}
elseif ($result[$i] == 8) { $w_result = “第8位”;}

$prizewinner .= ”

“.$category[$i].”  “.$w_result.”  “.$player[$i].” 

\n”;

$old_tournament = $tournament[$i];
$old_fdate = $fdate[$i];
$old_place = $place[$i];
$old_fyy = $fyy;

if ($i == (count( $data )-1)) {
echo” \n”;
echo”

●”.$old_tournament.”/”.$old_place.” “.$date.” 入賞者 “.$cnt.” 名

\n”;
echo” \n”;
echo $prizewinner;
$ii++;
}
}
}
echo”

\n”;
if ($ii== 0) {
echo”

― 本年度の入賞者はまだいません。 ―
\n”;
}

echo <<<_HTML_

年  


_HTML_;
?>