Skip to content

Commit

Permalink
bootstrap up
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 24, 2015
1 parent df7d546 commit b3ebf1d
Show file tree
Hide file tree
Showing 18 changed files with 279 additions and 177 deletions.
2 changes: 1 addition & 1 deletion modules/gpio/html/gpio_day.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<form action="" method="post" style=" display:inline!important;">
<input type="hidden" name="gpio" value="<?php echo $a['gpio']; ?>"/>
<button type="submit" class="btn btn-xs btn-danger">OFF </button>
<button type="submit" class="btn btn-xs btn-danger">Exit</button>
<input type="hidden" name="dayrun" value="off" />
<input type="hidden" name="off" value="off" />
</form>
Expand Down
2 changes: 1 addition & 1 deletion modules/gpio/html/gpio_temp.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
Status:<?php echo $a['status'];?>
<form action="" method="post" style=" display:inline!important;">
<input type="hidden" name="gpio" value="<?php echo $a['gpio']; ?>"/>
<input type="image" src="media/ico/Button-Turn-Off-icon.png"/>
<button type="submit" class="btn btn-xs btn-danger">Exit</button>
<input type="hidden" name="tempon" value="off" />
<input type="hidden" name="off" value="off" />
</form>
Expand Down
2 changes: 1 addition & 1 deletion modules/gpio/html/gpio_week.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Mon: <?php echo $a['week_Mon']; ?> Tue:<?php echo $a['week_Tue']; ?> Wed:<?php echo $a['week_Wed']; ?> Thu:<?php echo $a['week_Thu']; ?> Fri:<?php echo $a['week_Fri']; ?> Sat:<?php echo $a['week_Sat']; ?> Sun:<?php echo $a['week_Sun']; ?>
<form action="" method="post" style=" display:inline!important;">
<input type="hidden" name="gpio" value="<?php echo $a['gpio']; ?>"/>
<input type="image" src="media/ico/Button-Turn-Off-icon.png"/>
<button type="submit" class="btn btn-xs btn-danger">Exit</button>
<input type="hidden" name="weekrun" value="off" />
<input type="hidden" name="off" value="off" />
</form>
Expand Down
44 changes: 19 additions & 25 deletions modules/hosts/html/hosts_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@
header("location: " . $_SERVER['REQUEST_URI']);
exit();
}
elseif ($host_add1 == "host_add2") { ?>
<div class="panel-body">
<span class="label label-danger">Please input name and IP</span>
</div>
<?php
}
?>


Expand All @@ -43,24 +37,27 @@
exit();
}
?>

<div class="table-responsive">
<table class="table table-striped">
<thead><tr><th></th><th>Name</th><th>IP / Name</th><th>Type</th><th>Add / Rem</tf></tr></thead>
<tr>
<form action="" method="post">
<form action="" method="post" class="form-horizontal">
<div class="form-group">
<td></td>
<td><input type="text" name="host_name" size="10" value="" /></td>
<td><input type="text" name="host_ip" size="7" value="" /></td>
<td><input type="text" name="host_name" value="" class="form-control" required=""/></td>
<td><input type="text" name="host_ip" value="" class="form-control" required=""/></td>
<td>
<select name="host_type" >
<select name="host_type" class="form-control">
<option value="ping">ping</option>
<option value="httpping">http ping</option>
</select>
</td>
<input type="hidden" name="host_add1" value="host_add2" />
<td><button class="btn btn-xs btn-success"><span class="glyphicon glyphicon-plus"></span> </button></td>
</tr>
<input type="hidden" name="host_add1" value="host_add2" class="form-control"/>
<td><button class="btn btn-xs btn-success"><span class="glyphicon glyphicon-plus"></span></button></td>
</div>
</form>
</tr>


<?php

Expand All @@ -70,25 +67,22 @@
$result = $sth->fetchAll();
foreach ($result as $a) {
?>
<tr>
<tr>
<td><img src="media/ico/Computer-icon.png" ></td>
<td><?php echo str_replace("host_","",$a["name"]);?></td>
<td><?php echo $a["ip"];?></td>
<td><?php echo $a["type"];?></td>

<form action="" method="post">
<form action="" method="post" class="form-horizontal">
<input type="hidden" name="host_name" value="<?php echo $a["name"]; ?>" />
<input type="hidden" type="submit" name="host_del1" value="host_del2" />
<td><button class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> </button></td>
</tr>
<td><button class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> </button></td>
</form>
<?php }




?>

</tr>

