Permalink
Browse files

Finish config for NEMS Checkin

  • Loading branch information...
NEMS Linux
NEMS Linux committed Dec 15, 2018
1 parent 938c820 commit 2188eddcc4a3903a1cf3fbf661da322940e07c49
Showing with 5 additions and 5 deletions.
  1. +5 −5 config/index.php
@@ -110,9 +110,9 @@
$nemsconf['osbkey'] = sanitize($_POST['osbkey']);
$nemsconf['alias'] = preg_replace("/&#?[a-z0-9]{2,8};/i","",sanitize($_POST['alias']));
$nemsconf['allowupdate'] = intval($_POST['allowupdate']) ?: 5;
$nemsconf['checkin.enabled'] = intval($_POST['checkin.enabled']) ?: 0;
$nemsconf['checkin.email'] = filter_var($_POST['checkin.email'], FILTER_VALIDATE_EMAIL) ?: '';
$nemsconf['checkin.interval'] = intval($_POST['checkin.interval']) ?: 8; // how many 15 minute cycles before notifying. Default 8 (2 hours).
$nemsconf['checkin.enabled'] = intval($_POST['checkin_enabled']) ?: 0;
$nemsconf['checkin.email'] = filter_var(trim($_POST['checkin_email']), FILTER_VALIDATE_EMAIL) ?: '';
$nemsconf['checkin.interval'] = intval($_POST['checkin_interval']) ?: 8; // how many 15 minute cycles before notifying. Default 8 (2 hours).
$nemsconfoutput = '';
foreach ($nemsconf as $key=>$value) {
$nemsconfoutput .= $key . '=' . $value . PHP_EOL;
@@ -233,14 +233,14 @@ function sanitize($string) {
<label class="label">Email Address for Checkin Alerts</label>
<label class="input">
<i class="icon-append fa fa-envelope"></i>
<input type="checkin.email" name="checkin.email" placeholder="Checkin email address" value="<?= $nemsconf['checkin.email'] ?>">
<input type="email" name="checkin.email" placeholder="Checkin email address" value="<?= $nemsconf['checkin.email'] ?>">
<b class="tooltip tooltip-bottom-right">Email Address for Checkin Alerts</b>
</label>
</section>
<section>
<label class="label">When to Notify</label>
<label class="select">
<select name="checkin.enabled">
<select name="checkin.interval">
<option value="96"<?php if (isset($nemsconf['checkin.interval']) && $nemsconf['checkin.interval'] == 96) echo ' SELECTED'; ?>>After 1 Day</option>
<option value="24"<?php if (isset($nemsconf['checkin.interval']) && $nemsconf['checkin.interval'] == 24) echo ' SELECTED'; ?>>After 6 Hours</option>
<option value="8"<?php if (!isset($nemsconf['checkin.interval']) || $nemsconf['checkin.interval'] == 8) echo ' SELECTED'; ?>>After 2 Hours</option>

0 comments on commit 2188edd

Please sign in to comment.