Advertisement
Guest User

Untitled

a guest
Jul 31st, 2011
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <?
  2.  
  3. define("LOGIN_SSH", "spirit"); // identifiant SSH
  4. define("PASS_SSH", ""); // le mot de passe
  5. define("HOST_SSH", "localhost"); // ne rien changer ^^
  6.  
  7. define("PATH_BOT", "/home/spirit/invite_script/");
  8.  
  9. define("SQL_HOST", 'localhost');
  10. define("SQL_USER", "auto_invite");
  11. define("SQL_BDD", "auto_invite");
  12. define("SQL_PASS", '');
  13.  
  14. function connect_sql() {
  15. $conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS);
  16. mysql_select_db(SQL_BDD) or die("Impossible d'ouvrir la base de donnee \n");
  17.  
  18. }
  19.  
  20. function GetInfo($base)
  21. {
  22. $requete = "SELECT * FROM `invite_configuration` WHERE options='".$base."' LIMIT 0,1";
  23.  
  24. $result = mysql_query($requete);
  25. if (mysql_num_rows($result) == 1)
  26. {
  27. $resultat = mysql_fetch_array($result);
  28. return $resultat["value"];
  29. }
  30. else
  31. return NULL;
  32. }
  33.  
  34.  
  35. function validate_steam($steam)
  36. {
  37. define('STEAM_FORMAT', "/^STEAM_[0-9]:[0-9]:[0-9]+$/");
  38. return preg_match(STEAM_FORMAT, $steam) ? true : false;
  39. }
  40. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement