| [ PHPXref.com ] | [ Generated: Sun Jul 20 21:03:06 2008 ] | [ Wheatblog 1.0 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 // 3 // File: view_by_archive.php 4 // License: GNU GPL 5 // 6 require_once ('./settings.php'); 7 $page_title = ':: archive view'; 8 include_once("$wb_inc_dir/header.php"); 9 10 // parse the passed vars into something useful 11 // also check for nulls 12 $the_year = $_GET['the_year']; 13 $the_month = $_GET['the_month']; 14 15 // Connect to the RDBMS and select the database. 16 $db = DB_connect($site, $user, $pass); 17 DB_select_db($database, $db); 18 19 // select recent posts in the database 20 $result = DB_query("select * 21 from $tblPosts 22 where year = '$the_year' and month = '$the_month' 23 order by year DESC, month DESC, date DESC, id DESC", $db); 24 25 // output the current entries 26 27 echo("<div class='indent2'>\n"); 28 echo("<span class='cnt-subhead'>Filter: View by Archive</span><br>\n"); 29 echo("[archived entires for : " . "$the_month" . "." . "$the_year" . "] "); 30 echo("[<a href='$blog_index_page_name']>remove</a>]\n"); 31 echo("</div>\n"); 32 33 while($row = DB_fetch_array($result)) { 34 $the_id = $row["id"]; 35 $the_day = $row["day"]; 36 $the_month = $row["month"]; 37 $the_date = $row["date"]; 38 $the_year = $row["year"]; 39 $the_category = $row["category"]; 40 41 // parse out the category id into its string value 42 $result2 = DB_query("select * 43 from $tblCategories 44 where id = '$the_category'", $db); 45 46 while($row2 = DB_fetch_array($result2)) { 47 $the_category_name = $row2["category"]; 48 } 49 50 $the_showpref = $row['showpref']; 51 $the_title = $row['title']; 52 $the_body = $row['body']; 53 $comments = $row['comments']; 54 55 // post 56 echo("<div class='indent'>\n"); 57 echo("<span class='cnt-subhead'>$the_day" . ", " . "$the_month" . "." . "$the_date" . "." . "$the_year" . " :: " . "$the_title" . "</span><br>\n"); 58 echo("$the_body" . "<br>\n"); 59 echo("[<a href='view_by_category.php?the_category=$the_category'" . "'>" . "$the_category_name" . "</a>] "); 60 echo("<!-- [" . "<a href='view_by_permalink.php?the_id=$the_id'" . "'>id: " . "$the_id" . "</a>] -->\n"); 61 echo("[" . "<a href='view_by_permalink.php?the_id=$the_id'" . "'>" . "comments ($comments)" . "</a>]\n"); 62 echo("</div>\n\n"); 63 } 64 65 66 include_once("$wb_inc_dir/footer.php"); 67 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |