KeithT Posted August 5, 2007 Share Posted August 5, 2007 I have made a custom cancelation page and added this to the main header.tpl. My question is what is the coding I need to make this page accessable ONLY once the client logs in? Also will this code go at the top of the cancel templete page? 0 Quote Link to comment Share on other sites More sharing options...
LinuxGuru Posted August 5, 2007 Share Posted August 5, 2007 If I'm understanding your question right, you'll want to call dologin.php?goto=clientarea in your form. 0 Quote Link to comment Share on other sites More sharing options...
KeithT Posted August 5, 2007 Author Share Posted August 5, 2007 ok I tried that and got an error so just tried the require("dologin.php"); yes it requires them to log in, however now the page i created will not load just reloads teh client area??? 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted August 5, 2007 Share Posted August 5, 2007 If I'm understanding your question right, you'll want to call dologin.php?goto=clientarea in your form. Nope. What you want to do is follow these links, http://support.whmcs.com/knowledgebase.php?action=displayarticle&catid=7&id=26 (To create your page using WHMCS template system) Then once created, in the body of the page add (in the .tpl file) add {if $loggedin} Can only see when logged in</p> {else} Must be logged in to view</p> {/if} From, Adam 0 Quote Link to comment Share on other sites More sharing options...
KeithT Posted August 5, 2007 Author Share Posted August 5, 2007 didnt work all i get is Must be logged in to view then under it the page im trying to block from non clients... 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted August 5, 2007 Share Posted August 5, 2007 didnt work all i get is Must be logged in to view then under it the page im trying to block from non clients... How do you have your pages setup? Are you using the .tpl files or .php file? From, Adam 0 Quote Link to comment Share on other sites More sharing options...
KeithT Posted August 5, 2007 Author Share Posted August 5, 2007 Adam.. I do apologize sir... I figured it out after thinking about it and thinking back to the way the if and else work from when i did flash so I went back into the templete and did the {if $loggedin} inserted the templete code</p> {else} Must be logged in to view</p> {/if} works great.. thank you for you help adam..... Im new to php coding im use to doing everthing in html but working with whmcs is making me learn new things that im loving... Once i get my site up and running im gonna start to build a page all in php to learn it better... 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted August 5, 2007 Share Posted August 5, 2007 Hey, Glad it works. But remember, even tho WHMCS uses PHP, keep in mind that is not actually PHP code. Its smarty which is a PHP template based system. Go down to your local book store and find books on PHP like PHP and MySQL for Dummies PHP Bible and so on. From, Adam 0 Quote Link to comment Share on other sites More sharing options...
KeithT Posted August 5, 2007 Author Share Posted August 5, 2007 thanx adam... 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.