dezkit Posted April 20, 2008 Share Posted April 20, 2008 I made some code, <?php $construction="yes"; if($construction == "yes"){ echo ?> <html> <center><br><br><br><br><br><h1> Website is under construction, please remain patient, thank you. </h1> </center> </html> <?php } else { ?> THE WEBSITE PAGES HERE OR WHATEVER <?php } ?> I want so i can toggle "yes" and "no" for $construction (like a CMS system) without going into my ftp/file manager. thanks dezkit. i got the admin login page already setup.... <?php $username = "someuser"; $password = "somepassword"; if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) { ?> <h1>Login</h1> <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <table> <tr <td>Username: <td><input type="text" title="Enter your Username" name="txtUsername" /></p> <tr> <td>Password: <td><input type="password" title="Enter your password" name="txtPassword" /></p> <tr> <td colspan="2" align="right"><input type="submit" name="Submit" value="Login"> </table> </form> <?php } else { ?> CMS STUFF HERE. <?php } ?> Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/ Share on other sites More sharing options...
dezkit Posted April 20, 2008 Author Share Posted April 20, 2008 bump Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521672 Share on other sites More sharing options...
AndyB Posted April 20, 2008 Share Posted April 20, 2008 bump 18 minutes on a Saturday night !!!!! Patience, grasshopper. Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521674 Share on other sites More sharing options...
unidox Posted April 20, 2008 Share Posted April 20, 2008 You will need sql, unless you want to use another php page. Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521676 Share on other sites More sharing options...
dezkit Posted April 20, 2008 Author Share Posted April 20, 2008 18 minutes on a Saturday night !!!!! Patience, grasshopper. haha You will need sql, unless you want to use another php page. Help me out bro, edit the code very much appreciated!! Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521681 Share on other sites More sharing options...
unidox Posted April 20, 2008 Share Posted April 20, 2008 I can help you with the code, if you would like me to create it from scratch it will cost you. But if you need help, then I can. Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521697 Share on other sites More sharing options...
dezkit Posted April 20, 2008 Author Share Posted April 20, 2008 how much do you want? Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521704 Share on other sites More sharing options...
jonsjava Posted April 20, 2008 Share Posted April 20, 2008 the going rate for that type of script is $50.00-$100.00 USD Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521705 Share on other sites More sharing options...
jonsjava Posted April 20, 2008 Share Posted April 20, 2008 as the old saying goes: Cheap, Fast, Good Pick 2 Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521706 Share on other sites More sharing options...
unidox Posted April 20, 2008 Share Posted April 20, 2008 lol, I like that Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521713 Share on other sites More sharing options...
dezkit Posted April 20, 2008 Author Share Posted April 20, 2008 i want cheap and fast. how much? Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521715 Share on other sites More sharing options...
jonsjava Posted April 20, 2008 Share Posted April 20, 2008 cheap + fast does not equal good, FYI. It means it works, but takes more coding to modify to anything new. Cost: $50 Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521717 Share on other sites More sharing options...
unidox Posted April 20, 2008 Share Posted April 20, 2008 I could prob do for 30-50 Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521720 Share on other sites More sharing options...
jonsjava Posted April 20, 2008 Share Posted April 20, 2008 take his offer. it's cheap. EDIT My going rate is $50.00/hour for custom scripting one-time jobs. Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-521721 Share on other sites More sharing options...
DeanWhitehouse Posted April 20, 2008 Share Posted April 20, 2008 wow, i charge way to low mine is about $14 per hour/£7.50 per hour. Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522089 Share on other sites More sharing options...
dezkit Posted April 20, 2008 Author Share Posted April 20, 2008 what are you guys talking about???? all i want is a password protected page, that has a password of "123456", and whenever i login, it says "Welcome dezkit, the current status of the website is live, to turn off the website, please click here" and whenever i click the link, it changes the "no" to a "yes" <?php $construction="no"; if($construction == "yes"){ echo ?> <html> <center><br><br><br><br><br><h1> Website is under construction, please remain patient, thank you. </h1> </center> </html> <?php } else { ?> to <?php $construction="yes"; if($construction == "yes"){ echo ?> <html> <center><br><br><br><br><br><h1> Website is under construction, please remain patient, thank you. </h1> </center> </html> <?php } else { ?> Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522204 Share on other sites More sharing options...
dptr1988 Posted April 20, 2008 Share Posted April 20, 2008 That would require the PHP script to modify it's self. You need to have some sort of data storage system. You can use flat file databases or MySQL or even serialize php variables. http://us3.php.net/serialize Serializing is pretty nice for storing complex PHP variables when you don't want to create a MySQL table for that info. Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522208 Share on other sites More sharing options...
dezkit Posted April 20, 2008 Author Share Posted April 20, 2008 i would like to use a mysql database any more advice including codes Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522210 Share on other sites More sharing options...
dezkit Posted April 20, 2008 Author Share Posted April 20, 2008 php.net is soo complex! Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522226 Share on other sites More sharing options...
DeanWhitehouse Posted April 20, 2008 Share Posted April 20, 2008 Please PM me and i can write the code for you. For $10 Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522231 Share on other sites More sharing options...
dezkit Posted April 20, 2008 Author Share Posted April 20, 2008 sorry, i don't pay for 10 lines of code. Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522234 Share on other sites More sharing options...
DeanWhitehouse Posted April 20, 2008 Share Posted April 20, 2008 ok then, write it yourself Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522241 Share on other sites More sharing options...
unidox Posted April 20, 2008 Share Posted April 20, 2008 lol, If you want someone to make a script, we cant do for free. If you dont wanna pay, then do it yourself. Stop being so selfish, man up, and search. Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522304 Share on other sites More sharing options...
DeanWhitehouse Posted April 20, 2008 Share Posted April 20, 2008 heres a much as i will say. the value $construction needs to be saved somewhere then called form that location. simple if you no how to do it Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522311 Share on other sites More sharing options...
dptr1988 Posted April 20, 2008 Share Posted April 20, 2008 Just go ahead and cough up the money. There are quite a few programmers on Rent A Coder what would be happy to do this for $10 or less Link to comment https://forums.phpfreaks.com/topic/101932-solved-php-under-construction-admin/#findComment-522316 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.