Location: PHPKode > projects > WBBlog > inc/home.inc.php
<?/*

WBBlog - Single User Blog
Version 1.0
Michael Lintz - LIQUA Web Solutions
hide@address.com - http://www.liqua.com
Copyright (C) 2005 

This program is free software; you can redistribute it and/or modify it under the terms of 
the GNU General Public License as published by the Free Software Foundation; either version 
2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; 
if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

*/?>

<?php if ($cmd == ""): ?>

<? 
$pageTitle = $pt_home;
$pageDesc = $pd_home;
$pageKeywords = $pk_home;
$pageAuthor = $pa_home; 
?>

<?
include 'head.inc.php';
?>

   <table class='WelcomeBlogContent'>

    <tr class='WelcomeTitle'>
    <td>
    WBBlog Demo Site...
    </td>
    <tr>
    
    <tr>

    <td>
    <!-- ********* WELCOME BOX START ************************************************ -->
    This is the demo site of WBBlog.  Use the following login id and 
    password to login and try out the features.<br><br>
    E-Mail: hide@address.com<br>
    Password: password<br>
    <br>
    WBBlog can be obtained from <a href="http://liqua.com/wbblog.html">HERE</a>!<br><br>
    Feel free to contact me at <a href=mailto:hide@address.com>hide@address.com</a> if you have any questions
    or require any custom PHP/MySQL development.<br><br>
       
    
    <!-- ********* WELCOME BOX END ************************************************ -->
    </td>

    </tr>

    </table>

    
    <br />

    <br />
    
    
 <table class='LatestBlogEntries'>
    <tr>
    <td>The <? echo $ShowEntries; ?> Latest Blog Entries...</td>
    </tr>
  </table>
  <br />   

<?	

$u_email = $_SESSION["u_email"];	

$sql = "SELECT * FROM entry ORDER BY e_timestamp DESC LIMIT $ShowEntries";
$result = mysql_query($sql) or print ("Can't select entries from table entry.<br />" . $sql . "<br />" . mysql_error());



if($result):



     $total_rows = mysql_num_rows($result);

     $count = 0;



while($count < $total_rows):

    

    $e_id = mysql_result($result,$count,"e_id");

    $format_date = mysql_result($result,$count,"e_timestamp");

    ?>

    

    <table class='BlogHeader'>

   <tr class='BlogTitle'>
  

    <td><? echo mysql_result($result,$count,"e_title"); ?></td>

    </tr>

    <tr class='BlogDate'>
    
    
 
    
    
    

<? 
if($_SESSION['u_email'] == '')
{
 ?>
 <td>Posted <? echo date('l, F jS Y',strtotime($format_date)); ?> @ <? echo date('g:i A',strtotime($format_date)); ?></td>
    
    
 <?
}
else
{       
?>
       
 <td>Posted <? echo date('l, F jS Y g:i A',strtotime($format_date)); ?> | <a href="index.php?cmd=editentry&e_id=<?php echo $e_id; ?>">[EDIT]</a> <a href="index.php?cmd=delentry&e_id=<?php echo $e_id; ?>">[DELETE]</a></td>   
    
<?
}
?>
    
    </tr>

    </table>



    <!--<table class='BlogTitle'><tr><td><? echo mysql_result($result,$count,"e_title"); ?></td></tr></table> -->

 


    <table class='BlogContent'>

    <tr>

    <td>
    
    
    
    <? 
    
    require_once 'HTML/BBCodeParser.php';
										    $options = @parse_ini_file('BBCodeParser.ini');
										    $parser = new HTML_BBCodeParser($options);
										    //$parser->qParse(htmlspecialchars($_POST['e_content']));
										    
										    //$e_content2 = $parser->qParse($e_content);
										    
    echo $parser->qParse(mysql_result($result,$count,"e_content"));							
    
   
    
     ?>
    <br /><br /><br /></td>

    </tr>
    
  

    </table>


<table class='BlogFooter'>

    <tr class='BlogDate'>
    
    


 <td>By: <a href="index.php?cmd=author&e_author=<? echo mysql_result($result,$count,"e_author"); ?>"><? echo mysql_result($result,$count,"e_author"); ?></a> | 
 <a href="index.php?cmd=viewentry&e_id=<? echo $e_id; ?>">Permalink</a> | Category: <a href="index.php?cmd=category&e_category=<? echo mysql_result($result,$count,"e_category"); ?>">
 <? echo mysql_result($result,$count,"e_category"); ?></a>
 
 

    




  
    
    </tr>

    </table>
    
    <br />

    <br />

  
 

<?    



 $count++;

  endwhile;

  

  else:

    echo "No Database<br />";

  endif;



//}

?>
    
    

<?php endif; ?>
Return current item: WBBlog