Jump to content
MakeWebGames

peterisgb

Members
  • Posts

    790
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by peterisgb

  1. all of these dont work, can anyone help.
  2. ok, i've done fixing the proper copy, but i ask has anyone got the correct images for this mod. the ones i have been given are all wrong. well heres the corrected version.   <?php include "globals.php"; global $db,$ir,$r,$c,$userid,$h; $db->query("UPDATE users SET lastpage='Mailbox' WHERE userid=$userid"); if($ir['mailban']) { die("<font color=red><h3>! ERROR</h3> You have been mail banned for {$ir['mailban']} days. <b>Reason: {$ir['mb_reason']}</font></b>"); } $_GET['ID'] = abs((int) $_GET['ID']); print "<table width=100% class='table' cellspacing='1'> <tr> <td align=center><a href='mailbox.php?action=inbox'><img src='images/indox.gif'></a></td> <td align=center><a href='mailbox.php?action=outbox'><img src='images/sent.gif'></a></td> <td align=center><a href='mailbox.php?action=compose'><img src='images/compose.gif'></a></td> <td align=center><a href='mailbox.php?action=delall'><img src='images/deleteall.gif'></a></td> <td align=center><a href='mailbox.php?action=archive'><img src='images/archiveall.gif'></a></td> <td align=center><a href='contactlist.php'><img src='images/contacts.gif'></a></td> </tr> </table> "; 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 'del': mail_massdel(); break; default: mail_inbox(); break; } function mail_inbox() { global $db,$ir,$c,$userid,$h; print<<<END <SCRIPT><!-- HIDE function setCheckboxes(the_form, do_check) { var elts = (typeof(document.forms[the_form].elements['ID[]']) != 'undefined') ? document.forms[the_form].elements['ID[]'] : (typeof(document.forms[the_form].elements['ID[]']) != 'undefined') ? document.forms[the_form].elements['ID[]'] : document.forms[the_form].elements['ID[]']; var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0; if (elts_cnt) { for (var i = 0; i < elts_cnt; i++) { elts[i].checked = do_check; } // end for } else { elts.checked = do_check; } // end if... else return true; } // STOP HIDING --></SCRIPT> END; print <<<OUT Only the last 25 messages sent to you are visible. <table width=100% class=table cellspacing="1" border="1"> <tr> <td class="h" align=center>From</td> <td class="h" align=center>Subject</td> <td class="h" align=center>Status</td> <td class="h" align=center>Read</td> <td class="h" align=center>Delete</td> </tr> <form name='masssell' method=post action=mailbox.php?action=del> OUT; $q=$db->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 25"); $i=0; while($r=$db->fetch_row($q)) { print "<tr class=\"d".($i & 1)."\"><td align=center>"; $i++; if($r['userid']) { print "<a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> [{$r['userid']}]"; } else { print "SYSTEM"; } $fm=$r['mail_subject']; if($r['mail_read'] == 0) { $status="<font color=red>Unread</font>"; } else { $status="<font color=green>Read</font>"; } print " </td> <td align=center> $fm </td> <td align=center> $status </td> <td align=center> <a href='mailbox.php?action=read&ID={$r['mail_id']}'>Open</a> </td> <td align=center> <a href='mailbox.php?action=delete&ID={$r['mail_id']}'> <img src=images/trash.gif height=20 width=20 > </a> <input type='checkbox' name='del$i' value='yes'> <input type='hidden' name='id$i' value='{$r['mail_id']}'> </td></tr>"; } print<<<END <tr> <td colspan=5 align=center><input name=sellmass type=submit id=sellmass value='Delete selected'><a href=# onClick="setCheckboxes('masssell',true); return false;'> Check All</A> | <a href='#'>Uncheck All</a> </form> </td> </tr> </table> Mail count mixed up? Click <a href='fix.php?fix=1'>Here</a> to fix END; } /* These are off function mail_inbox() { global $db,$ir,$c,$userid,$h; print <<<OUT Only the last 25 messages sent to you are visible. <table width=100% class="table" border="1" cellspacing="1"> <tr> <td class="h" width="30%">From</td> <td class="h" width="70%">Subject/Message</td> </tr> OUT; $q=$db->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 25"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>"; if($r['userid']) { print "<a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> [{$r['userid']}]"; } else { print "SYSTEM"; } $fm=urlencode($r['mail_text']); print <<<EOF </td> <td>{$r['mail_subject']}</td> </tr> <tr> <td>Sent at: {$sent} <br /> <a href='mailbox.php?action=compose&ID={$r['userid']}'>Reply</a> <br /><br /> <a href='mailbox.php?action=delete&ID={$r['mail_id']}'>Delete</a><br /><br /> <a href='preport.php?ID={$r['userid']}'>Report</a><br /><br /> </td> <td>{$r['mail_text']}</td> </tr> EOF; } if($ir['new_mail'] > 0) { $db->query("UPDATE mail SET mail_read=1 WHERE mail_to=$userid"); $db->query("UPDATE users SET new_mail=0 WHERE userid=$userid"); } echo '</table> Mail count mixed up? Click <a href='fix.php?fix=1'>Here</a> to fix'; } OFF */ function mail_outbox() { global $db,$ir,$c,$userid,$h; print "Only the last 25 messages you have sent are visible. <table width=100% cellspacing=1 class='table' border='1'><tr style='background:gray'><th>To</th><th>Subject/Message</th></tr>"; $q=$db->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 25"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td><a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> [{$r['userid']}]</td><td>{$r['mail_subject']}</td></tr><tr><td>Sent at: $sent </td><td>{$r['mail_text']}</td></tr>"; } print "</table>"; } function mail_compose() { global $db,$ir,$c,$userid,$h; print "<form action='mailbox.php?action=send' method='post'> <table width=100% cellspacing=1 class='table' border='1'> <tr> <td>Contact to send to:</td> <td>"; $q=$db->query("SELECT c.*, u.username FROM contactlist c LEFT JOIN users u ON c.cl_ADDED=u.userid WHERE c.cl_ADDER={$userid} ORDER BY u.username ASC"); if($db->num_rows($q) == 0) { print "You have no contacts!"; } else { print "<select name='user1' type='dropdown'><option value=''><select a contact...></option>"; while($r=$db->fetch_row($q)) { print "<option value='{$r['username']}'>{$r['username']}</option>"; } print "</select>"; } if($_GET['ID']) { $users=$db->fetch_single($db->query("SELECT username FROM users WHERE userid={$_GET['ID']}")); } print "</td></tr><tr> <td><b>OR</b> Enter a username to send to:</td><td><input class='textbox' type='text' name='user2' value='{$users}' /></td></tr><tr> <td>Subject:</td> <td><input class='textbox' type='text' name='subject' /></td></tr><tr> <td>Message:</td> <td> <textarea class='textbox' rows=5 cols=40 name='message'></textarea> <table class=textbox border=0 cellspacing=0 width=100%> <td><b> :] </b> <td><img src='smilies/happy.gif'> <td><b> :)</b> <td><img src='smilies/biggrin.gif'> <td><b> :cool </b> <td><img src='smilies/cool.gif'> <td><b> O.o </b> <td><img src='smilies/blink.gif'> <td><b> :/ </b> <td><img src='smilies/dry.gif'> </table> <table class=textbox border=0 cellspacing=0 width=100%> <td><b> ;) </b> <td><img src='smilies/wink.gif'> <td><b> :?: </b> <td><img src='smilies/huh.gif'> <td><b> :lol: </b> <td><img src='smilies/laugh.gif'> <td><b> :-: </b> <td><img src='smilies/mellow.gif'> <td><b> :angry: </b> <td><img src='smilies/angry.gif'> </table> <table class=textbox border=0 cellspacing=0 width=100%> <td><b> :( </b> <td><img src='smilies/sad.gif'> <td><b> O.O </b> <td><img src='smilies/ph34r.gif'> <td><b> :roll: </b> <td><img src='smilies/rolleyes.gif'> <td><b> :zzz: </b> <td><img src='smilies/sleep.gif'> <td><b> :)) </b> <td><img src='smilies/smile.gif'> </table> <table class=textbox border=0 cellspacing=0 width=100%> <td><b> :P </b> <td><img src='smilies/tongue.gif'> <td><b> :S </b> <td><img src='smilies/unsure.gif'> <td><b> :nut: </b> <td><img src='smilies/wacko.gif'> <td><b> :O </b> <td><img src='smilies/ohmy.gif'> <td><b> :heart: </b> <td><img src='smilies/wub.gif'> </table> </td></tr><tr> <td colspan=2><input type='submit' class='textbox' value='Send' /></td></tr></table></form>"; if($_GET['ID']) { print " <table width=75% border=1><tr><td colspan=2><b>Your last 5 mails to/from this person:</b></td></tr>"; $q=$db->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=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>$sent</td> <td><b>{$r['sender']} wrote:</b> {$r['mail_text']}</td></tr>"; } print "</table>"; } } function mail_send() { global $db,$ir,$c,$userid,$h; $subj=str_replace(array("\n"),array(" "),strip_tags($_POST['subject'])); $msg=str_replace(array("\n"),array(" "),strip_tags($_POST['message'])); if($_POST['user1'] && $_POST['user2']) { die("Please do not select a contact AND enter a username, only do one. <a href='mailbox.php'>> Back</a>"); } if(!$_POST['user1'] && !$_POST['user2']) { die("You must select a contact or enter a username. <a href='mailbox.php'>> Back</a>"); } $codes = array( ':]', ':)', 'o:', 'O.o', ':/', ':angry:', ':?:', ':lol:', ':-:', ':O', ':(', 'O.O', ':roll:', ':zzz:', ':))', ':P', ':S', ':nut:', ';)', ':heart:', 'XD', ); $images = array( '<img src=smilies/happy.gif>', '<img src=smilies/biggrin.gif>', '<img src=smilies/cool.gif>', '<img src=smilies/blink.gif>', '<img src=smilies/dry.gif>', '<img src=smilies/angry.gif>', '<img src=smilies/huh.gif>', '<img src=smilies/laugh.gif>', '<img src=smilies/mellow.gif>', '<img src=smilies/ohmy.gif>', '<img src=smilies/sad.gif[>', '<img src=smilies/ph34r.gif>', '<img src=smilies/rolleyes.gif>', '<img src=smilies/sleep.gif>', '<img src=smilies/smile.gif>', '<img src=smilies/tongue.gif>', '<img src=smilies/unsure.gif>', '<img src=smilies/wacko.gif>', '<img src=smilies/wink.gif>', '<img src=smilies/wub.gif>', '<img src=]smilies/XD.gif>]', ); $newmsg = str_replace($codes, $images, $msg); $to=($_POST['user1']) ? $_POST['user1'] : $_POST['user2']; $q=$db->query("SELECT userid FROM users WHERE username='{$to}'"); if($db->num_rows($q)==0) { die("You cannot send mail to nonexistant users. <a href='mailbox.php'>> Back</a>"); } $to=$db->fetch_single($q); $db->query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$msg')"); $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid={$to}"); print "Message sent. <a href='mailbox.php'>> Back</a>"; } function mail_delete() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM mail WHERE mail_id={$_GET['ID']} AND mail_to=$userid"); print "Message deleted. <a href='mailbox.php'>> Back</a>"; } 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. <a href='mailbox.php?action=delall2'>> Yes, delete all messages</a> <a href='mailbox.php'>> No, go back</a>"; } function mail_delall2() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM mail WHERE mail_to=$userid"); print "All ".$db->affected_rows()." mails in your inbox were deleted. <a href='mailbox.php'>> Back</a>"; } function mail_archive() { global $ir,$c,$userid,$h; print "This tool will download an archive of all your messages. <a href='dlarchive.php?a=inbox'>> Download Inbox</a> <a href='dlarchive.php?a=outbox'>> Download Outbox</a>"; } function mail_view() { global $db,$ir,$c,$userid,$h; print <<<OUT <table width=100% class="table" border="1" cellspacing="1"> <tr> <td class="h" width=25%>From</td> <td class="h" width=75%>Subject/Message</td> </tr> OUT; $id= abs((int) $_GET['ID']); $q=$db->query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_id=$id LIMIT 1"); $r=$db->fetch_row($q); $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>"; if($r['userid']) { print "<a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> [{$r['userid']}]"; } else { print "SYSTEM"; } $fm=urlencode($r['mail_text']); print "</td>\n<td>{$r['mail_subject']}</td></tr><tr><td>Sent at: $sent<br /> "; if($ir['mailban'] == 0) { print "<a href='mailbox.php?action=compose&ID={$r['userid']}'>Reply</a><br /> "; } print "<a href='mailbox.php?action=delete&ID={$r['mail_id']}'>Delete</a><br /> <a href='preport.php?ID={$r['userid']}'>Report</a></td><td>{$r['mail_text']}</td></tr>"; if($r['mail_read'] == 0) { $db->query("UPDATE mail SET mail_read=1 WHERE mail_to=$userid AND mail_id=$id LIMIT 1"); $db->query("UPDATE users SET new_mail=new_mail-1 WHERE userid=$userid"); } print "</table>"; } function mail_massdel() { global $db,$ir,$c,$userid,$h; $counter = 1; $deleted=0; while ($counter < 25) { $dodel = "del" . $counter; if ($_POST[$dodel] == "yes") { $delid = "id" . $counter; $db->query("DELETE FROM mail WHERE mail_to=$userid AND mail_id={$_POST[$delid]}") or die(mysql_error()); $deleted++; } $counter++; } print "<center> $deleted messages deleted. <a href=mailbox.php>> Back</a>"; } print " Mail count mixed up? Click <a href='fix.php?fix=1'>Here</a> to fix"; $h->endpage(); ?>
  3. wrong forum mate. Delete this and retry post this here. http://makewebgames.io/forumdisplay.php/301-Requests-amp-In-Production
  4. thanks, you wouldnt have a decent copy of this, the copy i am using has loads of bugs which i cant see how to fix.
  5. smilies images,
  6. i have fixed it, it was to do with the css in header????
  7. huh? i dont get what you mean
  8. i can see nothing in any of these pages aswell
  9. thus this hasnt worked in my case.
  10. oh, the minutes time, and few other things work fine. and when you go traveling the cost is 10,000 and it takes 10,000 if you only have this much in your hand. but if you have 20,000 it takes 20,000, if you have more it still takes 20,000.
  11. hi, i need a little help, everything on the game is double doing everything, when you log in the count puts double in (logginedin.php) crimes (criminal.php) gym, and banks. i know that these aint the pages which the error is on, i've looked thro the globals, header, global_func and i cant see what is doing it. i checked for double posts and still cant see why this is doing it, any help would be good, or hints on what i can do, or look for. Thanks.
  12. well i've always had a problem getting querys from the item section, because i would beleive that once i understand how to do that i can contiune, i think going along of the idea of collecting the weapon data + post=updade+etc i tried using this weapon way when displaying weapons in iframe on the side menu, but this failed.
  13. i dont get any of that
  14. has anyone got the images for this mod?
  15. anyone got the images for this?
  16. thanks biohazard. :)
  17. cool, thanks for this, now moving onto weapon upgrade, i dunno where to start.
  18. has anyone got a copy of the orignal of this or know the forum link of the orignal link, thanks.
  19. ok, here goes Well so you'll need to place these sql into the users table iron int 54 default 0 bronze int 54 default 0 silver int 54 default 0 copper int 54 default 0 tin int 54 default 0   Make a Page and call it minestats.php <?php include "globals.php"; global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET lastpage='Mine Stats' WHERE userid=$userid"); print "<h3>General Info:</h2>"; $exp=(int)($ir['exp']/$ir['exp_needed']*100); print "<table width='50%'><tr> <td><b>Iron:</b> {$ir['iron']}</td> <td><b>Bronze:</b> {$ir['bronze']}</td></tr><tr> <td><b>Silver:</b> {$ir['silver']}</td> <td><b>Copper:</b> {$ir['copper']}</td></tr><tr> <td><b>Tin:</b> {$ir['tin']}</td> <td><b>Gold:</b> {$ir['crystals']}</td></tr><tr> </table> <br /> <a href='mine.php'><h3>Go Mining</h3></a> <br /> "; if(isset($_POST['pn_update'])) { $db->query("UPDATE users SET user_notepad='{$_POST['pn_update']}' WHERE userid=$userid"); $ir['user_notepad']=stripslashes($_POST['pn_update']); print "<hr><b>Personal Notepad Updated!</b>"; } print "<hr>Your Personal Notepad:<form action='index.php' method='post'> <textarea rows='10' cols='50' name='pn_update'>".htmlspecialchars($ir['user_notepad'])."</textarea><br /> <input type='submit' value='Update Notes' /></form>"; $h->endpage(); ?>   call this one mine.php   <?php include "globals.php"; print " <div align='center'> Welcome to the mine. But you can go ahead and try, you might just get lucky.<br /> <a href='gomining.php'>Go Mining for Gold</a> <a href='gominingi.php'>Go Mining for Iron</a> <a href='gominingb.php'>Go Mining for Bronze</a> <a href='gominings.php'>Go Mining for Silver</a> <a href='gominingc.php'>Go Mining for Copper</a> <a href='gominingt.php'>Go Mining for Tin</a>"; ?> <? $h->endpage(); ?>   Call this one goming.php <?php include "globals.php"; $rand = rand(1,5); $rand2 = rand(1,5); $reward = crystals; $randreward = rand(1,25); $userid = $ir['userid']; if($ir['brave'] > 4) { if($rand == $rand2) { $db->query("UPDATE users SET brave=brave-4 WHERE userid=$userid"); $db->query("UPDATE users SET $reward=$reward+$randreward WHERE userid=$userid"); print "While mining through the rubble you came across $randreward gold. <a href='mine.php'>Go Back</a>"; } else { $db->query("UPDATE users SET brave=brave-4 WHERE userid=$userid"); print "Sorry, you did not find anything. <a href='mine.php'>Go Back</a><br />"; } } else { print "Sorry, but you cant mine for at the moment. <a href='index.php'>Go Back</a><br />"; } ?>   for bronze eetc, copy the page above and name the file and save.
  20. well theres the thing, i got so fed up with it failing and not working so i deleted it. but ihave have another go and post it up
  21. i would post it but it dont work :(
  22. yh.. lol, to go abit more on this, beyond me of course, but the idea is, you mine, ore, bronze, tin and more, Then the idea was to melt them, combine them together then upgrade the wepaons, i'm working on the mineing part now
  23. http://makewebgames.io/showthread.php/40586-Attacks-into-Units
  24. duh lol, thanks djkanna, this works a charm now Here is completed file for those who to wish to use this   <?php include "sglobals.php"; //This contains general thingies switch($_GET['action']) { case 'helpupdate': helpupdate(); break; default: index(); break; } function index() { global $db,$h,$set; print "<h3>Help Tutorial</h3> <form action='helptut.php?action=helpupdate' method='post'> <textarea rows=30 cols=90 name='helptext' class='input'>{$set['help']}</textarea><br /> <input type='submit' value='Update Help Tutorial' /></form>"; } function helpupdate() { global $db,$h,$set; if($_POST['helptext']) { $db->query("UPDATE settings SET conf_value='{$_POST['helptext']}' WHERE conf_name='help'"); $set['help']=stripslashes($_POST['helptext']); print "Help Updated!<a href='helptut.php'>Back</a>"; } } $h->endpage(); ?>
×
×
  • Create New...