Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- echo 'Haloo witam was';
- $config = json_decode(file_get_contents("../../../../serwery/samp_glowny/scriptfiles/happy_fun/config/config.json"));
- $db = @mysql_connect($config->mysql->hostname, $config->mysql->username, $config->mysql->password);
- @mysql_select_db($config->mysql->database, $db);
- if(!$db)
- {
- printf("<center></br><b>Wystąpił problem z panelem...</br>Problem został już zgłoszony</b></center>");
- exit();
- }
- $id = 1448;
- $result = mysql_query("SELECT * FROM mreg_gangs_wars where id={$id} limit 1",$db);
- $row = mysql_fetch_array($result);
- $file = explode("\r\n", file_get_contents("../../../../serwery/samp_glowny/scriptfiles/happy_fun/gangwars/{$row['gfile']}"));
- //print_r($file);
- $read = 0;
- $data = array();
- foreach($file as $f){
- $temp = explode("=", $f);
- if($temp[0] == 'wingang') $data['wingang'] = $temp[1];
- if($temp[0] == 'lostgang') $data['lostgang'] = $temp[1];
- if($temp[0] == "read$read") {
- $data['read'][$read++] = $temp[1];
- $data['read_explode'][$read] = explode(",", $temp[1]);
- $content = file_get_contents("http://4fun-serv.pl/panel/userbar/cache/{$data['read_explode'][$read][1]}.json");
- if($content)
- {
- if(preg_match('/^\xEF\xBB\xBF/',$content))
- {
- $content = substr($content,3);
- }
- $data['read_data'][$read] = $content;
- }
- }
- }
- print_r($data);
- //echo $out;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement