-
Posts
2,657 -
Joined
-
Last visited
-
Days Won
74
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
call this file botfinder.php <?php $deactive = 1; //Deactive wether it will be in a new page or not.... 1 => on || 0 => off if($deactive == 1) { include("sglobals.php"); } else { //Do nothing } //count $males = mysql_num_rows(mysql_query("SELECT username, gender FROM users WHERE gender='male' AND user_level='0'")); $females = mysql_num_rows(mysql_query("SELECT username, gender FROM users WHERE gender='female' AND user_level='0'")); //list $dip_m = mysql_query("SELECT userid,username,gender FROM users WHERE user_level='0'"); //Display male & Female echo '<H2>You Currently have </H2> '.$males.' [b]Male: Bot(s)[/b] '.$females.' [b]Female: Bot(s)[/b] Click on a BOTS name to Edit..'; //Display males online $c = 0; while($soc = mysql_fetch_assoc($dip_m)) { $c++; echo '- <table border=10 width=80% cellpadding=4 cellspacing=5><tr><td align=center>[url="staff_battletent.php?action=editbot&step=1?u='.$soc['userid'].'"]<h2>'.$soc['username'].'</h2>[/url] Gender '.$soc['gender'].' [url="staff_battletent.php?action=addbot"][ Add to game ][/url][url="staff_battletent.php?action=delbot"] [ Delete from game ][/url] </td></tr></table> '; } print""; $h->endpage(); ?>
-
Re: [v2] Approval System Im drawn to a new conclusion and that conclusion being that if staff were rewarded for ther effectiveness this system just might actually work. So an idea would be to get the users involved with monthly Polls on their fav staff. Just a thought
-
Re: [v2] Approval System I have to Agree with Radio on this one if the staff dont do there job correctly you could lose more rather than gain
-
Re: marriage, sharing housing? on your v1 version find and remove. session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); replace with include "globals.php"; also you may need to change mysql_query to $db->query which isnt always the case
-
Re: [MMCODES V2] HACKING ATTEMPTS LOGGED
-
Re: marriage, sharing housing? Easiest way would be to make a new SQL for newlyweds marriageID userID willBEFORE willAFTER willTOTAL marriageDATE, marriageTIMES. marriageDAYS. And implement that into your marriage scripts :)
-
[MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error Just to note the error you was getting was caused by this line.. stafflog_add("Deleted topic {$topic['ft_name']}");recache_forum($topic['ft_forum_id']); Always make sure you break after ; Example stafflog_add("Deleted topic {$topic['ft_name']}"); recache_forum($topic['ft_forum_id']); -
[MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error try <? function deletopic() { global $db; $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $topic=$db->fetch_row($q); $db->query("DELETE FROM forum_topics WHERE ft_id={$_GET['topic']}"); $db->query("DELETE FROM forum_posts WHERE fp_topic_id={$_GET['topic']}"); print "Deleting topic... Done "; stafflog_add("Deleted topic {$topic['ft_name']}"); recache_forum($topic['ft_forum_id']); } ?> -
[MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error for the other error SELECT FROM should be SELECT * FROM -
[MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Forums Fix for Ranks, Number of Posts + Delete Error Look above 593 is there a globals statement if so make sure theres a $db in there aswell for the other error SELECT FROM should be SELECT * FROM -
[MCCODES V2] File Creator and Editor ingame
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] File Creator and Editor ingame SCREENIES -
[MCCODES V2] File Creator and Editor ingame
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] File Creator and Editor ingame add these links to smenu.php [url="illusions.php?action=startfile"]CREATE NEW FILE[/url] [url="filedata.php"]EDIT EXSISTING FILE[/url] This system will allow the admin to create Files of which are sent straight to the FTP and named as chosen by the person creating it. The filedata.php will allow you to EDIT any files on your server the format can be of any type from html to javascript....... *FOOTNOTE* Think carefully when using this editor as in the wrong hands it CAN do fatal damage to your site... -
call this file filedata.php <?php // CREATED FOR MCCODES V2 BY ILLUSIONS AND HAUNTED DAWG 2009 // // AS I USUALLY DONT CARE ABOUT NOTICES STAYING INTACT I WOULD LIKE THIS ONE TO STAY IS ITS A JOINT EFFORT THANKS ALL // include "sglobals.php"; if($ir['user_level'] != 2) { require "denied.php"; } $file = 'preferences.php'; //changing this name will also change the REAL VIEW MODE to the correct file // THE CONTENTS OF $file CAN BE OF ANY METHOD EXAMPLE HTML, CSS, PHP, ASX /////////////////////////////////////////////////////////////////////////////////////////////////////// // REMEMBER YOU CAN ALSO AMEND THIS FILE TO ALTER THE NAME OF THE $FILE NAME YOUR EDITING /// ////////////////////////////////////////////////////////////////////////////////////////////////////// //We use isset so we dont get the undefined index blah blah errors //We check if they have hit the submit button if( isset($_POST['file']) ) { //We open the file as w since w stands as write. [url]http://www.php.net/fopen[/url] is a good tutorial chmod($file, 0777); $fo = fopen($file, 'w'); //Since we stripped the </textarea> to <+textarea+> we need to convert back to </textarea> //Since this is editing a file, we can not really put in any security only that ID 1 can edit it // I USED STRIPSLASHES INSTEAD OF PREG_REPLACE COS IT FUCKED THINGS UP $conv = stripslashes(($_POST['file'])); if(fwrite($fo, $conv)) { echo '<font color="green"><h1>File Ammended And Saved</h1></font> <h1>New file view Below Check for errors if any</h1> <table width="100%" border="10" cellpadding="4" cellspacing="0"><td> <textarea name="file" cols="150" rows="15">'.$conv.'</textarea> </td></table> <body bgcolor="#000000"> <a href="illusions.php?action=startfile"> [b]<h2> [>>> GOTO ILLUSIONS FILE CREATOR <<<] </h2>[/b]</a> <a href="filedata.php"> [b]<h2> [>>> RETURN TO EDIT '.$file.' <<<] </h2>[/b]</a> <hr><h1>REAL VIEW OF AMMENDED FILE BELOW</h1> <iframe width=100% height=500 frameborder=0 scrolling="yes" src="http://localhost/'.$file.'"></iframe> </body> </html> '; } else { echo '<font color="red">Could not save file.</font>'; } fclose($fo); } else { //Below we fetch file contents using name_get_contents. [url]http://www.php.net/name_get_contents[/url] is a good tutorial //FOOTNOTE i changed name_get to file_get as the textarea wasnt working right and kept adding back slashes to the script. //so i suppose php.net dont know everything he he he he $tup = file_get_contents($file); //Since if the file has </textarea> in it, it will screw up this code. Convert it out to <+textarea+> $tup = preg_replace('~</textarea>~is','<+textarea+>',$tup); //Bellow you should understand what it does. echo ' <form action="'.$_SERVER['PHP_SELF'].'" method="post"> <h1>Editing File '.$file.'</h1> <table width="100%" border="10" cellpadding="4" cellspacing="0"><td> <textarea name="file" cols="150" rows="15">'.$tup.'</textarea> </td></table> <input type="submit" value="Save And Ammend File"> <a href="illusions.php?action=startfile"> [b]<h2> [>>> GOTO ILLUSIONS FILE CREATOR <<<] </h2>[/b]</a> <a href="filedata.php"> [b]<h2> [>>> REFRESH CURRENT PAGE DATA <<<] </h2>[/b]</a> <hr><h1>UNEDITED FILE BELOW REAL VIEW</h1> <iframe width=100% height=500 frameborder=0 scrolling="yes" src="http://localhost/'.$file.'"></iframe> <input type="submit" value="Save And Ammend File"> </form>'; } ?> Change localhost to the web address your game is on call this file illusions.php <?php // CREATED FOR MCCODES V2 BY ILLUSIONS AND HAUNTED DAWG 2009 // // AS I USUALLY DONT CARE ABOUT NOTICES STAYING INTACT I WOULD LIKE THIS ONE TO STAY IS ITS A JOINT EFFORT THANKS ALL // include "sglobals.php"; switch($_GET['action']) { case "startfile": startfile(); break; case "startprocess": startprocess(); break; default: print "Error: This script requires an action."; break; } function startfile() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { require "denied.php"; } print "<h3>Create FTP Files</h3> <h3>Add File Name</h3><h2>Always make a backup of any copy before using this system </h2><hr />The file name and Data you create on here will also be Created on your FTP You can use any file Format for EXAMPLE test.php, test.html, test.css You can overwrite a file simply by giving it the same file name.[i]<center>[i]<center>Copyright ? 2009 Illusions.</center>[/i]<hr> <form action='illusions.php?action=startprocess' method='post'> Create File Name: <input type='text' name='name' <hr>Copy and Paste Data Below or Create New Data <hr> <textarea name='filetext' cols='145' rows='15'></textarea> <input type='submit' value='Create New File' /></form> <a href='filedata.php'> [b]<h2> [>>> RETURN TO FILEDATA EDITOR <<<] </h2>[/b]</a><hr><h1>QUICK COPY AND PASTE FOR FILEDATA.PHP BELOW</h1> <iframe width=100% height=500 frameborder=0 scrolling='yes' src='http://localhost/filedata.txt'></iframe>"; } { $h->endpage(); } //We use isset so we dont get the undefined index blah blah errors //We check if they have hit the submit button function startprocess() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { require "denied.php"; } $name = $_POST['name']; if( isset($_POST['name']) ) { //We open the name as w since w stands as wright. [url]http://www.php.net/fopen[/url] is a good tutorial chmod($name, 0777); $fo = fopen($filetext."$name", "w"); fwrite($fo, $pick); //Since we stripped the </textarea> to <+textarea+> we need to convert back to </textarea> //Since this is editing a name, we can not really put in any security only that ID 1 can edit it // GET FILE VIEW FOR FTP TRANSFER $conv = stripslashes(($_POST['filetext'])); if(fwrite($fo, $conv)) { echo '<h2>If you see an error message above regards CHMOD just ignore it.. It just means that the file never exsisted in the first place once its on your FTP the error message will not be displayed.</h2> <font color="green"> <h1>File Name</h1></font> <font color="red"><h1>'.$name.'</font></h1> <font color="green"><h1> Created and Saved to FTP</h1></font> <font color="green"><h1> File is now Available for Use in Game</h1></font>'; } else { echo '<font color="red"><h1>File '.$name.' Could not be Written Please Try Again</h1></font>'; } fclose($fo); } //else { //Bellow we fetch name contents using name_get_contents. [url]http://www.php.net/name_get_contents[/url] is a good tutorial $tup = file_get_contents($name); //Since if the name has </textarea> in it, it will screw up this code. Convert it out to <+textarea+> $tup = stripslashes(($_POST['filetext'])); //Bellow you should understand what it does. echo ' <form action="'.$_SERVER['PHP_SELF'].'?action=startfile" method="post"> <iframe width=100% height=500 frameborder=0 scrolling="yes" src="http://localhost/'.$name.'"></iframe> <input type="submit" value="Create Another File"> </form> <a href="filedata.php"> [b]<h2> [>>> GOTO ILLUSIONS FILE DATA EDITOR <<<] </h2>[/b]</a>'; } } ?> Again change the localhost to your addy
-
Re: [MMCODES V2] HACKING ATTEMPTS LOGGED *FOOTNOTE* This mod is not intended to give exact Replication of a Hack attempt from outside of the game. but it will give you an idea of which users from within the game that are trying to access your pages that are only intended for staff viewing.
-
Re: [MMCODES V2] HACKING ATTEMPTS LOGGED This can probably be done but bare in mind its MCC and injections into it are like a sieve lol
-
Re: [MMCODES V2] HACKING ATTEMPTS LOGGED now open sglobals.php and where you see the die(403); statement overwrite the whole function with. if($ir['user_level'] <= 1) { include "denied.php"; die(); exit; } Use the method that you did here on pages that DECLINE users less than level 2 and that should be it..
-
Re: [MMCODES V2] HACKING ATTEMPTS LOGGED SQLS CREATE TABLE IF NOT EXISTS `hacklog` ( `id` int(11) NOT NULL auto_increment, `user` int(11) NOT NULL default '0', `time` int(11) NOT NULL default '0', `action` varchar(255) NOT NULL default '', `ip` varchar(15) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; Now open up global_func.php and add this near bottom. function hacklog_add($text) { global $db, $ir; $IP = $_SERVER['REMOTE_ADDR']; $text=$db->escape($text); $db->query("INSERT INTO hacklog VALUES(NULL, {$ir['userid']}, unix_timestamp(), '$text', '$IP')"); } NOW CALL THIS FILE denied.php <html> <body bgcolor="#000000"> <STYLE type="text/css"> <!-- BODY { scrollbar-face-color: #000000; scrollbar-highlight-color: #00FF00; scrollbar-3dlight-color: #000000; scrollbar-darkshadow-color: #00FF00; scrollbar-shadow-color: #000000; scrollbar-arrow-color: #FF3300; scrollbar-track-color: #000000; } --> </STYLE> </html> <?php //include_once(DIRNAME(__FILE__) . '/globals.php'); echo "<h1 style='text-align:center;'><font color='red'>Sorry ".$ir['username']." You dont have ACCESS to VIEW ".$_SERVER['REQUEST_URI']."</font></h1>"; $log = sprintf("<span style='color:red;'>%s tried to access %s?%s</span>", $ir['username'], $_SERVER['PHP_SELF'], $_SERVER['REQUEST_URI']); hacklog_add($log); die(); exit; ?> Now open up staff.php and add this print " <h3>Last 10 Hack Attempts</h3><hr /> <table width='100%' cellspacing='1' class='table'> <tr> <th>User</th> <th>Action</th> <th>Time</th> <th>IP</th> <th><h3>Jail User</h3><form action='staff_punit.php?action=fedsub' method='post'> User: ".user_dropdown($c,'user',$_GET['XID'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Jail User' /></form></th> <th><h3>Unjailing User</h3> The user will be taken out of fed jail. <form action='staff_punit.php?action=unfedsub' method='post'> User: ".fed_user_dropdown($c,'user')." <input type='submit' value='Unjail User' /></form></th> </tr>"; $p=$db->query("SELECT s.*, u.* FROM hacklog AS s LEFT JOIN users AS u ON s.user=u.userid ORDER BY s.time DESC LIMIT 10"); while($r=$db->fetch_row($p)) { print "<tr><td>{$r['username']} [{$r['user']}]</td> <td>{$r['action']}</td> <td>".date('F j Y g:i:s a', $r['time'])."</td> <td>{$r['ip']}</td><td>{$r['fed_reason']}</td><td>UNFED</td></tr>"; } print "</table><hr />"; PART 2 NEXT
-
Thought this might come in handy for some people it shows staff whos been trying to access pages they shouldnt be looking at LOGS the users name and ID and staff have choice from Option to Jail the person... SCREENIE Will post script once i have them together,,,
-
Re: [MCCODES V2] Mobile text messaging I'll fix the problem and update the page on here
-
Re: Small mod to header [any version] Nice mod Lith :) +1 can't add it to my test site but im sure it works great :)
-
Re: [mccode v2] Items Pic mod check your SQL on phpmyadmin make sure its VARCHAR (255) and not INT
-
Re: [MCCODES V2] Mobile text messaging Nicely done Plintu :) and a +1 from me :)
-
Re: [MCCODES V2] Mobile text messaging if( $pack != 1 and $pack != 2 and $pack != 3 and $pack != 4 and $pack != 5 and $pack != 6) { fclose($fp);die(""); } if(($pack == 1 || $pack == 2 || $pack == 3) && $payment_amount != "3.00") { fclose ($fp);die(""); } if($pack == 4 && $payment_amount != "5.00") { fclose ($fp);die(""); } if($pack == 5 && $payment_amount != "10.00") {fclose ($fp);die(""); } if($pack == 6 && $payment_amount != "5.00") {fclose ($fp);die(""); } Make sure you change the Price values to suit your game or if you have more than 6 packs then just rename 6 to the next available number for yout packs.
-
Re: [MCCODES V2] Mobile text messaging if you want to use the Donation part to give users Credits... Use this,,,, open donator.php and add [b]TEXT MESSAGING CREDITS ONLY[/b]<ul> [*]\$5.00 = 250 TEXT MESSAGING UNITS <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|250 TEXT MESSAGING UNITS|{$userid}"> <input type="hidden" name="amount" value="5.00"> // SET PRICE FOR CREDITS <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=tendollars"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> //CHANGE TO GBP FOR GREAT BRITAIN <input type="hidden" name="tax" value="0"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form> Now open ipn_donator.php and overwrite the packs part with this one if( $pack != 1 and $pack != 2 and $pack != 3 and $pack != 4 and $pack != 5 and $pack != 6) { fclose($fp);die(""); } if(($pack == 1 || $pack == 2 || $pack == 3) && $payment_amount != "3.00") { fclose ($fp);die(""); } if($pack == 4 && $payment_amount != "5.00") { fclose ($fp);die(""); } if($pack == 5 && $payment_amount != "10.00") {fclose ($fp);die(""); } if($pack == 6 && $payment_amount != "5.00") {fclose ($fp);die(""); } And add this to the bottom after pack 5 else if($pack==6) { $db->query("UPDATE users SET tcredits=250 WHERE userid={$for}"); $d=0; $t="fivedollars"; }
-
Re: Need Items sql Ok im confused now :) are you wanting the staff_items.php file and not the SQLS file...