"; +} //Check if 0 entries to avoid PHP warnings if 0 chars in database. -if ($num_chars > 0){ - $num_ally = $rc[1]+$rc[3]+$rc[4]+$rc[7]+$rc[11]; - $num_horde = $rc[2]+$rc[5]+$rc[6]+$rc[8]+$rc[10]; +if ($num_chars > 0) +{ + $num_ally = $data[1]+$data[3]+$data[4]+$data[7]+$data[11]; + $num_horde = $data[2]+$data[5]+$data[6]+$data[8]+$data[10]; $pc_ally = round($num_ally/$num_chars*100,2); $pc_horde = round($num_horde/$num_chars*100,2); - $pc_human = round($rc[1]/$num_chars*100,2); - $pc_orc = round($rc[2]/$num_chars*100,2); - $pc_dwarf = round($rc[3]/$num_chars*100,2); - $pc_ne = round($rc[4]/$num_chars*100,2); - $pc_undead = round($rc[5]/$num_chars*100,2); - $pc_tauren = round($rc[6]/$num_chars*100,2); - $pc_gnome = round($rc[7]/$num_chars*100,2); - $pc_troll = round($rc[8]/$num_chars*100,2); - $pc_be = round($rc[10]/$num_chars*100,2); - $pc_dranei = round($rc[11]/$num_chars*100,2); + $pc_human = round($data[1]/$num_chars*100,2); + $pc_orc = round($data[2]/$num_chars*100,2); + $pc_dwarf = round($data[3]/$num_chars*100,2); + $pc_ne = round($data[4]/$num_chars*100,2); + $pc_undead = round($data[5]/$num_chars*100,2); + $pc_tauren = round($data[6]/$num_chars*100,2); + $pc_gnome = round($data[7]/$num_chars*100,2); + $pc_troll = round($data[8]/$num_chars*100,2); + $pc_be = round($data[10]/$num_chars*100,2); + $pc_dranei = round($data[11]/$num_chars*100,2); } ?> diff --git a/index.php b/index.php index 17f2682..12827ef 100644 --- a/index.php +++ b/index.php @@ -121,7 +121,7 @@ if($CDB->status() != 1) { echo "Cannot connect to the Character database. Please make sure you have this realm setup successfully in the Admin Panel. - Delete your cookies to reset realm selection back to default"; + Delete your cookies to reset realm selection back to default. "; die(); } diff --git a/install/index.php b/install/index.php index 6580725..36ab7c1 100644 --- a/install/index.php +++ b/install/index.php @@ -200,17 +200,17 @@ function output_message($type, $text) die(); } // Check if provided info is correct - @mysql_connect($_POST['db_host'].":".$_POST['db_port'], $_POST['db_username'], $_POST['db_password']) + $link = @mysqli_connect($_POST['db_host'], $_POST['db_username'], $_POST['db_password'], $_POST['db_name'], $_POST['db_port']) or die('
MySql error log:
- '.mysql_error().'
Account table not found! Cannot Continue with the installation without an Account - table!
MySql error log:
'.mysql_error().'
Account table not found! Cannot Continue with the installation without an Account + table!
MySql error log:
'.mysqli_error().'