
Oo-Savage-oO
Members-
Posts
91 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Oo-Savage-oO
-
a little modification for noob coders this allows users to see each others houses <?php include "globals.php"; $_GET['id'] = abs((int) $_GET['id']); if(!$_GET['id']) { print "Invalid use of file"; } else { $id = $_GET['id']; $houses = mysql_query(sprintf("SELECT * FROM `owned_houses` LEFT JOIN `houses` ON (`hID` = `uhouseHouse`) LEFT JOIN `users` ON (`userid` = `uhouseOwner`) WHERE (`uhouseOwner` = '%u' || `uhouseTenant` = '%u') AND `uhouseId` != '%d'", $id, $id, $id)); echo '<table width="600" class="table"> <tr> <th width="50%">House name</th> <th width="50%">Owner</th> </tr>'; if(!mysql_num_rows($houses)) { echo '<tr> <td colspan="5">This user has no house at this time.</td> </tr>'; } while($r = mysql_fetch_assoc($houses)) { echo '<tr> <td>'.stripslashes($r['hNAME']).'</td> <td>[url="viewuser.php?u='.$r['userid'].'"]'.stripslashes($r['username']).'[/url]</td> </tr>'; } echo '</table>'; } $h->endpage(); ?>
-
Well I don't know where to post so i will post here. I was wondering how to configure my paypal with mccodes v2. So users automatically get dp's once they pay
-
Multiple Houses/House Upgrades [$10]
Oo-Savage-oO replied to BreakingLight's topic in Paid Modifications
There is one out there for free!! -
I think u mean the header i made, i never was distributing just asking others there opinion on it
-
Urgent Forum Error; Help Please
Oo-Savage-oO replied to Oo-Savage-oO's topic in Modification Support
the error is Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/****/public_html/forums.php on line 325 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/****/public_html/forums.php on line 362 -
this is cronus's advanced secured forums from cronwerks but it has a prob plz help me fix it <?php session_start(); include "globals.php"; $forums=1; print"<center><font size=5>Forums</font></center> "; 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 name='(.+?)\'](.+?)\[\/quote\]/","<font color=red>[b]Quoting \\1[/b]</font> <blockquote>\\2</blockquote>"); $this->engine->cust_tag("/\[quote\](.+?)\[\/quote\]/","<font color=red>[b]Quote:[/b]</font><table width=100%><tr><td><blockquote>\\1</blockquote><td></tr></table>"); $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 "#12 Forum Newbie"; } else if ( $tp < 10 ) { return "#11 Active Member"; } else if ( $tp < 25 ) { return "#10 Beginning Poster"; } else if ( $tp < 50 ) { return "#9 Average Poster"; } else if ( $tp < 100 ) { return "#8 Good Poster"; } else if ( $tp < 250 ) { return "#7 Very Good Poster"; } else if ( $tp < 500 ) { return "#6 Experienced Poster"; } else if ( $tp< 750 ) { return "#5 Honored Poster"; } else if ( $tp < 1000 ) { return "#4 Posting Champion"; } else if ( $tp < 1500 ) { return "#3 Posting King"; } else if ( $tp < 2500 ) { return "#2 Posting God"; } else if ( $tp < 5000 ) { return "#1 Forum Guru"; } } $bbc = new bbcode; if($ir['forumban']) { echo "<font color=red><h3>! ERROR</h3> You have been forum banned for {$ir['forumban']} days. [b]Reason: {$ir['fb_reason']}</font>[/b]"; $h->endpage(); exit; } $_GET['viewforum']=(int) $_GET['viewforum']; if(is_numeric($_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; $q=mysql_query("SELECT * FROM forum_forums WHERE ff_auth='public' ORDER BY ff_id ASC",$c) or die(mysql_error()); print " <table style='border-style:solid;border-width:1px;border-color:#303030;' width='100%' cellpadding='5'> <tr bgcolor='#606060'><th width=40%>Forum</th> <th width=10%>Posts</th> <th width=10%>Topics</th> <th width=40%>Last Post</th> </tr>"; while($r=mysql_fetch_array($q)) { $t=date('F j Y, g:i:s a',$r['ff_lp_time']); $pstr=mysql_query("SELECT * FROM users WHERE userid={$r['ff_lp_poster_id']}",$c); $poster=mysql_fetch_array($pstr); $mycolor=""; if($poster['user_level'] == 2) { $mycolor="blue"; } if($poster['user_level'] == 1 && $poster['donatordays'] == 0) { $mycolor=""; } if($poster['user_level'] == 1 && $poster['donatordays'] > 0) { $mycolor="lightblue"; } if($poster['user_level'] == 4) { $mycolor="purple"; } if($poster['user_level'] == 3) { $mycolor="green"; } if($poster['user_level'] == 5) { $mycolor="orange"; } $posts=number_format($r['ff_posts']); print "<tr bgcolor='#404040'> <td align='center'>[url='forums.php?viewforum={$r[']{$r['ff_name']}[/url] [size="1"]{$r['ff_desc']}[/size]</td> <td align='center'>$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[']<font color=$mycolor>{$r['ff_lp_poster_name']}</font>[/url] </td> </tr>"; } print "</table>"; if($ir['user_level'] == 5 || $ir['user_level'] == 2 || $ir['user_level'] == 3) { print "<hr /><a name='staff'><h3>Staff-Only Forums</h3></a><hr />"; $q=mysql_query("SELECT * FROM forum_forums WHERE ff_auth='staff' ORDER BY ff_id ASC",$c) or die(mysql_error()); print " <table style='border-style:solid;border-width:1px;border-color:#303030;' width='100%' cellpadding='5'> <tr bgcolor='#606060'><th>Forum</th> <th>Posts</th> <th>Topics</th> <th>Last Post</th> </tr>"; while($r=mysql_fetch_array($q)) { $t=date('F j Y, g:i:s a',$r['ff_lp_time']); $pstr=mysql_query("SELECT * FROM users WHERE userid={$r['ff_lp_poster_id']}",$c); $poster=mysql_fetch_array($pstr); $mycolor=""; if($poster['user_level'] == 2) { $mycolor="blue"; } if($poster['user_level'] == 1 && $poster['donatordays'] == 0) { $mycolor=""; } if($poster['user_level'] == 1 && $poster['donatordays'] > 0) { $mycolor="lightblue"; } if($poster['user_level'] == 4) { $mycolor="purple"; } if($poster['user_level'] == 3) { $mycolor="green"; } if($poster['user_level'] == 5) { $mycolor="orange"; } $posts=number_format($r['ff_posts']); print "<tr bgcolor='#404040'> <td align='center'>[url='forums.php?viewforum={$r[']{$r['ff_name']}[/url] [size="1"]{$r['ff_desc']}[/size]</td> <td align='center'>$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[']<font color=$mycolor>{$r['ff_lp_poster_name']}</font>[/url] </td> </tr>"; } print "</table>"; } } function viewforum() { global $ir, $c, $userid, $h, $bbc, $db; $q=mysql_query("SELECT * FROM forum_forums WHERE ff_id={$_GET['viewforum']}",$c); $r=mysql_fetch_array($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'] == 1 || $r['ff_auth'] == 'staff' AND $ir['user_level'] == 4)) { 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 style='border-style:solid;border-width:1px;border-color:#303030;' width='100%' cellpadding='5'> <tr bgcolor='#606060'> <th width=40%>Topic</th> <th width=10%>Posts</th> <th width=25%>Started</th> <th width=25%>Last Post</th></tr>"; $q=mysql_query("SELECT * FROM forum_topics WHERE ft_forum_id={$_GET['viewforum']} ORDER BY ft_pinned DESC, ft_last_time DESC",$c) or die(mysql_error()); while($r2=mysql_fetch_array($q)) { $pstr=mysql_query("SELECT * FROM users WHERE userid={$r2['ft_owner_id']}",$c); $poster=mysql_fetch_array($pstr); $mycolor=""; if($poster['user_level'] == 2) { $mycolor="blue"; } if($poster['user_level'] == 1 && $poster['donatordays'] == 0) { $mycolor=""; } if($poster['user_level'] == 1 && $poster['donatordays'] > 0) { $mycolor="lightblue"; } if($poster['user_level'] == 4) { $mycolor="purple"; } if($poster['user_level'] == 3) { $mycolor="green"; } if($poster['user_level'] == 5) { $mycolor="orange"; } $lst=mysql_query("SELECT * FROM users WHERE userid={$r2['ft_last_id']}",$c); $last=mysql_fetch_array($lst); $bycolor=""; if($last['user_level'] == 2) { $bycolor="blue"; } if($last['user_level'] == 1 && $last['donatordays'] == 0) { $bycolor=""; } if($last['user_level'] == 1 && $last['donatordays'] > 0) { $bycolor="lightblue"; } if($last['user_level'] == 4) { $bycolor="purple"; } if($last['user_level'] == 3) { $bycolor="green"; } if($last['user_level'] == 5) { $bycolor="orange"; } $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=""; } $posts=number_format($r2['ft_posts']); print "<tr bgcolor='#404040'> <td align='center'>$pt[url='forums.php?viewtopic={$r2[']{$r2['ft_name']}[/url]$lt [size="1"]{$r2['ft_desc']}[/size]</td> <td align='center'>$posts</td> <td align='center'><font size=1>$t1 By: [url='viewuser.php?u={$r2[']<font color=$mycolor>{$r2['ft_owner_name']}</font>[/url]</font></td> <td align='center'><font size=1>$t2 By: [url='viewuser.php?u={$r2[']<font color=$bycolor>{$r2['ft_last_name']}</font>[/url]</font></td> </tr>"; } print "</table>"; } function viewtopic() { global $ir, $c, $userid, $h, $bbc, $db; $precache=array(); $q=mysql_query("SELECT * FROM forum_topics WHERE ft_id={$_GET['viewtopic']}",$c); $topic=mysql_fetch_array($q); $q2=mysql_query("SELECT * FROM forum_forums WHERE ff_id={$topic['ft_forum_id']}",$c); $forum=mysql_fetch_array($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'] == 2 || $ir['user_level'] == 4) { 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 style='border-style:solid;border-width:1px;border-color:#303030;' width='100%' cellpadding='5'>"; $q3=mysql_query("SELECT * FROM forum_posts WHERE fp_topic_id={$topic['ft_id']} ORDER BY fp_time ASC LIMIT $st, 20",$c); $no=$st; while($r=mysql_fetch_array($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($ir['user_level'] != 1) { $slink="[[url='forumsig.php?ID={$r[']Delete Sig[/url]]"; } if($no > 1 && $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=mysql_query("SELECT * FROM users WHERE userid={$r['fp_poster_id']}",$c); $memb=mysql_fetch_array($membq); $precache[$memb['userid']]=$memb; } else { $memb=$precache[$r['fp_poster_id']]; } $rank=forums_rank($memb['posts']); $msg="{$memb['forums_avatar']}"; $msg=strip_tags($msg); if($memb['forums_avatar']) { $av="[img=$msg]"; } 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 bgcolor='#404040'> <th align='center' width=20%>Post #{$no}</th> <th align='center'>Subject: {$r['fp_subject']} $t $qlink$slink$elink$dlink</th> </tr> <tr bgcolor='#404040'>"; $mycolor=""; if($memb['user_level'] == 2) { $mycolor="blue"; } if($memb['user_level'] == 1 && $memb['donatordays'] == 0) { $mycolor="gray"; } if($memb['user_level'] == 1 && $memb['donatordays'] > 0) { $mycolor="lightblue"; } if($memb['user_level'] == 4) { $mycolor="purple"; } if($memb['user_level'] == 3) { $mycolor="green"; } if($memb['user_level'] == 5) { $mycolor="orange"; } print"<td valign=top><center>[url='viewuser.php?u={$r[']<font color='$mycolor'>{$r['fp_poster_name']}</font>[/url] [{$r['fp_poster_id']}] Level: {$memb['level']}</br>Posts: {$memb['posts']}</br></br></br> $av </br></br> Rank:</br><font color=red>$rank</font></center></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 style='border-style:solid;border-width:1px;border-color:#303030;' width='80%' cellpadding='5'> <tr> <td align='right' bgcolor='#606060'>Subject:</td> <td align='left' bgcolor='#404040'><input type='text' name='fp_subject' /></td> </tr> <tr> <td align='right' bgcolor='#606060'>Post:</td> <td align='left' bgcolor='#404040'><textarea rows='7' cols='40' name='fp_text'></textarea></td> </tr> <tr bgcolor='#404040'> <th colspan='2' bgcolor='#404040'><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=mysql_query("SELECT * FROM forum_topics WHERE ft_id={$_GET['reply']}",$c); $topic=mysql_fetch_array($q); $q2=mysql_query("SELECT * FROM forum_forums WHERE ff_id={$topic['ft_forum_id']}",$c); $forum=mysql_fetch_array($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; } if(!$topic['ft_locked']) { $u=$ir['username']; $u=mysql_escape($u); $info=str_replace(array("'","\n"),array("'"," "),htmlentities($_GET['reply'])); $_GET['reply'] = mysql_real_escape_string($info); $_GET['reply'] = mysql_real_escape_string($_GET['reply']); $subject = mysql_real_escape_string($_POST['fp_subject']); $text = mysql_real_escape_string($_POST['fp_text']); mysql_query("INSERT INTO forum_posts VALUES('', {$_GET['reply']}, {$forum['ff_id']}, $userid, '$u', unix_timestamp(), '$subject', '$text', 0, '', 0, 0)",$c) or die(mysql_error()); mysql_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']}",$c); mysql_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']}",$c); if($forum['ff_id'] != 7 && $forum['ff_id'] != 8) { mysql_query("UPDATE users SET posts=posts+1 WHERE userid=$userid",$c); } print "[b]Your reply has been posted. Redirecting back to [url='forums.php?viewtopic={$_GET[']the topic[/url]...[/b]<hr /> "; $_GET['lastpost']=1; $_GET['viewtopic']=$_GET['reply']; echo <<< EOF <meta http-equiv="refresh" content="2;url=forums.php?viewtopic={$_GET['viewtopic']}" /> EOF; } 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=mysql_query("SELECT * FROM forum_forums WHERE ff_id={$_GET['forum']}",$c); $r=mysql_fetch_array($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 style='border-style:solid;border-width:1px;border-color:#303030;' width='80%' cellpadding='5'> <tr> <td align=right bgcolor='#606060'>Topic Name:</td> <td align=left bgcolor='#404040'><input type='text' name='ft_name' value='' /></td> </tr> <tr> <td align=right bgcolor='#606060'>Topic Description:</td> <td align=left bgcolor='#404040'><input type='text' name='ft_desc' value='' /></td> </tr> <tr> <td align=right bgcolor='#606060'>Topic Text:</td> <td align=left bgcolor='#404040'><textarea rows='8' cols='45' name='fp_text'></textarea></td> </tr> <tr bgcolor='#404040'> <th colspan=2 bgcolor='#404040'><input type='submit' value='Post Topic' /></th> </tr> </table> EOF; } function newtopic() { global $ir, $c, $userid, $h, $bbc, $db; $q=mysql_query("SELECT * FROM forum_forums WHERE ff_id={$_GET['forum']}",$c); $r=mysql_fetch_array($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; } if($r['ff_id']==1 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']; $u=mysql_escape($u); if(!$_POST['ft_name']) { print "You did not supply a topic name. > [url='forums.php']Back[/url]"; $h->endpage(); exit; } $info=str_replace(array("'","\n"),array("'"," "),htmlentities($_GET['forum'])); $_GET['forum'] = mysql_real_escape_string($info); $name = mysql_real_escape_string($_POST['ft_name']); $desc = mysql_real_escape_string($_POST['ft_desc']); mysql_query("INSERT INTO forum_topics VALUES('', {$_GET['forum']}, '$name', '$desc', 0, $userid, '$u', unix_timestamp(), 0, '', 0, 0, 0)",$c); $i=mysql_insert_id(); $dercp = $_POST['fp_text']; $dercp = mysql_real_escape_string($dercp); mysql_query("INSERT INTO forum_posts VALUES('', '{$i}', '{$r['ff_id']}', '$userid', '$u', unix_timestamp(), '$desc', '$dercp', 0, '', 0, 0)",$c) or die(mysql_error()); mysql_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}",$c); mysql_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='$name' WHERE ff_id={$r['ff_id']}",$c); if($r['ff_id'] != 7 && $r['ff_id'] != 8) { mysql_query("UPDATE users SET posts=posts+1 WHERE userid=$userid",$c); } print "[b]Topic Posted![/b]<hr /> "; $_GET['viewtopic']=$i; viewtopic(); } function emptyallforums() { global $ir, $c, $userid, $h, $bbc, $db; mysql_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",$c); mysql_query("truncate forum_topics",$c); mysql_query("truncate forum_posts",$c); } function quote() { global $ir, $c, $userid, $h, $bbc, $db; $q=mysql_query("SELECT * FROM forum_topics WHERE ft_id={$_GET['viewtopic']}",$c); $topic=mysql_fetch_array($q); $q2=mysql_query("SELECT * FROM forum_forums WHERE ff_id={$topic['ft_forum_id']}",$c); $forum=mysql_fetch_array($q2); $q3=mysql_query("SELECT * FROM forum_posts WHERE fp_id={$_GET['post']}",$c); $post=mysql_fetch_array($q3); 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" [b]Post a reply to this topic:[/b] <form action='forums.php?reply={$topic['ft_id']}' method='post'> <table style='border-style:solid;border-width:1px;border-color:#303030;' width='80%' cellpadding='5'> <tr> <td align='right' bgcolor='#606060'>Subject:</td> <td align='left' bgcolor='#404040'><input type='text' name='fp_subject' /></td> </tr> <tr> <td align='right' bgcolor='#606060'>Post:</td> <td align='left' bgcolor='#404040'><textarea rows='7' cols='40' name='fp_text'>"; if(eregi('/quote',$post['fp_text'])) { $explode=explode('[/quote]',$post['fp_text']); print"[quote name='{$post['fp_poster_name'']}]{$explode['1']}[/quote]"; } else { print"[quote name='{$post['fp_poster_name'']}]{$post['fp_text']}[/quote]"; } print"</textarea></td> </tr> <tr bgcolor='#404040'> <th colspan='2' bgcolor='#404040'><input type='submit' value='Post Reply'></th> </tr> </table> </form> "; } else { print " [i]This topic has been locked, you cannot reply to it.[/i] [url='forums.php?viewtopic={$_GET[']Back[/url]"; } }
-
But the dot kept appearing on the wrong spot when I tried, it appeared alittle to much on the left or right so I gave up and made images
-
I used 8 images one for each body hit
-
Well this is a pretty simple but good mod. It is a recode of attack.php and items with twice as good layout. It only takes some time to install. Here is what this mod includes: 1. Item Pics (My own, not anyone else's stolen from this forum). These item pics show in shops, inventory, item info and attack script. 2. Weapon slots for e.g melee weapon, secondary weapon and primary weapon. You will have the option from staff_items.php to chose which weapon is melee, which is secondary and which is primary. 3. Attack system with a better layout. Note: The attackleave.php and other files are not edited only attack.php is. Screenshots: http://img441.imageshack.us/i/picture2xhw.png/ http://img7.imageshack.us/i/picture1qna.png/ http://img510.imageshack.us/i/picture3vh.png/ http://img198.imageshack.us/i/picture4lo.png/ My paypal is [email protected] The scripts will be emailed to you. For more information message me here. If you want the script edited once bought mail me!!!
-
I will edit those ideas, and make them my way. I also dont like Torn 100%
-
I couldnt find any of them the reason u werent impressed with torn is u havnt seen everything yet become level 5 and u will unlock kool features
-
Well cause those ideas are cool and no one in the forum has made them yet and I want them for my game, so if i make them i mite as well distribute them
-
I started playing torn sometime ago. Now when I started coding I decided to copy afew of the things torn lke the company mod, missions mod ext. Once I have done all of them I will release them for free, only if u guys want them. Here are the mods I am working on: [progressbar=95]Melee, Secondary, and Primary Weapons[/progressbar] [progressbar=100]End, Man Lab, and Int as work stats[/progressbar] [progressbar=1]Company[/progressbar] [progressbar=1]Missions(Might abandon this one)[/progressbar] If you guys r interested in them then post here if not i will keep the mods to my self These arent to difficult to make but they take time
-
I would use it
-
Hope its for free even if it isnt I will try and buy it cool mod
-
Oh thanks that bit was unused so i deleted it anyway +1
-
I am using Immortalthugs atta.ph with a few modifications of my own but i get a error plz help here is the code <?php $menuhide=1; $atkpage=1; require_once("globals.php"); $$_GET['ID'] == (int) $_GET['ID']; if(!$_GET['ID']) { print "WTF you doing, bro?"; $h->endpage(); exit; } $energy = $ir['maxenergy']/4; $error = ($ir['hp'] <= 0) ? "You can't attack someone when you have no health!" : $error; $error = ($ir['energy']<$energy) ? "You need to have at least 25% of your energy if you want to attack someone." : $error; $error = ($ir['jail'] > 0) ? "You can't attack someone if you are in jail." : $error; $error = ($ir['hospital'] > 0) ? "You can't attack someone if you are in the hospital." : $error; $error = ($_GET['ID'] == "") ? "You didn't choose someone to attack." : $error; $error = ($_GET['ID'] == $ir['userid']) ? "You can't attack yourself." : $error; if($ir['equip_armor'] > 0) { $yourarmorstuff = $db->query("SELECT * FROM `items` WHERE (`itmid`=".$ir['equip_armor'].")"); $dat = $db->fetch_row($yourarmorstuff); $defense = $dat['armor']; } else { $defense = 0; } $attacking_person = mysql_query("SELECT `u`.`userid`,`u`.`username`,`u`.`hp`,`u`.`maxhp`,`u`.`level`, " . "`u`.`money`,`u`.`location`,`u`.`hospital`,`u`.`jail`,`u`.`fedjail`,`u`.`gang`,`u`.`user_level`, " . "`u`.`equip_primary`,`u`.`equip_secondary`,`u`.`equip_armor`,`u`.`exp`,`us`.`strength`,`us`.`agility`, " . "`us`.`guard` " . "FROM `users` `u` " . "LEFT JOIN `userstats` `us` " . "ON `u`.`userid`=`us`.`userid` " . "WHERE (`u`.`userid`=".$_GET['ID'].")", $c) OR die(mysql_error()); $attack_person = mysql_fetch_array($attacking_person); $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid={$_GET['wepid']}"); $r1=$db->fetch_row($qo); $primarydamage = $db->query("SELECT * FROM `items` WHERE `itmid`=".$attack_person['equip_primary'].""); $ouch = $db->fetch_row($primarydamage); $prim = ($attack_person['strength']+$ouch['weapon'])-($ir['guard']+$defense); // PRIMARY "weapon" Damage. $secondarydamage = $db->query("SELECT * FROM `items` WHERE `itmid`=".$attack_person['equip_secondary'].""); $ouchy = $db->fetch_row($secondarydamage); $second = ($attack_person['strength']+$ouchy['weapon'])-($ir['guard']+$defense); // Secondary "weapon" Damage. if($attack_person['equip_primary'] > 0) { $killer = $prim; } elseif($attack_person['equip_primary'] = 0 && $attack_person['equip_secondary'] > 0) { $killer = $second; } else { $killer = $attack_person['strength'] - $ir['guard']; } if($attack_person['equip_armor'] > 0) { $ayourarmorstuff = $db->query("SELECT * FROM `items` WHERE (`itmid`=".$attack_person['equip_armor'].")"); $adat = $db->fetch_row($ayourarmorstuff); $adefense = $dat['armor']; } else { $defense = 0; } $aprimarydamage = $db->query("SELECT * FROM `items` WHERE `itmid`=".$ir['equip_primary'].""); $winn = $db->fetch_row($aprimarydamage); $aprim = ($ir['strength']+$winn['weapon'])-($attack_person['guard']+$defense); // PRIMARY "weapon" Damage. $asecondarydamage = $db->query("SELECT * FROM `items` WHERE `itmid`=".$ir['equip_secondary'].""); $win = $db->fetch_row($asecondary); $secondd = ($ir['strength']+$win['weapon'])-($attack_person['guard']+$defense); // Secondary "weapon" Damage. if($ir['equip_primary'] > 0) { $killers = $aprim; } elseif($ir['equip_primary'] = 0 && $ir['equip_secondary'] > 0) { $killers = $secondd; } else { $killers = $ir['strength'] - $ir['guard']; } if($attack_person['equip_primary'] > 0 && $attack_person['equip_secondary'] > 0) { $killer = ($ouch['weapon']+$ouchy['weapon']+$attack_person['strength'])-($ir['guard']+$defense); $wepname = "".$ouch['itmname']." and their ".$ouchy['itmname'].""; } elseif($attack_person['equip_primary'] > 0 && $attack_person['equip_secondary'] = 0) { $killer = ($ouch['weapon']+$attack_person['strength'])-($ir['guard']+$defense); $wepname = "".$ouch['itmname'].""; } elseif($attack_person['equip_primary'] = 0 && $attack_person['equip_secondary'] > 0) { $killer = ($ouchy['weapon']+$attack_person['strength']) - ($ir['guard']+$defense); $wepname = "".$ouch['itmname'].""; } else { $killer = $attack_person['strength']-($ir['guard']+$defense); $wepname = Fists; } $aprimarydamage = $db->query("SELECT * FROM `items` WHERE `itmid`=".$ir['equip_primary'].""); $winn = $db->fetch_row($aprimarydamage); $asecondarydamage = $db->query("SELECT * FROM `items` WHERE `itmid`=".$ir['equip_secondary'].""); $win = $db->fetch_row($asecondary); if($ir['equip_primary'] > 0 AND $ir['equip_primary'] > 0) { $killers = ($winn['weapon']+$win['weapon']+$ir['strength'])-($attack_person['guard']+$adefense); $aweap = "".$winn['itmname']." and their ".$win['itmname'].""; } elseif($ir['equip_primary'] > 0 && $ir['equip_secondary'] == 0) { $killers = ($winn['weapon']+$ir['strength'])-($attack_person['guard']+$adefense); $aweap = "".$winn['itmname'].""; } elseif($ir['equip_primary'] == 0 && $ir['equip_secondary'] > 0) { $killers = ($win['weapon']+$ir['strength']) - ($attack_person['guard']+$adefense); $aweap = "".$win['itmname'].""; } else { $killers = $ir['strength'] - ($attack_person['guard']+$defense); $aweap = Fists; } if(!mysql_num_rows($attacking_person)) { echo "Invalid User Selected to attack."; $h->endpage(); exit; } $error = ($attack_person['location'] != $ir['location']) ? "You must be in the same city as the person you are attacking. Duh." : $error; $error = ($attack_person['username'] == "") ? "That person doesn't exist." : $error; $error = ($attack_person['hospital'] > 0) ? "You can't attack someone that is in the hospital." : $error; $error = ($attack_person['jail'] > 0) ? "You can't attack someone that is in jail." : $error; $error = ($ir['level'] > 5 && $attack_person['level'] < 6) ? "You can't attack someone that is level 5 or below because you are higher than level 5." : $error; $error = ($ir['gang'] == $attack_person['gang'] AND $ir['gang'] != 0) ? "You cant attack someone in the same clan as yourself!" : $error; $error = ($attack_person['hp'] <= 0) ? "This person has no health at the moment." : $error; $error = ($attack_person['fedjail'] > 1) ? "This person is in fed and cannot be attacked." : $error; $error = ($attack_person['user_level'] == 2) ? "Admins Cannot be attacked." : $error; if (isset($error)){ echo "".htmlentities(stripslashes($error)).""; $h->endpage(); exit; } $yourhp = $ir['hp']; $theirhp = $attack_person['hp']; echo "<center>Fight House</center> <center><font color=white>You are in a fight with ".$attack_person['username'].".</center> "; $wait = ($ir['agility'] > $attack_person['agility']) ? 1 : 0; while($yourhp > 0 && $theirhp > 0) { $damage = $killer; $damage = ($damage < 1) ? 1 : $damage; if($wait == 0) { $yourhp = $yourhp - $damage; echo "<font color=white><center> " . $attack_person['username'] . " hit you for " . $damage . " damage using their Fists. </center>"; // WEAPON STUFF HERE LATER. } else { $wait = 0; } if($yourhp > 0) { $damage = $killers; $damage = ($damage < 1) ? 1 : $damage; $theirhp = $theirhp - $damage; echo "<font color=white><center> You hit " . $attack_person['username'] . " for " . $damage . " damage using your Using your {$r1['itmname']} </center> "; } if($theirhp <= 0){ // ATTACKER WINS AND UPDATES $winner = $ir['userid']; $theirhp = 0; $moneywon = floor($attack_person['money'] /10); $expwon = 150 - (25 * ($ir['level'] - $attack_person['level'])); $expwon = ($expwon < 0) ? 0 : $expwon; $newexp = $expwon + $ir['exp']; $newmoney = $ir['money'] + $moneywon; $result = mysql_query("UPDATE `users` SET `exp` = ".$newexp.", money = ".$newmoney." WHERE (`userid`=".$ir['userid'].")", $c) or die(mysql_error()); $newmoney = $attack_person['money'] - $moneywon; $result = mysql_query("UPDATE `users` SET `money` = ".$newmoney.", `hospital` = 30 WHERE (`userid`=".$attack_person['userid'].")", $c) or die(mysql_error()); event_add($attack_person['userid'], "You were hospitalized by ".$ir['username']." for 20 minutes."); echo "<font color=white><center>You hospitalized " . $attack_person['username'] . ". You gain $expwon exp and stole $".$moneywon." from " . $attack_person['username'] . ".</center>"; } if($yourhp <= 0){ // DEFENDER WINS AND UPDATES $winner = $attack_person['userid']; $yourhp = 0; $moneywon = floor($ir['money'] /10); $expwon = 100 - (25 * ($attack_person['level'] - $ir['level'])); $expwon = ($expwon < 0) ? 0 : $expwon; $newexp = $expwon + $attack_person['exp']; $newmoney = $attack_person['money'] + $moneywon; $result = mysql_query("UPDATE `users` SET `exp` = ".$newexp.", `money` = ".$newmoney." WHERE (`userid`=".$attack_person['userid'].")", $c) or die(mysql_error()); $newmoney = $ir['money'] - $moneywon; $result = mysql_query("UPDATE `users` SET `money` = '".$newmoney."',`hospital` = '20' WHERE (`userid`=".$ir['userid'].")", $c) or die(mysql_error()); event_add($ir['userid'], "You were hospitalized by ".$attack_person['username']." for 20 minutes."); echo "<center><font color=white>".$attack_person['username']." Hospitalized you and stole $".$moneywon." from you.</center>"; } } //UPDATE USERS $newenergy = $ir['energy'] - floor($ir['energy'] * .10); $result = mysql_query("UPDATE `users` SET `hp` = ".$theirhp." WHERE (`userid`=".$attack_person['userid'].")", $c) or die(mysql_error()); $result = mysql_query("UPDATE `users` SET `hp` = ".$yourhp.", `energy` = '".$newenergy."' WHERE (`userid`=".$ir['userid'].")", $c) or die(mysql_error()); echo "</td></tr>"; ?> QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Query was SELECT i.* FROM items i WHERE i.itmid= I will be grateful to anyone who helps as this is a tough problem
-
Thanks guys it works
-
I get this problem img { border: medium none; } Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/******/public_html/header.php on line 132 This is the code if($rm['item_on']== 0 && $rm['attack_on']== 1) { $usa=$_SESSION['mission_attack']; $aa=mysql_query("SELECT * FROM missions WHERE id=".$ir['mission']." AND attack_value=".$_SESSION['mission_attack']).$c; if(mysql_num_rows($aa))
-
The header works without the add on but plz fix it so it can work with the addon
-
I really dont understand the use
-
It odesnt
-
Dude I got that header from somewhere i will edit it all just please fix the prob
-
K i will take it out just i need it fixed