
bocco
Members-
Posts
108 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by bocco
-
Re: Updated forums [mccodes v2] first thanks Solid Snake for the credit; second he is right you guys complain about the forums being broken, so i post an easy fix for them. Then you complain that the forums are not secure, which they have never really been. now about the SMF issue yes i suppose you are correct. Also this guy that i am in talks will can do a forum that operates like SMF, but that comes with a cost:( and i am not willing to spend the 200 bucks on that
-
Re: Updated forums [mccodes v2] well that comes with a HUGE problem one of my staffs name is (lets call him) darock and someone thinks it would be funny to make a username called darock before a staff does then that person can cause some trouble, YES i know you then can jail them for being a tool but why do we have to monitor even more stuff.
-
Re: Updated forums [mccodes v2] thanks ill add that. I am also in talks with someone to make SMF work with the uses so they do not have to sign up again :) this person does not belong on MCCODES but he is one of the best coders i have ever seen.
-
Re: Updated forums [mccodes v2] well if someone can secure the forum that would be great
-
Re: Updated forums [mccodes v2] the forums are secure if you are using $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['viewforum'] = abs(@intval($_GET['viewforum'])); $_GET['viewtopic'] = abs(@intval($_GET['viewtopic'])); in your header
-
Re: Updated forums [mccodes v2] the screen shots well it would be pointless since it is the normal forums, there was just 2 functions mission and that what was causing the errors
-
Re: Updated forums [mccodes v2] part 2 print "You have no permission to reply to this topic. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } if(!$topic['ft_locked']) { $u=$ir['username']; if($ir['ul_color']) { $uname="<font color='{$ir['ul_color']}'>"; if($ir['ul_isbold']) { $uname.="[b]"; } $uname.=$ir['username']; if($ir['ul_isbold']) { $uname.="[/b]"; } $uname.="</font>"; $u=$uname; } else if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>"; } $u=mysql_escape($u); $db->query("INSERT INTO forum_posts VALUES('', {$_GET['reply']}, {$forum['ff_id']}, $userid, '$u', unix_timestamp(), '{$_POST['fp_subject']}', '{$_POST['fp_text']}', 0, '', 0, 0)") or die(mysql_error()); $db->query("UPDATE forum_topics SET ft_last_id=$userid, ft_last_name='$u', ft_last_time=unix_timestamp(), ft_posts=ft_posts+1 WHERE ft_id={$_GET['reply']}"); $db->query("UPDATE forum_forums SET ff_lp_time=unix_timestamp(), ff_posts=ff_posts+1, ff_lp_poster_id=$userid, ff_lp_poster_name='$u', ff_lp_t_id={$_GET['reply']}, ff_lp_t_name='{$topic['ft_name']}' WHERE ff_id={$forum['ff_id']}"); $db->query("UPDATE users SET posts=posts+1 WHERE userid=$userid"); print "[b]Reply Posted![/b]<hr /> "; $_GET['lastpost']=1; $_GET['viewtopic']=$_GET['reply']; viewtopic(); } else { print " [i]This topic has been locked, you cannot reply to it.[/i] [url='forums.php?viewtopic={$_GET[']Back[/url]"; } } function newtopicform() { global $ir, $c, $userid, $h, $bbc, $db; $q=$db->query("SELECT * FROM forum_forums WHERE ff_id={$_GET['forum']}"); $r=$db->fetch_row($q); if(($r['ff_auth']=='gang' AND $ir['gang'] != $r['ff_owner']) OR ($r['ff_auth'] == 'staff' AND $ir['user_level'] < 2)) { print "You have no permission to view this forum. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } print <<<EOF <big>[url='forums.php']Forums Home[/url] >> [url='forums.php?viewforum={$_GET[']{$r['ff_name']}[/url] >> New Topic Form</big> <form action='forums.php?act=newtopic&forum={$_GET['forum']}' method='post'> <table cellspacing='1' class='table' width='80%' border='1'> <tr> <td align=right>Topic Name:</td> <td align=left><input type='text' name='ft_name' value='' /></td> </tr> <tr> <td align=right>Topic Description:</td> <td align=left><input type='text' name='ft_desc' value='' /></td> </tr> <tr> <td align=right>Topic Text:</td> <td align=left><textarea rows='8' cols='45' name='fp_text'></textarea></td> </tr> <tr> <th colspan=2><input type='submit' value='Post Topic' /></th> </tr> </table> EOF; } function newtopic() { global $ir, $c, $userid, $h, $bbc, $db; $q=$db->query("SELECT * FROM forum_forums WHERE ff_id={$_GET['forum']}"); $r=$db->fetch_row($q); if(($r['ff_auth']=='gang' AND $ir['gang'] != $r['ff_owner']) OR ($r['ff_auth'] == 'staff' AND $ir['user_level'] < 2)) { print "You have no permission to view this forum. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } $u=$ir['username']; if($ir['ul_color']) { $uname="<font color='{$ir['ul_color']}'>"; if($ir['ul_isbold']) { $uname.="[b]"; } $uname.=$ir['username']; if($ir['ul_isbold']) { $uname.="[/b]"; } $uname.="</font>"; $u=$uname; } else if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>"; } $u=mysql_escape($u); $db->query("INSERT INTO forum_topics VALUES('', {$_GET['forum']}, '{$_POST['ft_name']}', '{$_POST['ft_desc']}', 0, $userid, '$u', unix_timestamp(), 0, '', 0, 0, 0)"); $i=$db->insert_id(); $db->query("INSERT INTO forum_posts VALUES('', {$i}, {$r['ff_id']}, $userid, '$u', unix_timestamp(), '{$_POST['ft_desc']}', '{$_POST['fp_text']}', 0, '', 0, 0)") or die(mysql_error()); $db->query("UPDATE forum_topics SET ft_last_id=$userid, ft_last_name='$u', ft_last_time=unix_timestamp(), ft_posts=ft_posts+1 WHERE ft_id={$i}"); $db->query("UPDATE forum_forums SET ff_lp_time=unix_timestamp(), ff_posts=ff_posts+1, ff_topics=ff_topics+1, ff_lp_poster_id=$userid, ff_lp_poster_name='$u', ff_lp_t_id={$i}, ff_lp_t_name='{$_POST['ft_name']}' WHERE ff_id={$r['ff_id']}"); $db->query("UPDATE users SET posts=posts+1 WHERE userid=$userid"); print "[b]Topic Posted![/b]<hr /> "; $_GET['viewtopic']=$i; viewtopic(); } function emptyallforums() { global $ir, $c, $userid, $h, $bbc, $db; $db->query("update forum_forums set ff_lp_time=0, ff_lp_poster_id=0, ff_lp_poster_name='N/A', ff_lp_t_id=0, ff_lp_t_name='N/A',ff_posts=0, ff_topics=0"); $db->query("truncate forum_topics"); $db->query("truncate forum_posts"); } function quote() { global $ir, $c, $userid, $h, $bbc, $db; $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['viewtopic']}"); $topic=$db->fetch_row($q); $q2=$db->query("SELECT * FROM forum_forums WHERE ff_id={$topic['ft_forum_id']}"); $forum=$db->fetch_row($q2); if(($forum['ff_auth']=='gang' AND $ir['gang'] != $forum['ff_owner']) OR ($forum['ff_auth'] == 'staff' AND $ir['user_level'] < 2)) { print "You have no permission to reply to this topic. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } print "<big>[url='forums.php']Forums Home[/url] >> [url='forums.php?viewforum={$forum[']{$forum['ff_name']}[/url] >> [url='forums.php?viewtopic={$_GET[']{$topic['ft_name']}[/url] >> Quoting a Post</big> "; if(!$topic['ft_locked']) { print <<<EOF [b]Post a reply to this topic:[/b] <form action='forums.php?reply={$topic['ft_id']}' method='post'> <table cellspacing='1' class='table' width='80%' border='1'> <tr> <td align='right'>Subject:</td> <td align='left'><input type='text' name='fp_subject' /></td> </tr> <tr> <td align='right'>Post:</td> <td align='left'><textarea rows='7' cols='40' name='fp_text'>[quote="{$_GET['quotename'"]}]{$_GET['quotetext']}[/quote] </textarea></td> </tr> <tr> <th colspan='2'><input type='submit' value='Post Reply'></th> </tr> </table> </form> EOF; } else { print " [i]This topic has been locked, you cannot reply to it.[/i] [url='forums.php?viewtopic={$_GET[']Back[/url]"; } } function edit() { global $ir, $c, $userid, $h, $bbc, $db; $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $topic=$db->fetch_row($q); $q2=$db->query("SELECT * FROM forum_forums WHERE ff_id={$topic['ft_forum_id']}"); $forum=$db->fetch_row($q2); if(($forum['ff_auth']=='gang' AND $ir['gang'] != $forum['ff_owner']) OR ($forum['ff_auth'] == 'staff' AND $ir['user_level'] < 2)) { print "You have no permission to view this forum. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } $q3=$db->query("SELECT * FROM forum_posts WHERE fp_id={$_GET['post']}"); $post=$db->fetch_row($q3); if(!($ir['user_level'] > 1 || $ir['userid']==$post['fp_poster_id'])) { print "You have no permission to edit this post. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } print "<big>[url='forums.php']Forums Home[/url] >> [url='forums.php?viewforum={$forum[']{$forum['ff_name']}[/url] >> [url='forums.php?viewtopic={$_GET[']{$topic['ft_name']}[/url] >> Editing a Post</big> "; print <<<EOF <form action='forums.php?act=editsub&topic={$topic['ft_id']}&post={$_GET['post']}' method='post'> <table cellspacing='1' class='table' width='80%' border='1'> <tr> <td align='right'>Subject:</td> <td align='left'><input type='text' name='fp_subject' value='{$post['fp_subject']}' /></td> </tr> <tr> <td align='right'>Post:</td> <td align='left'><textarea rows='7' cols='40' name='fp_text'>{$post['fp_text']} </textarea></td> </tr> <tr> <th colspan='2'><input type='submit' value='Edit Post'></th> </tr> </table> </form> EOF; } function editsub() { global $ir, $c, $userid, $h, $bbc, $db; $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $topic=$db->fetch_row($q); $q2=$db->query("SELECT * FROM forum_forums WHERE ff_id={$topic['ft_forum_id']}"); $forum=$db->fetch_row($q2); if(($forum['ff_auth']=='gang' AND $ir['gang'] != $forum['ff_owner']) OR ($forum['ff_auth'] == 'staff' AND $ir['user_level'] < 2)) { print "You have no permission to view this forum. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } $q3=$db->query("SELECT * FROM forum_posts WHERE fp_id={$_GET['post']}"); $post=$db->fetch_row($q3); if(!($ir['user_level'] > 1 || $ir['userid']==$post['fp_poster_id'])) { print "You have no permission to edit this post. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } $db->query("UPDATE forum_posts SET fp_subject='{$_POST['fp_subject']}', fp_text='{$_POST['fp_text']}', fp_editor_id=$userid, fp_editor_name='{$ir['username']}', fp_editor_time=unix_timestamp(), fp_edit_count=fp_edit_count+1 WHERE fp_id={$_GET['post']}"); print "[b]Post Edited![/b]<hr /> "; $_GET['viewtopic']=$_GET['topic']; viewtopic(); } function recache_forum($forum) { global $ir, $c, $userid, $h, $bbc, $db; print "Recaching forum ID $forum ... "; $q=$db->query("SELECT p.*,t.* FROM forum_posts p LEFT JOIN forum_topics t ON p.fp_topic_id=t.ft_id WHERE p.fp_forum_id=$forum ORDER BY p.fp_time DESC LIMIT 1"); if(!$db->num_rows($q)) { $db->query("update forum_forums set ff_lp_time=0, ff_lp_poster_id=0, ff_lp_poster_name='N/A', ff_lp_t_id=0, ff_lp_t_name='N/A',ff_posts=0, ff_topics=0 where ff_id={$forum}"); print " ... Done"; } else { $r=$db->fetch_row($q); $tn=mysql_escape($r['ft_name']); $pn=mysql_escape($r['fp_poster_name']); $posts=$db->num_rows($db->query("SELECT fp_id FROM forum_posts WHERE fp_forum_id=$forum")); $topics=$db->num_rows($db->query("SELECT ft_id FROM forum_topics WHERE ft_forum_id=$forum")); $db->query("update forum_forums set ff_lp_time={$r['fp_time']}, ff_lp_poster_id={$r['fp_poster_id']}, ff_lp_poster_name='$pn', ff_lp_t_id={$r['ft_id']}, ff_lp_t_name='$tn',ff_posts=$posts, ff_topics=$topics where ff_id={$forum}"); print " ... Done "; } } function recache_topic($forum) { global $ir, $c, $userid, $h, $bbc, $db; print "Recaching topic ID $forum ... "; $q=$db->query("SELECT p.* FROM forum_posts p WHERE p.fp_topic_id=$forum ORDER BY p.fp_time DESC LIMIT 1"); if(!$db->num_rows($q)) { $db->query("update forum_topics set ft_last_id=0, ft_last_time=0, ft_last_name='N/A',ft_posts=0 where ft_id={$forum}"); print " ... Done"; } else { $r=$db->fetch_row($q); $pn=mysql_escape($r['fp_poster_name']); $posts=$db->num_rows($db->query("SELECT fp_id FROM forum_posts WHERE fp_topic_id=$forum")); $db->query("update forum_topics set ft_last_id={$r['fp_poster_id']}, ft_last_time={$r['fp_time']}, ft_last_name='$pn',ft_posts=$posts where ft_id={$forum}"); print " ... Done "; } } function move() { global $ir, $c, $userid, $h, $bbc, $db; if($ir['user_level'] < 2) { die(""); } $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $topic=$db->fetch_row($q); $q2=$db->query("SELECT * FROM forum_forums WHERE ff_id={$_POST['forum']}"); $forum=$db->fetch_row($q2); $db->query("UPDATE forum_topics SET ft_forum_id={$_POST['forum']} WHERE ft_id={$_GET['topic']}"); $db->query("UPDATE forum_posts SET fp_forum_id={$_POST['forum']} WHERE fp_topic_id={$_GET['topic']}"); print "Topic moved... "; stafflog_add("Moved Topic {$topic['ft_name']} to {$forum['ff_name']}"); recache_forum($topic['ft_forum_id']); recache_forum($_POST['forum']); } function lock() { global $ir, $c, $userid, $h, $bbc, $db; if($ir['user_level'] < 2) { die(""); } $db->query("UPDATE forum_topics SET ft_locked=-ft_locked+1 WHERE ft_id={$_GET['topic']}"); $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $r=$db->fetch_row($q); print "[b]{$r['ft_name']}[/b]'s lock status changed, if it was unlocked, it will now be locked, otherwise, it will be unlocked."; if($r['ft_locked']==0) { stafflog_add("Unlocked Topic {$r['ft_name']}"); } else { stafflog_add("Locked Topic {$r['ft_name']}"); } } function pin() { global $ir, $c, $userid, $h, $bbc, $db; if($ir['user_level'] < 2) { die(""); } $db->query("UPDATE forum_topics SET ft_pinned=-ft_pinned+1 WHERE ft_id={$_GET['topic']}"); $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $r=$db->fetch_row($q); print "[b]{$r['ft_name']}[/b]'s pin status changed, if it was unpinned, it will now be pinned, otherwise, it will be unpinned."; if($r['ft_pinned']==0) { stafflog_add("Unpinned Topic {$r['ft_name']}"); } else { stafflog_add("Pinned Topic {$r['ft_name']}"); } } function delepost() { global $ir, $c, $userid, $h, $bbc, $db; if($ir['user_level'] < 2) { die(""); } $q3=$db->query("SELECT * FROM forum_posts WHERE fp_id={$_GET['post']}"); $post=$db->fetch_row($q3); $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$post['fp_topic_id']}"); $topic=$db->fetch_row($q); $u=mysql_escape($post['fp_poster_name']); $db->query("DELETE FROM forum_posts WHERE fp_id={$post['fp_id']}"); print "Post deleted... "; recache_topic($post['fp_topic_id']); recache_forum($post['fp_forum_id']); stafflog_add("Deleted post ({$post['fp_subject']}) in {$topic['ft_name']}"); } function deletopic() { global $db; $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['topic']}"); $topic=$db->fetch_row($q); $db->query("DELETE FROM forum_topics WHERE ft_id={$_GET['topic']}"); $db->query("DELETE FROM forum_posts WHERE fp_topic_id={$_GET['topic']}"); print "Deleting topic... Done "; recache_forum($topic['ft_forum_id']); stafflog_add("Deleted topic {$topic['ft_name']}"); } $h->endpage(); ?>
-
so i looked around and could not find a fix for the forums. If you are having issues with deleting posts or topics or moving them use this. Tested and fully working <?php session_start(); $forums=1; class bbcode { var $engine=""; function bbcode() { require "bbcode_engine.php"; $this->engine= new bbcode_engine; $this->engine->cust_tag("/</","<"); $this->engine->cust_tag("/>/",">"); //Since \n and screw up preg, convert them out. $this->engine->cust_tag("/\n/","&nbrlb;"); $this->engine->simple_bbcode_tag("b"); $this->engine->simple_bbcode_tag("i"); $this->engine->simple_bbcode_tag("u"); $this->engine->simple_bbcode_tag("s"); $this->engine->simple_bbcode_tag("sub"); $this->engine->simple_bbcode_tag("sup"); $this->engine->simple_bbcode_tag("big"); $this->engine->simple_bbcode_tag("small"); $this->engine->adv_bbcode_tag("list","ul"); $this->engine->adv_bbcode_tag("olist","ol"); $this->engine->adv_bbcode_tag("item","li"); $this->engine->adv_option_tag("font","font","family"); $this->engine->adv_option_tag("size","font","size"); $this->engine->adv_option_tag("url","a","href"); $this->engine->adv_option_tag("color","font","color"); $this->engine->adv_option_tag("style","span","style"); $this->engine->simp_option_notext("img","src"); $this->engine->simp_bbcode_att("img","src"); $this->engine->cust_tag("/\(c\)/","©"); $this->engine->cust_tag("/\(tm\)/","?"); $this->engine->cust_tag("/\(r\)/","®"); $this->engine->adv_option_tag_em("email","a","href"); $this->engine->adv_bbcode_att_em("email","a","href"); $this->engine->cust_tag("/\[left\](.+?)\[\/left\]/","<div align='left'>\\1</div>"); $this->engine->cust_tag("/\[center\](.+?)\[\/center\]/","<div align='center'>\\1</div>"); $this->engine->cust_tag("/\[right\](.+?)\[\/right\]/","<div align='right'>\\1</div>"); $this->engine->cust_tag("/\[quote="(.+?)\"](.+?)\[\/quote\]/","<div class='quotetop'>QUOTE(\\1)</div><div class='quotemain'>\\2</div>"); $this->engine->cust_tag("/\[quote\](.+?)\[\/quote\]/","<div class='quotetop'>QUOTE</div><div class='quotemain'>\\1</div>"); $this->engine->cust_tag("/\[code\](.+?)\[\/code\]/","<div class='codetop'>CODE</div><div class='codemain'><code>\\1</code></div>"); $this->engine->cust_tag("/\[codebox\](.+?)\[\/codebox\]/","<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>\\1</div>"); $this->engine->cust_tag("/&nbrlb;/"," \n"); } function bbcode_parse($html) { return $this->engine->parse_bbcode($html); } } function strip_html_tags($text) { return preg_replace("/<(.+?)>/is","", $text); } function forums_rank($tp) { if ( $tp < 3 ) { return "#1 Absolute Newbie"; } else if ( $tp < 7 ) { return "#2 Newbie"; } else if ( $tp < 12 ) { return "#3 Beginner"; } else if ( $tp < 18 ) { return "#4 Not Experienced"; } else if ( $tp < 25 ) { return "#5 Rookie"; } else if ( $tp < 50 ) { return "#6 Average"; } else if ( $tp < 100 ) { return "#7 Good"; } else if ( $tp< 200 ) { return "#8 Very Good"; } else if ( $tp < 350 ) { return "#9 Greater Than Average"; } else if ( $tp < 500 ) { return "#10 Experienced"; } else if ( $tp < 750 ) { return "#11 Highly Experienced"; } else if ( $tp < 1200 ) { return "#12 Honoured"; } else if ( $tp < 1800 ) { return "#13 Highly Hounoured"; } else if ( $tp < 2500 ) { return "#14 Respect King"; } else if ( $tp < 5000) { return "#15 True Champion"; } } require "globals.php"; $bbc = new bbcode; print "<h3>Forums</h3><hr />"; if($ir['forumban']) { die("<font color=red><h3>! ERROR</h3> You have been forum banned for {$ir['forumban']} days. [b]Reason: {$ir['fb_reason']}</font>[/b]"); } $_GET['viewforum']=(int) $_GET['viewforum']; if($_GET['viewtopic'] and $_GET['act'] != 'quote') { $_GET['act']='viewtopic'; } if($_GET['viewforum']) { $_GET['act']='viewforum'; } if($_GET['reply']) { $_GET['act']='reply'; } if($_GET['empty']==1 && $_GET['code']=='kill' && $_SESSION['owner']) { emptyallforums(); } switch($_GET['act']) { case 'viewforum': viewforum(); break; case 'viewtopic': viewtopic(); break; case 'reply': reply(); break; case 'newtopicform': newtopicform(); break; case 'newtopic': newtopic(); break; case 'quote': quote(); break; case 'edit': edit(); break; case 'move': move(); break; case 'editsub': editsub(); break; case 'lock': lock(); break; case 'delepost': delepost(); break; case 'deletopic': deletopic(); break; case 'pin': pin(); break; case 'recache': recache_forum($_GET['forum']); break; default: idx(); break; } function idx() { global $ir, $c, $userid, $h, $bbc, $db; $q=$db->query("SELECT * FROM forum_forums WHERE ff_auth='public' ORDER BY ff_id ASC") or die(mysql_error()); print "<table class='table' width='100%' border='1' cellspacing='1'> <tr><th>Forum</th> <th>Posts</th> <th>Topics</th> <th>Last Post</th> </tr>\n"; while($r=$db->fetch_row($q)) { $t=date('F j Y, g:i:s a',$r['ff_lp_time']); print "<tr> <td align='center'>[url='forums.php?viewforum={$r[']{$r['ff_name']}[/url] [size="1"]{$r['ff_desc']}[/size]</td> <td align='center'>{$r['ff_posts']}</td> <td align='center'>{$r['ff_topics']}</td> <td align='center'>$t In: [url='forums.php?viewtopic={$r[']{$r['ff_lp_t_name']}[/url] By: [url='viewuser.php?u={$r[']{$r['ff_lp_poster_name']}[/url] </td> </tr>\n"; } print "\n</table>"; if($ir['user_level'] <> 1) { print "<hr /><a name='staff'><h3>Staff-Only Forums</h3></a><hr />"; $q=$db->query("SELECT * FROM forum_forums WHERE ff_auth='staff' ORDER BY ff_id ASC") or die(mysql_error()); print "<table cellspacing='1' class='table' width='100%' border='1'> <tr><th>Forum</th> <th>Posts</th> <th>Topics</th> <th>Last Post</th> </tr>\n"; while($r=$db->fetch_row($q)) { $t=date('F j Y, g:i:s a',$r['ff_lp_time']); print "<tr> <td align='center'>[url='forums.php?viewforum={$r[']{$r['ff_name']}[/url] [size="1"]{$r['ff_desc']}[/size]</td> <td align='center'>{$r['ff_posts']}</td> <td align='center'>{$r['ff_topics']}</td> <td align='center'>$t In: [url='forums.php?viewtopic={$r[']{$r['ff_lp_t_name']}[/url] By: [url='viewuser.php?u={$r[']{$r['ff_lp_poster_name']}[/url] </td> </tr>\n"; } print "\n</table>"; } } function viewforum() { global $ir, $c, $userid, $h, $bbc, $db; $q=$db->query("SELECT * FROM forum_forums WHERE ff_id={$_GET['viewforum']}"); $r=$db->fetch_row($q); if(($r['ff_auth']=='gang' AND $ir['gang'] != $r['ff_owner'] AND $ir["user_level"] < 2) OR ($r['ff_auth'] == 'staff' AND $ir['user_level'] < 2)) { print "You have no permission to view this forum. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } if($_GET['viewforum'] <> 1 OR $ir['user_level']==2) { $ntl=" [[url='forums.php?act=newtopicform&forum={$_GET[']New Topic[/url]]"; } else { $ntl=""; } print "<big>[url='forums.php']Forums Home[/url] >> [url='forums.php?viewforum={$_GET[']{$r['ff_name']}[/url]$ntl</big> <table cellspacing='1' class='table' width='100%' border='1'> <tr> <th>Topic</th> <th>Posts</th> <th>Started</th> <th>Last Post</th></tr>\n"; $q=$db->query("SELECT * FROM forum_topics WHERE ft_forum_id={$_GET['viewforum']} ORDER BY ft_pinned DESC, ft_last_time DESC") or die(mysql_error()); while($r2=$db->fetch_row($q)) { $t1=date('F j Y, g:i:s a',$r2['ft_start_time']); $t2=date('F j Y, g:i:s a',$r2['ft_last_time']); if($r2['ft_pinned']) { $pt="[b]Pinned:[/b] "; } else { $pt=""; } if($r2['ft_locked']) { $lt=" [b](Locked)[/b]"; } else { $lt=""; } print "<tr> <td align='center'>$pt[url='forums.php?viewtopic={$r2[']{$r2['ft_name']}[/url]$lt [size="1"]{$r2['ft_desc']}[/size]</td> <td align='center'>{$r2['ft_posts']}</td> <td align='center'>$t1 By: [url='viewuser.php?u={$r2[']{$r2['ft_owner_name']}[/url]</td> <td align='center'>$t2 By: [url='viewuser.php?u={$r2[']{$r2['ft_last_name']}[/url]</td> </tr>\n"; } print "</table>"; } function viewtopic() { global $ir, $c, $userid, $h, $bbc, $db; $precache=array(); $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['viewtopic']}"); $topic=$db->fetch_row($q); $q2=$db->query("SELECT * FROM forum_forums WHERE ff_id={$topic['ft_forum_id']}"); $forum=$db->fetch_row($q2); if(($forum['ff_auth']=='gang' AND $ir['gang'] != $forum['ff_owner'] and $ir["user_level"] < 2) OR ($forum['ff_auth'] == 'staff' AND $ir['user_level'] < 2)) { print "You have no permission to view this forum. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } print "<big>[url='forums.php']Forums Home[/url] >> [url='forums.php?viewforum={$forum[']{$forum['ff_name']}[/url] >> [url='forums.php?viewtopic={$_GET[']{$topic['ft_name']}[/url]</big> "; $posts_per_page=20; $posts_topic=$topic['ft_posts']; $pages=ceil($posts_topic/$posts_per_page); $st= ($_GET['st']) ? $_GET['st'] : 0; if($_GET['lastpost']) { $st=($pages-1)*20; } $pst=-20; print "Pages: "; for($i=1;$i<=$pages;$i++) { $pst+=20; print "<a href='forums.php?viewtopic={$topic['ft_id']}&st=$pst'>"; if($pst == $st) { print "[b]"; } print $i; if($pst == $st) { print "[/b]"; } print "</a> "; if($i % 25 == 0) { print " "; } } print " "; if($ir['user_level'] > 1) { print " <form action='forums.php?act=move&topic={$_GET['viewtopic']}' method='post'>[b]Move topic to:[/b] ".forum_dropdown($c, 'forum', -1)."<input type='submit' value='Move' /></form> [url='forums.php?act=pin&topic={$_GET['][img=sticky.jpg][/url][url='forums.php?act=lock&topic={$_GET['][img=lock.jpg][/url][url='forums.php?act=deletopic&topic={$_GET['][img=delete.gif][/url] "; } print " <table cellspacing='1' class='table' width='100%' border='1'>\n"; $q3=$db->query("SELECT * FROM forum_posts WHERE fp_topic_id={$topic['ft_id']} ORDER BY fp_time ASC LIMIT $st, 20"); $no=$st; while($r=$db->fetch_row($q3)) { $qlink="[[url='forums.php?act=quote&viewtopic={$_GET[']Quote Post[/url]]"; if($ir['user_level'] > 1 || $ir['userid']==$r['fp_poster_id']) { $elink="[[url='forums.php?act=edit&post={$r[']Edit Post[/url]]"; } else { $elink=""; } $no++; if($no > 1 and $ir['user_level'] > 1) { $dlink="[[url='forums.php?act=delepost&post={$r[']Delete Post[/url]]"; } else { $dlink=""; } $t=date('F j Y, g:i:s a',$r['fp_time']); if($r['fp_edit_count'] > 0) { $edittext="\n [i]Last edited by [url='viewuser.php?u={$r[']{$r['fp_editor_name']}[/url] at ".date('F j Y, g:i:s a',$r['fp_editor_time']).", edited [b]{$r['fp_edit_count']}[/b] times in total.[/i]"; } else { $edittext=""; } if(!$precache[$r['fp_poster_id']]['userid']) { $membq=$db->query("SELECT * FROM users WHERE userid={$r['fp_poster_id']}"); $memb=$db->fetch_row($membq); $precache[$memb['userid']]=$memb; } else { $memb=$precache[$r['fp_poster_id']]; } $rank=forums_rank($memb['posts']); if($memb['forums_avatar']) { $av="[img={$memb[]"; } else { $av="[img=noav.gif]"; } if(!$memb['forums_signature']) { $memb['forums_signature']="No Signature"; } else {$memb['forums_signature']=$bbc->bbcode_parse($memb['forums_signature']); } $r['fp_text']=$bbc->bbcode_parse($r['fp_text']); print "<tr> <th align='center'>Post #{$no}</th> <th align='center'>Subject: {$r['fp_subject']} Posted at: $t $qlink$elink$dlink</th> </tr> <tr> <td valign=top>[url='viewuser.php?u={$r[']{$r['fp_poster_name']}[/url] [{$r['fp_poster_id']}] $av Level: {$memb['level']}</td> <td valign=top>{$r['fp_text']} {$edittext} ------------------- {$memb['forums_signature']}</td> </tr>"; } print "</table>"; $pst=-20; print "Pages: "; for($i=1;$i<=$pages;$i++) { $pst+=20; print "<a href='forums.php?viewtopic={$topic['ft_id']}&st=$pst'>"; if($pst == $st) { print "[b]"; } print $i; if($pst == $st) { print "[/b]"; } print "</a> "; if($i % 25 == 0) { print " "; } } if(!$topic['ft_locked']) { print <<<EOF [b]Post a reply to this topic:[/b] <form action='forums.php?reply={$topic['ft_id']}' method='post'> <table cellspacing='1' class='table' width='80%' border='1'> <tr> <td align='right'>Subject:</td> <td align='left'><input type='text' name='fp_subject' /></td> </tr> <tr> <td align='right'>Post:</td> <td align='left'><textarea rows='7' cols='40' name='fp_text'></textarea></td> </tr> <tr> <th colspan='2'><input type='submit' value='Post Reply'></th> </tr> </table> </form> EOF; } else { print " [i]This topic has been locked, you cannot reply to it.[/i]"; } } function reply() { global $ir, $c, $userid, $h, $bbc, $db; $q=$db->query("SELECT * FROM forum_topics WHERE ft_id={$_GET['reply']}"); $topic=$db->fetch_row($q); $q2=$db->query("SELECT * FROM forum_forums WHERE ff_id={$topic['ft_forum_id']}"); $forum=$db->fetch_row($q2); if(($forum['ff_auth']=='gang' AND $ir['gang'] != $forum['ff_owner']) OR ($forum['ff_auth'] == 'staff' AND $ir['user_level'] < 2)) {
-
Re: [mccode v2] Ignore User Mail i am having an issue with blocking a user, it is blocking me from sending a mail to them but they can still send mail so example i block ID 5 well ID 5 can send me mail but i cant send ID 5 mail it will say this person has choosen to ignore mails from you
-
Re: [mccode v2] body guards [$15.00] note taken i will change it to 5 dollars, but i cant change the first part as there is no edit anymore ???? and i know its is simple to code. Though there is a lot of lazy people out there. I was one and did not feel like coding but now that i have more time on my hands i enjoy doing it again.
-
Re: [mccode v2] body guards [$15.00] thank you for the +1 well the crons just counts down the time but like i said is a more simple set up with a cleaner code.
-
Re: [mccode v2] body guards [$15.00] alright just figured i make a little neater code and more simple to edit not sure how this the other one works, but i know all you do is go to explore and then click *name* and click buy and it gets applied right away. the other one seems kinda alot of code to do something simple
-
Re: [mccodes v2] body guards mine is 10 times less complex 1 php file 2 crons and 1-4 edits depending on what area you want protection in
-
Selling bodyguard protection. ($15) this will protect a member from attacks and breakins and drive bys (if requested) for 1 hour; up to 2 hours the price is according to the persons level. Mail me here if you have any questions. Mods Left - 30
-
Re: [request] Userlist well here is the thing, i do not want others to know they are in there the list would only be a link in the 'club' just a little more info. once you pay the fee to get in the club it sets 'clubakbuyin' to 1 so i would need the list to look for clubakbuyin >= 1 and if clubakbuyin = 1 then list username
-
i have created a mod, and now i am a little lost in making a user list for the mod the mod is a special club that only members that are a 'x' level can get in and of course pay the entry free. what i need is a user list of all the members that are in the club. Can anyone help me out please. Oh the table is of course in users and is named clubakbuyin
-
Re: [mccode v2] My Orginization & My Production Yeah i know, i am just lazy
-
Re: [mccodes V2] Bounty Hunter Game The crons was not working for me either, but i changed AND to a & and now it works perfect. Great Mod
-
i am just wondering if anyone knows how to not allow people to sell items that the sell price is 0.00 the reason the sell price is 0 is that its an item that is giving away though crimes. Also along with not allowing to resell this item is it possible no to do transfers on these items as well.
-
Re: My Orginization & My Production (V2) I still think the set up would look better if the table was 2 x 2 instead of 1x4
-
Re: My Orginization & My Production (V2) You should make 2 tables next to each other and 2 below it instead of having 4 rows
-
Re: Warning I do have a IPban for the sites, if you guys want to see how it works i can show you., just PM and ill get back to you
-
Well, i been talking to Killah and i got him to fix the battle tent for me. He did a great job. He told me he been wanting to do that for 2 years now, but no one has ever pushed him to do it. So i figured i would post it for him since it could take him another 2 years. Great code though, i love his work. <?php include("globals.php"); echo ' <h2>Battle Tent</h2> [b]Welcome to the battle tent! Here you can challenge NPC\'s for money.[/b] <table border="0" width="100%" cellspacing="0" cellpadding="0" class="table"> <tr> <th>Bot Name</th> <th>Level</th> <th>Times Owned</th> <th>Challengable</th> <th>Location</th> <th>Money Won</th> <th>Challenge</th> </tr> <tr>'; $fetch = mysql_query("SELECT * FROM users WHERE user_level=0") or die(mysql_error()); while($user = mysql_fetch_assoc($fetch)) { $sele = mysql_fetch_assoc(mysql_query("SELECT * FROM challengebots WHERE cb_npcid=".$user['userid'])) or die(mysql_error()); $city = mysql_fetch_assoc(mysql_query("SELECT * FROM cities WHERE cityid=".$user['location'])) or die(mysql_error()); $count = mysql_num_rows(mysql_query("SELECT * FROM challengesbeaten WHERE npcid=".$user['userid'])) or die(mysql_error()); echo ' <td>[url="viewuser.php?u='.$user['userid'].'"]'.$user['username'].'[/url] ['.$user['userid'].']</td> <td>'.$user['level'].'</td> <td>'.$count.'</td> <td>'; if($ir['hp'] >= $ir['maxhp']/2 && $ir['hospital'] == 0 && $ir['jail'] == 0 && $ir['location'] == $user['location'] && $user['hospital'] == 0 && $user['jail'] == 0 && $user['hp'] >= $user['maxhp']/2) { echo ' <font color="green">Yes</font>'; } else { echo ' <font color="red">No</font>'; }echo ' </td> <td>'.$city['cityname'].'</td> <td>'.money_formatter($sele['cb_money']).'</td> <td>'; if($ir['hp'] >= $ir['maxhp']/2 && $ir['hospital'] == 0 && $ir['jail'] == 0 && $ir['location'] == $user['location'] && $user['hospital'] == 0 && $user['jail'] == 0 && $user['hp'] >= $user['maxhp']/2) { echo ' [url="attack.php?ID='.$user['userid'].'"]<font color="green">Attack</font>[/url]'; } else { echo ' <font color="red">You can\'t at this moment.</font>'; }echo ' </td> <tr>'; } echo ' </tr> </table>'; $h->endpage(); ?> Just a small update he forgot to add
-
Re: New improved mailbox. i fixed that for you, there is still one more problem, if you delete a mail before reading it will still show you have unread mail <?php include("globals.php"); ?> <script type="text/javascript"> function insertSmiley(smiley) { var currentText = document.getElementById("message"); var smileyWithPadding = " " + smiley + " "; currentText.innerHTML += smileyWithPadding; } </script> <?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 [b]Note: Images are clickable.[/b] <table border="0" 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/love.gif]</td><td>(h)</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="0" 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() {if($ir['new_mail'] < 0) { $db->query("UPDATE users SET new_mail=0 WHERE userid=$userid"); } } { global $ir,$h; echo ' <table border="0" 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 30") 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>[url="?act=read&ID='.$in['mail_id'].'"]'.$in['mail_subject'].'[/url]</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 = $_POST['message']; $msg = str_replace(array("\n"),array(" "),strip_tags($msg)); $subject = $_POST['subject']; $who = abs(@intval($_POST['towho'])); $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:', '(h)', ); $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/love.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="0" cellspacing="0" class="table" width="100%"> <tr> <th>Subject</th> <th>Mail</th> </tr> <tr> <td width="20%">'.$f['mail_subject'].'</td> <td width="80%">'.$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="message" cols="50" rows="10" id="message"></textarea> <input type="submit" value="Send"> </form> '.$emos_toggle; } function compose() { global $ir,$h,$emos_toggle; if($_POST['towho']) { $msg = $_POST['message']; $msg = str_replace(array("\n"),array(" "),strip_tags($msg)); $subject = $_POST['subject']; $who = abs(@intval($_POST['towho'])); $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:', '(h)', ); $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/lov.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="message" cols="50" rows="10" id="message"></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 30") 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>[url="?act=read&ID='.$in['mail_id'].'"]'.$in['mail_subject'].'[/url]</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.'; inbox(); } 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(); ?>
-
[mccode v2] Enhanced Hall of fame COMPLETED!
bocco replied to Haunted Dawg's topic in Free Modifications
Re: Enhanced Hall of fame [v2] Very sweet mod, cant wait to see the rest