Advertisement
mrdrifter

Untitled

May 30th, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. <?
  2.  
  3. echo 'Haloo witam was';
  4.  
  5. $config = json_decode(file_get_contents("../../../../serwery/samp_glowny/scriptfiles/happy_fun/config/config.json"));
  6.  
  7. $db = @mysql_connect($config->mysql->hostname, $config->mysql->username, $config->mysql->password);
  8. @mysql_select_db($config->mysql->database, $db);
  9. if(!$db)
  10. {
  11. printf("<center></br><b>Wystąpił problem z panelem...</br>Problem został już zgłoszony</b></center>");
  12. exit();
  13. }
  14. $id = 1448;
  15.  
  16. $result = mysql_query("SELECT * FROM mreg_gangs_wars where id={$id} limit 1",$db);
  17. $row = mysql_fetch_array($result);
  18.  
  19. $file = explode("\r\n", file_get_contents("../../../../serwery/samp_glowny/scriptfiles/happy_fun/gangwars/{$row['gfile']}"));
  20. //print_r($file);
  21.  
  22.  
  23. $read = 0;
  24. $data = array();
  25.  
  26. foreach($file as $f){
  27.  
  28. $temp = explode("=", $f);
  29.  
  30. if($temp[0] == 'wingang') $data['wingang'] = $temp[1];
  31. if($temp[0] == 'lostgang') $data['lostgang'] = $temp[1];
  32.  
  33. if($temp[0] == "read$read") {
  34. $data['read'][$read++] = $temp[1];
  35. $data['read_explode'][$read] = explode(",", $temp[1]);
  36.  
  37. $content = file_get_contents("http://4fun-serv.pl/panel/userbar/cache/{$data['read_explode'][$read][1]}.json");
  38. if($content)
  39. {
  40. if(preg_match('/^\xEF\xBB\xBF/',$content))
  41. {
  42. $content = substr($content,3);
  43. }
  44. $data['read_data'][$read] = $content;
  45. }
  46. }
  47. }
  48.  
  49. print_r($data);
  50. //echo $out;
  51.  
  52. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement