Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- ob_start();
- $_SESSION['loads']++;
- if (!$_SESSION['playerid'] || $_SESSION['playerid'] <= '0') {
- header('location:login.php');
- }
- if ($_SESSION['playerid'] != 1) {
- ini_set('display_errors', 0);
- }
- $q_ry = "SELECT *
- FROM members
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ci = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- if ($ci['my_traveltime'] > time() && $_SERVER['SCRIPT_NAME'] != "/travelling.php" && $_SERVER['SCRIPT_NAME'] != "/netbook.php" || $ci['my_city'] > '0' && $_SERVER['SCRIPT_NAME'] != "/travelling.php" && $_SERVER['SCRIPT_NAME'] != "/netbook.php") {
- header('location:travelling.php');
- }
- if ($ci['force_off'] > '0') {
- session_unset();
- session_destroy();
- header("location:login.php");
- }
- if ($_SERVER['SCRIPT_NAME'] != "/city.php") {
- $_SESSION['refreshes'] = 0;
- }
- $q_ry = "SELECT fj_time
- FROM fed_jailed
- WHERE fj_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $injail = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (mysqli_num_rows($injail) && $_SERVER['SCRIPT_NAME'] != "/fedjail.php") {
- $fj = mysqli_fetch_array($injail);
- if (($fj['fj_time']) >= '0') {
- header('location:fedjail.php');
- exit();
- die();
- }
- }
- $auctions = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT a.*,i.item_name FROM auctions a LEFT JOIN items i ON a.item = i.item_id WHERE a.time < " . time());
- If (mysqli_num_rows($auctions)) {
- While ($a = mysqli_fetch_assoc($auctions)) {
- If ($a['bids'] > 0 && $a['bidder']) {
- $playername = mysqli_fetch_assoc(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT playername FROM members WHERE playerid = " . $a['bidder']));
- $playername = $playername['playername'];
- event_add($a['owner'], 'Your ' . $a['item_name'] . ' sold for $' . number_format($a['bid']) . ' with a total of ' . number_format($a['bids']) . ' bids. the winner was <a href="profile.php?XID=' . $a['bidder'] . '">' . $playername . '</a>.');
- event_add($a['bidder'], 'Congratulations, you won the bid on the ' . $a['item_name'] . ' for a total of $' . number_format($a['bid']) . '!');
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members SET wallet = wallet + " . $a['bid'] . " WHERE playerid = " . $a['owner']);
- $itm_check = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM members_items WHERE it_playerid = " . $a['bidder'] . " AND it_itemid = " . $a['item'] . " AND it_qty >= 1");
- If (mysqli_num_rows($itm_check) > 0) {
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members_items SET it_qty = it_qty + 1 WHERE it_playerid = " . $a['bidder'] . " AND it_itemid = " . $a['item'] . " AND it_qty >= 1");
- } else if(!mysqli_num_rows($itm_check)) {
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO members_items (it_ID, it_playerid, it_itemid, it_qty) VALUES ('', " . $a['bidder'] . ", " . $a['item'] . ", 1) ");
- }
- mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM auctions WHERE id = " . $a['id']);
- } else {
- event_add($a['owner'], 'Your ' . $a['item_name'] . ' received 0 bids and has been returned to your inventory.');
- $itm_check = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM members_items WHERE it_playerid = " . $a['owner'] . " AND it_itemid = " . $a['item'] . " AND it_qty >= 1");
- If (mysqli_num_rows($itm_check) > 0) {
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members_items SET it_qty = it_qty + 1 WHERE it_playerid = " . $a['owner'] . " AND it_itemid = " . $a['item'] . " AND it_qty >= 1");
- } else if (!mysqli_num_rows($itm_check)) {
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO members_items (it_ID, it_playerid, it_itemid, it_qty) VALUES ('', " . $a['owner'] . ", " . $a['item'] . ", 1) ");
- }
- mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM auctions WHERE id = " . $a['id']);
- }
- }
- }
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members SET my_life = my_maxlife, my_hosp = 60 WHERE playerid = 0 AND my_hosp > 60");
- mission_one_check();
- mission_two_check();
- function mission_one_check()
- {
- $active = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM active_missions WHERE am_playerid = " . $_SESSION['playerid'] . " AND am_mission = 1");
- if (mysqli_num_rows($active)) {
- $active = mysqli_fetch_assoc($active);
- $missone = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM game_missions WHERE m_id = 1");
- $missone = mysqli_fetch_array($missone);
- $time = $active['am_time'] - ($missone['m_timelimit'] * 60);
- if ($active['am_objective_1_done'] == 'no') {
- //objective 1
- $atk_log = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM attack_logs WHERE attacker = " . $_SESSION['playerid'] . " AND attacked = 23 AND time > $time AND attacklog NOT LIKE '%stalemated.%' AND attacklog NOT LIKE '% managed to run from %'");
- if (mysqli_num_rows($atk_log)) {
- $item_check = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM members_items WHERE it_playerid = " . $_SESSION['playerid'] . " AND it_itemid = 77");
- if (mysqli_num_rows($item_check)) {
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members_items SET it_qty = it_qty + 1 WHERE it_playerid = " . $_SESSION['playerid'] . " AND it_itemid = 77");
- } else {
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO members_items VALUES ('', " . $_SESSION['playerid'] . ", 77, 1)");
- }
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE active_missions SET am_objective_1_done = 'yes' WHERE am_playerid = " . $_SESSION['playerid'] . " AND am_mission = 1");
- event_add($_SESSION['playerid'], 'You stole the Samsung Digital Camera from Nigga[23] and completed the first step of Mission One!');
- }
- }
- if ($active['am_objective_2_done'] == 'no' AND $active['am_objective_1_done'] == 'yes') {
- //objective 2
- $user = mysqli_fetch_assoc(mysqli_query($GLOBALS["___mysqli_ston"], "SELECT playername FROM members WHERE playerid = " . $_SESSION['playerid']));
- $itmsend_log = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM member_logs WHERE l_type = 'itemxfer' AND l_playerid = " . $_SESSION['playerid'] . " AND l_text = '" . $user['playername'] . "[" . $_SESSION['playerid'] . "] sent a/an Samsung Digital Camera to Services[3].' AND l_time > $time");
- if (mysqli_num_rows($itmsend_log)) {
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE active_missions SET am_objective_2_done = 'yes' WHERE am_playerid = " . $_SESSION['playerid'] . " AND am_mission = 1");
- event_add($_SESSION['playerid'], 'You sent the Samsung Digital Camera to Services[3] and completed the second step of Mission One!');
- }
- }
- } else {
- mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM members_items WHERE it_playerid = " . $_SESSION['playerid'] . " AND it_itemid = 167");
- }
- }
- function mission_two_check()
- {
- $active = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM active_missions WHERE am_playerid = " . $_SESSION['playerid'] . " AND am_mission = 2");
- if (mysqli_num_rows($active)) {
- $active = mysqli_fetch_assoc($active);
- if ($active['am_objective_3_done'] == 'no') {
- $my_job = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT my_job FROM members_extra WHERE playerid = " . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")));
- if (mysqli_num_rows($my_job)) {
- $my_job = mysqli_fetch_array($my_job);
- //objective 3
- if ($my_job['my_job']) {
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE active_missions SET am_objective_3_done = 'yes' WHERE am_playerid = " . $_SESSION['playerid'] . " AND am_mission = 2");
- event_add($_SESSION['playerid'], 'You have a job and completed the third step of Mission Two!');
- }
- }
- }
- }
- }
- function new_token()
- {
- $_SESSION['token'] = md5(uniqid(rand(), TRUE));
- }
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members_extra SET my_crimeexp = '0' WHERE my_crimeexp < '0'");
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members
- SET my_life = my_maxlife,
- my_hosp = '0'
- WHERE my_hosp > '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], time()) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND am_i_staff = '0' ||
- my_hosp > '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], time()) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND playerid = '0'");
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members
- SET laston = '" . time() . "',
- last_hit_IP = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SERVER['REMOTE_ADDR']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'");
- function pageblock($page, $playerid)
- {
- $res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT setting,lastrun,started FROM survive_config WHERE setting = 'Active'");
- if (mysqli_num_rows($res)) {
- // check if user is in lockdown
- $user = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM lockdown_users WHERE user = '" . $playerid . "'");
- $ret = mysqli_fetch_array($user);
- $getpage = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT page_name FROM lockdown_pageblocks");
- while ($page = mysqli_fetch_array($getpage)) {
- // pages that are blocked during the lockdown
- if (($_SERVER['SCRIPT_NAME'] == $page['page_name']) && $ret['lockdown'] == 'Yes') {
- echo 'This page has been disabled during the Lockdown';
- exit;
- }
- }
- }
- }
- function errors_($err)
- {
- $error = array(
- 'user' => 'Invalid User!',
- 'qty' => 'Invalid quantity!',
- 'XID' => 'Invalid ID!',
- 'jail' => 'Sorry, This page cannot be accessed while in jail.',
- 'hosp' => 'Sorry, This page cannot be accessed while in hospital.',
- 'jailorhosp' => 'Sorry, This page cannot be accessed while in jail or hospital.',
- 'shop' => 'Looks like you have walked into a closed down shop!',
- 'action' => 'Invalid action.'
- );
- return $error[$err];
- }
- function page_access($jailtime, $hosptime)
- {
- $jailtime = abs(intval($jailtime));
- $hosptime = abs(intval($hosptime));
- if ($jailtime AND !$hosptime) {
- if ($jailtime > time())
- return FALSE;
- else
- return TRUE;
- } else if (!$jailtime AND $hosptime) {
- if ($hosptime > time())
- return FALSE;
- else
- return TRUE;
- } else if ($jailtime AND $hosptime) {
- if ($jailtime || $hosptime > time())
- return "FALSE";
- else
- return "TRUE";
- } else {
- return TRUE;
- }
- }
- function money_alter($mon)
- {
- if ($mon < 0) {
- return "<font color=#FF0000>\$" . number_format($mon) . "</font>";
- } else {
- return "\$" . number_format($mon) . "";
- }
- }
- function valid_form($lasturl, $ext)
- {
- $urltocheck = "http://www.reunited-city.com/" . ($ext) . ".php";
- if ($lasturl != $urltocheck)
- return FALSE;
- else
- return TRUE;
- }
- function check_qty($player, $item, $qty, $xid)
- {
- $player = abs(intval($player));
- $item = abs(intval($item));
- $qty = abs(intval($qty));
- $xid = abs(intval($xid));
- if ($xid == 0) {
- $cq = array();
- $q_ry = array();
- $q_ry = "SELECT * FROM members_items
- WHERE it_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND it_itemid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $item) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND it_qty >= '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $cq = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- } else {
- $cq = array();
- $q_ry = array();
- $q_ry = "SELECT * FROM members_items
- WHERE it_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND it_qty >= '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND it_ID = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $xid) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $cq = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- $cq = mysqli_num_rows($cq) ? mysqli_num_rows($cq) : '';
- if (!$cq) {
- return "FALSE";
- } else {
- return "TRUE";
- }
- }
- function mkglobal($vars)
- {
- if (!is_array($vars))
- $vars = explode(":", $vars);
- foreach ($vars as $v) {
- if (isset($_GET[$v]))
- $GLOBALS[$v] = ($_GET[$v]);
- elseif (isset($_POST[$v]))
- $GLOBALS[$v] = ($_POST[$v]);
- else
- return 0;
- }
- return 1;
- }
- function add_clips($player, $gun, $qty)
- {
- $player = abs(intval($player));
- $item = abs(intval($item));
- $qty = abs(intval($qty));
- $q_ry = array();
- $q_ry = "SELECT * FROM members_ammo
- WHERE ma_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND ma_gun = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $gun) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ic = array();
- $ic = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (mysqli_num_rows($ic)) {
- $p = array();
- $p = mysqli_fetch_array($ic);
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members_ammo
- SET ma_clips = ma_clips + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE ma_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $p['ma_id']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'");
- } else {
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO members_ammo
- VALUES ('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $gun) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '0')");
- }
- }
- function use_clips($player, $gun, $qty)
- {
- $player = abs(intval($player));
- $gun = abs(intval($gun));
- $q_ry = array();
- $q_ry = "SELECT ma_loaded
- FROM members_ammo
- WHERE ma_gun = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $gun) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND ma_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $per = array();
- $per = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $p = array();
- $p = mysqli_fetch_array($per);
- if ($p['ma_loaded'] <= $qty) {
- $q_ry = array();
- $q_ry = "UPDATE members_ammo
- SET ma_loaded = '0'
- WHERE ma_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND ma_gun = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $gun) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- } else {
- $q_ry = array();
- $q_ry = "UPDATE members_ammo
- SET ma_loaded = ma_loaded - '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE ma_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND ma_gun = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $gun) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- $q_ry = array();
- $q_ry = "DELETE FROM members_ammo
- WHERE ma_clips <= '0'
- AND ma_loaded <= '0'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- stock_remove(3, 1);
- }
- function reload_gun($player, $gun)
- {
- $player = abs(intval($player));
- $gun = abs(intval($gun));
- $q_ry = array();
- $q_ry = "SELECT a_perclip
- FROM ammo
- WHERE a_gun = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $gun) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $per = array();
- $per = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $p = array();
- $p = mysqli_fetch_array($per);
- $q_ry = array();
- $q_ry = "UPDATE members_ammo
- SET ma_loaded = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $p['a_perclip']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- ma_clips = ma_clips - '1'
- WHERE ma_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND ma_gun = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $gun) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $q_ry = array();
- $q_ry = "DELETE FROM members_ammo
- WHERE ma_clips <= '0'
- AND ma_loaded <= '0'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function i_credit($player, $item, $qty)
- {
- $player = abs(intval($player));
- $item = abs(intval($item));
- $qty = abs(intval($qty));
- $ic = array();
- $q_ry = array();
- $p = array();
- $q_ry = "SELECT * FROM members_items
- WHERE it_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND it_itemid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $item) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ic = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (mysqli_num_rows($ic)) {
- $p = mysqli_fetch_array($ic);
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members_items
- SET it_qty = it_qty + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE it_ID = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $p['it_ID']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'");
- } else {
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO members_items
- VALUES ('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $item) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "')");
- }
- $miss_two = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM active_missions WHERE am_playerid = " . $_SESSION['playerid'] . " AND am_mission = 2");
- if (mysqli_num_rows($miss_two)) {
- $miss_two = mysqli_fetch_assoc($miss_two);
- if ($miss_two['am_objective_2_done'] == 'no') {
- $itm_class = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT item_class FROM items WHERE item_id = " . $item);
- if (mysqli_num_rows($itm_class)) {
- $itm_class = mysqli_fetch_assoc($itm_class);
- if ($itm_class['item_class'] == 1 || $itm_class['item_class'] == 2 || $itm_class['item_class'] == 3 || $itm_class['item_class'] == 4) {
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE active_missions SET am_objective_2_done = 'yes' WHERE am_playerid = " . $_SESSION['playerid'] . " AND am_mission = 2");
- event_add($_SESSION['playerid'], 'You have bought a weapon and completed the second step of Mission Two!');
- }
- }
- }
- }
- }
- function i_remove($player, $item, $qty)
- {
- $player = abs(intval($player));
- $item = abs(intval($item));
- $qty = abs(intval($qty));
- $ir = array();
- $q_ry = array();
- $p = array();
- $q_ry = "SELECT * FROM members_items
- WHERE it_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND it_itemid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $item) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND it_qty > '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ir = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (mysqli_num_rows($ir)) {
- $p = mysqli_fetch_array($ir);
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE members_items
- SET it_qty = it_qty - '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE it_ID = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $p['it_ID']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'");
- } else {
- mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM members_items
- WHERE it_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND it_itemid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $item) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'");
- }
- }
- function i_fac_add($faction, $item, $qty)
- {
- $faction = abs(intval($faction));
- $item = abs(intval($item));
- $qty = abs(intval($qty));
- $ir = array();
- $q_ry = array();
- $p = array();
- $q_ry = "SELECT * FROM faction_armouries
- WHERE fa_fac = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $faction) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND fa_item = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $item) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ir = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (mysqli_num_rows($ir)) {
- $p = mysqli_fetch_array($ir);
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE faction_armouries
- SET fa_qty = fa_qty + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE fa_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $p['fa_id']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'");
- } else {
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO faction_armouries
- VALUES ('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $faction) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $item) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "')");
- }
- }
- function i_fac_remove($faction, $item, $qty)
- {
- $faction = abs(intval($faction));
- $item = abs(intval($item));
- $qty = abs(intval($qty));
- $ir = array();
- $q_ry = array();
- $p = array();
- $q_ry = "SELECT * FROM faction_armouries
- WHERE fa_fac = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $faction) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND fa_item = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $item) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND fa_qty > '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ir = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (mysqli_num_rows($ir)) {
- $p = mysqli_fetch_array($ir);
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE faction_armouries
- SET fa_qty = fa_qty - '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $qty) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE fa_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $p['fa_id']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'");
- } else {
- mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM faction_armouries
- WHERE fa_fac = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $faction) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND fa_item = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $item) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'");
- }
- }
- function add_fac_lend($faction, $item, $user)
- {
- $faction = abs(intval($faction));
- $item = abs(intval($item));
- $user = abs(intval($user));
- $q_ry = array();
- $q_ry = "INSERT INTO faction_lends
- VALUES ('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $faction) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $item) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $user) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- unix_timestamp(),
- '0')";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function remove_fac_lend($id)
- {
- $id = abs(intval($id));
- $q_ry = array();
- $q_ry = "SELECT fl_itemid,fl_playerid,fl_equipped
- FROM faction_lends
- WHERE fl_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $lend_stat = array();
- $lend_stat = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $ls = array();
- $ls = mysqli_fetch_array($lend_stat);
- if ($ls['fl_equipped'] != '0') {
- $q_ry = array();
- $q_ry = "SELECT item_class
- FROM items
- WHERE item_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $ls['fl_itemid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $i_claass = array();
- $i_class = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- $type = array(
- 1 => 'melee',
- 2 => 'secondary',
- 3 => 'primary',
- 5 => 'armour'
- );
- $q_ry = array();
- $q_ry = "UPDATE member_equipped
- SET " . $type[$i_class['item_class']] . " = '0'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $ls['fl_playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $q_ry = array();
- $q_ry = "DELETE FROM faction_lends
- WHERE fl_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- } else {
- $q_ry = array();
- $q_ry = "DELETE FROM faction_lends
- WHERE fl_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- }
- function valid_XID($xid)
- {
- $xid = abs(intval($xid));
- $xid = (isset($xid) ? $xid : '');
- if (!$xid) {
- return FALSE;
- } else {
- return TRUE;
- }
- }
- function valid_PID($pid)
- {
- $pid = abs(intval($pid));
- $pid = (isset($pid) ? $pid : '');
- if (!$pid) {
- return FALSE;
- } else {
- return TRUE;
- }
- }
- function in_event($player, $text)
- {
- $player = abs(intval($player));
- $text = stripslashes($text);
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO member_events
- VALUES('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $text) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- unix_timestamp(),
- '0')");
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE city_statistic
- SET cs_value = cs_value + '1'
- WHERE cs_id = '1'");
- }
- function event_add($player, $text)
- {
- $player = abs(intval($player));
- $text = stripslashes($text);
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO member_events VALUES('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $text) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- unix_timestamp(),
- '0')");
- mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE city_statistic
- SET cs_value = cs_value + '1'
- WHERE cs_id = '1'");
- }
- function in_notif($player, $text)
- {
- $player = abs(intval($player));
- $text = stripslashes($text);
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO member_notifs
- VALUES('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $text) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- unix_timestamp(),
- '0')");
- }
- function fac_event($faction, $text)
- {
- $faction = abs(intval($faction));
- $text = stripslashes($text);
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO faction_events
- VALUES('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $faction) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $text) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- unix_timestamp())");
- }
- function org_log($faction, $text, $gain, $cash, $stat)
- {
- $faction = abs(intval($faction));
- $text = stripslashes($text);
- $gain = abs(intval($gain));
- $cash = abs(intval($cash));
- $stat = stripslashes($stat);
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO org_logs
- VALUES('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $faction) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $text) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $gain) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $cash) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $stat) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- unix_timestamp())");
- }
- function user_name($player)
- {
- $player = abs(intval($player));
- $ch = array();
- $q_ry = array();
- $q_ry = "SELECT playername,my_dondays,am_i_staff
- FROM members
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ch = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (!mysqli_num_rows($ch)) {
- $name = "None";
- } else {
- $c = mysqli_fetch_array($ch);
- if ($c['my_dondays']) {
- $name = "<font color = 'blue'><b>" . htmlentities($c['playername']) . "</b></font>[" . $player . "]";
- } else {
- if ($c['am_i_staff'] < 2) {
- $name .= htmlentities($c['playername']) . "</a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 2) {
- $name .= "<b><font color=#660099>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 3) {
- $name .= "<b><font color=#0085A3>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 4) {
- $name .= "<b><font color=#006633>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 5) {
- $name .= "<b><font color=#AA0000>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- }
- }
- }
- return $name;
- }
- function user_name_icons($player)
- {
- $player = abs(intval($player));
- $ch = array();
- $q_ry = array();
- $q_ry = "SELECT playername,my_dondays,vipday,my_jail,my_hosp,my_gender,am_i_staff
- FROM members
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ch = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (!mysqli_num_rows($ch)) {
- $name = "None";
- } else {
- $name = "<a href='profile.php?XID=" . $player . "'>";
- $c = mysqli_fetch_array($ch);
- if ($c['my_dondays'] && $c['am_i_staff'] < 2) {
- $name .= "<font color = 'blue'><b>" . htmlentities($c['playername']) . "</b></font></a>[" . $player . "]";
- } else {
- if ($c['am_i_staff'] < 2) {
- $name .= htmlentities($c['playername']) . "</a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 2) {
- $name .= "<b><font color=#660099>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 3) {
- $name .= "<b><font color=#0085A3>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 4) {
- $name .= "<b><font color=#006633>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 5) {
- $name .= "<b><font color=#AA0000>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- }
- }
- $name .= "<img src='images/" . $c['my_gender'] . ".gif' border = '0'>";
- if ($c['my_dondays']) {
- $name .= "<img src = 'images/donator.gif' border = '0'>";
- }
- if ($c['vipday']) {
- $name .= "<img src = 'images/vip.jpg' border = '0'>";
- }
- if ($c['my_jail'] > time()) {
- $name .= "<img src = 'images/jail.png' border = '0'>";
- }
- if ($c['my_hosp'] > time()) {
- $name .= "<img src = 'images/hospital.png' border = '0'>";
- }
- }
- return $name;
- }
- function user_name_id($player)
- {
- $player = abs(intval($player));
- $ch = array();
- $q_ry = array();
- $q_ry = "SELECT playername,my_dondays,vipday,my_jail,my_hosp,my_gender,am_i_staff
- FROM members
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ch = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (!mysqli_num_rows($ch)) {
- $name = "None";
- } else {
- $name = "<a href='profile.php?XID=" . $player . "'>";
- $c = mysqli_fetch_array($ch);
- if ($c['my_dondays'] && $c['am_i_staff'] < 2) {
- $name .= "<font color = 'blue'><b>" . htmlentities($c['playername']) . "</b></font></a>[" . $player . "]";
- } else {
- if ($c['am_i_staff'] < 2) {
- $name .= htmlentities($c['playername']) . "</a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 2) {
- $name .= "<b><font color=#660099>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 3) {
- $name .= "<b><font color=#0085A3>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 4) {
- $name .= "<b><font color=#006633>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- } else if ($c['am_i_staff'] == 5) {
- $name .= "<b><font color=#AA0000>" . htmlentities($c['playername']) . "</font></b></a>[" . $player . "]";
- }
- }
- }
- return $name;
- }
- function getdogname($dog)
- {
- $dog = abs(intval($dog));
- $ch = array();
- $q_ry = array();
- $q_ry = "SELECT md_name
- FROM members_dogs
- WHERE md_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $dog) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ch = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (!mysqli_num_rows($ch)) {
- return "None";
- } else {
- $c = mysqli_fetch_array($ch);
- return htmlentities($c['md_name']);
- }
- }
- function getdogwins($dog)
- {
- $dog = abs(intval($dog));
- $ch = array();
- $q_ry = array();
- $q_ry = "SELECT md_raceswon
- FROM members_dogs
- WHERE md_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $dog) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ch = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (!mysqli_num_rows($ch)) {
- return "None";
- } else {
- $c = mysqli_fetch_array($ch);
- return number_format($c['md_raceswon']);
- }
- }
- function check_player($player)
- {
- $player = abs(intval($player));
- $ch = array();
- $q_ry = array();
- $q_ry = "SELECT playerid
- FROM members
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $ch = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (!mysqli_num_rows($ch)) {
- return FALSE;
- } else {
- return TRUE;
- }
- }
- function exp_level($lev)
- {
- $need = (($lev+1)*($lev+1)*($lev+1)*3);
- return $need;
- }
- function check_rank($myrank, $totexp, $player)
- {
- $totexp = abs(intval($totexp));
- for ($i = 2; $i <= 30; $i++) {
- if ($i == 2) {
- if ($totexp >= 300) {
- if ($i > $myrank) {
- $q_ry = array();
- $q_ry = "UPDATE members
- SET my_rank = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $i) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- in_event($player, 'Congratulations, You have ranked up to rank ' . $i . '!');
- }
- }
- } else {
- if ($totexp >= (($i * 200) * $i * $i)) {
- if ($i > $myrank) {
- $q_ry = array();
- $q_ry = "UPDATE members
- SET my_rank = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $i) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- in_event($player, 'Congratulations, You have ranked up to rank ' . $i . '!');
- }
- }
- }
- }
- }
- function check_graft_bar($crimeexp, $curgraft, $player)
- {
- $crimeexp = abs(intval($crimeexp));
- $curgraft = abs(intval($curgraft));
- $newgraft = 10;
- $poss = array(
- 1 => 2500,
- 2 => 12500,
- 3 => 75000,
- 4 => 200000,
- 5 => 500000,
- 6 => 1750000
- );
- $calc = array(
- 2500 => 15,
- 12500 => 20,
- 75000 => 25,
- 200000 => 30,
- 500000 => 35,
- 1750000 => 40
- );
- for ($i = 1; $i <= 6; $i++) {
- if ($crimeexp >= $poss[$i]) {
- $newgraft = $calc[$poss[$i]];
- } else {
- $newgraft = $newgraft;
- }
- }
- $q_ry = array();
- $q_ry = "SELECT ms_times
- FROM member_merit_spent
- WHERE ms_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND ms_tier = '1'";
- $graftgrade = array();
- $graftgrade = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (mysqli_num_rows($graftgrade)) {
- $gg = array();
- $gg = mysqli_fetch_array($graftgrade);
- $newgraft += $gg['ms_times'];
- }
- if ($newgraft != $curgraft) {
- $q_ry = array();
- $q_ry = "UPDATE members
- SET my_maxnerve = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $newgraft) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- }
- function getgmt() {
- return date("Y-m-d H:i:s");
- }
- function gmtime() {
- return strtotime(getgmt());
- }
- function sqltounix($s) {
- return mktime(substr($s, 11, 2), substr($s, 14, 2), substr($s, 17, 2), substr($s, 5, 2),
- substr($s, 8, 2), substr($s, 0, 4));
- }
- function gettimeleft($tl) {
- if($tl <= time()) { $release = "0 Seconds"; }
- else
- {
- $mins = floor(($tl - time()) / 60);
- $hours = floor($mins / 60);
- $mins -= $hours * 60;
- $days = floor($hours / 24);
- $hours -= $days * 24;
- $months = floor($days / 31);
- $days -= $months * 31;
- $weeks = floor($days / 7);
- $days -= $weeks * 7;
- $timeleft = ($tl - time());
- $secs = round($timeleft%60);
- if ($months > 0)//MONTHS
- {
- $release .= " $months Month" . ($months > 1 ? "s" : "");
- }
- if ($weeks > 0)//WEEKS
- {
- if ($months > 0)
- {
- $release .= ",";
- }
- $release .= " $weeks Week" . ($weeks > 1 ? "s" : "");
- }
- if ($days > 0)//DAYS
- {
- if ($months > 0 ||$weeks > 0)
- {
- $release .= ",";
- }
- $release .= " $days Day" . ($days > 1 ? "s" : "");
- }
- if ($hours > 0)//HOURS
- {
- if ($months > 0 ||$weeks > 0 || $days > 0)
- {
- $release .= ",";
- }
- $release .= " $hours Hour" . ($hours > 1 ? "s" : "");
- }
- if ($mins > 0)//MINUTES
- {
- if ($months > 0 ||$weeks > 0 || $days > 0 || $hours > 0)
- {
- $release .= ",";
- }
- $release .= " $mins Minute" . ($mins > 1 ? "s" : "");
- }
- if($secs > 0)//SECONDS
- {
- if($release != "")
- {
- $release .= " and";
- }
- $release .= " $secs Second" . ($secs > 1 ? "s" : "");
- }
- }
- return $release;
- }
- function end_war($att, $def)
- {
- $att = abs(intval($att));
- $def = abs(intval($def));
- $q_ry = array();
- $q_ry = "SELECT *
- FROM faction_wars
- WHERE war_attacker = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $att) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "' &&
- war_defender = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $def) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "' ||
- war_attacker = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $def) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "' &&
- war_defender = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $att) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $in_war = array();
- $in_war = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- $q_ry = array();
- $q_ry = "SELECT fac_name
- FROM faction_s
- WHERE fac_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $att) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $attackers = array();
- $attackers = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- $q_ry = array();
- $q_ry = "SELECT fac_name
- FROM faction_s
- WHERE fac_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $def) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $defenders = array();
- $defenders = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- if ($in_war['war_amade'] > $in_war['war_dmade']) {
- $message = "<font color = 'green'>The war between you and " . htmlentities($defenders['fac_name']) . " has now ended, You won!</font>";
- fac_event($att, $message);
- $message = "<font color = 'red'>The war between you and " . htmlentities($attackers['fac_name']) . " has now ended, You lost!</font>";
- fac_event($def, $message);
- } else {
- $message = "<font color = 'red'>The war between you and " . htmlentities($defenders['fac_name']) . " has now ended, You lost!</font>";
- fac_event($att, $message);
- $message = "<font color = 'green'>The war between you and " . htmlentities($attackers['fac_name']) . " has now ended, You won!</font>";
- fac_event($def, $message);
- }
- $q_ry = array();
- $q_ry = "DELETE FROM faction_wars
- WHERE war_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $in_war['war_id']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- add_pact($att, $def);
- }
- function end_war_time($att, $def, $id)
- {
- $att = abs(intval($att));
- $def = abs(intval($def));
- $id = abs(intval($id));
- $q_ry = array();
- $q_ry = "SELECT fac_name
- FROM faction_s
- WHERE fac_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $att) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $attackers = array();
- $attackers = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- $q_ry = array();
- $q_ry = "SELECT fac_name
- FROM faction_s
- WHERE fac_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $def) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $defenders = array();
- $defenders = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- $message = "The war between you and " . htmlentities($defenders['fac_name']) . " has now ended, Nobody won!";
- fac_event($att, $message);
- $message = "The war between you and " . htmlentities($attackers['fac_name']) . " has now ended, Nobody won!";
- fac_event($def, $message);
- $q_ry = array();
- $q_ry = "DELETE FROM faction_wars
- WHERE war_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function start_war($att, $def)
- {
- $att = abs(intval($att));
- $def = abs(intval($def));
- $q_ry = array();
- $q_ry = "INSERT INTO faction_wars (war_attacker,war_defender,war_time)
- VALUES ('" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $att) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $def) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], time() + 604800) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "')";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function add_pact($att, $def)
- {
- $att = abs(intval($att));
- $def = abs(intval($def));
- $q_ry = array();
- $q_ry = "INSERT INTO none_agressive (na_faction,na_pactwith,na_days)
- VALUES ('" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $att) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $def) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '50')";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function p_stats_add($field, $amount, $player)
- {
- $amount = abs(intval($amount));
- $player = abs(intval($player));
- $fld = array(
- 'attack_lost' => 'my_attlost',
- 'attack_won' => 'my_attwon',
- 'myattack_comp' => 'attack_comp',
- 'stale' => 'my_attstale',
- 'i_run' => 'my_timesran',
- 'i_defend' => 'my_defwon',
- 'i_dont_defend' => 'my_deflost',
- 'they_ran' => 'my_theyran',
- 'def_stale' => 'my_defstale',
- 'streak' => 'my_currstreak',
- 'i_hit' => 'my_hits',
- 'i_missed' => 'my_misses',
- 'one_hit' => 'my_onehitkill',
- 'fired' => 'my_rounds',
- 'mugged' => 'my_muggain',
- 'damage' => 'my_totaldamage',
- 'respect' => 'my_respectgain',
- 'high_level' => 'my_bestlevel',
- 'itemarket' => 'my_ifrommarket',
- 'bars_bought' => 'my_pointsbought',
- 'bars_sold' => 'my_pointssold',
- 'gunsrfun' => 'my_igunshop',
- 'send_item' => 'my_isent',
- 'trades' => 'my_trades',
- 'bailed' => 'my_timesbailed',
- 'spent_bail' => 'my_bailfees',
- 'busted' => 'my_timesbusted',
- 'failed_bust' => 'my_failedbusts',
- 'jailed' => 'my_timesjailed',
- 'medical' => 'my_medsused',
- 'mail' => 'my_mailsent',
- 'mail_spouse' => 'my_mailspouse',
- 'mail_faction' => 'my_mailfaction',
- 'mail_comp' => 'my_mailcolleage',
- 'merits_bought' => 'my_meritsbought',
- 'refills' => 'my_refills',
- 'trained' => 'my_trains',
- 'r_recieved' => 'my_beenrevived',
- 'r_revived' => 'my_revived',
- 'b_placed' => 'my_bounties',
- 'b_spent' => 'my_bountyspent',
- 'b_collect' => 'my_collected',
- 'b_rewarded' => 'my_rewarded',
- 'b_recieved' => 'my_bountyrecieved',
- 'personal' => 'my_personals',
- 'classified' => 'my_classified',
- 'mail_friend' => 'my_mailfriend',
- 'auctionadd' => 'my_iauctioned',
- 'auctionwon' => 'my_auctionwon',
- 'i_found' => 'my_ifound',
- 'crit_hits' => 'my_crithits',
- 'tot_invest' => 'my_totinvested',
- 'tot_profit' => 'my_totprofit',
- 'enhancers' => 'my_statenhance',
- 'druguse' => 'my_drugsused',
- 'overdose' => 'my_overdoses',
- 'viruses' => 'my_viruses',
- 'stealth' => 'my_stealths',
- 'timesabroad' => 'my_traveled'
- );
- if ($fld[$field] == 'my_mailsent') {
- $q_ry = array();
- $q_ry = "UPDATE city_statistic
- SET cs_value = (cs_value + '1')
- WHERE cs_id = '2'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- if ($fld[$field] == 'my_currstreak') {
- $q_ry = array();
- $q_ry = "SELECT my_currstreak,my_beststreak
- FROM members_personal
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $my_best = array();
- $my_best = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- if ($my_best['my_beststreak'] <= ($my_best['my_currstreak'] + 1)) {
- $q_ry = array();
- $q_ry = "UPDATE members_personal
- SET my_beststreak = (my_currstreak + '1')
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- }
- if ($fld[$field] == 'my_totaldamage') {
- $q_ry = array();
- $q_ry = "SELECT my_bestdamage
- FROM members_personal
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $my_best = array();
- $my_best = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- if ($my_best['my_bestdamage'] <= $amount) {
- $q_ry = array();
- $q_ry = "UPDATE members_personal
- SET my_bestdamage = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $amount) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- }
- if ($fld[$field] == 'my_bestlevel') {
- $q_ry = array();
- $q_ry = "SELECT my_bestlevel
- FROM members_personal
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $my_best = array();
- $my_best = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- if ($my_best['my_bestlevel'] <= $amount) {
- $q_ry = array();
- $q_ry = "UPDATE members_personal
- SET my_bestlevel = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $amount) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- } else {
- $q_ry = array();
- $q_ry = "UPDATE members_personal
- SET " . $fld[$field] . " = " . $fld[$field] . " + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $amount) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- }
- function reset_streak($player)
- {
- $q_ry = array();
- $q_ry = "UPDATE members_personal
- SET my_currstreak = '0'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function check_bounty($player, $target)
- {
- $q_ry = array();
- $q_ry = "SELECT *
- FROM active_claims
- WHERE c_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND c_target = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $target) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $check = array();
- $check = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (mysqli_num_rows($check)) {
- $c = array();
- $c = mysqli_fetch_array($check);
- $q_ry = array();
- $q_ry = "SELECT m.playername,b.*
- FROM members m
- LEFT JOIN bounties_placed b
- ON b.b_target = m.playerid
- WHERE b.b_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $c['c_claiming']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $the_bounty = array();
- $the_bounty = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $outcome = '';
- if (!mysqli_num_rows($the_bounty)) {
- $outcome = "Sorry but it looks like the bounty you was tryin to claim has already been taken by someone else.";
- } else {
- $tb = array();
- $tb = mysqli_fetch_array($the_bounty);
- $outcome = "You have claimed the bounty that was on " . htmlentities($tb['playername']) . "'s head,
- You have recieved " . money_alter($tb['b_reward']) . "!";
- $q_ry = array();
- $q_ry = "UPDATE members
- SET wallet = wallet + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $tb['b_reward']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- p_stats_add('b_collect', 1, $_SESSION['playerid']);
- p_stats_add('b_rewarded', $tb['b_reward'], $_SESSION['playerid']);
- $q_ry = array();
- $q_ry = "SELECT playername
- FROM members
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $claimer = array();
- $claimer = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- $message = "<a href='profile.php?XID=" . $_SESSION['playerid'] . "'>" . htmlentities($claimer['playername']) . "</a>
- claimed the bounty that was on " . htmlentities($tb['playername']) . "'s head,
- They have recieved the " . money_alter($tb['b_reward']) . " reward!";
- in_event($tb['b_playerid'], $message);
- }
- $q_ry = array();
- $q_ry = "DELETE FROM active_claims
- WHERE c_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $c['c_id']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $q_ry = array();
- $q_ry = "DELETE FROM bounties_placed
- WHERE b_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $c['c_claiming']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- return $outcome;
- } else {
- return "";
- }
- }
- function stock_credit($id, $credit)
- {
- $q_ry = array();
- $q_ry = "UPDATE stock_market
- SET s_profit = s_profit + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $credit) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE s_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function stock_remove($id, $credit)
- {
- $q_ry = array();
- $q_ry = "UPDATE stock_market
- SET s_losses = s_losses + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $credit) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE s_id = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry) or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
- }
- function send_recieve_log($type, $player, $playerip, $reciever, $text)
- {
- $text = trim($text);
- $q_ry = array();
- $q_ry = "SELECT last_hit_IP
- FROM members
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $reciever) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $recieverip = array();
- $recieverip = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- $q_ry = array();
- $q_ry = "INSERT INTO member_logs
- VALUES ('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $type) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $reciever) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $playerip) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $recieverip['last_hit_IP']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $text) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- unix_timestamp())";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function other_log($type, $player, $playerip, $text)
- {
- $text = trim($text);
- $q_ry = array();
- $q_ry = "INSERT INTO member_logs (l_type,l_playerid,l_IP,l_text,l_time)
- VALUES ('" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $type) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $player) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $playerip) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $text) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- unix_timestamp())";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function vault_add($amount, $id)
- {
- $q_ry = array();
- $q_ry = "SELECT v_id
- FROM member_vaults
- WHERE v_property = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $thivault = array();
- $thivault = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (mysqli_num_rows($thivault)) {
- $q_ry = array();
- $q_ry = "UPDATE member_vaults
- SET v_amount = v_amount + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $amount) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE v_property = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $q_ry = array();
- $q_ry = "UPDATE members
- SET wallet = wallet - '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $amount) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- } else {
- $q_ry = array();
- $q_ry = "INSERT INTO member_vaults
- VALUES('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $amount) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "')";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $q_ry = array();
- $q_ry = "UPDATE members
- SET wallet = wallet - '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $amount) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- }
- function vault_remove($amount, $id)
- {
- $q_ry = array();
- $q_ry = "UPDATE member_vaults
- SET v_amount = v_amount - '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $amount) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE v_property = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $q_ry = array();
- $q_ry = "UPDATE members
- SET wallet = wallet + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $amount) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $q_ry = array();
- $q_ry = "DELETE FROM member_vaults
- WHERE v_amount <= '0'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function new_effect($time, $effect, $drugid, $addiction)
- {
- $q_ry = "DELETE FROM member_influences
- WHERE mi_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $q_ry = "INSERT INTO member_influences
- VALUES('NULL',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $time) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $effect) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "',
- '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $drugid) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "')";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $q_ry = "UPDATE members_extra
- SET my_drugadd = my_drugadd + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $addiction) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- p_stats_add('druguse', 1, $_SESSION['playerid']);
- }
- function fhc($time)
- {
- $q_ry = "UPDATE members
- SET fhc = 0
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- $q_ry = "UPDATE members
- SET fhc = fhc + '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $time) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_SESSION['playerid']) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- }
- function profile_image($id, $width)
- {
- $q_ry = array();
- $q_ry = "SELECT i_image
- FROM member_images
- WHERE i_playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'
- AND i_profile = '1'";
- $im = array();
- $im = mysqli_query($GLOBALS["___mysqli_ston"], $q_ry);
- if (!mysqli_num_rows($im)) {
- return "<a href=profile.php?XID=" . $id . "><img src='images/blank_man.jpg' alt = 'No images' title = 'No images' width = '" . $width . "px' border = '0'></a>";
- } else {
- $mi = array();
- $mi = mysqli_fetch_array($im);
- $imgcheck = array();
- $imgcheck = "images/uploads/id" . $id . "/" . $mi['i_image'] . "";
- $size = array();
- $size = getimagesize($imgcheck);
- if ($size) {
- $q_ry = array();
- $q_ry = "SELECT playername,my_level,my_gender
- FROM members
- WHERE playerid = '" . ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $id) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : "")) . "'";
- $myi = array();
- $myi = mysqli_fetch_array(mysqli_query($GLOBALS["___mysqli_ston"], $q_ry));
- return "<a href=profile.php?XID=" . $id . " rel = 'tooltip' title = '<b>User image</b><br/><img src = \"" . $imgcheck . "\" width = \"100px\" border = \"0\"><br/>User image for " . htmlentities($myi['playername']) . "[" . $id . "]<br/>Level: " . $myi['my_level'] . "<br/>Gender: " . $myi['my_gender'] . "'>
- <img src = '" . $imgcheck . "' width = '" . $width . "px' border = '0'></a>";
- } else {
- // error
- return "<font color = 'red'><br/><b>Image error</b><br/></font>.";
- }
- }
- }
- function ae_detect_ie()
- {
- if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
- return true;
- else
- return false;
- }
- function back()
- {
- return "<hr width='75%'>><a href='javascript:history.back();'>Back</a><hr width='75%'>";
- }
- function round_table($size)
- {
- if ($size) {
- $size = "width = '" . ($size + 4) . "px'";
- } else {
- $size = '';
- }
- $content = "<table cellspacing = '0' cellpadding = '0' border = '0' " . $size . ">
- <tr>
- <td style = 'background: url(images/round-table/topleft.png) no-repeat left top;' width = '14px' height = '14px'></td>
- <td style = 'background: url(images/round-table/top.png) repeat-x center top;' height = '14px'></td>
- <td style = 'background: url(images/round-table/topright.png) no-repeat right top;' width = '14px' height = '14px'></td>
- </tr>
- <tr>
- <td style = 'background: url(images/round-table/left.png) repeat-y left top;' width = '14px'></td>
- <td align = 'center'>";
- return $content;
- }
- function end_round()
- {
- $content = "</td>
- <td style = 'background: url(images/round-table/right.png) repeat-y right top;' width = '14px'></td>
- </tr>
- <tr>
- <td style = 'background: url(images/round-table/bottomleft.png) no-repeat left bottom;' width = '14px' height = '14px'></td>
- <td style = 'background: url(images/round-table/bottom.png) repeat-x center bottom;' height = '14px'></td>
- <td style = 'background: url(images/round-table/bottomright.png) no-repeat right bottom;' width = '14px' height = '14px'></td>
- </tr>
- </table>";
- return $content;
- }
- function round_table1($size)
- {
- if ($size) {
- $size = "width = '" . ($size + 4) . "px'";
- } else {
- $size = '';
- }
- $content = "<table cellspacing = '0' cellpadding = '0' border = '0' " . $size . ">
- <tr>
- <td style = 'background: url(images/round-table/topleft.png) no-repeat left top;' width = '14px' height = '14px'></td>
- <td style = 'background: url(images/round-table/top.png) repeat-x center top;' height = '14px'></td>
- <td style = 'background: url(images/round-table/topright.png) no-repeat right top;' width = '14px' height = '14px'></td>
- </tr>
- <tr>
- <td style = 'background: url(images/round-table/left.png) repeat-y left top;' width = '14px'></td>
- <td align = 'left'>";
- return $content;
- }
- function end_round1()
- {
- $content = "</td>
- <td style = 'background: url(images/round-table/right.png) repeat-y right top;' width = '14px'></td>
- </tr>
- <tr>
- <td style = 'background: url(images/round-table/bottomleft.png) no-repeat left bottom;' width = '14px' height = '14px'></td>
- <td style = 'background: url(images/round-table/bottom.png) repeat-x center bottom;' height = '14px'></td>
- <td style = 'background: url(images/round-table/bottomright.png) no-repeat right bottom;' width = '14px' height = '14px'></td>
- </tr>
- </table>";
- return $content;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement