File: /home/httpd/html/nyloncams.com/public_html/admin/static.php
<?php
require "db.php";
if ($_POST['list']) {
foreach ($_POST['list'] as $i) {
dbDelete('static', array('record_num' => $i));
dbDelete('static_languages', array(
'static' => $i,
), false, 'static');
}
}
?>
<? require "header.php"; ?>
<div class="content-page">
<div class="header-area">
<div class="breadcrumbs">
<a href="index.php">Admin Home</a>
<span><a href="static.php">Static Pages</a></span>
</div>
</div>
<div class="content-outer">
<h2>Static<strong>Pages</strong></h2>
<div class="content-inner">
<? echo getMessages(); ?>
<form method="POST" action="" enctype="multipart/form-data" class="form" novalidate autocomplete="off">
<table class="pagetable">
<thead>
<tr>
<th>Filename</th>
<th>Title</th>
<th>Published</th>
<th class="options"></th>
<th style="width:50px">
<label for="check-select-all-1" class="checkbox">
<input type="checkbox" name="select_all" value="1" data-items="list[]" id="check-select-all-1">
<i></i>
</label>
</th>
</tr>
</thead>
<? $result = dbQuery("SELECT * FROM `static` ORDER BY `filename`", false); ?>
<tbody>
<? if (!is_array($result)) { ?>
<tr><td colspan="5"><div class="notification alert">No static pages found</div></td></tr>
<? } else { ?>
<? foreach($result as $row) { ?>
<tr>
<td><a href="<?php echo $basehttp; ?>/static/<?php echo $row['filename']; ?>" target="_blank"><?php echo $row['filename']; ?></a></td>
<td><?php echo $row['title']; ?></td>
<td><?php echo $row['status'] ? '<i class="ion ion-checkmark-circled icon-status enabled"></i>' : '<i class="ion ion-close-circled icon-status disabled"></i>'; ?></td>
<td class="options">
<a href="edit_static.php?id=<?php echo $row['record_num']; ?>" class="btn btn-xs btn-orange"><i class="ion ion-edit icon-edit"></i></a>
</td>
<td>
<label class="checkbox">
<input type="checkbox" name="list[]" value="<? echo $row['record_num']; ?>" id="ids-<? echo $row['record_num']; ?>"><i></i>
</label>
</td>
</tr>
<? } ?>
<tr class="item submit">
<td colspan="5">
<? if (count($result) > 0) { ?>
<button type="submit" class="btn action-delete">Delete Selected</button>
<? } ?>
</td>
</tr>
<? } ?>
</tbody>
</table>
</form>
</div>
</div>
</div>
<?php require "footer.php"; ?>