Exemplo n.º 1
0
?>
</th>
                <?php 
if ($_SESSION['user_level'] >= $_SESSION['permission']['edit']['playet']) {
    echo '<th><i class="fa fa-pencil"></i><div class="hidden-xs"> ' . $lang['edit'] . '</div></th>';
}
?>
            </tr>
            </thead>
            <tbody>
            <?php 
while ($row = mysqli_fetch_assoc($result_of_query)) {
    echo "<tr>";
    echo "<td>" . nameID($row["pid"]) . "</td>";
    echo "<td>" . carName($row["classname"]) . "</td>";
    echo "<td class='hidden-xs'>" . carType($row["type"], $lang) . "</td>";
    echo "<td class='hidden-xs'>" . $row["plate"] . "</td>";
    echo "<td class='hidden-xs'>" . yesNo($row["alive"], $lang) . "</td>";
    echo "<td class='hidden-xs'>" . yesNo($row["active"], $lang) . "</td>";
    if ($_SESSION['user_level'] >= P_EDIT_VEHICLES) {
        echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editVeh/" . $row["id"] . "'>";
        echo "<i class='fa fa-pencil'></i></a></td>";
    }
    echo "</tr>";
}
echo "</tbody></table>";
if (isset($search)) {
    $total_pages = ceil($total_records / $_SESSION['items']);
    if ($total_pages > 1) {
        echo "<center><a class='btn btn-primary' href='" . $settings['url'] . "vehicles/" . $search . "?page=1'>" . $lang['first'] . "</a> ";
        ?>
Exemplo n.º 2
0
 $sql = "SELECT `classname`,`type`,`id`,`plate` FROM `vehicles` WHERE `pid` = '" . $player->playerid . "' ORDER BY `id` DESC LIMIT 8";
 $result_of_query = $db_link->query($sql);
 if ($result_of_query->num_rows > 0) {
     $veh = $result_of_query->fetch_object();
     echo '<table class="table table-bordered table-hover table-striped">';
     echo '<thead><tr>';
     echo '<th>' . $lang['class'] . '</th>';
     echo '<th>' . $lang['type'] . '</th>';
     echo '<th>' . $lang['plate'] . '</th>';
     if ($_SESSION['permissions']['edit']['vehicles']) {
         echo "<th>" . $lang['edit'] . "</th>";
     }
     echo '</tr></thead><tbody';
     echo '<tr>';
     echo '<td>' . carName($veh->classname) . '</td>';
     echo '<td>' . carType($veh->type, $lang) . '</td>';
     echo '<td>' . $veh->plate . '</td>';
     if ($_SESSION['permissions']['edit']['vehicles']) {
         echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editVeh.php?ID=" . $veh->id . "'>";
         echo "<i class='fa fa-pencil'></i></a></td>";
     }
     echo '</tr>';
     echo '</tbody></table>';
     echo '<a class="fa fa-caret-right fa-2x" style="float: right; padding-right:15px;" href="' . $settings['url'] . 'vehicles/' . $player->playerid . '"> More</a>';
 } else {
     echo errorMessage(31, $lang);
 }
 ?>
                 </div>
             </div>
         <?php 
Exemplo n.º 3
0
     $sql = "SELECT `classname`,`type`,`id`,`plate` FROM `vehicles` WHERE `pid` = '" . $player->playerid . "' ORDER BY `id` DESC LIMIT 8";
     $result_of_query = $db_link->query($sql);
     if ($result_of_query->num_rows > 0) {
         $veh = $result_of_query->fetch_object();
         echo '<table class="table table-bordered table-hover table-striped" style="margin-bottom: 0px;">';
         echo '<thead><tr>';
         echo '<th>' . $lang['class'] . '</th>';
         echo '<th class="hidden-xs">' . $lang['type'] . '</th>';
         echo '<th class="hidden-xs">' . $lang['plate'] . '</th>';
         if ($_SESSION['permissions']['edit']['vehicles']) {
             echo "<th>" . $lang['edit'] . "</th>";
         }
         echo '</tr></thead><tbody';
         echo '<tr>';
         echo '<td>' . carName($veh->classname) . '</td>';
         echo '<td class="hidden-xs">' . carType($veh->type, $lang) . '</td>';
         echo '<td class="hidden-xs">' . $veh->plate . '</td>';
         if ($_SESSION['permissions']['edit']['vehicles']) {
             echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editVeh/" . $veh->id . "'>";
             echo "<i class='fa fa-pencil'></i></a></td>";
         }
         echo '</tr></tbody></table>';
         echo '<a style="float: right; padding-right:15px;" href="' . $settings['url'] . 'vehicles/' . $player->playerid . '"><h4>' . $lang['more'] . ' <i class="fa fa-arrow-circle-right"></i></h4></a>';
     } else {
         echo '<h4>' . errorMessage(32, $lang) . '</h4>';
     }
     ?>
                     </div>
                 </div>
             <?php 
 }
Exemplo n.º 4
0
                while ($row = mysqli_fetch_assoc($result_of_query)) {
                    $vehID = $row["id"];
                    echo "<tr>";
                    echo "<td>" . carName($row["classname"]) . "</td>";
                    echo "<td>" . carType($row["type"], $lang) . "</td>";
                    echo "<td>" . $row["plate"] . "</td>";
                    echo "<td><a class='btn btn-primary btn-xs' href='editVeh.php?ID=" . $row["id"] . "'>";
                    echo "<i class='fa fa-pencil'></i></a></td>";
                    echo "</tr>";
                }
            } else {
                while ($row = mysqli_fetch_assoc($result_of_query)) {
                    $vehID = $row["id"];
                    echo "<tr>";
                    echo "<td>" . carName($row["classname"]) . "</td>";
                    echo "<td>" . carType($row["type"], $lang) . "</td>";
                    echo "<td>" . $row["plate"] . "</td>";
                    echo "</tr>";
                }
            }
            ?>
									</tbody>
								</table>
								<?php 
            echo '<a class="fa fa-caret-right fa-2x" style="float: right; padding-right:15px;" href="vehicles.php?ID=' . $pID . '"> More</a>';
        } else {
            echo '<h1>No cars</h1>';
        }
    }
    ?>
					</div>