Site Online/Offline

Any hacks and modifications will be in here...

Site Online/Offline

Postby keinelust » Tue Dec 20, 2011 11:49 am

Hello

times have made ​​a small hack
Site Online / Offline

Open config.php and add to
Code: Select all
$fop =  fopen('secure/settings.dfh', 'r');
$content = fread($fop, '999');
fclose($fop);
$content = explode("|", $content);


after
Code: Select all
$GLOBALS["SITE_ONLINE"] = true;


please change to the header.php and open
and after
Code: Select all
require_once("./functions.inc.php");

the insert
Code: Select all
if (!$GLOBALS["SITE_ONLINE"])
    die("The site is currently not available due to maintenance work. ");


true = Online
false = Offline


sorry for my english I speak German
English
Hello for the Germans user, I like to give support when I occupied myself with this script and some programming.

Deutsch
Hallo für die Deutschen User, gebe ich gerne Support da ich mich selbst mit diesem Script beschäftige und etwas Programmiere.
keinelust
Standard Member
 
Posts: 12
Joined: Tue Dec 13, 2011 8:36 am

Re: Site Online/Offline

Postby iheartbreakz » Tue Dec 20, 2011 7:59 pm

it be better if you can make it so you can choose site online/offline from admin panel but good mod though
iheartbreakz
Moderator + Premium + Code Tester
 
Posts: 100
Joined: Wed Apr 20, 2011 2:14 pm

Re: Site Online/Offline

Postby keinelust » Tue Dec 20, 2011 9:11 pm

on Admin panel I tested it only makes offline then I'll sit on the days ran again
English
Hello for the Germans user, I like to give support when I occupied myself with this script and some programming.

Deutsch
Hallo für die Deutschen User, gebe ich gerne Support da ich mich selbst mit diesem Script beschäftige und etwas Programmiere.
keinelust
Standard Member
 
Posts: 12
Joined: Tue Dec 13, 2011 8:36 am

Re: Site Online/Offline

Postby iheartbreakz » Wed Dec 21, 2011 3:10 am

sorry i didn't understand what you said.. but if you can make it like on the admin panel settings you can have a setting called "Offline" and have its options as "on" "off".. that be great.. so if you choose on, the site will go offline and if you choose off the site will be online like usual
iheartbreakz
Moderator + Premium + Code Tester
 
Posts: 100
Joined: Wed Apr 20, 2011 2:14 pm

Re: Site Online/Offline

Postby keinelust » Wed Dec 21, 2011 5:26 am

hello, I meant I have already tried it on admin panel nothing brings if side completely off-line then is also off-line adminl panel

sorry for mine bad english I speak in German
English
Hello for the Germans user, I like to give support when I occupied myself with this script and some programming.

Deutsch
Hallo für die Deutschen User, gebe ich gerne Support da ich mich selbst mit diesem Script beschäftige und etwas Programmiere.
keinelust
Standard Member
 
Posts: 12
Joined: Tue Dec 13, 2011 8:36 am

Re: Site Online/Offline

Postby iheartbreakz » Wed Dec 21, 2011 4:45 pm

ohhh.. is there anyway you can make the admin panel accessable and others not
iheartbreakz
Moderator + Premium + Code Tester
 
Posts: 100
Joined: Wed Apr 20, 2011 2:14 pm

Re: Site Online/Offline

Postby gyurma » Sat Jan 25, 2014 3:38 pm

Sziasztok!
Elnézést hogy nem angolul írok de hibás a google fordító.
Nagyon köszönöm ezt a remek kis kódot szuper nagy hasznát vettem.
És ennek örömére ki bővitettem azzal hogy ha offline re állítod az oldalt attól még te el tudd érni az oldalt a saját ip címedről mert ez is fontos fejlesztés alatt.
Itt a kód

Code: Select all
$sip = $_SERVER['REMOTE_ADDR'];
if ($sip !=="192.168.156.220") {
$fop =  fopen('settings.dfh', 'r');
$content = fread($fop, '999');
fclose($fop);
$content = explode("|", $content);
$GLOBALS["SITE_ONLINE"] = false;
if (!$GLOBALS["SITE_ONLINE"])
    die("Az oldal zárva!!!");
}
gyurma
Newbie Member
 
Posts: 1
Joined: Sat Jan 25, 2014 3:30 pm

Re: Site Online/Offline

Postby Synetics » Sat Feb 08, 2014 11:22 pm

Thanks
Synetics
Newbie Member
 
Posts: 1
Joined: Sat Feb 08, 2014 11:17 pm


Return to Hacks and Modifications

Who is online

Users browsing this forum: No registered users and 3 guests

cron