Jump to content

markjwilliamson

Member
  • Posts

    4
  • Joined

  • Last visited

Everything posted by markjwilliamson

  1. Many thanks for the solution John, I was also struggling with the cause of this Oops error whenever I tried to access the Setup Addon Modules or the Module Queue After removing the file that you suggested I still kept getting the error but showing different files so I removed these files one at a time until the error stopped. If it helps anyone else, the files I had to remove/rename were; /modules/registrars/dottk/dottk.php /modules/registrars/netregistry/netregistry.php /modules/addons/enomnewtlds/enomnewtlds.php /modules/addons/ssl/ssl.php /modules/addons/remotesupport/remotesupport.php /modules/servers/enomtruste/enomtruste.php /modules/servers/ensimx/ensimx.php /modules/servers/fluidvm/fluidvm.php /modules/servers/plesk10/plesk10.php /modules/servers/plesk9/plesk9.php /modules/servers/plesk8/plesk8.php /modules/servers/pleskreseller/pleskreseller.php -Mark.
  2. That works perfectly, exactly what I wanted. Thank you to both of you for taking the time to help me - it's really appreciated. The third solution was throwing an error, an unexpected "{" which gave a server 500 error. but I couldn't see an unmatched bracket so I used a mix of the solutions... <?php if (!defined("WHMCS")) die("This file cannot be accessed directly"); function hook_ForceEveryoneToLogin($vars) { $clientID = intval($_SESSION['uid']); $adminID = intval($_SESSION['adminid']); if ($adminID===0){ if ($vars['filename']!="login" && $vars['filename']!="dologin" && $vars['filename']!="clientarea" && $clientID===0){ header("Location: login.php"); exit; } } } add_hook("ClientAreaPage", 1, "hook_ForceEveryoneToLogin"); ...I didn't include the password reset clause as I've removed that button from the login screen anyway. thanks again guys. -Mark
  3. Hi, I only want to use whmcs to manage existing users without letting anyone else view the site or place orders so I was looking for a way to hide ALL pages, (except the login page) from non-logged in users. I've redirected all users to the login page using the option in general settings but there's nothing to stop someone from typing "/cart.php" onto the end of the domain name in the address bar and getting access to the order forms etc. I've tried using an {if $loggedin || $templatefile == 'login'} before the main content part in header.tpl and an {/if} at the end of section in footer.tpl but that just gave me non-formatted pages even for logged in users. The only way I can think of doing it is to put the {if $loggedin} at the start of every tpl page? ...does anyone have any ideas. kind regards Mark.
  4. Thanks for sharing this sentq, it works perfectly and your code has helped me to understand the sidebar implementation a little better.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated