Jump to content
MakeWebGames

HITMAN 17

Members
  • Posts

    1,145
  • Joined

  • Last visited

Everything posted by HITMAN 17

  1. Re: Mass Mail error i changed it around and still the same wtf man this is pi**ing me off what do i do
  2. Re: V2 Problems i have searched every where no ansewer so can someone give me the mass mail error one corrected as i cant find it
  3. Re: Mass Mail error now it comes up Mailbox (29) here is the staff_special code please can you fix it <?php include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains punishment stuffs switch($_GET['action']) { case 'editnews': newspaper_form(); break; case 'subnews': newspaper_submit(); break; case 'givedpform': give_dp_form(); break; case 'givedpsub': give_dp_submit(); break; case 'stafflist': staff_list(); break; case 'userlevel': userlevel(); break; case 'userlevelform': userlevelform(); break; case 'massmailer': massmailer(); break; default: print "Error: This script requires an action."; break; } function newspaper_form() { global $db,$ir,$c,$h,$userid; $q=$db->query("SELECT * FROM papercontent LIMIT 1"); $news=$db->fetch_single($q); print "<h3>Editing Newspaper</h3><form action='staff_special.php?action=subnews' method='post'> <textarea rows='7' cols='35' name='newspaper'>$news</textarea> <input type='submit' value='Change' /></form>"; } function newspaper_submit() { global $db,$ir,$c,$h,$userid; $news=$_POST['newspaper']; $db->query("UPDATE papercontent SET content='$news'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function give_dp_form() { global $db,$ir,$c,$h,$userid; print "<h3>Giving User DP</h3> The user will receive the benefits of one 30-day donator pack. <form action='staff_special.php?action=givedpsub' method='post'> User: ".user_dropdown($c,'user')." <input type='radio' name='type' value='1' /> Pack 1 (Standard) <input type='radio' name='type' value='2' /> Pack 2 (Crystals) <input type='radio' name='type' value='3' /> Pack 3 (IQ) <input type='radio' name='type' value='4' /> Pack 4 (5.00) <input type='radio' name='type' value='5' /> Pack 5 (10.00) <input type='submit' value='Give User DP' /></form>"; } function give_dp_submit() { global $db,$ir,$c,$h,$userid; if($_POST['type']==1) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+5000,u.crystals=u.crystals+50, us.IQ=us.IQ+50,u.donatordays=u.donatordays+30 WHERE u.userid={$_POST['user']}"); $d=30; } else if($_POST['type']==2) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.crystals=u.crystals+100,u.donatordays=u.donatordays+30 WHERE u.userid={$_POST['user']}"); $d=30; } else if($_POST['type']==3) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.IQ=us.IQ+120,u.donatordays=u.donatordays+30 WHERE u.userid={$_POST['user']}"); $d=30; } else if($_POST['type']==4) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+15000,u.crystals=u.crystals+75, us.IQ=us.IQ+80,u.donatordays=u.donatordays+55 WHERE u.userid={$_POST['user']}"); $d=55; } else if($_POST['type']==5) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+35000,u.crystals=u.crystals+160, us.IQ=us.IQ+180,u.donatordays=u.donatordays+115 WHERE u.userid={$_POST['user']}"); $d=115; } event_add($_POST['user'],"You were given one $d -day donator pack (Pack {$_POST['type']}) from the administration.",$c); print "User given a DP."; stafflog_add("Gave ID {$_POST['user']} a $d -day donator pack (Pack {$_POST['type']})"); } function staff_list() { global $db,$ir,$c,$h,$userid; print "<h3>Staff Management</h3>"; print "[b]Admins[/b] <table width=80%><tr style='background:gray'> <th>User</th> <th>Online?</th> <th>Links</th> </tr>"; $q=$db->query("SELECT * FROM users WHERE user_level=2 ORDER BY userid ASC"); while($r=$db->fetch_row($q)) { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>$on</td> <td>[url='staff_special.php?action=userlevel&level=3&ID={$r[']Secretary[/url] · [url='staff_special.php?action=userlevel&level=5&ID={$r[']Assistant[/url] · [url='staff_special.php?action=userlevel&level=1&ID={$r[']Member[/url]</td></tr>"; } print "</table>"; print "[b]Secretaries[/b] <table width=80%><tr style='background:gray'> <th>User</th> <th>Online?</th> <th>Links</th> </tr>"; $q=$db->query("SELECT * FROM users WHERE user_level=3 ORDER BY userid ASC"); while($r=$db->fetch_row($q)) { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>$on</td> <td>[url='staff_special.php?action=userlevel&level=2&ID={$r[']Admin[/url] · [url='staff_special.php?action=userlevel&level=5&ID={$r[']Assistant[/url] · [url='staff_special.php?action=userlevel&level=1&ID={$r[']Member[/url]</td></tr>"; } print "</table>"; print "[b]Assistants[/b] <table width=80%><tr style='background:gray'> <th>User</th> <th>Online?</th> <th>Links</th> </tr>"; $q=$db->query("SELECT * FROM users WHERE user_level=5 ORDER BY userid ASC"); while($r=$db->fetch_row($q)) { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>$on</td> <td>[url='staff_special.php?action=userlevel&level=2&ID={$r[']Admin[/url] · [url='staff_special.php?action=userlevel&level=3&ID={$r[']Secretary[/url] · [url='staff_special.php?action=userlevel&level=1&ID={$r[']Member[/url]</td></tr>"; } print "</table>"; } function userlevel() { global $db,$ir,$c,$h,$userid; $_GET['level']=abs((int) $_GET['level']); $_GET['ID']=abs((int) $_GET['ID']); $db->query("UPDATE users SET user_level={$_GET['level']} WHERE userid={$_GET['ID']}"); print "User's level adjusted."; stafflog_add("Adjusted user ID {$_GET['ID']}'s staff status."); } function userlevelform() { global $db,$ir,$c,$h,$userid; print "<h3>User Level Adjust</h3> <form action='staff_special.php' method='get'> <input type='hidden' name='action' value='userlevel'> User: ".user_dropdown($c,'ID')." User Level: <input type='radio' name='level' value='1' /> Member <input type='radio' name='level' value='2' /> Admin <input type='radio' name='level' value='3' /> Secretary <input type='radio' name='level' value='4' /> IRC Op <input type='radio' name='level' value='5' /> Assistant <input type='submit' value='Adjust' /></form>"; } function massmailer() { global $db,$ir,$c,$userid; if($_POST['text']) { $_POST['text']=nl2br(strip_tags($_POST['text'])); $subj="This is a mass mail from the administration"; if($_POST['cat']==1) $q=$db->query("SELECT * FROM users "); else if($_POST['cat']==2) $q=$db->query("SELECT * FROM users WHERE user_level > 1"); else if($_POST['cat']==3) $q=$db->query("SELECT * FROM users WHERE user_level=2"); else $q=$db->query("SELECT * FROM users WHERE user_level={$_POST['level']}"); while($r=$db->fetch_row($q)) { $db->query("INSERT INTO mail VALUES('', 0, 0, {$r['userid']}, unix_timestamp(),'$subj','{$_POST['text']}')"); $db->query("UPDATE users SET new_mail=new_mail+1 WHERE user_level>0") or die(mysql_error()); print "Mass mail sent to {$r['username']}. "; } print "Mass mail sending complete! [url='staff_special.php?action=massmailer']> Back[/url]"; } else { print "[b]Mass Mailer[/b] <form action='staff_special.php?action=massmailer' method='post'> Text: <textarea name='text' rows='7' cols='40'></textarea> <input type='radio' name='cat' value='1' /> Send to all members <input type='radio' name='cat' value='2' /> Send to staff only <input type='radio' name='cat' value='3' /> Send to admins only OR Send to user level: <input type='radio' name='level' value='1' /> Member <input type='radio' name='level' value='2' /> Admin <input type='radio' name='level' value='3' /> Secretary <input type='radio' name='level' value='5' /> Assistant <input type='submit' value='Send' /></form>"; } } $h->endpage(); ?>
  4. when i send a mass mail i dont get (1) does anyone have the code for me please to fix it
  5. Re: Updated Mailbox [v1]   this is the one wants not broken <?php include "globals.php"; ?><h2>Mailbox</h2><? if($ir[mailban]) { die("<font color=red><h1>ERROR</h1><hr /> You have been mail banned for " . $ir['mailban'] . " days. [b]Reason: " . $ir['mb_reason'] . "</font>[/b]"); } $_GET[iD] = abs((int) $_GET[iD]); 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 'read': mail_read(); break; default: mail_inbox(); break; } function mail_inbox() { global $db,$ir,$c,$userid,$h; $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"); if(!mysql_num_rows($q)) { die("You have no mails. Go send some <a href=mailbox.php?action=compose><u>here</u></a>"); } ?> Only the last 25 messages sent to you are visible. [ [url="mail.php?action=outbox"] Outbox [/url] | [url="mailbox.php?action=delall"] Delete All [/url] ] <table width=90% cellspacing="1"> <tr> <td class="h">From</td> <td class="h">Subject</td> <td class="h" width="10%">Status</td> <td class="h" width="10%">Delete</td> </tr> <? $i=0; $current_row = 0; while($r=$db->fetch_row($q)) { $current_row = 1 - $current_row; ?> <tr class="row<? echo $current_row; ?>"><td align="left" style="text-indent:5px"> <? $i++; if($r['userid']) { ?> [url="viewuser.php?u=<? echo $r[userid]; ?>"]<? echo $r[username]; ?>[/url] [<? echo $r[userid]; ?>] <? } else { ?> <font color="#990000">SYSTEM</font> <? } if($r['mail_read'] == 0) { $status="<font color=red>Unread</font>"; } else { $status="<font color=green>Read</font>"; } ?> </td> <td align="left" style="text-indent:10px;"> [b]Subject:[/b] <? if($r[mail_subject]) { ?> [url="mailbox.php?action=read&ID=<? echo $r[mail_id]; ?>"]<? echo $r[mail_subject]; ?>[/url] <? } else { ?> [url="mailbox.php?action=read&ID=<? echo $r[mail_id]; ?>"]N/A[/url] <? } ?> </td><td align='center'> <? echo $status; ?> </td> <td align=center> [[url="mailbox.php?action=delete&ID=<? echo $r[mail_id]; ?>"]delete[/url]] </td></tr> <? } if($ir['new_mail'] > 0) { $db->query("UPDATE users SET new_mail=0 WHERE userid=$userid"); } ?> </table> <? } function mail_outbox() { global $db,$ir,$c,$userid,$h; $current_row = 0; ?> Only the last 25 messages you have sent are visible. <table width="90%" cellspacing="0"> <tr class="h"> <td width="20%">To</th> <td>Subject/Message</td> </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)) { $current_row = 1 - $current_row; $sent=date('F j, Y, g:i:s a',$r[mail_time]); ?> <tr class="row<? echo $current_row; ?>"> <td>[url="viewuser.php?u=<? echo $r[userid]; ?>"]<? echo $r[username]; ?>[/url] <? echo $r[userid]; ?>]</td> <td><? echo $r[mail_subject]; ?></td> </tr> <tr class="row<? echo $current_row; ?>"> <td>Sent at: <? echo $sent; ?> </td> <td><? echo $r[mail_text]; ?></td> </tr> <? } ?></table><? } function mail_compose() { global $db,$ir,$c,$userid,$h; ?> <form action="mailbox.php?action=send" method="post"> <table width=65% cellspacing="0" class="row1"><tr class="h"><td colspan="2">Compose Mail</td></tr><tr> <td>Users ID:</td><td><input class="textbox" type="text" name="userid" value="<? echo $_GET[iD]; ?>" /></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> </td></tr><tr> <td colspan=2><input type="submit" class="textbox" value="Send" /></td></tr></table></form> <? if($_GET[iD] == 3 || $_GET[iD] == 1) { ?> <font color=brown> Admins have a job to do and they are probably too busy to chat. If you have a problem, mail another staff member [url="stafflist.php"]<u>here</u>[/url] and they will help you out. </font> <? } if($_GET[iD] == 28 || $_GET[iD] == 38) { ?><font color=#9900CC> Assistants are here to help and will be happy to answer any questions. If you bad mouth staff you will get a harsher punishment. </font> <? } if($_GET[iD]) { ?> <table width="65%" border="0"> <tr class="h"> <td colspan="2">Your last 5 mails to/from this person:</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); $current_row = 0; while($r=$db->fetch_row($q)) { $current_row = 1 - $current_row; $sent=date('F j, Y, g:i:s a',$r[mail_time]); ?><tr class="row<? echo $current_row; ?>"> <td width=35%><? echo $sent; ?></td> <td>[b]<? echo $r[sender]; ?> wrote:[/b] <? echo $r[mail_text]; ?></td> </tr> <? } ?> </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])); $from = array( ':)',';)',':o',':D',':S',':(',':@','torncity','register.php?REF','roguevampires','fuck','lostpower', ); $to = array( '[img=images/icons/happy.gif]', '[img=images/icons/wink.gif]', '[img=images/icons/shocked.gif]', '[img=images/icons/bigsmile.gif]', '[img=images/icons/confused.gif]', '[img=images/icons/sad.gif]', '[img=images/icons/angry.gif]', 'banburyco', 'banburyco.com', 'banburyco', '****', 'banburyco', ); $newmail = str_replace($from, $to, $msg); $to= (int) $_POST[userid]; $q=$db->query("SELECT userid FROM users WHERE userid='{$to}'"); if($db->num_rows($q)==0) { die("You cannot send mail to nonexistant users.<hr /> [url='mailbox.php']Back[/url]"); } $to= (int) $_POST[userid]; $db->query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$newmail')"); $db->query("UPDATE users SET new_mail=1 WHERE userid={$to}"); print "Message sent.<hr /> [url='mailbox.php']Back[/url]"; } 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.<hr />[url='mailbox.php']Back[/url]"; } function mail_delall() { global $ir,$c,$userid,$h; ?> This will delete [i]all[/i] the messages in your inbox. <hr /> [url="mailbox.php?action=delall2"]Yes! Do it[/url] [url="mailbox.php"]No, go back[/url] <? } function mail_delall2() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM mail WHERE mail_to=$userid"); echo $db->affected_rows(); ?> mails in your inbox were deleted. <hr /> [url="mailbox.php"]Back[/url] <? } function mail_read() { global $db,$ir,$c,$userid,$h; $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']); ?> <table width="75%" class="row1" cellspacing="0"> <tr class="h"> <td>From: <? if($r[userid]) { ?> [url="viewuser.php?u=<? echo $r[userid];?>"]<font color="#FFFFFF"><? echo $r[username]; ?></font>[/url] <? echo '[' . $r[userid] . ']'; } else { ?><font color="#990000">SYSTEM</font><? } ?> </td></tr><tr style='border-bottom: thin solid #666666;'><td colspan='2' align='center'> [[url="mailbox.php?action=compose&ID=<? echo $r[userid]; ?>"]Reply[/url]] [[url="mailbox.php?action=delete&ID=<? echo $r[mail_id]; ?>"]Delete[/url]] [[url="preport.php?ID=<? echo $r[userid]; ?>&report=Fradulent mail:<? echo $fm; ?>"]Report[/url]] </td></tr><tr><td colapan='2' style='border-top: 1px solid #CCCCCC;'> [b]Mail Text:[/b] <? echo $r[mail_text]; ?> </td></tr></table> <? 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"); } ?></table><? } $h->endpage(); ?>
  6. Re: FREE V2 NEW GAME STATS PAGE here is the line soz abothe longness $avgb=(int) ($totalb/$banks);
  7. Re: FREE V2 NEW GAME STATS PAGE   Not wishing to sound harsh, but RTFM, that is a 2 second fix. You should ALL be able to repair minor issues like this in your sleep. If you can't, then I seriously doubt you have the necessary skills to run a game. not sounding harsh if ya not going to help i dont think you shud be a global mod if you wont help and basically you are spamming
  8. Re: FREE V2 NEW GAME STATS PAGE it works brill but i just get one eroor that is annoying me Warning: Division by zero in /home/textbase/public_html/stats.php on line 24
  9. Re: Crime Formula moved to here http://criminalexistence.com/ceforums/i ... pic=2541.0
  10. Re: Tutorial: v1 - v2 Conversion can someone help me please as it is a lot harder than the mod converting
  11. Re: Tutorial: v1 - v2 Conversion how do u convert a register page for v1 to v2?
  12. hi guys any help on how to convert a register page to v2 thnx
  13. Re: Updated Mailbox [v1]   why does this have include globals.php when its v1 wtf
  14. Re: New Amazing Register Page   great if v1
  15. Re: New improved mailbox. Unknown column 'new_mail' in 'field list'
  16. Re: New improved mailbox. thnx :-D
  17. Re: New improved mailbox.   theres more than that needed
  18. Re: Updated Mailbox [v1]   the requested url has not been found
  19. Re: Bingo vr1 ye gud idea
  20. Re: [v1] NEW LOGIN MY FIRST [V1] anyone do a tutorial to convert this to v2
  21. Re: V2 crimes formular need tutorial ok then what wud a 50/50 code be
  22. error on my game i reset the user and users stats but no i get hospital(2) and wont go away how do i get it reset back to 0
  23. Re: delete gang after respect hit 0 anyone have a working v2 one
  24. hi i need a tutorial on v2 crimes formula like to make the crimes have a 50% chance a hard one and easy one please may someone help
  25. i cant find the bug can someone do it for me then attach the file plz
×
×
  • Create New...