Raven1992 Posted March 5, 2015 Posted March 5, 2015 Hi All i having problems installing [MENTION=52003]Dave Macaulay[/MENTION] mods and it asking me to find somethingin globals.php but when i skim through it i got nothing showing in order to put it any one want to help on this my globals.php <?php /** * MCCodes Version 2.0.5b * Copyright (C) 2005-2012 Dabomstew * All rights reserved. * * Redistribution of this code in any form is prohibited, except in * the specific cases set out in the MCCodes Customer License. * * This code license may be used to run one (1) game. * A game is defined as the set of users and other game database data, * so you are permitted to create alternative clients for your game. * * If you did not obtain this code from MCCodes.com, you are in all likelihood * using it illegally. Please contact MCCodes to discuss licensing options * in this case. * * File: globals.php * Signature: 7b716433581858a154d2ae09ab90f269 * Date: Fri, 20 Apr 12 08:50:30 +0000 */ if (strpos($_SERVER['PHP_SELF'], "globals.php") !== false) { exit; } session_name('MCCSID'); session_start(); if (!isset($_SESSION['started'])) { session_regenerate_id(); $_SESSION['started'] = true; } ob_start(); if (function_exists("get_magic_quotes_gpc") == false) { function get_magic_quotes_gpc() { return 0; } } if (get_magic_quotes_gpc() == 0) { foreach ($_POST as $k => $v) { $_POST[$k] = addslashes($v); } foreach ($_GET as $k => $v) { $_GET[$k] = addslashes($v); } } require "lib/basic_error_handler.php"; set_error_handler('error_php'); require "global_func.php"; $domain = determine_game_urlbase(); if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] == 0) { $login_url = "http://{$domain}/login.php"; header("Location: {$login_url}"); exit; } $userid = isset($_SESSION['userid']) ? $_SESSION['userid'] : 0; require "header.php"; include "config.php"; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db = new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c = $db->connection_id; $set = array(); $settq = $db->query("SELECT * FROM `settings`"); while ($r = $db->fetch_row($settq)) { $set[$r['conf_name']] = $r['conf_value']; } global $jobquery, $housequery; if (isset($jobquery) && $jobquery) { $is = $db->query( "SELECT `u`.*, `us`.*, `j`.*, `jr`.* FROM `users` AS `u` INNER JOIN `userstats` AS `us` ON `u`.`userid`=`us`.`userid` LEFT JOIN `jobs` AS `j` ON `j`.`jID` = `u`.`job` LEFT JOIN `jobranks` AS `jr` ON `jr`.`jrID` = `u`.`jobrank` WHERE `u`.`userid` = {$userid} LIMIT 1"); } else if (isset($housequery) && $housequery) { $is = $db->query( "SELECT `u`.*, `us`.*, `h`.* FROM `users` AS `u` INNER JOIN `userstats` AS `us` ON `u`.`userid`=`us`.`userid` LEFT JOIN `houses` AS `h` ON `h`.`hWILL` = `u`.`maxwill` WHERE `u`.`userid` = {$userid} LIMIT 1"); } else { $is = $db->query( "SELECT `u`.*, `us`.* FROM `users` AS `u` INNER JOIN `userstats` AS `us` ON `u`.`userid`=`us`.`userid` WHERE `u`.`userid` = {$userid} LIMIT 1"); } $ir = $db->fetch_row($is); if ($ir['force_logout'] != '0') { $db->query( "UPDATE `users` SET `force_logout` = 0 WHERE `userid` = {$userid}"); session_unset(); session_destroy(); $login_url = "http://{$domain}/login.php"; header("Location: {$login_url}"); exit; } global $macropage; if ($macropage && !$ir['verified'] && $set['validate_on'] == 1) { $macro_url = "http://{$domain}/macro1.php?refer=$macropage"; header("Location: {$macro_url}"); exit; } check_level(); $h = new headers; if (isset($nohdr) == false || !$nohdr) { $h->startheaders(); $fm = money_formatter($ir['money']); $cm = money_formatter($ir['crystals'], ''); $lv = date('F j, Y, g:i a', $ir['laston']); global $atkpage; if ($atkpage) { $h->userdata($ir, $lv, $fm, $cm, 0); } else { $h->userdata($ir, $lv, $fm, $cm); } global $menuhide; if (!$menuhide) { $h->menuarea(); } } as stsated on the instrction Open globals.php and find the following code. ?> and add before that require_once('ajax_chat/chat_globals.php'); help please Quote
Dave Posted March 5, 2015 Posted March 5, 2015 You just need to add it at the very end of the file Quote
Raven1992 Posted March 5, 2015 Author Posted March 5, 2015 You just need to add it at the very end of the file I tryed that but i come up with this error NightMere Of Love - Critical Error A critical error has occurred, and this page cannot be displayed. Please try again later. Quote
Revenge Posted March 6, 2015 Posted March 6, 2015 Whats up I could help message me - - - Updated - - - Aha I know, In that page everything called globals.php change it to header.php :) Issue should sort itself then. go to staff_chat.php make a chat and then boom... Bobs your uncle. - - - Updated - - - Not that page but its one of them :) Quote
KyleMassacre Posted March 6, 2015 Posted March 6, 2015 Open up the error handler file and set the debugging to true then you can see what the critical error is Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.