Location: PHPKode > projects > WBBlog > inc/archive.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 (isset($cmd) && $cmd == "archive"): ?>

<?php
$sql = "SELECT e_timestamp, e_id, e_title, e_author FROM entry WHERE date_format( e_timestamp,  '%Y-%M'  )  =  '$archdate' ORDER BY e_id DESC";

$result = mysql_query($sql);

$monthyear = date('F Y',strtotime($archdate));
?>

<? $pageTitle = "Archived Entries for $monthyear"; ?>

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

 <table class='ContentTitle'>
    <tr>
    <td>Archived Entries for <? echo  $monthyear; ?></td>
    </tr>
  </table>
  <br />
 

<table id="ListEntry">
				
				<?php
				
					  $total_rows = mysql_num_rows($result);
				
					 // $count = 0;
				
					  ?>
				
				<tr bgcolor="#E8E8DD"> 
				
				                           
				
				                            <td><strong>Entry Title</strong></td>
				
				                            <td><strong>Entry Date</strong></td>
				
				                            
				
				                            <td><strong>Author</strong></td>
				                            
				                           
				
				                            
				
				                          
				                            
				                           
				
				  </tr>
				  
				  
				  
				  <?php
				
						for($ith=0;$ith<$total_rows;$ith++)
				
				                        {
				
				
				
				                             if($ith % 2)
				
				                             {
				
				                               
				
				                                echo "<tr bgcolor=\"#E8E8DD\">\n";
				
				                             }
				
				                             else
				
				                             { 
				
				                                echo "<TR bgcolor=\"#ffffff\">\n";
				
				                             }
				
						?>
						
				
				
				    <td> 
				    <?
				  $e_timestamp = mysql_result($result,$count,"e_timestamp");
    $e_id = mysql_result($result,$count,"e_id");
    $e_title = mysql_result($result,$count,"e_title");
    $e_author = mysql_result($result,$count,"e_author");
    
    //$newdate = date('l, F jS Y g:i A',strtotime($e_timestamp)); //format Friday, July 23rd 2004 8:04 AM 
    $newdate = date('n/d/y',strtotime($e_timestamp)); //format 07/22/04
    ?>
				      
				      
				       <a href=index.php?cmd=viewentry&e_id=<? echo $e_id; ?>><? echo $e_title; ?></a>
				
				      
				
				      </td>
				
				  <td><?php echo $newdate; ?></td>
				
				 
				
				  <td>
				  
				  <? echo $e_author; ?>
				  
				  </td>
				      
				 
				
				 
				
				  <?php
				
				
				
				    $count++;
				
				   
				
				  ?>
				
				  </tr>
				
				<?php
				
				}
				?>
				  
				</table>










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