<?php
}
?>
</table>
</div>
</div>
131 changes: 86 additions & 45 deletions modules/mail/html/mail_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,52 +35,93 @@
foreach ($result as $a) {
?>

<table class="table">
<tr>
<form action="settings" method="post">
<td>Username</td>
<td><input type="text" name="user" size="25" value="<?php echo $a["user"]; ?>" /></td>
</tr>
<tr>
<td>Server smtp</td>
<td><input type="text" name="host" size="25" value="<?php echo $a["host"]; ?>" /></td>
</tr>
<tr>
<td>Port</td>
<td><input type="text" name="port" size="25" value="<?php echo $a["port"]; ?>" /></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password" size="25" value="<?php echo $a["password"]; ?>" /></td>
<form class="form-horizontal" action="" method="post">
<fieldset>

<!-- Form Name -->

<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="user">Username</label>
<div class="col-md-4">
<input id="user" name="user" placeholder="" class="form-control input-md" required="" type="text" value="<?php echo $a["user"]; ?>">

</div>
</div>

<!-- Password input-->
<div class="form-group">
<label class="col-md-4 control-label" for="password">Password</label>
<div class="col-md-4">
<input id="password" name="password" placeholder="" class="form-control input-md" required="" type="password" value="<?php echo $a["password"]; ?>">

</div>
</div>

<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="smtp">Server SMTP</label>
<div class="col-md-4">
<input id="host" name="host" placeholder="" class="form-control input-md" required="" type="text" value="<?php echo $a["host"]; ?>">

</div>
</div>

<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="port">Port</label>
<div class="col-md-2">
<input id="port" name="port" placeholder="" class="form-control input-md" required="" type="text" value="<?php echo $a["port"]; ?>">

</div>
</div>

<!-- Select Basic -->
<div class="form-group">
<label class="col-md-4 control-label" for="auth">Auth</label>
<div class="col-md-2">
<select id="auth" name="auth" class="form-control">
<option value="on">on</option>
<option value="off">off</option>
<option value="login">login</option>
</select>
</div>
</div>

<!-- Select Basic -->
<div class="form-group">
<label class="col-md-4 control-label" for="tls">TLS</label>
<div class="col-md-4">
<select id="tls" name="tls" class="form-control">
<option value="on">TLS</option>
</select>
</div>
</div>

<!-- Select Basic -->
<div class="form-group">
<label class="col-md-4 control-label" for="tlscheck">TLS Ceck</label>
<div class="col-md-4">
<select id="tlscheck" name="tlscheck" class="form-control">
<option value="on">on</option>
<option value="off">off</option>
</select>
</div>
</div>

<!-- Button -->
<div class="form-group">
<label class="col-md-4 control-label" for="mailsave"></label>
<div class="col-md-4">
<input type="hidden" name="change_password1" value="change_password2" />
</tr>
<tr><td>Auth</td><td>
<select name="auth" >
<option <?php echo $a['auth'] == 'on' ? 'selected="selected"' : ''; ?> value="on">on</option>
<option <?php echo $a['auth'] == 'off' ? 'selected="selected"' : ''; ?> value="off">off</option>
<option <?php echo $a['auth'] == 'login' ? 'selected="selected"' : ''; ?> value="login">login</option>
</select>
</td>
</tr>
<tr><td>TLS</td><td>

<select name="tls" >
<option <?php echo $a['tls'] == 'on' ? 'selected="selected"' : ''; ?> value="on">on</option>
<!-- <option <?php echo $a['tls'] == 'off' ? 'selected="selected"' : ''; ?> value="off">off</option> -->
</select>
</td>
</tr>
<tr><td>TLS Check cert</td><td>
<select name="tlscheck" >
<option <?php echo $a['tlscheck'] == 'on' ? 'selected="selected"' : ''; ?> value="on">on</option>
<option <?php echo $a['tlscheck'] == 'off' ? 'selected="selected"' : ''; ?> value="off">off</option>
</select>
</td>
</tr>
<tr><td><input type="submit" value="Save" class="btn btn-primary" /></td></tr>
</form>

</table>
<button id="mailsave" name="mailsave" class="btn btn-primary">Save</button>
</div>
</div>

</fieldset>
</form>

</div>

<?php } ?>

