[Runon] 
$sql[0] = "select no_id,subject from ".$dbprefix."messhall where status='1' and cat='runon' order by no_id desc";
if (! $res[0]=mysql_query($sql[0], $dbh)) { echo mysql_error(); return 0; }
$x=0;
while ($row[0] = mysql_fetch_array($res[0])) {
  $l[$x]=$row[0][0];
  echo " ".$row[0][1]." ";
  $x++;
} ?> 
                                        [Books & Novels Collection] 
$sql[1] = "select no_id,subject from ".$dbprefix."messhall where status='1' and cat='books & novels collection' order by no_id desc";
if (! $res[1]=mysql_query($sql[1], $dbh)) { echo mysql_error(); return 0; }
$x=0;
while ($row[1] = mysql_fetch_array($res[1])) {
  $l[$x]=$row[1][0];
  echo " ".$row[1][1]." ";
  $x++;
} ?> 
                                        [Star Trek Films Collection] 
$sql[2] = "select no_id,subject from ".$dbprefix."messhall where status='1' and cat='star trek films collection' order by no_id desc";
if (! $res[2]=mysql_query($sql[2], $dbh)) { echo mysql_error(); return 0; }
$x=0;
while ($row[2] = mysql_fetch_array($res[2])) {
  $l[$x]=$row[2][0];
  echo " ".$row[2][1]." ";
  $x++;
} ?> 
                                        [Other Collectibles Collection] 
$sql[3] = "select no_id,subject from ".$dbprefix."messhall where status='1' and cat='other collectibles collection' order by no_id desc";
if (! $res[3]=mysql_query($sql[3], $dbh)) { echo mysql_error(); return 0; }
$x=0;
while ($row[3] = mysql_fetch_array($res[3])) {
  $l[$x]=$row[3][0];
  echo " ".$row[3][1]." ";
  $x++;
} ?> 
                                        [Star Trek Uniform Information] 
$sql[4] = "select no_id,subject from ".$dbprefix."messhall where status='1' and cat='star trek uniform information' order by no_id desc";
if (! $res[4]=mysql_query($sql[4], $dbh)) { echo mysql_error(); return 0; }
$x=0;
while ($row[4] = mysql_fetch_array($res[4])) {
  $l[$x]=$row[4][0];
  echo " ".$row[4][1]." ";
  $x++;
} ?> 
                                        [Miscellaneous] 
$sql[5] = "select no_id,subject from ".$dbprefix."messhall where status='1' and cat='miscellaneous' order by no_id desc";
if (! $res[5]=mysql_query($sql[5], $dbh)) { echo mysql_error(); return 0; }
$x=0;
while ($row[5] = mysql_fetch_array($res[5])) {
  $l[$x]=$row[5][0];
  echo " ".$row[5][1]." ";
  $x++;
} ?> | 
                                           | 
                                         
                                            
                                            
if ($txtid) {
  include('../admin/config.php');
  $sql[6] = "select no_id,subject,stardate,contents from ".$dbprefix."messhall where status='1' and no_id='".$txtid."'";
  if (! $res[6]=mysql_query($sql[6], $dbh)) { echo mysql_error(); return 0; }
  
  $y=0;
  while ($row[6] = mysql_fetch_array($res[6])) {
    echo " ".$row[6][1]." ";
    echo "Posted Stardate: ".$row[6][2]." ";
    echo "".$row[6][3];
    $y++;
  }
} else {
  echo "Choose from the Category on the left panel to open a content ";
}
?> 
                                         |