• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

UberCMS - Quality Stability [Add-on] [Minimize Downtime Guaranteed]

Status
Not open for further replies.
Experienced Elementalist
Joined
Jun 16, 2010
Messages
249
Reaction score
76
Hotel Restart

Overview

This project was inspired by RastaLulz's PHP reboot application. This is designed to improve your hotels stability when it crashes (which will happen with almost every hotel). The project rely's heavily on your community, and whether or not they love your hotel (you'll find out sooner what I mean below).

The "Restart Hotel" box will ONLY appear if the server is offline. This will prevent users from massively restarting the hotel when it is not needed. There is another thing that you may add to improve this slightly, although I'll leave you guys to figuring it out.

Be sure to fill out the $reboot_app URL and the reboot_app.bat information correctly or else it will not work!

Third Party Applications

For this to work, you will need an executable restart application. I suggest using RastaLulz application. The download link is below:

Download Restart Application: [ ]

Preview

Coming Shortly

Instructions

Step 1

Open me.php in the root directory. Find the following green highlighted text below;

Code:
[COLOR="SeaGreen"]//Column 1[/COLOR]

Add the following red highlighted code above it;

Code:
[COLOR="Red"]//Content
$reboot_app = 'C:\Users\sexonabeach\Desktop\reboot_app.bat';
$restart = @$_POST['restart'];

if (isset($restart))
{
	
	if (!file_exists($reboot_app))
	{
	header("Location: ?action=reboot&result=failed&why=application_url_invalid");
	}
	else
	{
	exec($reboot_app);
	header("Location: ?action=reboot&result=success");
	}

}[/COLOR]

Result;

Code:
[COLOR="Red"]//Content
$reboot_app = 'C:\Users\sexonabeach\Desktop\reboot_app.bat';
$restart = @$_POST['restart'];

if (isset($restart))
{
	
	if (!file_exists($reboot_app))
	{
	header("Location: ?action=reboot&result=failed&why=application_url_invalid");
	}
	else
	{
	exec($reboot_app);
	header("Location: ?action=reboot&result=success");
	}

}[/COLOR]

[COLOR="SeaGreen"]// Column 1[/COLOR]

Next look for the following green highlighted code;

Code:
[COLOR="SeaGreen"]// Column 3
$tpl->AddGeneric('generic-column3');[/COLOR]

Replace it ALL with the following red highlighted code;

Code:
[COLOR="Red"]switch (uberCore::getSystemStatus())
{
	
	case (0):
	case (2):
		$hotelRestart = new Template('comp-restart');
		$hotelRestart->SetParam('restart', $restart);
		$tpl->AddTemplate($hotelRestart);
		break;
	
	default:
		$tpl->AddGeneric('generic-column3');
		break;
			
}[/COLOR]

Result;

Code:
[COLOR="Red"]switch (uberCore::getSystemStatus())
{
	
	case (0):
	case (2):
		$hotelRestart = new Template('comp-restart');
		$hotelRestart->SetParam('restart', $restart);
		$tpl->AddTemplate($hotelRestart);
		break;
	
	default:
		$tpl->AddGeneric('generic-column3');
		break;
			
}[/COLOR]

Step 2

Make a file called "comp-restart.tpl" in the "inc/tpl/" directory. Paste all the following red highlighted code into the file;

Code:
[COLOR="red"]<div id="column3" class="column">
	<div class="habblet-container ">		
		<div class="cbb clearfix red"> 
			<h2 class="title">Restart Hotel</h2> 

			<div id="habboclub-info" class="box-content">
			
			<img src="http://habbogallery.net/img/figures/habbos/Figure%20(97).gif" align="left">
			<p>Oops, it appears the hotel is offline!</p>
			<div align="center">
			<form method="post" action="">
			<p><input type="submit" name="restart" value="Restart Hotel"></p>
			</form>
			</div>
			
			</div>  
		</div>
	</div>
	<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>[/COLOR]

Result;

Code:
[COLOR="red"]<div id="column3" class="column">
	<div class="habblet-container ">		
		<div class="cbb clearfix red"> 
			<h2 class="title">Restart Hotel</h2> 

			<div id="habboclub-info" class="box-content">
			
			<img src="http://habbogallery.net/img/figures/habbos/Figure%20(97).gif" align="left">
			<p>Oops, it appears the hotel is offline!</p>
			<div align="center">
			<form method="post" action="">
			<p><input type="submit" name="restart" value="Restart Hotel"></p>
			</form>
			</div>
			
			</div>  
		</div>

Credits
Code:
TheJacob
RastaLulz
 
Last edited:
Newbie Spellweaver
Joined
Oct 26, 2010
Messages
58
Reaction score
0
Re: UberCMS - Quality Stability [Add-on]

Thank you for this jacob.
 
Custom Title Activated
Loyal Member
Joined
Oct 21, 2007
Messages
2,098
Reaction score
464
Re: UberCMS - Quality Stability [Add-on]

Nice Jacob keep the good releases up :p
 
Experienced Elementalist
Joined
Jul 5, 2006
Messages
262
Reaction score
193
Re: UberCMS - Quality Stability [Add-on]

Nice! You could turn this into a cron job to reboot when its offline too? :p
 
Junior Spellweaver
Joined
Jan 8, 2010
Messages
119
Reaction score
3
Epic release dude, Seeing good Things from you all over the show man...

Whats next? A Dancing man on your localhost :p LOL ( Joke that )
 
Junior Spellweaver
Joined
Mar 24, 2009
Messages
111
Reaction score
8
Doesn't work with IIS7.. Can you fix?
 
Banned
Banned
Joined
Jan 21, 2009
Messages
318
Reaction score
53
Its basically a mutated edit RastaLulz's restart app. But the users can restart it when the hotel is offline WTFFF But erm nice job ;)
 
Experienced Elementalist
Joined
Jun 16, 2010
Messages
249
Reaction score
76
If the restart boxs comes and you click restart it isnt restarting.

Did you edit the file path for the restart.bat (or what ever you named it). Did you also correctly code the restart.bat?

Download the one I have on my thread (credits to RastaLulz), then edit the paths correctly and edit the restart.bat correctly.
 
☮TAKU????
Loyal Member
Joined
Nov 16, 2009
Messages
866
Reaction score
580
Its unsecure.. people can make there own webhost steal the code and restart the hotel when they want!
 
凸(ಠ益ಠ)凸
Loyal Member
Joined
Jun 16, 2008
Messages
1,665
Reaction score
227
either way hotels dont shut off when they crash, they stay online and nobody can log in...so this seems super pointless
 
Status
Not open for further replies.
Back
Top