• Online Demo
  • 30-day Free Trial

Go Back   Blesta Forums > Community > General Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 07-04-2012, 09:05 PM
likegeo likegeo is offline
Junior Member
 
Join Date: Jul 2012
Posts: 3
Default For those that need direct connection to cPanel

Hello there,

For those who want to add a link to cPanel, and customers not have to login on cPanel using username and password, can use this code that automaticaly get the username and password for cpanel.

You can add an link on main navigation by editing the file: /templates/argentum/u-structure.pdt

After the order link add this:

PHP Code:
<?php
$uid 
"".$_SESSION['sess_uid']."";
$mysql_host 'localhost';
$mysql_user 'your_mysql_user';
$mysql_password 'your_mysql_password';
$mysql_database 'mysql_database_name';
$mysql_table 'services'//do not change
$db mysql_connect($mysql_host$mysql_user$mysql_password);
mysql_select_db($mysql_database$db);  
$result mysql_query("SELECT s_user2, s_pass FROM services WHERE s_uid = $uid");
while(
$row mysql_fetch_assoc($result)) {
$flrow "".$row['s_user2']."";
$passrow "".$row['s_pass']."";
}
?>

             
        <li class="neighbor"><a href="http://yourdomain.com:2082/login/?user=<?php echo $flrow;?>&pass=<?php echo $passrow;?>">cPanel login</a></li>
Hope that help ,

p.s: Sory for my bad english

Best Regards, George
Reply With Quote
  #2  
Old 07-05-2012, 04:50 PM
Paul's Avatar
Paul Paul is offline
Blesta Developer
 
Join Date: Apr 2006
Location: Wherever I go, there I am.
Posts: 1,465
Send a message via AIM to Paul Send a message via MSN to Paul
Default

Thanks for the contribution. A direct login link is planned to be included in the cPanel module for v3.
__________________
Paul
Misc Stuff Guy

Blesta
Professional Billing
www.blesta.com
Reply With Quote
Reply

Bookmarks

Tags
direct cpanel login

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Count not establish a connection to MySQL Viperoptic General Discussion 1 05-21-2010 09:42 AM
Problem with Module cPanel DJams General Discussion 1 07-31-2009 04:58 PM


All times are GMT. The time now is 12:34 AM.