Skip to content

Commit 46c0b55

Browse files
committed
Revert "Merge branch 'dev' into master"
This reverts commit 18b89e8, reversing changes made to 81132e9.
1 parent 18b89e8 commit 46c0b55

37 files changed

+119
-5674
lines changed

README.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
# Server Status Beta (Official)
2-
## This is the official beta fork of Server Status by the contributors.
3-
![License](https://img.shields.io/github/license/Pryx/server-status.svg) ![Current release](https://img.shields.io/badge/version-2-blue)
4-
![Beta-Build](https://img.shields.io/badge/latest_beta-Developmet_Beta_7-black)
5-
![Beta-Stability](https://img.shields.io/badge/Beta_Stability-Fully_Stable_with_Visual_Imperfections-red)
6-
![Stability](https://img.shields.io/badge/master_stability-Stable-red)
7-
![Build](https://img.shields.io/badge/build-success-green)
8-
9-
## What does **contributor beta** mean?
10-
It means the beta that is heavily unstable that is meant for contributors to make changes and use as a recovery point.
11-
### Other Beta Type
12-
#### Development Beta
13-
##### This beta has some bugs that are noticeable and is sometimes unstable. Best for new contributors
14-
#### Public Beta
15-
##### This beta has some bugs that are not really noticeable and mostly exist as bugs. Best for trying the new features before updating!
1+
# Server status page
2+
![License](https://img.shields.io/github/license/Pryx/server-status.svg) ![Current release](https://img.shields.io/github/release/Pryx/server-status.svg) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/b82d62fa6d8b41119f68fd9eca3c3a08)](https://www.codacy.com/app/sajdl.vojtech/server-status?utm_source=github.com&utm_medium=referral&utm_content=Pryx/server-status&utm_campaign=Badge_Grade) [![Discord](https://img.shields.io/discord/742703112590065745?logo=discord)](https://discord.gg/Wgxnxz4)
3+
4+
![screenshot](https://status.trucksbook.eu/img/screenshot.png)
5+
166
Very simple server status page written in PHP that can run on **PHP 5.4+** - even on **shared webhosting** even without shell access. Because why waste your money on another server (or host on a server that you might want to do maintenance on), when you can use cheap webhosting? And as a cherry on top - it works even without javascript!
177

188
## How do I install this thing?

admin/dashboard.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php
22
$offset = 0;
33
if (isset($_GET['ajax']))
44
{
@@ -18,11 +18,8 @@
1818
{
1919
Incident::delete($_GET['delete']);
2020
}
21-
if (isset($_GET['tasks'])) {
22-
Queue::process_queue();
23-
}
2421

25-
Template::render_header(_("Dashboard"), true);
22+
Template::render_header(_("Dashboard"), true);
2623
?>
2724

2825
<div class="text-center">
@@ -48,7 +45,7 @@
4845
<?php
4946
} ?>
5047
<div id="status-container" class="clearfix">
51-
<?php
48+
<?php
5249
if (isset($_POST['services']) && !is_array($_POST['services']))
5350
{
5451
$post_services = array($_POST['services']);
@@ -85,7 +82,7 @@
8582
</div>
8683
</div>
8784
<select class="form-control pull-left" id="type" name="type">
88-
<?php
85+
<?php
8986
if (isset($_POST['type']))
9087
{
9188
$selected_status = $_POST['type'];

admin/index.php

Lines changed: 3 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,7 @@
77
else{
88
require_once("../config.php");
99
require_once("../classes/constellation.php");
10-
require_once("../classes/mailer.php");
11-
require_once("../classes/notification.php");
1210
require_once("../template.php");
13-
require_once("../libs/parsedown/Parsedown.php");
14-
require_once("../classes/queue.php");
15-
require_once("../classes/db-class.php");
16-
$db = new SSDB();
17-
define("NAME", $db->getSetting($mysqli,"name"));
18-
define("TITLE", $db->getSetting($mysqli,"title"));
19-
define("WEB_URL", $db->getSetting($mysqli,"url"));
20-
define("MAILER_NAME", $db->getSetting($mysqli,"mailer"));
21-
define("MAILER_ADDRESS", $db->getSetting($mysqli,"mailer_email"));
22-
23-
define("GOOGLE_RECAPTCHA", $db->getBooleanSetting($mysqli, "google_recaptcha"));
24-
define("GOOGLE_RECAPTCHA_SECRET", $db->getSetting($mysqli, "google_recaptcha_secret"));
25-
define("GOOGLE_RECAPTCHA_SITEKEY", $db->getSetting($mysqli, "google_recaptcha_sitekey"));
26-
define("SUBSCRIBE_EMAIL", $db->getBooleanSetting($mysqli, "subscribe_email"));
27-
define("SUBSCRIBE_TELEGRAM", $db->getBooleanSetting($mysqli, "subscribe_telegram"));
28-
define("TG_BOT_USERNAME", $db->getSetting($mysqli, "tg_bot_username"));
29-
define("TG_BOT_API_TOKEN", $db->getSetting($mysqli, "tg_bot_api_token"));
30-
define("PHP_MAILER", $db->getBooleanSetting($mysqli, "php_mailer"));
31-
define("PHP_MAILER_SMTP", $db->getBooleanSetting($mysqli, "php_mailer_smtp"));
32-
define("PHP_MAILER_PATH", $db->getSetting($mysqli, "php_mailer_path"));
33-
define("PHP_MAILER_HOST", $db->getSetting($mysqli, "php_mailer_host"));
34-
define("PHP_MAILER_PORT", $db->getSetting($mysqli, "php_mailer_port"));
35-
define("PHP_MAILER_SECURE", $db->getBooleanSetting($mysqli, "php_mailer_secure"));
36-
define("PHP_MAILER_USER", $db->getSetting($mysqli, "php_mailer_user"));
37-
define("PHP_MAILER_PASS", $db->getSetting($mysqli, "php_mailer_pass"));
38-
define("CRON_SERVER_IP", $db->getSetting($mysqli, "cron_server_ip"));
39-
40-
// Process the subscriber notification queue
41-
// If CRON_SERVER_IP is not set, call notification once incident has been saved
42-
if ( empty(CRON_SERVER_IP) )
43-
{
44-
if ( isset($_GET['sent']) && $_GET['sent'] == true )
45-
{
46-
Queue::process_queue();
47-
}
48-
}
49-
else if ( isset($_GET['task']) && $_GET['task'] == 'cron' )
50-
{
51-
// Else, base it on call to /admin?task=cron being called from IP defined by CRON_SERVER_IP
52-
if (! empty(CRON_SERVER_IP) && $_SERVER['REMOTE_ADDR'] == CRON_SERVER_IP )
53-
{
54-
Queue::process_queue();
55-
syslog(1, "CRON server processed");
56-
}
57-
else {
58-
syslog(1, "CRON called from unauthorised server");
59-
}
60-
}
61-
6211

6312
if(isset($_COOKIE['user'])&&!isset($_SESSION['user']))
6413
{
@@ -80,7 +29,7 @@
8029
require_once("login-form.php");
8130
}
8231
}
83-
else
32+
else
8433
{
8534
$user = new User($_SESSION['user']);
8635
if (!$user->is_active())
@@ -101,7 +50,7 @@
10150
case 'user':
10251
require_once("user.php");
10352
break;
104-
53+
10554
case 'settings':
10655
require_once("settings.php");
10756
break;
@@ -110,20 +59,6 @@
11059
require_once("new-user.php");
11160
break;
11261

113-
case 'new-service':
114-
case 'edit-service':
115-
require_once('service.php');
116-
break;
117-
118-
case 'new-service-group':
119-
case 'edit-service-group':
120-
require_once('service-group.php');
121-
break;
122-
123-
case 'options':
124-
require_once("options.php");
125-
break;
126-
12762
case 'logout':
12863
User::logout();
12964
break;
@@ -135,4 +70,4 @@
13570

13671
Template::render_footer(true);
13772
}
138-
}
73+
}

admin/options.php

Lines changed: 0 additions & 183 deletions
This file was deleted.

0 commit comments

Comments
 (0)