1) { $templateclass=$getuser3['templatepath']; } else { $templateclass="default"; } print ""; //chooses which template to display if(!isset($_GET['forumID'])) { die("
Reply
No Forum Parent Selected
"); } $forumID=$_GET['forumID']; $s=$_SERVER["REMOTE_ADDR"]; $checkip="SELECT * from b_banip where ip='$s'"; $checkip2=mysql_query($checkip) or die("Could not get ips"); $checkip3=mysql_fetch_array($checkip2); if($checkip3) { die("
Reply
Your IP was banned from posting
"); } $ID=$_GET['ID']; $isthreadlocked="SELECT *, b_posts.ID as postid from b_posts, b_forums where b_posts.id='$ID' and b_forums.id=b_posts.postforum"; $isthreadlocked2=mysql_query($isthreadlocked) or die("Could not check threadlock"); $isthreadlocked3=mysql_fetch_array($isthreadlocked2); if($isthreadlocked3['locked']=='1') { die("
Reply
This thread is locked
"); } if (isset($_SESSION['user'])||$guestposting=="Yes"||$guestposting=="yes") { $user=$_SESSION['user']; $getid="SELECT * from b_users where username='$user'"; $getid2=mysql_query($getid) or die("could not get user"); $getid3=mysql_fetch_array($getid2); $nowtime=date("U"); if($getid3[lastposttime]>$nowtime-30) { die("
Reply
You may post only once every 30 seconds
"); } $getforuminfo="SELECT * from b_forums where ID='$forumID'"; $getforuminfo2=mysql_query($getforuminfo) or die("COuld not get forum info"); $getforuminfo3=mysql_fetch_array($getforuminfo2); if(!$_SESSION['user']) { $getid3[status]=-1; } if($getforuminfo3[permission_reply]>$getid3[status]) { die("
Reply
You Do not have permission to post in this forum
"); } if($getid3[banned]=="Yes") { die("
New Topic
You have been banned from posting
"); } if(isset($_POST['reply'])) { if(!$_POST['name'] || !$_POST['post']) { print ""; print ""; print "
Reply
"; print "One of the required fields was not filled in, please go back and try again"; print "
"; } else { $name=$getid3[userID]; $post=$_POST['post']; $title=$_POST['title']; $day=date("D M d, Y H:i:s"); $timegone=date("U") ; if($_POST['nosmiley']) { $nosmiley=1; } else { $nosmiley=0; } if(!$_SESSION['user']) { $user="Guest"; } $threadparent=$_POST['threadparent']; $name=htmlspecialchars($name); $title=htmlspecialchars($title); $post=strip_tags($post,'

[url][img][URL][IMG][FONT][font]

  • [list][o][size][s][mail]'); $s=$_SERVER["REMOTE_ADDR"]; $posting="INSERT INTO b_posts (author, title, post,timepost, telapsed, threadparent, postforum,lastpost,nosmilies,ipaddress ) values ('$name', '$title', '$post', '$day', '$timegone', '$threadparent', '$forumID','$user','$nosmiley','$s')"; mysql_query($posting) or die("could not post"); $update="Update b_posts SET numreplies=numreplies+1, timepost='$day', telapsed='$timegone', lastpost='$user' where ID='$threadparent'"; mysql_query($update); $upforum="Update b_forums set numposts=numposts+1,lastpost='$day',lastpostuser='$user',lastposttime='$timegone' where ID='$forumID'"; mysql_query($upforum); if($_SESSION['user']) { $timenow=date("U"); $updateuser="update b_users set Posts=Posts+1, lastposttime='$timenow' where username='$user'"; mysql_query($updateuser) or die("COuld not update numposts"); } print ""; print ""; print "
    Reply
    "; print "Thanks for posting... Redirecting to "; print "
    "; } } else { print ""; print ""; print "
    Reply
    "; print ""; print "
    "; print "
    "; if(!$_SESSION['user']) { $getguest="SELECT * FROM b_users WHERE username='Guest'"; $getguest2=mysql_query($getguest) or die(mysql_error()); $getguest3=mysql_fetch_array($getguest2); print "
    "; print "Name:Guest
    "; } else { print "
    "; print "Name:$user
    "; } print "Topic:
    "; print ""; print "

    "; print "Message:

    "; print "

    "; print '"; print " Disable Smilies

    "; print ""; print "
    "; print "Clickable Smilies
    "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print ""; print ""; print "
    "; print ""; print ""; print ""; print ""; print "
    "; print ""; print ""; print ""; print ""; print "
    "; print "
    "; } } else { print ""; print ""; print "
    Reply
    "; print "Not logged in, please Go here to log in"; print "
    "; } ?>