Expand Down
39 changes: 27 additions & 12 deletions modules/mail/html/mail_test.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
$test_mail = isset($_POST['test_mail']) ? $_POST['test_mail'] : '';
$mail_test1 = isset($_POST['mail_test1']) ? $_POST['mail_test1'] : '';
if ($mail_test1 == "mail_test2") {
$send = isset($_POST['send']) ? $_POST['send'] : '';
if ($send == "send") {
$test_mail1=escapeshellarg($test_mail);
$cmd="modules/mail/mail_test $test_mail1 'Test from your nettemp device' 'Test mail from Your nettemp device.'";
shell_exec($cmd);
Expand All @@ -20,15 +20,30 @@
foreach ($result as $a) {
?>

<table class="table">
<tr>
<form action="settings" method="post">
<td>Send test mail to:</td>
<td><input type="text" name="test_mail" size="25" value="<?php echo $a["test_mail"]; ?>" /></td>
<input type="hidden" name="mail_test1" value="mail_test2" />
<td><input class="btn btn-primary" type="submit" value="Send" /></td>
</form>
</tr>
</table>
<form class="form-horizontal" action="" method="post">
<fieldset>

<!-- Form Name -->
<legend>Send test mail</legend>

<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="user">@</label>
<div class="col-md-4">
<input id="mail_test" name="test_mail" placeholder="" class="form-control input-md" required="" type="text" value="<?php echo $a['test_mail'];?>">

</div>
</div>

<!-- Button -->
<div class="form-group">
<label class="col-md-4 control-label" for="mail_test"></label>
<div class="col-md-4">
<button id="send" name="send" value="send" class="btn btn-primary">Send test</button>
</div>
</div>

</fieldset>
</form>

<?php } ?>
25 changes: 13 additions & 12 deletions modules/notification/html/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
header("location: " . $_SERVER['REQUEST_URI']);
exit();
}
elseif ($notif_add1 == "notif_add2") { echo "Please fill in all fields. Name, mail and tel."; }


?>

<?php
Expand Down Expand Up @@ -53,18 +50,20 @@
<div class="panel panel-default">
<div class="panel-heading">Users</div>

<div class="table-responsive">
<table class="table table-striped">
<thead><tr><th>Name</th><th>Email</th><th>Telephone</th><th><img src="media/ico/message-icon.png"></th><th><img src="media/ico/phone-blue-glow-icon.png"></th></tr></thead>
<thead><tr><th></th><th>Name</th><th>Email</th><th>Telephone</th><th><img src="media/ico/message-icon.png"></th><th><img src="media/ico/phone-blue-glow-icon.png"></th><th>Add/Rem</th></tr></thead>

<tr>
<form action="" method="post">
<td><input type="text" name="notif_name" size="20" value="" /></td>
<td><input type="text" name="notif_mail" size="20" value="" /></td>
<td><input type="text" name="notif_tel" size="20" value="" /></td>
<td><input type="checkbox" name="notif_mail_alarm" size="2" value="yes" /></td>
<td><input type="checkbox" name="notif_sms_alarm" size="2" value="yes" /></td>
<td></td>
<td><input type="text" name="notif_name" value="" class="form-control" required=""/></td>
<td><input type="text" name="notif_mail" value="" class="form-control" required=""/></td>
<td><input type="text" name="notif_tel" value="" class="form-control" required=""/></td>
<td><input type="checkbox" name="notif_mail_alarm" value="yes" /></td>
<td><input type="checkbox" name="notif_sms_alarm" value="yes" /></td>
<input type="hidden" name="notif_add1" value="notif_add2" />
<td><button class="btn btn-xs btn-success"><span class="glyphicon glyphicon-plus"></span> </button></td>
<td><button class="btn btn-xs btn-success"><span class="glyphicon glyphicon-plus"></span> </button></td>
<td></td>
</form>
</tr>
Expand All @@ -77,7 +76,8 @@
foreach ($result as $a) {
?>
<tr>
<td><img src="media/ico/User-Preppy-Blue-icon.png"> <?php echo $a["name"];?></td>
<td><img src="media/ico/User-Preppy-Blue-icon.png"></td>
<td><?php echo $a["name"];?></td>
<td><?php echo $a["mail"];?></td>
<td><?php echo $a["tel"]; ?></td>

Expand All @@ -91,7 +91,7 @@
<form action="" method="post">
<input type="hidden" name="notif_del" value="<?php echo $a["id"]; ?>" />
<input type="hidden" type="submit" name="notif_del1" value="notif_del2" />
<td><button class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> </button></td>
<td><button class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> </button></td>
</form>
</tr>
<?php }
Expand All @@ -103,3 +103,4 @@

</table>
</div>
</div>
4 changes: 3 additions & 1 deletion modules/relays/html/relays_settings.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="panel panel-default">
<div class="panel-heading">Relays</div>
<div class="panel-heading">Relays</div>
<div class="table-responsive">
<table class="table table-striped">

<?php
Expand Down Expand Up @@ -74,3 +75,4 @@
?>
</table>
</div>
</div>
4 changes: 2 additions & 2 deletions modules/security/authmod/html/authmod_pass.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<input type="hidden" name="login_change" value="login_change1">
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd" name="pas1" >
<input type="password" class="form-control" id="pwd" name="pas1" required="" >
</div>
<div class="form-group">
<label for="pwd2">Repeat:</label>
<input type="password" class="form-control" id="pwd2" name="pas2" >
<input type="password" class="form-control" id="pwd2" name="pas2" required="" >
</div>
<input type="submit" value="Save" class="btn btn-primary" />
<input type="hidden" name="chg" value="chg2"/>
Expand Down
Loading

0 comments on commit b3ebf1d

Please sign in to comment.