saturnine_nl

hawkeye config.php

Apr 30th, 2012
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 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" => "123.456.7.8:3306",
  15. "dbDbase" => "DBase",
  16. "dbUser" => "me",
  17. "dbPass" => "1234",
  18. "dbTable" => "hawkeye",
  19. "dbPlayerTable" => "hawk_players",
  20. "dbWorldTable" => "hawk_worlds",
  21.  
  22.  
  23.  
  24. //Set this to the password you want people to have to use to access the interface
  25. //Leave blank for no password
  26. "password" => "watcher",
  27.  
  28. //Default radius to search for if user supplies a location
  29. "radius" => 30,
  30.  
  31. //Limit the maximum number of results that can be returned. Do not use quotes
  32. //Set to 0 for no limit
  33. "maxResults" => 0,
  34.  
  35. //Language pack - default is english.php
  36. //You can create your own based off the english.php file,
  37. //then change the name below to your language file name
  38. "langFile" => "english.php",
  39.  
  40. //Log queries to log.txt
  41. //Useful to keep track of who is querying what
  42. "logQueries" => true,
  43.  
  44. //Use forum for authentication?
  45. //Default is false
  46. "forumAuth" => false,
  47.  
  48. //The relative location for the forum to this file.
  49. //Default is "../forum/"
  50. "forumDir" => "../forum/",
  51.  
  52. //The type of forum that will be used.
  53. //Default is phpbb3
  54. //Available types are: phpbb3 and smf
  55. "forumType" => "phpbb3"
  56.  
  57. );
  58.  
  59. //The user wants to use forumAuth
  60. if ($hawkConfig["forumAuth"])
  61. {
  62. //We need to require the specified forumType. Hopefully we support it (Or the user is using their own file)
  63. require('./forumAuth/'.$hawkConfig['forumType'].'.php');
  64. }
  65.  
  66. $con = mysql_connect($hawkConfig["dbHost"], $hawkConfig["dbUser"], $hawkConfig["dbPass"]);
  67. if (!$con)
  68. return error("Could not connect to MySQL Database!");
  69. if (!mysql_select_db($hawkConfig["dbDbase"], $con))
  70. return error(mysql_error());
  71.  
  72. mysql_query("SET NAMES UTF8");
  73.  
  74. function handleError($errno, $errstr, $errfile, $errline, array $errcontext) {
  75. // error was suppressed with the @-operator
  76. if (0 === error_reporting()) return false;
  77. throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
  78. }
  79.  
  80. ?>
Advertisement
Add Comment
Please, Sign In to add comment