HOME
本物
<非公式>2007全日本選手権女子
なんちゃってオンラインリザルト
会場で聞き取った点数を入力して表示するだけです。
突貫工事の為更新の度にデータベースを読みに行くのでF5アタックは控えめにお願いします。。。
(240秒間隔で自動更新します)
初の試みなのでうまくいかなかったらごめんなさい。
$PATH = "";
include_once($PATH."common.php");
$cmn = new cmn();
$cmn->dbConnect(); //DB接続
$query = "select count(*) as COUNT from MAIN where Total > 0";
$result = mysqli_query($cmn->db, $query);
$row=mysqli_fetch_array($result);
$count = $row["COUNT"];
if ($count > 0) {
$query = "select * from MAIN where Total>0 order by Total Desc,TSS Desc";
$result = mysqli_query($cmn->db, $query);
print "";
print "Pl. | Name | SP | TSS = | TES + | PCS + | Ded - | Total | StN. |
";
$cnt = 1;
$cls = 1;
while( $row = mysqli_fetch_array($result) ) {
if ($row["StN"] == $count) {
$cls = 0;
} else {
if ($cnt%2 == 0) {
$cls = 2;
} else {
$cls = 1;
}
}
print "".$cnt." | ".$row["Name"]." | ".$row["SP"]." | ".$row["TSS"]." | ".$row["TES"]." | ".$row["PCS"]." | ".$row["Ded"]." | ".$row["Total"]." | #".$row["StN"]." |
";
// if ($cls == 1){
// $cls = 2;
// } else {
// $cls = 1;
// }
$cnt+= 1;
}
print "
";
}
//未滑走
$query = "select count(*) as COUNT from MAIN where Total = 0";
$result = mysqli_query($cmn->db, $query);
$row=mysqli_fetch_array($result);
$count = $row["COUNT"];
if ($count > 0) {
$query = "select * from MAIN where Total=0 order by StN";
$result = mysqli_query($cmn->db, $query);
print "";
print "12/28(金) 15:10〜19:15";
print "StN. | Name | Club | Pl. | SP |
";
$cnt = 1;
while( $row = mysqli_fetch_array($result) ) {
if (($row["StN"]-1)%6==0) {
print " | Warm-Up Group ".(floor(($row["StN"] / 6))+1)." | | | |
";
}
if ($cnt%2 == 0) {
$cls = 2;
} else {
$cls = 1;
}
print "".$row["StN"]." | ".$row["Name"]." | ".$row["Club"]." | ".$row["Pl"]." | ".$row["SP"]." |
";
$cnt += 1;
}
print "
";
}
$cmn->dbClose();
?>