<?php
/**
* This is the runtime file for the article module.
*
* @version $Id: runtime.php,v 1.3 2004/08/21 17:38:20 adarkling Exp $
*
* @author Eloi George <eloi@NOSPAM.bygeorgeware.com>
* @module Article Manager
*/
if($GLOBALS['module']=='home') 
{
  require_once(PHPWS_SOURCE_DIR.'mod/article/class/ArticleManager.php');
  $_SESSION['SES_ART_master'] = new PHPWS_ArticleManager;
	$_SESSION['SES_ART_master']->show_mainarticle();
	$_SESSION['SES_ART_master']->view_summaries();
	$_SESSION['SES_ART_master']->view_popular();
}
/* Script to reroute pagemaster pages... */
elseif ($GLOBALS['module']=='pagemaster' && !isset($GLOBALS['core']->modules['pagemaster']) && file_exists($GLOBALS['core']->home_dir . 'convert/reroute/pagemaster.AM')) 
{
  require_once(PHPWS_SOURCE_DIR.'mod/article/class/ArticleManager.php');
  $_SESSION['SES_ART_master'] = new PHPWS_ArticleManager;
  include ($GLOBALS['core']->home_dir . 'convert/reroute/pagemaster.AM');
  $temp = new PHPWS_Article($convert[$_REQUEST['PAGE_id']]);
	$temp->view();
	/* Increment the articleview counter */
	$temp->increment_counter();
	unset($temp);
}
/* Script to reroute announcements... */
elseif (($GLOBALS['module']=='announce') && !isset($GLOBALS['core']->modules['announce']) && file_exists($GLOBALS['core']->home_dir . 'convert/reroute/announce.AM'))
{
  require_once(PHPWS_SOURCE_DIR.'mod/article/class/ArticleManager.php');
  $_SESSION['SES_ART_master'] = new PHPWS_ArticleManager;
  include ($GLOBALS['core']->home_dir . 'convert/reroute/announce.AM');
  $temp = new PHPWS_Article($convert[$_REQUEST['ANN_id']]);
	$temp->view();
	/* Increment the articleview counter */
	$temp->increment_counter();
	unset($temp);
}
?>