Jump to content

I Am Java

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

I Am Java's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. http://ddf.pastebin.com/CD5XQrYV How can I make that a bit more efficient? Right now I use a while statement to add up $m, which gives a count of how many unread topics there are, and if there are more than 1, then it displays a link. If not, it displays nothing. Right now, since there are 15 forums, the script takes well over 30 seconds to run. How can I count up the amount of unread topics faster? Thanks.
  2. One bump before I go to bed. Hopefully there is a simple solution to this. (I don't need a full script, I just need somewhere to start at least.)
  3. More than likely. Not many hosts allow you to include files from outside sources.
  4. I see.. so any answers to my question? I am hoping for a simple answer, I don't really want to clog the forum script even more with more queries and PHP. (Going for minimal.)
  5. I thought I was editing that post, didn't realize I posted again. Where is the edit button? Ok, how do I delete these two posts? LOL.
  6. Alright, so I have an idea of how to get whether or not a post is new, but I can't seem to figure out how to actually select posts from a DB while in an array. My idea was to put the member ID in the read column of the post table once they viewed a thread, which would look like this: 1;2;3;4;. Now, how would I search for 2 while in that array? Thanks.
  7. I have used PHPMyAdmin to prove the SQL string works properly, and it does. I have tried just putting in 3 instead of just getting the variable, it didn't work still.
  8. I can't seem to figure this out, no can a friend of mine. For some reason, it selects the table fine from the database, but it won't show any information from the database: Here is my test page: http://hallowbb.co.cc/pages.ws?page_id=3 <?php include "config.php"; $pageid = $_GET['page_id']; $r=mysql_query("SELECT * FROM `webpages` WHERE `page_id` = '".$pageid."' AND `page_hidden` != '1'") or die(mysql_error()); $pages=mysql_fetch_assoc($r) or die(mysql_error()); $pages2=mysql_num_rows($r); echo "$head <body> <center> $logo </center> <table width='1000' align='center' cellspacing='0' id='topnav' cellpadding='0'> <tr> <td width='100%'> "; include "includes/_topnav.php"; echo " </td> </tr> </table> "; if($pages2=='0' || $pages2>'1'){ echo " <table width='1000' align='center' cellspacing='0' id='subnav' cellpadding='0'> <tr> <td width='50%'> Navigation: <a href='".$url."home".$ex."'>".$sitename."</a> - <a href='pages".$ex."?page_id=".$_GET['page_id']."'>404 Error</a> </td> <td width='50%' style='text-align:right'> "; require "includes/_login.php"; echo " </td> </tr> </table> <table width='1000' align='center' cellspacing='0'> <tr> "; include "includes/_ads.php"; echo " <td width='800' id='main' valign='top'> "; include "includes/_announce.php"; echo " <div class='title'> 404 Error </div> <div class='contents'> The page you were looking for does not exist. Please <a href='javascript:history.go(-1)'>click here</a> to go back and try again. </div> <div class='details'> Page edit details not available. </div> "; } else { echo " <table width='1000' align='center' cellspacing='0' id='subnav' cellpadding='0'> <tr> <td width='50%'> Navigation: <a href='".$url."home".$ex."'>".$sitename."</a> - <a href='pages".$ex."?page_id=".$pages['page_id']."'>".$pages['page_name']."</a> </td> <td width='50%' style='text-align:right'> "; require "includes/_login.php"; echo " </td> </tr> </table> <table width='1000' align='center' cellspacing='0'> <tr> "; include "includes/_ads.php"; echo " <td width='800' id='main' valign='top'> "; include "includes/_announce.php"; echo " <div class='title'> ".$pages['page_name']." </div> <div class='contents'> "; $string = stripslashes($pages['page_contents']); $string1 = str_replace($bbreplace1,$bbreplacements1,$string); $string2 = preg_replace($bbreplace2, $bbreplacements2, $string1); $string = $string2; echo $string." </div> <div class='details'> "; $r2=mysql_query("SELECT * FROM `members` WHERE `id` = '".$pages['edit_by']."'") or die(mysql_error()); $user=mysql_fetch_array($r2); $r3=mysql_query("SELECT * FROM `groups` WHERE `group_id` = '".$user['userlevel']."'") or die(mysql_error()); $group=mysql_fetch_array($r3); $date=$pages['edit_date']; $t=date("m/d/y H:i:s", $date+(5*3600)); echo " Page last updated on ".$t." by <a href='members".$ex."?user=".$pages['edit_by']."'>".stripslashes($group['group_prefix']).stripslashes($user['username']).stripslashes($group['group_suffix'])."</a> </div> "; } echo " </td> </tr> </table> "; echo "<table width='1000' align='center' cellspacing='0' id='copyright'> <tr> <td width='100%'> "; include "includes/_foot.php"; echo " </td> </tr> </table> </body> </html>"; ?>
×
×
  • 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.