diff --git a/README.md b/README.md
index e97aa77..88b9b12 100755
--- a/README.md
+++ b/README.md
@@ -1,3 +1,2 @@
# ritzenbergenapi
-
API für ritzenbergen.de
diff --git a/bulitipp/buli-punkte.php b/bulitipp/buli-punkte.php
index 12cc98f..7e3b7cd 100755
--- a/bulitipp/buli-punkte.php
+++ b/bulitipp/buli-punkte.php
@@ -1,16 +1,141 @@
+
+
+
+
+
+ BuLi-Punkte
+
+
+
+
- $value) {
- $id = $value[0];
- $score1 = $value[1];
- $score2 = $value[2];
- $tipp = getTipp($name, $spieltag, $id);
- $paarungQuery = srowforeach("SELECT heim, gast from `buli-paarungen` where id=?;", [$id])[0];
- $heim = $paarungQuery[0];
- $gast = $paarungQuery[1];
- $punkte = ps($name, $spieltag, $id);
- $result[]=["id"=>$id,"result"=>[$score1,$score2],"tipp"=>$tipp,"heim"=>$heim,"gast"=>$gast,"punkte"=>$punkte];
-}
+
+ Detailansicht, . Spieltag
+ -
+ -
+
+
+ | Name |
+ Tipp |
+ Punkte |
+ Gesamtpunkte |
+
+ $value) {
+ $name=$value[0];
+ $punkte=ps($name,$spieltag,$paarungid);
+ $gesamtpunkte=gs($name,$spieltag);
+ $tipp=getTipp($name,$spieltag,$paarungid);
+ $tippstr=($tipp==null)?"-":$tipp[0]." - ".$tipp[1];
+ ?>
+
+
+ |
+ |
+ |
+ |
+
+
+
+
+
+ Detailansicht für , . Spieltag
+
+
+ | Tipp von |
+ Ergebnis |
+ Tipp |
+ Punkte |
+
+ $value){
+ $id=$value[0];
+ $score1=$value[1];
+ $score2=$value[2];
+ $tipp=getTipp($name,$spieltag,$id);
+ $paarungQuery=srowforeach("SELECT heim, gast from `buli-paarungen` where id=?;",[$id])[0];
+ $heim=$paarungQuery[0];
+ $gast=$paarungQuery[1];
+ $punkte=ps($name,$spieltag,$id);
+ $tippstr=($tipp==null)?"-":$tipp[0]." - ".$tipp[1];
+ ?>
+
+ | - |
+ - |
+ |
+ |
+
+
+
+
+
+
+ Detailansicht für , . Spieltag
+
+
+ | Paarung |
+ Tipp von |
+
+ $value){
+ $id=$value[0];
+ $tipp=getTipp($name,$spieltag,$id);
+ $heim=$value[1];
+ $gast=$value[2];
+ $tippstr=($tipp==null)?"-":$tipp[0]." - ".$tipp[1];
+ ?>
+
+ | - |
+ |
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/bulitipp/check.php b/bulitipp/check.php
index 607f280..c6a46bd 100755
--- a/bulitipp/check.php
+++ b/bulitipp/check.php
@@ -65,9 +65,10 @@ if ($responseData!=null) {
}
-if($spieltag>=34){
$spieltag=getmaxspieltag()+1;
-if(srowforeach("SELECT COUNT(*) from `buli-results` where spieltag=?;",[$spieltag-1])[0][0]<9) $spieltag--;
+
+if($spieltag<=34){
+
$response = file_get_contents("https://api.openligadb.de/getmatchdata/bl".$bundesliga."/".$year."/".$spieltag, false);
diff --git a/bulitipp/hatgetippt.php b/bulitipp/hatgetippt.php
index 1fcb5ea..f177063 100755
--- a/bulitipp/hatgetippt.php
+++ b/bulitipp/hatgetippt.php
@@ -12,6 +12,6 @@ if(count($userquery) == 0) die("User nicht gefunden");
$userid = $userquery[0][0];
-if(count(srowforeach("SELECT id FROM `buli-tipps` WHERE user = ? AND spieltag=?",[$userid,5])) == 0) echo "false";
+if(count(srowforeach("SELECT id FROM `buli-tipps` WHERE user = ? AND spieltag=?",[$userid,$spieltag])) == 0) echo "false";
else echo "true";
diff --git a/bulitipp/paarungen.php b/bulitipp/paarungen.php
index b0fecf8..9942843 100755
--- a/bulitipp/paarungen.php
+++ b/bulitipp/paarungen.php
@@ -7,8 +7,8 @@ if(!isset($_GET["spieltag"])) die("GET spieltag fehlt");
$spieltag=$_GET["spieltag"];
$data=[];
-foreach (srowforeach("SELECT `heim`,`gast` from `buli-paarungen` where `spieltag`=?;",[$spieltag]) as $key => $value) {
- array_push($data,[$value[0],$value[1]]);
+foreach (srowforeach("SELECT `heim`,`gast`, `id` from `buli-paarungen` where `spieltag`=?;",[$spieltag]) as $key => $value) {
+ array_push($data,[$value[0],$value[1],$value[2]]);
}
$result=["reload"=>$reload,"data"=>$data];
diff --git a/bulitipp/spieltag-user.php b/bulitipp/spieltag-user.php
new file mode 100755
index 0000000..9130a47
--- /dev/null
+++ b/bulitipp/spieltag-user.php
@@ -0,0 +1,28 @@
+$value){
+ $paarungsid = $value[0];
+ $tipp = getTipp($username, $spieltag, $paarungsid);
+ $result = getResult($paarungsid,$spieltag);
+ array_push($data, ["tipp"=>$tipp, "result"=> $result, "paarung"=>["id"=>$paarungsid, "heim"=>$value[1], "gast"=>$value[2]]]);
+}
+
+$result=["reload"=>$reload, "data"=>$data];
+echo json_encode($result, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);