Jump to content

Integrating WHMCS and ActiveCollab


dagdatech

Recommended Posts

So, I have both WHMCS and ActiveCollab installed for my clients. What I want to do is create a link in the WHMCS template on the clients account page to auto log them into the ActiveCollab program (assuming their login details are the same for both systems... i ran across this piece of code which I think may help (from an older post allowing login to Cpanel)...

 

{if $loggedin}
<form name="cpanellogin" action="ip:2083/login/" method="post" target="_blank">
{php}
$query = "SELECT * FROM tblhosting";
$items = mysql_query($query);
$strTotal = mysql_numrows($items);

$i=0;
for ($i; $i <= 0; $i++) {
$strCurrent = $strTotal - ( $i + $off ); // Set Database offset
if ($strCurrent == "-1") { $i = "1"; } // Skip Blank Lines
else {
$query = "SELECT * FROM tblhosting WHERE userid='".$_SESSION["uid"]."' LIMIT 1";
$result = mysql_query($query); // Get Row from Database
$row = mysql_fetch_array($result); // Set Row as an Array
}
$username = $row['username'];
$password = decrypt($row['password']);

echo "<input type=\"hidden\" name=\"user\" value=\"$username\">\n";
echo "<input type=\"hidden\" name=\"pass\" value=\"$password\">\n";
}
{/php}
Control Panel Login (Cpanel)

Login to your Control Panel to control your website and hosting options

<noscript>
<input type="submit" value="Login to cPanel" class="button">
</noscript>
</form>
{/if} 

 

The remote login code that ActiveCollab suggests us using is:

 

<form method="post" action="http://www.activecollab.com/try/login"> 
Email: <input type="text" name="login[email]" /> 
Password: <input type="password" name="login[password]" /> 
Remember me: <input type="checkbox" name="login[remember]" /> 
<input type="hidden" name="submitted" value="submitted" /> 
<button type="submit">Go baby go!</button> 
</form>

 

Is it possible to integrate this somehow into the template? I appologize in advance, but my PHP/MySQL skills are survival skills at best or else Id probably try to code it myself.

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