neobug103 Posted May 12, 2008 Share Posted May 12, 2008 Is it possible to require visitors to login to the client area first before being able to view the server status? If so, how? 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted May 13, 2008 Share Posted May 13, 2008 This might be wrong, but I think it's something like {if $loggedin} ## Status Code ## {else} Please login to view this page. ## login box ## {/if} Obviously you will need to change the text and where the #'s are for your own needs. But edit the status page template and that should work. 0 Quote Link to comment Share on other sites More sharing options...
dansgalaxy Posted July 2, 2008 Share Posted July 2, 2008 Thanks for that i have just added that to mine, last time i tried to insert my own code it messed up lol Dan 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted July 2, 2008 Share Posted July 2, 2008 Thanks for that i have just added that to mine, last time i tried to insert my own code it messed up lol Dan The code above is correct, try the below. Check your code... {if $loggedin} <p>{$LANG.serverstatusheadingtext}</p> <table class="clientareatable" align="center" cellspacing="1"> <tr class="clientareatableheading"> <td>{$LANG.servername}</td> <td>HTTP</td> <td>FTP</td> <td>POP3</td> <td>{$LANG.serverstatusphpinfo}</td> <td>{$LANG.serverstatusserverload}</td> <td>{$LANG.serverstatusuptime}</td> </tr> {foreach key=num item=server from=$servers} <tr class="clientareatableactive"> <td>{$server.name}</td> <td>{get_port_status num="$num" port="80"}</td> <td>{get_port_status num="$num" port="21"}</td> <td>{get_port_status num="$num" port="110"}</td> <td><a href="{$server.phpinfourl}" target="_blank">{$LANG.serverstatusphpinfo} </a></td> <td>{$server.serverload}</td> <td>{$server.uptime}</td> </tr> {foreachelse} <tr class="clientareatableactive"> <td colspan="7">{$LANG.serverstatusnoservers}</td> </tr> {/foreach} </table> {else} <p>{$LANG.loginintrotext}</p> <table width="100%" border="0" cellpadding="2" cellspacing="1" class="navbar"> <tr> <td class="navbox"> <form method="post" action="dologin.php"> {if $incorrect}<div class="errorbox">{$LANG.loginincorrect}</div>{/if} <div align="center"> <strong>{$LANG.clientlogin}</strong><br /> <img src="images/spacer.gif" width="1" height="5" /><br /> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td><div align="right"><span class="smalltext">{$LANG.loginbutton}:</span></div></td> <td><input name="username" type="text" class="navinput" style="width: 215px" /></td> </tr> <tr> <td> <div align="right"><span class="smalltext">{$LANG.loginpassword}:</span></div> </td> <td> <input name="password" type="password" class="navinput" style="width: 213px" /></td> </tr> </table> <input type="checkbox" name="rememberme" />{$LANG.loginrememberme} <input type="submit" value="{$LANG.loginbutton}" /> <br> <br> <br> <p><strong>{$LANG.loginforgotten}</strong> <a href="passwordreminder.php">{$LANG.loginforgotteninstructions}</a>.</p> </div> </form> </td> </tr> </table> {/if} 0 Quote Link to comment Share on other sites More sharing options...
dansgalaxy Posted July 2, 2008 Share Posted July 2, 2008 I did it and it worked i was just mentioning when i tried to play with something in the invoice template with the if/else it just messed up. I might use the login code u put tho i didnt bother with that i just put a message to login Thanks, Dan 0 Quote Link to comment Share on other sites More sharing options...
Allosunshine Posted July 3, 2008 Share Posted July 3, 2008 I've just deleted it from the menu in the homepage.tpl file I think it was. 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted July 3, 2008 Share Posted July 3, 2008 I've just deleted it from the menu in the homepage.tpl file I think it was. If you wanna go that route you should delete the file from your server. 0 Quote Link to comment Share on other sites More sharing options...
Allosunshine Posted July 3, 2008 Share Posted July 3, 2008 If you wanna go that route you should delete the file from your server. What do you mean delete the file from the server?? 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted July 3, 2008 Share Posted July 3, 2008 serverstatus.tpl... if you didn't put any conditions on the file then anyone that is familiar with whmcs can still use it. 0 Quote Link to comment Share on other sites More sharing options...
dansgalaxy Posted July 3, 2008 Share Posted July 3, 2008 All a user has to do is navigate directly to the page Or u could just enter the wrong url on the server status url in the server settings then it just shows unavalible for uptime and load.. Dan Dan 0 Quote Link to comment Share on other sites More sharing options...
neobug103 Posted January 5, 2010 Author Share Posted January 5, 2010 is there any code somebody could write that would redirect the user after login back to the serverstatus page? Way I have links configured is the server status page isn't listed in my client area so it might confuse the client 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.