Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Sign Functions
- * by `Internal
- * www.Vgames.co.il
- */
- function parse_ini_file2($f)
- {
- $newline = "<br>";
- $null = "";
- $r=$null;
- $first_char = "";
- $sec=$null;
- $comment_chars="/*<;?>";
- $num_comments = "0";
- $header_section = "";
- //Read to end of file with the newlines still attached into $f
- $f=@file($f);
- // Process all lines from 0 to count($f)
- for ($i=0;$i<@count($f);$i++)
- {
- $newsec=0;
- $w=@trim($f[$i]);
- $first_char = @substr($w,0,1);
- if ($w)
- {
- if ((!$r) or ($sec))
- {
- // Look for [] chars round section headings
- if ((@substr($w,0,1)=="[") and (@substr($w,-1,1))=="]") {$sec=@substr($w,1,@strlen($w)-2);$newsec=1;}
- // Look for comments and number into array
- if ((stristr($comment_chars, $first_char) === FALSE)) {} else {$sec=$w;$k="Comment".$num_comments;$num_comments = $num_comments +1;$v=$w;$newsec=1;$r[$k]=$v;}
- //
- }
- if (!$newsec)
- {
- //
- // Look for the = char to allow us to split the section into key and value
- $w=@explode("=",$w);$k=@trim($w[0]);unset($w[0]); $v=@trim(@implode("=",$w));
- // look for the new lines
- if ((@substr($v,0,1)=="\"") and (@substr($v,-1,1)=="\"")) {$v=@substr($v,1,@strlen($v)-2);}
- if ($sec) {$r[$sec][$k]=$v;} else {$r[$k]=$v;}
- }
- }
- }
- return $r;
- }
- function getLevelName($level)
- {
- $levels = array(
- "Guest",
- "Noob",
- "Newbie",
- "New Player",
- "Beginner",
- "Novice",
- "Nice Player",
- "Good Player",
- "Great Player",
- "Criminal",
- "Killer",
- "Wanted",
- "Super Player",
- "Gangster",
- "Pro",
- "Super Pro",
- "Amazing Player",
- "Terminator",
- "Champion",
- "Genius",
- "Superman",
- "The Game",
- "Veteran",
- "Mega Man",
- "Ultra Man",
- "Crazy",
- "Evil",
- "Pro Gamer",
- "DeathMatch Pro",
- "Revenger",
- "Cheater",
- "Routine Cheater",
- "Scary!",
- "Incredible!",
- "Fantastic!",
- "MadMan",
- "PoisoN",
- "SmarT",
- "Hell",
- "ExtremE",
- "GTA Pro",
- "King",
- "H4ck3r",
- "Master",
- "Angel",
- "Pro",
- "Imp",
- "Devil",
- "Goddess",
- "GOD",
- "GOD of GOD");
- return $level >= 0 && $level <= 50 ? $levels[$level] : "Unknown";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement