Jump to content
MakeWebGames

Assault

Members
  • Posts

    68
  • Joined

  • Last visited

Everything posted by Assault

  1. There an ETA for a preview, am debating weather to buy McCodes 2.5 or wait for 3
  2. Re: [mc code V2]Updated Lottery  
  3. Re: [mccode] Simple user rating system v2 Error is gone, thats good, but now I can not rate the person Up or Down Is what its like   <?php include "globals.php"; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $q=$db->query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}"); if($db->num_rows($q) == 0) { print "Sorry, we could not find a user with that ID, check your source."; } else { $r=$db->fetch_row($q); if($r['user_level'] == 1) { $userl="Member"; } else if($r['user_level'] == 2) { $userl="Admin"; } else if ($r['user_level'] == 3) { $userl="Secretary"; } else if($r['user_level'] == 0) { $userl="NPC"; } else {$userl="Assistant"; } $lon=($r['laston'] > 0) ?date('F j, Y g:i:s a',$r['laston']) : "Never"; $sup=date('F j, Y g:i:s a',$r['signedup']); $ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ']; $d=""; if($r['laston'] > 0) { $la=time()-$r['laston']; $unit="seconds"; if($la >= 60) { $la=(int) ($la/60); $unit="minutes"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $str="$la $unit ago"; } else { $str="--"; } if($r['last_login'] > 0) { $ll=time()-$r['last_login']; $unit2="seconds"; if($ll >= 60) { $ll=(int) ($ll/60); $unit2="minutes"; } if($ll >= 60) { $ll=(int) ($ll/60); $unit2="hours"; if($ll >= 24) { $ll=(int) ($ll/24); $unit2="days"; } } $str2="$ll $unit2 ago"; } else { $str2="--"; } if($r['donatordays']) { $r['username'] = "<font color=red>{$r['username']}</font>";$d="[img=donator.gif]"; } if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<h3>Profile for {$r['username']}</h3> <table width=100% cellspacing=1 class='table'><tr style='background:gray'><th>General Info</th><th>Financial Info</th> <th>Display Pic</th></tr> <tr><td>Name: {$r['username']} [{$r['userid']}] $d User Level: $userl Duties: {$r['duties']} Gender: {$r['gender']} Signed Up: $sup Last Active: $lon Last Action: $str Last Login: $str2 Online: $on "; $ratingtot = $r['goodratings'] - $r['badratings']; echo "Ratings: [url='rating.php?ID={$r['][img=thumbsup.gif][/url] [b]"; if ($ratingtot >=0) {echo '<font color="green">';echo $ratingtot; echo '</font>';} else {echo '<font color="red">';echo $ratingtot; echo '</font>';} echo " [/b][url='rating.php?ID={$r['] [img=thumbsdown.gif][/url] Days Old: {$r['daysold']} Location: {$r['cityname']}</td><td> Money: \${$r['money']} Crystals: {$r['crystals']} Property: {$r['hNAME']} Referals: "; $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}"); print $db->num_rows($rr); print " Friends: {$r['friend_count']} Enemies: {$r['enemy_count']} </td> <td>"; if($r['display_pic']) { print "<center>[img={$r[] Quote: {$r['quote']}</center>"; } else { print "<center>This user has no display pic! Quote: {$r['quote']}</center>"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print "</td></tr> <tr style='background:gray'><th>Physical Info</th><th>Links</th><th>$sh</th></tr> <tr><td>Level: {$r['level']} Health: {$r['hp']}/{$r['maxhp']} Gang: "; if($r['gang']) { print "[url='gangs.php?action=view&ID={$r[']{$r['gangNAME']}[/url]"; } else { print "N/A"; } if($r['fedjail']) { print " [b]<font color=red>In federal jail for {$r['fed_days']} day(s). {$r['fed_reason']}</font>"; } if($r['hospital']) { print " [b]<font color=red>In hospital for {$r['hospital']} minutes. {$r['hospreason']}</font>[/b]"; } if($r['jail']) { print " [b]<font color=red>In jail for {$r['jail']} minutes. {$r['jail_reason']}</font>[/b]"; } print "</td><td>[[url='mailbox.php?action=compose&ID={$r[']Send Mail[/url]] [[url='sendcash.php?ID={$r[']Send Cash[/url]] "; if($set['sendcrys_on']) { print "[[url='sendcrys.php?ID={$r[']Send Crystals[/url]] "; } if($set['sendbank_on']) { if($ir['bankmoney'] >= 0 && $r['bankmoney'] >= 0) { print "[[url='sendbank.php?ID={$r[']Bank Xfer[/url]] "; } if($ir['cybermoney'] >= 0 && $r['cybermoney'] >= 0) { print "[[url='sendcyber.php?ID={$r[']CyberBank Xfer[/url]] "; } } print " [[url='attack.php?ID={$r[']Attack[/url]] [[url='hackpc.php?ID={$r[']Hack Users PC[/url]] [[url='contactlist.php?action=add&ID={$r[']Add Contact[/url]]"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { print " [[url='jailuser.php?userid={$r[']Jail[/url]] [[url='mailban.php?userid={$r[']MailBan[/url]]"; } if($ir['donatordays'] > 0) { print " [[url='rentaspy.php?ID={$r[']Hire Spy[/url]] [[url='friendslist.php?action=add&ID={$r[']Add Friend[/url]] [[url='blacklist.php?action=add&ID={$r[']Add Enemy[/url]] "; } print "</td><td>"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { $r['lastiph']=@gethostbyaddr($r['lastip']); $r['lastiph']=checkblank($r['lastiph']); $r['lastip_loginh']=@gethostbyaddr($r['lastip_login']); $r['lastip_loginh']=checkblank($r['lastip_loginh']); $r['lastip_signuph']=@gethostbyaddr($r['lastip_signup']); $r['lastip_signuph']=checkblank($r['lastip_signuph']); print "<h3>Internet Info</h3><table width='100%' border='0' cellspacing='1' class='table'> <tr><td></td><td class='h'>IP</td><td class='h'>Hostname</td></tr> <tr><td class='h'>Last Hit</td><td>$r[lastip]</td><td>$r[lastiph]</td></tr> <tr><td class='h'>Last Login</td><td>$r[lastip_login]</td><td>$r[lastip_loginh]</td></tr> <tr><td class='h'>Signup</td><td>$r[lastip_signup]</td><td>$r[lastip_signuph]</td></tr></table>"; print "<form action='staffnotes.php' method='post'> Staff Notes: <textarea rows=7 cols=40 name='staffnotes'>{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Change' /></form>"; } else { print " "; } print "</tr></table>"; } } function checkblank($in) { if(!$in) { return "N/A"; } return $in; } $h->endpage(); ?>
  4. Re: [mc code V2]Updated Lottery the die function shouldnt be in the weekly and the lottery.php file didnt work Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/trinityc/thugmayhem.com/lottery.php on line 41
  5. Re: [mccode] Simple user rating system v2 no luck Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/trinityc/thugmayhem.com/viewuser.php on line 90   if ($ratingtot >=0) {echo '<font color="green">';echo $ratingtot; echo '</font>';} else {echo '<font color="red">';echo $ratingtot; echo '</font>';} echo ' [/b][url='rating.php?ID={$r['] [img=thumbsdown.gif][/url]
  6. Re: [mc code V2]Updated Lottery Thanks, yeah I want them to have a Max of 6 tickets per week and refresh it weekly.
  7. Re: [mccode] Simple user rating system v2  
  8. Re: [mccode] Simple user rating system v2   <?php include "globals.php"; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $q=$db->query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}"); if($db->num_rows($q) == 0) { print "Sorry, we could not find a user with that ID, check your source."; } else { $r=$db->fetch_row($q); if($r['user_level'] == 1) { $userl="Member"; } else if($r['user_level'] == 2) { $userl="Admin"; } else if ($r['user_level'] == 3) { $userl="Secretary"; } else if($r['user_level'] == 0) { $userl="NPC"; } else {$userl="Assistant"; } $lon=($r['laston'] > 0) ?date('F j, Y g:i:s a',$r['laston']) : "Never"; $sup=date('F j, Y g:i:s a',$r['signedup']); $ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ']; $d=""; if($r['laston'] > 0) { $la=time()-$r['laston']; $unit="seconds"; if($la >= 60) { $la=(int) ($la/60); $unit="minutes"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $str="$la $unit ago"; } else { $str="--"; } if($r['last_login'] > 0) { $ll=time()-$r['last_login']; $unit2="seconds"; if($ll >= 60) { $ll=(int) ($ll/60); $unit2="minutes"; } if($ll >= 60) { $ll=(int) ($ll/60); $unit2="hours"; if($ll >= 24) { $ll=(int) ($ll/24); $unit2="days"; } } $str2="$ll $unit2 ago"; } else { $str2="--"; } if($r['donatordays']) { $r['username'] = "<font color=red>{$r['username']}</font>";$d="[img=donator.gif]"; } if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<h3>Profile for {$r['username']}</h3> <table width=100% cellspacing=1 class='table'><tr style='background:gray'><th>General Info</th><th>Financial Info</th> <th>Display Pic</th></tr> <tr><td>Name: {$r['username']} [{$r['userid']}] $d User Level: $userl Duties: {$r['duties']} Gender: {$r['gender']} Signed Up: $sup Last Active: $lon Last Action: $str Last Login: $str2 Online: $on Days Old: {$r['daysold']} Location: {$r['cityname']}</td><td> Money: \${$r['money']} Crystals: {$r['crystals']} Property: {$r['hNAME']} Referals: "; $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}"); print $db->num_rows($rr); print " Friends: {$r['friend_count']} Enemies: {$r['enemy_count']} </td> <td>"; if($r['display_pic']) { print "<center>[img={$r[] Quote: {$r['quote']}</center>"; } else { print "<center>This user has no display pic! Quote: {$r['quote']}</center>"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print "</td></tr> <tr style='background:gray'><th>Physical Info</th><th>Links</th><th>$sh</th></tr> <tr><td>Level: {$r['level']} Health: {$r['hp']}/{$r['maxhp']} Gang: "; if($r['gang']) { print "[url='gangs.php?action=view&ID={$r[']{$r['gangNAME']}[/url]"; } else { print "N/A"; } if($r['fedjail']) { print " [b]<font color=red>In federal jail for {$r['fed_days']} day(s). {$r['fed_reason']}</font>"; } if($r['hospital']) { print " [b]<font color=red>In hospital for {$r['hospital']} minutes. {$r['hospreason']}</font>[/b]"; } if($r['jail']) { print " [b]<font color=red>In jail for {$r['jail']} minutes. {$r['jail_reason']}</font>[/b]"; } print "</td><td>[[url='mailbox.php?action=compose&ID={$r[']Send Mail[/url]] [[url='sendcash.php?ID={$r[']Send Cash[/url]] "; if($set['sendcrys_on']) { print "[[url='sendcrys.php?ID={$r[']Send Crystals[/url]] "; } if($set['sendbank_on']) { if($ir['bankmoney'] >= 0 && $r['bankmoney'] >= 0) { print "[[url='sendbank.php?ID={$r[']Bank Xfer[/url]] "; } if($ir['cybermoney'] >= 0 && $r['cybermoney'] >= 0) { print "[[url='sendcyber.php?ID={$r[']CyberBank Xfer[/url]] "; } } print " [[url='attack.php?ID={$r[']Attack[/url]] [[url='hackpc.php?ID={$r[']Hack Users PC[/url]] [[url='contactlist.php?action=add&ID={$r[']Add Contact[/url]]"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { print " [[url='jailuser.php?userid={$r[']Jail[/url]] [[url='mailban.php?userid={$r[']MailBan[/url]]"; } if($ir['donatordays'] > 0) { print " [[url='rentaspy.php?ID={$r[']Hire Spy[/url]] [[url='friendslist.php?action=add&ID={$r[']Add Friend[/url]] [[url='blacklist.php?action=add&ID={$r[']Add Enemy[/url]] "; } print "</td><td>"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { $r['lastiph']=@gethostbyaddr($r['lastip']); $r['lastiph']=checkblank($r['lastiph']); $r['lastip_loginh']=@gethostbyaddr($r['lastip_login']); $r['lastip_loginh']=checkblank($r['lastip_loginh']); $r['lastip_signuph']=@gethostbyaddr($r['lastip_signup']); $r['lastip_signuph']=checkblank($r['lastip_signuph']); print "<h3>Internet Info</h3><table width='100%' border='0' cellspacing='1' class='table'> <tr><td></td><td class='h'>IP</td><td class='h'>Hostname</td></tr> <tr><td class='h'>Last Hit</td><td>$r[lastip]</td><td>$r[lastiph]</td></tr> <tr><td class='h'>Last Login</td><td>$r[lastip_login]</td><td>$r[lastip_loginh]</td></tr> <tr><td class='h'>Signup</td><td>$r[lastip_signup]</td><td>$r[lastip_signuph]</td></tr></table>"; print "<form action='staffnotes.php' method='post'> Staff Notes: <textarea rows=7 cols=40 name='staffnotes'>{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Change' /></form>"; } else { print " "; } print "</tr></table>"; } } function checkblank($in) { if(!$in) { return "N/A"; } return $in; } $h->endpage(); ?>
  9. Re: [mc code V2]Updated Lottery Anyone sure on how to make this happen? It would be very greatly appreciated. Thanks  
  10. Re: [mccode] Simple user rating system v2 Got anything to fix it yet? Sorry not trying to bug you.
  11. Re: [mccode] Simple user rating system v2 I just used the snip of code you gave me.
  12. Re: [mc code V2]Updated Lottery So im trying to make it so that users can purchase a MAX of 6 tickets a week I have the sql ALTER TABLE `users` ADD `ltickets` INT( 11 ) NOT NULL DEFAULT '6';   then i think i have the weekly cron correct <?php include ('config.php'); global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } 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; include('global_func.php'); $ticketPRICE = 50000; if(count($ids) > 0) { $db->query("UPDATE users SET ltickets=6"); } $jpSQL = mysql_num_rows(mysql_query("SELECT * FROM `lottery`")) or die(mysql_error()); $jackpot = money_formatter(abs((int)$jpSQL*$ticketPRICE)); $winnerSQL = mysql_query("SELECT `userid` FROM `lottery` ORDER BY RAND() LIMIT 1"); $user = mysql_fetch_assoc($winnerSQL); $creditSQL = sprintf("UPDATE `users` SET `money` = `money` + %d WHERE `userid` = (%d)", $jackpot, abs((int)$user['userid'])); event_add($user['userid'],"You won the weekly lottery and were credited {$jackpot}",$c); mysql_query("TRUNCATE TABLE `lottery`"); ?>   not sure how to do it for the main file though
  13. Re: Simple user rating system v2 Nada, same error persist.
  14. Re: I need help Please read asap Only thing that i saw that was messed up was your announcements.php and forum.php pages try uploading the originals.
  15. Re: [mccode] Simple user rating system v2   Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/trinityc/thugmayhem.com/viewuser.php on line 82   Ive tried removing the ; in $ratingtot=$r['goodratings'] - $r['badratings']; ive tried adding an ' so its like $ratingtot=$r['goodratings'] - $r['badratings']';   Idk what to do, i hate this error the most out of any other error.
  16. Re: [mc code V2]Updated Lottery Well i found a gltich in the mod, i dunno how to fix it but should it include if($ir['money'] < 10000) { die("Sorry, it costs \$10,000 to open a box. Come back when you have enough."); }   Or something simliar to this, right now you can buy a ticket but it gives you a negative money balance.
  17. Re: [mccode] gang levels   have to agree on that one, care to post your page?
  18. Re: I need help Please read asap Game Url and or images could help.
  19. Re: [mc code V2]Updated Lottery Ah, I understand. I'll try this out
  20. Re: [mccode v2] Yet Another Attack Love this, works great.
  21. Re: [mc code V2]Updated Lottery screenshot?
  22. Re: [mccode v2] Search.php in one | Optimized I've read that it is more secure.
  23. Re: [mccode v2] Improved Security on Attack System Never mind this fix works great!
  24. Re: [mccode v2] Search.php in one | Optimized slight modification made all mysql_query to $db->query made all mysql_num_rows to $db->num_rows   <?php include("globals.php"); echo '<h1>Search For a User</h1>'; if($_POST['username']) { $name = mysql_real_escape_string($_POST['username']); $fetch = $db->query("SELECT userid,username,money FROM users WHERE username LIKE('%".$name."%')"); echo ' User\'s found: '.$db->num_rows($fetch).' <table border="0" class="table" cellspacing="0" cellpadding="0" width="50%"> <tr> <th>Username</th> <th>Money</th> </tr>'; if($db->num_rows($fetch) == 0) { echo ' <tr> <td colspan="2"> <center> No user\'s found </center> </td> </tr> </table>'; $h->endpage(); exit; } while($soc = mysql_fetch_assoc($fetch)) { echo ' <tr> <td>[url="viewuser.php?u='.$soc['userid'].'"]'.$soc['username'].' ['.$soc['userid'].'][/url]</td> <td>'.money_formatter($soc['money']).'</td> </tr> <tr>'; } echo ' </tr> </table>'; $h->endpage(); exit; } if($_POST['ID']) { header("Location: viewuser.php?u=".$_POST['ID']); exit; } if($_POST['loc']) { $l = abs(@intval($_POST['loc'])); $rows = $db->query("SELECT userid,username,money FROM users WHERE location=".$l); echo ' User\'s found: '.$db->num_rows($rows).' <table border="0" class="table" cellspacing="0" cellpadding="0" width="50%"> <tr> <th>Username</th> <th>Money</th> </tr>'; if($db->num_rows($rows) == 0) { echo ' <tr> <td colspan="2"> <center> No user\'s found </center> </td> </tr> </table>'; $h->endpage(); exit; } while($soc = mysql_fetch_assoc($rows)) { echo ' <tr> <td>[url="viewuser.php?u='.$soc['userid'].'"]'.$soc['username'].' ['.$soc['userid'].'][/url]</td> <td>'.money_formatter($soc['money']).'</td> </tr> <tr>'; } echo ' </tr> </table>'; $h->endpage(); exit; } echo ' <form action="'.$_SERVER['PHP_SELF'].'" method="post"> Search by name: <input type="text" name="username"> <input type="submit" value="Search By Name"> Search by ID: <input type="text" name="ID"> <input type="submit" value="Search By ID"> Search by Location: <select name="loc" type="dropdown">'; $fe = $db->query("SELECT cityid,cityname FROM cities WHERE cityminlevel <= ".$ir['level']); while($soci = $db->fetch_row($fe)) { echo '<option value="'.$soci['cityid'].'">'.$soci['cityname'].'</option>'; } echo ' </select> <input type="submit" value="Search By Location"> </form>'; $h->endpage(); ?>
  25. Re: Simple user rating system v2   Hi, I see that this topic is a bit on the old side, but the only one of its kind that came up in the search, i was wondering about the same thing here also, i cant rate other users just one user per day.
×
×
  • Create New...