One Hat Cyber Team
Your IP :
216.73.216.135
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
vo
/
public_html
/
Laspi
/
modules
/
News
/
View File Name :
index.php
<?php // File: $Id: index.php,v 1.17 2003/06/22 10:29:28 larsneo Exp $ $Name: $ // ---------------------------------------------------------------------- // POSTNUKE Content Management System // Copyright (C) 2001 by the PostNuke Development Team. // http://www.postnuke.com/ // ---------------------------------------------------------------------- // Based on: // PHP-NUKE Web Portal System - http://phpnuke.org/ // Thatware - http://thatware.org/ // ---------------------------------------------------------------------- // LICENSE // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License (GPL) // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // To read the license please visit http://www.gnu.org/copyleft/gpl.html // ---------------------------------------------------------------------- // Original Author of this file: Francisco Burzi // Purpose of this file: // ---------------------------------------------------------------------- if (!defined("LOADED_AS_MODULE")) { die ("You can't access this file directly..."); } if ((empty($catid)) && (empty($topic))) { $index = 1; } else { $index = 0; } // Check if the entered topic, catid and allstories vars are numeric if ((isset($GLOBALS['topic']) && !empty($GLOBALS['topic']) && !is_numeric($GLOBALS['topic'])) or (isset($GLOBALS['catid']) && !empty($GLOBALS['catid']) && !is_numeric($GLOBALS['catid'])) or (isset($GLOBALS['allstories']) && !empty($GLOBALS['allstories']) && !is_numeric($GLOBALS['allstories'])) ) { include 'header.php'; OpenTable(); echo _MODARGSERROR; CloseTable(); include 'footer.php'; } //End of check $ModName = $GLOBALS['name']; modules_get_language(); include_once("modules/$ModName/funcs.php"); automatednews(); /** * Prints out the index * Prints out the index screen. * @return none * @author FB */ function theindex() { $allstories = &$GLOBALS['allstories']; // Furbo: to stop hacking vars on the url $topic = pnVarCleanFromInput('topic'); $catid = pnVarCleanFromInput('catid'); // end furbo hack stop list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); $currentlang = pnUserGetLang(); if (pnConfigGetVar('multilingual') == 1) { $column = &$pntable['stories_column']; $querylang = "AND ($column[alanguage]='$currentlang' OR $column[alanguage]='')"; /* the OR is needed to display stories who are posted to ALL languages */ } else { $querylang = ''; } // use a theme override if we're displaying a category if ((!empty($catid)) && ($catid > 0)) { $column = &$pntable['stories_cat_column']; $result = $dbconn->Execute("SELECT $column[themeoverride] FROM $pntable[stories_cat] WHERE $column[catid]='".(int)pnVarPrepForStore($catid)."'"); //list($themeOverrideCategory) = $result->fields; if ($result) $themeOverrideCategory = $result->fields[0]; } include 'header.php'; if (isset($topic) && !empty($topic) && is_numeric($topic)) { OpenTable(); $column = &$pntable['topics_column']; $result = $dbconn->Execute("SELECT $column[topicid], $column[topicname], " . "$column[topicimage], $column[topictext] FROM " . "$pntable[topics] WHERE $column[topicid]='".pnVarPrepForStore($topic)."'"); list($topicid, $topicname, $topicimage, $topictext) = $result->fields; echo "<center>"; if (!empty($topicimage)) { echo "<img src=\"".pnConfigGetVar('tipath')."$topicimage\"" . "border=\"0\" alt=\"\"><br /><br />"; } echo "<font class=\"pn-title\">" . _THISISTOPIC . pnVarPrepForDisplay($topictext) . "<br />" . _FOLLOWINGNEWS . "</font></center><br /><br />"; CloseTable(); } else if (!empty($catid) && $catid > 0 && is_numeric($catid)) { OpenTable(); $column = &$pntable['stories_cat_column']; $result = $dbconn->Execute("SELECT $column[title] FROM $pntable[stories_cat] WHERE $column[catid]=".(int)pnVarPrepForStore($catid).""); list($title) = $result->fields; echo "<center><br /><font class=\"pn-title\">" . _THISISCATEGORY. pnVarPrepForDisplay($title) . "<br />" . _FOLLOWINGNEWSCATEGORY . "</font></center><br /><br />"; CloseTable(); } if (pnUserLoggedIn()) { $storynum = pnUserGetVar('storynum'); } if (empty($storynum)) { $storynum = pnConfigGetVar('storyhome'); } // start eugeniobaldi 20020310 // When you view stories for Catid or for topic , you can select of view all stories if ((!empty($catid)) or (!empty($topic))) { if(!empty($allstories) && $allstories == 1) { $storynum = 999; } else { //magicx : Removed instances of <br /> echo "<a class=\"pn-normal\" href=\"modules.php?op=modload&name=News&file=index&catid=$catid&topic=$topic&allstories=1\">"._SEEALL."</a><br><br>"; } } $allstories = 0; // end eugeniobaldi 20020310 $storcol = &$pntable['stories_column']; $storcatcol = &$pntable['stories_cat_column']; $topiccol = &$pntable['topics_column']; if (!empty($catid) && !empty($topic)) { // show only one category and one topic $result = $dbconn->Execute("UPDATE $pntable[topics] SET $topiccol[counter]=$topiccol[counter]+1 WHERE $topiccol[topicid]='".(int)pnVarPrepForStore($topic)."'"); if($dbconn->ErrorNo() != 0) { error_log("DB Error updating $pntable[topics]: " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg()); } $dbconn->Execute("UPDATE $pntable[stories_cat] SET $storcatcol[counter]=$storcatcol[counter]+1 WHERE $storcatcol[catid]='".(int)pnVarPrepForStore($catid)."'"); if($dbconn->ErrorNo()<>0) { error_log("DB Error updating $pntable[stories_cat]: " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg()); } $whereclause = "$topiccol[topicid]='".pnVarPrepForStore($topic)."' AND $storcol[catid]='".pnVarPrepForStore($catid)."' "; } else if (!empty($catid)) { // show only one category $dbconn->Execute("UPDATE $pntable[stories_cat] SET $storcatcol[counter]=$storcatcol[counter]+1 WHERE $storcatcol[catid]='".(int)pnVarPrepForStore($catid)."'"); if($dbconn->ErrorNo() != 0) { error_log("DB Error updating $pntable[stories_cat]: " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg()); } $whereclause = "$storcol[catid]='".pnVarPrepForStore($catid)."' "; } else if (!empty($topic)) { // show only one category $dbconn->Execute("UPDATE $pntable[topics] SET $topiccol[counter]=$topiccol[counter]+1 WHERE $topiccol[topicid]='".(int)pnVarPrepForStore($topic)."'"); if($dbconn->ErrorNo() != 0) { error_log("DB Error updating $pntable[topics]: " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg()); } // eugeniobaldi 2002-02-18 fixed sf patch # 511223 All Cat. doesn't work whenTopic=# // $whereclause = "($topiccol[topicid]='".pnVarPrepForStore($topic)."' OR $topiccol[topicid]=0) AND ($storcol[ihome]=0 OR $storcol[catid]=0) "; $whereclause = "($topiccol[topicid]='".(int)pnVarPrepForStore($topic)."' OR $topiccol[topicid]=0) "; } else { $whereclause = "$storcol[ihome]=0"; } switch (pnConfigGetVar('storyorder')) { case '1': $storyorder = "$storcol[time] DESC"; break; default: $storyorder = "$storcol[sid] DESC"; break; } $articles = getArticles($whereclause, $storyorder, $storynum); foreach ($articles as $row) { // $info is array holding raw information. // Used below and also passed to the theme - jgm $info = genArticleInfo($row); // Need to at least have overview permissions on this story // February 19, 2002 -- Rabbitt (aka Carl P. Corliss) -- Added Topics permission check if (pnSecAuthAction(0, 'Stories::Story', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_OVERVIEW) && pnSecAuthAction(0, 'Topics::Topic',"$info[topicname]::$info[tid]",ACCESS_OVERVIEW)) { // $links is an array holding pure URLs to // specific functions for this article. // Used below and also passed to the theme - jgm $links = genArticleLinks($info); // $preformat is an array holding chunks of // preformatted text for this article. // Used below and also passed to the theme - jgm $preformat = genArticlePreformat($info, $links); if ($GLOBALS['postnuke_theme']) { themeindex($info['aid'], $info['informant'], $info['longdatetime'], $info['catandtitle'], $info['counter'], $info['topic'], $preformat['hometext'], $info['notes'], $preformat['more'], $info['topicname'], $info['topicimage'], $info['topictext'], $info, $links, $preformat); } else { themeindex($info['aid'], $info['informant'], $info['longdatetime'], $info['catandtitle'], $info['counter'], $info['topic'], $preformat['hometext'], $info['notes'], $preformat['more'], $info['topicname'], $info['topicimage'], $info['topictext']); } } } include 'footer.php'; } theindex(); ?>