Code Duplication    Length = 10-11 lines in 3 locations

views/life/editPlayer.php 3 locations

@@ 328-338 (lines=11) @@
325
            if ($_SESSION['permissions']['edit']['inventory']) { ?>
326
              <div class="tab-pane fade well" id="civ_inv">
327
                  <?php
328
                  if ($player->civ_gear !== '"[]"' && $player->civ_gear !== '') {
329
                      echo '<h4 style="centred">' . $lang['civil'] . ' ' . $lang['gear'] . '</h4>';
330
                      echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='civ_gear'>" . $player->civ_gear . "</textarea><br>";
331
332
                      if ($_SESSION['permissions']['edit']['inventory']) {
333
                          echo '<a data-toggle="modal" href="#edit_civ_inv" class="btn btn-primary btn-xs" style="float: right;">';
334
                          echo '<i class="fa fa-pencil"></i></a>';
335
                      }
336
                  } else {
337
                      echo '<h4>' . errorMessage(381, $lang) . '</h4>';
338
                  } ?>
339
              </div>
340
              <div class="tab-pane fade well" id="police_inv">
341
                  <?php
@@ 342-351 (lines=10) @@
339
              </div>
340
              <div class="tab-pane fade well" id="police_inv">
341
                  <?php
342
                  if ($player->cop_gear !== '"[]"' && $player->cop_gear !== '') {
343
                      echo '<h4 style="centred">' . $lang['cop'] . ' ' . $lang['gear'] . '</h4>';
344
                      echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='cop_gear' name='cop_gear'>" . $player->cop_gear . "</textarea><br>";
345
                      if ($_SESSION['permissions']['edit']['inventory']) {
346
                          echo '<a data-toggle="modal" href="#edit_cop_inv" class="btn btn-primary btn-xs" style="float: right;">';
347
                          echo '<i class="fa fa-pencil"></i></a>';
348
                      }
349
                  } else {
350
                      echo '<h4>' . errorMessage(383, $lang) . '</h4>';
351
                  } ?>
352
              </div>
353
              <div class="tab-pane fade well" id="medic_inv">
354
                  <?php
@@ 355-364 (lines=10) @@
352
              </div>
353
              <div class="tab-pane fade well" id="medic_inv">
354
                  <?php
355
                  if ($player->med_gear !== '"[]"' && $player->med_gear !== '') {
356
                      echo '<h4 style="centred">' . $lang['medic'] . ' ' . $lang['gear'] . '</h4>';
357
                      echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='med_gear' name='med_gear'>" . $player->med_gear . "</textarea><br>";
358
                      if ($_SESSION['permissions']['edit']['inventory']) {
359
                          echo '<a data-toggle="modal" href="#edit_med_inv" class="btn btn-primary btn-xs" style="float: right;">';
360
                          echo '<i class="fa fa-pencil"></i></a>';
361
                      }
362
                  } else {
363
                      echo '<h4>' . errorMessage(382, $lang) . '</h4>';
364
                  } ?>
365
              </div>
366
            <?php }
367
            if ($_SESSION['permissions']['view']['houses'] || $player->playerid == $_SESSION['playerid']) { ?>