Jump to content
MakeWebGames

Richard

Members
  • Posts

    277
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Richard

  1. Re: Tutorial: v2 - v1 Conversion also, doesnt $db->fetch_row( have to be replaced with mysql_fetch_array(
  2. Create a file called crimes.php <?php include "globals.php"; if($ir['jailtime'] or $ir['hospital']) { die("<center>This Page is Unavailable while in Hospital or Jail."); } $_GET['ID'] = abs((int) $_GET['ID']); $getid=$_GET['ID']; if(!$getid) { $q=$db->query("SELECT * FROM crimegroups WHERE cgID>0 ORDER BY cgID ASC;",$c); print "Choose a Crime Group from the list below...<hr width=80%> <form action='crimes.php?ID={$_GET['ID']}' method='get'> <table width=80% cellspacing=1> <tr bgcolor=#500001> <th><font color=white>Crime</font></th> <th><font color=white>Brave Cost</font></th> <th><font color=white>Do</font></th></tr>"; if($db->num_rows($q) == 0) { print "<tr class='row$current_row'><td colspan=3></td></tr>"; $current_row = 1 - $current_row; } while($r=$db->fetch_row($q)) { print "<tr class='row$current_row'><td><font color=black>{$r['cgNAME']}</td><td><font color=#FF0000>-{$r['cgBRAVE']} Brave</font></td><td><center><input type='radio' name='ID' value='{$r['cgID']}' /></td></tr>"; $current_row = 1 - $current_row; } print "<tr bgcolor=#500001> <td colspan=2><div align=center><input type='submit' value='Next Step'></div></td><td></td> </tr></table></form> <hr width='80%'>>[url='index.php'] Back[/url]<hr width=80%>"; } else { $getid=($_GET['ID']); $q=$db->query("SELECT * FROM crimes WHERE crimeGROUP=$getid ORDER BY crimeID ASC;",$c); $r=$db->fetch_row($q); if (!$db->num_rows($q)) { print "Invalid Crime ID"; } else { $q=$db->query("SELECT * FROM crimes WHERE crimeGROUP=$getid ORDER BY crimeID ASC;",$c); print "Choose a Crime from the list below...<hr width=80%> <form action='docrime.php' method='get2'> <table width=80% cellspacing=1> <tr bgcolor=#500001> <th><font color=white>Crime</font></th> <th><font color=white>Brave Cost</font></th> <th><font color=white>Do</font></th></tr>"; if($db->num_rows($q) == 0) { print "<tr class='row$current_row'><td colspan=3></td></tr>"; $current_row = 1 - $current_row; } while($r=$db->fetch_row($q)) { print "<tr class='row$current_row'><td><font color=black>{$r['crimeNAME']}</td><td><font color=#FF0000>-{$r['crimeBRAVE']} Brave</font></td><td><center><input type='radio' name='c' value='{$r['crimeID']}' /></td></tr>"; $current_row = 1 - $current_row; } print "<tr bgcolor=#500001> <td colspan=2><div align=center><input type='submit' value='Do Crime'></div></td><td></td> </tr></table></form> <hr width='80%'>>[url='index.php'] Back[/url]<hr width=80%>"; } } $h->endpage(); ?>   Enjoy! Ive tested it and it works for me
  3. Re: View User Addon - Profile Views Im not sure if im wrong, but wouldnt that set the viewers profile views as +1, not the person's profile being viewed?
  4. Re: Enhance course for V2 Nice mod :)
  5. Re: [v2]Forum Credits w/ exchange[v2] Very nice mod, I'll definately use this :)
  6. This should make your hospital time display as X days, X hours, X mins In hospital.php find: while($r=mysql_fetch_array($q)) {   Add below: $time=$r['hospital']; $t4=floor($time/60/24); $t1=floor($time/60) % 24; $t2=$time % 60; if($t2 < 10) { $t3="0".$t2; } else { $t3=$t2; } if($t4) { $t5="$t4 days,"; } else { $t5=""; } if($t1) { $t1="$t1 hours,"; } else { $t1=""; } if($t2 == 1) { $t2="< 1 min"; } else { $t2="$t2 mins"; }   Replace: {$r['hospital']} minutes   with: $t5 $t1 $t2   This should work for both versions of mccodes
  7. Re: Updated Mailbox [v1] redsnake420 try this: In mailbox.php find: <tr> <td colspan=2><center><input type='submit' value='Send' /></td></tr> Add after: <tr><td colspan=2 align=center>:] = [img=smilies/happy.gif] :D = [img=smilies/biggrin.gif] :oo = [img=smilies/cool.gif] O.o = [img=smilies/blink.gif] :/ = [img=smilies/dry.gif] :angry = [img=smilies/angry.gif] :? = [img=smilies/huh.gif] :lol = [img=smilies/laugh.gif] :-: = [img=smilies/mellow.gif] :o = [img=smilies/ohmy.gif] :( = [img=smilies/sad.gif] o.o = [img=smilies/ph34r.gif] :roll = [img=smilies/rolleyes.gif] :zzz = [img=smilies/sleep.gif] :) = [img=smilies/smile.gif] :P = [img=smilies/tongue.gif] :S = [img=smilies/unsure.gif] :nut = [img=smilies/wacko.gif] ;) = [img=smilies/wink.gif] :heart = [img=smilies/wub.gif]</td></tr>   That should display the smilies Just under the mail compose form :)
  8. Re: [v1]Attack Stats FREE[v1] Very nice :)
  9. Re: Updated Mailbox [v1] You have to put the images into a folder called smilies, e.g http://www.yourgamename.com/smilies/smiley1.gif
  10. Re: Updated Mailbox [v1] Im very sorry GrimR, Im not used to using v2 code so I can't really help... Ive updated the original post to fix the problem of reading other people mails...you can now read your outbox and inbox but not other peoples mails :)
  11. Re: Updated Mailbox [v1] It seems the most people finding bugs with this are using v2, I think this may be bacuse the mail send function has to insert a query to update the new_mail field in users table?
  12. Re: Updated Mailbox [v1] Thanks for the temporary fix :) Ill try to figure somthing out...
  13. Re: Updated Mailbox [v1] I'll just stick with the current title, also thanks Ruiined-Priince for the code to stop sql injections
  14. Re: Updated Mailbox [v1] It works fine for me, are you using v1 or v2?
  15. Re: Updated Mailbox [v1] What do you mean about the mail box link? :?
  16. Re: Updated Mailbox [v1] http://rapidshare.de/files/38860186/Smi ... 8.zip.html These are the smilies I have on my mailbox right now.
  17. Re: Updated Mailbox [v1]
  18. Re: Updated Mailbox [v1] Im sorry, Im not sure...It works fine for me in v1
  19. Re: Updated Mailbox [v1] Thank you for Converting Klikoka :)
  20. This took me two hours to finish editing, It should work perfectly... Replace your mailbox.php with this <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ 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); $current_row = 0; 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(); if($ir['mailban']) { die("<center><font color=red><font size='4' face='Arial, Helvetica, sans-serif'>Error</font> You have been mail banned for {$ir['mailban']} days. [b]Reason: {$ir['mb_reason']}</font>[/b]"); } $_GET['ID'] = abs((int) $_GET['ID']); print "<center><font size='4' face='Arial, Helvetica, sans-serif'>Mail Box</font><hr width=90%><table width=90% border=0><tr> <td width=20% align=center>> [url='mailbox.php?action=compose'] Compose[/url]</td> <td width=20% align=center>> [url='mailbox.php?action=outbox'] Outbox[/url]</td> <td width=20% align=center>> [url='mailbox.php?action=archive'] Save[/url]</td> <td width=20% align=center>> [url='mailbox.php?action=delall'] Delete All[/url]</td> <td width=20% align=center>> [url='mailbox.php?action=mailhome'] Inbox[/url]</td> </tr></table><hr width=90%>"; switch($_GET['action']) { case 'inbox': mail_inbox(); break; case 'outbox': mail_outbox(); break; case 'compose': mail_compose(); break; case 'delete': mail_delete(); break; case 'send': mail_send(); break; case 'delall': mail_delall(); break; case 'delall2': mail_delall2(); break; case 'archive': mail_archive(); break; case 'read': mail_view(); break; case 'readmail': mail_view_outbox(); break; case 'mailhome': mail_home(); break; default: mail_home(); break; } function mail_home() { global $ir,$c,$userid,$h; print "Below are the Last 10 Messages Sent to You<hr width=90%> <table width=90% cellpadding=2><tr bgcolor=AAAAAA><th width=30%>From</th><th width=40%>Subject</th><th width=15%>Status</th><th width=15%>Manage</th></tr>"; $q=mysql_query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_to=$userid ORDER BY mail_time DESC LIMIT 10",$c); while($r=mysql_fetch_array($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr class='row$current_row'><td>"; if($r['userid']) { print "[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]"; } else { print "SYSTEM"; } $fm=urlencode($r['mail_subject']); if($r['mail_read'] == 0) { $status="<font color=red>Unread</font>"; } else { $status="<font color=green>Read</font>"; } print "</td>\n<td>[b]Subject:[/b] [url='mailbox.php?action=read&ID={$r[']{$r['mail_subject']}[/url] [i]Sent at: $sent[/i]</td><td><center> $status</td><td><center>[[url='mailbox.php?action=delete&ID={$r[']Delete[/url]] [[url='mailbox.php?action=read&ID={$r[']Read[/url]]</td></tr>"; $current_row = 1 - $current_row; } } function mail_view() { global $ir,$c,$userid,$h; print " <table width=90% cellpadding=2>"; $id= abs((int) $_GET['ID']); $q=mysql_query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_id=$id LIMIT 1"); while($r=mysql_fetch_array($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); if($ir['userid'] <> $r['mail_to']) { die("You cannot read mail which does not belong to you..."); } print "<tr class='row$current_row'><td bgcolor=#AAAAAA>"; if($r['userid']) { print "[b]Mail From: [/b][url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]"; } else { print "SYSTEM"; } $fm=urlencode($r['mail_text']); print "<th bgcolor=#AAAAAA width=75%>[b]Subject:[/b] {$r['mail_subject']}</th></tr><tr><td>Sent at: $sent [url='mailbox.php?action=compose&ID={$r[']Reply[/url] [url='mailbox.php?action=delete&ID={$r[']Delete[/url] [url='preport.php?ID={$r[']Report[/url]</td><td>{$r['mail_text']}</td></tr></table> <form action='mailbox.php?action=send' method='post'> <table width=90% cellpadding=2><th colspan=2 bgcolor=#AAAAAA>[b]Reply To This Message[/b]</th> <tr class='row$current_row'> <td>User's ID:</td> <td><input type='text' name='userid' value='{$r['userid']}' size='5' maxlength='10' /> [i]<font size=1.9>(E.g. 123456)</font>[/i]</td></tr><tr> <td>Subject:</td> <td><input type='text' name='subject' size='50' maxlength='50' value=' ' /> [i]<font size=1.9>(E.g. Hello there)</font>[/i]</td></tr><tr> <td>Message:</td> <td><textarea rows='10' cols='75%' name='message'></textarea></td></tr><tr> <td colspan=2><center><input type='submit' value='Send' /></td></tr></form>"; $current_row = 1 - $current_row; } mysql_query("UPDATE mail SET mail_read=1 WHERE mail_id=$id",$c); } function mail_view_outbox() { global $ir,$c,$userid,$h; print " <table width=90% cellpadding=2>"; $id= abs((int) $_GET['ID']); $q=mysql_query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_id=$id LIMIT 1"); while($r=mysql_fetch_array($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); if($ir['userid'] <> $r['mail_from']) { die("You cannot read mail which you haven't sent..."); } print "<tr class='row$current_row'><td bgcolor=#AAAAAA>"; if($r['userid']) { print "[b]Mail From: [/b][url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]"; } else { print "SYSTEM"; } $fm=urlencode($r['mail_text']); print "<th bgcolor=#AAAAAA width=75%>[b]Subject:[/b] {$r['mail_subject']}</th></tr><tr><td>Sent at: $sent [url='mailbox.php?action=compose&ID={$r[']Reply[/url] [url='mailbox.php?action=delete&ID={$r[']Delete[/url] [url='preport.php?ID={$r[']Report[/url]</td><td>{$r['mail_text']}</td></tr></table> <form action='mailbox.php?action=send' method='post'> <table width=90% cellpadding=2><th colspan=2 bgcolor=#AAAAAA>[b]Reply To This Message[/b]</th> <tr class='row$current_row'> <td>User's ID:</td> <td><input type='text' name='userid' value='{$r['userid']}' size='5' maxlength='10' /> [i]<font size=1.9>(E.g. 123456)</font>[/i]</td></tr><tr> <td>Subject:</td> <td><input type='text' name='subject' size='50' maxlength='50' value=' ' /> [i]<font size=1.9>(E.g. Hello there)</font>[/i]</td></tr><tr> <td>Message:</td> <td><textarea rows='10' cols='75%' name='message'></textarea></td></tr><tr> <td colspan=2><center><input type='submit' value='Send' /></td></tr></form>"; $current_row = 1 - $current_row; } mysql_query("UPDATE mail SET mail_read=1 WHERE mail_id=$id",$c); } function mail_outbox() { global $ir,$c,$userid,$h; print "Below are the Last 10 Messages You have Sent<hr width=90%> <table width=90% cellpadding=2><tr bgcolor=AAAAAA><th width=35%>From</th><th width=50%>Subject</th><th width=15%>Manage</th></tr>"; $q=mysql_query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_to=u.userid WHERE m.mail_from=$userid ORDER BY mail_time DESC LIMIT 10",$c); while($r=mysql_fetch_array($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr class='row$current_row'><td>"; if($r['userid']) { print "[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]"; } else { print "SYSTEM"; } $fm=urlencode($r['mail_subject']); if($r['mail_read'] == 0) { $status="<font color=red>Unread</font>"; } else { $status="<font color=green>Read</font>"; } print "</td>\n<td>[b]Subject:[/b] [url='mailbox.php?action=readmail&ID={$r[']{$r['mail_subject']}[/url] [i]Sent at: $sent[/i]</td><td><center>[[url='mailbox.php?action=readmail&ID={$r[']Read[/url]]</td></tr>"; $current_row = 1 - $current_row; } } function mail_compose() { global $ir,$c,$userid,$h; print "<form action='mailbox.php?action=send' method='post'> <table width=90% cellpadding=2> <tr><td colspan=3 bgcolor=#AAAAAA>[b] Send a Message[/b]</td></tr><tr> <td>User's ID:</td> <td><input type='text' name='userid' value='{$_GET['ID']}' size='5' maxlength='10' /> [i]<font size=1.9>(E.g. 123456)</font>[/i]</td></tr><tr> <td>Subject:</td> <td><input type='text' name='subject' size='50' maxlength='50' value=' ' /> [i]<font size=1.9>(E.g. Hello there)</font>[/i]</td></tr><tr> <td>Message:</td> <td><textarea rows='10' cols='75%' name='message'></textarea></td></tr><tr> <td colspan=2><center><input type='submit' value='Send' /></td></tr></table></form><hr width=90%>> [url='mailbox.php']Back to Messages[/url]<hr width=90%>"; if($_GET['ID']) { print " <table width=90% cellpadding=2><tr><td colspan=2 bgcolor=#AAAAAA>[b]Your last 5 mails to/from this person:[/b]</td></tr>"; $q=mysql_query("SELECT m.*,u1.username as sender from mail m left join users u1 on m.mail_from=u1.userid WHERE (m.mail_from=$userid AND m.mail_to={$_GET['ID']}) OR (m.mail_to=$userid AND m.mail_from={$_GET['ID']}) ORDER BY m.mail_time DESC LIMIT 5",$c); while($r=mysql_fetch_array($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr class='row$current_row'><td>$sent</td> <td>[b]{$r['sender']} wrote:[/b] {$r['mail_text']}</td></tr>"; $current_row = 1 - $current_row; } print "</table>"; } } function mail_send() { global $ir,$c,$userid,$h; $subj=str_replace(array("\n"),array(" "),strip_tags($_POST['subject'])); $msg=str_replace(array("\n"),array(" "),strip_tags($_POST['message'])); $codes = array( ':]', ':D', ':oo:', 'O.o', ':/', ':angry:', ':?:', ':lol:', ':-:', ':O', ':(', 'O.O', ':roll:', ':zzz:', ':)', ':P', ':S', ':nut:', ';)', ':heart:', 'XD', ); $images = array( '[img=smilies/happy.gif]', '[img=smilies/biggrin.gif]', '[img=smilies/cool.gif]', '[img=smilies/blink.gif]', '[img=smilies/dry.gif]', '[img=smilies/angry.gif]', '[img=smilies/huh.gif]', '[img=smilies/laugh.gif]', '[img=smilies/mellow.gif]', '[img=smilies/ohmy.gif]', '[img=smilies/sad.gif]', '[img=smilies/ph34r.gif]', '[img=smilies/rolleyes.gif]', '[img=smilies/sleep.gif]', '[img=smilies/smile.gif]', '[img=smilies/tongue.gif]', '[img=smilies/unsure.gif]', '[img=smilies/wacko.gif]', '[img=smilies/wink.gif]', '[img=smilies/wub.gif]', '[img=smilies/XD.gif]', ); $newmsg = str_replace($codes, $images, $msg); $to= (int) $_POST['userid']; mysql_query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$newmsg')",$c) or die(mysql_error()); print "Your Message has been Sent. [url='mailbox.php']> Back[/url]"; } function mail_delete() { global $ir,$c,$userid,$h; mysql_query("DELETE FROM mail WHERE mail_id={$_GET['ID']} AND mail_to=$userid",$c); print "Message deleted. [url='mailbox.php']> Back[/url]"; } function mail_delall() { global $ir,$c,$userid,$h; print "This will delete all the messages in your inbox. There is [b]NO[/b] undo, so be sure. [url='mailbox.php?action=delall2']> Yes, delete all messages[/url] [url='mailbox.php']> No, go back[/url]"; } function mail_delall2() { global $ir,$c,$userid,$h; mysql_query("DELETE FROM mail WHERE mail_to=$userid",$c); print "All ".mysql_affected_rows($c)." mails in your inbox were deleted. [url='mailbox.php']> Back[/url]"; } function mail_archive() { global $ir,$c,$userid,$h; print "This tool will download an archive of all your messages. [url='dlarchive.php?a=inbox']> Download Inbox[/url] [url='dlarchive.php?a=outbox']> Download Outbox[/url]"; } $h->endpage(); ?> I hope you enjoy! :)
  21. Re: Casino with slots [V2] I made some better images. Just upload the zip folder to your cpanel and Extract. To use them change all the places it says .gif in your casino.php to .PNG http://rapidshare.com/files/98184253/slots.zip.html
  22. Re: Search For Gang Looks good, but what is this for ? include "storm.php";
  23. Re: Advanced Usersonline Looks great, Thanks :)
  24. Re: [v1]Virus Mod[v1] Thanks :)
  25. Re: Gym with Current Stats (v1) Ive just slightly changed the file, I accidentally left the validation link on, so if you had used that it would have tried to link to valid.php, sorry
×
×
  • Create New...