Delete-please
Members-
Posts
225 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Delete-please
-
Re: [mccode]Multi alert thank you its good to see some people read things before posting
-
Re: [mccode]Multi alert for those who cba to test the script instead of posting stupid things TEST THE FUC**NG SCRIPT!!! it only sends 1 event!!!
-
Re: Guess the next poster nah yubi next :P:P
-
Re: Guess the next poster yup karlos next
-
Re: Count Users Clicks kyle man calm down.. its usefull i have a find random items in the city mod so i edited this so it works in explore to stop people clicking the explore 120 times in 15mins although you can only find stuff in like 2-3days of non stop clicking but oh well :P
-
Re: [mccode]Multi alert it only sends one event when they login.
-
Re: [mccode]Multi alert who cares about filling an event table up? Unless you used a really crap host it would take millions of events to even effect your data.. Although i do see your point
-
ok this is pretty simple but usefull... When a user logs in on an ip address that matches another accounts IP ID 1 gets an event ok so here we go find: die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } In header.php Underneath add $select_multis = mysql_query("SELECT * FROM users WHERE lastip='{$IP}' AND lastip_login='{$IP}' AND lastip_signup='{$IP}'") or die(mysql_error()); if(mysql_num_rows($select_multis) > 1) { session_start(); if($_SESSION['detected_multi'] != 1) { event_add(1,"ID <a href=\"viewuser.php?u=".$ir['userid']."\">".$ir['userid']."</a> has another account check it out."); } } done any issues/bugs post below
-
Re: Event add problem Thanks kyle,, and thanks for trying gurpreet :-P
-
Hi i wanted to add an event to someone when they have received a warning here is the warnings page <?php include 'globals.php'; $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid") or die(mysql_error()); $ir=mysql_fetch_array($is); if($ir['user_level'] < 2) { die("Staff Only!"); } switch($_GET['action']) { case 'add': addwarning(); break; case 'addsub': addwarning2(); break; case 'del': deletewarning(); break; case 'edit': editwarning(); break; case 'edit2': editwarning2(); break; default: index(); break; } function index() { global $ir,$h,$db,$userid; print "<h3>Viewing Warnings For ID: <a href=viewuser.php?u={$_GET['user']}>{$_GET['user']}</a></h3> "; $q=$db->query("SELECT w.*,u.* FROM warnings w LEFT JOIN users u ON w.warner=u.userid WHERE w.user={$_GET['user']} ORDER BY w.time DESC"); print "<center><font color=red><h4>Total Warnings: ".mysql_num_rows($q)." </h4> [<a href=warnings.php?action=add&userid={$_GET['user']}>Add Warning</a>] <table width=90% border=1 align=center><tr><tr style='background: light green'><td>Warned By:</td><td width=40%>Reason</td><td>Date</td><td>Links</td></tr>"; while($r=mysql_fetch_array($q)) { $warned=date('F j, Y, g:i:s a',$r['time']); print "<tr><td><a href=viewuser.php?u={$r['userid']}>{$r['username']}</a></td><td>{$r['warnedfor']}</td><td>$warned</td><td>"; if($ir['userid'] == 1) { print "[<a href=warnings.php?action=del&ID={$r['id']}>Remove</a>] "; } if($ir['warner'] == $userid || $userid == 1) { print "[<a href=warnings.php?action=edit&ID={$r['id']}>Edit</a>]"; } print "</td></tr>"; }} function addwarning() { global $ir,$h,$db,$userid; print "<form action=warnings.php?action=addsub method=post> <input style='visibility: hidden' name=user value={$_GET['userid']}> Reason: <textarea rows=7 cols=30 name=reason></textarea> <input type=submit value='Add warning'></form>"; } function addwarning2() { global $ir,$h,$db,$userid; $_POST['user']=($_POST['user']); $_POST['reason']=($_POST['reason']); $db->query("INSERT INTO warnings VALUES ('','{$_POST['user']}','{$_POST['reason']}','$userid',unix_timestamp())"); event_add($r['userid'], "<font color=red>You have recieved a warning for the reason {$_POST['reason']} if you continue your ways further action will be taken. Sniper Wars staff.", $c); $checkfed=$db->query("SELECT * FROM warnings WHERE user='{$_POST['user']}'"); if(mysql_num_rows($checkfed) > 5) { $db->query("UPDATE users SET fedjail=1 WHERE userid='{$_POST['user']}'"); $db->query("INSERT INTO fedjail VALUES('','{$_POST['user']}','300','$userid','Reached 6 warnings in game. Account jailed.')"); } print "Warning Added! [*]<a href=viewuser.php?u={$_POST['user']}>Back to users profile</a>"; } function deletewarning() { global $ir,$h,$db,$userid; if($ir['userid'] != 1) { die("Owner Only");} $db->query("DELETE FROM warnings WHERE id={$_GET['ID']}"); print "Warning Deleted"; } function editwarning() { global $ir,$h,$db,$userid; $target=$_GET['ID']; $edit=$db->query("SELECT * FROM warnings WHERE id='$target'"); while($r=mysql_fetch_array($edit)) { if($r['warner'] != $userid || $userid != 1) { die("You never set this warning, therefore cannot edit it"); } print "<h3>Edit Warning</h3> <form action=warnings.php?action=edit2 method=post> <input style='visibility: hidden;' name=id value=$target> <textarea rows=7 cols=30 name=reason>{$r['warnedfor']}</textarea> <input type=submit value='Edit Warning'></form>"; } } function editwarning2() { global $ir,$h,$db,$userid; $db->query("UPDATE warnings SET warnedfor={$_POST['reason']} WHERE id={$_POST['id']}"); print "Warning Updated. [*]<a href=index.php>Home</a>"; } ?> and here is the error i get QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNIX_TIMESTAMP(),0,'You have recieved a warning for the reason t' at line 1 Query was INSERT INTO events VALUES('',,UNIX_TIMESTAMP(),0,'You have recieved a warning for the reason test if you continue your ways further action will be taken. Sniper Wars staff.') and here is the event add incase you missed it event_add($r['userid'], "<font color=red>You have recieved a warning for the reason {$_POST['reason']} if you continue your ways further action will be taken. Sniper Wars staff.", $c);
-
Re: Guess the next poster nah its that annoying guy yubi again :P karlos next
-
Re: Guess the next poster NOPE :P danger boy next
-
Re: V2 Mainmenu Thanks :P
-
Re: Guess the next poster zero next :-D
-
Re: Guess the next poster mdshare next
-
V2 Staff password with admin function
Delete-please replied to Delete-please's topic in Free Modifications
Re: V2 Staff password with admin function Thanks and i wanted to do it so you set it by the basic settings :-P i may use some of your ideas though :) -
V2 Staff password with admin function
Delete-please replied to Delete-please's topic in Free Modifications
Re: V2 Staff password with admin function ahhh thanks im still very new so every tip helps! -
ok lets get started :P run the following SQL INSERT INTO `settings` ( `conf_id` , `conf_name` , `conf_value` ) VALUES ( '19', 'game_pass', 'default' ) Change the 19 to the next number of spare table example i have 18 tables in my settings so i run 19 to insert the table the current password for the login is "default". Ok next step find in staff.php: <textarea rows='7' cols='50' name='game_description'>{$set['game_description']}</textarea> under add Game Password: <input type='text' name='game_pass' value='{$set['game_pass']}' /> now create a file called stafflogin.php put this inside <?php include "globals.php"; if($ir['user_level'] < 2) { die("Only staff can login to the staff panel"); } $msg = ""; if (isset($_POST['Submit'])) { $password = $_POST['password']; if($password == "{$set['game_pass']}") { $_SESSION['adminok'] = "ok"; $_SESSION['password'] = "password"; header("Location: staff.php"); } else { $msg = "The password you entered was incorrect."; } } ?> <html> <head> <title>Login</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <center><?php echo $msg?> </center> <form name="form1" method="post" action=""> <p align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Enter the correct password to enter the staff pannel.</font></p> <table width="48%" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#000000" class="button"> <tr bgcolor="#CCCCCC"> <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">[b]Login here[/b]</font></td> </tr> <tr> <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password</font></td> <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <input name="password" type="password" id="password"> </font></td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Submit"></td> </tr> </table> <table width="715" border="2" align="center" cellpadding="2" cellspacing="1"> <tr> <th align="center" valign="middle" scope="col"> Staff panel</p> As members of staff it is your duty to keep your passwords safe. If someone gains access to the staff panel from your passwords</p> you will be the one to blame and removed from staff. </p></th> </tr> </table> </form> </body> </html> Now create a file called staffl.php and put this inside <?php function checklogin() { session_start(); if(!isset($_SESSION['adminok'])) header("location: stafflogin.php"); } ?> Open sglobals and find <?php Above add <?php include("staffl.php"); checklogin(); ?> And thats all +1 me if you found this helpfull
-
Re: [v2] Donator Only Shop Actually he did. I have a donstor dhop to but i read both codes and there no where near the same well apart from thaat you have to be a donator to view it..
-
Re: [v2] Donator Only Shop No i meant wont your members get annoyed if they dont have paypal to donate for this feature?
-
Re: [v2] Donator Only Shop +1 :P
-
Re: [v2] Donator Only Shop Nice mod 8-) However wouldn't this annoy members that do not have paypal?
-
Re: [mccode] 8 Lines to secure your site from known sql injections. So you telling me. You are going to go secure forums.php & all the market's. But what happen's when some one new figure's out an exploit? Each time you going to need to patch it up. Patch it all up once and for all and ur done. thought you quit
-
Re: Guess the next poster nah yubi again :P Karlos next