<?php // $Id: index.php,v 1.6 2001/11/15 12:08:55 jgm Exp $ $Name: $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke 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
// ----------------------------------------------------------------------
// Filename: modules/NS-Polls/index.php
// Original Author: Till Gerken (hide@address.com)
// Purpose: Voting system
// ----------------------------------------------------------------------
if (!defined("LOADED_AS_MODULE")) {
die ("You can't access this file directly...");
}
include 'mainfile.php';
/* Post-Nuke Change -- niceguyeddie
Credits to Edgar Miller -- http://www.bosna.de/ from his post on PHP-Nuke ( http://phpnuke.org/article.php?sid=2010&mode=nested&order=0&thold=0 )
Further Credits go to Djordjevic Nebojsa (nesh) for the fix for the fix */
$ModName = basename( dirname( __FILE__ ) );
modules_get_language();
/*
Now all we have to do is change the module name in the links through-out the script to $ModName
and you should be able to change than name of the directory to whatever you want, and the links will change with it.
This is done for our non-english speaking friends, and idiots like me that just change the name of things to
be "original"
*/
csrfcheck();
if(!isset($pollID)) {
include ('header.php');
pollList();
include ('footer.php');
}
elseif(isset($forwarder)) {
pollCollector($pollID, $voteID, $forwarder);
}
elseif($req == "results" && $pollID > 0) {
include ("header.php");
OpenTable();
print '<center><font class="pn-title">'._CURRENTPOLLRESULTS.'</font></center>';
CloseTable();
print '<br>';
OpenTable2();
pollResults($pollID);
CloseTable2();
cookiedecode($user);
//FTO Remove warning
if (!isset($mode)) $mode='';
if (($pollcomm) AND ($mode != "nocomments")) {
print '<br><br>';
include("modules/$ModName/comments.php");
}
include ("footer.php");
}
elseif($voteID > 0) {
pollCollector($pollID, $voteID);
}
elseif($pollID != pollLatest()) {
include ('header.php');
OpenTable();
print '<center><font class="pn-title">'._SURVEY.'</font></center>';
CloseTable();
print '<br><br>'
.'<table border="0" align="center"><tr><td>';
pollMain($pollID);
print '</td></tr></table>';
include ('footer.php');
}
else {
include ('header.php');
OpenTable();
print '<center><font class="pn-title">'._CURRENTSURVEY.'</font></center>';
CloseTable();
print '<br><br>'
.'<table border="0" align="center"><tr><td>';
pollNewest();
print '</td></tr></table>';
include ('footer.php');
}
?>