"slashSess"));
/*************************************
START OF PAGE
*************************************/
if (!isset($seclev)) {
$seclev = 0;
}
$db = new slashDB;
$story = new Story;
/* parse cmd line variables into array */
while ( list($key, $val) = each($HTTP_GET_VARS )) {
$ary[$key] = $val;
}
if (!$section) {
$section = getvar("site_homesection", "quiet");
if(!$section) {
$section = "Home";
}
}
$story_html = $story->getStory($story_id, "full", $ary);
$t = new Template($templatedir, "remove");
if ($story_html) {
$title = $story->getTitle($story_id);
$ttitle = stripslashes(ereg_replace("<([^>]*)>", "", $title));
switch($submit) {
case "print":
$p_intro_text = eregi_replace("]*)src=\"?([^\"]*)\"?([^>]*)>","",$story->story_ary["intro_text"]);
$p_intro_text = eregi_replace("]*)href=\"?([^\"]*)\"?([^>]*)>","",$p_intro_text);
$p_intro_text = eregi_replace("","",$p_intro_text);
$p_intro_text = stripslashes( $p_intro_text);
$p_body_text = eregi_replace("]*)src=\"?([^\"]*)\"?([^>]*)>","",$story->story_ary["body_text"]);
$p_body_text = eregi_replace("]*)href=\"?([^\"]*)\"?([^>]*)>","",$p_body_text);
$p_body_text = eregi_replace("","",$p_body_text);
$p_body_text = stripslashes( $p_body_text);
$t->set_file(article, "article-pf.tpl");
$t->set_var(array(
PAGETITLE => $pagetitle,
TITLE => $ttitle,
NAME => $story->story_ary["name"],
DATEF => $story->story_ary["datef"],
DEPT => $story->story_ary["dept"],
INTRO_TEXT => $p_intro_text,
BODY_TEXT => $p_body_text,
XSITEOBJECT => $xsiteobject
));
// $t->parse(PAGE, article);
// $t->p(PAGE);
break;
case "email":
$emailform = "";
$emailform = $story->emailStory($story_id, $action);
default:
if (!isset($parent_id)) {
$parent_id = 0;
}
$t->set_file(article, "article.tpl");
$header = getHeader($ttitle,$xsiteobject);
$footer = getFooter();
// $titlebar = getTitlebar("100%", $title); // here if you need it.
/* Display the story */
// $arrows = $story->getNextPrev($story_id);
$t->set_var(array(
HEADER => $header,
EMAILFORM => $emailform,
TITLE => $title,
// TITLEBAR => $titlebar,
STORY => $story_html,
STORY_ID => $story_id,
ARROWS => $arrows,
IMAGEDIR => $imagedir,
FOOTER => $footer
));
/* Now that related stuff */
$fancy_boxes = $story->getRelated($story_id);
$block = new Block_i;
$fancy_boxes .= $block->getAllBlocksForIndex($section);
$t->set_var(FANCY_BOXES, $fancy_boxes);
/* Now the comments */
$cmt = new Comment;
$comments = $cmt->getAllComments($mode, $story_id, $parent_id, $seclev);
$t->set_var(COMMENTS, $comments);
$updatearticlehits = getvar("article_updatehits");
if ($updatearticlehits) {
$q = "UPDATE psl_story
SET hits = hits + 1
WHERE story_id = $story_id";
$db->query($q);
}
} /* end of switch */
$t->parse(PAGE, article);
$t->p(PAGE);
} else {
slashhead("Article",$xsiteobject);
titlebar("100%", "Iīm sorry, no Article Number $story_id found.");
echo "
Maybe you're looking for a Poll? Try this link.
\n";
echo "If that doesn't work, then use the Search Page.";
slashfoot();
}
page_close();
?>