Jump to content
  • 0

help with playercap.php in fluxcp


Yonko

Question


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in/home5/**********/public_html/**************/themes/designno2/gthemes/playerCap.phpon line 17

Access denied for user 'root'@'localhost' (using password: YES)

why i get those? i set the theme -> designno2 by Gerome

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  11/09/12
  • Last Seen:  

open your playerCap.php

and replace with this

<?php
$host  = 'localhost';
$username  = 'root';    // Mysql Username
$password  = 'root';    // Mysql Pass
$db    = 'ragnarok_database'; // Database name
$link = mysql_connect($host, $username, $password) or die(mysql_error());
@mysql_select_db($db,$link);
// Characters.
$sql = "SELECT COUNT(`char`.char_id) AS total FROM {$server->charMapDatabase}.`char` ";
if (Flux::config('HideTempBannedStats')) {
$sql .= "LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id ";
$sql .= "WHERE login.unban_time <= UNIX_TIMESTAMP()";
}
if (Flux::config('HidePermBannedStats')) {
if (Flux::config('HideTempBannedStats')) {
 $sql .= " AND login.state != 5";
} else {
 $sql .= "LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id ";
 $sql .= "WHERE login.state != 5";
}
}
$result = mysql_query($sql,$link);
mysql_close($link);
$arr = mysql_fetch_array($result);
$player_cap = $arr['total'];
?>
<p id="playerCap"><?php echo $player_cap; ?></p>

Link to comment
Share on other sites

×
×
  • Create New...