Jump to content
MakeWebGames

Fejail help


Veramys

Recommended Posts

Ok so I'm thinking it is simple but I can't think of how I should do it at the moment so I'm asking you all. Say someone is in fedjail and you want them to be able to access one php file. Meaning like fedsupport.php. How would I go about letting them see just that page and no others? Thanks in advance.

Link to comment
Share on other sites

The header.php if I am not mistaken, is at the bottom of the mainmenu function ( should still be in the header.php file )

Do a search on the header.php for ['fedjail']. You'll then need to put an if statement around it:

 

if($_SERVER['SCRIPT_FILENAME'] != "filenamehere.php") {

fed jail stuff here!

}
Link to comment
Share on other sites

if ($ir['fedjail'] > 0) {
		$q = $db->query("SELECT *
                            FROM `fedjail`
                            WHERE `fed_userid` = $userid");
		$r = $db->fetch_row($q);
		die("<span style='font-weight: bold; color:red;'>
                   You have been put in the Pits of Purgatory
                    for {$r['fed_days']} day(s).<br />
                   Reason: {$r['fed_reason']}<br />
                   </span></body></html>");
	}

 

Yes this is what it is in the header. I'm trying to make it allow a person in fedjail to look at one php file which is fedsupport.php and it doesn't seem to want to work.

Link to comment
Share on other sites

Do you have a link for them to click on to go into that file?

If you have the include "globals.php" on your fedsupport.php, doing an include won't work.

What you can do is something like:

 

      <?php
	if ($ir['fedjail'] > 0) {
		if($_SERVER['SCRIPT_FILENAME'] != "fedsupport.php") {

			@header('Location: fedsupport.php');

		}
       }

 

UNTESTED

Edited by HauntedDawg
Link to comment
Share on other sites

If I take out the globals file it won't let it connect to the database. Also I lose the layout.

Actually, if you take the globals out, and include it from the header. Everything is already set for you, and will only use the content on your fedsupport.php file.

Try out the above code, it redirects to fedsupport.php if you are not on it.

Link to comment
Share on other sites

create a file called globals_nonauth.php then remove

include "globals.php"

from the support file

Then in globals_nonauth.php add this

 

if (strpos($_SERVER['PHP_SELF'], "globals_nonauth.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);
   }
}

include "config.php";
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
require_once('global_func.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'];
}

That should help you with the global

Link to comment
Share on other sites

@jcvenom:

I removed your last post because I dont think that file should be posted since its part of the core mccodes.

I just did a soft delete so if I am wrong then it can be restored but if he is a license holder he can go and download the updated version of mccodes which comes with the global non auth file. and if he's not a license holder then, well tough luck :p

Link to comment
Share on other sites

@jcvenom:

I removed your last post because I dont think that file should be posted since its part of the core mccodes.

I just did a soft delete so if I am wrong then it can be restored but if he is a license holder he can go and download the updated version of mccodes which comes with the global non auth file. and if he's not a license holder then, well tough luck :p

no problem kyle i never knew it wasn't allowed sorry

Link to comment
Share on other sites

it has come to my attention that people are stealing my work i am not happy about this and my laywer is on my cases i recently made 3 games anonymouscity,breakoutcity,crimecitymafia and i have found people have stolen all 3 scripts now i am warning you guys anyone that is found using any of those scripts will be brought to court and im serious if you find anyone using these scripts pm me and i will give you 100$ and the game will be handled with my laywer
no problem kyle i never knew it wasn't allowed sorry
So on one hand, we publically renounce people who have ""stolen"" scripts, on the other, we blatantly disregard the copyright rules..

Still, as CE/MWG has never really had that much of a clean record, and even a casual glance around these forums is sufficient to build an almost 100% complete (ignoring staff functions) McCodes V1 & V2, I guess posting such material can really be considered "fair use".

Discuss ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...