{"id":995,"date":"2012-11-08T20:40:56","date_gmt":"2012-11-08T11:40:56","guid":{"rendered":"http:\/\/inage.happystamp.jp\/?page_id=995"},"modified":"2013-01-22T17:03:19","modified_gmt":"2013-01-22T08:03:19","slug":"u-10%e3%80%80%e3%83%aa%e3%83%bc%e3%82%b0","status":"publish","type":"page","link":"http:\/\/inage.happystamp.jp\/?page_id=995","title":{"rendered":"U-10\u3000\u30ea\u30fc\u30b0"},"content":{"rendered":"<p><?php\n$cnt = 1;\n$num = 1;\n$goal[0]=0;\n$lost[0]=0;\n$total_point[0]=0;\n\n\n$list0 = \"<center>&#8220;;<\/p>\n<p>$conn = mysql_connect(&#8216;mysql31.heteml.jp&#8217;,&#8217;_inage2&#8242;,&#8217;tade2212&#8242;) or die(mysql_error());<br \/>\nmysql_select_db(&#8216;_inage2&#8217;) or die(mysql_error());<\/p>\n<p>\/\/ \u30c1\u30fc\u30e0\u540d\u53d6\u5f97<br \/>\n$sql = &#8220;select * from i_team order by i_team_id&#8221;;<br \/>\n$res = mysql_query($sql) or die(mysql_error());<br \/>\nwhile($row = mysql_fetch_assoc($res)){<br \/>\n\t$team_name[$num] = $row[i_team_name];<br \/>\n\t$num++;<br \/>\n}<\/p>\n<p>\/\/ \u30ea\u30f3\u30afID\u4f5c\u6210<br \/>\n$list5 .= &#8220;<\/p>\n<div style='padding-top:10px;padding-bottom:10px;'>&#8220;;<br \/>\n$list5 .= &#8220;<H1>\u3000\u30c1\u30fc\u30e0\u5225\u5bfe\u6226\u6210\u7e3e\u8868\u3000<\/h1>\n<p>&#8220;;<br \/>\n$list5 .= &#8220;<\/p>\n<table width=80% border='0'>&#8220;;<br \/>\n$list5 .= &#8220;<\/p>\n<tr>&#8220;;<br \/>\n$list5 .= &#8220;<\/p>\n<td style='text-align:center;border=0;'><a href='#1'>&#8220;.$team_name[1].&#8221;<\/a><\/td>\n<td style='text-align:center;border=0;'><a href='#2'>&#8220;.$team_name[2].&#8221;<\/a><\/td>\n<td style='text-align:center;border=0;'><a href='#3'>&#8220;.$team_name[3].&#8221;<\/a><\/td>\n<p>&#8220;;<br \/>\n$list5 .= &#8220;<\/tr>\n<p>&#8220;;<br \/>\n$list5 .= &#8220;<\/table>\n<\/div>\n<p>&#8220;;<\/p>\n<p>\/\/ \u30c1\u30fc\u30e0\u6570\u5206\u30eb\u30fc\u30d7<br \/>\nfor ($cnt = 1; $cnt <= 3; $cnt++) {\n\n\t$win[$cnt]=0;\n\t$lose[$cnt]=0;\n\t$draw[$cnt]=0;\n    \/\/ \u30c1\u30fc\u30e0\u3054\u3068\u306e\u5bfe\u6226\u6210\u7e3e\n\t$list5 .= \"\n\n<div style='padding-top:10px;' id='\".$cnt.\"'>&#8220;;<br \/>\n\t$list5 .= &#8220;<\/p>\n<h3>&#8220;.$team_name[$cnt].&#8221; \u5bfe\u6226\u6210\u7e3e<\/h3>\n<p>&#8220;;<br \/>\n\t$list5 .= &#8220;<\/p>\n<table width=80%>&#8220;;<br \/>\n\t$list5 .= &#8220;<\/p>\n<tr>&#8220;;<br \/>\n\t$list5 .= &#8220;<\/p>\n<td width=30% style='background:black;color:white;text-align:center;'>\u5bfe\u6226\u30c1\u30fc\u30e0<\/td>\n<p>&#8220;;<br \/>\n\t$list5 .= &#8220;<\/p>\n<td width=15% style='background:black;color:white;text-align:center;'>\u30b9\u30b3\u30a2<\/td>\n<p>&#8220;;<br \/>\n\t$list5 .= &#8220;<\/p>\n<td width=15% style='background:black;color:white;text-align:center;'>\u7d50\u679c<\/td>\n<p>&#8220;;<br \/>\n\t$list5 .= &#8220;<\/p>\n<td width=40% style='background:black;color:white;text-align:center;'>\u5bfe\u6226\u65e5<\/td>\n<p>&#8220;;<br \/>\n\t$list5 .= &#8220;<\/p>\n<tr>&#8220;;<\/p>\n<p>\t$sql = &#8220;select * from i_result where team_id = &#8220;.$cnt.&#8221; order by team_id,e_id,id;&#8221;;<br \/>\n\t$res = mysql_query($sql) or die(mysql_error());<br \/>\n\twhile($row = mysql_fetch_assoc($res)){<\/p>\n<p>\t\t\/\/\u9806\u4f4d\u7528\u96c6\u8a08<br \/>\n\t\t$goal[$cnt] = $goal[$cnt] + $row[goal];<br \/>\n\t\t$lost[$cnt] = $lost[$cnt] + $row[lost];<\/p>\n<p>\t\t\/\/ \u52dd\u3061\u70b9\u96c6\u8a08<br \/>\n\t        if( $row[result] == 1 ){<br \/>\n\t\t\t$mark_text =&#8221;\u25cb&#8221;;<br \/>\n\t\t\t$point = 3;<br \/>\n\t\t\t$win[$cnt]++;<br \/>\n\t\t}<br \/>\n\t        elseif( $row[result] == 2 ){<br \/>\n\t\t\t$mark_text =&#8221;\u25cf&#8221;;<br \/>\n\t\t\t$point = 0;<br \/>\n\t\t\t$lose[$cnt]++;<br \/>\n\t\t}<br \/>\n\t        else{<br \/>\n\t\t\t$mark_text =&#8221;\u25b3&#8221;;<br \/>\n\t\t\t$point = 1;<br \/>\n\t\t\t$draw[$cnt]++;<br \/>\n\t\t}<br \/>\n\t\t$total_point[$cnt] = $total_point[$cnt] + $point;<\/p>\n<p>\t\t$list5 .= &#8220;<\/p>\n<tr>&#8220;;<br \/>\n\t\t$list5 .= &#8220;<\/p>\n<td width=40%>&#8220;.$team_name[$row[&#8216;e_id&#8217;]].&#8221;<\/td>\n<td style='text-align:center;'>&#8220;.$row[&#8216;goal&#8217;].&#8221; &#8211; &#8220;.$row[&#8216;lost&#8217;].&#8221;<\/td>\n<td style='text-align:center;'>&#8220;.$mark_text.&#8221;<\/td>\n<td style='text-align:center;'>&#8220;.$row[&#8216;game_date&#8217;].&#8221;<\/td>\n<p>&#8220;;<br \/>\n\t\t$list5 .= &#8220;<\/tr>\n<p>&#8220;;<br \/>\n\t}<br \/>\n\t$list5 .= &#8220;<\/table>\n<p>&#8220;;<br \/>\n\t$list5 .= &#8220;<\/p><\/div>\n<p>&#8220;;<br \/>\n}<\/p>\n<p>\/\/\u3000\u9806\u4f4d\u30c7\u30fc\u30bf\u767b\u9332<br \/>\nfor($num =1;$num<=3;$num++){\n\t$sql = \"update i_rank set point = \".$total_point[$num].\", goal = \".$goal[$num].\",lost =  \".$lost[$num].\",sa = \".$goal[$num].\" - \".$lost[$num].\", win =  \".$win[$num].\",lose = \".$lose[$num].\",draw = \".$draw[$num].\",last_date = NOW() WHERE team_id =\".$num;\n\t$res = mysql_query($sql) or die(mysql_error());\n}\n\n\/\/ \u9806\u4f4d\u8868\u4f5c\u6210\n$list0 .= \"\n\n<div style='padding-top:10px;padding-bottom:10px;'>&#8220;;<br \/>\n$list0 .= &#8220;<H1>\u30002002\u5e74\u7d44\u30ea\u30fc\u30b0\uff08U-10\uff09\u3000\u9806\u4f4d\u8868\u3000<\/h1>\n<p>&#8220;;<br \/>\n$list0 .= &#8220;<\/p>\n<table width=80% border='0'>&#8220;;<br \/>\n$list0 .= &#8220;<\/p>\n<tr>&#8220;;<br \/>\n$list0 .= &#8220;<\/p>\n<td width=25% style='background:black;color:white;text-align:center;'>\u30c1\u30fc\u30e0\u540d<\/td>\n<p>&#8220;;<br \/>\n$list0 .= &#8220;<\/p>\n<td width=15% style='background:black;color:white;text-align:center;'>\u52dd\u70b9<\/td>\n<p>&#8220;;<br \/>\n$list0 .= &#8220;<\/p>\n<td width=10% style='background:black;color:white;text-align:center;'>\u52dd<\/td>\n<p>&#8220;;<br \/>\n$list0 .= &#8220;<\/p>\n<td width=10% style='background:black;color:white;text-align:center;'>\u8ca0<\/td>\n<p>&#8220;;<br \/>\n$list0 .= &#8220;<\/p>\n<td width=10% style='background:black;color:white;text-align:center;'>\u5206<\/td>\n<p>&#8220;;<br \/>\n$list0 .= &#8220;<\/p>\n<td width=10% style='background:black;color:white;text-align:center;'>\u5f97<\/td>\n<p>&#8220;;<br \/>\n$list0 .= &#8220;<\/p>\n<td width=10% style='background:black;color:white;text-align:center;'>\u5931<\/td>\n<p>&#8220;;<br \/>\n$list0 .= &#8220;<\/p>\n<td width=10% style='background:black;color:white;text-align:center;'>\u5dee<\/td>\n<p>&#8220;;<br \/>\n$list0 .= &#8220;<\/tr>\n<p>&#8220;;<\/p>\n<p>\/\/ \u9806\u4f4d\u30c7\u30fc\u30bf\u53d6\u5f97<br \/>\n$sql = &#8220;select * from i_rank order by POINT DESC , sa DESC , goal DESC &#8220;;<br \/>\n$res = mysql_query($sql) or die(mysql_error());<br \/>\nwhile($row = mysql_fetch_assoc($res)){<br \/>\n\t$list0 .= &#8220;<\/p>\n<tr>&#8220;;<br \/>\n\t$list0 .= &#8220;<\/p>\n<td width=25%>&#8220;.$team_name[$row[team_id]].&#8221;<\/td>\n<td style='text-align:center;'>&#8220;.$row[point].&#8221;<\/td>\n<p>&#8220;;<br \/>\n\t$list0 .= &#8220;<\/p>\n<td style='text-align:center;'>&#8220;.$row[win].&#8221;<\/td>\n<td style='text-align:center;'>&#8220;.$row[lose].&#8221;<\/td>\n<td style='text-align:center;'>&#8220;.$row[draw].&#8221;<\/td>\n<p>&#8220;;<br \/>\n\t$list0 .= &#8220;<\/p>\n<td style='text-align:center;'>&#8220;.$row[goal].&#8221;<\/td>\n<td style='text-align:center;'>&#8220;.$row[lost].&#8221;<\/td>\n<td style='text-align:center;'>&#8220;.$row[sa].&#8221;<\/td>\n<p>&#8220;;<br \/>\n\t$list0 .= &#8220;<\/tr>\n<p>&#8220;;<br \/>\n}<\/p>\n<p>$list0 .= &#8220;<\/table>\n<\/div>\n<hr>\n<p>&#8220;;<\/p>\n<p>\/\/\u3000\u30ea\u30fc\u30b0\u30e1\u30f3\u30d0\u8868<br \/>\n$list2 .= &#8220;<\/p>\n<div style='padding-top:10px;padding-bottom:10px;'>&#8220;;<br \/>\n$list2 .= &#8220;<H1>\u30002002\u5e74\u7d44\u30ea\u30fc\u30b0\uff08U-10\uff09\u30e1\u30f3\u30d0\u8868\u3000<\/h1>\n<p>&#8220;;<br \/>\n$list2 .= &#8220;<\/p>\n<table width=80% border='0'>&#8220;;<br \/>\n$list2 .= &#8220;<\/p>\n<tr>&#8220;;<br \/>\n$list2 .= &#8220;<\/p>\n<td width=25% style='background:black;color:white;text-align:center;'>\u30c1\u30fc\u30e0\u540d<\/td>\n<p>&#8220;;<br \/>\n$list2 .= &#8220;<\/p>\n<td width=75% style='background:black;color:white;text-align:center;'>\u30e1\u30f3\u30d0<\/td>\n<p>&#8220;;<br \/>\n$list2 .= &#8220;<\/tr>\n<p>&#8220;;<br \/>\n\/\/ Team A<br \/>\n$list2 .= &#8220;<\/p>\n<tr>&#8220;;<br \/>\n$list2 .= &#8220;<\/p>\n<td width=25%>&#8220;.$team_name[1].&#8221;<\/td>\n<p>&#8220;;<br \/>\n$list2 .= &#8220;<\/p>\n<td >\u30e4\u30de\u30c8 \u30fb \u30c8\u30e2\u30e4 \u30fb \u30cf\u30e4\u30c8 \u30fb \u30cf\u30eb\u30c8 \u30fb \u30b7\u30e7\u30a6 \u30fb \u30a2\u30aa\u30c8<\/td>\n<p>&#8220;;<br \/>\n$list2 .= &#8220;<\/tr>\n<p>&#8220;;<br \/>\n\/\/ Team B<br \/>\n$list2 .= &#8220;<\/p>\n<tr>&#8220;;<br \/>\n$list2 .= &#8220;<\/p>\n<td width=25%>&#8220;.$team_name[2].&#8221;<\/td>\n<p>&#8220;;<br \/>\n$list2 .= &#8220;<\/p>\n<td >\u30d2\u30ab\u30eb \u30fb \u30b1\u30f3\u30bf\u30ed\u30a6  \u30fb\u30c0\u30a4\u30ad \u30fb \u30bf\u30c4\u30ad  \u30fb\u30c1\u30b5\u30c8 \u30fb \u30ea\u30e7\u30a6\u30de \u30fb \u30e6\u30a6\u30de<\/td>\n<p>&#8220;;<br \/>\n$list2 .= &#8220;<\/tr>\n<p>&#8220;;<br \/>\n\/\/ Team C<br \/>\n$list2 .= &#8220;<\/p>\n<tr>&#8220;;<br \/>\n$list2 .= &#8220;<\/p>\n<td width=25%>&#8220;.$team_name[3].&#8221;<\/td>\n<p>&#8220;;<br \/>\n$list2 .= &#8220;<\/p>\n<td>\u30ca\u30aa\u30ad \u30fb \u30a2\u30ad\u30ce\u30ea \u30fb \u30b3\u30a6\u30ad  \u30fb\u30b3\u30a6\u30c1\u30e3\u30f3 \u30fb \u30ec\u30f3 \u30fb \u30e6\u30a6\u30ca \u30fb \u30b7\u30e5\u30f3\u30b9\u30b1<\/td>\n<p>&#8220;;<br \/>\n$list2 .= &#8220;<\/tr>\n<p>&#8220;;<br \/>\n$list2 .= &#8220;<\/table>\n<\/div>\n<hr>\n<p>&#8220;;<\/p>\n<p>$list10 .= &#8220;<\/center>&#8220;;<\/p>\n<p>echo $list0;<br \/>\necho $list2;<br \/>\necho $list5;<br \/>\necho $list10;<\/p>\n<p>?><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/inage.happystamp.jp\/index.php?rest_route=\/wp\/v2\/pages\/995"}],"collection":[{"href":"http:\/\/inage.happystamp.jp\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/inage.happystamp.jp\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/inage.happystamp.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/inage.happystamp.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=995"}],"version-history":[{"count":49,"href":"http:\/\/inage.happystamp.jp\/index.php?rest_route=\/wp\/v2\/pages\/995\/revisions"}],"predecessor-version":[{"id":1450,"href":"http:\/\/inage.happystamp.jp\/index.php?rest_route=\/wp\/v2\/pages\/995\/revisions\/1450"}],"wp:attachment":[{"href":"http:\/\/inage.happystamp.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}