Skip to content

Commit 96f79ee

Browse files
committed
Revert "Merge pull request #135 from server-status-project/master"
This reverts commit 8d57154, reversing changes made to e96df70.
1 parent 8d57154 commit 96f79ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+5690
-268
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

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

.github/ISSUE_TEMPLATE/feature_request.md

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

.github/ISSUE_TEMPLATE/help-needed.md

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

.github/ISSUE_TEMPLATE/pr-template.md

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

.github/ISSUE_TEMPLATE/stale.yml

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

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
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-
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!
616
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!
717

818
## How do I install this thing?
919
Simply put the files on your server and access it from your browser. There will be a simple install dialog waiting for you.
1020
If you prefer you can install manually by filling the info in config.php.template and renaming it to config.php.
1121
As this **does not** run installation scripts you need to head to your install directory and run create-server-config.php and then delete it.
1222
If you don't want to allow php to access your files or you have permission issues, use the following instructions.
13-
### Creating server config:
14-
* **IIS**: Rename IISWebConfig to web.config
15-
* **Apache**: Rename ApacheHtaccess to .htaccess
16-
* **Nginx**: You can run with php-fpm no additional modifications required.
23+
### FOR IIS:
24+
// Rename IISWebConfig to web.config
25+
### FOR Apache and Nginx
26+
// Rename ApacheHtaccess to .htaccess
27+
1728

18-
You can find more info on [our wiki page](https://github.com/server-status-project/server-status/wiki)
29+
You can find more info on [our wiki page](https://github.com/Pryx/server-status/wiki)
1930

2031
## Contributing
2132
Anyone is welcome to make pull request with new features or security patches / bug fixes.
@@ -25,7 +36,7 @@ You may create a pull request anytime or you can join our discord here(https://d
2536
### Translations
2637
Any help with translations is much welcome! You can join us at https://poeditor.com/join/project/37SpmJtyOm. You can even add your own language. Just let me know when you're done and I'm going to include the language in the next release.
2738

28-
[List of contributors](https://github.com/server-status-project/server-status/graphs/contributors)
39+
[List of contributors](https://github.com/Pryx/server-status/wiki/contributors)
2940

3041
### Does it actually run somewhere?
3142
Yes it does!
@@ -57,8 +68,10 @@ Please note that changes are reverted every hour.
5768
### I noticed there is a new release. How do I update?
5869
Updating server status is fairly straightforward. Download your config.php from the server. Delete all files. Upload the new release with config.php you downloaded earlier. You need to manually run install scripts. For that head to your domain and run create-server-config.php deleting it afterwards.
5970
If you don't want to allow php to access your files or you have permission issues, use the following instructions.
60-
#### Updating server config
61-
Follow the instructions for installation without giving the app write access. Keep in mind that you will need to re-apply any modifications you made.
71+
#### FOR IIS:
72+
// Rename IISWebConfig to web.config
73+
#### FOR Apache and Nginx
74+
// Rename ApacheHtaccess to .htaccess
6275

6376
### Is there any way to do this automatically?
6477
We are working on it but it is not yet included. Stay tuned!

admin/dashboard.php

Lines changed: 7 additions & 4 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,8 +18,11 @@
1818
{
1919
Incident::delete($_GET['delete']);
2020
}
21+
if (isset($_GET['tasks'])) {
22+
Queue::process_queue();
23+
}
2124

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

2528
<div class="text-center">
@@ -45,7 +48,7 @@
4548
<?php
4649
} ?>
4750
<div id="status-container" class="clearfix">
48-
<?php
51+
<?php
4952
if (isset($_POST['services']) && !is_array($_POST['services']))
5053
{
5154
$post_services = array($_POST['services']);
@@ -82,7 +85,7 @@
8285
</div>
8386
</div>
8487
<select class="form-control pull-left" id="type" name="type">
85-
<?php
88+
<?php
8689
if (isset($_POST['type']))
8790
{
8891
$selected_status = $_POST['type'];

admin/index.php

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,58 @@
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");
1012
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+
1162

1263
if(isset($_COOKIE['user'])&&!isset($_SESSION['user']))
1364
{
@@ -29,7 +80,7 @@
2980
require_once("login-form.php");
3081
}
3182
}
32-
else
83+
else
3384
{
3485
$user = new User($_SESSION['user']);
3586
if (!$user->is_active())
@@ -50,7 +101,7 @@
50101
case 'user':
51102
require_once("user.php");
52103
break;
53-
104+
54105
case 'settings':
55106
require_once("settings.php");
56107
break;
@@ -59,6 +110,20 @@
59110
require_once("new-user.php");
60111
break;
61112

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+
62127
case 'logout':
63128
User::logout();
64129
break;
@@ -70,4 +135,4 @@
70135

71136
Template::render_footer(true);
72137
}
73-
}
138+
}

0 commit comments

Comments
 (0)