Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- Include "config.php";
- if (!empty($_GET['id'])) {
- $_id = $_GET['id'];
- $link = mysql_connect($mysql_host, $mysql_user, $mysql_password)
- or die("Could not connect : " . mysql_error());
- mysql_query('SET NAMES utf8');
- mysql_select_db($my_database) or die("Could not select database");
- $msg = "SELECT * FROM e_users where vk_id = '$_id'";
- $result = mysql_query($msg) or die("Query failed : " . mysql_error());
- $line = mysql_fetch_array($result);
- $top9 = "SELECT vk_photo, vk_first_name, vk_last_name, experience FROM e_users ORDER BY experience DESC LIMIT 9";
- $result_top9 = mysql_query($top9) or die("Query failed : " . mysql_error());
- if (mysql_num_rows($result_top9) > 0)
- {
- $arr1 = array();
- $arr2 = array();
- $arr3 = array();
- $arr4 = array();
- while($fetch = mysql_fetch_assoc($result_top9))
- {
- $arr1[] = $fetch['vk_photo'];
- $arr2[] = $fetch['vk_first_name'];
- $arr3[] = $fetch['vk_last_name'];
- $arr4[] = $fetch['experience'];
- }
- $top_photo = implode(',', $arr1);
- $top_first_name = implode(',', $arr2);
- $top_last_name = implode(',', $arr3);
- $top_experience = implode(',', $arr4);
- }
- $vk_id = $line["vk_id"];
- $info_array = array(
- $line["vk_photo"],
- $line["vk_first_name"],
- $line["vk_last_name"],
- $line["experience"],
- $line["money"],
- $line["energy"]
- );
- $isWeapons = $line["weapons"];
- $info = implode(",",$info_array);
- if ($vk_id == $_id)
- {
- echo "[msg]"."1"."[/msg]";
- echo "[info]" . $info . "[/info]";
- echo "[isWeapons]" . $isWeapons . "[/isWeapons]";
- echo "[top_photo]" . $top_photo . "[/top_photo]";
- echo "[top_first_name]" . $top_first_name . "[/top_first_name]";
- echo "[top_last_name]" . $top_last_name . "[/top_last_name]";
- echo "[top_experience]" . $top_experience . "[/top_experience]";
- }else{
- echo "[msg]"."0"."[/msg]";
- }
- mysql_close($link);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement