1 |
<?PHP |
2 |
|
3 |
###################################################################### |
4 |
# PHP-NUKE: Web Portal System |
5 |
# =========================== |
6 |
# |
7 |
# Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve) |
8 |
# http://www.ncc.org.ve/php-nuke.php |
9 |
# |
10 |
# This module is to manage articles/news in the home |
11 |
# |
12 |
# This program is free software. You can redistribute it and/or modify |
13 |
# it under the terms of the GNU General Public License as published by |
14 |
# the Free Software Foundation; either version 2 of the License. |
15 |
###################################################################### |
16 |
|
17 |
if(!isset($mainfile)) { include("mainfile.php"); } |
18 |
|
19 |
if(!isset($sid) && !isset($tid)) { exit(); } |
20 |
|
21 |
include("config.php"); |
22 |
dbconnect(); |
23 |
if($save) { |
24 |
cookiedecode($user); |
25 |
mysql_query("update users set umode='$mode', uorder='$order', thold='$thold' where uid='$cookie[0]'"); |
26 |
getusrinfo($user); |
27 |
$info = base64_encode("$userinfo[uid]:$userinfo[uname]:$userinfo[pass]:$userinfo[storynum]:$userinfo[umode]:$userinfo[uorder]:$userinfo[thold]:$userinfo[noscore]"); |
28 |
setcookie("user","$info",time()+$cookieusrtime); |
29 |
} |
30 |
|
31 |
if($op == "Reply") Header("Location: comments.php?op=Reply&pid=0&sid=$sid&mode=$mode&order=$order&thold=$thold"); |
32 |
$result = mysql_query("select aid, time, title, hometext, bodytext, topic, informant, notes FROM stories where sid=$sid"); |
33 |
list($aid, $time, $title, $hometext, $bodytext, $topic, $informant, $notes) = mysql_fetch_row($result); |
34 |
mysql_query("UPDATE stories SET counter=counter+1 where sid=$sid"); |
35 |
include ('header.php'); |
36 |
formatTimestamp($time); |
37 |
$hometext = stripslashes($hometext); |
38 |
$bodytext = stripslashes($bodytext); |
39 |
$notes = stripslashes($notes); |
40 |
|
41 |
if($bodytext == "") { $bodytext = "$hometext $notes"; } else { $bodytext = "$hometext $notes<br><br>$bodytext"; } |
42 |
if($informant == "") $informant = $anonymous; |
43 |
|
44 |
getTopics($sid); |
45 |
themearticle($aid, $informant, $datetime, $title, $bodytext, $topic, $topicname, $topicimage, $topictext); |
46 |
|
47 |
?> |
48 |
|
49 |
<p><center><a href="comments.php?op=Reply&pid=0&sid=<? echo "$sid"; ?>"><img src=<?php echo "$uimages"; ?>/comment.gif border=0></a></p></center> |
50 |
|
51 |
<?php |
52 |
cookiedecode($user); |
53 |
if($mode != "nocomments") include('comments.php'); |
54 |
include ('footer.php'); |
55 |
|
56 |
?> |