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