Advertisement
Guest User

config.php

a guest
Nov 3rd, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. <?php
  2. ///////////////////////////////////////////////////
  3. // HawkEye Interface Config File //
  4. // by oliverw92 //
  5. ///////////////////////////////////////////////////
  6. // Edit the config array below with your //
  7. // details. Make sure all strings are //
  8. // escaped. If you can't work this out, //
  9. // ask in the thread on bukkit.org. //
  10. ///////////////////////////////////////////////////
  11. $hawkConfig = array(
  12. //Enter your MySQL database information
  13. //Do not change 'dbTable'
  14. "dbHost" => "web.exodushosting.net:3306",
  15. "dbDbase" => "********",
  16. "dbUser" => "********",
  17. "dbPass" => "********",
  18. "dbTable" => "hawkeye",
  19. "dbPlayerTable" => "hawk_players",
  20. "dbWorldTable" => "hawk_worlds",
  21.  
  22. //Set this to the password you want people to have to use to access the interface
  23. //Leave blank for no password
  24. "password" => "",
  25.  
  26. //Default radius to search for if user supplies a location
  27. "radius" => 30,
  28.  
  29. //Limit the maximum number of results that can be returned. Do not use quotes
  30. //Set to 0 for no limit
  31. "maxResults" => 0,
  32.  
  33. //Language pack - default is english.php
  34. //You can create your own based off the english.php file,
  35. //then change the name below to your language file name
  36. "langFile" => "english.php",
  37.  
  38. //Log queries to log.txt
  39. //Useful to keep track of who is querying what
  40. "logQueries" => true,
  41.  
  42. //Use forum for authentication?
  43. //Default is false
  44. "forumAuth" => false,
  45.  
  46. //The relative location for the forum to this file.
  47. //Default is "../forum/"
  48. "forumDir" => "../forum/",
  49.  
  50. //The type of forum that will be used.
  51. //Default is phpbb3
  52. //Available types are: phpbb3 and smf
  53. "forumType" => "smf"
  54.  
  55. );
  56.  
  57. //The user wants to use forumAuth
  58. if ($hawkConfig["forumAuth"])
  59. {
  60. //We need to require the specified forumType. Hopefully we support it (Or the user is using their own file)
  61. require('./forumAuth/'.$hawkConfig['forumType'].'.php');
  62. }
  63.  
  64. $con = mysql_connect($hawkConfig["dbHost"], $hawkConfig["dbUser"], $hawkConfig["dbPass"]);
  65. if (!$con)
  66. return error("Could not connect to MySQL Database!");
  67. if (!mysql_select_db($hawkConfig["dbDbase"], $con))
  68. return error(mysql_error());
  69.  
  70. mysql_query("SET NAMES UTF8");
  71.  
  72. function handleError($errno, $errstr, $errfile, $errline, array $errcontext) {
  73. // error was suppressed with the @-operator
  74. if (0 === error_reporting()) return false;
  75. throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
  76. }
  77.  
  78. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement