Location: PHPKode > projects > Alex! TestBlog > alextestblog02/themes/current/index.php
<blockquote>
<?php
if (isset($_REQUEST['name']))
//if a single post is requested
  {
get_single_post();
  $commenton = $_GET['id'];
echo get_single_comment();
echo "<p>" . get_comment_form() . "</p>";
echo "<p>" . get_alex_back() . " " . get_alex_forward() . "</p>";

  }
else
//if no single post is requested
  {
   
if (isset($_REQUEST['buddy']))
//if a single post is requested
  {
$resultspage = mysql_query("SELECT * FROM alex_posts WHERE pagecontent LIKE '%$_GET[buddy]%' LIMIT $_GET[alex]");

while($search = mysql_fetch_array($resultspage))
  {
  echo  "<h1><a href=?id=" . $search['id'] . ">" . $search['posttitle'] . "</a></h1>" . " <br />" . $search['pagecontent'] . "<br /> added on " . $search['time'] . " at " . $search['time2'];

  }
  }
else
//if no single post is requested
  {
  if (isset($_REQUEST['page']))
//if a single post is requested
  {
$pagepage = mysql_query("SELECT * FROM alex_pages WHERE id LIKE '%$_GET[page]%' LIMIT 1");

while($searchpage = mysql_fetch_array($pagepage))
  {
  echo  "<h1>" . $searchpage['posttitle'] . "</h1>" . " <br />" . $searchpage['pagecontent'] . "<br /> added on " . $searchpage['time'] . " at " . $searchpage['time2'];

  }
  }
else
//if no single post is requested
  {
     if (isset($_REQUEST['contact']))
//if a single post is requested
  {
  echo "Contact us./";
  get_contact_form();
  }
else
//if no single post is requested
  {
 get_alex_posts();
}
}
}
}



?>
</blockquote>
Return current item: Alex! TestBlog