feature: Added script (scripts/test-template.php) to test alert templates (#6631)

* feature: Added script (scripts/test-template.php) to test alert templates

* moved remaining functions, fixed php 5.3 and include dir

* added docs on use for test-template script
This commit is contained in:
Neil Lathwood
2017-05-13 12:46:08 +01:00
committed by Tony Murray
parent 2dd44fdfdf
commit 0338734fe7
5 changed files with 618 additions and 567 deletions

View File

@@ -26,11 +26,12 @@ if (isset($_POST['results_amount']) && $_POST['results_amount'] > 0) {
echo '<div class="table-responsive">
<table class="table table-hover table-condensed" width="100%">
<tr>
<th>#</th>
<th>Name</th>
<th>Action</th>
</tr>
<tr>
<td>';
<td colspan="2">';
if ($_SESSION['userlevel'] >= '10') {
echo '<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#alert-template" data-template_id="">Create new alert template</button>';
@@ -76,6 +77,7 @@ $full_query = $full_query.$query." LIMIT $start,$results";
foreach (dbFetchRows($full_query, $param) as $template) {
echo '<tr id="row_'.$template['id'].'">
<td>#' . $template['id'] . '</td>
<td>'.$template['name'].'</td>
<td>';
if ($_SESSION['userlevel'] >= '10') {