array(
'link' => 'blog',
'url' => 'blog.php?sub_section=view&id=%s',
'url_main' => 'blog.php',
'dbName' => 'journal',
'dbQuery' => 'WHERE `blog_private` = 0',
'dbTitle' => 'title',
'dbItem' => 'WHERE `id` = \'%s\' AND `blog_private` = 0',
'dbItemDisplay' => array(
'Title|title',
'Category|jmood',
'Blog Entry|text',
),
'dbOrder' => 'time',
),
'member' => array(
'link' => 'member',
'url' => 'profile.php?id=%s',
'url_main' => 'browse.php',
'dbName' => 'user',
'dbQuery' => '',
'dbTitle' => 'user',
'dbItem' => 'WHERE `id` = \'%s\'',
'dbItemDisplay' => array(
'Username|user',
'Gender|gender',
'About Me|me',
),
'dbOrder' => 'signup',
),
'gallery' => array(
'link' => 'gallery',
'url' => 'gallery.php?sub_section=photo&id=%s',
'url_main' => 'gallery.php',
'dbName' => 'main',
'dbQuery' => '',
'dbTitle' => 'text',
'dbItem' => 'WHERE `id` = \'%s\'',
'dbItemDisplay' => array(
'Title|text',
),
'dbOrder' => 'time',
),
'forum' => array(
'link' => 'forum',
'url' => 'forum.php?sub_section=view_topic&id=%s',
'url_main' => 'forum.php',
'dbName' => 'forum_post',
'dbQuery' => '',
'dbTitle' => 'title',
'dbItem' => 'WHERE `id` = \'%s\'',
'dbItemDisplay' => array(
'Subject|title',
'Content|text',
),
'dbOrder' => 'time',
),
);
/**
* Start of the archive class
*
* @return none
*/
function phpfoxArchive()
{
global $VAR;
// Lets create the full url to the archive
$this->aPage = "". $VAR[0] ."/archive/index.php/";
// Get the REQUEST_URI
$this->page = explode("/",$VAR[3]);
// Make sure the current page is not empty
$this->current = isset($this->page[3]) ? $this->page[3] : '';
$this->fine = explode("-",$this->current);
// Lets display the section
if ( !empty($this->fine[0]) )
{
$item = isset($this->page[4]) ? $this->page[4] : '';
// Check if we will show the actual item
if ( $item )
{
$a = phpfox_mysql_query("SELECT * FROM `". $this->sections[$this->page[3]]['dbName'] ."` ". sprintf($this->sections[$this->page[3]]['dbItem'],$item) ."");
$b = phpfox_mysql_fetch_array($a);
$this->link = sprintf($this->sections[$this->page[3]]['url'],$b['id']);
$t = $this->sections[$this->page[3]]['dbTitle'];
// Display the page title
$this->title .= $this->pageLink( $this->sections[$this->page[3]]['link']."/",$this->sections[$this->page[3]]['link'] )." ". $this->titleSplit ." ". $this->pageLink($this->page[3]."/".$this->page[4]."/".$this->page[5],$b[$t]) ."";
foreach($this->sections[$this->page[3]]['dbItemDisplay'] as $mainDisplay)
{
$eItem = explode("|",$mainDisplay);
$this->html .= "\n\t$eItem[0]: ". $this->pageCode($b[$eItem[1]]) ."
";
}
}
else
{
$this->link = $this->sections[$this->page[3]]['url_main'];
$this->num = "0";
$this->pageNum = $this->num == 0 ? ($this->num+1) : $this->pageNum;
if ( !empty($this->fine[1]) )
{
$this->pageNum = ($this->fine[1]);
$this->num = (($this->pageNum-1)*$this->total);
}
$this->current = $this->fine[0];
$countQuery = phpfox_mysql_query("SELECT COUNT(*) as count FROM `". $this->sections[$this->fine[0]]['dbName'] ."`");
$totalFetch = phpfox_mysql_fetch_array($countQuery);
// Display the page title
$this->title .= $this->pageLink( $this->sections[$this->fine[0]]['link']."/",$this->sections[$this->fine[0]]['link'] );
$this->html .= '