Jump to content

Custom Page Client Area - List products


andremcarrano

Recommended Posts

Im trying to create a custom client area page to list all products

 

Looking at the documentation, my example above isn't working.

 

I use {$domain} in adm.tpl but don't get any data!

 

It would be better catch using API, any body have a custom page example working for 5.1.2?

 

<?php

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

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

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

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

# Check login status
if ($_SESSION['uid']) {

			# Here's an example to get the currently logged in clients first name

			$query="SELECT * FROM tblhosting WHERE userid='".$_SESSION['uid']."'";
			$result = mysql_query($query) or die('Error, query failed');

			while ($data = mysql_fetch_array($result)) 
			{
			$assignedips = $data['assignedips'];
			$domain = $data['domain'];

			}
			$smartyvalues['assignedips'] = $assignedips;
			$smartyvalues['domain'] = $domain;


$templatefile = "adm"; 
outputClientArea($templatefile);


} else {

 # User is not logged in

outputClientArea(login);

}

?>

 

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

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