
jds137
Members-
Posts
402 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by jds137
-
Re: Usersonline [V2] very nice mod
-
Re: Advanced Dating (v1) Does anyone know how we would add this mod to the one I am posting from another mod done here? I tried doing it, and came up with a blank: <?php /*----------------------------------------------------- -- Advanced Marriage Mod -- Product Copyright (c) Halo 2008 -- To be sold as freeware, do not re-sell -- Free for CE Members | Mccode V2 -----------------------------------------------------*/ include "globals.php"; $m=$db->query("SELECT * FROM users WHERE userid={$ir['married']}"); $par=$db->fetch_row($m); if($ir['married'] == 0) { die("You are not married, come back when you have a partner"); } switch($_GET['action']) { case 'givemoney': give_money_form(); break; case 'givemoneysub': give_money_submit(); break; case 'givecrystals': give_crystals_form(); break; case 'givecrystalssub': give_crystals_submit(); break; case 'givebank': give_bank_form(); break; case 'givebanksub': give_bank_submit(); break; case 'givecyber': give_cyber_form(); break; case 'givecybersub': give_cyber_submit(); break; case 'takemoney': take_money_form(); break; case 'takemoneysub': take_money_submit(); break; case 'takecrystals': take_crystals_form(); break; case 'takecrystalssub': take_crystals_submit(); break; case 'takebank': take_bank_form(); break; case 'takebanksub': take_bank_submit(); break; case 'takecyber': take_cyber_form(); break; case 'takecybersub': take_cyber_submit(); break; case 'sendmessage': send_message_form(); break; case 'sendmessagesub': send_message_submit(); break; case 'sleep': sleep_form(); break; case 'sleepsub': sleep_submit(); break; case 'affair': begin_affair(); break; case 'doaffair': do_affair(); break; case 'divorce': divorce_form(); break; case 'divorcesub': divorce_submit(); break; case 'allowence': allowence_form(); break; case 'council': begin_council(); break; case 'docouncil': do_council(); break; default: index(); break; } function give_money_form() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Giving Money</h3> This action will give your money to your partner <form action='partner.php?action=givemoneysub' method='post'> Money: <input type='text' name='money' value='{$ir['money']}'> <input type='submit' value='Give Money' /></form>"; } function give_money_submit() { global $db,$ir,$c,$h,$userid,$par; if ($ir['money'] < $_POST['money']) { die("You are trying to give more money than you can [url='partner.php?action=givemoney']Back[/url]"); } else { $db->query("UPDATE users SET money=money+{$_POST['money']} WHERE userid={$par['userid']}"); $db->query("UPDATE users SET money=money-{$_POST['money']} WHERE userid=$userid"); event_add($par['userid'],"You partner has just given you \${$_POST['money']}",$c); print"You gave \${$_POST['money']} to your partner"; } } function give_crystals_form() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Giving Crystals</h3> This action will give your crystals to your partner <form action='partner.php?action=givecrystalssub' method='post'> Crystals: <input type='text' name='crystals' value='{$ir['crystals']}'> <input type='submit' value='Give Crystals' /></form>"; } function give_crystals_submit() { global $db,$ir,$c,$h,$userid,$par; if ($ir['crystals'] < $_POST['crystals']) { die("You are trying to give more crystals than you can [url='partner.php?action=givecrystals']Back[/url]"); } else { $db->query("UPDATE users SET crystals=crystals+'{$_POST['crystals']}' WHERE userid={$par['userid']}"); $db->query("UPDATE users SET crystals=crystals-'{$_POST['crystals']}' WHERE userid=$userid"); event_add($par['userid'],"You partner has just given you {$_POST['crystals']} crystals",$c); print"You gave {$_POST['crystals']} crystals to your partner"; } } function give_bank_form() { global $db,$ir,$c,$h,$userid,$par; if ($ir['bankmoney'] < 0) { die("You dont have a bank account"); } if ($par['bankmoney'] < 0) { die("Your partner dose not have a bank account"); } else { print "<h3>Giving Bank Money</h3> This action will give bank money to your partner <form action='partner.php?action=givebanksub' method='post'> Bank Money: <input type='text' name='bank' value='{$ir['bankmoney']}'> <input type='submit' value='Give Bank Money' /></form>"; } } function give_bank_submit() { global $db,$ir,$c,$h,$userid,$par; if ($ir['bankmoney'] < $_POST['bank']) { die("You are trying to give more bank money than you can [url='partner.php?action=givecrystals']Back[/url]"); } else { $db->query("UPDATE users SET bankmoney=bankmoney+'{$_POST['bank']}' WHERE userid={$par['userid']}"); $db->query("UPDATE users SET bankmoney=bankmoney-'{$_POST['bank']}' WHERE userid=$userid"); event_add($par['userid'],"You partner has just wired you \${$_POST['bank']} into your bank account",$c); print"You wired \${$_POST['bank']} to your partner"; } } function give_cyber_form() { global $db,$ir,$c,$h,$userid,$par; if ($ir['cybermoney'] < 0) { die("You dont have a cyber bank account"); } if ($par['cybermoney'] < 0) { die("Your partner dose not have a cyber bank account"); } else { print "<h3>Giving Cyber Bank Money</h3> This action will give cyber bank money to your partner <form action='partner.php?action=givecybersub' method='post'> Bank Money: <input type='text' name='cyber' value='{$ir['cybermoney']}'> <input type='submit' value='Give Cyber Money' /></form>"; } } function give_cyber_submit() { global $db,$ir,$c,$h,$userid,$par; if ($ir['cybermoney'] < $_POST['cyber']) { die("You are trying to give more cyber bank money than you can [url='partner.php?action=givecrystals']Back[/url]"); } else { $db->query("UPDATE users SET cybermoney=cybermoney+'{$_POST['cyber']}' WHERE userid={$par['userid']}"); $db->query("UPDATE users SET cybermoney=cybermoney-'{$_POST['cyber']}' WHERE userid=$userid"); event_add($par['userid'],"You partner has just wired you \${$_POST['cyber']} into your cyber bank account",$c); print"You wired \${$_POST['cyber']} to your partner"; } } function take_money_form() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their finacial items"); } else { print "<h3>Taking Money</h3> This action will take money from your partner <form action='partner.php?action=takemoneysub' method='post'> Money: <input type='text' name='money' value='{$par['money']}'> <input type='submit' value='Take Money' /></form>"; } } function take_money_submit() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their finacial items"); } if ($par['money'] < $_POST['money']) { die("You are trying to take more money than you can [url='partner.php?action=takemoney']Back[/url]"); } else { $db->query("UPDATE users SET money=money+'{$_POST['money']}' WHERE userid=$userid"); $db->query("UPDATE users SET money=money-'{$_POST['money']}' WHERE userid={$par['userid']}"); event_add($par['userid'],"Your partner has just taken \${$_POST['money']} from your hand money",$c); print"You took \${$_POST['money']} from your partner"; } } function take_crystals_form() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their finacial items"); } else { print "<h3>Take Crystals</h3> This action will take crystals from your partner <form action='partner.php?action=takecrystalssub' method='post'> Crystals: <input type='text' name='crystals' value='{$par['crystals']}'> <input type='submit' value='Take Crystals' /></form>"; } } function take_crystals_submit() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their finacial items"); } if ($par['crystals'] < $_POST['crystals']) { die("You are trying to take more crystals than you can [url='partner.php?action=takecrystals']Back[/url]"); } else { $db->query("UPDATE users SET crystals=crystals+'{$_POST['crystals']}' WHERE userid=$userid"); $db->query("UPDATE users SET crystals=crystals-'{$_POST['crystals']}' WHERE userid={$par['userid']}"); event_add($par['userid'],"Your partner has just taken {$_POST['crystals']} crystals from you",$c); print"You took {$_POST['crystals']} crystals to your partner"; } } function take_bank_form() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their finacial items"); } if ($ir['bankmoney'] < 0) { die("You dont have a bank account"); } if ($par['bankmoney'] < 0) { die("Your partner dose not have a bank account"); } else { print "<h3>Take Bank Money</h3> This action will take bank money from your partner <form action='partner.php?action=takebanksub' method='post'> Bank Money: <input type='text' name='bank' value='{$par['bankmoney']}'> <input type='submit' value='Take Bank Money' /></form>"; } } function take_bank_submit() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their finacial items"); } if ($par['bankmoney'] < $_POST['bank']) { die("You are trying to take more bank money than you can [url='partner.php?action=takebank']Back[/url]"); } else { $db->query("UPDATE users SET bankmoney=bankmoney+'{$_POST['bank']}' WHERE userid=$userid"); $db->query("UPDATE users SET bankmoney=bankmoney-'{$_POST['bank']}' WHERE userid={$par['userid']}"); event_add($par['userid'],"Your partner has just taken \${$_POST['bank']} from your bank account",$c); print"You took \${$_POST['bank']} from your partner"; } } function take_cyber_form() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their finacial items"); } if ($ir['cybermoney'] < 0) { die("You dont have a cyber bank account"); } if ($par['cybermoney'] < 0) { die("Your partner dose not have a cyber bank account"); } else { print "<h3>Taking Cyber Bank Money</h3> This action will take cyber bank money from your partner <form action='partner.php?action=takecybersub' method='post'> Bank Money: <input type='text' name='cyber' value='{$par['cybermoney']}'> <input type='submit' value='Take Cyber Money' /></form>"; } } function take_cyber_submit() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their finacial items"); } if ($par['cybermoney'] < $_POST['cyber']) { die("You are trying to take more cyber bank money than you can [url='partner.php?action=givecrystals']Back[/url]"); } else { $db->query("UPDATE users SET cybermoney=cybermoney+'{$_POST['cyber']}' WHERE userid=$userid"); $db->query("UPDATE users SET cybermoney=cybermoney-'{$_POST['cyber']}' WHERE userid={$par['userid']}"); event_add($par['userid'],"Your partner has just taken \${$_POST['cyber']} from your cyber bank account",$c); print"You took \${$_POST['cyber']} from your partner"; } } function send_message_form() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Send a message</h3> <form action='partner.php?action=sendmessagesub' method='post'> Your LUV Message: <input type='text' name='msg'> <input type='submit' value='Give Message' /></form>"; } function send_message_submit() { global $db,$ir,$c,$h,$userid,$par; if ($_POST['msg'] == '') { die("Why send a blank message?"); } else { event_add($par['userid'],"You partner sent you a LUV message: {$_POST['msg']}",$c); print"Message sent!"; } } function sleep_form() { global $db,$ir,$c,$h,$userid,$par; if($ir['tired'] == 1 or $par['tired'] == 1) { die("You are too tired to sleep with your partner again"); } print "<h3>Sleep with your Partner</h3> <form action='partner.php?action=sleepsub' method='post'> <input type='submit' value='Sleep With {$par['username']}' /></form>"; } function sleep_submit() { global $db,$ir,$c,$h,$userid,$par; if($ir['tired'] == 1 or $par['tired'] == 1) { die("You are too tired to sleep with your partner again"); } if (!$_POST['msg']) { $db->query("UPDATE users SET happiness=happiness+1 WHERE userid={$par['userid']}"); $db->query("UPDATE users SET happiness=happiness+1 WHERE userid=$userid"); $db->query("UPDATE users SET tired=1 WHERE userid={$par['userid']}"); $db->query("UPDATE users SET tired=1 WHERE userid=$userid"); event_add($par['userid'],"Your partner slept with you, you gained one happiness",$c); print"You slept with your partner and gained one happiness!"; } } function begin_affair() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Have an affair</h3>"; if ($ir['happiness'] > 4) { die("You have a happy relationship, why risk it?"); } print" <form action='partner.php?action=doaffair' method='post'> You and your partner havent been having a good time recently, and a colleuge of your asked you out, what do you do? <input type='submit' value='Go with Colleuge' /></form> <form action='partner.php' method='post'><input type='submit' value='Dont Risk It' /></form>"; } function do_affair() { global $db,$ir,$c,$h,$userid,$par; $chance=(int) rand(1,2); if($chance==1) { $db->query("UPDATE users SET happiness=10 WHERE userid=$userid"); print"1.)You go with your colleuge and have a great date, you then go over to their house and have some fun 2.) After you finish you go to your house and find out your wifes asleep 3.) She didnt suspect a thing and you get away with it"; } else if($chance=2) { $db->query("UPDATE users SET happiness=1 WHERE userid=$userid"); $db->query("UPDATE users SET happiness=1 WHERE userid={$par['userid']}"); event_add($par['userid'],"You find out your partner has cheated on you",$c); print"1.) You go with you colleuge to your date, and wish you never bothered, the date was a complete faliure 2.) You go home and to your horror see your colleuge there 3.) She told your partner about you and walks away smirking 4.) You gulp"; } } function divorce_form() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Divorce Your Partner</h3> This action will divorce your partner <form action='partner.php?action=divorcesub' method='post'> <input type='submit' value='Divorce' /></form>"; } function divorce_submit() { global $db,$ir,$c,$h,$userid,$par; { $db->query("UPDATE users SET married=0 WHERE userid={$par['userid']}"); $db->query("UPDATE users SET married=0 WHERE userid=$userid"); event_add($par['userid'],"Your partner divorced you!",$c); print"You divorced your partner"; } } function allowence_form() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Marriage Allowence</h3> This action will decide wether you want to allow your partner to take money or not [[url='partner.php?action=allowence&allow=yes']Allow[/url]] [[url='partner.php?action=allowence&allow=no']Do Not Allow[/url]] "; if($_GET['allow'] == yes) { $db->query("UPDATE users SET allowence=1 WHERE userid=$userid"); print" Now your partner is allowed to access your finance"; } else if($_GET['allow'] == no) { $db->query("UPDATE users SET allowence=0 WHERE userid=$userid"); print" Now your partner isnt allowed to access your finance"; } } function begin_council() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Marriage Counciling</h3>"; if ($ir['happiness'] > 6 and $par['happiness'] > 6) { die("You have a happy relationship, why risk it?"); } print" <form action='partner.php?action=docouncil' method='post'> You enter Dr. Lovvels Marriage Counciling Center, you could come out with your marriage secure, or it shatters <input type='submit' value='Enter' /></form>"; } function do_council() { global $db,$ir,$c,$h,$userid,$par; $chance=(int) rand(1,2); if($chance==1) { $db->query("UPDATE users SET happiness=10 WHERE userid=$userid"); $db->query("UPDATE users SET happiness=10 WHERE userid={$par['userid']}"); print"1.) You enter the counciling room 2.) You and your partner resolve a few issues you have been having 3.) You come out feeling happy"; } else if($chance=2) { $db->query("UPDATE users SET happiness=1 WHERE userid=$userid"); $db->query("UPDATE users SET happiness=1 WHERE userid={$par['userid']}"); event_add($par['userid'],"You went to marriage coucling and it was a disaster",$c); print"1.) You go with your partner to marriage counciling 2.) You blame things on your partner and vice versa 3.) It was a disaster and you go out seeling sad and sleep on the sofa"; } } function index() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Partner Managment</h3> Here you can perform many actions to do with your marriage <table width=80% height=80% border=1><tr><td>[url='partner.php?action=givemoney']Send Money[/url]</td> <td>[url='partner.php?action=givecrystals']Send Crystals[/url]</td></tr><tr> <td>[url='partner.php?action=givebank']Send Bank Money[/url]</td> <td>[url='partner.php?action=givecyber']Send Cyber Money[/url]</td></tr><tr> <tr><td>[url='partner.php?action=takemoney']Take Money[/url]</td> <td>[url='partner.php?action=takecrystals']Take Crystals[/url]</td></tr><tr> <td>[url='partner.php?action=takebank']Take Bank Money[/url]</td> <td>[url='partner.php?action=takecyber']Take Cyber Money[/url]</td></tr><tr> <td>[url='partner.php?action=sendmessage']Send Message[/url]</td> <td><a href='partner.php?action=sleep'>Sleep With {$par['username']}</td></tr> <tr><td><a href='partner.php?action=affair'>Have an Affair</td> <td>[url='partner.php?action=divorce']Divorce[/url]</td><tr> <td>[url='partner.php?action=allowence']Change Marriage Allowence</td><td><a href='partner.php?action=council'>Go to Marriage Counciling[/url]</td></tr></table> <h3>Marriage Stats</h3> <table width=80% height=80% border=1><tr><td>Your Happiness: {$ir['happiness']}</td><td>Their Happiness: {$par['happiness']}</td></tr></table>"; } $h->endpage(); ?>
-
Re: I am stumpped, and do not what to do??? Here is my mysql for it:
-
In my game first of all, the users in the hosp stopped working. I reloaded the hosp,and still no luck, am I missing something? Secondly, in events when you get an event, I was once able to click on it, and go see what it was. I reloaded events,the index, and still no luck. I am ready to blow up my pc... lol
-
Re: Header Error message I love Nyna, thanks for that, it was such a simple fix. I spent all morning reading google about it, and made more confused.
-
Re: Email Activation I want to use it, it is a great code, I was just confused on that 1 part.
-
Can anyone help with this? This is the Line: Mysql is: I am including my header information: <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #000000; margin-top: 0px; margin-bottom: 0px; font-family:verdana;font-size:11px;color: white; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: white;text-decoration: none; } table,tr,td { font-family:verdana, sans-serif;font-size: 11px; } img { border:none; } textarea { font-family:verdana;font-size:11px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.); background-repeat:repeat-y; width:0px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:0px; } .rgrad { background-image:url(rgrad.); background-repeat:repeat-y; width:0px; } .dgrad { background-image:url(dgrad.); background-repeat:repeat-x; height:1px; } .dgradl { background-image:url(dgradl.); background-repeat:no-repeat; height:0px; width:0px; } .dgradr { background-image:url(dgradr.); background-repeat:no-repeat; height:0px; width:0px; } .center { width:0px; background-color:#000000; vertical-align:top; text-align:center; } .table { background-color:#FFFFFF; } .table3 { background-color:#000000; } .table td { background-color:#000000; height:0px; } .table3 td { background-color:#000000; } td .alt { background-color:#EEEEEE; height:0px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } body, td, tr{ color: #D8D8D8; font-family: Tahoma,Verdana,Geneva,Arial,Helvetica,"Sans Serif"; font-size: 8pt; font-weight: normal; line-height: 16px; margin: 0px; padding: 0px; } a:link, a:active, a:visited { color: #ffffff; font-weight: none; text-decoration: none; } a:hover { color: #ff0000; font-weight: none; text-decoration: none; } /* scrollbars */ html { scrollbar-base-color: #000000; scrollbar-arrow-color: #FFFFFF; } /* form elements */ select, input, textarea, check { font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; background-color: #000; border: ridge; border-width: 1px; border-color: #333; color: #CCC; } select:hover, input:hover, textarea:hover { font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; background-color: #000; border: ridge; border-width: 1px; border-color: #CCC; color: #FF; } select:focus, input:focus, textarea:focus { font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; background-color: #000; border: ridge; border-width: 1px; border-color: #FFF; color: #FFF; } .menu:link, .menu:visited { color: #FFFFFF; font-size: 8pt; font-weight: bold; text-decoration: none; } .menu:hover, menu:active { color: #ffcc00; font-weight: bold; text-decoration: none; } --> </style></head> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { include_once("./blip.php"); if (blip_is_blocked()) die("<tt>Your IP address has been blocked. If you feel this is in error, please mail [email][email protected][/email]</tt>"); global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You Run Home And Lock Your Doors"; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $minexp=(int) ($ir['mine_exp']/$ir['mine_needed']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $minex=100-$minexp; $d=""; if($_GET['ID'] != abs(@intval($_GET['ID']))) { die("click... click... KABOOM!"); } $_GET['viewforum'] = abs(@intval($_GET['viewforum'])); $_GET['viewtopic'] = abs(@intval($_GET['viewtopic'])); $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; } else if($ir['user_level'] > 1) { $u = "<font color=brown>{$ir['username']}</font>";$d="[img=staff.gif]"; } $gn=""; global $staffpage; $bgcolor = '000000'; print "<table width='100%' bgcolor='#000000' bordercolor='#000000' border='0'> <tr> <th> </td> <th width='700px' align='center'>"; if($ir['jail'] > 0) { print " <center>[img=title.jpg]</center>"; } else if($ir['hospital'] > 0) { print " <center>[img=title.jpg]</center>"; } else { print " <center>[img=title.jpg]</center>"; } print" </th><th> </th> </tr> </table> [b]Energy:[/b] {$enperc}% <img src=bluebar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10><td/> [b]Will:[/b] {$wiperc}% <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10><td/> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=bluebar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10> <td/> [b]EXP:[/b] {$experc}% <img src=bluebar.png width=$experc height=10><img src=redbar.png width=$exopp height=10><td/> [b]Health:[/b] {$hpperc}% <img src=bluebar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10></center> <center><table width='100%' border='0'> [b]Mine Exp:[/b] {$minexp}% [img=bar_left.gif][img=bluebar.png][img=barred.gif][img=bar_fil_end.gif] </div> <tr> </td><td>[b]Name: [/b] $gn{$u} [{$ir['userid']}] $d </td><td>[b]Money: [/b] {$fm} [url='bank.php'][[i]Bank[/i]][/url] </td><td>[b]Honors:[/b] {$ir['honors']}</td><td>[b]Credit Card:[/b] \${$ir['creditcard']}</td><td>[b]Level:[/b]{$ir['level']} </td><td>[b]Crystals: [/b] {$ir['crystals']} [url='voting.php'][[i]Earn[/i]][/url][url='crystaltemple.php'][[i]Use[/i]][/url] </center>[/b]</td></tr></table> <table cellspacing='0' border='0' cellpadding='0' class='table' width='100%'> <tr background='tablehgrad.png'> <tr> <td colspan='2' class='h' align='center'>[url='donator.php']<font color=lime>[b]Donate To Mobs Life Here[/b]</font>[/url]</td> <td colspan='2' class='h' align='center'>[url='voting.php']<font color=lime>[b]Vote For Mobs Life Here[/b]</font>[/url]</td> <table width='100%' border='0' cellpadding='0' cellspacing='0'> <tr> <td width='15%' bgcolor='#$bgcolor' valign='top'>"; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); 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']} To get your account back Email </font><font color=yellow>[email protected]</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="100%" bgcolor="#'.$bgcolor.'" valign="top"> '; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print ""; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="5"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </body> </html> OUT; } function checkIncomingData($idata, $minsize, $maxsize) { if ( strlen($idata)<$minsize or strlen($idata)>$maxsize ) { return false; } else { return true; } } //make sure that nothing bad can be entered by the user (-->sql injection attack) function cleanIncomingData($idata) { $cleaned = trim($idata); $cleaned = mysql_real_escape_string($cleaned); return $cleaned; $db->escape(); $forbidden = array('"','<','>','&','(',')'); $replacement = array('"','<','>','&','*','*'); $item2 = str_replace($forbidden,$replacement,$item); function is_whole_number($var) { return (is_numeric($var)&&(intval($var)==floatval($var))); } $array = array_merge($_GET, $_POST); while ($post_cap = current($array)) { if ($post_cap < 0) { die("[b]What do you think your doing? Inserting negative integers is not tolerated![/b] "); } if (is_numeric($post_cap) && !is_whole_number($post_cap)) { die("[b]What do you think your doing? Inserting decimal integers is not tolerated.[/b] "); } if(strpos($post_cap, '=') && ($_POST[confirmPage] == "")) { die("[b]What do you think your doing? An Invalid entry has been made.[/b] Please contact Spere [2] if this error persists. "); } next($array); } $array_gete = array($_GET); while ($tick = current($array_gete)) { $thekey = key($array_gete); //GoldenZero.Net $_GET[$thekey] = str_replace("=", "", htmlspecialchars($_GET[$thekey])); next($array_gete); } $array_poste = array($_POST); while ($tick = current($array_poste)) { $thekey = key($array_poste); $_POST[$thekey] = str_replace("=", "", htmlspecialchars($_POST[$thekey])); next($array_poste); } } } ?>
-
Re: Gang OC not working I fixed them myself
-
Re: Email Activation All this talk about not being fit to run a game. I dont see anything wrong with asking questions, espically when you are confused. I was confused here: Instead of wasting breath saying negative things, how ask what we were confused about? When you were in school did your teacher call you names, tell you that you are unfit? No way that would occur. Have a little patience, I am sure you were not always a great coder, and at some point you asked questions.
-
Re: Donator Items Cut and paste ftw...
-
Re: New Donations Page I learn more and more each day from you all. And I appreciate your help.
-
I made this donations page, it works really well. The only issue I have is when you choose to donate for someone, it lists it in the url, and not on the actual page. Other than that it works great. It has been tested over and over again. Its a cross between my old page, and the new one out there.Which I liked the money conversion on it. Heres the code: <?php include "globals.php"; print <<<EOF <center> <h3>Donations</h3> [b][[url='willpotion.php']Buy Will Potions[/url]][/b] [b][[url='buypower.php']Buy 150 Power Bar[/url]][/b] [b]Please read our [url='donatortos.php']Donator Terms of Service[/url], last updated 08/10/08.[/b] [b]NOTE: [url='#']Read Note[/url][/b] You are currently donating for: <font color='red'>[b]yourself[/b].</font> <form action='donator.php' method='get'>Want to donate for someone else? No problem. Enter their user ID in the box and hit Go. <input type='text' name='donatefor' size='5' maxlength='6'><input type='submit' value='Go'></form> Please look at this table to look into donating/actually donate. With all packs you will receive a friend/black list,a special bank account,Donator only news,the donator icon next to your name, and much more in the future. <table class='table' width='75%' border='0' cellspacing='1' cellpadding='2'> <tr> <th>Pack Name</th> <th>Pack Cost</th> <th>Game Money</th> <th>Crystals</th> <th>IQ</th> <th>Donator Days</th> <th>Donate Now</th> </tr> <tr> <td>Starter's Pack <b style='color:blue;'>Buy this pack its a great deal![/b]</td> <td>$3.00 USD ([url='http://www.xe.com/ucc/convert.cgi?Amount=3.00&From=USD&To=GBP']GBP[/url] | [url='http://www.xe.com/ucc/convert.cgi?Amount=3.00&From=USD&To=EUR']EUR[/url] | [url='http://www.xe.com/ucc/convert.cgi?Amount=3.00&From=USD&To=AUD']AUD[/url])</td> <td>$1,000</td> <td>20</td> <td>50</td> <td>30</td> <td><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type=hidden name=cmd value=_xclick> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|DP|1|{$userid}"> <input type="hidden" name="amount" value="3.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="page_style" value="mobslife"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=standard"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <input type="hidden" name="mono_buyer" value="****"> <input type="hidden" name="mono_for" value="****"> <input type="hidden" name="mono_pack" value="1"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form></td> </tr> <tr> <td>Crystals Pack <b style='color:blue;'>Buy this pack its a great deal![/b]</td> <td>$3.00 USD ([url='http://www.xe.com/ucc/convert.cgi?Amount=3.00&From=USD&To=GBP']GBP[/url] | [url='http://www.xe.com/ucc/convert.cgi?Amount=3.00&From=USD&To=EUR']EUR[/url] | [url='http://www.xe.com/ucc/convert.cgi?Amount=3.00&From=USD&To=AUD']AUD[/url])</td> <td>$0</td> <td>50</td> <td>0</td> <td>30</td> <td><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|DP|2|{$userid}"> <input type="hidden" name="amount" value="3.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="page_style" value="mobslife"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=crystals"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <input type="hidden" name="mono_buyer" value="****"> <input type="hidden" name="mono_for" value="****"> <input type="hidden" name="mono_pack" value="2"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form></td> </tr> <tr> <td>IQ Pack <b style='color:blue;'>Buy this pack its a great deal![/b]</td> <td>$3.00 USD ([url='http://www.xe.com/ucc/convert.cgi?Amount=3.00&From=USD&To=GBP']GBP[/url] | [url='http://www.xe.com/ucc/convert.cgi?Amount=3.00&From=USD&To=EUR']EUR[/url] | [url='http://www.xe.com/ucc/convert.cgi?Amount=3.00&From=USD&To=AUD']AUD[/url])</td> <td>$0</td> <td>0</td> <td>100</td> <td>30</td> <td><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="page_style" value="mobslife"> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|DP|3|{$userid}"> <input type="hidden" name="amount" value="3.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=iq"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <input type="hidden" name="mono_buyer" value="****"> <input type="hidden" name="mono_for" value="****"> <input type="hidden" name="mono_pack" value="3"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form></td> </tr> <tr> <td>Advanced Pack <b style='color:blue;'>Buy this pack its a great deal![/b]</td> <td>$5.00 USD ([url='http://www.xe.com/ucc/convert.cgi?Amount=5.00&From=USD&To=GBP']GBP[/url] | [url='http://www.xe.com/ucc/convert.cgi?Amount=5.00&From=USD&To=EUR']EUR[/url] | [url='http://www.xe.com/ucc/convert.cgi?Amount=5.00&From=USD&To=AUD']AUD[/url])</td> <td>$3,000</td> <td>40</td> <td>80</td> <td>55</td> <td><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="page_style" value="mobslife"> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|DP|4|{$userid}"> <input type="hidden" name="amount" value="5.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=fivedollars"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="mono_buyer" value="****"> <input type="hidden" name="mono_for" value="****"> <input type="hidden" name="mono_pack" value="4"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form></td> </tr> <tr> <td>Best Pack <b style='color:blue;'>Buy this pack its a great deal![/b]</td> <td>[b]$10.00 USD[/b] ([url='http://www.xe.com/ucc/convert.cgi?Amount=10.00&From=USD&To=GBP']GBP[/url] | [url='http://www.xe.com/ucc/convert.cgi?Amount=10.00&From=USD&To=EUR']EUR[/url] | [url='http://www.xe.com/ucc/convert.cgi?Amount=10.00&From=USD&To=AUD']AUD[/url])</td> <td>$7,000</td> <td>85</td> <td>180</td> <td>115</td> <td><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="page_style" value="mobslife"> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|DP|5|{$userid}"> <input type="hidden" name="amount" value="10.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=tendollars"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="mono_buyer" value="****"> <input type="hidden" name="mono_for" value="****"> <input type="hidden" name="mono_pack" value="5"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form></td> </tr> </table></center></center></div> </div> </div> </div> </div> <div id="wrapperB"></div> <br style="clear: both;" /> </div> </div> <center> </font> </form> EOF; $h->endpage(); ?>
-
Re: Email Activation I was confused as well. Would you explain a little bit more please.
-
Re: [MCcode V1.1] New Search/Locate Very well done.
-
Is there anything I need changed in the following snippet of code? When I go the OC part in my gang, there are no crimes listed? } } function gang_staff_orgcrimes() { global $db,$ir,$c,$userid,$gangdata; $_POST['crime'] = abs((int) $_POST['crime']); if($_POST['crime']) { if($gangdata['gangCRIME'] != 0) { print "Your gang is already doing a crime!"; } else { $db->query("UPDATE gangs SET gangCRIME={$_POST['ocNAME']},gangCHOURS=24 WHERE gangID={$ir['gang']}"); print "You have started to plan this crime. It will take 24 hours."; } } else { print "<h3>Organised Crimes</h3> <form action='yourgang.php?action=staff&act2=crimes' method='post'>Choose a crime that your gang should commit. <select name='crime' type='dropdown'>"; $cnt=$db->query("SELECT username FROM users WHERE gang={$gangdata['gangID']}"); $membs=$db->num_rows($cnt); $q=$db->query("SELECT * FROM orgcrimes WHERE ocUSERS <= $membs"); while($r=$db->fetch_row($q)) { print "<option value='{$r['ocID']}'>{$r['ocNAME']} ({$r['ocUSERS']} members needed)</option>"; } print "</select> <input type='submit' value='Commit' /></form>"; } }
-
Re: Personals [V2] I like this mod, finally i find a site where marriage does more than say yes or no in a db, or profile... lol
-
Re: [V2]Ranks Mod!!!![V2] I love the mod, and agree people need not to complain about free mods. Keep them coming, and I am working on some for you all as well.
-
Re: [V2]Ranks Mod!!!![V2] How can the ranks be copyrighted, after a 95% of them are from the US Army..... So how can you say remove them, when its common knowledge about that. And I should know, as I was a Captain, in the US Army Ranger's http://www.us-army-info.com/pages/ranks.html
-
Re: Free 2 - Gym For this mod, how would you make it harder to get lower stats? I tried and made the gains more in all that I added... lol
-
Re: Crons stoped working. I think it would also be a good idea to rid of crons alltogether, and use time instead.
-
Re: learning mysql_real_escape_string just need to verify. I am learning as well. Would you mind explaining a little further for me? I googled it, and got even more confused. I was not sure even how you use this...
-
Re: Game Ranks Heres what I received: My line 244:
-
Re: Basic Stock Market [V2] I found one issue I wanted to ask about. How can we stop this: You can insert negative values in the stock market. Therefore, you can get money out of the stock market.
-
Re: Staff Password without sql's. (ANY VERSION) I added this to my staff globals, and it worked cept for it always looped back to the staff login page. What can or should I add after it, so when you login with the staff password, it goes to the staff panel, and not staff login? if($_SESSION['stafflogin'] == 0) { header('location: passwordpanel.php'); } Heres my staff globals in case you wanna see it.. <?php /*--------------------------------- -- MCCodes 2.0 -- By Dabomstew ---------------------------------*/ session_start(); if(get_magic_quotes_gpc() == 0) { die("Fatal error: MCCode cannot function without MagicQuotes GPC being turned on in PHP.INI."); } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; include "config.php"; global $_CONFIG; 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; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $domain=$_SERVER['HTTP_HOST']; global $jobquery, $housequery; if($jobquery) { $is=$db->query("SELECT u.*,us.*,j.*,jr.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON jr.jrID=u.jobrank WHERE u.userid=$userid"); } else if($housequery) { $is=$db->query("SELECT u.*,us.*,h.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE u.userid=$userid"); } else { $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid"); } $ir=$db->fetch_row($is); if($ir['force_logout']) { $db->query("UPDATE users SET force_logout=0 WHERE userid=$userid"); session_unset(); session_destroy(); header("Location: login.php"); exit; } if($ir['user_level'] <= 1) { print("403: Access Denied"); $h->endpage(); exit; } global $macropage; if($macropage && !$ir['verified'] && $set['validate_on']==1) { header("Location: macro1.php?refer=$macropage"); } check_level(); $h = new headers; $h->startheaders(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); global $atkpage; $staffpage=1; if($atkpage) { $h->userdata($ir,$lv,$fm,$cm,0); } else { $h->userdata($ir,$lv,$fm,$cm); } $h->smenuarea(); ?>
-
Re: Basic Stock Market [V2] I would like to say, I added the second cron as well, and its working great. I have it running every 15 minutes... lol