Jump to content

Problem adding new page to WHMCS - PLEASE HELP<3


Recommended Posts

I'm trying to add a page thats only viewable to resellers and server customers.


Basically my problem is that the page works fine when I visit it from a new browser window, but when I login to the client area and navigate to the page from the navigation bar, WHMCS forces you to login again and once you've logged in again it directs you to the client area and skips the page.


Anyone that can help me solve this problem will overwhelm me with joy. Please and thankyou!




My PHP file:



define("FORCESSL",true); # Uncomment to force the page to use https://


$pagetitle = $_LANG['clientareatitle'];
$breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>';
$breadcrumbnav .= ' > <a href="documents.php">Documents Generator</a>'; 


// Not logged in?
if (!isset($_SESSION['uid']) || empty($_SESSION['uid']))
 Continue with WHMCS login
initialiseClientArea($pagetitle, $pageicon, $breadcrumbnav);
$smartyvalues['formaction'] = 'dologin.php?goto=ssl';

$templatefile = "documents"; 





My .tpl File:

<!DOCTYPE html>
<html lang="en">
   <meta charset="utf-8">
   <title>{$pagetitle} - {$companyname}</title>

   <!--<link href="templates/{$template}/css/bootstrap.css" rel="stylesheet">-->
   <!--<link href="templates/{$template}/css/whmcs.css" rel="stylesheet">-->
   <link href="https://schonix.com/hosting/wp-content/themes/schonix/css/resellertools.css" rel="stylesheet">


<h2>Document Creator</h2>

{if $clientsstats.productsnumactivereseller >= "1" or $clientsstats.productsnumactiveservers >= "1"}
<form action="/hosting/documents.php" method="post"></br>
Company Name: <input type="text" name="cname"></br>
Company Email Adress: <input type="text" name="email"></br>
Company SLA Percentage: <input type="text" name="sla"></br>
Company Abuse Adress: <input type="text" name="abuse"></br>
Company Language <input type="text" name="lang"></br>
<input class="submit-green" type="submit" value="Submit" name="Submit" style="text-align:center; width:100px; height:40px; font-size:15px"></br>
<p>Here at Schonix we provide our resellers with tons of features to help professionalize their end of business. Please purchase a <a href="https://www.schonix.com/hosting/clients/cart.php?gid=2">reseller package</a> to gain access to this feature. Thanks!</p>


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • 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