Fix File
•
/
home
/
sportsfe...
/
.trash
•
File:
middleside.php
•
Content:
<style> .left, .right { width: 50%; background-color: black; height: 5vmin; font-size: 2vmin; color: white; } /* Clear floats after the columns */ .row:after { content: ""; display: table; clear: both; } </style> <div class="column middle" style="width:40%;height: 90%;background:red;border-radius: 1vmax 1vmax 1vmax 1vmax;"> <div style="font-size: 3vmin;font-weight: bold;height: 4vmin;margin-top: -1vmin;color:white;" align="left">THIS OVER (<?php echo $LTdecoded->{"data"}->{"values"}->{"overs"}; ?>)</div> <table style="width:100%;color:white;"> <tr style="height:4vmin;"> <td style="width:85%;background:#000000;padding-left:1vmin;font-size: 3vmin;"> <?php if (isset($LTdecoded->{"data"}->{"balls"})) { $ballsArray = array(); $ballsArray = $LTdecoded->{"data"}->{"balls"}; $rundisplayed = ""; for ($i = 0; $i < count($ballsArray); $i++) { $newball = $LTdecoded->{"data"}->{"balls"}[$i]; if ($newball == ".") { $newball = "0"; } else { $newball = $LTdecoded->{"data"}->{"balls"}[$i]; } $rundisplayed = $rundisplayed . " " . $newball; } echo $rundisplayed; } ?> </td> <td style="width: 15%;font-size: 4vmin;font-family: inherit;color: white;font-weight: bold;" align="center"> <?php echo end($decoded2->{"overMap"})->{"runs"}; ?> </td> </tr> </table> <table style="width:100%;color:white;text-align: center;" align="center"> <tr style="height:4vmin;font-size: 2.5vmin;font-family: inherit;"> <td colspan="4" style="width:25%;background:#000000;"> PREVIOUS OVER </td> <td colspan="4" style="width:25%;background:#000000;"> <?php if (!empty($decoded->{"data"}->{"innings4"}->{"bowling"})) { $value = array_keys((array)$balldecoded->{"data"}->{"innings4Balls"}->{"oversMap"}); while (count($value) > 2) { array_shift($value); } $balls = $balldecoded->{"data"}->{"innings4Balls"}->{"oversMap"}->{$value[0]}; } else if (!empty($decoded->{"data"}->{"innings3"}->{"bowling"})) { $value = array_keys((array)$balldecoded->{"data"}->{"innings3Balls"}->{"oversMap"}); while (count($value) > 2) { array_shift($value); } $balls = $balldecoded->{"data"}->{"innings3Balls"}->{"oversMap"}->{$value[0]}; } else if (!empty($decoded->{"data"}->{"innings2"}->{"bowling"})) { $value = array_keys((array)$balldecoded->{"data"}->{"innings2Balls"}->{"oversMap"}); while (count($value) > 2) { array_shift($value); } $balls = $balldecoded->{"data"}->{"innings2Balls"}->{"oversMap"}->{$value[0]}; } else if (!empty($decoded->{"data"}->{"innings1"}->{"bowling"})) { $value = array_keys((array)$balldecoded->{"data"}->{"innings1Balls"}->{"oversMap"}); while (count($value) > 2) { array_shift($value); } $balls = $balldecoded->{"data"}->{"innings1Balls"}->{"oversMap"}->{$value[0]}; } $prevruns = ""; if (!empty($balls)) { for ($i = count($balls->{"balls"}) - 1; $i >= 0; $i--) { if ($balls->{"balls"}[$i]->{"ballType"} != "Auto Comment Ball") { if ($balls->{"balls"}[$i]->{"runsDisplay"} == ".") { $prevruns = $prevruns . " " . "0"; } else { $prevruns = $prevruns . " " . $balls->{"balls"}[$i]->{"runsDisplay"}; } } } } echo $prevruns; ?> </td> </tr> <tr style="height:4vmin;font-size: 2.5vmin;font-family: inherit;"> <td colspan="4" style="width:25%;background:#000000;"> LAST BOUNDARY </td> <td colspan="4" style="width:25%;background:#000000;font-size:2vmin;"> <?php $team1string = ""; $team2string = ""; if (!empty($decoded->{"data"}->{"innings2"}->{"bowling"})) { $testing2array = array(); foreach (@$balldecoded->{"data"}->{"innings2Balls"}->{"oversMap"} as $key => $value) { array_push($testing2array, $key); } $count2 = 0; for ($i = 0; $i < count($testing2array); $i++) { foreach (array_reverse($balldecoded->{"data"}->{"innings2Balls"}->{"oversMap"}->{$testing2array[$i]}->{"balls"}) as $value) { if ($value->{"ballType"} !== "Auto Comment Ball" && $value->{"ballType"} !== "Wide" && $value->{"ballType"} !== "Leg Bye" && $value->{"ballType"} !== "Bye" && $value->{"ballType"} !== "No Ball" && $value->{"ballType"} !== "No Ball of Bat") { if ($value->{"runsDisplay"} === "4" || $value->{"runsDisplay"} === "6") { $count2 = 0; } else { $count2++; } } } } $team2string = $count2 . " BALLS"; echo $team2string; } else if (!empty($decoded->{"data"}->{"innings1"}->{"bowling"})) { $testing1array = array(); foreach ($balldecoded->{"data"}->{"innings1Balls"}->{"oversMap"} as $key => $value) { array_push($testing1array, $key); } $count1 = 0; for ($i = 0; $i < count($testing1array); $i++) { foreach (array_reverse($balldecoded->{"data"}->{"innings1Balls"}->{"oversMap"}->{$testing1array[$i]}->{"balls"}) as $key => $value) { if ($value->{"ballType"} !== "Auto Comment Ball" && $value->{"ballType"} !== "Wide" && $value->{"ballType"} !== "Leg Bye" && $value->{"ballType"} !== "Bye" && $value->{"ballType"} !== "No Ball" && $value->{"ballType"} !== "No Ball of Bat") { if ($value->{"runsDisplay"} === "4" || $value->{"runsDisplay"} === "6") { $count1 = 0; } else { $count1++; } } } } $team1string = $count1 . " BALLS"; echo $team1string; } ?> </td> </tr> <tr style="height:4vmin;font-size: 2.5vmin;font-family: inherit;"> <td colspan="2" style="width:25%;background:#000000;"> INN FOURS </td> <td colspan="2" style="width:25%;background:#000000;"> <?php $fours1 = 0; $fours2 = 0; for ($i = 0; $i < 11; $i++) { $fours1 += @$decoded->{"data"}->{"innings1"}->{"batting"}[$i]->{"fours"}; $fours2 += @$decoded->{"data"}->{"innings2"}->{"batting"}[$i]->{"fours"}; } if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} == "true") { echo $fours2; } else if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} == "false") { echo $fours1; } ?> </td> <td colspan="2" style="width:25%;background:#000000;"> INN SIXES </td> <td colspan="2" style="width:25%;background:#000000;"> <?php $sixers1 = 0; $sixers2 = 0; for ($i = 0; $i < 11; $i++) { $sixers1 += @$decoded->{"data"}->{"innings1"}->{"batting"}[$i]->{"sixers"}; $sixers2 += @$decoded->{"data"}->{"innings2"}->{"batting"}[$i]->{"sixers"}; } if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} == "true") { echo $sixers2; } else if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} == "false") { echo $sixers1; } // echo empty($decoded->{"data"}->{"innings3"}->{"batting"}) ? $sixers1 + $sixers2 : $sixers1_1 + $sixers2_2; ?> </td> </tr> <tr style="height:4vmin;font-size: 2.5vmin;font-family: inherit;"> <td style="width:12.5%;background:#000000;"> DOTS </td> <td style="width:12.5%;background:#000000;"> <?php if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} === "true") { echo $count2dot; } else if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} === "false") { echo $countdot; } ?> </td> <td style="width:12.5%;background:#000000;"> ONES </td> <td style="width:12.5%;background:#000000;"> <?php if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} === "true") { echo $count2one; } else if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} === "false") { echo $countone; } ?> </td> <td style="width:12.5%;background:#000000;"> TWOS </td> <td style="width:12.5%;background:#000000;"> <?php if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} === "true") { echo $count2two; } else if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} === "false") { echo $counttwo; } ?> </td> <td style="width:12.5%;background:#000000;"> THREES </td> <td style="width:12.5%;background:#000000;"> <?php if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} === "true") { echo $count2three; } else if ($LTdecoded->{"data"}->{"values"}->{"isSecondInningsStarted"} === "false") { echo $countthree; } ?> </td> </tr> </table> </div>
•
Search:
•
Replace:
Function
Edit by line
Download
Information
Rename
Copy
Move
Delete
Chmod
List