mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2025-07-19 16:35:26 -04:00
Merge pull request #145 from Tealk/update-bootstrap
Merge Tealk's nice major design updates and small code tweaks
This commit is contained in:
commit
eb50012e89
5
404.php
5
404.php
@ -1,12 +1,11 @@
|
||||
<?php
|
||||
require_once("template.php");
|
||||
if (!file_exists("config.php"))
|
||||
{
|
||||
if (!file_exists("config.php")) {
|
||||
require_once("install.php");
|
||||
} else {
|
||||
require_once("config.php");
|
||||
|
||||
Template::render_header("Page not found");
|
||||
Template::render_header("Page not found", "notfound");
|
||||
?>
|
||||
<div class="text-center">
|
||||
<h1><?php echo _("Page Not Found"); ?></h1>
|
||||
|
@ -1,28 +1,24 @@
|
||||
<?php
|
||||
$offset = 0;
|
||||
if (isset($_GET['ajax']))
|
||||
{
|
||||
if (isset($_GET['ajax'])) {
|
||||
$constellation->render_incidents(false, $_GET['offset'], 5);
|
||||
exit();
|
||||
}else if (isset($_GET['offset']))
|
||||
{
|
||||
} else if (isset($_GET['offset'])) {
|
||||
$offset = $_GET['offset'];
|
||||
}
|
||||
|
||||
if (isset($_GET['new']) && $_GET['new']=="incident")
|
||||
{
|
||||
if (isset($_GET['new']) && $_GET['new'] == "incident") {
|
||||
Incident::add();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete']))
|
||||
{
|
||||
if (isset($_GET['delete'])) {
|
||||
Incident::delete($_GET['delete']);
|
||||
}
|
||||
if (isset($_GET['tasks'])) {
|
||||
Queue::process_queue();
|
||||
}
|
||||
|
||||
Template::render_header(_("Dashboard"), true);
|
||||
Template::render_header(_("Dashboard"), "dashboard", true);
|
||||
?>
|
||||
|
||||
<div class="text-center">
|
||||
@ -40,17 +36,15 @@ Template::render_header(_("Dashboard"), true);
|
||||
<div class="timeline">
|
||||
<div class="line text-muted"></div>
|
||||
<h3><?php echo _("New incident"); ?></h3>
|
||||
<form id="new-incident" action="<?php echo WEB_URL;?>/admin/?new=incident" method="POST" class="clearfix">
|
||||
<div class="panel">
|
||||
<?php if (isset($message))
|
||||
{?>
|
||||
<form id="new-incident" action="<?php echo WEB_URL; ?>/admin/?new=incident" method="POST">
|
||||
<div class="servicelist">
|
||||
<?php if (isset($message)) { ?>
|
||||
<p class="alert alert-danger"><?php echo $message ?></p>
|
||||
<?php
|
||||
} ?>
|
||||
<div id="status-container" class="clearfix">
|
||||
<div id="status-container">
|
||||
<?php
|
||||
if (isset($_POST['services']) && !is_array($_POST['services']))
|
||||
{
|
||||
if (isset($_POST['services']) && !is_array($_POST['services'])) {
|
||||
$post_services = array($_POST['services']);
|
||||
} else {
|
||||
$post_services = array();
|
||||
@ -58,39 +52,48 @@ Template::render_header(_("Dashboard"), true);
|
||||
|
||||
foreach ($services as $service) {
|
||||
?>
|
||||
<div class="item clearfix">
|
||||
<div class="service"><?php if ($service->get_status()!=-1){?><input type="checkbox" name="services[]" value="<?php echo $service->get_id(); ?>" <?php echo (in_array($service->get_id(), $post_services))?"checked":'';?> id="service-<?php echo $service->get_id(); ?>"><?php } ?><label for="service-<?php echo $service->get_id(); ?>"><?php echo $service->get_name(); ?></label></div>
|
||||
<div class="status <?php if ($service->get_status()!=-1){echo $classes[$service->get_status()];}?>"><?php if ($service->get_status()!=-1){echo $statuses[$service->get_status()];}?></div>
|
||||
<div class="input-group mb-2">
|
||||
<?php if ($service->get_status() != -1) { ?>
|
||||
<div class="input-group-text service">
|
||||
<input type="checkbox" name="services[]" value="<?php echo $service->get_id(); ?>" <?php echo (in_array($service->get_id(), $post_services)) ? "checked" : ''; ?> id="service-<?php echo $service->get_id(); ?>">
|
||||
</div>
|
||||
<label id="name" class="input-group-text form-control" for="service-<?php echo $service->get_id(); ?>"><?php echo $service->get_name(); ?></label>
|
||||
<label id="status" class="input-group-text btn-<?php if ($service->get_status() != -1) {
|
||||
echo $classes[$service->get_status()];
|
||||
} ?>" for="service-<?php echo $service->get_id(); ?>"><?php echo $statuses[$service->get_status()]; ?></label>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel new panel-primary">
|
||||
<div class="panel-heading icon">
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
</div>
|
||||
<div class="panel-heading clearfix">
|
||||
<input type="text" name="title" id="title" placeholder="<?php echo _("Title");?>" value="<?php echo (isset($_POST['title'])?htmlspecialchars($_POST['title']):''); ?>" required> <span id="time"><input id="time_input" type="text" pattern="(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))" name="time" value="<?php echo (isset($_POST['time'])?htmlspecialchars($_POST['time']):''); ?>" class="pull-right" title="Use ISO 8601 format (e.g. 2017-11-23T19:50:51+00:00)" placeholder="<?php echo _("Time");?>">
|
||||
<input id="time_input_js" name="time_js" type="hidden" class="pull-right">
|
||||
<article class="card new border-primary mb-3">
|
||||
<div class="card-colore icon bg-primary"><i class="fa fa-info"></i></div>
|
||||
<div class="card-colore card-header bg-primary border-primary">
|
||||
<input type="text" name="title" id="title" placeholder="<?php echo _("Title"); ?>" value="<?php echo (isset($_POST['title']) ? htmlspecialchars($_POST['title']) : ''); ?>" required>
|
||||
<span id="time" class="float-end">
|
||||
<input id="time_input" type="text" pattern="(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))" name="time" value="<?php echo (isset($_POST['time']) ? htmlspecialchars($_POST['time']) : ''); ?>" title="Use ISO 8601 format (e.g. 2017-11-23T19:50:51+00:00)" placeholder="<?php echo _("Time"); ?>">
|
||||
<input id="time_input_js" name="time_js" type="hidden">
|
||||
</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<textarea name="text" placeholder="<?php echo _("Here goes your text...");?>" required><?php echo (isset($_POST['text'])?htmlspecialchars($_POST['text']):''); ?></textarea>
|
||||
<div class="card-body text-primary">
|
||||
<p class="card-text"><textarea name="text" placeholder="<?php echo _("Here goes your text..."); ?>" required><?php echo (isset($_POST['text']) ? htmlspecialchars($_POST['text']) : ''); ?></textarea></p>
|
||||
</div>
|
||||
<div class="panel-footer clearfix">
|
||||
<small><?php echo _("Posted by");?>: <?php echo $user->get_username();?> <span class="pull-right" id="end_time_wrapper"><?php echo _("Ending");?>: <input id="end_time" title="Use ISO 8601 format (e.g. 2017-11-23T19:50:51+00:00)" type="text" pattern="(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))" name="end_time" class="pull-right" placeholder="<?php echo _("End time");?>" value="<?php echo (isset($_POST['end_time'])?htmlspecialchars($_POST['end_time']):''); ?>"></span></small>
|
||||
<input id="end_time_js" name="end_time_js" type="hidden" class="pull-right">
|
||||
<div class="card-footer bg-transparent border-primary">
|
||||
<small><?php echo _("Posted by"); ?>: <?php echo $user->get_username(); ?></small>
|
||||
<span class="float-end" id="end_time_wrapper"><?php echo _("Ending"); ?>:
|
||||
<input id="end_time" title="Use ISO 8601 format (e.g. 2017-11-23T19:50:51+00:00)" type="text" pattern="(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))" name="end_time" placeholder="<?php echo _("End time"); ?>" value="<?php echo (isset($_POST['end_time']) ? htmlspecialchars($_POST['end_time']) : ''); ?>">
|
||||
<input id="end_time_js" name="end_time_js" type="hidden">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<select class="form-control pull-left" id="type" name="type">
|
||||
</article>
|
||||
<div class="input-group">
|
||||
<select class="form-select" id="type" name="type">
|
||||
<?php
|
||||
if (isset($_POST['type']))
|
||||
{
|
||||
if (isset($_POST['type'])) {
|
||||
$selected_status = $_POST['type'];
|
||||
}else
|
||||
{
|
||||
} else {
|
||||
$selected_status = 2;
|
||||
}
|
||||
|
||||
@ -99,7 +102,8 @@ Template::render_header(_("Dashboard"), true);
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-primary pull-right"><?php echo _("Submit");?></button>
|
||||
<button class="card-colore btn btn-secondary" type="submit"><?php echo _("Submit"); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
$constellation->render_incidents(true, $offset, 5, true);
|
||||
|
@ -1,10 +1,8 @@
|
||||
<?php
|
||||
|
||||
if (!file_exists("../config.php"))
|
||||
{
|
||||
if (!file_exists("../config.php")) {
|
||||
header("Location: ../");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
require_once("../config.php");
|
||||
require_once("../classes/constellation.php");
|
||||
require_once("../classes/mailer.php");
|
||||
@ -39,52 +37,39 @@ else{
|
||||
|
||||
// Process the subscriber notification queue
|
||||
// If CRON_SERVER_IP is not set, call notification once incident has been saved
|
||||
if ( empty(CRON_SERVER_IP) )
|
||||
{
|
||||
if ( isset($_GET['sent']) && $_GET['sent'] == true )
|
||||
{
|
||||
if (empty(CRON_SERVER_IP)) {
|
||||
if (isset($_GET['sent']) && $_GET['sent'] == true) {
|
||||
Queue::process_queue();
|
||||
}
|
||||
}
|
||||
else if ( isset($_GET['task']) && $_GET['task'] == 'cron' )
|
||||
{
|
||||
} else if (isset($_GET['task']) && $_GET['task'] == 'cron') {
|
||||
// Else, base it on call to /admin?task=cron being called from IP defined by CRON_SERVER_IP
|
||||
if (! empty(CRON_SERVER_IP) && $_SERVER['REMOTE_ADDR'] == CRON_SERVER_IP )
|
||||
{
|
||||
if (!empty(CRON_SERVER_IP) && $_SERVER['REMOTE_ADDR'] == CRON_SERVER_IP) {
|
||||
Queue::process_queue();
|
||||
syslog(1, "CRON server processed");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
syslog(1, "CRON called from unauthorised server");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(isset($_COOKIE['user'])&&!isset($_SESSION['user']))
|
||||
{
|
||||
if (isset($_COOKIE['user']) && !isset($_SESSION['user'])) {
|
||||
User::restore_session();
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['user']))
|
||||
{
|
||||
if (isset($_GET['do']) && $_GET['do']=="lost-password")
|
||||
{
|
||||
if (!isset($_SESSION['user'])) {
|
||||
if (isset($_GET['do']) && $_GET['do'] == "lost-password") {
|
||||
require_once("lost-password.php");
|
||||
} else if (isset($_GET['do']) && $_GET['do'] == "change-email") {
|
||||
$user_pwd = new User($_GET['id']);
|
||||
$user_pwd->change_email();
|
||||
require_once("login-form.php");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
User::login();
|
||||
require_once("login-form.php");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$user = new User($_SESSION['user']);
|
||||
if (!$user->is_active())
|
||||
{
|
||||
if (!$user->is_active()) {
|
||||
User::logout();
|
||||
}
|
||||
|
||||
|
@ -1,30 +1,40 @@
|
||||
<?php
|
||||
Template::render_header(_("Login"));
|
||||
Template::render_header(_("Login"), "login");
|
||||
?>
|
||||
<div class="text-center">
|
||||
<h1><?php echo _("Login"); ?></h1>
|
||||
</div>
|
||||
<div id="login-form" class="center">
|
||||
<div class="wrapper">
|
||||
<?php if (isset($message)) { ?>
|
||||
<p class="alert alert-danger"><?php echo $message ?></p>
|
||||
<?php } else { ?>
|
||||
<p class="alert alert-info"><?php echo _("Please login to continue."); ?></p>
|
||||
<?php } ?>
|
||||
<form action="<?php echo WEB_URL; ?>/admin/" method="post">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h1><?php echo _("Login"); ?></h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><i class="fas fa-at"></i></span>
|
||||
<input type="email" id="email" name="email" class="form-control" placeholder="<?php echo _("Email"); ?>" value="<?php echo htmlspecialchars((isset($_POST['email']) ? $_POST['email'] : ''), ENT_QUOTES); ?>" required>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text"><i class="fas fa-key"></i></span>
|
||||
<input type="password" id="pass" name="pass" class="form-control" placeholder="<?php echo _("Password"); ?>" required>
|
||||
</div>
|
||||
<a href="<?php echo WEB_URL; ?>/admin/?do=lost-password" class="float-end" tabindex="5"><?php echo _("Forgotten password?"); ?></a>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-text nrbr">
|
||||
<input type="checkbox" name="remember" id="remember">
|
||||
</div>
|
||||
<label class="input-group-append input-group-text nlbr nobg" for="remember"><?php echo _("Remember me"); ?></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email"><?php echo _("Email");?></label>
|
||||
<input placeholder="<?php echo _("Email");?>" class="form-control" name="email" id="email" type="email" tabindex="1" value="<?php echo htmlspecialchars((isset($_POST['email'])?$_POST['email']:''),ENT_QUOTES);?>" required>
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom: 8px">
|
||||
<label for="pass"><?php echo _("Password");?></label>
|
||||
<input placeholder="<?php echo _("Password");?>" class="form-control" name="pass" id="pass" type="password" tabindex="2" required>
|
||||
<div style="padding-top: 8px; position: relative;">
|
||||
<a href="<?php echo WEB_URL;?>/admin/?do=lost-password" class="pull-right noselect" tabindex="5"><?php echo _("Forgotten password?");?></a>
|
||||
<input name="remember" id="remember" type="checkbox" tabindex="3"> <label class="lbl-login noselect" style="color: black;" for="remember"><?php echo _("Remember me");?></label>
|
||||
<input type="submit" value="<?php echo _("Login"); ?>" class="btn btn-success float-end">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group clearfix">
|
||||
<button type="submit" class="btn btn-success pull-right" tabindex="4"><?php echo _("Login");?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
Template::render_header(_("Lost password"));
|
||||
Template::render_header(_("Lost password"), "lostpw");
|
||||
?>
|
||||
<div class="text-center">
|
||||
<h1><?php echo _("Lost password"); ?></h1>
|
||||
@ -7,36 +7,30 @@ Template::render_header(_("Lost password"));
|
||||
<div id="login-form" class="center">
|
||||
|
||||
<?php
|
||||
if (isset($_POST['id']))
|
||||
{
|
||||
if (isset($_POST['id'])) {
|
||||
$user = new User($_POST['id']);
|
||||
$user->change_password($_POST['token']);
|
||||
if (isset($message)) { ?>
|
||||
<p class="alert alert-danger"><?php echo $message ?></p>
|
||||
<a href="<?php echo WEB_URL; ?>/admin/?do=lost-password<?php echo "&id=" . $_POST['id'] . "&token=" . $_POST['token']; ?>"><?php echo _("Go back"); ?> </a>
|
||||
<?php
|
||||
}
|
||||
else{?>
|
||||
} else { ?>
|
||||
<p class="alert alert-success"><?php echo _("Password changed successfully!"); ?></p>
|
||||
<a href="<?php echo WEB_URL; ?>/admin/"><?php echo _("Go back to login page"); ?></a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else if (isset($_POST['email']))
|
||||
{
|
||||
} else if (isset($_POST['email'])) {
|
||||
User::password_link();
|
||||
if (isset($message)) { ?>
|
||||
<p class="alert alert-danger"><?php echo $message ?></p>
|
||||
<a href="<?php echo WEB_URL; ?>/admin/?do=lost-password"><?php echo _("Go back to start"); ?></a>
|
||||
<?php
|
||||
}
|
||||
else{?>
|
||||
} else { ?>
|
||||
<p class="alert alert-success"><?php echo _("Email with password reset link has been sent!"); ?></p>
|
||||
<a href="<?php echo WEB_URL; ?>/admin/"><?php echo _("Go back to login page"); ?></a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
|
||||
if (isset($message)) { ?>
|
||||
<p class="alert alert-danger"><?php echo $message ?></p>
|
||||
@ -44,14 +38,13 @@ Template::render_header(_("Lost password"));
|
||||
<form action="<?php echo WEB_URL; ?>/admin/?do=lost-password" method="post">
|
||||
<?php if (!isset($_GET['id']) || !isset($_GET['token'])) { ?>
|
||||
<label for="email"><?php echo _("Email"); ?>:</label>
|
||||
<div class="input-group pull-right">
|
||||
<div class="input-group float-end">
|
||||
<input class="form-control" name="email" id="email" placeholder="<?php echo _("Email"); ?>" type="email" required>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-success pull-right"><?php echo _("Submit request");?></button>
|
||||
<button type="submit" class="btn btn-success float-end"><?php echo _("Submit request"); ?></button>
|
||||
</span>
|
||||
</div>
|
||||
<?php }
|
||||
else{
|
||||
<?php } else {
|
||||
$user = new User($_GET['id']);
|
||||
?>
|
||||
<p class="alert alert-info"><?php printf(_("Reset password for %s (%s)"), $user->get_name(), $user->get_username()); ?></p>
|
||||
@ -61,7 +54,7 @@ Template::render_header(_("Lost password"));
|
||||
<input id="new_password" placeholder="<?php echo _("New password"); ?>" type="password" class="form-control" name="password">
|
||||
<label for="new_password_check"><?php echo _("Repeat password"); ?></label>
|
||||
<input id="new_password_check" placeholder="<?php echo _("Repeat password"); ?>" type="password" class="form-control" name="password_repeat">
|
||||
<button type="submit" class="btn btn-primary pull-right margin-top"><?php echo _("Change password");?></button>
|
||||
<button type="submit" class="btn btn-primary float-end margin-top"><?php echo _("Change password"); ?></button>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -1,17 +1,15 @@
|
||||
<?php
|
||||
if (isset($_GET['new']))
|
||||
{
|
||||
if (isset($_GET['new'])) {
|
||||
User::add();
|
||||
}
|
||||
|
||||
Template::render_header(_("New user"), true); ?>
|
||||
Template::render_header(_("New user"), "newuser", true); ?>
|
||||
<div class="text-center">
|
||||
<h2>Add new user</h2>
|
||||
</div>
|
||||
|
||||
<form action="<?php echo WEB_URL; ?>/admin/?do=new-user&new=user" method="POST" class="form-horizontal">
|
||||
<?php if (isset($message))
|
||||
{?>
|
||||
<?php if (isset($message)) { ?>
|
||||
<p class="alert alert-danger"><?php echo $message ?></p>
|
||||
<?php
|
||||
} ?>
|
||||
@ -29,20 +27,15 @@ Template::render_header(_("New user"), true); ?>
|
||||
<label for="permission"><?php echo _("Permission"); ?>: </label>
|
||||
<select name="permission" id="permission" class="form-control">
|
||||
<?php
|
||||
if (!empty($_POST['permission']))
|
||||
{
|
||||
if (!empty($_POST['permission'])) {
|
||||
$permission = $_POST['permission'];
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$permission = 2;
|
||||
}
|
||||
foreach ($permissions as $key => $value) {
|
||||
if ($permission == $key)
|
||||
{
|
||||
if ($permission == $key) {
|
||||
echo '<option value="' . $key . '" selected>' . $value . '</option>';
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
echo '<option value="' . $key . '">' . $value . '</option>';
|
||||
}
|
||||
}
|
||||
@ -50,5 +43,5 @@ Template::render_header(_("New user"), true); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary pull-right"><?php echo _("Submit");?></button>
|
||||
<button type="submit" class="btn btn-primary float-end"><?php echo _("Submit"); ?></button>
|
||||
</form>
|
@ -1,15 +1,14 @@
|
||||
<?php
|
||||
function getToggle($variable){
|
||||
function getToggle($variable)
|
||||
{
|
||||
$res = ((isset($variable) && ($variable == "on")) ? "yes" : "no");
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
if (!file_exists("../config.php"))
|
||||
{
|
||||
if (!file_exists("../config.php")) {
|
||||
header("Location: ../");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
require_once("../config.php");
|
||||
require_once("../classes/constellation.php");
|
||||
require_once("../classes/mailer.php");
|
||||
@ -93,36 +92,35 @@ else{
|
||||
define("CRON_SERVER_IP", $db->getSetting($mysqli,"cron_server_ip"));
|
||||
*/
|
||||
}
|
||||
Template::render_header(_("Options"), true);
|
||||
Template::render_header(_("Options"), "options", true);
|
||||
?>
|
||||
<div class="text-center">
|
||||
<h2><?php if($set_post){ echo "Settings Saved"; } else { echo "Server Status Options"; } ?></h2>
|
||||
<h2><?php if ($set_post) {
|
||||
echo "Settings Saved";
|
||||
} else {
|
||||
echo "Server Status Options";
|
||||
} ?></h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<form id="options" method="post">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<?php Template::render_toggle("Notify Updates", "nu_toggle", $notifyUpdates_status); ?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Site Name</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="" aria-label="Username" aria-describedby="basic-addon1" name="sitename" value="<?php echo NAME; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<?php Template::render_toggle("Enable Email Subscription", "email_subscription_toggle", $emailSubscription_status); ?>
|
||||
<?php Template::render_toggle("Enable Telegram Subscription","telegram_subscription_toggle",$telegramSubscription_status); ?>
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Telegram BOT API Token</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="" aria-label="telegram_bot_api_token" aria-describedby="basic-addon1" name="tg_bot_api_token" value="<?php echo $tg_bot_api_token; ?>">
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Telegram BOT Username</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="" aria-label="telegram_bot_username" aria-describedby="basic-addon1" name="tg_bot_username" value="<?php echo $tg_bot_username; ?>">
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<?php Template::render_toggle("Use PHPMailer for notifications", "php_mailer_toggle", $php_mailer_status); ?>
|
||||
<?php Template::render_toggle("Use SMTP with PHPMailer", "php_mailer_smtp_toggle", $php_mailer_smtp_status); ?>
|
||||
<?php Template::render_toggle("Use Secure SMTP with PHPMailer", "php_mailer_secure_toggle", $php_mailer_secure_status); ?>
|
||||
@ -162,8 +160,34 @@ else{
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="" aria-label="cron_server_ip" aria-describedby="basic-addon1" name="cron_server_ip" value="<?php echo $cron_server_ip; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<?php Template::render_toggle("Enable Telegram Subscription", "telegram_subscription_toggle", $telegramSubscription_status); ?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Telegram BOT API Token</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="" aria-label="telegram_bot_api_token" aria-describedby="basic-addon1" name="tg_bot_api_token" value="<?php echo $tg_bot_api_token; ?>">
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Telegram BOT Username</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="" aria-label="telegram_bot_username" aria-describedby="basic-addon1" name="tg_bot_username" value="<?php echo $tg_bot_username; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<?php Template::render_toggle("Use Google reChaptcha for subscriber signup", "google_rechaptcha_toggle", $google_rechaptcha_status); ?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Google reChaptcha Sitekey</span>
|
||||
@ -176,8 +200,10 @@ else{
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="" aria-label="google_secret" aria-describedby="basic-addon1" name="google_recaptcha_secret" value="<?php echo $google_recaptcha_secret; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button class="btn btn-primary pull-right" type="submit">Save Settings</button>
|
||||
<div class="card mt-3 mb-3" style="border: none;">
|
||||
<button class="btn btn-primary float-end" type="submit">Save Settings</button>
|
||||
</div>
|
||||
</form>
|
@ -1,16 +1,13 @@
|
||||
<?php
|
||||
if (isset($_GET['new']))
|
||||
{
|
||||
if (isset($_GET['new'])) {
|
||||
ServiceGroup::add();
|
||||
}
|
||||
|
||||
if (isset($_GET['edit']))
|
||||
{
|
||||
if (isset($_GET['edit'])) {
|
||||
ServiceGroup::edit();
|
||||
}
|
||||
|
||||
if (isset($_GET['delete']))
|
||||
{
|
||||
if (isset($_GET['delete'])) {
|
||||
ServiceGroup::delete();
|
||||
}
|
||||
|
||||
@ -35,27 +32,24 @@ if ( isset($_GET['id']) && !isset($_POST['id']) ) {
|
||||
|
||||
if (!$boolEdit) {
|
||||
|
||||
Template::render_header(_("New service group"), true); ?>
|
||||
Template::render_header(_("New service group"), "servicegroup", true); ?>
|
||||
<div class="text-center">
|
||||
<h2><?php echo _("Add new service group"); ?></h2>
|
||||
</div>
|
||||
<?php
|
||||
$form_url = WEB_URL . '/admin/?do=new-service-group&new=group';
|
||||
|
||||
} else {
|
||||
Template::render_header(_("Edit service group"), true); ?>
|
||||
Template::render_header(_("Edit service group"), "servicegroup", true); ?>
|
||||
<div class="text-center">
|
||||
<h2><?php echo _("Edit service group"); ?></h2>
|
||||
</div>
|
||||
<?php
|
||||
$form_url = WEB_URL . '/admin/?do=edit-service-group&edit&id=' . $group_id;
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="<?php echo $form_url; ?>" method="POST" class="form-horizontal">
|
||||
<?php if (isset($message))
|
||||
{?>
|
||||
<?php if (isset($message)) { ?>
|
||||
<p class="alert alert-danger"><?php echo $message ?></p>
|
||||
<?php
|
||||
} ?>
|
||||
@ -68,21 +62,16 @@ $form_url = WEB_URL .'/admin/?do=new-service-group&new=group';
|
||||
<label for="visibility_id"><?php echo _("Visibility"); ?>: </label>
|
||||
<select name="visibility_id" id="visibility_id" class="form-control">
|
||||
<?php
|
||||
if (!empty($visibility_id_value))
|
||||
{
|
||||
if (!empty($visibility_id_value)) {
|
||||
$visibility_id = $visibility_id_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$visibility_id = null;
|
||||
}
|
||||
//$visibilitys = Service::get_groups();
|
||||
foreach ($visibility as $key => $value) {
|
||||
if ($visibility_id == $key)
|
||||
{
|
||||
if ($visibility_id == $key) {
|
||||
echo '<option value="' . $key . '" selected>' . $value . '</option>';
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
echo '<option value="' . $key . '">' . $value . '</option>';
|
||||
}
|
||||
}
|
||||
@ -95,5 +84,5 @@ $form_url = WEB_URL .'/admin/?do=new-service-group&new=group';
|
||||
echo '<input type="hidden" id="id" name="id" value="' . $group_id . '">';
|
||||
}
|
||||
?>
|
||||
<button type="submit" class="btn btn-primary pull-right"><?php echo _("Submit");?></button>
|
||||
<button type="submit" class="btn btn-primary float-end"><?php echo _("Submit"); ?></button>
|
||||
</form>
|
@ -1,11 +1,9 @@
|
||||
<?php
|
||||
if (isset($_GET['new']))
|
||||
{
|
||||
if (isset($_GET['new'])) {
|
||||
Service::add();
|
||||
}
|
||||
|
||||
if (isset($_GET['edit']))
|
||||
{
|
||||
if (isset($_GET['edit'])) {
|
||||
Service::edit();
|
||||
}
|
||||
|
||||
@ -36,14 +34,14 @@ if ( isset($_GET['id']) && !isset($_POST['id']) ) {
|
||||
|
||||
if (!$boolEdit) {
|
||||
|
||||
Template::render_header(_("New service"), true); ?>
|
||||
Template::render_header(_("New service"), "service", true); ?>
|
||||
<div class="text-center">
|
||||
<h2><?php echo _("Add new service"); ?></h2>
|
||||
</div>
|
||||
<?php
|
||||
$form_url = WEB_URL . '/admin/?do=new-service&new=service';
|
||||
} else {
|
||||
Template::render_header(_("New service"), true); ?>
|
||||
Template::render_header(_("New service"), "service", true); ?>
|
||||
<div class="text-center">
|
||||
<h2><?php echo _("Add new service"); ?></h2>
|
||||
</div>
|
||||
@ -52,8 +50,7 @@ $form_url = WEB_URL . '/admin/?do=new-service&new=service';
|
||||
}
|
||||
?>
|
||||
<form action="<?php echo $form_url; ?>" method="POST" class="form-horizontal">
|
||||
<?php if (isset($message))
|
||||
{?>
|
||||
<?php if (isset($message)) { ?>
|
||||
<p class="alert alert-danger"><?php echo $message ?></p>
|
||||
<?php
|
||||
} ?>
|
||||
@ -66,21 +63,16 @@ $form_url = WEB_URL . '/admin/?do=new-service&new=service';
|
||||
<label for="group_id"><?php echo _("Service Group"); ?>: </label>
|
||||
<select name="group_id" id="group_id" class="form-control">
|
||||
<?php
|
||||
if (!empty($group_id_value))
|
||||
{
|
||||
if (!empty($group_id_value)) {
|
||||
$group_id = $group_id_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$group_id = null;
|
||||
}
|
||||
$groups = ServiceGroup::get_groups();
|
||||
foreach ($groups as $key => $value) {
|
||||
if ($group_id == $key)
|
||||
{
|
||||
if ($group_id == $key) {
|
||||
echo '<option value="' . $key . '" selected>' . $value . '</option>';
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
echo '<option value="' . $key . '">' . $value . '</option>';
|
||||
}
|
||||
}
|
||||
@ -93,5 +85,5 @@ $form_url = WEB_URL . '/admin/?do=new-service&new=service';
|
||||
echo '<input type="hidden" id="id" name="id" value="' . $service_id . '">';
|
||||
}
|
||||
?>
|
||||
<button type="submit" class="btn btn-primary pull-right"><?php echo _("Submit");?></button>
|
||||
<button type="submit" class="btn btn-primary float-end"><?php echo _("Submit"); ?></button>
|
||||
</form>
|
@ -1,15 +1,13 @@
|
||||
<?php
|
||||
if (isset($_GET['delete']) && isset($_GET['type']))
|
||||
{
|
||||
if (isset($_GET['delete']) && isset($_GET['type'])) {
|
||||
if ($_GET['type'] == 'service') {
|
||||
Service::delete();
|
||||
}
|
||||
elseif ( $_GET['type'] == 'groups') {
|
||||
} elseif ($_GET['type'] == 'groups') {
|
||||
ServiceGroup::delete();
|
||||
}
|
||||
}
|
||||
|
||||
Template::render_header(_("Settings"), true);
|
||||
Template::render_header(_("Settings"), "settings", true);
|
||||
?>
|
||||
<div class="text-center">
|
||||
<h2>Settings</h2>
|
||||
@ -20,24 +18,26 @@ if (isset($message)){
|
||||
<p class="alert alert-danger"><?php echo $message; ?></p>
|
||||
<?php } ?>
|
||||
<section>
|
||||
<h3 class="pull-left"><?php echo _("Services");?></h3>
|
||||
<div class="settings-header">
|
||||
<div class="float-end">
|
||||
<?php if ($user->get_rank() <= 1) { ?>
|
||||
<form action="?do=settings&new=service" method="post">
|
||||
<div class="input-group pull-right new-service">
|
||||
<a href="<?php echo WEB_URL;?>/admin/?do=new-service" class="btn btn-success pull-right"><?php echo _("Add new service");?></a>
|
||||
</div>
|
||||
</form>
|
||||
<a href="<?php echo WEB_URL; ?>/admin/?do=new-service" class="btn btn-success" role="button"><?php echo _("Add new service"); ?></a>
|
||||
<?php } ?>
|
||||
<div class="table-responsive">
|
||||
</div>
|
||||
<div class="float-start">
|
||||
<h3><?php echo _("Services"); ?></h3>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div>
|
||||
<table class="table">
|
||||
|
||||
<thead><tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<!--<th scope="col"><?php echo _("ID"); ?></th>-->
|
||||
<th scope="col"><?php echo _("Name"); ?></th>
|
||||
<th scope="col"><?php echo _("Description"); ?></th>
|
||||
<th scope="col"><?php echo _("Group"); ?></th>
|
||||
<?php if ($user->get_rank()<=1)
|
||||
{?>
|
||||
<?php if ($user->get_rank() <= 1) { ?>
|
||||
<th scope="col"><?php echo _("Delete"); ?></th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
@ -45,17 +45,15 @@ if (isset($message)){
|
||||
<tbody>
|
||||
<?php
|
||||
$query = $mysqli->query("SELECT services.*, services_groups.name AS group_name FROM `services` LEFT JOIN services_groups ON services.group_id = services_groups.id ORDER BY services.name ASC");
|
||||
while($result = $query->fetch_assoc())
|
||||
{
|
||||
while ($result = $query->fetch_assoc()) {
|
||||
echo "<tr>";
|
||||
//echo "<td>".$result['id']."</td>";
|
||||
echo '<td><a href="' . WEB_URL . '/admin?do=edit-service&id=' . $result['id'] . '">' . $result['name'] . '</a></th>';
|
||||
echo "<td>" . $result['description'] . "</td>";
|
||||
echo "<td>" . $result['group_name'] . "</td>";
|
||||
|
||||
if ($user->get_rank()<=1)
|
||||
{
|
||||
echo '<td><a href="'.WEB_URL.'/admin/?do=settings&type=service&delete='.$result['id'].'" class="pull-right delete-service"><i class="fa fa-trash"></i></a></td>';
|
||||
if ($user->get_rank() <= 1) {
|
||||
echo '<td class="text-center"><a href="' . WEB_URL . '/admin/?do=settings&type=service&delete=' . $result['id'] . '" class="link-danger"><i class="fa fa-trash"></i></a></td>';
|
||||
}
|
||||
echo "</tr>";
|
||||
} ?>
|
||||
@ -65,34 +63,37 @@ if (isset($message)){
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3 class="pull-left"><?php echo _("Services Groups");?></h3>
|
||||
<div class="settings-header">
|
||||
<div class="float-end">
|
||||
<?php if ($user->get_rank() <= 1) { ?>
|
||||
<form action="?do=settings&new=service-group" method="post">
|
||||
<div class="input-group pull-right new-service">
|
||||
<a href="<?php echo WEB_URL;?>/admin/?do=new-service-group" class="btn btn-success pull-right"><?php echo _("Add new service group");?></a>
|
||||
</div>
|
||||
</form>
|
||||
<a href="<?php echo WEB_URL; ?>/admin/?do=new-service-group" class="btn btn-success" role="button"><?php echo _("Add new service group"); ?></a>
|
||||
<?php } ?>
|
||||
<div class="table-responsive">
|
||||
</div>
|
||||
<div class="float-start">
|
||||
<h3><?php echo _("Services Groups"); ?></h3>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<table class="table">
|
||||
|
||||
<thead><tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<!--<th scope="col"><?php echo _("ID"); ?></th>-->
|
||||
<th scope="col"><?php echo _("Group Name"); ?></th>
|
||||
<th scope="col"><?php echo _("In use by"); ?></th>
|
||||
<th scope="col"><?php echo _("Description"); ?></th>
|
||||
<th scope="col"><?php echo _("Visibility"); ?></th>
|
||||
<?php if ($user->get_rank()<=1)
|
||||
{?>
|
||||
<th scope="col"><?php echo _("Delete");?></th>
|
||||
<?php if ($user->get_rank() <= 1) { ?>
|
||||
<th scope="col" class="text-center"><?php echo _("Delete"); ?></th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$query = $mysqli->query("SELECT sg.* , (SELECT COUNT(*) FROM services WHERE services.group_id = sg.id) AS counter FROM services_groups AS sg ORDER BY sg.id ASC");
|
||||
while($result = $query->fetch_assoc())
|
||||
{
|
||||
while ($result = $query->fetch_assoc()) {
|
||||
echo "<tr>";
|
||||
//echo "<td>".$result['id']."</td>";
|
||||
echo '<td><a href="' . WEB_URL . '/admin?do=edit-service-group&id=' . $result['id'] . '">' . $result['name'] . '</a></th>';
|
||||
@ -100,9 +101,8 @@ if (isset($message)){
|
||||
echo "<td>" . $result['description'] . "</td>";
|
||||
echo "<td>" . $visibility[$result['visibility']] . "</td>";
|
||||
|
||||
if ($user->get_rank()<=1)
|
||||
{
|
||||
echo '<td><a href="'.WEB_URL.'/admin/?do=settings&type=groups&delete='.$result['id'].'" class="pull-right delete-service"><i class="fa fa-trash"></i></a></td>';
|
||||
if ($user->get_rank() <= 1) {
|
||||
echo '<td class="text-center"><a href="' . WEB_URL . '/admin/?do=settings&type=groups&delete=' . $result['id'] . '" class=" link-danger"><i class="fa fa-trash"></i></a></td>';
|
||||
}
|
||||
echo "</tr>";
|
||||
} ?>
|
||||
@ -111,28 +111,44 @@ if (isset($message)){
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
<h3 class="pull-left"><?php echo _("Users");?></h3>
|
||||
<?php if ($user->get_rank() == 0){?> <a href="<?php echo WEB_URL;?>/admin/?do=new-user" class="btn btn-success pull-right"><?php echo _("Add new user");?></a><?php }?>
|
||||
<div class="table-responsive">
|
||||
<div class="settings-header">
|
||||
<div class="float-end">
|
||||
<?php if ($user->get_rank() == 0) { ?>
|
||||
<a href="<?php echo WEB_URL; ?>/admin/?do=new-user" class="btn btn-success" role="button"><?php echo _("Add new user"); ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="float-start">
|
||||
<h3><?php echo _("Users"); ?></h3>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<table class="table">
|
||||
|
||||
<thead><tr><th scope="col"><?php echo _("ID");?></th><th scope="col"><?php echo _("Username");?></th><th scope="col"><?php echo _("Name");?></th><th scope="col"><?php echo _("Surname");?></th><th scope="col"><?php echo _("Email");?></th><th scope="col"><?php echo _("Role");?></th><th scope="col">Active</th></tr></thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><?php echo _("ID"); ?></th>
|
||||
<th scope="col"><?php echo _("Username"); ?></th>
|
||||
<th scope="col"><?php echo _("Name"); ?></th>
|
||||
<th scope="col"><?php echo _("Surname"); ?></th>
|
||||
<th scope="col"><?php echo _("Email"); ?></th>
|
||||
<th scope="col"><?php echo _("Role"); ?></th>
|
||||
<th scope="col" class="text-center">Active</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$query = $mysqli->query("SELECT * FROM users");
|
||||
while($result = $query->fetch_assoc())
|
||||
{
|
||||
while ($result = $query->fetch_assoc()) {
|
||||
echo "<tr>";
|
||||
echo "<td>" . $result['id'] . "</td>";
|
||||
echo "<td><a href='" . WEB_URL . "/admin/?do=user&id=" . $result['id'] . "'>" . $result['username'] . "</a></td>";
|
||||
echo "<td>" . $result['name'] . "</td>";
|
||||
echo "<td>" . $result['surname'] . "</td>";
|
||||
echo "<td><a href=\"mailto:" . $result['email'] . "\">" . $result['email'] . "</a></td>";
|
||||
echo "<td>".$permissions[$result['permission']]."</td><td>";
|
||||
echo "<i class='fa fa-".($result['active']?"check success":"times danger")."'></i>";
|
||||
echo "</td>";
|
||||
echo "<td>" . $permissions[$result['permission']] . "</td>";
|
||||
echo "<td class=\"text-center\"><i class='fa fa-" . ($result['active'] ? "check success" : "times danger") . "'></i></td>";
|
||||
echo "</tr>";
|
||||
} ?>
|
||||
</tbody>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
$id = $_SESSION['user'];
|
||||
if (isset($_GET['id']))
|
||||
{
|
||||
if (isset($_GET['id'])) {
|
||||
$id = $_GET['id'];
|
||||
}
|
||||
try {
|
||||
@ -11,44 +10,37 @@ try {
|
||||
}
|
||||
|
||||
|
||||
if (isset($_POST['password']))
|
||||
{
|
||||
if (isset($_POST['password'])) {
|
||||
$displayed_user->change_password();
|
||||
}
|
||||
|
||||
if (isset($_POST['username']))
|
||||
{
|
||||
if (isset($_POST['username'])) {
|
||||
$displayed_user->change_username();
|
||||
}
|
||||
|
||||
if (isset($_POST['name']))
|
||||
{
|
||||
if (isset($_POST['name'])) {
|
||||
$displayed_user->change_name();
|
||||
}
|
||||
|
||||
if (isset($_POST['email']))
|
||||
{
|
||||
if (isset($_POST['email'])) {
|
||||
$success = $displayed_user->email_link();
|
||||
}
|
||||
|
||||
if (isset($_POST['permission']))
|
||||
{
|
||||
if (isset($_POST['permission'])) {
|
||||
$displayed_user->change_permission();
|
||||
}
|
||||
|
||||
|
||||
if (isset($_GET['what']) && $_GET['what']=='toggle')
|
||||
{
|
||||
if (isset($_GET['what']) && $_GET['what'] == 'toggle') {
|
||||
$displayed_user->toggle();
|
||||
}
|
||||
|
||||
Template::render_header(_("User"), true);
|
||||
Template::render_header(_("User"), "user", true);
|
||||
|
||||
?>
|
||||
<div class="text-center">
|
||||
<h1><?php
|
||||
if ($_SESSION['user'] == $_GET['id'])
|
||||
{
|
||||
if ($_SESSION['user'] == $_GET['id']) {
|
||||
echo _("User settings");
|
||||
} else {
|
||||
echo _("User");
|
||||
|
@ -1,10 +1,8 @@
|
||||
<?php
|
||||
|
||||
if (!file_exists("../config.php"))
|
||||
{
|
||||
if (!file_exists("../config.php")) {
|
||||
header("Location: ../");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
require_once("../config.php");
|
||||
require_once("../classes/constellation.php");
|
||||
|
||||
|
@ -1,17 +1,14 @@
|
||||
<?php
|
||||
|
||||
if (!file_exists("../config.php"))
|
||||
{
|
||||
if (!file_exists("../config.php")) {
|
||||
header("Location: ../");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
require_once("../config.php");
|
||||
require_once("../classes/constellation.php");
|
||||
header('Cache-Control: no-cache');
|
||||
header('Content-type: application/json');
|
||||
|
||||
if (!isset($_GET['id']))
|
||||
{
|
||||
if (!isset($_GET['id'])) {
|
||||
$array = $constellation->render_status(true, false);
|
||||
echo json_encode($array);
|
||||
} else {
|
||||
@ -19,8 +16,7 @@ else{
|
||||
$query->bind_param("i", $_GET['id']);
|
||||
$query->execute();
|
||||
$result = $query->get_result()->fetch_assoc();
|
||||
if (!count($result))
|
||||
{
|
||||
if (!count($result)) {
|
||||
die(json_encode(["error" => _("Service does not exist!")]));
|
||||
}
|
||||
|
||||
@ -29,11 +25,9 @@ else{
|
||||
$sql->bind_param("iii", $id, $timestamp, $timestamp);
|
||||
$sql->execute();
|
||||
$tmp = $sql->get_result();
|
||||
if ($tmp->num_rows)
|
||||
{
|
||||
if ($tmp->num_rows) {
|
||||
$service = new Service($_GET['id'], $result['name'], $tmp->fetch_assoc()['type']);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$service = new Service($_GET['id'], $result['name']);
|
||||
}
|
||||
|
||||
|
@ -18,9 +18,9 @@ class Constellation
|
||||
* @param int $limit - limits the number of incidents rendered
|
||||
* @param Boolean $admin - specifies whether to render admin controls
|
||||
*/
|
||||
public function render_incidents($future=false, $offset=0, $limit = 5, $admin = 0){
|
||||
if ($offset<0)
|
||||
public function render_incidents($future = false, $offset = 0, $limit = 5, $admin = 0)
|
||||
{
|
||||
if ($offset < 0) {
|
||||
$offset = 0;
|
||||
}
|
||||
|
||||
@ -32,20 +32,14 @@ class Constellation
|
||||
|
||||
$ajax = isset($_GET['ajax']);
|
||||
|
||||
if ($future && count($incidents["incidents"]) && !$ajax)
|
||||
{
|
||||
if ($future && count($incidents["incidents"]) && !$ajax) {
|
||||
echo "<h3>" . _("Planned maintenance") . "</h3>";
|
||||
}
|
||||
else if (count($incidents["incidents"]) &&!$ajax)
|
||||
{
|
||||
if ($offset)
|
||||
{
|
||||
} else if (count($incidents["incidents"]) && !$ajax) {
|
||||
if ($offset) {
|
||||
echo '<noscript><div class="centered"><a href="' . WEB_URL . '/?offset=' . ($offset - $limit) . '×tamp=' . $timestamp . '" class="btn btn-default">' . _("Back") . '</a></div></noscript>';
|
||||
}
|
||||
echo "<h3>" . _("Past incidents") . "</h3>";
|
||||
}
|
||||
else if (!$future &&!$ajax)
|
||||
{
|
||||
} else if (!$future && !$ajax) {
|
||||
echo "<h3>" . _("No incidents") . "</h3>";
|
||||
}
|
||||
$show = !$future && $incidents["more"];
|
||||
@ -57,8 +51,7 @@ class Constellation
|
||||
$incident->render($admin);
|
||||
}
|
||||
|
||||
if ($show)
|
||||
{
|
||||
if ($show) {
|
||||
echo '<div class="centered"><a href="' . WEB_URL . '/?offset=' . ($offset) . '×tamp=' . $timestamp . '" id="loadmore" class="btn btn-default">' . _("Load more") . '</a></div>';
|
||||
}
|
||||
}
|
||||
@ -69,7 +62,8 @@ class Constellation
|
||||
* @param boolean $admin
|
||||
* @return array of services
|
||||
*/
|
||||
public function render_status($admin = false, $heading = true){
|
||||
public function render_status($admin = false, $heading = true)
|
||||
{
|
||||
global $mysqli;
|
||||
|
||||
//$query = $mysqli->query("SELECT id, name, description FROM services");
|
||||
@ -78,39 +72,26 @@ class Constellation
|
||||
if ($query->num_rows) {
|
||||
$timestamp = time();
|
||||
|
||||
while($result = $query->fetch_assoc())
|
||||
{
|
||||
while ($result = $query->fetch_assoc()) {
|
||||
$id = $result['id'];
|
||||
$sql = $mysqli->prepare("SELECT type FROM services_status INNER JOIN status ON services_status.status_id = status.id WHERE service_id = ? AND `time` <= ? AND (`end_time` >= ? OR `end_time`=0) ORDER BY `time` DESC LIMIT 1");
|
||||
|
||||
$sql->bind_param("iii", $id, $timestamp, $timestamp);
|
||||
$sql->execute();
|
||||
$tmp = $sql->get_result();
|
||||
if ($tmp->num_rows)
|
||||
{
|
||||
if ($tmp->num_rows) {
|
||||
$array[] = new Service($result['id'], $result['name'], $result['description'], $result['group_name'], $tmp->fetch_assoc()['type']);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$array[] = new Service($result['id'], $result['name'], $result['description'], $result['group_name']);
|
||||
}
|
||||
}
|
||||
if ($heading)
|
||||
{
|
||||
if ($heading) {
|
||||
echo Service::current_status($array);
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$array[] = new Service(0, _("No services"), -1);
|
||||
}
|
||||
if (!$admin)
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
if (!$admin) {
|
||||
//echo '<div id="status-container" class="clearfix">';
|
||||
//$arrCompletedGroups = array();
|
||||
foreach ($array as $service) {
|
||||
@ -125,17 +106,16 @@ class Constellation
|
||||
}
|
||||
echo '</ul>';
|
||||
//echo '</div>';
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function get_incidents($future = false, $offset = 0, $limit = 5, $timestamp = 0){
|
||||
global $mysqli;
|
||||
if ($timestamp == 0)
|
||||
function get_incidents($future = false, $offset = 0, $limit = 5, $timestamp = 0)
|
||||
{
|
||||
global $mysqli;
|
||||
if ($timestamp == 0) {
|
||||
$timestamp = time();
|
||||
}
|
||||
|
||||
@ -152,8 +132,7 @@ class Constellation
|
||||
$more = true;
|
||||
}
|
||||
if ($query->num_rows) {
|
||||
while(($result = $query->fetch_assoc()) && $limit-- > 0)
|
||||
{
|
||||
while (($result = $query->fetch_assoc()) && $limit-- > 0) {
|
||||
// Add service id and service names to an array in the Incident class
|
||||
$stmt_service = $mysqli->prepare("SELECT services.id,services.name FROM services
|
||||
INNER JOIN services_status ON services.id = services_status.service_id
|
||||
@ -206,7 +185,6 @@ class Constellation
|
||||
if ($show_link) {
|
||||
echo '<div class="clearfix"><a href="' . $url . '" class="btn btn-success" role="button">' . $link_text . '</a></div>';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,14 +3,16 @@
|
||||
|
||||
class SSDB
|
||||
{
|
||||
function execute($conn,$sql){
|
||||
function execute($conn, $sql)
|
||||
{
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
return true;
|
||||
} else {
|
||||
return $conn->error;
|
||||
}
|
||||
}
|
||||
function getSetting($conn,$setting){
|
||||
function getSetting($conn, $setting)
|
||||
{
|
||||
$sql = "SELECT value FROM settings WHERE setting='" . $setting . "'";
|
||||
$result = $conn->query($sql);
|
||||
|
||||
@ -22,31 +24,33 @@ class SSDB
|
||||
return "null";
|
||||
}
|
||||
}
|
||||
function setSetting($conn,$settingname,$settingvalue){
|
||||
function setSetting($conn, $settingname, $settingvalue)
|
||||
{
|
||||
$sql = "INSERT INTO settings (setting,value) VALUES ('" . $settingname . "','" . $settingvalue . "');";
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
return true;
|
||||
} else {
|
||||
return $conn->error;
|
||||
}
|
||||
|
||||
}
|
||||
function deleteSetting($conn,$settingname){
|
||||
function deleteSetting($conn, $settingname)
|
||||
{
|
||||
$sql = "DELETE FROM settings WHERE setting=\"" . $settingname . "\";";
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
return true;
|
||||
} else {
|
||||
return $conn->error;
|
||||
}
|
||||
|
||||
}
|
||||
function updateSetting($conn, $settingname, $settingvalue){
|
||||
function updateSetting($conn, $settingname, $settingvalue)
|
||||
{
|
||||
$this->deleteSetting($conn, $settingname);
|
||||
$this->setSetting($conn, $settingname, $settingvalue);
|
||||
return true;
|
||||
}
|
||||
|
||||
function getBooleanSetting($conn, $setting) {
|
||||
function getBooleanSetting($conn, $setting)
|
||||
{
|
||||
if (trim($this->getSetting($conn, $setting)) == "yes") {
|
||||
return true;
|
||||
}
|
||||
|
@ -46,17 +46,16 @@ class Incident implements JsonSerializable
|
||||
* Deletes incident by ID.
|
||||
* @param int ID
|
||||
*/
|
||||
public static function delete($id){
|
||||
public static function delete($id)
|
||||
{
|
||||
global $mysqli, $message, $user;
|
||||
|
||||
if ($user->get_rank() > 1)
|
||||
{
|
||||
if ($user->get_rank() > 1) {
|
||||
$stmt = $mysqli->prepare("SELECT count(*) as count FROM status WHERE id= ? AND user_id = ?");
|
||||
$stmt->bind_param("ii", $id, $_SESSION['user']);
|
||||
$stmt->execute();
|
||||
$query = $stmt->get_result();
|
||||
if (!$query->fetch_assoc()['count'])
|
||||
{
|
||||
if (!$query->fetch_assoc()['count']) {
|
||||
$message = _("You don't have permission to do that!");
|
||||
return;
|
||||
}
|
||||
@ -91,8 +90,7 @@ class Incident implements JsonSerializable
|
||||
$title = strip_tags($_POST['title']);
|
||||
$text = strip_tags($_POST['text'], '<br>');
|
||||
|
||||
if (strlen($title)==0)
|
||||
{
|
||||
if (strlen($title) == 0) {
|
||||
$message = _("Please enter title");
|
||||
return;
|
||||
} else if (strlen($title) > 50) {
|
||||
@ -100,29 +98,22 @@ class Incident implements JsonSerializable
|
||||
return;
|
||||
}
|
||||
|
||||
if (strlen($title)==0)
|
||||
{
|
||||
if (strlen($title) == 0) {
|
||||
$message = _("Please enter text");
|
||||
return;
|
||||
}
|
||||
|
||||
if ($type == 2 && (!strlen(trim($_POST['time'])) || !strlen(trim($_POST['end_time']))))
|
||||
{
|
||||
if ($type == 2 && (!strlen(trim($_POST['time'])) || !strlen(trim($_POST['end_time'])))) {
|
||||
$message = _("Please set start and end time! Use ISO 8601 format.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (empty($_POST['services'])) {
|
||||
$message = _("Please select at least one service");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!is_array($_POST['services']))
|
||||
{
|
||||
} else {
|
||||
if (!is_array($_POST['services'])) {
|
||||
$services = array($_POST['services']);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$services = $_POST['services'];
|
||||
}
|
||||
|
||||
@ -131,20 +122,17 @@ class Incident implements JsonSerializable
|
||||
$input_end_time = (!empty($_POST['end_time_js']) ? $_POST['end_time_js'] : $_POST['end_time']);
|
||||
$time = strtotime($input_time);
|
||||
$end_time = strtotime($input_end_time);
|
||||
if (!$time)
|
||||
{
|
||||
if (!$time) {
|
||||
$message = _("Start date format is not recognized. Please use ISO 8601 format.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$end_time)
|
||||
{
|
||||
if (!$end_time) {
|
||||
$message = _("End date format is not recognized. Please use ISO 8601 format.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ($time >= $end_time)
|
||||
{
|
||||
if ($time >= $end_time) {
|
||||
$message = _("End time is either the same or earlier than start time!");
|
||||
return;
|
||||
}
|
||||
@ -187,43 +175,46 @@ class Incident implements JsonSerializable
|
||||
* @param Boolean $admin - decides whether admin controls should be rendered
|
||||
* @return void
|
||||
*/
|
||||
public function render($admin=0){
|
||||
public function render($admin = 0)
|
||||
{
|
||||
global $icons;
|
||||
global $classes, $user;
|
||||
$admin = $admin && (($user->get_rank() <= 1) || ($user->get_username() == $this->username));
|
||||
$Parsedown = new Parsedown();
|
||||
?>
|
||||
<article class="panel panel-<?php echo $classes[$this->type];?>">
|
||||
<div class="panel-heading icon">
|
||||
<i class="<?php echo $icons[$this->type];?>"></i>
|
||||
</div>
|
||||
<div class="panel-heading clearfix">
|
||||
<h2 class="panel-title"><?php echo $this->title; ?></h2>
|
||||
<article class="card border-<?php echo $classes[$this->type]; ?> mb-3">
|
||||
<div class="card-colore icon bg-<?php echo $classes[$this->type]; ?>"><i class="<?php echo $icons[$this->type]; ?>"></i></div>
|
||||
<div class="card-header bg-<?php echo $classes[$this->type]; ?> border-<?php echo $classes[$this->type]; ?>">
|
||||
<?php echo $this->title; ?>
|
||||
<div class="float-end">
|
||||
<?php if ($admin) {
|
||||
echo '<a href="'.WEB_URL.'/admin/?delete='.$this->id.'" class="pull-right delete"><i class="fa fa-trash"></i></a>';
|
||||
echo '<a href="' . WEB_URL . '/admin/?delete=' . $this->id . '" class="delete"><i class="fa fa-trash"></i></a>';
|
||||
} ?>
|
||||
<time class="pull-right timeago" datetime="<?php echo $this->date; ?>"><?php echo $this->date; ?></time>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<time class="float-end timeago" datetime="<?php echo $this->date; ?>"><?php echo $this->date; ?></time>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php echo $Parsedown->setBreaksEnabled(true)->text($this->text); ?>
|
||||
</div>
|
||||
<div class="panel-footer clearfix">
|
||||
<small>
|
||||
<?php echo _("Impacted service(s): ");
|
||||
foreach ( $this->service_name as $value ) {
|
||||
echo '<span class="label label-default">'.$value . '</span> ';
|
||||
}
|
||||
|
||||
if (isset($this->end_date)){?>
|
||||
<span class="pull-right"><?php echo strtotime($this->end_date)>time()?_("Ending"):_("Ended");?>: <time class="pull-right timeago" datetime="<?php echo $this->end_date; ?>"><?php echo $this->end_date; ?></time></span>
|
||||
<div class="card-footer bg-transparent border-<?php echo $classes[$this->type]; ?>">
|
||||
<p class="card-title">
|
||||
<?php echo _("Impacted service(s): "); ?>
|
||||
<?php if (isset($this->end_date)) { ?>
|
||||
<span class="float-end"><?php echo strtotime($this->end_date) > time() ? _("Ending") : _("Ended"); ?>: <time class="timeago" datetime="<?php echo $this->end_date; ?>"><?php echo $this->end_date; ?></time></span>
|
||||
<?php } ?>
|
||||
</small>
|
||||
</p>
|
||||
<p class="card-badge">
|
||||
<?php foreach ($this->service_name as $value) {
|
||||
echo '<span class="badge bg-secondary">' . $value . '</span> ';
|
||||
} ?>
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
||||
<?php
|
||||
}
|
||||
|
||||
public function jsonSerialize() {
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
"id" => $this->id,
|
||||
"date" => $this->timestamp,
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This class is used to negotiate language displayed to user.
|
||||
* Reads browser preferences and chooses the best language from list
|
||||
@ -241,7 +242,8 @@ class LocaleNegotiator
|
||||
/**
|
||||
* Returns list of accepted langs so it can be reused for rendering language list for switching...
|
||||
*/
|
||||
public function get_accepted_langs(){
|
||||
public function get_accepted_langs()
|
||||
{
|
||||
return $this->accepted_langs;
|
||||
}
|
||||
|
||||
@ -251,7 +253,8 @@ class LocaleNegotiator
|
||||
* @param String $override adds language to list of preffered languages with highest priority
|
||||
* @return String language code that matched best with browser preferences
|
||||
*/
|
||||
public function negotiate($override = null){
|
||||
public function negotiate($override = null)
|
||||
{
|
||||
$langs = [];
|
||||
|
||||
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
@ -266,8 +269,7 @@ class LocaleNegotiator
|
||||
if ($val === '') $langs[$lang] = 1;
|
||||
}
|
||||
|
||||
if (isset($override))
|
||||
{
|
||||
if (isset($override)) {
|
||||
//More important than the best lang of browser
|
||||
$langs[$override] = 2;
|
||||
}
|
||||
@ -312,4 +314,3 @@ class LocaleNegotiator
|
||||
return $best_match;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,10 +15,11 @@ if (file_exists("libs/php_idn/idna.php")) {
|
||||
require_once("../libs/php_idn/idna.php");
|
||||
}
|
||||
|
||||
class Mailer {
|
||||
|
||||
public function __construct(){
|
||||
class Mailer
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@ -28,7 +29,8 @@ class Mailer {
|
||||
* @param boolean $html Set to true if we are sending HTML Mailer
|
||||
* @return boolean True if success
|
||||
*/
|
||||
public function send_mail($to, $subject, $message, $html = true) {
|
||||
public function send_mail($to, $subject, $message, $html = true)
|
||||
{
|
||||
// TODO -Handle $to as an array in order to send to muliple recipients without having
|
||||
// to call the entire send_mail function over and over..
|
||||
|
||||
@ -90,7 +92,6 @@ class Mailer {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
} else {
|
||||
// Use standard PHP mail() function
|
||||
$headers = "Content-Type: $content_type; \"charset=utf-8\" " . PHP_EOL;
|
||||
@ -102,7 +103,6 @@ class Mailer {
|
||||
// TODO log error message if mail fails
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Tries to verify the domain using dns request against an MX record of the domain part
|
||||
@ -112,7 +112,8 @@ class Mailer {
|
||||
* @param String $email Email address to check
|
||||
* @return boolean True if MX record exits, false if otherwise
|
||||
*/
|
||||
public function verify_domain($email){
|
||||
public function verify_domain($email)
|
||||
{
|
||||
// TODO - Handle idn/punycode domain names without being dependent on PHP native libs.
|
||||
$domain = explode('@', $email);
|
||||
$domain = EncodePunycodeIDN(array_pop($domain) . '.'); // Add dot at end of domain to avoid local domain lookups
|
||||
@ -145,13 +146,15 @@ class Mailer {
|
||||
* @param boolean $remove_links Set to true if links should be removed from email
|
||||
* @return String pain text version
|
||||
*/
|
||||
public function convert_html_to_plain_txt($content, $remove_links=false){
|
||||
public function convert_html_to_plain_txt($content, $remove_links = false)
|
||||
{
|
||||
// TODO does not handle unsubscribe/manage subscription text very well.
|
||||
// Replace HTML line breaks with text line breaks
|
||||
$plain_text = str_ireplace(array("<br>", "<br />"), "\n\r", $content);
|
||||
|
||||
// Remove the content between the tags that wouldn't normally get removed with the strip_tags function
|
||||
$plain_text = preg_replace(array('@<head[^>]*?>.*?</head>@siu',
|
||||
$plain_text = preg_replace(array(
|
||||
'@<head[^>]*?>.*?</head>@siu',
|
||||
'@<style[^>]*?>.*?</style>@siu',
|
||||
'@<script[^>]*?.*?</script>@siu',
|
||||
'@<noscript[^>]*?.*?</noscript>@siu',
|
||||
@ -170,5 +173,4 @@ class Mailer {
|
||||
|
||||
return $plain_text;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -103,9 +103,7 @@ class Notification
|
||||
if ($typeID == 2 && SUBSCRIBE_EMAIL) {
|
||||
$arr_email[] = $subscriber['subscriberIDFK'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (SUBSCRIBE_TELEGRAM) {
|
||||
@ -138,7 +136,6 @@ class Notification
|
||||
|
||||
if (!is_array($response) || !array_key_exists("ok", $response) || $response['ok'] != 1) {
|
||||
return false;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -160,7 +157,8 @@ class Notification
|
||||
return true;
|
||||
}
|
||||
|
||||
public function prepare_email(){
|
||||
public function prepare_email()
|
||||
{
|
||||
|
||||
$Parsedown = new Parsedown();
|
||||
$str_mail = file_get_contents("../libs/templates/email_status_update.html");
|
||||
@ -189,7 +187,8 @@ class Notification
|
||||
return $val;
|
||||
}
|
||||
|
||||
public function prepare_telegram(){
|
||||
public function prepare_telegram()
|
||||
{
|
||||
$msg = _("Hi #s!\nThere is a status update for service(s): %s\nThe new status is: %s\nTitle: %s\n\n%s\n\n<a href='%s'>View online</a>");
|
||||
$val['body'] = sprintf($msg, $this->servicenames, $this->status, $this->title, $this->text, WEB_URL);
|
||||
return $val;
|
||||
|
@ -14,22 +14,26 @@ class Queue
|
||||
public $completed_time;
|
||||
public $num_errors;
|
||||
public $user_id;
|
||||
public $all_type_id = array('notify_telegram' => 1,
|
||||
'notify_email' => 2);
|
||||
public $all_type_id = array(
|
||||
'notify_telegram' => 1,
|
||||
'notify_email' => 2
|
||||
);
|
||||
|
||||
public $all_status = array('populating' => 1,
|
||||
public $all_status = array(
|
||||
'populating' => 1,
|
||||
'ready' => 2,
|
||||
'processing' => 3,
|
||||
'completed' => 4,
|
||||
'failed' => 5);
|
||||
'failed' => 5
|
||||
);
|
||||
|
||||
public function add_task() {
|
||||
public function add_task()
|
||||
{
|
||||
global $mysqli;
|
||||
$stmt = $mysqli->prepare("INSERT INTO queue_task (type_id, status, template_data1, template_data2, created_time, user_id) VALUES (?,?,?,?,?,?)");
|
||||
if (false === $stmt) {
|
||||
//die('prepare() failed: ' . htmlspecialchars($mysqli->error));
|
||||
echo $mysqli->errno();
|
||||
|
||||
}
|
||||
#if ( false === $stmt ) { syslog(1, "Error :". $mysqli->error); }
|
||||
$now = time();
|
||||
@ -49,7 +53,8 @@ class Queue
|
||||
* Remove task from the queue
|
||||
* @return void
|
||||
*/
|
||||
public function delete_task($task_id){
|
||||
public function delete_task($task_id)
|
||||
{
|
||||
global $mysqli;
|
||||
$stmt = $mysqli->prepare("DELETE FROM queue_task WHERE id = ?");
|
||||
$stmt->bind_param("i", $task_id);
|
||||
@ -61,7 +66,8 @@ class Queue
|
||||
* @param int $new_status The new current status of the task. Must be selected from the $all_status array.
|
||||
* @return void
|
||||
*/
|
||||
public function set_task_status($new_status) {
|
||||
public function set_task_status($new_status)
|
||||
{
|
||||
global $mysqli;
|
||||
$stmt = $mysqli->prepare("UPDATE queue_task SET status = ? WHERE id = ?");
|
||||
$stmt->bind_param("ii", $new_status, $this->task_id);
|
||||
@ -74,7 +80,8 @@ class Queue
|
||||
* @param array $arr_data Array filled with subscriber_id
|
||||
* @return void
|
||||
*/
|
||||
public function add_notification($arr_data) {
|
||||
public function add_notification($arr_data)
|
||||
{
|
||||
global $mysqli;
|
||||
|
||||
//Default status = 1, retres = 0, task_id = $this->task_id
|
||||
@ -88,7 +95,9 @@ class Queue
|
||||
|
||||
foreach ($arr_data as $value) {
|
||||
$counter++;
|
||||
if ($counter == $count) { $seperator = ''; } // Make sure last character for SQL query is correct
|
||||
if ($counter == $count) {
|
||||
$seperator = '';
|
||||
} // Make sure last character for SQL query is correct
|
||||
$query .= sprintf($sub_query, $this->task_id, 1, $value, 0, $seperator);
|
||||
}
|
||||
$sql = "INSERT INTO queue_notify (task_id, status, subscriber_id, retries) VALUES " . $query;
|
||||
@ -98,23 +107,25 @@ class Queue
|
||||
$this->set_task_status($this->all_status['ready']); // Make task available for release
|
||||
}
|
||||
|
||||
public function update_notification_retries($task_id, $subscriber_id) {
|
||||
public function update_notification_retries($task_id, $subscriber_id)
|
||||
{
|
||||
global $mysqli;
|
||||
$stmt = $mysqli->prepare("UPDATE queue_notify SET retries = retries+1 WHERE task_id = ? AND subscriber_id = ?");
|
||||
$stmt->bind_param("ii", $task_id, $subscriber_id);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
public function delete_notification($task_id, $subscriber_id) {
|
||||
public function delete_notification($task_id, $subscriber_id)
|
||||
{
|
||||
global $mysqli;
|
||||
$stmt = $mysqli->prepare("DELETE FROM queue_notify WHERE task_id = ? AND subscriber_id = ?");
|
||||
$stmt->bind_param("ii", $task_id, $subscriber_id);
|
||||
$stmt->execute();
|
||||
|
||||
}
|
||||
|
||||
// TODO: Fix max attempts for notifications
|
||||
public function process_queue(){
|
||||
public function process_queue()
|
||||
{
|
||||
global $mysqli;
|
||||
$stmt = $mysqli->query("SELECT qn.id, qn.task_id, qn.status, qn.subscriber_id, qn.retries, sub.firstname, sub.userID, sub.token FROM queue_notify AS qn INNER JOIN subscribers AS sub ON qn.subscriber_id = sub.subscriberID WHERE qn.status NOT LIKE 2 AND sub.active=1");
|
||||
while ($result = $stmt->fetch_assoc()) {
|
||||
@ -156,6 +167,5 @@ class Queue
|
||||
Queue::delete_task($result['id']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class for managing services
|
||||
*/
|
||||
@ -63,8 +64,7 @@ class ServiceGroup
|
||||
public static function add()
|
||||
{
|
||||
global $user, $message;
|
||||
if (strlen($_POST['group'])>50)
|
||||
{
|
||||
if (strlen($_POST['group']) > 50) {
|
||||
$message = _("Service group name is too long! Character limit is 50");
|
||||
return;
|
||||
} else if (strlen(trim($_POST['group'])) == 0) {
|
||||
@ -72,8 +72,7 @@ class ServiceGroup
|
||||
return;
|
||||
}
|
||||
|
||||
if ($user->get_rank()<=1)
|
||||
{
|
||||
if ($user->get_rank() <= 1) {
|
||||
global $mysqli;
|
||||
$name = $_POST["group"];
|
||||
$description = $_POST["description"];
|
||||
@ -83,8 +82,7 @@ class ServiceGroup
|
||||
$stmt->execute();
|
||||
$stmt->get_result();
|
||||
header("Location: " . WEB_URL . "/admin/?do=settings");
|
||||
}else
|
||||
{
|
||||
} else {
|
||||
$message = _("You don't have the permission to do that!");
|
||||
}
|
||||
}
|
||||
@ -92,8 +90,7 @@ class ServiceGroup
|
||||
public static function edit()
|
||||
{
|
||||
global $user, $message;
|
||||
if (strlen($_POST['group'])>50)
|
||||
{
|
||||
if (strlen($_POST['group']) > 50) {
|
||||
$message = _("Service group name is too long! Character limit is 50");
|
||||
return;
|
||||
} else if (strlen(trim($_POST['group'])) == 0) {
|
||||
@ -101,8 +98,7 @@ class ServiceGroup
|
||||
return;
|
||||
}
|
||||
|
||||
if ($user->get_rank()<=1)
|
||||
{
|
||||
if ($user->get_rank() <= 1) {
|
||||
global $mysqli;
|
||||
$name = $_POST["group"];
|
||||
$description = $_POST["description"];
|
||||
@ -113,8 +109,7 @@ class ServiceGroup
|
||||
$stmt->execute();
|
||||
$stmt->get_result();
|
||||
header("Location: " . WEB_URL . "/admin/?do=settings");
|
||||
}else
|
||||
{
|
||||
} else {
|
||||
$message = _("You don't have the permission to do that!");
|
||||
}
|
||||
}
|
||||
@ -125,8 +120,7 @@ class ServiceGroup
|
||||
public static function delete()
|
||||
{
|
||||
global $user, $message;
|
||||
if ($user->get_rank()<=1)
|
||||
{
|
||||
if ($user->get_rank() <= 1) {
|
||||
global $mysqli;
|
||||
$id = $_GET['delete'];
|
||||
|
||||
@ -141,9 +135,7 @@ class ServiceGroup
|
||||
$query = $stmt->get_result();
|
||||
|
||||
header("Location: " . WEB_URL . "/admin/?do=settings");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$message = _("You don't have the permission to do that!");
|
||||
}
|
||||
}
|
||||
@ -153,7 +145,8 @@ class ServiceGroup
|
||||
* Get list of services groups.
|
||||
* @return array $groups
|
||||
*/
|
||||
public function get_groups() {
|
||||
public function get_groups()
|
||||
{
|
||||
global $mysqli;
|
||||
$stmt = $mysqli->query("SELECT id, name FROM services_groups ORDER by name ASC");
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class for managing services
|
||||
*/
|
||||
@ -72,8 +73,7 @@ class Service implements JsonSerializable
|
||||
public static function add()
|
||||
{
|
||||
global $user, $message;
|
||||
if (strlen($_POST['service'])>50)
|
||||
{
|
||||
if (strlen($_POST['service']) > 50) {
|
||||
$message = _("Service name is too long! Character limit is 50");
|
||||
return;
|
||||
} else if (strlen(trim($_POST['service'])) == 0) {
|
||||
@ -81,8 +81,7 @@ class Service implements JsonSerializable
|
||||
return;
|
||||
}
|
||||
|
||||
if ($user->get_rank()<=1)
|
||||
{
|
||||
if ($user->get_rank() <= 1) {
|
||||
global $mysqli;
|
||||
$name = htmlspecialchars($_POST['service']);
|
||||
$description = htmlspecialchars($_POST['description']);
|
||||
@ -92,8 +91,7 @@ class Service implements JsonSerializable
|
||||
$stmt->execute();
|
||||
$stmt->get_result();
|
||||
header("Location: " . WEB_URL . "/admin/?do=settings");
|
||||
}else
|
||||
{
|
||||
} else {
|
||||
$message = _("You don't have the permission to do that!");
|
||||
}
|
||||
}
|
||||
@ -106,8 +104,7 @@ class Service implements JsonSerializable
|
||||
public static function edit()
|
||||
{
|
||||
global $user, $message;
|
||||
if (strlen($_POST['service'])>50)
|
||||
{
|
||||
if (strlen($_POST['service']) > 50) {
|
||||
$message = _("Service name is too long! Character limit is 50");
|
||||
return;
|
||||
} else if (strlen(trim($_POST['service'])) == 0) {
|
||||
@ -115,8 +112,7 @@ class Service implements JsonSerializable
|
||||
return;
|
||||
}
|
||||
|
||||
if ($user->get_rank()<=1)
|
||||
{
|
||||
if ($user->get_rank() <= 1) {
|
||||
global $mysqli;
|
||||
$service_id = $_POST["id"];
|
||||
$name = htmlspecialchars($_POST['service']);
|
||||
@ -127,8 +123,7 @@ class Service implements JsonSerializable
|
||||
$stmt->execute();
|
||||
$stmt->get_result();
|
||||
header("Location: " . WEB_URL . "/admin/?do=settings");
|
||||
}else
|
||||
{
|
||||
} else {
|
||||
$message = _("You don't have the permission to do that!");
|
||||
}
|
||||
}
|
||||
@ -140,8 +135,7 @@ class Service implements JsonSerializable
|
||||
public static function delete()
|
||||
{
|
||||
global $user, $message;
|
||||
if ($user->get_rank()<=1)
|
||||
{
|
||||
if ($user->get_rank() <= 1) {
|
||||
global $mysqli;
|
||||
$id = $_GET['delete'];
|
||||
|
||||
@ -151,8 +145,7 @@ class Service implements JsonSerializable
|
||||
$query = $stmt->get_result();
|
||||
|
||||
while ($res = $query->fetch_assoc()) {
|
||||
if ($res['count']==1)
|
||||
{
|
||||
if ($res['count'] == 1) {
|
||||
Incident::delete($res['status']);
|
||||
}
|
||||
}
|
||||
@ -168,9 +161,7 @@ class Service implements JsonSerializable
|
||||
$query = $stmt->get_result();
|
||||
|
||||
header("Location: " . WEB_URL . "/admin/?do=settings");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$message = _("You don't have the permission to do that!");
|
||||
}
|
||||
}
|
||||
@ -180,23 +171,22 @@ class Service implements JsonSerializable
|
||||
* @param Service[] $array array of services
|
||||
* @return void
|
||||
*/
|
||||
public static function current_status($array){
|
||||
public static function current_status($array)
|
||||
{
|
||||
global $all, $some, $classes;
|
||||
$statuses = array(0, 0, 0, 0);
|
||||
$worst = 5;
|
||||
|
||||
foreach ($array as $service) {
|
||||
if ($service->status<$worst)
|
||||
{
|
||||
if ($service->status < $worst) {
|
||||
$worst = $service->get_status();
|
||||
}
|
||||
$statuses[$service->get_status()]++;
|
||||
}
|
||||
|
||||
echo '<div id="status-big" class="status '.$classes[$worst].'">';
|
||||
echo '<div id="status-big" class="alert-' . $classes[$worst] . '">';
|
||||
|
||||
if ($statuses[$worst] == count($array))
|
||||
{
|
||||
if ($statuses[$worst] == count($array)) {
|
||||
echo $all[$worst];
|
||||
} else {
|
||||
echo $some[$worst];
|
||||
@ -209,7 +199,8 @@ class Service implements JsonSerializable
|
||||
* @param $boolGroup set to true if the groups name is to be rendered
|
||||
* @return void
|
||||
*/
|
||||
public function render(){
|
||||
public function render()
|
||||
{
|
||||
global $statuses;
|
||||
global $classes;
|
||||
static $arrCompletedGroups = array();
|
||||
@ -227,10 +218,10 @@ class Service implements JsonSerializable
|
||||
|
||||
// If no group exist or group is new, start a new UL
|
||||
if (!empty($this->group_name) && !in_array($this->group_name, $arrCompletedGroups)) {
|
||||
echo '<ul class="list-group components">';
|
||||
echo '<ul class="list-group components mt-3">';
|
||||
//echo '<ul class="platforms list-group mb-2">';
|
||||
// Render the group status if it exists
|
||||
echo '<li class="list-group-item list-group-item-success group-name"><span><i class="glyphicon glyphicon-plus"></i></span> ' . $this->group_name .'<div class="status '. $classes[$this->status] .'">'. _($statuses[$this->status]).'</div></li>';
|
||||
echo '<li class="list-group-item list-group-item-' . $classes[$this->status] . ' group-name"><span><i class="fas fa-folder-open"></i></span> ' . $this->group_name . '<div class="status text-' . $classes[$this->status] . ' float-end">' . _($statuses[$this->status]) . '</div></li>';
|
||||
//echo '<li class="cist-group-item d-flex flex-row justify-content-between platform list-group-item-action py-0 expanded" role="button">' . $this->group_name .'<div class="status '. $classes[$this->status] .'"'. _($statuses[$this->status]).'</div></li>';
|
||||
$arrCompletedGroups[] = $this->group_name;
|
||||
$boolOpened = true;
|
||||
@ -244,21 +235,24 @@ class Service implements JsonSerializable
|
||||
}
|
||||
|
||||
// Render the service status
|
||||
echo '<div>';
|
||||
echo '<li class="list-group-item sub-component"><strong>' . $this->name . '</strong>';
|
||||
//echo '<li class="list-group-item d-flex flex-columns justify-content-between><span>+</span><h3 class="py-2 my-0 flex-fill expanded">' . $this->name . '</h3>';
|
||||
if (!empty($this->description)) {
|
||||
echo '<a class="desc-tool-tip" data-toggle="tooltip" data-placement="top" title="'.$this->description.'"> <span><i class="glyphicon glyphicon-question-sign"></i></span></a>';
|
||||
echo '<a class="desc-tool-tip" data-toggle="tooltip" data-placement="top" title="' . $this->description . '"> <span><i class="fas fa-question"></i></span></a>';
|
||||
}
|
||||
if ($this->status!=-1){?><div class="status pull-right <?php echo $classes[$this->status];?>"><?php echo _($statuses[$this->status]);?></div>
|
||||
if ($this->status != -1) { ?><div class="float-end text-<?php echo $classes[$this->status]; ?>"><?php echo _($statuses[$this->status]); ?></div>
|
||||
<?php
|
||||
}
|
||||
echo '</li>';
|
||||
if (isset($boolFinish) && $boolFinish) {
|
||||
echo '</ul>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
public function jsonSerialize() {
|
||||
public function jsonSerialize()
|
||||
{
|
||||
global $statuses;
|
||||
return [
|
||||
"id" => $this->id,
|
||||
@ -268,5 +262,4 @@ class Service implements JsonSerializable
|
||||
"status_string" => $statuses[$this->status]
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Subscriber class
|
||||
*
|
||||
*/
|
||||
Class Subscriber
|
||||
class Subscriber
|
||||
{
|
||||
public $id = null;
|
||||
public $firstname = null;
|
||||
@ -15,7 +15,8 @@ Class Subscriber
|
||||
public $typeID = null; // Holds subscription type ID
|
||||
|
||||
|
||||
function __construct() {
|
||||
function __construct()
|
||||
{
|
||||
$this->firstname = null;
|
||||
$this->lastname = null;
|
||||
$this->userID = "";
|
||||
@ -44,7 +45,6 @@ Class Subscriber
|
||||
return $row['token'];
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
public function get_subscriber_by_token($token)
|
||||
{
|
||||
@ -135,7 +135,6 @@ Class Subscriber
|
||||
$stmt->bind_param("ii", $updateTime, $subscriberID);
|
||||
$stmt->execute();
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public function activate($subscriberID)
|
||||
@ -164,7 +163,6 @@ Class Subscriber
|
||||
$stmt->execute();
|
||||
//$query = $stmt->get_result();
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public function check_userid_exist()
|
||||
@ -223,7 +221,6 @@ Class Subscriber
|
||||
$this->userID = $row['userID'];
|
||||
$this->token = $row['token'];
|
||||
return true;
|
||||
|
||||
} else {
|
||||
// Timeframe outside of given scope -> delete account
|
||||
$stmt2 = $mysqli->prepare("DELETE FROM subscribers WHERE subscriberID = ?");
|
||||
@ -325,5 +322,4 @@ Class Subscriber
|
||||
unset($_SESSION['subscriber_id']);
|
||||
unset($_SESSION['subscriber_token']);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Subscriptions class
|
||||
*
|
||||
*/
|
||||
Class Subscriptions
|
||||
class Subscriptions
|
||||
{
|
||||
public function add($userID, $service)
|
||||
{
|
||||
@ -41,14 +41,17 @@ Class Subscriptions
|
||||
$query = $stmt->get_result();
|
||||
|
||||
$strNotifyType = _('E-mail Notification subscription');
|
||||
if ( $typeID == 1 ) { $strNotifyType = _('Telegram Notification subscription'); }
|
||||
if ($typeID == 1) {
|
||||
$strNotifyType = _('Telegram Notification subscription');
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-lg-offset-2 col-lg-8">
|
||||
<div class="text-center">
|
||||
<h3><?php echo $strNotifyType; ?></h3>
|
||||
<p><?php echo _("Manage notification subscription for"); echo " ". $userID; ?></p>
|
||||
<p><?php echo _("Manage notification subscription for");
|
||||
echo " " . $userID; ?></p>
|
||||
<a onclick="if (confirm('<?php echo _("Are you sure you want to cancel you subscription?"); ?>')){return true;}else{event.stopPropagation(); event.preventDefault();};" class="confirmation" href="index.php?do=unsubscribe&type=<?php echo $typeID; ?>&token=<?php echo $token; ?>"><button class="btn btn-danger"><?php echo _("Cancel Subscription"); ?></button></a>
|
||||
</div>
|
||||
</div>
|
||||
@ -60,12 +63,10 @@ Class Subscriptions
|
||||
$subs = array(); // Will be used to hold IDs of services already selected
|
||||
|
||||
if ($query->num_rows) {
|
||||
while($result = $query->fetch_assoc())
|
||||
{
|
||||
while ($result = $query->fetch_assoc()) {
|
||||
echo '<a href="' . WEB_URL . '/subscriptions.php?remove=' . $result['id'] . '" class="list-group-item"><span class="glyphicon glyphicon-remove text-danger"></span> ' . $result['name'] . '</a>';
|
||||
$subs[] = $result['id'];
|
||||
}
|
||||
|
||||
} else {
|
||||
echo '<div class="container"><summary>' . _("You do not currently subscribe to any services. Please add services from the list below.") . '</summary></div>';
|
||||
}
|
||||
@ -83,12 +84,11 @@ Class Subscriptions
|
||||
echo '<div class="list-group">';
|
||||
if ($query->num_rows) {
|
||||
while ($result = $query->fetch_assoc()) {
|
||||
echo '<a href="'.WEB_URL.'/subscriptions.php?add=' . $result['id'] . '" class="list-group-item list-group-item-action"><span class="glyphicon glyphicon-plus text-success"></span> ' . $result['name'] . '</a>';
|
||||
echo '<a href="' . WEB_URL . '/subscriptions.php?add=' . $result['id'] . '" class="list-group-item list-group-item-action"><span class="fas fa-plus text-success"></span> ' . $result['name'] . '</a>';
|
||||
}
|
||||
} else {
|
||||
echo '<div class="container"><summary>' . _("No further services available for subscriptions.") . '</summary></div>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
Class Telegram
|
||||
class Telegram
|
||||
{
|
||||
|
||||
/**
|
||||
@ -14,7 +14,8 @@ Class Telegram
|
||||
*
|
||||
* @since 0.1
|
||||
*/
|
||||
function getTelegramUserData() {
|
||||
function getTelegramUserData()
|
||||
{
|
||||
if (isset($_COOKIE['tg_user'])) {
|
||||
$auth_data_json = urldecode($_COOKIE['tg_user']);
|
||||
$auth_data = json_decode($auth_data_json, true);
|
||||
@ -32,7 +33,8 @@ Class Telegram
|
||||
* @return $auth_data
|
||||
*
|
||||
*/
|
||||
function checkTelegramAuthorization($auth_data) {
|
||||
function checkTelegramAuthorization($auth_data)
|
||||
{
|
||||
$check_hash = $auth_data['hash'];
|
||||
unset($auth_data['hash']);
|
||||
$data_check_arr = [];
|
||||
@ -60,7 +62,8 @@ Class Telegram
|
||||
* Save the telegram user data in a cookie
|
||||
* @return void
|
||||
*/
|
||||
function saveTelegramUserData($auth_data) {
|
||||
function saveTelegramUserData($auth_data)
|
||||
{
|
||||
$auth_data_json = json_encode($auth_data);
|
||||
setcookie('tg_user', $auth_data_json);
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class for creating and deleting tokens
|
||||
*/
|
||||
|
153
classes/user.php
153
classes/user.php
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class that encapsulates everything that can be done with a user
|
||||
*/
|
||||
@ -24,8 +25,7 @@ class User
|
||||
$stmt->execute();
|
||||
$query = $stmt->get_result();
|
||||
|
||||
if (!$query->num_rows)
|
||||
{
|
||||
if (!$query->num_rows) {
|
||||
throw new Exception("User doesn't exist.");
|
||||
return;
|
||||
}
|
||||
@ -86,8 +86,7 @@ class User
|
||||
global $mysqli, $message, $user;
|
||||
|
||||
$id = $_GET['id'];
|
||||
if ($this->id!=$_SESSION['user'] && $user->get_rank()<=1 && ($user->get_rank()<$this->rank))
|
||||
{
|
||||
if ($this->id != $_SESSION['user'] && $user->get_rank() <= 1 && ($user->get_rank() < $this->rank)) {
|
||||
$stmt = $mysqli->prepare("UPDATE users SET active = !active WHERE id=?");
|
||||
$stmt->bind_param("i", $this->id);
|
||||
$stmt->execute();
|
||||
@ -108,8 +107,7 @@ class User
|
||||
public static function add()
|
||||
{
|
||||
global $user, $message, $mysqli;
|
||||
if (INSTALL_OVERRIDE || $user->get_rank()==0)
|
||||
{
|
||||
if (INSTALL_OVERRIDE || $user->get_rank() == 0) {
|
||||
if (strlen(trim($_POST['name'])) == 0) {
|
||||
$messages[] = _("Name");
|
||||
}
|
||||
@ -122,8 +120,7 @@ class User
|
||||
if (strlen(trim($_POST['password'])) == 0) {
|
||||
$messages[] = _("Password");
|
||||
}
|
||||
if(!isset($_POST['permission']))
|
||||
{
|
||||
if (!isset($_POST['permission'])) {
|
||||
$messages[] = _("Rank");
|
||||
}
|
||||
|
||||
@ -138,8 +135,7 @@ class User
|
||||
$email = $_POST['email'];
|
||||
$pass = $_POST['password'];
|
||||
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL))
|
||||
{
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
$message = "Invalid email!";
|
||||
return;
|
||||
}
|
||||
@ -159,8 +155,7 @@ class User
|
||||
}
|
||||
|
||||
|
||||
if (!empty($variables))
|
||||
{
|
||||
if (!empty($variables)) {
|
||||
$message = _("Please mind the following character limits: ");
|
||||
$message .= implode(", ", $variables);
|
||||
return;
|
||||
@ -175,8 +170,7 @@ class User
|
||||
$stmt->bind_param("ssssssi", $email, $username, $name, $surname, $hash, $salt, $permission);
|
||||
$stmt->execute();
|
||||
|
||||
if ($stmt->affected_rows==0)
|
||||
{
|
||||
if ($stmt->affected_rows == 0) {
|
||||
$message = _("Username or email already used");
|
||||
return;
|
||||
}
|
||||
@ -190,12 +184,10 @@ class User
|
||||
$headers .= "Reply-To: " . MAILER_NAME . ' <' . MAILER_ADDRESS . '>' . PHP_EOL;
|
||||
|
||||
mail($to, $subject, $msg, $headers);
|
||||
if (!INSTALL_OVERRIDE)
|
||||
{
|
||||
if (!INSTALL_OVERRIDE) {
|
||||
header("Location: " . WEB_URL . "/admin/?do=settings");
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$message = _("You don't have the permission to do that!");
|
||||
}
|
||||
}
|
||||
@ -210,13 +202,11 @@ class User
|
||||
public static function login()
|
||||
{
|
||||
global $message, $mysqli;
|
||||
if (!isset($_POST['email']) && !isset($_POST['email']))
|
||||
{
|
||||
if (!isset($_POST['email']) && !isset($_POST['email'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((!isset($_POST['email']) || !isset($_POST['email'])))
|
||||
{
|
||||
if ((!isset($_POST['email']) || !isset($_POST['email']))) {
|
||||
$message = _("Please fill in your email and password!");
|
||||
return;
|
||||
}
|
||||
@ -228,8 +218,7 @@ class User
|
||||
$stmt->execute();
|
||||
$query = $stmt->get_result();
|
||||
|
||||
if ($query->num_rows<1)
|
||||
{
|
||||
if ($query->num_rows < 1) {
|
||||
$message = _("Wrong email or password");
|
||||
return;
|
||||
}
|
||||
@ -239,8 +228,7 @@ class User
|
||||
$id = $result["id"];
|
||||
$active = $result["active"];
|
||||
|
||||
if (!$active)
|
||||
{
|
||||
if (!$active) {
|
||||
$message = _("Your account has been disabled. Please contact administrator.");
|
||||
return;
|
||||
}
|
||||
@ -251,14 +239,12 @@ class User
|
||||
$stmt->execute();
|
||||
$query = $stmt->get_result();
|
||||
|
||||
if (!$query->fetch_assoc()['count'])
|
||||
{
|
||||
if (!$query->fetch_assoc()['count']) {
|
||||
$message = _("Wrong email or password");
|
||||
return;
|
||||
}
|
||||
|
||||
if (isset($_POST['remember'])&&$_POST['remember'])
|
||||
{
|
||||
if (isset($_POST['remember']) && $_POST['remember']) {
|
||||
$year = strtotime('+356 days', time());
|
||||
$token = Token::add($id, 'remember', $year);
|
||||
setcookie('token', $token, $year, "/");
|
||||
@ -281,17 +267,14 @@ class User
|
||||
$id = $_COOKIE['user'];
|
||||
$token = $_COOKIE['token'];
|
||||
|
||||
if (Token::validate($token, $id, "remember"))
|
||||
{
|
||||
if (Token::validate($token, $id, "remember")) {
|
||||
$year = strtotime('+356 days', time());
|
||||
unset($_COOKIE['token']);
|
||||
$_SESSION['user'] = $id;
|
||||
$new_token = Token::add($id, 'remember', $year);
|
||||
setcookie('token', $new_token, $year, "/");
|
||||
setcookie('user', $id, $year, "/");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
unset($_COOKIE['user']);
|
||||
unset($_COOKIE['token']);
|
||||
setcookie('user', null, -1, '/');
|
||||
@ -310,8 +293,7 @@ class User
|
||||
global $permissions, $user;
|
||||
?>
|
||||
<div class="row user">
|
||||
<div class="col-md-2 col-md-offset-2"><img src="https://www.gravatar.com/avatar/<?php echo md5( strtolower( trim( $this->email ) ) );?>?s=160"
|
||||
alt="<?php echo _("Profile picture");?>"></div>
|
||||
<div class="col-md-2 col-md-offset-2"><img src="https://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($this->email))); ?>?s=160" alt="<?php echo _("Profile picture"); ?>"></div>
|
||||
<div class="col-md-6">
|
||||
<?php if ($this->id == $_SESSION['user'] || $user->get_rank() < 1) {
|
||||
?>
|
||||
@ -323,18 +305,12 @@ class User
|
||||
<label class="form-name" for="surname"><?php echo _("Surname"); ?></label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="text" name="name" placeholder="<?php echo _("Name"); ?>"
|
||||
title="<?php echo _("Name"); ?>" class="form-control form-name"
|
||||
value=<?php echo htmlspecialchars($this->name, ENT_QUOTES);?>>
|
||||
<input type="text" name="surname" placeholder="<?php echo _("Surname"); ?>"
|
||||
title="<?php echo _("Surname"); ?>" class="form-control form-name"
|
||||
value=<?php echo htmlspecialchars($this->surname, ENT_QUOTES);?>>
|
||||
<input type="text" name="name" placeholder="<?php echo _("Name"); ?>" title="<?php echo _("Name"); ?>" class="form-control form-name" value=<?php echo htmlspecialchars($this->name, ENT_QUOTES); ?>>
|
||||
<input type="text" name="surname" placeholder="<?php echo _("Surname"); ?>" title="<?php echo _("Surname"); ?>" class="form-control form-name" value=<?php echo htmlspecialchars($this->surname, ENT_QUOTES); ?>>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<button type="submit" class="btn btn-primary pull-right"><?php echo _("Change name");?></button>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary float-end"><?php echo _("Change name"); ?></button>
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
@ -353,7 +329,7 @@ class User
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="username" required value="<?php echo htmlspecialchars($this->username, ENT_QUOTES); ?>">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-primary pull-right"><?php echo _("Change username");?></button>
|
||||
<button type="submit" class="btn btn-primary float-end"><?php echo _("Change username"); ?></button>
|
||||
</span>
|
||||
</div>
|
||||
<?php
|
||||
@ -376,14 +352,16 @@ class User
|
||||
echo "<option value='$key' " . ($key == $this->rank ? "selected" : "") . ">$value</option>";
|
||||
} ?>
|
||||
</select><span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-primary pull-right"><?php echo _("Change role");?></button>
|
||||
<button type="submit" class="btn btn-primary float-end"><?php echo _("Change role"); ?></button>
|
||||
</span>
|
||||
</div><?php }else{ echo $permissions[$this->rank];}?></div>
|
||||
</div><?php } else {
|
||||
echo $permissions[$this->rank];
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php if($this->id==$_SESSION['user']||$user->get_rank()<1)
|
||||
{?>
|
||||
<?php if ($this->id == $_SESSION['user'] || $user->get_rank() < 1) { ?>
|
||||
<form action="<?php echo WEB_URL; ?>/admin/?do=user&id=<?php echo $this->id; ?>" method="POST">
|
||||
<div class="row user">
|
||||
<div class="col-md-2 col-md-offset-2"><strong>Email</strong></div>
|
||||
@ -391,14 +369,13 @@ class User
|
||||
<div class="input-group">
|
||||
<input type="email" class="form-control" name="email" value="<?php echo $this->email; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-primary pull-right"><?php echo _("Change email");?></button>
|
||||
<button type="submit" class="btn btn-primary float-end"><?php echo _("Change email"); ?></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php }else
|
||||
{
|
||||
<?php } else {
|
||||
?>
|
||||
<div class="row user">
|
||||
<div class="col-md-2 col-md-offset-2"><strong><?php echo _("Email"); ?></strong></div>
|
||||
@ -422,15 +399,14 @@ class User
|
||||
<input id="new_password" placeholder="<?php echo _("New password"); ?>" type="password" class="form-control" name="password">
|
||||
<label for="new_password_check"><?php echo _("Repeat password"); ?></label>
|
||||
<input id="new_password_check" placeholder="<?php echo _("Repeat password"); ?>" type="password" class="form-control" name="password_repeat">
|
||||
<button type="submit" class="btn btn-primary pull-right margin-top"><?php echo _("Change password");?></button>
|
||||
<button type="submit" class="btn btn-primary float-end margin-top"><?php echo _("Change password"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($this->id!=$_SESSION['user'] && $user->get_rank()<=1 && ($user->get_rank()<$this->rank))
|
||||
{?>
|
||||
if ($this->id != $_SESSION['user'] && $user->get_rank() <= 1 && ($user->get_rank() < $this->rank)) { ?>
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-md-offset-2"></div>
|
||||
<div class="col-md-6">
|
||||
@ -458,15 +434,13 @@ class User
|
||||
$stmt = $mysqli->prepare("SELECT count(*) FROM users WHERE username LIKE ?");
|
||||
$stmt->bind_param("s", $_POST["username"]);
|
||||
$stmt->execute();
|
||||
if ($stmt->num_rows > 0)
|
||||
{
|
||||
if ($stmt->num_rows > 0) {
|
||||
$message = _("This username is already taken.");
|
||||
return;
|
||||
}
|
||||
$stmt->close();
|
||||
|
||||
if ($_SESSION['user'] != $id && $user->get_rank()>0)
|
||||
{
|
||||
if ($_SESSION['user'] != $id && $user->get_rank() > 0) {
|
||||
$message = _("Cannot change username of other users!");
|
||||
} else {
|
||||
$stmt = $mysqli->prepare("UPDATE users SET username = ? WHERE id=?");
|
||||
@ -491,16 +465,14 @@ class User
|
||||
$messages[] = _("Surname");
|
||||
}
|
||||
|
||||
if (!empty($messages))
|
||||
{
|
||||
if (!empty($messages)) {
|
||||
$message = "Please enter " . implode(", ", $messages);
|
||||
return;
|
||||
}
|
||||
|
||||
$id = $this->id;
|
||||
|
||||
if ($_SESSION['user'] != $id && $user->get_rank()>0)
|
||||
{
|
||||
if ($_SESSION['user'] != $id && $user->get_rank() > 0) {
|
||||
$message = _("Cannot change names of other users!");
|
||||
} else {
|
||||
$stmt = $mysqli->prepare("UPDATE users SET `name` = ?, `surname` = ? WHERE id=?");
|
||||
@ -521,16 +493,13 @@ class User
|
||||
{
|
||||
global $mysqli, $message;
|
||||
$id = $this->id;
|
||||
if ($_POST['password']!=$_POST['password_repeat'])
|
||||
{
|
||||
if ($_POST['password'] != $_POST['password_repeat']) {
|
||||
$message = _("Passwords do not match!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$token)
|
||||
{
|
||||
if ($_SESSION['user']!=$id)
|
||||
{
|
||||
if (!$token) {
|
||||
if ($_SESSION['user'] != $id) {
|
||||
$message = _("Cannot change password of other users!");
|
||||
} else {
|
||||
$stmt = $mysqli->prepare("SELECT password_salt as salt FROM users WHERE id=?");
|
||||
@ -547,8 +516,7 @@ class User
|
||||
$stmt->bind_param("is", $id, $hash);
|
||||
$stmt->execute();
|
||||
|
||||
if ($stmt->get_result()->fetch_assoc()['count'])
|
||||
{
|
||||
if ($stmt->get_result()->fetch_assoc()['count']) {
|
||||
$pass = $_POST['password'];
|
||||
$hash = hash('sha256', $pass . $salt);
|
||||
$stmt = $mysqli->prepare("UPDATE users SET password_hash = ? WHERE id=?");
|
||||
@ -562,14 +530,12 @@ class User
|
||||
$stmt->get_result();
|
||||
|
||||
User::logout();
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$message = _("Wrong password!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (Token::validate($token, $id, "passwd"))
|
||||
{
|
||||
if (Token::validate($token, $id, "passwd")) {
|
||||
$stmt = $mysqli->prepare("SELECT password_salt as salt FROM users WHERE id=?");
|
||||
$stmt->bind_param("i", $id);
|
||||
$stmt->execute();
|
||||
@ -589,9 +555,7 @@ class User
|
||||
$stmt->bind_param("d", $id);
|
||||
$stmt->execute();
|
||||
$stmt->get_result();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$message = _("Invalid token detected, please retry your request from start!");
|
||||
}
|
||||
Token::delete($token);
|
||||
@ -634,14 +598,14 @@ class User
|
||||
* Sends email with link for email change confirmation (security reasons), link is token protected and valid only once.
|
||||
* @return void
|
||||
*/
|
||||
public function email_link(){
|
||||
public function email_link()
|
||||
{
|
||||
global $user, $mysqli;
|
||||
|
||||
$email = $_POST['email'];
|
||||
$id = $this->id;
|
||||
|
||||
if ($user->get_rank()<1 && $id!=$_SESSION['user'])
|
||||
{
|
||||
if ($user->get_rank() < 1 && $id != $_SESSION['user']) {
|
||||
$stmt = $mysqli->prepare("UPDATE users SET email = ? WHERE id=?");
|
||||
$stmt->bind_param("sd", $email, $id);
|
||||
$stmt->execute();
|
||||
@ -677,8 +641,7 @@ class User
|
||||
$token = $_GET['token'];
|
||||
$id = $_GET['id'];
|
||||
|
||||
if (Token::validate($token, $id, "email;%"))
|
||||
{
|
||||
if (Token::validate($token, $id, "email;%")) {
|
||||
$data = explode(";", Token::get_data($token, $id));
|
||||
|
||||
$email = $data[1];
|
||||
@ -689,24 +652,21 @@ class User
|
||||
$stmt->get_result();
|
||||
Token::delete($token);
|
||||
header("Location: " . WEB_URL . "/admin/");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$message = _("Invalid token detected, please retry your request from start!");
|
||||
}
|
||||
|
||||
Token::delete($token);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs current user out.
|
||||
* @return void
|
||||
*/
|
||||
public static function logout(){
|
||||
session_unset();
|
||||
if (isset($_COOKIE['token']))
|
||||
public static function logout()
|
||||
{
|
||||
session_unset();
|
||||
if (isset($_COOKIE['token'])) {
|
||||
$token = $_COOKIE['token'];
|
||||
Token::delete($token);
|
||||
unset($_COOKIE['user']);
|
||||
@ -721,18 +681,17 @@ class User
|
||||
* Changes permissions of current user - only super admin can do this, so it checks permission first.
|
||||
* @return void
|
||||
*/
|
||||
public function change_permission(){
|
||||
global $mysqli, $message, $user;
|
||||
if ($user->get_rank()==0)
|
||||
public function change_permission()
|
||||
{
|
||||
global $mysqli, $message, $user;
|
||||
if ($user->get_rank() == 0) {
|
||||
$permission = $_POST['permission'];
|
||||
$id = $_GET['id'];
|
||||
$stmt = $mysqli->prepare("UPDATE users SET permission=? WHERE id=?");
|
||||
$stmt->bind_param("si", $permission, $id);
|
||||
$stmt->execute();
|
||||
header("Location: " . WEB_URL . "/admin/?do=user&id=" . $id);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$message = _("You don't have permission to do that!");
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ define("POLICY_MAIL", "##policy_mail##"); //contact email in policy
|
||||
define("POLICY_PHONE", "##policy_phone##");
|
||||
define("WHO_WE_ARE","##who_we_are##");
|
||||
define("POLICY_URL","##policy_url##");
|
||||
define("IMPRINT_URL","##imprint_url##");
|
||||
define("INSTALL_OVERRIDE", false);
|
||||
define("DEFAULT_LANGUAGE", "en_GB");
|
||||
define("CUSTOM_LOGO_URL",""); // This will use the default logo if left empty
|
||||
|
@ -20,4 +20,3 @@ fwrite($f, fread($f2, filesize("IISWebConfig")));
|
||||
fclose($f);
|
||||
fclose($f2);
|
||||
}
|
||||
?>
|
||||
|
6
css/bootstrap.min.css
vendored
6
css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1,96 +0,0 @@
|
||||
/* jQuery Growl
|
||||
* Copyright 2015 Kevin Sylvestre
|
||||
* 1.3.5
|
||||
*/
|
||||
.ontop, #growls-default, #growls-tl, #growls-tr, #growls-bl, #growls-br, #growls-tc, #growls-bc, #growls-cc, #growls-cl, #growls-cr {
|
||||
z-index: 50000;
|
||||
position: fixed; }
|
||||
|
||||
#growls-default {
|
||||
top: 10px;
|
||||
right: 10px; }
|
||||
#growls-tl {
|
||||
top: 10px;
|
||||
left: 10px; }
|
||||
#growls-tr {
|
||||
top: 10px;
|
||||
right: 10px; }
|
||||
#growls-bl {
|
||||
bottom: 10px;
|
||||
left: 10px; }
|
||||
#growls-br {
|
||||
bottom: 10px;
|
||||
right: 10px; }
|
||||
#growls-tc {
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
left: 10px; }
|
||||
#growls-bc {
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
left: 10px; }
|
||||
#growls-cc {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -125px; }
|
||||
#growls-cl {
|
||||
top: 50%;
|
||||
left: 10px; }
|
||||
#growls-cr {
|
||||
top: 50%;
|
||||
right: 10px; }
|
||||
#growls-tc .growl, #growls-bc .growl {
|
||||
margin-left: auto;
|
||||
margin-right: auto; }
|
||||
|
||||
.growl {
|
||||
opacity: 0.8;
|
||||
filter: alpha(opacity=80);
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
-webkit-transition: all 0.4s ease-in-out;
|
||||
-moz-transition: all 0.4s ease-in-out;
|
||||
transition: all 0.4s ease-in-out; }
|
||||
.growl.growl-incoming {
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0); }
|
||||
.growl.growl-outgoing {
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0); }
|
||||
.growl.growl-small {
|
||||
width: 200px;
|
||||
padding: 5px;
|
||||
margin: 5px; }
|
||||
.growl.growl-medium {
|
||||
width: 250px;
|
||||
padding: 10px;
|
||||
margin: 10px; }
|
||||
.growl.growl-large {
|
||||
width: 300px;
|
||||
padding: 15px;
|
||||
margin: 15px; }
|
||||
.growl.growl-default {
|
||||
color: #FFF;
|
||||
background: #7f8c8d; }
|
||||
.growl.growl-error {
|
||||
color: #FFF;
|
||||
background: #C0392B; }
|
||||
.growl.growl-notice {
|
||||
color: #FFF;
|
||||
background: #2ECC71; }
|
||||
.growl.growl-warning {
|
||||
color: #FFF;
|
||||
background: #F39C12; }
|
||||
.growl .growl-close {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
font-weight: normal;
|
||||
font-family: helvetica, verdana, sans-serif; }
|
||||
.growl .growl-title {
|
||||
font-size: 18px;
|
||||
line-height: 24px; }
|
||||
.growl .growl-message {
|
||||
font-size: 14px;
|
||||
line-height: 18px; }
|
686
css/main.css
686
css/main.css
File diff suppressed because one or more lines are too long
1
css/main.css.map
Normal file
1
css/main.css.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["main.sass"],"names":[],"mappings":"AAAA,KAMA,qBANW,CAAA,UACE,CAAA,QAQX,CAAA,eACA,CAAA,WACA,CAAA,gBACA,CAAA,mDAEA,eACE,CAAA,IAEJ,WACE,CAAA,cACA,CAAA,EAEF,SACE,CAAA,QACA,CAAA,oBACA,CAAA,gBAEA,oBACE,CAAA,aACA,CAAA,UAEJ,iBACE,CAAA,QAEF,WACE,CAAA,gBACA,CAAA,cACA,CAAA,iBACA,CAAA,gBAEA,iBACE,CAAA,oBACA,CAAA,UACA,CAAA,WACA,CAAA,sBAEA,SACE,CAAA,OACA,CAAA,QACA,CAAA,wBAEF,iBACE,CAAA,cACA,CAAA,KACA,CAAA,MACA,CAAA,OACA,CAAA,QACA,CAAA,qBACA,CACA,cACA,CAAA,+BAEA,iBACE,CAAA,UACA,CAAA,WACA,CAAA,UACA,CAAA,QACA,CAAA,UACA,CAAA,qBACA,CACA,cACA,CAAA,8BAEF,kBACE,CAAA,qCAEA,iBACE,CAAA,8BAGN,wBACE,CAAA,4BAEF,0BACE,CAAA,qCAEF,0BACE,CAAA,OAEN,qBACI,CAAA,+BACA,CAAA,eAEJ,gBACE,CAAA,8BACA,CAAA,kBACA,CAAA,iBACA,CAAA,gBACA,CAAA,iBACA,CAAA,iCAIE,mBACE,CAAA,qFAEF,eAEE,CAAA,uEAKF,kBACE,CAAA,YACA,CAAA,iBACA,CAAA,eACA,CAAA,mEAEF,iBACE,CAAA,kBACA,CAAA,cACA,CAAA,yEAEA,eACE,CAAA,iBACA,CAAA,+EAEF,iBACE,CAAA,SACA,CAAA,aACA,CAAA,kBACA,CAAA,OACA,CAAA,UACA,CAAA,gBACA,CAAA,+FAEA,QACE,CAAA,SACA,CAAA,UACA,CAAA,iBACA,CAAA,UACA,CAAA,WACA,CAAA,iBACA,CAAA,kBACA,CAAA,6FAEJ,iBACE,CAAA,yBACA,CAAA,UACA,CAAA,+EAEF,yBACE,CAAA,+FAEA,iBACE,CAAA,OACA,CAAA,UACA,CAAA,UACA,CAAA,cACA,CAAA,iBACA,CAAA,4BACA,CAAA,+BACA,CAAA,6BACA,CAAA,mHAEF,iBACE,CAAA,UACA,CAAA,UACA,CAAA,WACA,CAAA,iBACA,CAAA,iBACA,CAAA,uHAEA,cACE,CAAA,gBACA,CAAA,6GAIF,QACE,CAAA,iIAEF,cACE,CAAA,iIAEF,eACE,CAAA,sBAEV,gBACE,CAAA,iCAYA,WACE,CAAA,aACA,CAAA,gBACA,CAAA,6DAEF,SACI,CAAA,uEAIF,UACE,CAAA,8IAEF,YAEE,CAAA,4CAIF,sBACE,CAAA,WACA,CAAA,6BACA,CAAA,+CAEF,UACE,CAAA,sBACA,CAAA,WACA,CAAA,eACA,CAAA,gBACA,CAAA,8CAEF,eACE,CAAA,eACA,CAAA,UACA,CAAA,gBACA,CAAA,wGAEA,UACE,CAAA,+BAEN,gBACE,CAAA,uDAEF,4BACE,CAAA,8BAIF,gBACE,CAAA,0CAYF,WACE,CAAA,kBAKN,+BACE,CAAA,eACA,CAAA,gBACA,CAAA,mBACA,CAAA,eACA,CAAA,iCAEA,eACE,CAAA,mCAEA,UACE,CAAA,UACA,CAAA,eACA,CAAA,aACA,CAAA,yCAEA,wBACE,CAAA,2CAEN,aACE,CAAA,+CAEA,eACE,CAAA,cACA,CAAA,gBACA,CAAA,qBACA,CAAA,sBAEN,qBAtSU,CAAA,2BAySR,UAxSU,CAAA,uCA2SV,WACE,CAAA,uCAEF,mCA7SY,CAAA,qDAgTV,qBAlTM,CAAA,UACE,CAAA,4BAqTV,qBAtTQ,CAAA,UACE,CAAA,mCACE,CAAA,6BAyTZ,UA1TU","file":"main.css"}
|
319
css/main.sass
Normal file
319
css/main.sass
Normal file
@ -0,0 +1,319 @@
|
||||
$bg_light: #fff
|
||||
$text_light: #111
|
||||
$bg_dark: #111
|
||||
$text_dark: #fff
|
||||
$border_dark: rgba(255,255,255,.125)
|
||||
|
||||
body
|
||||
background-color: $bg_light
|
||||
color: $text_light
|
||||
margin: 0
|
||||
margin-top: 80px
|
||||
height: 100%
|
||||
line-height: 24px
|
||||
|
||||
.h1, .h2, .h3, h1, h2, h3
|
||||
margin-top: 18px
|
||||
|
||||
img
|
||||
height: auto
|
||||
max-width: 100%
|
||||
|
||||
a
|
||||
padding: 0
|
||||
margin: 0
|
||||
text-decoration: none
|
||||
|
||||
&:hover, &:focus
|
||||
text-decoration: none
|
||||
color: #f5f4f4
|
||||
|
||||
.centered
|
||||
text-align: center
|
||||
|
||||
#switch
|
||||
height: auto
|
||||
line-height: 34px
|
||||
font-size: 25px
|
||||
margin-bottom: 5px
|
||||
|
||||
.switch
|
||||
position: relative
|
||||
display: inline-block
|
||||
width: 60px
|
||||
height: 34px
|
||||
|
||||
input
|
||||
opacity: 0
|
||||
width: 0
|
||||
height: 0
|
||||
|
||||
.slider
|
||||
position: absolute
|
||||
cursor: pointer
|
||||
top: 0
|
||||
left: 0
|
||||
right: 0
|
||||
bottom: 0
|
||||
background-color: #ccc
|
||||
-webkit-transition: 0.4s
|
||||
transition: 0.4s
|
||||
|
||||
&:before
|
||||
position: absolute
|
||||
content: ""
|
||||
height: 26px
|
||||
width: 26px
|
||||
left: 4px
|
||||
bottom: 4px
|
||||
background-color: white
|
||||
-webkit-transition: 0.4s
|
||||
transition: 0.4s
|
||||
|
||||
&.round
|
||||
border-radius: 34px
|
||||
|
||||
&:before
|
||||
border-radius: 50%
|
||||
|
||||
input
|
||||
&:checked + .slider
|
||||
background-color: #2196f3
|
||||
|
||||
&:focus + .slider
|
||||
box-shadow: 0 0 1px #2196f3
|
||||
|
||||
&:checked + .slider:before
|
||||
transform: translateX(26px)
|
||||
|
||||
header
|
||||
background-color: gray
|
||||
border-radius: 0px 0px 30px 30px
|
||||
|
||||
main.container
|
||||
max-width: 1024px
|
||||
min-height: calc(100vh - 157px)
|
||||
padding-right: 15px
|
||||
padding-left: 15px
|
||||
margin-left: auto
|
||||
margin-right: auto
|
||||
|
||||
&#install
|
||||
|
||||
.settings
|
||||
padding-bottom: 25px
|
||||
|
||||
.settings,
|
||||
form .card:not(:first-child)
|
||||
margin-top: 30px
|
||||
|
||||
&#status,
|
||||
&#dashboard
|
||||
|
||||
#status-big
|
||||
margin-bottom: 20px
|
||||
padding: 15px
|
||||
border-radius: 5px
|
||||
font-size: 1.3em
|
||||
|
||||
.timeline
|
||||
position: relative
|
||||
padding: 0 0px 10px
|
||||
margin-top: 4px
|
||||
|
||||
h3
|
||||
margin-top: 40px
|
||||
padding-left: 70px
|
||||
|
||||
.line
|
||||
position: absolute
|
||||
width: 2px
|
||||
display: block
|
||||
background: #c2c2c2
|
||||
top: 0px
|
||||
bottom: 0px
|
||||
margin-left: 31px
|
||||
|
||||
&::before
|
||||
top: -4px
|
||||
left: -4px
|
||||
content: ""
|
||||
position: absolute
|
||||
width: 10px
|
||||
height: 10px
|
||||
border-radius: 50%
|
||||
background: #c2c2c2
|
||||
|
||||
.servicelist
|
||||
position: relative
|
||||
margin: 10px 0px 21px 70px
|
||||
clear: both
|
||||
|
||||
.card
|
||||
margin: 10px 0px 21px 70px
|
||||
|
||||
&::before
|
||||
position: absolute
|
||||
top: 8px
|
||||
left: -24px
|
||||
content: ""
|
||||
border: inherit
|
||||
border-width: 12px
|
||||
border-top-color: transparent
|
||||
border-bottom-color: transparent
|
||||
border-left-color: transparent
|
||||
|
||||
.card-colore.icon
|
||||
position: absolute
|
||||
left: -59px
|
||||
width: 40px
|
||||
height: 40px
|
||||
border-radius: 50%
|
||||
text-align: center
|
||||
|
||||
i
|
||||
font-size: 20px
|
||||
line-height: 40px
|
||||
|
||||
.card-footer
|
||||
|
||||
p
|
||||
margin: 0
|
||||
|
||||
.card-title
|
||||
font-size: .9em
|
||||
|
||||
.card-badge
|
||||
font-size: .75em
|
||||
|
||||
&#status
|
||||
font-size: 1.05em
|
||||
|
||||
&#notfound
|
||||
|
||||
&#privacy
|
||||
|
||||
&#subscripe
|
||||
|
||||
&#subsmail
|
||||
|
||||
&#dashboard
|
||||
|
||||
#status
|
||||
width: 230px
|
||||
display: block
|
||||
text-align: right
|
||||
|
||||
.card-header.bg-primary input#title
|
||||
width: 70%
|
||||
|
||||
.card-header:not(.border-primary)
|
||||
|
||||
input#title
|
||||
width: 100%
|
||||
|
||||
#time,
|
||||
#end_time_wrapper
|
||||
display: none
|
||||
|
||||
article.card
|
||||
|
||||
input
|
||||
background: transparent
|
||||
border: none
|
||||
border-bottom: 1px white outset
|
||||
|
||||
textarea
|
||||
width: 100%
|
||||
background: transparent
|
||||
border: none
|
||||
resize: vertical
|
||||
min-height: 100px
|
||||
|
||||
.delete
|
||||
margin-left: 5px
|
||||
font-size: 1.2em
|
||||
color: white
|
||||
line-height: 25px
|
||||
|
||||
&:hover, &:focus
|
||||
color: #eee
|
||||
|
||||
#type
|
||||
margin-left: 70px
|
||||
|
||||
#status-container.error input
|
||||
box-shadow: 0px 0 2px 1px rgba(255, 0, 0, 1)
|
||||
|
||||
&#login
|
||||
|
||||
.wrapper
|
||||
padding-top: 20px
|
||||
|
||||
&#lostpw
|
||||
|
||||
&#newuser
|
||||
|
||||
&#servicegroup
|
||||
|
||||
&#service
|
||||
|
||||
&#settings
|
||||
|
||||
.input-group-text
|
||||
width: 230px
|
||||
|
||||
#user
|
||||
|
||||
|
||||
footer#footerwrap
|
||||
border-radius: 30px 30px 0px 0px
|
||||
min-height: 60px
|
||||
padding-top: 15px
|
||||
padding-bottom: 10px
|
||||
background: gray
|
||||
|
||||
.dropdown-menu
|
||||
background: gray
|
||||
|
||||
a
|
||||
color: white
|
||||
width: 100%
|
||||
padding: 2px 5px
|
||||
display: block
|
||||
|
||||
&:hover
|
||||
background-color: #2f8ad8
|
||||
|
||||
.input-group.dropup.mb-3
|
||||
display: block
|
||||
|
||||
img
|
||||
max-height: 20px
|
||||
max-width: 25px
|
||||
margin-right: 5px
|
||||
vertical-align: middle
|
||||
|
||||
body[data-theme="dark"]
|
||||
background-color: $bg_dark
|
||||
|
||||
main
|
||||
color: $text_dark
|
||||
|
||||
.fa-moon::before
|
||||
content: "\f185"
|
||||
|
||||
.list-group-item
|
||||
border-color: $border_dark
|
||||
|
||||
&.sub-component
|
||||
background-color: $bg_dark
|
||||
color: $text_dark
|
||||
|
||||
.card
|
||||
background-color: $bg_dark
|
||||
color: $text_dark
|
||||
border-color: $border_dark
|
||||
|
||||
.table
|
||||
color: $text_dark
|
@ -6,18 +6,16 @@ body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
line-height: 24px;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
}
|
||||
|
||||
#status-container
|
||||
{
|
||||
#status-container {
|
||||
border-radius: 0;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
#status-container .item:last-child
|
||||
{
|
||||
#status-container .item:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
@ -25,13 +23,12 @@ body {
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
#status-big
|
||||
{
|
||||
#status-big {
|
||||
float: none;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-family: 'Fira Sans', sans-serif;
|
||||
font-size: 1.5em
|
||||
font-family: "Fira Sans", sans-serif;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
@ -47,7 +44,7 @@ body {
|
||||
padding: 15px 35px;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
font-family: 'Fira Sans', sans-serif;
|
||||
font-family: "Fira Sans", sans-serif;
|
||||
}
|
||||
|
||||
.status {
|
||||
@ -58,10 +55,9 @@ body {
|
||||
padding: 15px 35px;
|
||||
text-align: right;
|
||||
font-size: 0.8em;
|
||||
font-family: 'Fira Sans', sans-serif;
|
||||
font-family: "Fira Sans", sans-serif;
|
||||
}
|
||||
|
||||
|
||||
#status-container .status.success {
|
||||
color: #2fcc66 !important;
|
||||
font-weight: bolder;
|
||||
@ -78,7 +74,7 @@ body {
|
||||
}
|
||||
|
||||
#status-container .status.primary {
|
||||
color:#3A72BD!important;
|
||||
color: #3a72bd !important;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
@ -86,11 +82,10 @@ body {
|
||||
border-color: #2fcc66;
|
||||
}
|
||||
#footerwrap {
|
||||
display: none
|
||||
display: none;
|
||||
}
|
||||
.btn
|
||||
{
|
||||
display: none
|
||||
.btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
h3 {
|
||||
@ -107,34 +102,36 @@ h2.panel-title{
|
||||
float: left;
|
||||
}
|
||||
|
||||
.panel,.panel-heading,.panel-footer{
|
||||
border-width: 3px
|
||||
.panel,
|
||||
.panel-heading,
|
||||
.panel-footer {
|
||||
border-width: 3px;
|
||||
}
|
||||
|
||||
body .panel-danger,
|
||||
.panel-danger > .panel-body,
|
||||
.panel-danger > .panel-heading,
|
||||
.panel-danger > .panel-footer {
|
||||
border-color: #a94442
|
||||
border-color: #a94442;
|
||||
}
|
||||
|
||||
body .panel-success,
|
||||
.panel-success > .panel-body,
|
||||
.panel-success > .panel-heading,
|
||||
.panel-success > .panel-footer {
|
||||
border-color: #2fcc66
|
||||
border-color: #2fcc66;
|
||||
}
|
||||
|
||||
body .panel-warning,
|
||||
.panel-warning > .panel-body,
|
||||
.panel-warning > .panel-heading,
|
||||
.panel-warning > .panel-footer {
|
||||
border-color: #edaa16
|
||||
border-color: #edaa16;
|
||||
}
|
||||
|
||||
body .panel-primary,
|
||||
.panel-primary > .panel-body,
|
||||
.panel-primary > .panel-heading,
|
||||
.panel-primary > .panel-footer {
|
||||
border-color: #337ab7
|
||||
border-color: #337ab7;
|
||||
}
|
@ -41,7 +41,7 @@ if ( isset($_GET['new']) ) {
|
||||
|
||||
// Form validation for subscribers signing up
|
||||
$message = "";
|
||||
Template :: render_header(_("Email Subscription"));
|
||||
Template::render_header(_("Email Subscription"), "subsmail");
|
||||
|
||||
if (isset($_POST['emailaddress'])) {
|
||||
|
||||
@ -81,11 +81,9 @@ if ( isset($_GET['new']) ) {
|
||||
$message = _("Please check<br>");
|
||||
$message .= implode("<br> ", $messages);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['emailaddress']) && empty($message))
|
||||
{
|
||||
if (isset($_POST['emailaddress']) && empty($message)) {
|
||||
|
||||
// Check if email is already registered
|
||||
$boolUserExist = false;
|
||||
@ -100,13 +98,11 @@ if ( isset($_GET['new']) ) {
|
||||
$subscriber->add($subscriber->typeID, $_POST['emailaddress']);
|
||||
$url = WEB_URL . "/index.php?do=manage&token=" . $subscriber->token; // Needed again after adding subscriber since token did not exist before add
|
||||
$msg = sprintf(_("Thank you for registering to receive status updates via email.</br></br> Click on the following link to confirm and manage your subcription: <a href=\"%s\">%s</a>. New subscriptions must be confirmed within 2 hours"), $url, NAME . ' - ' . _("Validate subscription"));
|
||||
|
||||
} else {
|
||||
if (!$subscriber->active) {
|
||||
// Subscriber is registered, but has not been activated yet...
|
||||
$msg = sprintf(_("Thank you for registering to receive status updates via email.</br></br> Click on the following link to confirm and manage your subcription: <a href=\"%s\">%s</a>. New subscriptions must be confirmed within 2 hours"), $url, NAME . ' - ' . _("Validate subscription"));
|
||||
$subscriber->activate($subscriber->id);
|
||||
|
||||
} else {
|
||||
// subscriber is registered and active
|
||||
$msg = sprintf(_("Click on the following link to update your existing subscription: <a href=\"%s\">%s</a>"), $url, NAME . ' - ' . _("Manage subscription"));
|
||||
@ -176,14 +172,12 @@ if ( isset($_GET['new']) ) {
|
||||
header('Location: subscriptions.php');
|
||||
exit;
|
||||
} else {
|
||||
Template :: render_header(_("Email Subscription"));
|
||||
Template::render_header(_("Email Subscription"), "subsmail");
|
||||
|
||||
$header = _("We cannot find a valid subscriber account matching those details");
|
||||
$message = _("If you have recently subscribed, please make sure you activate the account within two hours of doing so. You are welcome to try and re-subscribe.");
|
||||
$constellation->render_warning($header, $message, true, WEB_URL, _('Go back'));
|
||||
}
|
||||
|
||||
|
||||
} else if (isset($_GET['do']) && $_GET['do'] == 'unsubscribe') {
|
||||
// Handle unsubscriptions
|
||||
// TODO This function is universal and should probably live elsewhere??
|
||||
@ -193,16 +187,15 @@ if ( isset($_GET['new']) ) {
|
||||
if ($subscriber->get_subscriber_by_token($_GET['token'])) {
|
||||
$subscriber->delete($subscriber->id);
|
||||
$subscriber->set_logged_off();
|
||||
Template :: render_header(_("Email Subscription"));
|
||||
Template::render_header(_("Email Subscription"), "subsmail");
|
||||
|
||||
$header = _("You have been unsubscribed from our system");
|
||||
$message = _("We are sorry to see you go. If you want to subscribe again at a later date please feel free to re-subscribe.");
|
||||
$constellation->render_success($header, $message, true, WEB_URL, _('Go back'));
|
||||
|
||||
} else {
|
||||
// TODO Log token for troubleshooting ?
|
||||
// Cannot find subscriber - show alert
|
||||
Template :: render_header(_("Email Subscription"));
|
||||
Template::render_header(_("Email Subscription"), "subsmail");
|
||||
$header = _("We are unable to find any valid subscriber detail matching your submitted data!");
|
||||
$message = _("If you believe this to be an error, please contact the system admininistrator.");
|
||||
$constellation->render_warning($header, $message, true, WEB_URL, _('Go back'));
|
||||
|
15
index.php
15
index.php
@ -1,11 +1,9 @@
|
||||
<?php
|
||||
require_once("libs/parsedown/Parsedown.php");
|
||||
|
||||
if (!file_exists("config.php"))
|
||||
{
|
||||
if (!file_exists("config.php")) {
|
||||
require_once("template.php");
|
||||
require_once("install.php");
|
||||
|
||||
} elseif (isset($_GET['do'])) { // we can add other actions with $_GET['do'] later.
|
||||
// Fix for translation via _(). We need config.php first...
|
||||
require_once("config.php");
|
||||
@ -50,12 +48,10 @@ define("GOOGLE_RECAPTCHA_SITEKEY", $db->getSetting($mysqli,"google_recaptcha_sit
|
||||
define("GOOGLE_RECAPTCHA_SECRET", $db->getSetting($mysqli, "google_recaptcha_secret"));
|
||||
$offset = 0;
|
||||
|
||||
if (isset($_GET['ajax']))
|
||||
{
|
||||
if (isset($_GET['ajax'])) {
|
||||
$constellation->render_incidents(false, $_GET['offset'], 5);
|
||||
exit();
|
||||
}else if (isset($_GET['offset']))
|
||||
{
|
||||
} else if (isset($_GET['offset'])) {
|
||||
$offset = $_GET['offset'];
|
||||
}
|
||||
|
||||
@ -92,7 +88,7 @@ if($db->getSetting($mysqli,"notifyUpdates") == "yes"){
|
||||
}
|
||||
}
|
||||
*/
|
||||
Template::render_header("Status");
|
||||
Template::render_header("Status", "status");
|
||||
?>
|
||||
<div class="text-center">
|
||||
<h2><?php echo _("Current status"); ?></h2>
|
||||
@ -101,8 +97,7 @@ Template::render_header("Status");
|
||||
<?php $constellation->render_status(); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($mysqli->query("SELECT count(*) FROM status")->num_rows)
|
||||
{
|
||||
<?php if ($mysqli->query("SELECT count(*) FROM status")->num_rows) {
|
||||
?>
|
||||
<div id="timeline">
|
||||
<div class="item">
|
||||
|
281
install.php
281
install.php
@ -20,8 +20,7 @@ if(isset($_GET["isDev"])){
|
||||
$negotiator = new LocaleNegotiator("en_GB");
|
||||
$message = "";
|
||||
$db = new SSDB();
|
||||
if (!isset($_SESSION['locale'])||isset($_GET['lang']))
|
||||
{
|
||||
if (!isset($_SESSION['locale']) || isset($_GET['lang'])) {
|
||||
$override = ((isset($_GET['lang'])) ? $_GET['lang'] : null);
|
||||
$best_match = $negotiator->negotiate($override);
|
||||
$_SESSION['locale'] = $best_match;
|
||||
@ -32,16 +31,14 @@ if (!isset($_SESSION['locale'])||isset($_GET['lang']))
|
||||
textdomain("server-status");
|
||||
}
|
||||
|
||||
if (isset($_POST['server']))
|
||||
{
|
||||
if (isset($_POST['server'])) {
|
||||
$mysqli = new mysqli($_POST['server'], $_POST['dbuser'], $_POST['dbpassword'], $_POST['database']);
|
||||
|
||||
if ($mysqli->connect_errno) {
|
||||
$message .= sprintf(_("Connection failed: %s\n"), $mysqli->connect_error);
|
||||
}
|
||||
|
||||
if (isset($_POST['url']) && filter_var($_POST['url'], FILTER_VALIDATE_URL) === false)
|
||||
{
|
||||
if (isset($_POST['url']) && filter_var($_POST['url'], FILTER_VALIDATE_URL) === false) {
|
||||
$message .= _("Please set valid url!");
|
||||
}
|
||||
|
||||
@ -78,19 +75,16 @@ if (isset($_POST['server']))
|
||||
$messages[] = _("Database user");
|
||||
}
|
||||
|
||||
if (0 == strlen(trim($_POST['dbpassword'])))
|
||||
{
|
||||
if (0 == strlen(trim($_POST['dbpassword']))) {
|
||||
$messages[] = _("Database password");
|
||||
}
|
||||
if (isset($messages))
|
||||
{
|
||||
if (isset($messages)) {
|
||||
$message .= _("Please enter");
|
||||
$message .= implode(", ", $messages);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['server']) && empty($message))
|
||||
{
|
||||
if (isset($_POST['server']) && empty($message)) {
|
||||
define("MAILER_NAME", $_POST['mailer']);
|
||||
define("MAILER_ADDRESS", $_POST['mailer_email']);
|
||||
define("INSTALL_OVERRIDE", true);
|
||||
@ -102,27 +96,23 @@ if(isset($_POST['server']) && empty($message))
|
||||
|
||||
foreach ($array as $value) {
|
||||
$val = trim($value);
|
||||
if (empty($val))
|
||||
{
|
||||
if (empty($val)) {
|
||||
continue;
|
||||
}
|
||||
$q_res = $mysqli->query($value);
|
||||
if ($q_res === false)
|
||||
{
|
||||
if ($q_res === false) {
|
||||
$message = sprintf(_("Error while creating database. Please check permission for your account or MYSQL version.<br>Error: %s"), $mysqli->error);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($message))
|
||||
{
|
||||
if (empty($message)) {
|
||||
require_once("classes/constellation.php");
|
||||
|
||||
User::add();
|
||||
}
|
||||
|
||||
if (empty($message))
|
||||
{
|
||||
if (empty($message)) {
|
||||
//Create config
|
||||
$config = file_get_contents("config.php.template");
|
||||
//$config = str_replace("##name##", htmlspecialchars($_POST['servername'], ENT_QUOTES), $config);
|
||||
@ -178,137 +168,222 @@ if(isset($_POST['server']) && empty($message))
|
||||
header("Location: " . WEB_URL);
|
||||
}
|
||||
}
|
||||
Template::render_header(_("Install"));
|
||||
?>
|
||||
<h1 class="text-center"><?php echo _("Prerequisite");?></h1>
|
||||
<summary><?php echo _("If any of the following prerequisites are shown as failed (red X), please correct the issue and reload the page before proceeding with the installation.");?></summary>
|
||||
<?php
|
||||
|
||||
Template::render_header(_("Install"), "install");
|
||||
|
||||
$php_version_req = sprintf(_("Minimum PHP version %s"), MINIMUM_PHP_VERSION);
|
||||
$preq_fail = array("remove", "danger");
|
||||
$preq_ok = array("ok", "success");
|
||||
$preq_fail = array("times", "danger");
|
||||
$preq_ok = array("check", "success");
|
||||
|
||||
$preq_phpver = $preq_fail;
|
||||
$preq_mysqlnd = $preq_fail;
|
||||
$preq_writedir = $preq_fail;
|
||||
|
||||
// Check if PHP version if > MINIMUM_PHP_VERSION
|
||||
if (strnatcmp(phpversion(), MINIMUM_PHP_VERSION) >= 0) { $preq_phpver = $preq_ok; }
|
||||
if (strnatcmp(phpversion(), MINIMUM_PHP_VERSION) >= 0) {
|
||||
$preq_phpver = $preq_ok;
|
||||
}
|
||||
|
||||
// Test for mysqlnd precense. The mysqlnd driver provides some extra functions that is not available
|
||||
// if the plain mysql package is installed, and mysqli_get_client_stats is one of them. This is documented
|
||||
// on the PHP site at http://www.php.net/manual/en/mysqlnd.stats.php
|
||||
// This test is also discussed at https://stackoverflow.com/questions/1475701/how-to-know-if-mysqlnd-is-the-active-driver
|
||||
if ( function_exists('mysqli_get_client_stats') ) { $preq_mysqlnd = $preq_ok; }
|
||||
if (function_exists('mysqli_get_client_stats')) {
|
||||
$preq_mysqlnd = $preq_ok;
|
||||
}
|
||||
|
||||
// Check if we have access to write to location
|
||||
if ( is_writable(__DIR__) ) { $preq_writedir = $preq_ok; }
|
||||
if (is_writable(__DIR__)) {
|
||||
$preq_writedir = $preq_ok;
|
||||
}
|
||||
|
||||
?>
|
||||
<section class="prereq-section clearfix">
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-md-6 text-right"><label for="php version"><?php echo $php_version_req;?></div>
|
||||
<div class="col-md-6"><a href="#" class="btn btn-<?php echo $preq_phpver[1];?>"><span class="glyphicon glyphicon-<?php echo $preq_phpver[0]; ?>"></span></a></div>
|
||||
<div>
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<?php echo _("Prerequisite"); ?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<span class="card-title"><?php echo _("If any of the following prerequisites are shown as failed (red X), please correct the issue and reload the page before proceeding with the installation."); ?></span>
|
||||
<p class="card-text">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-right"><label for="mysqlnd Library installed"><?php echo _('PHP mysqlnd library installed');?></div>
|
||||
<div class="col-md-6"><a href="#" class="btn btn-<?php echo $preq_mysqlnd[1];?>"><span class="glyphicon glyphicon-<?php echo $preq_mysqlnd[0]; ?>"></span></a></div>
|
||||
<div class="col text-center"><?php echo $php_version_req; ?></div>
|
||||
<div class="col text-center"><a class="btn btn-<?php echo $preq_phpver[1]; ?>"><i class="fas fa-<?php echo $preq_phpver[0]; ?>"></i></a></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-right"><label for="write_access"><?php echo _('Write access to web directory');?></div>
|
||||
<div class="col-md-6"><a href="#" class="btn btn-<?php echo $preq_writedir[1];?>"><span class="glyphicon glyphicon-<?php echo $preq_writedir[0]; ?>"></span></a></div>
|
||||
<div class="row mt-1">
|
||||
<div class="col text-center"><?php echo _('PHP mysqlnd library installed'); ?></div>
|
||||
<div class="col text-center"><a class="btn btn-<?php echo $preq_mysqlnd[1]; ?>"><i class="fas fa-<?php echo $preq_mysqlnd[0]; ?>"></i></a></div>
|
||||
</div>
|
||||
<div class="row mt-1">
|
||||
<div class="col text-center"><?php echo _('Write access to web directory'); ?></div>
|
||||
<div class="col text-center"><a class="btn btn-<?php echo $preq_writedir[1]; ?>"><i class="fas fa-<?php echo $preq_writedir[0]; ?>"></i></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<div class="settings">
|
||||
<h1 class="text-center"><?php echo _("Installation"); ?></h1>
|
||||
<?php
|
||||
if (!empty($message))
|
||||
{
|
||||
if (!empty($message)) {
|
||||
?>
|
||||
<p class="alert alert-danger"><?php echo $message; ?></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<summary><?php echo _("We will ask you some basic questions about your website. Most of the settings can be later edited in the config.php file.");?></summary>
|
||||
<span><?php echo _("We will ask you some basic questions about your website. Most of the settings can be later edited in the config.php file."); ?></span>
|
||||
|
||||
<form method="post" action="." class="clearfix install">
|
||||
<section class="install-section clearfix">
|
||||
<h2><?php echo _("Website details");?></h2>
|
||||
<summary><?php echo _("We need a name for your status page (shown behind page title after the dash) and a url of your server status installation (i.e. <a href='#'>https://example.com/status</a> - without the trailing slash), so we can mail users link for forgotten password etc...");?></summary>
|
||||
<form method="post" action=".">
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<?php echo _("Website details"); ?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<span class="card-title"><?php echo _("We need a name for your status page (shown behind page title after the dash) and a url of your server status installation (i.e. <a href='#'>https://example.com/status</a> - without the trailing slash), so we can mail users link for forgotten password etc..."); ?></span>
|
||||
<p class="card-text">
|
||||
<div class="row">
|
||||
<div class="col form-floating">
|
||||
<input type="text" name="servername" value="<?php echo ((isset($_POST['servername'])) ? htmlspecialchars($_POST['servername'], ENT_QUOTES) : ''); ?>" id="servername" placeholder="<?php echo _("Servername"); ?>" class="form-control" required>
|
||||
<label for="servername"><?php echo _("Servername"); ?>: </label>
|
||||
</div>
|
||||
<div class="col form-floating">
|
||||
<input type="url" name="url" value="<?php echo ((isset($_POST['url'])) ? htmlspecialchars($_POST['url'], ENT_QUOTES) : ''); ?>" id="url" placeholder="<?php echo _("Url"); ?>" class="form-control" required>
|
||||
<label for="url"><?php echo _("Url"); ?>: </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col form-floating">
|
||||
<input type="text" name="mailer" value="<?php echo ((isset($_POST['mailer'])) ? htmlspecialchars($_POST['mailer'], ENT_QUOTES) : ''); ?>" id="mailer" placeholder="<?php echo _("Mail-Name"); ?>" class="form-control" required>
|
||||
<label for="mailer"><?php echo _("Mail-Name"); ?>: </label>
|
||||
</div>
|
||||
<div class="col form-floating">
|
||||
<input type="email" name="mailer_email" value="<?php echo ((isset($_POST['mailer_email'])) ? htmlspecialchars($_POST['mailer_email'], ENT_QUOTES) : ''); ?>" id="mailer_email" placeholder="<?php echo _("Email"); ?>" class="form-control" required>
|
||||
<label for="mailer_email"><?php echo _("Email"); ?>: </label>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group clearfix">
|
||||
<div class="col-sm-6"><label for="servername"><?php echo _("Name");?>: </label><input type="text" name="servername" value="<?php echo ((isset($_POST['servername']))?htmlspecialchars($_POST['servername'], ENT_QUOTES):'');?>" id="servername" placeholder="<?php echo _("Name");?>" class="form-control" required></div>
|
||||
<div class="col-sm-6"><label for="url"><?php echo _("Url");?>: </label><input type="url" name="url" value="<?php echo ((isset($_POST['url']))?htmlspecialchars($_POST['url'], ENT_QUOTES):'');?>" id="url" placeholder="<?php echo _("Url");?>" class="form-control" required></div>
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<?php echo _("Database connection"); ?>
|
||||
</div>
|
||||
<summary><?php echo _("A title that you want to be shown on the top of the page.");?></summary>
|
||||
<div class="form-group clearfix">
|
||||
<div class="col-sm-6"><label for="title"><?php echo _("Title");?>: </label><input type="text" name="title" value="<?php echo ((isset($_POST['title']))?htmlspecialchars($_POST['title'], ENT_QUOTES):'Server Status');?>" id="title" placeholder="<?php echo _("Title");?>" class="form-control" required></div>
|
||||
<div class="col-sm-6"></div>
|
||||
<div class="card-body">
|
||||
<span class="card-title"><?php echo _("We need database connection to be able to create tables. Please check that your account has the permission needed to do that."); ?></span>
|
||||
<p class="card-text">
|
||||
<div class="row">
|
||||
<div class="col form-floating">
|
||||
<input type="text" name="server" value="<?php echo ((isset($_POST['server'])) ? htmlspecialchars($_POST['server'], ENT_QUOTES) : ''); ?>" id="server" placeholder="<?php echo _("Server"); ?>" class="form-control" required>
|
||||
<label for="server"><?php echo _("Server"); ?>: </label>
|
||||
</div>
|
||||
<div class="col form-floating">
|
||||
<input type="text" name="database" value="<?php echo ((isset($_POST['database'])) ? htmlspecialchars($_POST['database'], ENT_QUOTES) : ''); ?>" id="database" placeholder="<?php echo _("Database"); ?>" class="form-control" required>
|
||||
<label for="database"><?php echo _("Database"); ?>: </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col form-floating">
|
||||
<input type="text" name="dbuser" value="<?php echo ((isset($_POST['dbuser'])) ? htmlspecialchars($_POST['dbuser'], ENT_QUOTES) : ''); ?>" id="dbuser" placeholder="<?php echo _("User"); ?>" class="form-control" required>
|
||||
<label for="dbuser"><?php echo _("User"); ?>: </label>
|
||||
</div>
|
||||
<div class="col form-floating">
|
||||
<input type="password" name="dbpassword" value="<?php echo ((isset($_POST['dbpassword'])) ? htmlspecialchars($_POST['dbpassword'], ENT_QUOTES) : ''); ?>" id="dbpassword" placeholder="<?php echo _("Password"); ?>" class="form-control" required>
|
||||
<label for="dbpassword"><?php echo _("Password"); ?>: </label>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
<summary><?php echo _("Also an email address for mailer would be nice :)");?></summary>
|
||||
<div class="form-group clearfix">
|
||||
<div class="col-sm-6"><label for="mailer"><?php echo _("Name");?>: </label><input type="text" name="mailer" value="<?php echo ((isset($_POST['mailer']))?htmlspecialchars($_POST['mailer'], ENT_QUOTES):'');?>" id="mailer" placeholder="<?php echo _("Name");?>" class="form-control" required></div>
|
||||
<div class="col-sm-6"><label for="mailer_email"><?php echo _("Email");?>: </label><input type="email" name="mailer_email" value="<?php echo ((isset($_POST['mailer_email']))?htmlspecialchars($_POST['mailer_email'], ENT_QUOTES):'');?>" id="mailer_email" placeholder="<?php echo _("Email");?>" class="form-control" required></div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="install-section clearfix">
|
||||
<h2><?php echo _("Database connection");?></h2>
|
||||
<summary><?php echo _("We need database connection to be able to create tables. Please check that your account has the permission needed to do that.");?></summary>
|
||||
|
||||
<div class="form-group clearfix">
|
||||
<div class="col-sm-6"><label for="server"><?php echo _("Server");?>: </label><input type="text" name="server" value="<?php echo ((isset($_POST['server']))?htmlspecialchars($_POST['server'], ENT_QUOTES):'');?>" id="server" placeholder="<?php echo _("Server");?>" class="form-control" required></div>
|
||||
<div class="col-sm-6"><label for="database"><?php echo _("Database");?>: </label><input type="text" name="database" value="<?php echo ((isset($_POST['database']))?htmlspecialchars($_POST['database'], ENT_QUOTES):'');?>" id="database" placeholder="<?php echo _("Database");?>" class="form-control" required></div>
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<?php echo _("Privacy Policy"); ?>
|
||||
</div>
|
||||
<div class="form-group clearfix">
|
||||
<div class="col-sm-6"><label for="dbuser"><?php echo _("User");?>: </label><input type="text" name="dbuser" value="<?php echo ((isset($_POST['dbuser']))?htmlspecialchars($_POST['dbuser'], ENT_QUOTES):'');?>" id="dbuser" placeholder="<?php echo _("User");?>" class="form-control" required></div>
|
||||
<div class="col-sm-6"><label for="dbpassword"><?php echo _("Password");?>: </label><input type="password" name="dbpassword" value="<?php echo ((isset($_POST['dbpassword']))?htmlspecialchars($_POST['dbpassword'], ENT_QUOTES):'');?>" id="dbpassword" placeholder="<?php echo _("Password");?>" class="form-control" required></div>
|
||||
<div class="card-body">
|
||||
<span class="card-title"><?php echo _("Since you are collecting personal information, the GDPR needs you to have a privacy policy. Enter the details below."); ?></span>
|
||||
<p class="card-text">
|
||||
<div class="row">
|
||||
<div class="col form-floating">
|
||||
<input type="text" name="policy_name" value="<?php echo ((isset($_POST['policy_name'])) ? htmlspecialchars($_POST['policy_name'], ENT_QUOTES) : ''); ?>" id="policy_name" placeholder="<?php echo _("Company name"); ?>" class="form-control" required>
|
||||
<label for="policy_name"><?php echo _("Name"); ?>: </label>
|
||||
</div>
|
||||
</section>
|
||||
<section class="install-section clearfix">
|
||||
<h2><?php echo _("Privacy Policy");?></h2>
|
||||
<summary><?php echo _("Since you are collecting personal information, the GDPR needs you to have a privacy policy. Enter the details below.");?></summary>
|
||||
|
||||
<div class="form-group clearfix">
|
||||
<div class="col-sm-6"><label for="policy_name"><?php echo _("Name");?>: </label><input type="text" name="policy_name" value="<?php echo ((isset($_POST['policy_name']))?htmlspecialchars($_POST['policy_name'], ENT_QUOTES):'');?>" id="policy_name" placeholder="<?php echo _("Company name");?>" class="form-control" required></div>
|
||||
<div class="col-sm-6"><label for="address"><?php echo _("Address");?>: </label><input type="text" name="address" value="<?php echo ((isset($_POST['address']))?htmlspecialchars($_POST['address'], ENT_QUOTES):'');?>" id="address" placeholder="<?php echo _("Full address");?>" class="form-control" required></div>
|
||||
<div class="col form-floating">
|
||||
<input type="text" name="address" value="<?php echo ((isset($_POST['address'])) ? htmlspecialchars($_POST['address'], ENT_QUOTES) : ''); ?>" id="address" placeholder="<?php echo _("Full address"); ?>" class="form-control" required>
|
||||
<label for="address"><?php echo _("Address"); ?>: </label>
|
||||
</div>
|
||||
<div class="form-group clearfix">
|
||||
<div class="col-sm-6"><label for="policy_mail"><?php echo _("E-Mail");?>: </label><input type="text" name="policy_mail" value="<?php echo ((isset($_POST['policy_mail']))?htmlspecialchars($_POST['policy_mail'], ENT_QUOTES):'');?>" id="policy_mail" placeholder="<?php echo _("E-Mail");?>" class="form-control" required></div>
|
||||
<div class="col-sm-6"><label for="policy_phone"><?php echo _("Phone");?>: </label><input type="text" name="policy_phone" value="<?php echo ((isset($_POST['policy_phone']))?htmlspecialchars($_POST['policy_phone'], ENT_QUOTES):'');?>" id="policy_phone" placeholder="<?php echo _("Phone number");?>" class="form-control"></div>
|
||||
</div>
|
||||
<div class="form-group clearfix">
|
||||
<div class=""><label for="who_we_are"><?php echo _("Who we are");?>: </label><textarea class="form-control" id="who_we_are" rows="3" name="who_we_are" placeholder="<?php echo _("Some info about yourself");?>" value="<?php echo ((isset($_POST['who_we_are']))?htmlspecialchars($_POST['who_we_are'], ENT_QUOTES):'');?>"></textarea></div>
|
||||
<div class="row mt-3">
|
||||
<div class="col form-floating">
|
||||
<input type="text" name="policy_mail" value="<?php echo ((isset($_POST['policy_mail'])) ? htmlspecialchars($_POST['policy_mail'], ENT_QUOTES) : ''); ?>" id="policy_mail" placeholder="<?php echo _("E-Mail"); ?>" class="form-control" required>
|
||||
<label for="policy_mail"><?php echo _("E-Mail"); ?>: </label>
|
||||
</div>
|
||||
<div class="form-group clearfix">
|
||||
<div class="col-sm-12"><label for="url"><?php echo _("External Policy Url");?>: </label>
|
||||
<summary><?php echo _("If you alredy have an existing Policy published, please provide the full Url to override the local policy definition. Leave blank to use the local definition");?></summary>
|
||||
<div class="col form-floating">
|
||||
<input type="text" name="policy_phone" value="<?php echo ((isset($_POST['policy_phone'])) ? htmlspecialchars($_POST['policy_phone'], ENT_QUOTES) : ''); ?>" id="policy_phone" placeholder="<?php echo _("Phone number"); ?>" class="form-control">
|
||||
<label for="policy_phone"><?php echo _("Phone"); ?>: </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col form-floating">
|
||||
<textarea class="form-control" id="who_we_are" rows="3" name="who_we_are" placeholder="<?php echo _("Some info about yourself"); ?>" value="<?php echo ((isset($_POST['who_we_are'])) ? htmlspecialchars($_POST['who_we_are'], ENT_QUOTES) : ''); ?>"></textarea>
|
||||
<label for="who_we_are"><?php echo _("Who we are"); ?>: </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<span><?php echo _("If you alredy have an existing Policy published, please provide the full Url to override the local policy definition. Leave blank to use the local definition"); ?></span>
|
||||
<div class="col form-floating">
|
||||
<input type="policy_url" name="policy_url" value="<?php echo ((isset($_POST['policy_url'])) ? htmlspecialchars($_POST['policy_url'], ENT_QUOTES) : ''); ?>" id="policy_url" placeholder="<?php echo _("External Policy Url"); ?>" class="form-control">
|
||||
<label for="url"><?php echo _("External Policy Url"); ?>: </label>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="install-section clearfix">
|
||||
<h2><?php echo _("User");?></h2>
|
||||
<summary><?php echo _("And finally, we need info to create a new user. You don't have to provide it, but then... No status page admin...");?></summary>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-6"><label for="name"><?php echo _("Name");?>: </label><input type="text" maxlength="50" name="name" value="<?php echo ((isset($_POST['name']))?htmlspecialchars($_POST['name'], ENT_QUOTES):'');?>" id="name" placeholder="<?php echo _("Name");?>" class="form-control" required></div>
|
||||
<div class="col-sm-6"><label for="surname"><?php echo _("Surname");?>: </label><input type="text" maxlength="50" name="surname" value="<?php echo ((isset($_POST['surname']))?htmlspecialchars($_POST['surname'], ENT_QUOTES):'');?>" id="surname" placeholder="<?php echo _("Surname");?>" class="form-control" required></div>
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-6"><label for="username"><?php echo _("Username");?>:</label><input type="text" maxlength="50" name="username" value="<?php echo ((isset($_POST['username']))?htmlspecialchars($_POST['username'], ENT_QUOTES):'');?>" id="username" placeholder="<?php echo _("Username");?>" class="form-control" required></div>
|
||||
<div class="col-sm-6"><label for="email"><?php echo _("Email");?>:</label><input type="email" maxlength="60" name="email" value="<?php echo ((isset($_POST['email']))?htmlspecialchars($_POST['email'], ENT_QUOTES):'');?>" id="email" placeholder="<?php echo _("Email");?>" class="form-control" required><input type="hidden" name="permission" value="0"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-6"><label for="password"><?php echo _("Password");?>:</label><input type="password" name="password" value="<?php echo ((isset($_POST['password']))?htmlspecialchars($_POST['password'], ENT_QUOTES):'');?>" id="password" placeholder="<?php echo _("Password");?>" class="form-control" required></div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<?php echo _("User"); ?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<span class="card-title"><?php echo _("And finally, we need info to create a new user. You don't have to provide it, but then... No status page admin..."); ?></span>
|
||||
<p class="card-text">
|
||||
<div class="row">
|
||||
<div class="col form-floating">
|
||||
<input type="text" maxlength="50" name="name" value="<?php echo ((isset($_POST['name'])) ? htmlspecialchars($_POST['name'], ENT_QUOTES) : ''); ?>" id="name" placeholder="<?php echo _("Name"); ?>" class="form-control" required>
|
||||
<label for="name"><?php echo _("Name"); ?>: </label>
|
||||
</div>
|
||||
<div class="col form-floating">
|
||||
<input type="text" maxlength="50" name="surname" value="<?php echo ((isset($_POST['surname'])) ? htmlspecialchars($_POST['surname'], ENT_QUOTES) : ''); ?>" id="surname" placeholder="<?php echo _("Surname"); ?>" class="form-control" required>
|
||||
<label for="surname"><?php echo _("Surname"); ?>: </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col form-floating">
|
||||
<input type="text" maxlength="50" name="username" value="<?php echo ((isset($_POST['username'])) ? htmlspecialchars($_POST['username'], ENT_QUOTES) : ''); ?>" id="username" placeholder="<?php echo _("Username"); ?>" class="form-control" required>
|
||||
<label for="username"><?php echo _("Username"); ?>:</label>
|
||||
</div>
|
||||
<div class="col form-floating">
|
||||
<input type="email" maxlength="60" name="email" value="<?php echo ((isset($_POST['email'])) ? htmlspecialchars($_POST['email'], ENT_QUOTES) : ''); ?>" id="email" placeholder="<?php echo _("Email"); ?>" class="form-control" required><input type="hidden" name="permission" value="0">
|
||||
<label for="email"><?php echo _("Email"); ?>:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col form-floating">
|
||||
<input type="password" name="password" value="<?php echo ((isset($_POST['password'])) ? htmlspecialchars($_POST['password'], ENT_QUOTES) : ''); ?>" id="password" placeholder="<?php echo _("Password"); ?>" class="form-control" required>
|
||||
<label for="password"><?php echo _("Password"); ?>:</label>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="border: none;">
|
||||
<input type="hidden" value="0" name="permission">
|
||||
<button type="submit" class="btn btn-success pull-right"><?php echo _("Run install!");?></button>
|
||||
<button type="submit" class="btn btn-success float-end"><?php echo _("Run install!"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
Template::render_footer();
|
||||
|
42
install.sql
42
install.sql
@ -56,7 +56,6 @@ CREATE TABLE queue_notify (
|
||||
retries tinyint(1) DEFAULT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_czech_ci;
|
||||
|
||||
CREATE TABLE services_groups (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
name varchar(50) NOT NULL,
|
||||
@ -64,7 +63,6 @@ CREATE TABLE services_groups (
|
||||
visibility tinyint(4) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE queue_task (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
type_id int(11) NOT NULL,
|
||||
@ -123,20 +121,32 @@ ALTER TABLE `services_subscriber`
|
||||
ADD CONSTRAINT `services_subscriber_ibfk_1` FOREIGN KEY (`subscriberIDFK`) REFERENCES `subscribers` (`subscriberID`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `services_subscriber_ibfk_2` FOREIGN KEY (`serviceIDFK`) REFERENCES `services` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
COMMIT;
|
||||
|
||||
ALTER TABLE `subscribers` CHANGE COLUMN lastname lastname varchar(255) DEFAULT NULL; # was varchar(255) NOT NULL
|
||||
ALTER TABLE `subscribers` CHANGE COLUMN firstname firstname varchar(255) DEFAULT NULL; # was varchar(255) NOT NULL
|
||||
ALTER TABLE `subscribers` CHANGE COLUMN lastname lastname varchar(255) DEFAULT NULL;
|
||||
# was varchar(255) NOT NULL
|
||||
ALTER TABLE `subscribers` CHANGE COLUMN firstname firstname varchar(255) DEFAULT NULL;
|
||||
# was varchar(255) NOT NULL
|
||||
ALTER TABLE `subscribers` CHANGE COLUMN telegramID userID varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL;
|
||||
ALTER TABLE `subscribers` ADD COLUMN typeID tinyint(1) NOT NULL AFTER subscriberID;
|
||||
ALTER TABLE `subscribers` ADD COLUMN token varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL AFTER lastname;
|
||||
ALTER TABLE `subscribers` ADD COLUMN expires int(11) DEFAULT NULL;
|
||||
ALTER TABLE `subscribers` ADD COLUMN active tinyint(1) DEFAULT NULL;
|
||||
ALTER TABLE `subscribers` ADD COLUMN create_time int(11) DEFAULT NULL;
|
||||
ALTER TABLE `subscribers` ADD COLUMN update_time int(11) DEFAULT NULL;
|
||||
ALTER TABLE `subscribers` DROP INDEX telegramID; # was UNIQUE (telegramID)
|
||||
ALTER TABLE `subscribers` ADD UNIQUE userID (userID);
|
||||
ALTER TABLE `subscribers`
|
||||
ADD COLUMN typeID tinyint(1) NOT NULL
|
||||
AFTER subscriberID;
|
||||
ALTER TABLE `subscribers`
|
||||
ADD COLUMN token varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL
|
||||
AFTER lastname;
|
||||
ALTER TABLE `subscribers`
|
||||
ADD COLUMN expires int(11) DEFAULT NULL;
|
||||
ALTER TABLE `subscribers`
|
||||
ADD COLUMN active tinyint(1) DEFAULT NULL;
|
||||
ALTER TABLE `subscribers`
|
||||
ADD COLUMN create_time int(11) DEFAULT NULL;
|
||||
ALTER TABLE `subscribers`
|
||||
ADD COLUMN update_time int(11) DEFAULT NULL;
|
||||
ALTER TABLE `subscribers` DROP INDEX telegramID;
|
||||
# was UNIQUE (telegramID)
|
||||
ALTER TABLE `subscribers`
|
||||
ADD UNIQUE userID (userID);
|
||||
COMMIT;
|
||||
|
||||
ALTER TABLE services ADD COLUMN description varchar(200) COLLATE utf8_czech_ci NOT NULL;
|
||||
ALTER TABLE services ADD COLUMN group_id int(11) DEFAULT NULL;
|
||||
ALTER TABLE services
|
||||
ADD COLUMN description varchar(200) COLLATE utf8_czech_ci NOT NULL;
|
||||
ALTER TABLE services
|
||||
ADD COLUMN group_id int(11) DEFAULT NULL;
|
||||
COMMIT;
|
45
js/admin.js
45
js/admin.js
@ -1,20 +1,32 @@
|
||||
(function () {
|
||||
$("#time_input").flatpickr({enableTime:true, minDate: "today",time_24hr:true, onChange: function(date, dateStr, instance) {
|
||||
$("#time_input").flatpickr({
|
||||
enableTime: true,
|
||||
minDate: "today",
|
||||
time_24hr: true,
|
||||
onChange: function (date, dateStr, instance) {
|
||||
$("#time_input_js").val(date[0].toISOString());
|
||||
}});
|
||||
$("#end_time").flatpickr({enableTime:true, minDate: "today",time_24hr:true, onChange: function(date, dateStr, instance) {
|
||||
},
|
||||
});
|
||||
$("#end_time").flatpickr({
|
||||
enableTime: true,
|
||||
minDate: "today",
|
||||
time_24hr: true,
|
||||
onChange: function (date, dateStr, instance) {
|
||||
$("#end_time_js").val(date[0].toISOString()); // iso date str
|
||||
}});
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
var classes = ["panel panel-danger", "panel panel-warning", "panel panel-primary", "panel panel-success"];
|
||||
var colore = ["danger", "warning", "primary", "success"];
|
||||
var icons = ["fa fa-times", "fa fa-exclamation", "fa fa-info", "fa fa-check"];
|
||||
|
||||
$("body").on("change", "#new-incident select", function () {
|
||||
var val = parseInt($(this).val()); //this should make exploitation harder
|
||||
|
||||
$("#new-incident .panel.new .panel-heading i").get(0).className = icons[val];
|
||||
$("#new-incident .panel.new").get(0).className = classes[val] + " new";
|
||||
$("#new-incident .card.new .card-colore i").get(0).className = icons[val];
|
||||
$("#new-incident .card.new .icon").get(0).className = "card-colore icon bg-" + colore[val];
|
||||
$("#new-incident .card.new").get(0).className = "card border-" + colore[val] + " new";
|
||||
$("#new-incident .card.new .card-header").get(0).className = "card-colore card-header bg-" + colore[val] + " border-" + colore[val];
|
||||
$("#new-incident .card-colore.btn").get(0).className = "card-colore btn btn-" + colore[val];
|
||||
$("#time_input").val("");
|
||||
$("#end_time").val("");
|
||||
});
|
||||
@ -26,35 +38,28 @@
|
||||
var end_time = Date.parse($("#end_time").val());
|
||||
var type = $("#type").val() || 0;
|
||||
|
||||
if (parseInt(type) === 2 &&(isNaN(time) || isNaN(end_time)))
|
||||
{
|
||||
if (isNaN(end_time))
|
||||
{
|
||||
if (parseInt(type) === 2 && (isNaN(time) || isNaN(end_time))) {
|
||||
if (isNaN(end_time)) {
|
||||
$("#time_input").addClass("error");
|
||||
$.growl.error({ message: "Start time is invalid!" });
|
||||
}
|
||||
|
||||
if (isNaN(end_time))
|
||||
{
|
||||
if (isNaN(end_time)) {
|
||||
$("#end_time").addClass("error");
|
||||
$.growl.error({ message: "End time is invalid!" });
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if (parseInt(type) === 2 && time >= end_time)
|
||||
{
|
||||
} else if (parseInt(type) === 2 && time >= end_time) {
|
||||
$.growl.error({ message: "End time is either the same or earlier than start time!" });
|
||||
$("#time").addClass("error");
|
||||
$("#end_time").addClass("error");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#status-container :checkbox:checked").length === 0)
|
||||
{
|
||||
if ($("#status-container :checkbox:checked").length === 0) {
|
||||
$.growl.error({ message: "Please check at least one service!" });
|
||||
$("#status-container").addClass("error");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
|
40
js/main.js
40
js/main.js
@ -1,5 +1,4 @@
|
||||
function timeago()
|
||||
{
|
||||
function timeago() {
|
||||
$("time.timeago").timeago();
|
||||
$("time.timeago").each(function () {
|
||||
var date = new Date($(this).attr("datetime"));
|
||||
@ -16,17 +15,48 @@ function timeago()
|
||||
$($(this).data("target")).toggleClass("collapse");
|
||||
});
|
||||
|
||||
var incidents = $('.timeline');
|
||||
var incidents = $(".timeline");
|
||||
$("body").on("click", "#loadmore", function (e) {
|
||||
e.preventDefault();
|
||||
var url = $("#loadmore").attr("href") + "&ajax=true";
|
||||
$("#loadmore").remove();
|
||||
|
||||
$.get(url,
|
||||
function(data){
|
||||
$.get(url, function (data) {
|
||||
incidents.append(data);
|
||||
timeago();
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
||||
var darkSwitch = document.getElementById("darkSwitch");
|
||||
window.addEventListener("load", function () {
|
||||
if (darkSwitch) {
|
||||
initTheme();
|
||||
darkSwitch.addEventListener("change", function () {
|
||||
resetTheme();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function initTheme() {
|
||||
var darkThemeSelected = localStorage.getItem("darkSwitch") !== null && localStorage.getItem("darkSwitch") === "dark";
|
||||
darkSwitch.checked = darkThemeSelected;
|
||||
darkThemeSelected ? document.body.setAttribute("data-theme", "dark") : document.body.removeAttribute("data-theme");
|
||||
}
|
||||
|
||||
function resetTheme() {
|
||||
if (darkSwitch.checked) {
|
||||
document.body.setAttribute("data-theme", "dark");
|
||||
localStorage.setItem("darkSwitch", "dark");
|
||||
} else {
|
||||
document.body.removeAttribute("data-theme");
|
||||
localStorage.removeItem("darkSwitch");
|
||||
}
|
||||
}
|
||||
|
||||
if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
||||
document.body.setAttribute("data-theme", "dark");
|
||||
}
|
||||
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (e) => {
|
||||
const newColorScheme = e.matches ? document.body.setAttribute("data-theme", "dark") : document.body.removeAttribute("data-theme");
|
||||
});
|
6
js/vendor/bootstrap.min.js
vendored
6
js/vendor/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,7 +1,12 @@
|
||||
<?php
|
||||
require_once("template.php");
|
||||
require_once("config.php");
|
||||
Template::render_header("Privacy Policy");
|
||||
require_once("template.php");
|
||||
require_once("classes/constellation.php");
|
||||
require_once("classes/db-class.php");
|
||||
$db = new SSDB();
|
||||
define("WEB_URL", $db->getSetting($mysqli, "url"));
|
||||
|
||||
Template::render_header("Privacy Policy", "privacy");
|
||||
|
||||
echo "<h1>" . _("Privacy Policy") . "</h1>";
|
||||
echo "<h2>" . _("Who we are") . "</h2>";
|
||||
|
@ -22,7 +22,7 @@ define("TG_BOT_USERNAME", $db->getSetting($mysqli, "tg_bot_username"));
|
||||
$subscription = new Subscriptions();
|
||||
$telegram = new Telegram();
|
||||
|
||||
Template::render_header("Subscriptions");
|
||||
Template::render_header("Subscriptions", "subscripe");
|
||||
|
||||
if (SUBSCRIBE_TELEGRAM && $_SESSION['subscriber_typeid'] == 2) {
|
||||
$tg_user = $telegram->getTelegramUserData(); // TODO: Do we need this any longer?
|
||||
@ -44,7 +44,6 @@ if( $_SESSION['subscriber_valid'] ){
|
||||
}
|
||||
|
||||
$subscription->render_subscribed_services($typeID, $subscriberID, $userID, $token);
|
||||
|
||||
} else {
|
||||
|
||||
$header = _("Your session has expired or you tried something we don't suppprt");
|
||||
|
@ -10,7 +10,6 @@ define("WEB_URL", $db->getSetting($mysqli,"url"));
|
||||
define("MAILER_NAME", $db->getSetting($mysqli, "mailer"));
|
||||
define("MAILER_ADDRESS", $db->getSetting($mysqli, "mailer_email"));
|
||||
define("SUBSCRIBE_TELEGRAM", $db->getBooleanSetting($mysqli, "subscribe_telegram"));
|
||||
define("SUBSCRIBE_TELEGRAM", $db->getBooleanSetting($mysqli, "subscribe_telegram"));
|
||||
define("TG_BOT_API_TOKEN", $db->getSetting($mysqli, "tg_bot_api_token"));
|
||||
define("TG_BOT_USERNAME", $db->getSetting($mysqli, "tg_bot_username"));
|
||||
|
||||
|
241
template.php
241
template.php
@ -10,15 +10,16 @@ $visibility = array(_("Collapsed"), _("Expanded"), _("Expand on events"));
|
||||
/**
|
||||
* Class that encapsulates methods to render header and footer
|
||||
*/
|
||||
class Template{
|
||||
class Template
|
||||
{
|
||||
/**
|
||||
* Renders header
|
||||
* @param String $page_name name of the page to be displayed as title
|
||||
* @param Boolean $admin decides whether to show admin menu
|
||||
*/
|
||||
public static function render_header($page_name, $admin = false){
|
||||
if (!$admin)
|
||||
public static function render_header($page_name, $page_id, $admin = false)
|
||||
{
|
||||
if (!$admin) {
|
||||
// Create subscriber menu sections for later inclusion
|
||||
// Check if we are on admin menu, if so do not display
|
||||
$arr_url = explode("/", $_SERVER['PHP_SELF']);
|
||||
@ -26,7 +27,7 @@ class Template{
|
||||
if ('admin' == $str_url) {
|
||||
$strSubsMenu = '';
|
||||
} else {
|
||||
if (SUBSCRIBE_EMAIL || SUBSCRIBE_TELEGRAM ) {
|
||||
if ($SUBSCRIBE_EMAIL || $SUBSCRIBE_TELEGRAM) {
|
||||
// Subscriber menu is to be shown...
|
||||
$strSubsMenu = '<ul class="nav navbar-nav mr-auto">';
|
||||
// If subscriber is not logged on, display subscriber menus
|
||||
@ -35,11 +36,11 @@ class Template{
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" role="button" href="#"><span class="glyphicon glyphicon-th"></span> ' . _('Subscribe') . '</a>
|
||||
<ul class="dropdown-menu ">';
|
||||
|
||||
if ( SUBSCRIBE_EMAIL ) {
|
||||
if ($SUBSCRIBE_EMAIL) {
|
||||
$strSubsMenu .= '<li><a href="?do=email_subscription&new=1"><span class="glyphicon glyphicon-envelope"></span> ' . _('Subscribe via email') . '</a></li>';
|
||||
}
|
||||
if ( SUBSCRIBE_TELEGRAM ) {
|
||||
$strSubsMenu .= '<li><a href="#"><script async src="https://telegram.org/js/telegram-widget.js?4" data-telegram-login="'.TG_BOT_USERNAME.'" data-size="small" data-userpic="false" data-auth-url="'.WEB_URL.'/telegram_check.php" data-request-access="write"></script></a></li>';
|
||||
if ($SUBSCRIBE_TELEGRAM) {
|
||||
$strSubsMenu .= '<li><a href="#"><script async src="https://telegram.org/js/telegram-widget.js?4" data-telegram-login="' . $TG_BOT_USERNAME . '" data-size="small" data-userpic="false" data-auth-url="' . WEB_URL . '/telegram_check.php" data-request-access="write"></script></a></li>';
|
||||
}
|
||||
$strSubsMenu .= '</ul>';
|
||||
}
|
||||
@ -51,24 +52,18 @@ class Template{
|
||||
}
|
||||
$strSubsMenu .= '</ul>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<?php
|
||||
if(!admin){
|
||||
$headfile = fopen("head.txt", "r") or die("Unable to open head.txt!");
|
||||
$head_additionalcode = fread($versionfile,filesize("head.txt"));
|
||||
fclose($headfile);
|
||||
echo $head_additionalcode;
|
||||
}
|
||||
?>
|
||||
<meta charset="utf-8">
|
||||
<title><?php echo $page_name . " - " . NAME ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Current service status for <?php echo NAME; ?> can be found here as well as incident history.">
|
||||
<link rel="shortcut icon" href="<?php echo WEB_URL; ?>/favicon.ico" type="image/png">
|
||||
<link rel="stylesheet" href="<?php echo WEB_URL;?>/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<?php echo WEB_URL; ?>/vendor/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<?php echo WEB_URL; ?>/css/main.css" media="screen">
|
||||
<link rel="stylesheet" href="<?php echo WEB_URL; ?>/css/print.css" media="print">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="<?php echo WEB_URL; ?>/favicon/apple-icon-57x57.png">
|
||||
@ -88,90 +83,87 @@ class Template{
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<link href="https://use.fontawesome.com/releases/v5.0.4/css/all.css" rel="stylesheet">
|
||||
<link href="https://use.fontawesome.com/releases/v5.15.2/css/all.css" rel="stylesheet">
|
||||
<?php
|
||||
if (!$admin) {
|
||||
$headpath = $_SERVER['DOCUMENT_ROOT'] . "/head.txt";
|
||||
$headfile = fopen("$headpath", "r") or die("Unable to open head.txt!");
|
||||
$head_additionalcode = fread($headfile, filesize($headpath));
|
||||
fclose($headfile);
|
||||
echo $head_additionalcode;
|
||||
} else {
|
||||
global $user;
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php echo WEB_URL; ?>/vendor/flatpickr/flatpickr.min.css">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-default" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only"><?php echo _("Toggle navigation");?></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="<?php echo WEB_URL;?>"><a class="navbar-brand" href="<?php echo WEB_URL;?>/admin"><img src="<?php if(strlen(CUSTOM_LOGO_URL)>1){ echo CUSTOM_LOGO_URL; } else { echo WEB_URL."/img/logo_white.png"; } ?>" alt="logo" class="menu-logo" style="height:50px;"></a>
|
||||
</div>
|
||||
<div class="navbar-left hidden-xs">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="<?php echo WEB_URL;?>/"><h1><?php echo _((defined('TITLE')?TITLE:"Service Status"));?></h1></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse navbar-right navbar-admin">
|
||||
<?php echo $strSubsMenu; ?>
|
||||
</div><!--/.nav-collapse -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="wrapper" class="center">
|
||||
<body>
|
||||
<header class="fixed-top">
|
||||
<div class="container">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="<?php echo WEB_URL; ?>/"><img src="<?php if (strlen(CUSTOM_LOGO_URL) > 1) {
|
||||
echo CUSTOM_LOGO_URL;
|
||||
} else {
|
||||
echo WEB_URL . "/img/logo_white.png";
|
||||
} ?>" alt="logo" class="menu-logo" width="50" height="50"></a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggler" aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarToggler">
|
||||
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
|
||||
<?php
|
||||
if (!$admin) {
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link link-light" href="<?php echo WEB_URL; ?>/admin/"><?php echo _("Admin"); ?></a>
|
||||
</li>
|
||||
<li class="d-flex">
|
||||
<input type="checkbox" class="custom-control-input" id="darkSwitch" hidden>
|
||||
<label class="nav-link" for="darkSwitch"><i class="fas fa-moon"></i></label>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<?php echo $strSubsMenu; ?>
|
||||
</li>
|
||||
<?php
|
||||
} else {
|
||||
global $user;
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?php echo $page_name." - ".NAME ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="<?php echo WEB_URL;?>/favicon.ico" type="image/png">
|
||||
<link rel="stylesheet" href="<?php echo WEB_URL;?>/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<?php echo WEB_URL;?>/css/main.css">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="<?php echo WEB_URL;?>/favicon/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="<?php echo WEB_URL;?>/favicon/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<?php echo WEB_URL;?>/favicon/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="<?php echo WEB_URL;?>/favicon/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="<?php echo WEB_URL;?>/favicon/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="<?php echo WEB_URL;?>/favicon/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="<?php echo WEB_URL;?>/favicon/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="<?php echo WEB_URL;?>/favicon/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="<?php echo WEB_URL;?>/favicon/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="<?php echo WEB_URL;?>/favicon/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo WEB_URL;?>/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="<?php echo WEB_URL;?>/favicon/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<?php echo WEB_URL;?>/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="<?php echo WEB_URL;?>/favicon/manifest.json">
|
||||
<link href="https://use.fontawesome.com/releases/v5.0.4/css/all.css" rel="stylesheet">
|
||||
<link href="<?php echo WEB_URL;?>/css/jquery.growl.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
||||
</head>
|
||||
<body class="admin">
|
||||
<div class="navbar navbar-default" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only"><?php echo _("Toggle navigation");?></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="<?php echo WEB_URL;?>/admin"><img src="<?php if(strlen(CUSTOM_LOGO_URL)>1){ echo CUSTOM_LOGO_URL; } else { echo WEB_URL."/img/logo_white.png"; } ?>" alt="logo" class="menu-logo" width="50" height="50"></a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse navbar-right navbar-admin">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="<?php echo WEB_URL;?>/admin/"><?php echo _("Dashboard");?></a></li>
|
||||
<li><a href="<?php echo WEB_URL;?>/admin/?do=user"><?php printf(_("User (%s)"), $user->get_username());?></a></li>
|
||||
<li><a href="<?php echo WEB_URL;?>/admin/?do=settings"><?php echo _("Services & Users");?></a></li>
|
||||
<li><a href="<?php echo WEB_URL;?>/admin/?do=options"><?php echo _("Options");?></a></li>
|
||||
<li><a href="<?php echo WEB_URL;?>/admin/?do=logout"><?php echo _("Logout");?></a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
<div id="wrapper" class="center admin">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link link-light" href="<?php echo WEB_URL; ?>/admin/"><?php echo _("Dashboard"); ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link link-light" href="<?php echo WEB_URL; ?>/admin/?do=user"><?php printf(_("User (%s)"), $user->get_username()); ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link link-light" href="<?php echo WEB_URL; ?>/admin/?do=settings"><?php echo _("Services & Users"); ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link link-light" href="<?php echo WEB_URL; ?>/admin/?do=options"><?php echo _("Options"); ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link link-light" href="<?php echo WEB_URL; ?>/admin/?do=logout"><?php echo _("Logout"); ?></a>
|
||||
</li>
|
||||
<li class="d-flex">
|
||||
<input type="checkbox" class="custom-control-input" id="darkSwitch" hidden>
|
||||
<label class="nav-link" for="darkSwitch"><i class="fas fa-moon"></i></label>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<main id="<?php echo $page_id; ?>" class="container <?php if ($admin) { ?>admin<?php } ?>">
|
||||
<?php if ($admin) {
|
||||
global $user;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Renders a toggle switch
|
||||
@ -180,14 +172,17 @@ class Template{
|
||||
* @param String $input_name will decide what the HTML Name attribute of the toggle will be
|
||||
* @param Boolean $checked will decide if the toggle will initially be on or off
|
||||
*/
|
||||
public static function render_toggle($toggletext,$input_name,$checked){
|
||||
public static function render_toggle($toggletext, $input_name, $checked)
|
||||
{
|
||||
?>
|
||||
<div>
|
||||
<h3><?php echo $toggletext; ?></h3>
|
||||
<div id="switch">
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="<?php echo $input_name; ?>" <?php if($checked){ echo "checked"; } ?> >
|
||||
<input type="checkbox" name="<?php echo $input_name; ?>" <?php if ($checked) {
|
||||
echo "checked";
|
||||
} ?>>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<?php echo $toggletext; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@ -200,45 +195,49 @@ class Template{
|
||||
global $negotiator;
|
||||
$lang_names = $negotiator->get_accepted_langs();
|
||||
?>
|
||||
</div>
|
||||
<div id="footerwrap">
|
||||
</main>
|
||||
<footer id="footerwrap" class="sticky-bottom">
|
||||
<div class="container">
|
||||
<div class="row centered">
|
||||
<div class="col-md-4 text-left"><a href="https://github.com/server-status-project/server-status/graphs/contributors" target="_blank">Copyright © <?php echo date("Y");?> Server Status Project Contributors </a><?php if(strlen(COPYRIGHT_TEXT)>1){ echo " and ".COPYRIGHT_TEXT; } ?></div>
|
||||
<div class="col-md-4 text-left"><a class="link-light" href="https://github.com/server-status-project/server-status/graphs/contributors" target=”_blank” rel=”noopener noreferrer”>Copyright © <?php echo date("Y"); ?> Server Status Project Contributors </a><?php if (strlen(COPYRIGHT_TEXT) > 1) {
|
||||
echo " and " . COPYRIGHT_TEXT;
|
||||
} ?></div>
|
||||
<div class="col-md-4 text-center">
|
||||
<div class="btn-group dropup">
|
||||
<button type="button" class="btn btn-primary"><?php echo '<img src="'.WEB_URL.'/locale/'.$_SESSION['locale'].'/flag.png" alt="'.$lang_names[$_SESSION['locale']].'">'.$lang_names[$_SESSION['locale']];?></button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only"><?php echo _("Toggle Dropdown");?></span>
|
||||
<div class="input-group dropup mb-3">
|
||||
<button type="button" class="btn btn-primary" disabled><?php echo '<img src="' . $WEB_URL . '/locale/' . $_SESSION['locale'] . '/flag.png" alt="' . $lang_names[$_SESSION['locale']] . '">' . $lang_names[$_SESSION['locale']]; ?></button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="visually-hidden"><?php echo _("Toggle Dropdown"); ?></span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
foreach ($lang_names as $key => $value) {
|
||||
echo '<a href="?lang='.$key.'"><img src="'.WEB_URL.'/locale/'.$key.'/flag.png" alt="'.$value.'">'.$value.'</a>';
|
||||
echo '<a href="?lang=' . $key . '"><img src="' . $WEB_URL . '/locale/' . $key . '/flag.png" alt="' . $value . '">' . $value . '</a>';
|
||||
}
|
||||
?>
|
||||
<hr role="separator" class="divider">
|
||||
<a href="https://poeditor.com/join/project/37SpmJtyOm"><?php echo _("Help with translation!");?></a>
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
<li><a href="https://poeditor.com/join/project/37SpmJtyOm" target=”_blank” rel=”noopener noreferrer”><?php echo _("Help with translation!"); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 text-right"><a class="link-light" href="<?php echo IMPRINT_URL; ?>"><?php echo _("Imprint"); ?></a><a class="link-light" href="<?php echo POLICY_URL; ?>"><?php echo _("Privacy Policy"); ?></a></div>
|
||||
</div>
|
||||
<div class="col-md-4 text-right"><a href="<?php echo POLICY_URL; ?>"><?php echo _("Imprint & Privacy Policy");?></a><!-- <a href="https://github.com/Pryx/server-status/" target="_blank"><i class="fab fa-github" aria-hidden="true"></i></a> --></div>
|
||||
</div><!--/row -->
|
||||
</div><!--/container -->
|
||||
<!--/row -->
|
||||
</div>
|
||||
<script src="<?php echo WEB_URL;?>/js/vendor/jquery-3.5.1.min.js"></script>
|
||||
<script src="<?php echo WEB_URL;?>/js/vendor/jquery.timeago.js"></script>
|
||||
<script src="<?php echo WEB_URL;?>/locale/<?php echo $_SESSION['locale'];?>/jquery.timeago.js"></script>
|
||||
<?php if ($admin){?>
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
|
||||
<script src="<?php echo WEB_URL;?>/js/admin.js"></script>
|
||||
<script src="<?php echo WEB_URL;?>/js/vendor/jquery.growl.js"></script>
|
||||
<?php }?>
|
||||
<script src="<?php echo WEB_URL;?>/js/vendor/bootstrap.min.js"></script>
|
||||
<!--/container -->
|
||||
</footer>
|
||||
<script src="<?php echo WEB_URL; ?>/vendor/jquerry/jquery-3.6.0.min.js"></script>
|
||||
<script src="<?php echo WEB_URL; ?>/vendor/jquerry/jquery.timeago.js"></script>
|
||||
<script src="<?php echo WEB_URL; ?>/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="<?php echo WEB_URL; ?>/js/main.js"></script>
|
||||
<?php if ( GOOGLE_RECAPTCHA ) { ?><script src='https://www.google.com/recaptcha/api.js'></script><?php }?>
|
||||
<?php if ($admin) { ?>
|
||||
<script src="<?php echo WEB_URL; ?>/vendor/flatpickr/flatpickr.min.js"></script>
|
||||
<script src="<?php echo WEB_URL; ?>/js/admin.js"></script>
|
||||
<?php } ?>
|
||||
<?php if ($GOOGLE_RECAPTCHA) { ?><script src='https://www.google.com/recaptcha/api.js'></script><?php } ?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<?php
|
||||
}
|
||||
|
4997
vendor/bootstrap/css/bootstrap-grid.css
vendored
Normal file
4997
vendor/bootstrap/css/bootstrap-grid.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
vendor/bootstrap/css/bootstrap-grid.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-grid.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
vendor/bootstrap/css/bootstrap-grid.min.css
vendored
Normal file
7
vendor/bootstrap/css/bootstrap-grid.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
vendor/bootstrap/css/bootstrap-grid.min.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-grid.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4996
vendor/bootstrap/css/bootstrap-grid.rtl.css
vendored
Normal file
4996
vendor/bootstrap/css/bootstrap-grid.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
vendor/bootstrap/css/bootstrap-grid.rtl.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-grid.rtl.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
vendor/bootstrap/css/bootstrap-grid.rtl.min.css
vendored
Normal file
7
vendor/bootstrap/css/bootstrap-grid.rtl.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
vendor/bootstrap/css/bootstrap-grid.rtl.min.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-grid.rtl.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
428
vendor/bootstrap/css/bootstrap-reboot.css
vendored
Normal file
428
vendor/bootstrap/css/bootstrap-reboot.css
vendored
Normal file
@ -0,0 +1,428 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.0.0-beta2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #212529;
|
||||
background-color: #fff;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
||||
outline: 0 !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-bs-original-title] {
|
||||
text-decoration: underline;
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a58ca;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 1em;
|
||||
direction: ltr /* rtl:ignore */;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
/* rtl:raw:
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
*/
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
1
vendor/bootstrap/css/bootstrap-reboot.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-reboot.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
8
vendor/bootstrap/css/bootstrap-reboot.min.css
vendored
Normal file
8
vendor/bootstrap/css/bootstrap-reboot.min.css
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.0.0-beta2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
1
vendor/bootstrap/css/bootstrap-reboot.min.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-reboot.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
425
vendor/bootstrap/css/bootstrap-reboot.rtl.css
vendored
Normal file
425
vendor/bootstrap/css/bootstrap-reboot.rtl.css
vendored
Normal file
@ -0,0 +1,425 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.0.0-beta2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #212529;
|
||||
background-color: #fff;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
||||
outline: 0 !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-bs-original-title] {
|
||||
text-decoration: underline;
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-right: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: #0a58ca;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 1em;
|
||||
direction: ltr ;
|
||||
unicode-bidi: bidi-override;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: right;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: right;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */
|
1
vendor/bootstrap/css/bootstrap-reboot.rtl.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-reboot.rtl.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
8
vendor/bootstrap/css/bootstrap-reboot.rtl.min.css
vendored
Normal file
8
vendor/bootstrap/css/bootstrap-reboot.rtl.min.css
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.0.0-beta2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-right:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-right:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:right}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:right;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:right}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}[type=email],[type=number],[type=tel],[type=url]{direction:ltr}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.rtl.min.css.map */
|
1
vendor/bootstrap/css/bootstrap-reboot.rtl.min.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-reboot.rtl.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4756
vendor/bootstrap/css/bootstrap-utilities.css
vendored
Normal file
4756
vendor/bootstrap/css/bootstrap-utilities.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
vendor/bootstrap/css/bootstrap-utilities.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-utilities.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
vendor/bootstrap/css/bootstrap-utilities.min.css
vendored
Normal file
7
vendor/bootstrap/css/bootstrap-utilities.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
vendor/bootstrap/css/bootstrap-utilities.min.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-utilities.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4747
vendor/bootstrap/css/bootstrap-utilities.rtl.css
vendored
Normal file
4747
vendor/bootstrap/css/bootstrap-utilities.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
vendor/bootstrap/css/bootstrap-utilities.rtl.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-utilities.rtl.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
vendor/bootstrap/css/bootstrap-utilities.rtl.min.css
vendored
Normal file
7
vendor/bootstrap/css/bootstrap-utilities.rtl.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
vendor/bootstrap/css/bootstrap-utilities.rtl.min.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap-utilities.rtl.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
10724
vendor/bootstrap/css/bootstrap.css
vendored
Normal file
10724
vendor/bootstrap/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
vendor/bootstrap/css/bootstrap.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
vendor/bootstrap/css/bootstrap.min.css
vendored
Normal file
7
vendor/bootstrap/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
vendor/bootstrap/css/bootstrap.min.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
10700
vendor/bootstrap/css/bootstrap.rtl.css
vendored
Normal file
10700
vendor/bootstrap/css/bootstrap.rtl.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
vendor/bootstrap/css/bootstrap.rtl.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap.rtl.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
vendor/bootstrap/css/bootstrap.rtl.min.css
vendored
Normal file
7
vendor/bootstrap/css/bootstrap.rtl.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
vendor/bootstrap/css/bootstrap.rtl.min.css.map
vendored
Normal file
1
vendor/bootstrap/css/bootstrap.rtl.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
6650
vendor/bootstrap/js/bootstrap.bundle.js
vendored
Normal file
6650
vendor/bootstrap/js/bootstrap.bundle.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
vendor/bootstrap/js/bootstrap.bundle.js.map
vendored
Normal file
1
vendor/bootstrap/js/bootstrap.bundle.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
vendor/bootstrap/js/bootstrap.bundle.min.js
vendored
Normal file
7
vendor/bootstrap/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
vendor/bootstrap/js/bootstrap.bundle.min.js.map
vendored
Normal file
1
vendor/bootstrap/js/bootstrap.bundle.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4904
vendor/bootstrap/js/bootstrap.esm.js
vendored
Normal file
4904
vendor/bootstrap/js/bootstrap.esm.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
vendor/bootstrap/js/bootstrap.esm.js.map
vendored
Normal file
1
vendor/bootstrap/js/bootstrap.esm.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
vendor/bootstrap/js/bootstrap.esm.min.js
vendored
Normal file
7
vendor/bootstrap/js/bootstrap.esm.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
vendor/bootstrap/js/bootstrap.esm.min.js.map
vendored
Normal file
1
vendor/bootstrap/js/bootstrap.esm.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4951
vendor/bootstrap/js/bootstrap.js
vendored
Normal file
4951
vendor/bootstrap/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
vendor/bootstrap/js/bootstrap.js.map
vendored
Normal file
1
vendor/bootstrap/js/bootstrap.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
vendor/bootstrap/js/bootstrap.min.js
vendored
Normal file
7
vendor/bootstrap/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
vendor/bootstrap/js/bootstrap.min.js.map
vendored
Normal file
1
vendor/bootstrap/js/bootstrap.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
vendor/flatpickr/flatpickr.min.css
vendored
Normal file
13
vendor/flatpickr/flatpickr.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2
vendor/flatpickr/flatpickr.min.js
vendored
Normal file
2
vendor/flatpickr/flatpickr.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
vendor/jquerry/jquery-3.6.0.min.js
vendored
Normal file
2
vendor/jquerry/jquery-3.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user