dagdatech Posted May 6, 2009 Share Posted May 6, 2009 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. 0 Quote Link to comment Share on other sites More sharing options...
dagdatech Posted May 7, 2009 Author Share Posted May 7, 2009 anyone??? anyone??? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.