Code:
<?php
if ( !defined('MODULE_FILE') )
{
die("You can't access this file directly...");
}
require_once("mainfile.php");
$optionbox = "";
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
if (stristr($REQUEST_URI,"mainfile")) {
Header("Location: modules.php?name=$module_name&file=article&sid=$sid");
} elseif (!isset($sid) && !isset($tid)) {
Header("Location: index.php");
}
if (isset($sid)) $sid=intval($sid);
if (isset($tid)) $tid=intval($tid);
if ($save AND is_user($user)) {
cookiedecode($user);
$db->sql_query("UPDATE ".$user_prefix."_users SET umode='$mode', uorder='$order', thold='$thold' where uid='$cookie[0]'");
getusrinfo($user);
$info = base64_encode("$userinfo[user_id]:$userinfo[username]:$userinfo[user_password]:$userinfo[storynum]:$userinfo[umode]:$userinfo[uorder]:$userinfo[thold]:$userinfo[noscore]");
setcookie("user","$info",time()+$cookieusrtime);
}
if ($op == "Reply") {
Header("Location: modules.php?name=$module_name&file=comments&op=Reply&pid=0&sid=$sid&mode=$mode&order=$order&thold=$thold");
}
$result = $db->sql_query("select catid, aid, time, title, hometext, bodytext, topic, informant, notes, acomm, haspoll, pollID, score, ratings FROM ".$prefix."_stories where sid='$sid'");
if ($numrows = $db->sql_numrows($result) != 1) {
Header("Location: index.php");
die();
}
$row = $db->sql_fetchrow($result);
$catid = intval($row['catid']);
$aid = stripslashes($row['aid']);
$time = $row['time'];
$title = stripslashes(check_html($row['title'], "nohtml"));
$hometext = stripslashes($row['hometext']);
$bodytext = stripslashes($row['bodytext']);
$topic = intval($row['topic']);
$informant = stripslashes($row['informant']);
$notes = stripslashes($row['notes']);
$acomm = intval($row['acomm']);
$haspoll = intval($row['haspoll']);
$pollID = intval($row['pollID']);
$score = intval($row['score']);
$ratings = intval($row['ratings']);
if ($aid == "") {
Header("Location: modules.php?name=$module_name");
}
$db->sql_query("UPDATE ".$prefix."_stories SET counter=counter+1 where sid='$sid'");
$artpage = 1;
$pagetitle = "- $title";
require("header.php");
$artpage = 0;
formatTimestamp($time);
$title = stripslashes(check_html($title, "nohtml"));
$hometext = stripslashes($hometext);
$bodytext = stripslashes($bodytext);
$notes = stripslashes($notes);
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b><i>$notes</i>";
} else {
$notes = "";
}
if($bodytext == "") {
$bodytext = "$hometext$notes";
} else {
$bodytext = "$hometext<br><br>$bodytext$notes";
}
if($informant == "") {
$informant = $anonymous;
}
getTopics($sid);
if ($catid != 0) {
$row2 = $db->sql_fetchrow($db->sql_query("select title from ".$prefix."_stories_cat where catid='$catid'"));
$title1 = stripslashes(check_html($row2['title'], "nohtml"));
$title = "<a href=\"modules.php?name=$module_name&file=categories&op=newindex&catid=$catid\"><font class=\"storycat\">$title1</font></a>: $title";
}
echo "<table width=\"100%\" border=\"0\"><tr><td valign=\"top\" width=\"100%\">\n";
themearticle($aid, $informant, $datetime, $title, $bodytext, $topic, $topicname, $topicimage, $topictext);
echo "</td><td> </td><td valign=\"top\">\n";
if ($multilingual == 1) {
$querylang = "AND (blanguage='$currentlang' OR blanguage='')";
} else {
$querylang = "";
}
$row7 = $db->sql_fetchrow($db->sql_query("select title, content, active, bposition from ".$prefix."_blocks where blockfile='block-Login.php' $querylang"));
$title = stripslashes(check_html($row7['title'], "nohtml"));
$content = stripslashes($row7['content']);
$active = intval($row7['active']);
$position = $row7['bposition'];
$position = substr("$position", 0,1);
if (($active == 1) AND ($position == "r") AND (!is_user($user))) {
loginbox();
}
$boxstuff .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Search&topic=$topic\">"._MOREABOUT." $topictext</a><br>\n";
$boxstuff .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Search&author=$aid\">"._NEWSBY." $aid</a>\n";
//$optiontitle = ""._OPTIONS."";
//$optiontitle = "";
$optionbox = "<center>blabla content here"
. "and ends here...</center>\n";
//}
themesidebox($optiontitle, $optionbox);
echo "</td></tr></table>\n";
cookiedecode($user);
include("modules/$module_name/associates.php");
if ((($mode != "nocomments") OR ($acomm == 0)) OR ($articlecomm == 1)) {
include("modules/News/comments.php");
}
include("footer.php");
?>
|