コード例 #1
0
function Show_pointTable($atts)
{
    $htmlCode = "";
    $atts = shortcode_atts(array('tid' => "No", 'group' => '0'), $atts, 'a3n_matches');
    if ($atts['tid'] === 'No') {
        return "Please provide tournament Id. To get the tournament ID go to the 'A3N Cricket Management' page of the dashboard.";
    }
    $standings = getPointTablesForPage($atts['tid'], $atts['group']);
    //return var_dump($standings);
    $htmlCode .= "" . " <table>" . "     <thead>" . "         <tr>" . "             <td width='5%'>Pos</td>" . "             <td width='25%'>Team</td>" . "             <td width='5%'>P</td>" . "             <td width='5%'>W</td>" . "             <td width='5%'>L</td>" . "             <td width='5%'>N/R</td>" . "             <td width='5%'>Point</td>" . "             <td width='15%'>NRR</td>" . "             <td width='15%'>For</td>" . "             <td width='15%'>Against</td>" . "         </tr>" . "     </thead>" . "     <tbody>";
    foreach ($standings as $row) {
        $htmlCode .= "" . "         <tr>" . "             <td>{$row->position}</td> " . "             <td>{$row->team_name}</td> " . "             <td>{$row->match_played}</td> " . "             <td>{$row->win}</td> " . "             <td>{$row->lost}</td> " . "             <td>{$row->tie_NR}</td> " . "             <td>{$row->point}</td> " . "             <td>{$row->nrr}</td> " . "             <td>{$row->runs_for}/{$row->overs_for}</td> " . "             <td>{$row->runs_against}/{$row->overs_against}</td> " . "         </tr>";
    }
    $htmlCode .= "" . "     </tbody>" . "</table>";
    $htmlCode .= "<h6 class='subheader' style='float:right'><small>Plugins created by: <a href='http://armannadim.com/'>Arman Nadim</a></small></h6>";
    return $htmlCode;
}
コード例 #2
0
                    <th>L</th>
                    <th>T/NR</th>
                    <th>Points</th>
                    <th>NRR</th>
                    <th>For Runs</th>
                    <th>For Overs</th>
                    <th>Against Runs</th> 
                    <th>Against Overs</th> 
                </tr>
            </tfoot>
            <?php 
//Modified in - Version 1.1.1
if (isset($_POST['tId'])) {
    $pt = getPointTablesForPage($_POST['tId']);
} else {
    $pt = getPointTablesForPage(null, null, date("Y"));
}
foreach ($pt as $row) {
    ?>
                <tr id="<?php 
    echo $row->id;
    ?>
">
                    <td><?php 
    echo $row->tournament;
    ?>
</td>
                    <td><?php 
    echo $row->_group;
    ?>
</td>