
Haunted Dawg
Members-
Posts
2,933 -
Joined
-
Last visited
Never -
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Haunted Dawg
-
Re: Lottery [v1 and v2] You must have modified wrong. When refreshing it will automaticly select another $rand.
-
Hello all. After selling killah-city.com i wanted to make another game. So i have and its called finalkillah.com ITS here to stay. I want it to be reviewed by all of you. Description: Thanks.
-
Re: Page Tutorials [FREE] Encountered a bug. Replace your globals.php script with this: $page = $_SERVER['PHP_SELF']; $page = explode("/",$page); $noti = mysql_query("SELECT * FROM notifications WHERE nPAGE='{$page[1]}'") or die(mysql_error()); if(mysql_num_rows($noti) != 0) { $nat = mysql_fetch_assoc($noti); echo '<table border="1" cellspacing="0" width="50%" height="30"> <tr> <td valign="top" bgcolor="#eeeee" style="color: black;"><h2><center>Notification:</center></h2>'.$nat['nTEXT'].'</td> </tr> </table>'; }
-
[mccode v2] New improved mailbox.
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: New improved mailbox. Adding the ' ' would be better tho. -
Re: 3 Word Game the hospital BUT
-
Re: 3 Word Game he died on
-
Re: 3 Word Game hospital to get
-
[mccode v2] New improved mailbox.
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: New improved mailbox. Well all i know that this mod works for my game because my main menu is coded from scratch. -
Re: Guess the next poster Yes Spudinski
-
Re: Guess the next poster Yes Spudinski
-
[mccode v2] New improved mailbox.
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: New improved mailbox. are you sure about that kyle the code looks very similar to the edited version of the one on here... weird huh? anyone else think thats a little weird? Like i said befor!! i did code this from scratch read over the coding! now after this message your going to be banned from all my posts if i can still do that. Funny how you say re-made of richards mail box but please read over the code befor you say stupid shit? You using v1? because this is scripted for v2.! -
Re: Page Tutorials [FREE] Unfortunatly i had to. I was not going to pay $10 so i could need to edit every single page! now he wanted every single page edited! basicly i could of went through every page and added a code but what the heck you can do everything through the admin panel If you dont like it DONT USE IT!
-
[mccode v2] New improved mailbox.
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: New improved mailbox. Its just for security that im checking the $_GET['act']. -
[mccode v2] New improved mailbox.
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: New improved mailbox. Yes that should work but unfortunatly makes my codes look bad :roll: -
Re: Page Tutorials [FREE] Added.
-
Re: Page Tutorials [FREE] What does not work? Because everything works fine for me.
-
Re: Page Tutorials [FREE] What version you using?
-
Any one got tips for a new mccode game creator? (v2)
Haunted Dawg replied to Ragnar's topic in General Discussion
Re: Any one got tips for a new mccode game creator? (v2) I still dont recomend putting stocks market on your game. -
Hello all, I found it amusing that absolute zero wanted this mod at a price for $10 so i made my own one. This one you wont need to edit every single page :-). Open file globals.php find: if(!$menuhide) { $h->menuarea(); } Add below: $noti = mysql_query("SELECT * FROM notifications"); $nat = mysql_fetch_assoc($noti); $nat['nPAGE'] = "/{$nat['nPAGE']}"; //page notifications show. if($nat['nPAGE'] == $_SERVER['PHP_SELF']) { echo '<table border="1" cellspacing="0" width="50%" height="30"> <tr> <td valign="top" bgcolor="#eeeee" style="color: black;"><h2><center>Notification:</center></h2>'.$nat['nTEXT'].'</td> </tr> </table>'; } Save globals.php and open staff_notifications.php and add: <?php include("sglobals.php"); //Page notifications admin panel. if($ir['user_level'] != 2) { echo 'You are not staff.'; $h->endpage(); exit; } echo '<h1>Page Notifications</h1>'; $act = htmlentities(mysql_real_escape_string($_GET['act'])); switch($act) { case 'new': new_page(); break; case 'delete': del(); break; case 'editf': edit_first(); break; case 'edit': edit(); break; case 'editd': edit_do(); } function new_page() { global $h,$ir; if($_POST['page']) { $page = htmlentities(mysql_real_escape_string($_POST['page'])); $notification = htmlentities(mysql_real_escape_string($_POST['noti'])); mysql_query("INSERT INTO notifications VALUES(NULL, '{$page}','{$notification}')") or die(mysql_error()); echo 'Notification Added.'; $h->endpage(); exit; } echo '<form action="?act=new" method="post"> Page: <input type="text" name="page"> (Example: index.php) Notification: <textarea name="noti" cols="50" rows="10"></textarea> <input type="submit" value="Submit">'; } function del() { global $h,$ir; if($_POST['page']) { $id = abs(@intval($_POST['page'])); mysql_query("DELETE FROM notifications WHERE nID='{$id}'") or die(mysql_error()); echo 'Notification deleted.'; $h->endpage(); exit; } echo '<form action="?act=delete" method="post"> Page: <select name="page">'; $v = mysql_query("SELECT * FROM notifications") or die(mysql_error()); while($r = mysql_fetch_assoc($v)) { echo '<option value="'.$r['nID'].'">'.$r['nPAGE'].'</option>'; } echo '</select> <input type="submit" value="Submit"> </form>'; } function edit_first() { global $h,$ir; echo '<form action="?act=edit" method="post"> Page: <select name="id">'; $v = mysql_query("SELECT * FROM notifications") or die(mysql_error()); while($r = mysql_fetch_assoc($v)) { echo '<option value="'.$r['nID'].'">'.$r['nPAGE'].'</option>'; } echo '</select> <input type="submit" value="Submit"> </form>'; } function edit() { global $h,$ir; $id = abs(@intval($_POST['id'])); $t = mysql_query("SELECT * FROM notifications WHERE nID='{$id}'") or die(mysql_error()); $f = mysql_fetch_assoc($t); echo '<form action="?act=editd" method="post"> <input type="hidden" value="'.$id.'" name="wahid"> Page: <input type="text" name="page" value="'.$f['nPAGE'].'"> (Example: index.php) Notification: <textarea name="noti" cols="50" rows="10">'.$f['nTEXT'].'</textarea> <input type="submit" value="Submit"> </form>'; } function edit_do() { $f['nID'] = abs(@intval($_POST['wahid'])); $page = htmlentities(mysql_real_escape_string($_POST['page'])); $noti = htmlentities(mysql_real_escape_string($_POST['noti'])); mysql_query("UPDATE notifications SET nPAGE='{$page}',nTEXT='{$noti}' WHERE nID='{$f['nID']}'") or die(mysql_error()); echo 'Edited successfuly.'; } $h->endpage(); ?> Now save staff_notifications.php and open smenu.php Add anywhere you want in smenu.php: <hr>[b]Page Notifications[/b] > [url='staff_notifications.php?act=new']New Page[/url] > [url='staff_notifications.php?act=delete']Delete Page[/url] > [url='staff_notifications.php?act=editf']Edit Page[/url] Now save smenu.php Go to your phpmyadmin and run this sql: CREATE TABLE `notifications` ( `nID` int(11) NOT NULL auto_increment, `nPAGE` varchar(255) NOT NULL default 'index.php', `nTEXT` text NOT NULL, PRIMARY KEY (`nID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; INSERT INTO `notifications` VALUES(NULL, 'loggedin.php', 'Welcome to your game name hope you enjoy your stay.'); Thanks for using this.
-
[mccode v2] New improved mailbox.
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: New improved mailbox. You can download them all at http://www.killah-city.com/images/smileys/ -
Re: Page Tutorials [$10] Im not getting off topic. $10 is to expensive if your spending time to edit every page you want to.
-
Re: Page Tutorials [$10] Not really. Want to bet that i can make a code that will appear on every page?
-
Re: Movies I just watched vantage point about 2 days ago and have to say its pretty damn good.
-
Re: Page Tutorials [$10] Depends if you want a tutorial on a page, you can add/remove them at your own free will. Ok not to be rude or anything here either but dont you think it will take to long to put it on every page? sheesh i could most prob code some thing in 10 minutes and less coding.
-
Hey all... I coded a brand new mailbox from scratch. The others were untidy and hard to understand the mailbox. It was to pushed up together. Here is my mailbox very easy readable and same as the code. :wink: <?php include("globals.php"); if($ir['mailban']) { echo '<font color="red">You have been mail baned for '.$ir['mailban'].' days. [b]Reason:[/b] '.$ir['mbreason']; $h->endpage(); exit; } $emos_toggle = <<<EOF <table border="1" cellpacing="0" class="table" width="50%"> <tr> <th>Image</th> <th>Code</th> <th>Image</th> <th>Code</th> <th>Image</th> <th>Code</th> </tr> <tr> <td>[img=images/smileys/happy.gif]</td><td>:]</td> <td>[img=images/smileys/biggrin.gif]</td><td>:D</td> <td>[img=images/smileys/cool.gif]</td><td>:oo:</td> </tr> <tr> <td>[img=images/smileys/blink.gif]</td><td>O.o</td> <td>[img=images/smileys/dry.gif]</td><td>:/</td> <td>[img=images/smileys/angry.gif]</td><td>:angry:</td> </tr> <tr> <td>[img=images/smileys/huh.gif]</td><td>:?:</td> <td>[img=images/smileys/laugh.gif]</td><td>:lol:</td> <td>[img=images/smileys/mellow.gif]</td><td>:-:</td> </tr> <tr> <td>[img=images/smileys/ohmy.gif]</td><td>:O</td> <td>[img=images/smileys/sad.gif]</td><td>:(</td> <td>[img=images/smileys/ph34r.gif]</td><td>O.O</td> </tr> <tr> <td>[img=images/smileys/rolleyes.gif]</td><td>:roll:</td> <td>[img=images/smileys/sleep.gif]</td><td>:zzz:</td> <td>[img=images/smileys/smile.gif]</td><td>:)</td> </tr> <tr> <td>[img=images/smileys/tongue.gif]</td><td>:P</td> <td>[img=images/smileys/unsure.gif]</td><td>:S</td> <td>[img=images/smileys/wacko.gif]</td><td>:nut:</td> </tr> <tr> <td>[img=images/smileys/wink.gif]</td><td>;)</td> <td>[img=images/smileys/wub.gif]</td><td>:heart:</td> <td>[img=images/smileys/XD.gif]</td><td>XD</td> </tr> </table> EOF; if($_GET['ID']) { $ID = abs(@intval($_GET['ID'])); } if($_GET['act']) { $_GET['act'] = htmlentities(mysql_real_escape_string($_GET['act'])); } echo '<h2>Mailbox</h2> <table border="1" width="100%" cellspacing="0" class="table"> <tr> <th>[url="'.$_SERVER['PHP_SELF'].'"]Inbox[/url]</th> <th>[url="?act=outbox"]Outbox[/url]</th> <th>[url="?act=compose"]Compose[/url]</th> <th>[url="?act=del"]Delete Message\'s[/url]</th> <th>[url="?act=archive"]Archive Message\'s[/url]</th> </tr> </table>'; switch($_GET['act']) { case 'outbox': outbox(); break; case 'compose': compose(); break; case 'del': del(); break; case 'delb': delb(); break; case 'archive': archive(); break; case 'read': read(); break; default: inbox(); break; } function inbox() { global $ir,$h; echo ' <table border="1" width="100%" cellspacing="0" class="table"> <tr> <th>From</th> <th>Subject</th> <th>Time Sent</th> <th>Actions</th> </tr> <tr>'; $v = mysql_query("SELECT * FROM mail WHERE mail_to='{$ir['userid']}' ORDER BY mail_time DESC LIMIT 10") or die(mysql_error()); while($in = mysql_fetch_assoc($v)) { $whos = mysql_query("SELECT * FROM users WHERE userid='{$in['mail_from']}'") or die(mysql_error()); $who = mysql_fetch_assoc($whos); if($in['mail_read'] == 0) { $read = '<font color="red">New!</font>'; } else { $read = ''; } echo '<td>[url="viewuser.php?u='.$who['userid'].'"]'.$who['username'].'[/url] '.$read.'</td> <td>'.$in['mail_subject'].'</td> <td>'.date("F j, Y, g:i:s a", $in['mail_time']).'</td> <td>[[url="?act=delb&ID='.$in['mail_id'].'"]<font color="red">Delete</font>[/url]] [[url="?act=read&ID='.$in['mail_id'].'"]<font color="green">Read</font>[/url]]</td><tr>'; } echo '</tr></table>'; } function read() { global $ir,$h,$ID,$emos_toggle; if($_POST['subject']) { $msg = htmlentities(mysql_real_escape_string($_POST['msg'])); $subject = htmlentities(mysql_real_escape_string($_POST['subject'])); $who = abs(@intval($_POST['towho'])); $msg = str_replace(array("\n"),array(" "),strip_tags($msg)); $subject = str_replace(array("\n"),array(" "),strip_tags($subject)); $emos_code = array( ':]', ':D', ':oo:', 'O.o', ':/', ':angry:', ':?:', ':lol:', ':-:', ':O', ':(', 'O.O', ':roll:', ':zzz:', ':)', ':P', ':S', ':nut:', ';)', ':heart:', 'XD', ); $emos_images = array( '[img=images/smileys/happy.gif]', '[img=images/smileys/biggrin.gif]', '[img=images/smileys/cool.gif]', '[img=images/smileys/blink.gif]', '[img=images/smileys/dry.gif]', '[img=images/smileys/angry.gif]', '[img=images/smileys/huh.gif]', '[img=images/smileys/laugh.gif]', '[img=images/smileys/mellow.gif]', '[img=images/smileys/ohmy.gif]', '[img=images/smileys/sad.gif]', '[img=images/smileys/ph34r.gif]', '[img=images/smileys/rolleyes.gif]', '[img=images/smileys/sleep.gif]', '[img=images/smileys/smile.gif]', '[img=images/smileys/tongue.gif]', '[img=images/smileys/unsure.gif]', '[img=images/smileys/wacko.gif]', '[img=images/smileys/wink.gif]', '[img=images/smileys/wub.gif]', '[img=images/smileys/XD.gif]', ); $completed_msg = str_replace($emos_code,$emos_images,$msg); mysql_query("INSERT INTO mail (mail_time,mail_from,mail_to,mail_read,mail_subject,mail_text) VALUES(unix_timestamp(),'{$ir['userid']}','{$who}','0','{$subject}','{$completed_msg}')") or die(mysql_error()); mysql_query("UPDATE users SET new_mail=new_mail+1 WHERE userid='{$who}'") or die(mysql_error()); echo 'Mail sent successfuly.'; $h->endpage(); exit; } $y = mysql_query("SELECT * FROM mail WHERE mail_id='{$ID}'") or die(mysql_error()); $f = mysql_fetch_assoc($y); if($f['mail_to'] == $ir['userid']) { mysql_query("UPDATE users SET new_mail=new_mail-1 WHERE userid='{$ir['userid']}'") or die(mysql_error()); mysql_query("UPDATE mail SET mail_read=1 WHERE mail_id='{$ID}'") or die(mysql_error()); } $sl_users = mysql_query("SELECT * FROM users WHERE userid='{$f['mail_from']}'") or die(mysql_error()); $sl = mysql_fetch_assoc($sl_users); $to_users = mysql_query("SELECT * FROM users WHERE userid='{$f['mail_to']}'") or die(mysql_error()); $tl = mysql_fetch_assoc($to_users); if($f['mail_from'] == $ir['userid']) { $pass = 1; } else { $pass = 0; } if($f['mail_to'] != $ir['userid']) { if($pass != 1) { echo 'This mail is not yours!'; $h->endpage(); exit; } } if($f['mail_from'] == $ir['userid']) { $ton = $f['mail_to']; } else { $ton = $f['mail_from']; } echo ' <h2>From: '.$sl['username'].' To: '.$tl['username'].'</h2> <table border="1" cellspacing="0" class="table" width="100%"> <tr> <th>Subject</th> <th>Mail</th> </tr> <tr> <td>'.$f['mail_subject'].'</td> <td>'.$f['mail_text'].'</td> </tr> </table> <h2>Quick Response</h2> <form action="?act=read" method="post"> To: <input type="text" value="'.$ton.'" name="towho" readonly> Subject: <input type="text" name="subject" value="No Subject"> Mail: <textarea name="msg" cols="50" rows="10"></textarea> <input type="submit" value="Send"> </form> '.$emos_toggle; } function compose() { global $ir,$h,$emos_toggle; if($_POST['towho']) { $msg = htmlentities(mysql_real_escape_string($_POST['msg'])); $subject = htmlentities(mysql_real_escape_string($_POST['subject'])); $who = abs(@intval($_POST['towho'])); $msg = str_replace(array("\n"),array(" "),strip_tags($msg)); $subject = str_replace(array("\n"),array(" "),strip_tags($subject)); $emos_code = array( ':]', ':D', ':oo:', 'O.o', ':/', ':angry:', ':?:', ':lol:', ':-:', ':O', ':(', 'O.O', ':roll:', ':zzz:', ':)', ':P', ':S', ':nut:', ';)', ':heart:', 'XD', ); $emos_images = array( '[img=images/smileys/happy.gif]', '[img=images/smileys/biggrin.gif]', '[img=images/smileys/cool.gif]', '[img=images/smileys/blink.gif]', '[img=images/smileys/dry.gif]', '[img=images/smileys/angry.gif]', '[img=images/smileys/huh.gif]', '[img=images/smileys/laugh.gif]', '[img=images/smileys/mellow.gif]', '[img=images/smileys/ohmy.gif]', '[img=images/smileys/sad.gif]', '[img=images/smileys/ph34r.gif]', '[img=images/smileys/rolleyes.gif]', '[img=images/smileys/sleep.gif]', '[img=images/smileys/smile.gif]', '[img=images/smileys/tongue.gif]', '[img=images/smileys/unsure.gif]', '[img=images/smileys/wacko.gif]', '[img=images/smileys/wink.gif]', '[img=images/smileys/wub.gif]', '[img=images/smileys/XD.gif]', ); $completed_msg = str_replace($emos_code,$emos_images,$msg); mysql_query("INSERT INTO mail (mail_time,mail_from,mail_to,mail_read,mail_subject,mail_text) VALUES(unix_timestamp(),'{$ir['userid']}','{$who}','0','{$subject}','{$completed_msg}')") or die(mysql_error()); mysql_query("UPDATE users SET new_mail=new_mail+1 WHERE userid='{$who}'") or die(mysql_error()); echo 'Mail sent successfuly.'; $h->endpage(); exit; } if($_GET['ID']) { $value = $_GET['ID']; } else { $value = ""; } echo '<form action="?act=compose" method="post"> Who To: <input type="text" name="towho" value="'.$value.'"> Subject: <input type="text" name="subject" value="No Subject"> Message: <textarea name="msg" cols="50" rows="10"></textarea> <input type="submit" value="Send"> </form> '.$emos_toggle; } function outbox() { global $ir,$h; echo ' <table border="1" width="100%" cellspacing="0" class="table"> <tr> <th>To</th> <th>Subject</th> <th>Time Sent</th> <th>Actions</th> </tr> <tr>'; $v = mysql_query("SELECT * FROM mail WHERE mail_from='{$ir['userid']}' ORDER BY mail_time DESC LIMIT 10") or die(mysql_error()); while($in = mysql_fetch_assoc($v)) { $whos = mysql_query("SELECT * FROM users WHERE userid='{$in['mail_to']}'") or die(mysql_error()); $who = mysql_fetch_assoc($whos); echo '<td>[url="viewuser.php?u='.$who['userid'].'"]'.$who['username'].'[/url]</td> <td>'.$in['mail_subject'].'</td> <td>'.date("F j, Y, g:i:s a", $in['mail_time']).'</td> <td>[[url="?act=read&ID='.$in['mail_id'].'"]<font color="green">Read</font>[/url]]</td><tr>'; } echo '</tr></table>'; } function delb() { global $ir,$h,$ID; $t = mysql_query("SELECT * FROM mail WHERE mail_id='{$ID}'") or die(mysql_error()); $r = mysql_fetch_assoc($t); if($r['mail_to'] != $ir['userid']) { echo 'This mail is not yours!'; $h->endpage(); exit; } mysql_query("DELETE FROM mail WHERE mail_id='{$ID}'") or die(mysql_error()); echo 'Mail deleted successfuly.'; } function del() { global $ir,$h; if($_POST['gohome']) { header("location: index.php"); exit; } if($_POST['yes']) { $q = mysql_query("SELECT * FROM mail WHERE mail_to='{$ir['userid']}'") or die(mysql_error()); $f = mysql_num_rows($q); mysql_query("DELETE FROM mail WHERE mail_to='{$ir['userid']}'") or die(mysql_error()); echo $f.' mails deleted.'; $h->endpage(); exit; } echo 'Are you sure you want to delete all your mails? <form action="?act=del" method="post"> <input type="submit" value="Yes" name="yes"> | <input type="submit" value="No" name="gohome"> </form>'; } function archive() { echo 'This tool allows you to download your mails to your computer. [url="dlarchive.php?a=inbox"]Download Inbox Messages[/url] [url="dlarchive.php?a=outbox"]Download Outbox Messages[/url] Select a link above.'; } $h->endpage(); ?> Hope you like. EDIT: Please use this updated one. It has the bugs idealed out and now showing the emoticons that can be used.