Hi,
I'm trying to get a integrationcode to work in MODX.
What I'm trying to accomplish is:
If user is logged in = Show some links, etc.
If user is logged out = Show loginform.
I have tried so many scripts from this forum, but i cant really get anyone to work.
With the last one, i have actually got the integration halfway correct i think. The problem is that i get the standard whmcs "Down for Maintenance - Upgrade in progress" message.
This is the code I'm trying to use:
PHP Code:
require("dbconnect.php");
if (!empty($GLOBALS['clientsdetails']['id']))
{
require_once ("includes/clientfunctions.php");
$userdetails = getclientsdetails($GLOBALS['clientsdetails']['id']);
}
$firstname= $userdetails['firstname'];
if ($_SESSION['uid'] > 0) {
echo "<strong>Hello $firstname! You are logged in.</strong> <a href=\"/logout.php\">(Click for Logout)</a>";
}
else
{
echo "Login form is put in here";
}

So:
1. Anyone have a clue on how i can resolve this?
2. Do i really need to include dbconnect.php, when both MODX and WHMCS is in the same DB?
When not including the dbconnect.php file, the script shows me the loginform, even when I'm actually logged in to the client area.