if ($result_of_query->num_rows > 0) {
    $house = $result_of_query->fetch_object();
    ?>
<div class="col-md-4" style="float:left;  padding-top:20px;">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h2 class="panel-title"><i
                    class="fa fa-child fa-fw"></i><?php 
    echo nameID($house->pid, $db_link) . "'s " . $lang['house'];
    ?>
            </h2>
        </div>
        <div class="panel-body">
            <?php 
    echo '<center><img class="img-responsive" src="' . $settings['url'] . 'assets/img/house/1.jpg"/>';
    echo "<h4>" . $lang['owner'] . ": <a href='" . $settings['url'] . "editPlayer/" . uID($house->pid, $db_link) . "'>" . nameID($house->pid, $db_link) . "</a></h4>";
    echo "<h4>" . $lang['position'] . ": " . $house->pos . "</h4>";
    if ($_SESSION['permissions']['edit']['houses']) {
        echo '
                <div style="float: right;">
                    <a data-toggle="modal" href="#edit_house" class="btn btn-primary btn-xs" style="margin-right:3px">
                        <i class="fa fa-pencil"></i>
                    </a>
                    <a data-toggle="modal" href="#del_house" class="btn btn-danger btn-xs" style="margin-right:3px">
                        <i class="fa fa-exclamation-triangle"></i>
                    </a>
                </div>';
    }
    echo "</center>";
    ?>
        </div>
Example #2
0
                        <?php 
    if ($_SESSION['permissions']['edit']['player']) {
        echo '<th><i class="fa fa-pencil"></i> ' . $lang['edit'] . '</th>';
    }
    ?>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
    while ($row = mysqli_fetch_assoc($result_of_query)) {
        echo "<tr>";
        echo "<td>" . $row["name"] . "</td>";
        echo "<td>" . $row["playerid"] . "</td>";
        echo "<td>" . $row["coplevel"] . "</td>";
        if ($_SESSION['permissions']['edit']['player']) {
            echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . uID($row["uid"], $db_link) . "'>";
            echo "<i class='fa fa-pencil'></i></a></td>";
        }
        echo "</tr>";
    }
    echo "</tbody></table>";
    $sql = "SELECT * FROM `players` WHERE `coplevel` >= '1';";
    $result_of_query = $db_link->query($sql);
    $total_records = mysqli_num_rows($result_of_query);
    $total_pages = ceil($total_records / $_SESSION['items']);
    if ($total_pages > 1) {
        echo "<center><a class='btn btn-primary' href='" . $settings['url'] . "police/1'>" . $lang['first'] . "</a> ";
        ?>
						<div class="btn-group">
							<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
								<?php