Jump to content

thegod

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Everything posted by thegod

  1. try this <?php // Page information will go here if ($_GET['page'] == 'news') { if (isset($_GET['id']) ) { $query="SELECT * FROM news WHERE id = '{$_GET['id']}'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); echo ("<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td bgcolor=\"003366\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\"> <tr> <td bgcolor=\"#F1F1F1\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"> <tr> <td align=\"center\" valign=\"top\" bgcolor=\"#F1F1F1\"><br /> <table width=\"775\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"> <tr> <td bgcolor=\"#003366\"><table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\" align=\"center\"> <tr> <td bgcolor=\"#FFFFFF\"><div align=\"left\"><strong><span class=\"style1\"><p><strong><span class=\"style1\">".$row['heading']."</span></strong></p> <p align=\"left\" class=\"style1\">".$row['location']." ".$row['date']." -</strong> ".$row['extcontent']." <br /> </p> <hr /></span></strong><span class=\"style1\"></span></div></TD></TR></TBODY></TABLE> </TD> </TR></TBODY></TABLE> <br></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>"); }else { $query="SELECT * FROM news"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) echo ("<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td bgcolor=\"003366\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\"> <tr> <td bgcolor=\"#F1F1F1\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"> <tr> <td align=\"center\" valign=\"top\" bgcolor=\"#F1F1F1\"><br /> <table width=\"775\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"> <tr> <td bgcolor=\"#003366\"><table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\" align=\"center\"> <tr> <td bgcolor=\"#FFFFFF\"><a href='index2.php?page=news&id=".$row['id']."'><strong><span class=\"style1\">".$row['date']." - ".$row['heading']."</span></strong></a></span></strong><span class=\"style1\"></span></div></TD></TR></TBODY></TABLE> </TD> </TR></TBODY></TABLE> <br></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>"); } if ($_GET['page'] == 'company') { $query="SELECT * FROM company"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); echo ("<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td bgcolor=\"003366\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\"> <tr> <td bgcolor=\"#F1F1F1\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"> <tr> <td align=\"center\" valign=\"top\" bgcolor=\"#F1F1F1\"><br /> <table width=\"775\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"> <tr> <td bgcolor=\"#003366\"><table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\" align=\"center\"> <tr> <td bgcolor=\"#FFFFFF\"><span class=\"style1\">".$row['overview']."<br /> </span></div><br></TD></TR></TBODY></TABLE> </TD> </TR></TBODY></TABLE> <br></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> "); } else { echo("<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#003366\">"); echo("<tr>"); echo("<td><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">"); echo("<tr>"); echo("<td><table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">"); echo("<tr>"); echo("<td width=\"67%\" align=\"center\" valign=\"top\" bgcolor=\"#F1F1F1\"><br />"); echo("<table width=\"400\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"); echo("<tr>"); echo("<td bgcolor=\"#003366\"><table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">"); echo("<tr>"); echo("<td bgcolor=\"#FFFFFF\"><div align=\"center\">"); // This is the date information for the greeting mysql_connect($Host,$User,$Pass); @mysql_select_db($DB) or die ("Unable to select requested database."); $query="SELECT * FROM homegreet"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); echo ("<span class=\"style1\"><strong>".$row['heading']."<br /> </strong><span class=\"style1\">".$row['content']."<br /> </span></div>"); echo("</td>"); echo("</tr>"); echo("</table></td>"); echo("</tr>"); echo("</table>"); echo("<br />"); echo("<table width=\"400\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"); echo("<tr>"); echo("<td bgcolor=\"#003366\"><table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">"); echo("<tr>"); echo("<td bgcolor=\"#FFFFFF\">"); echo("<strong><span class=\"style1\">Our Featured Client<br />"); echo("</span></strong>"); // This is the date information for the Featured Client mysql_connect($Host,$User,$Pass); @mysql_select_db($DB) or die ("Unable to select requested database."); $query="SELECT * FROM featureclient"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); echo ("<span class=\"style1\"><a href=".$row['url']." target=\"_blank\">".$row['client']."</a><br /> ".$row['desc']."</span></div>"); echo ("</td>"); echo ("</tr>"); echo ("</table></td>"); echo ("</tr>"); echo ("</table>"); echo ("<br /></td>"); echo ("<td width=\"33%\" align=\"center\" valign=\"top\" bgcolor=\"#F1F1F1\"><br />"); echo ("<table width=\"200\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"); echo ("<tr>"); echo ("<td bgcolor=\"#003366\"><table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">"); echo ("<tr>"); echo ("<td bgcolor=\"#FFFFFF\"><div align=\"center\">"); // This is the date information for the company news mysql_connect($Host,$User,$Pass); @mysql_select_db($DB) or die ("Unable to select requested database."); $query="SELECT * FROM news LIMIT 0,5"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo ("<p><strong><span class=\"style1\">".$row['heading']."</span></strong></p> <p align=\"left\" class=\"style1\">".$row['location']." ".$row['date']." - ".$row['content']." <br /> <a href='index.php?page=news&id=".$row['id']."'>Read on</a>.<br /> </p> <hr /> </div>"); } echo ("</td>"); echo ("</tr>"); echo ("</table></td>"); echo ("</tr>"); echo ("</table></td>"); echo ("</tr>"); echo ("</table></td>"); echo ("</tr>"); echo ("</table></td>"); echo ("</tr>"); echo ("</table>"); echo ("<div align=\"center\" class=\"style1\"><span class=\"style8\"><br />"); echo ("</span></div>"); echo ("<div align=\"center\" class=\"style1\">"); } ?> <? echo ("<div align=\"center\" class=\"style1\">"); // FOOTER mysql_connect($Host,$User,$Pass); @mysql_select_db($DB) or die ("Unable to select requested database."); $query="SELECT * FROM footer"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); echo ("".$row['content']."<br><a href=".$row['agreeurl'].">".$row['agreetxt']."</a> - <a href=".$row['privacyurl'].">".$row['privacytxt']."</a><br><br>Tantrum Internet, ".$row['address']."<br>Phone ".$row['phone']." - Fax ".$row['fax'].""); echo ("</div>"); echo ("</body>"); echo ("</html>"); } ?>
  2. this is common it a curly bracket missing somewhere in the coding make sure all your backets are right
  3. its not input the text in the Mysql database when people reply please help here is the code thanks to everyone who helps <?php include_once 'includes/functions.php'; include_once 'includes/replace.php'; logincheck(); $forum=$_GET['forum']; $username=$_SESSION['username']; $viewtopic = $_GET['viewtopic']; $forum_look=$_GET['forum_look']; $fetch=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); $forumquote = mysql_query("SELECT * FROM user_info WHERE username = '$right->username'"); $fq = mysql_fetch_object($forumquote); if (!$viewtopic){ $viewtopic = "1"; } $fetch=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); if ($forum == "Crew" && $fetch->crew != "0"){ $crew="1"; } $owner=mysql_num_rows(mysql_query("SELECT * FROM crews WHERE owner='$username' OR rhm='$username'")); $userlevel=$fetch->userlevel; $ggee = mysql_query("SELECT locked, sticky, lastreply FROM topics WHERE id='$viewtopic' AND forum='$forum'"); while($dsdsd = mysql_fetch_row($ggee)){ $lockedornot = $dsdsd[0]; $stikornot = $dsdsd[1]; $lastreplyit = $dsdsd[2]; } if ($lockedornot == '1'){ echo "This topic is locked."; }elseif ($userlevel != '0' || $lockedornot != '1'){ if ($crew == "1"){ $gg = mysql_query("SELECT * FROM topics WHERE id='$viewtopic' AND forum='$forum' AND crew='$fetch->crew'"); }else{ $gg = mysql_query("SELECT * FROM topics WHERE id='$viewtopic' AND forum='$forum'"); } while($success = mysql_fetch_row($gg)){ $username1 = $success[1]; $topictext = $success[3]; $made = $success[8]; } $forumquote2 = mysql_query("SELECT * FROM user_info WHERE username = '$username1'"); $fq2 = mysql_fetch_object($forumquote2); ?> <style type="text/css"> <!-- .style2 {font-size: 10px} --> </style> <link href="includes/forum.css" rel="stylesheet" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> <!-- body { background-color: #666666; background-image: url(index_images/armour/background.jpg); } .style3 {color: #FFFFFF} --> </style><table width=100% border=1 cellpadding=0 cellspacing=0 bordercolor=#000000 class=thinline> <tr> <td class="header" colspan=2><center>Topic Made By : <? echo "<a href='profile.php?viewuser=$username1' target=mainFrame>$username1</a>"; ?> On :<?php echo "$made"; ?></td> </tr> <tr> <td width='8%' rowspan='3' bgcolor=#777777> <center> <img src='<? echo"$fq2->forumpic"; ?>' hight='65' width='65' align='center'> <span class=style2><? echo"$fq2->posts"; ?> Posts</span> </td> </tr> <tr> <td height="134" bgcolor="#777777"> <? echo replace($topictext); if ($topictext == ""){ $topictext = "Main Forum";}?></td> </tr> <tr> <td height='21' colspan='1' bgcolor=#777777> <div align=center><? echo"$fetch->forumquote"; ?></div></td> </tr> </table><br> <p> <?php $forum_count = 15; function index_navigation($index, $count, $num) { $forum = $_GET['forum']; $viewtopic = $_GET['viewtopic']; if ($index != 0) { print "<a class='linktext' href=\"right.php?forum=$forum&viewtopic=$viewtopic&forum_look=" . ($index - $count) . "\">Previous</a> "; } if ($num == $count) { print " <a class='linktext' href=\"right.php?forum=$forum&viewtopic=$viewtopic&forum_look=" . ($index + $count) . "\">Next</a>"; } } if (! isset($forum_look) ) { $forum_look = 0; } if ($crew == "1"){ $query="SELECT * FROM replys WHERE idto = '$viewtopic' AND forum='$forum' AND crew='$fetch->crew' ORDER by `id` DESC LIMIT $forum_look, $forum_count"; }else{ $query="SELECT * FROM replys WHERE idto = '$viewtopic' AND forum='$forum' ORDER by `id` DESC LIMIT $forum_look, $forum_count"; } $query=mysql_query("$query"); $num=mysql_num_rows($query); while($right=mysql_fetch_object($query)){ if ($fetch->userlevel == "0"){ $forumquote = mysql_query("SELECT * FROM user_info WHERE username = '$right->username'"); $fq = mysql_fetch_object($forumquote); if($fq->gender == "Dont State") { $gender = "ds.PNG"; } if($fq->gender == "Male") { $gender = "male.gif"; } if($fq->gender == "Female") { $gender = "female.gif"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumrank = "Forum Bum"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumrank = "Curb Crawler"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumrank = "Post Star"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumrank = "V.I.Poster"; } if ($fq->posts >= "291"){ $forumrank = "Post Whore"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumpic = "1.jpg"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumpic = "2.jpg"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumpic = "3.jpg"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumpic = "4.jpg"; } if ($fq->posts >= "291"){ $forumpic = "5.jpg"; } echo "<table width=100% height=178 border=1 cellpadding=0 cellspacing=0 bordercolor=#000000 class=\"background\"> <tr> <td height=21 colspan=2 class=\"header\"><div align=center><a href='profile.php?viewuser=$right->username' target=mainFrame>$right->username</a> <b>On:</b> $right->made</div></td> </tr> <tr> <td width='8%' rowspan='3' bgcolor=#777777> <center> <img src='$fq->forumpic' hight='65' width='65' align='center'> <span class=style2>$fq->posts Posts</span> <img src='$forumpic'> <span class=style2>$forumrank</span> <br><img src='$gender'> </td> </tr> <tr> <td width=92% height='134' class='topictext' bgcolor='#ffffff'>"; echo replace($right->text); echo "</td> </tr> <tr> <td height='21' colspan='1' bgcolor=#ffffff> <div align=center><font color=000000>$fq->forumquote</div></td> </tr> </table><br> <p>"; }elseif ($fetch->userlevel =! "0"){ $forumquote = mysql_query("SELECT * FROM user_info WHERE username = '$right->username'"); $fq = mysql_fetch_object($forumquote); if($fq->gender == "Dont State") { $gender = "ds.PNG"; } if($fq->gender == "Male") { $gender = "male.gif"; } if($fq->gender == "Female") { $gender = "female.gif"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumrank = "Forum Bum"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumrank = "Curb Crawler"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumrank = "Post Star"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumrank = "V.I.Poster"; } if ($fq->posts >= "291"){ $forumrank = "Post Whore"; } if ($fq->posts >= "0" && $fq->posts < "80"){ $forumpic = "1.jpg"; } if ($fq->posts >= "81" && $fq->posts < "160"){ $forumpic = "2.jpg"; } if ($fq->posts >= "161" && $fq->posts < "220"){ $forumpic = "3.jpg"; } if ($fq->posts >= "221" && $fq->posts < "290"){ $forumpic = "4.jpg"; } if ($fq->posts >= "291"){ $forumpic = "5.jpg"; } echo "<table width=100% height=178 border=1 cellpadding=0 cellspacing=0 bordercolor=#000000 class=\"background\"> <tr> <td height=21 colspan=2 class=\"header\"><div align=center><a href='right.php?clean=$right->id&forum=$forum&viewtopic=$viewtopic'><font color=red>Delete</font></a> <a href='profile.php?viewuser=$right->username' target=mainFrame>$right->username</a> <b>On:</b> $right->made</div></td> </tr> <tr> <td width='8%' rowspan='3' bgcolor=#777777> <center> <img src='$fq->forumpic' hight='65' width='65' align='center'> <span class=style2>$fq->posts Posts</span> <img src='$forumpic'> <span class=style2>$forumrank</span> <br><img src='$gender'> </td> </tr> <tr> <td width=92% height='134' class='topictext' bgcolor='#ffffff'>"; echo replace($right->text); echo "</td> </tr> <tr> <td height='21' colspan='1' bgcolor=#ffffff> <div align=center><font color=000000>$fq->forumquote</div></td> </tr> </table><br> <p>"; } } if($_GET[clean]) { $clean=$_GET[clean]; if($userlevel == '0'){ echo "Error."; exit; }else mysql_query("DELETE FROM replys WHERE id='$clean' AND forum='$forum'") or die ("Cannot delete reply"); echo "Reply Deleted"; echo "<SCRIPT LANGUAGE='JavaScript'> window.location='right.php?forum=$forum&viewtopic=$g'; </script>"; } ?> <?php index_navigation($forum_look, $forum_count, $num); ?> <br> <br> <? if (!$viewtopic){ $viewtopic = "1"; } if(strip_tags($_POST['Submit']) && strip_tags($_POST['reply_text']) && $forum && $viewtopic){ $reply_text =addslashes(strip_tags($_POST['reply_text'])); $topic_info=mysql_fetch_object(mysql_query("SELECT * FROM topics WHERE id='$viewtopic' AND forum='$forum'")); if ($topic_info->sticky == "1"){ $lastreplytime = $topic_info->lastreply; }elseif ($stikornot == "0"){ $lastreplytime = time(); } if ($topic_info->locked == "1"){ echo "This topic is locked."; exit(); } $date = gmdate('Y-m-d h:i:s'); if ($crew == "1" && $fetch->crew != "0"){ mysql_query("INSERT INTO `replys` (`id`, `username`, `text`, `forum`, `idto`,`made`,`crew`) VALUES ('', '$username', '$reply_text', '$forum', '$viewtopic','$date','$fetch->crew');") or die (mysql_error()); mysql_query("INSERT INTO `replys` (`id`, `username`, `text`, `forum`, `idto`,`made`) VALUES ('', '$username', '$reply_text', '$forum', '$viewtopic','$date');") or die (mysql_error()); } mysql_query("UPDATE `user_info` SET `posts` = `posts`+1 WHERE username='$username'"); mysql_query("UPDATE topics SET lastreply='$lastreplytime' WHERE id='$viewtopic' AND sticky='0'"); mysql_query("UPDATE `user_info` SET `posts` = `posts`+1 WHERE username='$username'"); echo " <SCRIPT LANGUAGE='JavaScript'> window.location='right.php?forum=$forum&viewtopic=$viewtopic'; </script>"; } ?> <script language=JavaScript> function so(dis) { for (i=0;i<dis.elements.length;i++){ if (dis.elements[i].type=='submit') dis.elements[i].style.visibility='hidden'; } if(fs==false){ fs=true; return true; }else return false; } function goaway() { for(i=0;i<document.forms.length;i++) document.forms[i].onsubmit = function() {return so(this);}; } </script><body onload=goaway();> <form action='' method=post> <input name="forumto" type="hidden" value="<?php echo "$forum"; ?>"> <input name="this" type="hidden" id="this" value="<?php echo "$viewtopic"; ?>"> <center><a href="bbcode.php"><img src="bbcodes.jpg" width="65" height="20" border="0"></a> <a href="color.php"><img src="colours.jpg" width="65" height="20" border="0"></a> </center> <table border=0 cellspacing=0 cellpadding=2 width=100% bordercolor="black"> <tr> <td class="header style3"> Reply: </td> </tr> <tr> <td > <textarea name="reply_text" cols="" rows="5" class="topictext" id="reply_text" style="width: 90%;"></textarea> <br> </td> </tr> <tr> <td width=33% class=thinline><input name=Submit type=submit value=Submit></td> </tr> </table> </form> <? } ?> <? mysql_close(); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.