Jump to content

Problem adding new page to WHMCS - PLEASE HELP<3


Schonix

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!

 

-Chris

 

My PHP file:

 

<?php

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

require("dbconnect.php");
require("configuration.php");
require("includes/functions.php");
require("includes/clientareafunctions.php");

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

initialiseClientArea($pagetitle,'',$breadcrumbnav);



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

//end
$templatefile = "documents"; 

outputClientArea($templatefile);

?>

 

 

My .tpl File:

<!DOCTYPE html>
<html lang="en">
 <head>
   <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">

 </head>

<h2>Document Creator</h2>

{if $clientsstats.productsnumactivereseller >= "1" or $clientsstats.productsnumactiveservers >= "1"}
<p>
<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>
</form>
</p>
{else}
<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>
{/if}

 </body>
</html>

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.

Guest
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