Skip to content

Commit

Permalink
Revert "Merge pull request #135 from server-status-project/master"
Browse files Browse the repository at this point in the history
This reverts commit 8d57154, reversing
changes made to e96df70.
  • Loading branch information
yigitkerem committed Nov 5, 2020
1 parent 8d57154 commit 96f79ee
Show file tree
Hide file tree
Showing 44 changed files with 5,690 additions and 268 deletions.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

22 changes: 0 additions & 22 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

41 changes: 0 additions & 41 deletions .github/ISSUE_TEMPLATE/help-needed.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/pr-template.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/stale.yml

This file was deleted.

39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
# Server status page
![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)

![screenshot](https://status.trucksbook.eu/img/screenshot.png)

# Server Status Beta (Official)
## This is the official beta fork of Server Status by the contributors.
![License](https://img.shields.io/github/license/Pryx/server-status.svg) ![Current release](https://img.shields.io/badge/version-2-blue)
![Beta-Build](https://img.shields.io/badge/latest_beta-Developmet_Beta_7-black)
![Beta-Stability](https://img.shields.io/badge/Beta_Stability-Fully_Stable_with_Visual_Imperfections-red)
![Stability](https://img.shields.io/badge/master_stability-Stable-red)
![Build](https://img.shields.io/badge/build-success-green)

## What does **contributor beta** mean?
It means the beta that is heavily unstable that is meant for contributors to make changes and use as a recovery point.
### Other Beta Type
#### Development Beta
##### This beta has some bugs that are noticeable and is sometimes unstable. Best for new contributors
#### Public Beta
##### This beta has some bugs that are not really noticeable and mostly exist as bugs. Best for trying the new features before updating!
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!

## How do I install this thing?
Simply put the files on your server and access it from your browser. There will be a simple install dialog waiting for you.
If you prefer you can install manually by filling the info in config.php.template and renaming it to config.php.
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.
If you don't want to allow php to access your files or you have permission issues, use the following instructions.
### Creating server config:
* **IIS**: Rename IISWebConfig to web.config
* **Apache**: Rename ApacheHtaccess to .htaccess
* **Nginx**: You can run with php-fpm no additional modifications required.
### FOR IIS:
// Rename IISWebConfig to web.config
### FOR Apache and Nginx
// Rename ApacheHtaccess to .htaccess


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

## Contributing
Anyone is welcome to make pull request with new features or security patches / bug fixes.
Expand All @@ -25,7 +36,7 @@ You may create a pull request anytime or you can join our discord here(https://d
### Translations
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.

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

### Does it actually run somewhere?
Yes it does!
Expand Down Expand Up @@ -57,8 +68,10 @@ Please note that changes are reverted every hour.
### I noticed there is a new release. How do I update?
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.
If you don't want to allow php to access your files or you have permission issues, use the following instructions.
#### Updating server config
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.
#### FOR IIS:
// Rename IISWebConfig to web.config
#### FOR Apache and Nginx
// Rename ApacheHtaccess to .htaccess

### Is there any way to do this automatically?
We are working on it but it is not yet included. Stay tuned!
Expand Down
11 changes: 7 additions & 4 deletions admin/dashboard.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php
$offset = 0;
if (isset($_GET['ajax']))
{
Expand All @@ -18,8 +18,11 @@
{
Incident::delete($_GET['delete']);
}
if (isset($_GET['tasks'])) {
Queue::process_queue();
}

Template::render_header(_("Dashboard"), true);
Template::render_header(_("Dashboard"), true);
?>

<div class="text-center">
Expand All @@ -45,7 +48,7 @@
<?php
} ?>
<div id="status-container" class="clearfix">
<?php
<?php
if (isset($_POST['services']) && !is_array($_POST['services']))
{
$post_services = array($_POST['services']);
Expand Down Expand Up @@ -82,7 +85,7 @@
</div>
</div>
<select class="form-control pull-left" id="type" name="type">
<?php
<?php
if (isset($_POST['type']))
{
$selected_status = $_POST['type'];
Expand Down
71 changes: 68 additions & 3 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,58 @@
else{
require_once("../config.php");
require_once("../classes/constellation.php");
require_once("../classes/mailer.php");
require_once("../classes/notification.php");
require_once("../template.php");
require_once("../libs/parsedown/Parsedown.php");
require_once("../classes/queue.php");
require_once("../classes/db-class.php");
$db = new SSDB();
define("NAME", $db->getSetting($mysqli,"name"));
define("TITLE", $db->getSetting($mysqli,"title"));
define("WEB_URL", $db->getSetting($mysqli,"url"));
define("MAILER_NAME", $db->getSetting($mysqli,"mailer"));
define("MAILER_ADDRESS", $db->getSetting($mysqli,"mailer_email"));

define("GOOGLE_RECAPTCHA", $db->getBooleanSetting($mysqli, "google_recaptcha"));
define("GOOGLE_RECAPTCHA_SECRET", $db->getSetting($mysqli, "google_recaptcha_secret"));
define("GOOGLE_RECAPTCHA_SITEKEY", $db->getSetting($mysqli, "google_recaptcha_sitekey"));
define("SUBSCRIBE_EMAIL", $db->getBooleanSetting($mysqli, "subscribe_email"));
define("SUBSCRIBE_TELEGRAM", $db->getBooleanSetting($mysqli, "subscribe_telegram"));
define("TG_BOT_USERNAME", $db->getSetting($mysqli, "tg_bot_username"));
define("TG_BOT_API_TOKEN", $db->getSetting($mysqli, "tg_bot_api_token"));
define("PHP_MAILER", $db->getBooleanSetting($mysqli, "php_mailer"));
define("PHP_MAILER_SMTP", $db->getBooleanSetting($mysqli, "php_mailer_smtp"));
define("PHP_MAILER_PATH", $db->getSetting($mysqli, "php_mailer_path"));
define("PHP_MAILER_HOST", $db->getSetting($mysqli, "php_mailer_host"));
define("PHP_MAILER_PORT", $db->getSetting($mysqli, "php_mailer_port"));
define("PHP_MAILER_SECURE", $db->getBooleanSetting($mysqli, "php_mailer_secure"));
define("PHP_MAILER_USER", $db->getSetting($mysqli, "php_mailer_user"));
define("PHP_MAILER_PASS", $db->getSetting($mysqli, "php_mailer_pass"));
define("CRON_SERVER_IP", $db->getSetting($mysqli, "cron_server_ip"));

// 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 )
{
Queue::process_queue();
}
}
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 )
{
Queue::process_queue();
syslog(1, "CRON server processed");
}
else {
syslog(1, "CRON called from unauthorised server");
}
}


if(isset($_COOKIE['user'])&&!isset($_SESSION['user']))
{
Expand All @@ -29,7 +80,7 @@
require_once("login-form.php");
}
}
else
else
{
$user = new User($_SESSION['user']);
if (!$user->is_active())
Expand All @@ -50,7 +101,7 @@
case 'user':
require_once("user.php");
break;

case 'settings':
require_once("settings.php");
break;
Expand All @@ -59,6 +110,20 @@
require_once("new-user.php");
break;

case 'new-service':
case 'edit-service':
require_once('service.php');
break;

case 'new-service-group':
case 'edit-service-group':
require_once('service-group.php');
break;

case 'options':
require_once("options.php");
break;

case 'logout':
User::logout();
break;
Expand All @@ -70,4 +135,4 @@

Template::render_footer(true);
}
}
}
Loading

0 comments on commit 96f79ee

Please sign in to comment.