
Miniman
Members-
Posts
431 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Miniman
-
Re: Rating Modification Help ... <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['act'] = isset($_GET['act']) && ctype_alpha($_GET['act']) ? trim($_GET['act']) : ""; switch($_GET['act']) { case 'PlusRate': PlusRate(); break; case 'MinusRate': MinusRate(); break; } if (!in_array($_GET['act'], array('PlusRate', 'MinusRate'))) { echo '<span style="color:#FF0000;">Error! Invaild Command.</span>'; $h->endpage(); exit; } if (!$_GET['ID']) { echo '<span style="color:#FF0000;">Error! Invaild ID.</span>'; $h->endpage(); exit; } function PlusRate() { global $db, $h, $ir, $userid; if($ir['ratesleft'] > '0') { $Select = $db->query(sprintf("SELECT `userid` FROM `users` WHERE `userid`='%u'", $_GET['ID'])); if (!($db->num_rows($Select))) { echo '<span style="color:#FF0000;">Error! Invaild ID.</span>'; $h->endpage(); exit; } else if($_GET['ID'] == $ir['userid']) { echo '<span style="color:#FF0000;">Error! You Cannot Rate Yourself.</span>'; $h->endpage(); exit; } else { $r = $db->fetch_row($db->query(sprintf("SELECT `userid`, `username` FROM `users` WHERE `userid`='%u'", $_GET['ID']))); $db->query(sprintf("UPDATE `users` SET `ratings`=`ratings`+'1' WHERE `userid`='%u'", $_GET['ID'])); $db->query(sprintf("UPDATE `users` SET `ratesleft`=`ratesleft`-'1' WHERE `userid`='%u'", $userid)); $db->query(sprintf("INSERT INTO `events` (`evUSER`, `evTIME`, `evREAD`, `evTEXT`) VALUES('%u', unix_timestamp(), '0', '<a href=\"viewuser.php?u=%u\">%s</a> Gave You A +1 Rating!')", @intval($r['userid']), $ir['userid'], addslashes($ir['username']))); $db->query(sprintf("UPDATE `users` SET `new_events`=`new_events`+'1' WHERE `userid`='%u'", @intval($r['userid']))); echo sprintf("You Gave %s A Positive Rating!", stripslashes($r['username']), $r['userid']); } } else { echo '<span style="color:#FF0000;">Error! You Can Only Rate Once A Day.</span>'; $h->endpage(); exit; } } function MinusRate() { global $db, $h, $ir, $userid; if($ir['ratesleft'] > '0') { $Select = $db->query(sprintf("SELECT `userid` FROM `users` WHERE `userid`='%u'", $_GET['ID'])); if (!($db->num_rows($Select))) { echo '<span style="color:#FF0000;">Error! Invaild ID.</span>'; $h->endpage(); exit; } else if($_GET['ID'] == $ir['userid']) { echo '<span style="color:#FF0000;">Error! You Cannot Rate Yourself.</span>'; $h->endpage(); exit; } else { $r = $db->fetch_row($db->query(sprintf("SELECT `userid`, `username` FROM `users` WHERE `userid`='%u'", $_GET['ID']))); $db->query(sprintf("UPDATE `users` SET `ratings`=`ratings`-'1' WHERE `userid`='%u'", $_GET['ID'])); $db->query(sprintf("UPDATE `users` SET `ratesleft`=`ratesleft`-'1' WHERE `userid`='%u'", $userid)); $db->query(sprintf("INSERT INTO `events` (`evUSER`, `evTIME`, `evREAD`, `evTEXT`) VALUES('%u', unix_timestamp(), '0', '<a href=\"viewuser.php?u=%u\">%s</a> Gave You A -1 Rating!')", @intval($r['userid']), $ir['userid'], addslashes($ir['username']))); $db->query(sprintf("UPDATE `users` SET `new_events`=`new_events`+'1' WHERE `userid`='%u'", @intval($r['userid']))); echo sprintf("You Gave %s A Minus Rating!", stripslashes($r['username']), $r['userid']); } } else { echo '<span style="color:#FF0000;">Error! You Can Only Rate Once A Day.</span>'; $h->endpage(); exit; } } $h->endpage(); ?> What about that? It's the same code by Karlos
-
Re: Rating Modification Help ... <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['act'] = isset($_GET['act']) && ctype_alnum($_GET['act']) ? trim($_GET['act']) : ""; switch($_GET['act']) { case 'PlusRate': PlusRate(); break; case 'MinusRate': MinusRate(); break; } if(!in_array($_GET['act'], array('PlusRate','MinusRate'))) { echo '<span style="color:#FF0000;">Error! Invaild Command.</span>'; $h->endpage(); exit; } if(!$_GET['ID']) { echo '<span style="color:#FF0000;">Error! Invaild ID.</span>'; $h->endpage(); exit; } function PlusRate() { global $db, $h, $ir, $userid; if($ir['ratesleft'] > '0') { $Select = $db->query(sprintf("SELECT `userid` FROM `users` WHERE `userid`='%u'", $_GET['ID'])); if (!($db->num_rows($Select))) { echo '<span style="color:#FF0000;">Error! No Such ID.</span>'; $h->endpage(); exit; } else if($_GET['ID'] == $ir['userid']) { echo '<span style="color:#FF0000;">Error! You Cannot Rate Yourself.</span>'; $h->endpage(); exit; } else { $r = $db->fetch_row($db->query(sprintf("SELECT `userid`, `username` FROM `users` WHERE `userid`='%u'", $_GET['ID']))); $db->query(sprintf("UPDATE `users` SET `ratings`=`ratings`+'1' WHERE `userid`='%u'", $_GET['ID'])); $db->query(sprintf("UPDATE `users` SET `ratesleft`=`ratesleft`-'1' WHERE `userid`='%u'", $userid)); $db->query(sprintf("INSERT INTO `events` (`evUSER`, `evTIME`, `evREAD`, `evTEXT`) VALUES('%u', unix_timestamp(), '0', '<a href=\"viewuser.php?u=\%u\">%s</a> Gave You A +1 Rating!')", @intval($r['userid']), $ir['userid'], addslashes($ir['username']))); $db->query(sprintf("UPDATE `users` SET `new_events`=`new_events`+'1' WHERE `userid`='%u'", @intval($r['userid']))); echo sprintf("You Gave %s A +1 Rating!", stripslashes($r['username'])); } } else { echo '<span style="color:#FF0000;">Error! You Can Only Rate Once A Day.</span>'; $h->endpage(); exit; } } function MinusRate() { global $db, $h, $ir, $userid; if($ir['ratesleft'] > '0') { $Select = $db->query(sprintf("SELECT `userid` FROM `users` WHERE `userid`='%u'", $_GET['ID'])); if (!($db->num_rows($Select))) { echo '<span style="color:#FF0000;">Error! No Such ID.</span>'; $h->endpage(); exit; } else if($_GET['ID'] == $ir['userid']) { echo '<span style="color:#FF0000;">Error! You Cannot Rate Yourself.</span>'; $h->endpage(); exit; } else { $r = $db->fetch_row($db->query(sprintf("SELECT `userid`, `username` FROM `users` WHERE `userid`='%u'", $_GET['ID']))); $db->query(sprintf("UPDATE `users` SET `ratings`=`ratings`-'1' WHERE `userid`='%u'", $_GET['ID'])); $db->query(sprintf("UPDATE `users` SET `ratesleft`=`ratesleft`-'1' WHERE `userid`='%u'", $userid)); $db->query(sprintf("INSERT INTO `events` (`evUSER`, `evTIME`, `evREAD`, `evTEXT`) VALUES('%u', unix_timestamp(), '0', '<a href=\"viewuser.php?u=\%u\">%s</a> Gave You A -1 Rating!')", @intval($r['userid']), $ir['userid'], addslashes($ir['username']))); $db->query(sprintf("UPDATE `users` SET `new_events`=`new_events`+'1' WHERE `userid`='%u'", @intval($r['userid']))); echo sprintf("You Gave %s A -1 Rating!", stripslashes($r['username'])); } } else { echo '<span style="color:#FF0000;">Error! You Can Only Rate Once A Day.</span>'; $h->endpage(); exit; } } $h->endpage(); ?> SQL ALTER TABLE `users` ADD `ratings` INT( 11 ) NOT NULL DEFAULT '0'; ALTER TABLE `users` ADD `ratesleft` INT( 11 ) NOT NULL DEFAULT '1'; Cron Line $db->query("UPDATE users SET ratesleft=1"); That was made by Karlos :-)
-
Re: Rating Modification Help ... Tis just a safer way of doing it, still not gonna help if the rating goes up or down.
-
Re: Rating Modification Help ... chris3010 seems to be using a completely different code :| <?php include (DIRNAME(__FILE__) ."/globals.php"); $ID = (int) ($_GET['ID']); $action = $_GET['action']; $ar=$db->query("SELECT * FROM usrate WHERE rater={$userid} AND rated={$ID}"); if($db->fetch_row($ar)) { echo 'You Already Rated This Person Today'; $h->endpage(); exit; } $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : ""; switch($action) { case 'goodrating': goodrating(); break; case 'badrating': badrating(); break; } if(!$ID) { echo "Error - invaild player id."; $h->endpage(); exit; } if(!$action) { echo "Error - invaild action."; $h->endpage(); exit; } function goodrating() { global $ir,$userid; $ID = $_GET['ID']; if($ID == $userid) { echo 'You cannot rate yourself.'; $h->endpage(); exit; } else { $result = mysql_query(sprintf("SELECT goodratings,userid FROM users WHERE userid=%u", $ID)); while($row = mysql_fetch_row($result)) { $ratings = $row['ratings']; } mysql_query(sprintf("UPDATE users SET goodratings = goodratings+1 WHERE userid=%u", $ID)); mysql_query("INSERT INTO usrate values ({$userid},{$ID})"); echo 'You gave the user a good rating'; } } function badrating() { global $ir,$userid; $ID = $_GET['ID']; if($ID == $userid) { echo 'You cannot rate yourself.'; $h->endpage(); exit; } else { $result = mysql_query(sprintf("SELECT badratings,userid FROM users WHERE userid=%u", $ID)); while($row = mysql_fetch_row($result)) { $ratings = $row['ratings']; } mysql_query(sprintf("UPDATE users SET badratings = badratings+1 WHERE userid=%u",$ID)); mysql_query("INSERT INTO usrate values ({$userid},{$ID})"); echo 'You gave the user a bad rating'; } } $h->endpage(); ?> See if that works, Haven't tested it. If there is an error or whatever, post here and I'll fix it
-
Important Security Issue For All McCode Owners !
Miniman replied to MaKaVeLLi's topic in General Discussion
Re: Important Security Issue For All McCode Owners ! See, wasn't to hard. Seems someone is getting a bit touchy, my post wasn't directed at you. Atleast I don't think, I didn't say "(like MaKaVeLLi, hehe)" I was infact saying it for the people that install mccodes, add a will potion item and sell it. Geez -
Important Security Issue For All McCode Owners !
Miniman replied to MaKaVeLLi's topic in General Discussion
Re: Important Security Issue For All McCode Owners ! Well, I've sent a mail to MaKaVeLLi and once he mails back, I will be able to help with the problem once I've sorted it myself. But it sounds pretty serious so I suggest you message MaKaVeLLi if you take pride in your game and actually want to continue running it. Or if you've installed Mccodes for a quick bit of cash, don't bother :wink: -
Re: [v2 $varies] Einey's Mod Shop (Read the store info before posting) I believe Einey does some good work and wouldn't doubt her for a second. I can see why she is pissed because her last thread was torn apart. So, for once why don't you post "Hey, these are great, I'm taking an interest" Or "Look's good but I think I'll pass, keep up the great work"
-
Re: [mccodes V2] Delete item from shop mod $10 I'll go ahead and point you in the right direction to selling this 'mod'.. Lower the price by a huge amount and give people a decent reason to buy it. If it's being given away for free, who in the right mind will pay $10 for this one? $2 is more like it and you'll probaly actually make 1 sale.
-
Re: [mccodes V2] Delete item from shop mod $10 No offence....but this is very basic stuff and easy to make :| It's probaly only worth $2. And I'm also guessing your code isn't to good either as I saw you asking for help on how to make this earlier with a simple error....
-
Re: Template Request! See now that hurt and completely p*ssed on my moment :cry: But I think your stalking me, I can really only assume at this point that you really do have loving feelings towards me Vali Wanna hug? :wink:
-
Re: Template Request! It's not actuallylike me to compliment someone, but.... I've seen this guys work and personally I love it, he does some pretty brilliant work. I suggest this guy if you wanted a Login/Register. I know he'd be my first choice.
-
could someone check my game reallly quick...
Miniman replied to jon182's topic in General Discussion
Re: could someone check my game reallly quick... Your game isn't secure. Simple, You can't make your game secure by adding a bit of code to your header.php. You need to learn and go through every page. Your using Mccode, what do you expect :) -
[mccode v2] Flash Arcade System with High Scores [$100]
Miniman replied to seanybob's topic in Paid Modifications
Re: [mccode v2] Flash Arcade System with High Scores [$150] I figured All looks good though and if you can produce something like this then you must be a lil bit good :wink: Just a little.... -
[mccode v2] Flash Arcade System with High Scores [$100]
Miniman replied to seanybob's topic in Paid Modifications
Re: [mccode v2] Flash Arcade System with High Scores [$150] This looks very good and I think would be worth the cash. I've never seen your work before so I'm not sure if you'd be considered 'good' or whatever but it looks like alot of fun :-) -
Re: Donators List You copied ut and added ``. That's it. If you knew sprintf() wasn't meant to be there you'd of taken it out. You don't realise what your saying/doing 90% of the time, do you?
-
Re: Donators List I used sprintf() simply because I was rushing, hardly looking at what I was even doing. I was expecting to be selecting data that include a $_GET or $_POST. Didn't realise :lol: I messed up, Now I must punish myself.
-
Re: Donators List Was there any need for that at all? You added some () and ``. Nice xD
-
Re: [mccode v2] User Comments :roll: Your just saying that.....*blush* Lol, It's not a problem :-)
-
Re: [mccode v2] User Comments <?php include_once (DIRNAME(__FILE__). '/globals.php'); if(!$_GET['userid'] AND !$_POST['userid']) { print "Please go to viewusers profile then click on Add comment."; $h->endpage(); exit; } if(!is_numeric($_GET['userid']) AND !is_numeric($_POST['userid'])) { print "That is not a user ID"; $h->endpage(); exit; } if($_POST['message'] AND $_POST['userid']) { echo sprintf("Comment Posted. [url='viewuser.php?u=%u']Back[/url]", @intval($_POST['userid'])); $message = mysql_real_escape_string($_POST['message']); $to = $_POST['userid']; event_add(abs(@intval($_POST['userid'])), 'You Have Been Left A Message On Your Profile'); mysql_query("INSERT INTO ucomments VALUES ('',unix_timestamp(),$userid,$to,'$message',0)"); } else { $sql = sprintf("SELECT userid,username FROM users WHERE userid=%u", @intval($_GET['userid'])); $q = mysql_query($sql); if(!mysql_num_rows($q)) { print "This user dosen't exit;"; $h->endpage(); exit; } $r = mysql_fetch_array($q); echo sprintf("<h3>Adding a comment to %s's profile</h3><form action='comments.php' method='POST'>", $r['username']); echo sprintf("<input type='hidden' name='userid' value='%u'>", @intval($_GET['userid'])); echo "Comment: <input type='text' name='message'><input type='submit' value='Add'></form>"; } $h->endpage(); ?> Try that. I modified it abit to the way I'd do it. So it might error. If it does let me know.
-
Re: Donators List <?php /* -- Mobz Productions -- -- A Product of Mobz Productions -- -- Miniman added code tags -- This will probaly be removed */ include_once (DIRNAME(__FILE__). '/globals.php'); if($ir['donatordays'] == 0) { die("This feature is for donators only."); } echo "<h3>Donators List</h3>"; echo "<table width=85% class='table' cellspacing='1'><tr><td>User</td> <td>Level</td> <td>Donator Days Left</td> <td>Mail Them</td> <td>Attack Them</td></tr>"; $q = $db->query(sprintf("SELECT donatordays,userid,level,username FROM users WHERE donatordays > 0 ORDER BY donatordays")); while($r=mysql_fetch_array($q)) { echo sprintf("<tr><td>[url='viewuser.php?u=%u']%s[/url] [%u]</td><td>%u</td><td> %u Donator Days Left</td><td>[url='mailbox.php?action=compose&ID=%u']Send Mail[/url]</td> <td>[url='attack.php?ID=%u']Attack[/url]</td></tr>", $r['userid'], stripslashes($r['username']), $r['userid'], $r['level'], $r['donatordays'], $r['userid'], $r['userid']); } echo "</table>"; $h->endpage(); ?> This is done quickly, if there is any errors let me know I'll fix them. This is for V2, if you want it in V1 I'll convert it :)
-
Re: [Mccodes V2]Login Register, TOs- New That's what makes it a good site.
-
Re: [V2]Updated Header[V2] Alane is right, She doesn't steal mods..... :wink: I got your back Alane (Directed at Crazy-T)
-
Re: [V2]Updated Header[V2] That still doesn't answer the question that everyone is asking, you obviously don't know. I bet you felt so smart when you posted that, I can picture you sat at home - "Oh he's gonna be so gutted when he reads this...HEY! Brother-Daddy, Mumma-Sister, come read this, your gonna laugh so hard we are gonna lose the rest of our remaining 3 teeth" So don't start with me because this road ends badly for you, you come out looking more retarded than you did in the first place :-)
-
[MCCODES V2] Updated Jail now lets users Offer rescue Price
Miniman replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Updated Jail now lets users Offer rescue Price +1 from me to, It look's good and clean. +1 for Richard to :wink: -
Re: [V2]Updated Header[V2] So, Basically you have NO idea on what it does? And really, you didn't make this? Maybe I'm wrong but to me it look's like you have the brain power of a very questionable orange.