| @@ 25-72 (lines=48) @@ | ||
| 22 | } |
|
| 23 | ||
| 24 | $result_of_query = $db_link->query($sql); |
|
| 25 | if ($result_of_query->num_rows > 0) { ?> |
|
| 26 | <div class="row"> |
|
| 27 | <div class="col-lg-12"> |
|
| 28 | <h1 class="page-header"> |
|
| 29 | <?php echo $lang['houses']; ?> |
|
| 30 | </h1> |
|
| 31 | </div> |
|
| 32 | </div> |
|
| 33 | ||
| 34 | <div class="content-panel"> |
|
| 35 | <h4> |
|
| 36 | <i class="fa fa-home fa-fw"></i> |
|
| 37 | <?php echo $lang['houses']; |
|
| 38 | include("views/templates/search.php"); ?> |
|
| 39 | </h4> |
|
| 40 | <hr class="hidden-xs"> |
|
| 41 | <table class="table table-striped table-advance table-hover"> |
|
| 42 | <thead> |
|
| 43 | <tr> |
|
| 44 | <th><i class="fa fa-eye"></i> <?php echo $lang['owner'] ?></th> |
|
| 45 | <th><i class="fa fa-user"></i> <?php echo $lang['position']; ?></th> |
|
| 46 | <th class="hidden-xs"><i class="fa fa-user"></i> <?php echo $lang['owned']; ?></th> |
|
| 47 | <?php if ($_SESSION['permissions']['edit']['houses']) { |
|
| 48 | echo '<th>' . $lang['edit'] . '</th>'; |
|
| 49 | } |
|
| 50 | ?> |
|
| 51 | </tr> |
|
| 52 | </thead> |
|
| 53 | <tbody> |
|
| 54 | <?php |
|
| 55 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
|
| 56 | echo "<tr>"; |
|
| 57 | echo "<td>" . $row["name"] . "</td>"; |
|
| 58 | echo "<td>" . substr($row["pos"], 1, -1) . "</td>"; |
|
| 59 | echo "<td class='hidden-xs'>" . yesNo($row["owned"], $lang) . "</td>"; |
|
| 60 | if ($_SESSION['permissions']['edit']['houses']) { |
|
| 61 | echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editHouse/" . $row["id"] . "'>"; |
|
| 62 | echo "<i class='fa fa-pencil'></i></a></td>"; |
|
| 63 | } |
|
| 64 | echo "</tr>"; |
|
| 65 | }; |
|
| 66 | echo "</tbody></table>"; |
|
| 67 | include("views/templates/page.php"); |
|
| 68 | ?> |
|
| 69 | </div> |
|
| 70 | ||
| 71 | <?php |
|
| 72 | } else echo errorMessage(3, $lang); |
|
| 73 | ||
| @@ 21-68 (lines=48) @@ | ||
| 18 | } |
|
| 19 | ||
| 20 | $result_of_query = $db_link->query($sql); |
|
| 21 | if ($result_of_query->num_rows > 0) { ?> |
|
| 22 | <div class="row"> |
|
| 23 | <div class="col-lg-12"> |
|
| 24 | <h1 class="page-header"> |
|
| 25 | <?php echo $lang['houses']; ?> |
|
| 26 | </h1> |
|
| 27 | </div> |
|
| 28 | </div> |
|
| 29 | ||
| 30 | <div class="content-panel"> |
|
| 31 | <h4> |
|
| 32 | <i class="fa fa-home fa-fw"></i> |
|
| 33 | <?php echo $lang['houses']; |
|
| 34 | include("views/templates/search.php"); ?> |
|
| 35 | </h4> |
|
| 36 | <hr class="hidden-xs"> |
|
| 37 | <table class="table table-striped table-advance table-hover"> |
|
| 38 | <thead> |
|
| 39 | <tr> |
|
| 40 | <th><i class="fa fa-eye"></i> <?php echo $lang['owner'] ?></th> |
|
| 41 | <th><i class="fa fa-user"></i> <?php echo $lang['position']; ?></th> |
|
| 42 | <th class="hidden-xs"><i class="fa fa-user"></i> <?php echo $lang['owned']; ?></th> |
|
| 43 | <?php if ($_SESSION['permissions']['edit']['houses']) { |
|
| 44 | echo '<th>' . $lang['edit'] . '</th>'; |
|
| 45 | } |
|
| 46 | ?> |
|
| 47 | </tr> |
|
| 48 | </thead> |
|
| 49 | <tbody> |
|
| 50 | <?php |
|
| 51 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
|
| 52 | echo "<tr>"; |
|
| 53 | echo "<td>" . $row["name"] . "</td>"; |
|
| 54 | echo "<td>" . substr($row["pos"], 1, -1) . "</td>"; |
|
| 55 | echo "<td class='hidden-xs'>" . yesNo($row["owned"], $lang) . "</td>"; |
|
| 56 | if ($_SESSION['permissions']['edit']['houses']) { |
|
| 57 | echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editHouse/" . $row["id"] . "'>"; |
|
| 58 | echo "<i class='fa fa-pencil'></i></a></td>"; |
|
| 59 | } |
|
| 60 | echo "</tr>"; |
|
| 61 | }; |
|
| 62 | echo "</tbody></table>"; |
|
| 63 | include("views/templates/page.php"); |
|
| 64 | ?> |
|
| 65 | </div> |
|
| 66 | ||
| 67 | <?php |
|
| 68 | } else echo errorMessage(3, $lang); |
|