Author
Message
chatserv The Mouse Is Extension Of Arm Joined: May 02, 2003 Posts: 1396 Location: Puerto Rico
Posted:
Mon Nov 28, 2005 11:45 pm
Did you try the block j_felosi posted? it seems to be a better block from what he said, either way this would be my local copy of the block, it should be different than the one in 3.1 as it hasn't been released.
Code: <?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2005 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
global $prefix, $multilingual, $currentlang, $db, $boxTitle, $content, $pollcomm, $user, $cookie, $userinfo;
if ($multilingual == 1) {
$querylang = "WHERE planguage='$currentlang' AND artid='0'";
} else {
$querylang = "WHERE artid='0'";
}
list($pollID) = $db->sql_fetchrow($db->sql_query("SELECT pollID FROM ".$prefix."_poll_desc $querylang ORDER BY pollID DESC LIMIT 1"));
$pollID = intval($pollID);
if ($pollID == 0 || empty($pollID)) {
$content = "";
} else {
if (!isset($url)) {
$url = "modules.php?name=Surveys&op=results&pollID=".$pollID."";
}
$content .= "<form action=\"modules.php?name=Surveys\" method=\"post\">";
$content .= "<input type=\"hidden\" name=\"pollID\" value=\"".$pollID."\">";
$content .= "<input type=\"hidden\" name=\"forwarder\" value=\"".$url."\">";
list($pollTitle, $voters) = $db->sql_fetchrow($db->sql_query("SELECT pollTitle, voters FROM ".$prefix."_poll_desc WHERE pollID='$pollID'"));
$pollTitle = check_html($pollTitle, "nohtml");
$voters = intval($voters);
$boxTitle = _SURVEY;
$content .= "<span class=\"content\"><strong>$pollTitle</strong></span><br><br>\n";
$content .= "<table border=\"0\" width=\"100%\">";
for($i = 1; $i <= 12; $i++) {
$sql = "SELECT pollID, optionText, optionCount, voteID FROM ".$prefix."_poll_data WHERE (pollID='$pollID') AND (voteID='$i')";
$query = $db->sql_query($sql);
list($pollID, $optionText, $optionCount, $voteID) = $db->sql_fetchrow($query);
$pollID = intval($pollID);
$voteID = intval($voteID);
$optionCount = intval($optionCount);
if (!empty($optionText)) {
$content .= "<tr><td valign=\"top\"><input type=\"radio\" name=\"voteID\" value=\"".$i."\"></td><td width=\"100%\"><span class=\"content\">$optionText</span></td></tr>\n";
}
}
$content .= "</table><br><center><span class=\"content\"><input type=\"submit\" value=\""._VOTE."\"></span><br>";
if (is_user($user)) {
cookiedecode($user);
getusrinfo($user);
}
$sum = 0;
for($i = 0; $i < 12; $i++) {
$sql = "SELECT optionCount FROM ".$prefix."_poll_data WHERE (pollID='$pollID') AND (voteID='$i')";
$query = $db->sql_query($sql);
list($optionCount) = $db->sql_fetchrow($query);
$optionCount = intval($optionCount);
$sum = (int)$sum+$optionCount;
}
if (!isset($mode) OR empty($mode)) {
if(isset($userinfo['umode'])) {
$mode = $userinfo['umode'];
} else {
$mode = "thread";
}
}
if (!isset($order) OR empty($order)) {
if(isset($userinfo['uorder'])) {
$order = $userinfo['uorder'];
} else {
$order = 0;
}
}
if (!isset($thold) OR empty($thold)) {
if(isset($userinfo['thold'])) {
$thold = $userinfo['thold'];
} else {
$thold = 0;
}
}
$r_options = "";
$r_options .= "&mode=".$mode;
$r_options .= "&order=".$order;
$r_options .= "&thold=".$thold;
$content .= "<br><span class=\"content\"><a href=\"modules.php?name=Surveys&op=results&pollID=".$pollID.$r_options."\"><strong>"._RESULTS."</strong></a><br><a href=\"modules.php?name=Surveys\"><strong>"._POLLS."</strong></a><br>";
if ($pollcomm) {
$sql = "SELECT * FROM ".$prefix."_pollcomments WHERE pollID='$pollID'";
$query = $db->sql_query($sql);
$numcom = $db->sql_numrows($query);
$content .= "<br>"._VOTES.": <strong>".intval($sum)."</strong> <br> "._PCOMMENTS." <strong>".intval($numcom)."</strong>\n\n";
} else {
$content .= "<br>"._VOTES." <strong>".intval($sum)."</strong>\n\n";
}
$content .= "</span></center></form>\n\n";
}
?>
Raven Site Admin/Owner Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Mon Nov 28, 2005 11:47 pm
pmaryan wrote: This is rather annoying that it seems to be a valid problem that does exist and nobody cares......
Any solution yet?
Last time I checked, there were more problems in this forum than just this one
Have you bothered to check
pmaryan Regular Joined: Oct 06, 2005 Posts: 76
Posted:
Mon Nov 28, 2005 11:57 pm
Sorry, thought it was all relating to the survey poll problems.....
I tried using your version of the file along with the changes you suggested on here:
Still refreshed to a blank screen when i try to make a new poll....
Tried the different survey block as well, which is supposed to be better with random surveys and it still refresh's to a blank screen...
url it goes to is:
If you like i can make you an account to view this......
Raven Site Admin/Owner Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Tue Nov 29, 2005 12:00 am
I have replaced about a dozen sites with that code and it fixed 100% of them. At this point I'd say you may have some other issue.
chatserv The Mouse Is Extension Of Arm Joined: May 02, 2003 Posts: 1396 Location: Puerto Rico
Posted:
Tue Nov 29, 2005 12:28 am
I voted on your site's poll and it took me to the Surveys module
pmaryan Regular Joined: Oct 06, 2005 Posts: 76
Posted:
Tue Nov 29, 2005 12:36 am
Voting was the at first the problem, however that was fixed by using code that chatserv posted above awhile back in this same thread.
The problem is when I or any admin logins to the site and tries to create a poll....after i put xyz foo in as the choices and other stuff i hit the button to create the poll, the website then refreshes to a blank screen with the url of and the poll was not created.
Raven Site Admin/Owner Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Tue Nov 29, 2005 12:46 am
That's the problem all of my other (12) sites were having and they all work now. I don't know.
Raven Site Admin/Owner Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Tue Nov 29, 2005 12:47 am
Just for curiosity, d/l my RavenNuke76 package and replace your survey block and module with mine.
chatserv The Mouse Is Extension Of Arm Joined: May 02, 2003 Posts: 1396 Location: Puerto Rico
Posted:
Tue Nov 29, 2005 12:52 am
Also you can enable display_errors in config.php to check if the blank page turns into a error message.
manunkind Client Joined: Apr 26, 2004 Posts: 368 Location: Albuquerque, NM
Posted:
Tue Nov 29, 2005 4:03 pm
Raven wrote: Just for curiosity, d/l my RavenNuke76 package and replace your survey block and module with mine.
This seemed to work for my problem. Thanks Raven.
Neveryll New Member Joined: Nov 22, 2005 Posts: 22
Posted:
Tue Nov 29, 2005 4:39 pm
Er nm hehe. I just didn't see the second page on the thread...
blith Client Joined: Jul 18, 2003 Posts: 977
Posted:
Tue Dec 06, 2005 3:01 pm
Raven wrote: Just for curiosity, d/l my RavenNuke76 package and replace your survey block and module with mine.
I did Raven. I made a poll that had 6-7 options. I clicked save and I was sent to a blank admin page, refreshing did not work. I had to close the browser and restart it to get to admin.php. When I did get back to admin.php and choose edit poll the poll was there but with only three options.
blith Client Joined: Jul 18, 2003 Posts: 977
Posted:
Tue Dec 06, 2005 3:30 pm
I found the problem. I had to take out all commas and single quotes, that I had used as apostrophes, from the poll options!!! Then it worked perfectly. For clarification as to what version, it is your Survey block in your 7.6 distro Raven...
Raven Site Admin/Owner Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Tue Dec 06, 2005 3:54 pm
blith Client Joined: Jul 18, 2003 Posts: 977
Posted:
Tue Dec 06, 2005 4:16 pm
as cryptic as ever Raven. What does this mean?
Raven Site Admin/Owner Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Tue Dec 06, 2005 4:24 pm
phpnuke version 7.6 with patch level 3.1
blith Client Joined: Jul 18, 2003 Posts: 977
Posted:
Tue Dec 06, 2005 4:49 pm
Raven wrote: phpnuke version 7.6 with patch level 3.1
d'oh! Okay so that is where I found the problem I detailed above. Any comments?
tyler_r New Member Joined: Dec 16, 2005 Posts: 1
Posted:
Fri Dec 16, 2005 7:36 pm
I think they believe it has been fixed but it hasn't I am having the same problem. It's very trying looking for a solution, but if I find one I will post it all the same.
I have found a solution and it worked for me. I used the nuke 7.5 admin file that is in surveys/admin/
index.php file:
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/************************************************************************/
/* Additional security & Abstraction layer conversion */
/* 2003 chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }
global $prefix, $db;
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".$prefix."_modules WHERE title='Surveys'"));
$row2 = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));
$admins = explode(",", $row['admins']);
$auth_user = 0;
for ($i=0; $i < sizeof($admins); $i++) {
if ($row2['name'] == "$admins[$i]" AND $row['admins'] != "") {
$auth_user = 1;
}
}
if ($row2['radminsuper'] == 1 || $auth_user == 1) {
/*********************************************************/
/* Poll/Surveys Functions */
/*********************************************************/
function puthome($ihome, $acomm) {
echo "<br><b>" . _PUBLISHINHOME . "</b> ";
if (($ihome == 0) OR ($ihome == "")) {
$sel1 = "checked";
$sel2 = "";
}
if ($ihome == 1) {
$sel1 = "";
$sel2 = "checked";
}
echo "<input type=\"radio\" name=\"ihome\" value=\"0\" $sel1>" . _YES . " "
."<input type=\"radio\" name=\"ihome\" value=\"1\" $sel2>" . _NO . ""
." <font class=\"content\">[ " . _ONLYIFCATSELECTED . " ]</font><br>";
echo "<br><b>" . _ACTIVATECOMMENTS . "</b> ";
if (($acomm == 0) OR ($acomm == "")) {
$sel1 = "checked";
$sel2 = "";
}
if ($acomm == 1) {
$sel1 = "";
$sel2 = "checked";
}
echo "<input type=\"radio\" name=\"acomm\" value=\"0\" $sel1>" . _YES . " "
."<input type=\"radio\" name=\"acomm\" value=\"1\" $sel2>" . _NO . "</font><br><br>";
}
function SelectCategory($cat) {
global $prefix, $db;
$selcat = $db->sql_query("SELECT catid, title from " . $prefix . "_stories_cat order by title");
$a = 1;
echo "<b>" . _CATEGORY . "</b> ";
echo "<select name=\"catid\">";
if ($cat == 0) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option name=\"catid\" value=\"0\" $sel>" . _ARTICLES . "</option>";
while ($row = $db->sql_fetchrow($selcat)) {
$catid = intval($row['catid']);
$title = stripslashes($row['title']);
if ($catid == $cat) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option name=\"catid\" value=\"$catid\" $sel>$title</option>";
$a++;
}
echo "</select> [ <a href=\"admin.php?op=AddCategory\">" . _ADD . "</a> | <a href=\"admin.php?op=EditCategory\">" . _EDIT . "</a> | <a href=\"admin.php?op=DelCategory\">" . _DELETE . "</a> ]";
}
function poll_createPoll() {
global $language, $admin, $multilingual, $prefix, $db;
include ('header.php');
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>" . _POLLSADMIN . "</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><font class=\"option\"><b>" . _CREATEPOLL . "</b></font><br><br>"
."[ <a href=\"admin.php?op=remove\">" . _DELETEPOLLS . "</a> | <a href=\"admin.php?op=polledit_select\">" . _EDITPOLL . "</a> ]</center><br><br>"
."<form action=\"admin.php\" method=\"post\">"
."" . _POLLTITLE . ": <input type=\"text\" name=\"pollTitle\" size=\"50\" maxlength=\"100\"><br><br>";
if ($multilingual == 1) {
echo "<br>" . _LANGUAGE . ": "
."<select name=\"planguage\">";
$handle=opendir('language');
while ($file = readdir($handle)) {
if (preg_match("/^lang\-(.+)\.php/", $file, $matches)) {
$langFound = $matches[1];
$languageslist .= "$langFound ";
}
}
closedir($handle);
$languageslist = explode(" ", $languageslist);
sort($languageslist);
for ($h=0; $h < sizeof($languageslist); $h++) {
if($languageslist[$h]!="") {
echo "<option value=\"$languageslist[$h]\" ";
if($languageslist[$h]==$language) echo "selected";
echo ">" . ucfirst($languageslist[$h]) . "</option>\n";
}
}
echo "</select><br><br>";
} else {
echo "<input type=\"hidden\" name=\"planguage\" value=\"$language\"><br><br>";
}
echo "<font class=\"content\">" . _POLLEACHFIELD . "</font><br>"
."<table border=\"0\">";
for($i = 1; $i <= 12; $i++) {
echo "<tr>"
."<td>" . _OPTION . " $i:</td><td><input type=\"text\" name=\"optionText[$i]\" size=\"50\" maxlength=\"50\"></td>"
."</tr>";
}
echo "</table>"
."<br><br><center><hr size=\"1\" noshade><font class=\"option\"><b>" . _ANNOUNCEPOLL . "</b></font><br>"
."<font class=\"tiny\">" . _LEAVEBLANK . "</font></center>"
."<br><br><b>" . _TITLE . ":</b><br>"
."<input type=\"text\" name=\"title\" size=\"40\"><br><br>";
$cat = 0;
$ihome = 0;
$acomm = 0;
SelectCategory($cat);
echo "<br>";
puthome($ihome, $acomm);
echo "<b>" . _TOPIC . "</b> <select name=\"topic\">";
$toplist = $db->sql_query("SELECT topicid, topictext from " . $prefix . "_topics order by topictext");
echo "<option value=\"\">" . _SELECTTOPIC . "</option>\n";
while ($row = $db->sql_fetchrow($toplist)) {
$topicid = intval($row['topicid']);
$topics = $row['topictext'];
echo "<option value=\"$topicid\">$topics</option>\n";
}
echo "</select>";
echo "<br><br><b>" . _STORYTEXT . "</b><br>"
."<textarea wrap=\"virtual\" cols=\"50\" rows=\"7\" name=\"hometext\">$story</textarea><br><br>"
."<b>" . _EXTENDEDTEXT . "</b><br>"
."<textarea wrap=\"virtual\" cols=\"50\" rows=\"8\" name=\"bodytext\"></textarea><BR>"
."<br><br>"
."<input type=\"hidden\" name=\"op\" value=\"createPosted\">"
."<input type=\"submit\" value=\"" . _CREATEPOLLBUT . "\">"
."</form>";
CloseTable();
include ('footer.php');
}
function old_poll_createPosted() {
global $pollTitle, $optionText, $prefix, $db, $planguage;
$timeStamp = time();
$res = $db->sql_query("INSERT INTO " . $prefix . "_poll_desc VALUES (NULL, '$pollTitle', '$timeStamp', '$planguage', '0')");
if (!$res) {
return;
}
/* create option records in data table */
for($i = 1; $i <= 12; $i++) {
if($optionText[$i] != "") {
$result = $db->sql_query("INSERT INTO " . $prefix . "_poll_data VALUES ('$id', '$optionText[$i]', '0', '$i')");
}
if (!result) {
return;
}
}
Header("Location: admin.php?op=adminMain");
}
function poll_createPosted($pollTitle, $optionText, $planguage, $title, $hometext, $topic, $bodytext, $catid, $ihome, $acomm) {
global $prefix, $db, $aid;
$timeStamp = time();
$pollTitle = FixQuotes($pollTitle);
if(!$db->sql_query("INSERT INTO " . $prefix . "_poll_desc VALUES (NULL, '$pollTitle', '$timeStamp', '0', '$planguage', '0')")) {
return;
}
$object = $db->sql_fetchrow($db->sql_query("SELECT pollID FROM ".$prefix."_poll_desc WHERE pollTitle='$pollTitle'"));
$id = $object['pollID'];
$id = intval($id);
for($i = 1; $i <= sizeof($optionText); $i++) {
if($optionText[$i] != "") {
$optionText[$i] = FixQuotes($optionText[$i]);
}
if(!$db->sql_query("INSERT INTO " . $prefix . "_poll_data (pollID, optionText, optionCount, voteID) VALUES ('$id', '$optionText[$i]', '0', '$i')")) {
return;
}
}
if (($title != "") AND ($hometext != "")) {
$title = stripslashes(FixQuotes($title));
$hometext = stripslashes(FixQuotes($hometext));
$bodytext = stripslashes(FixQuotes($bodytext));
$result = $db->sql_query("insert into ".$prefix."_stories values (NULL, '$catid', '$aid', '$title', now(), '$hometext', '$bodytext', '0', '0', '$topic', '$aid', '', '$ihome', '$planguage', '$acomm', '0', '0', '0', '0', '')");
}
Header("Location: admin.php?op=adminMain");
}
function poll_removePoll() {
global $prefix, $db;
include ('header.php');
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>" . _POLLSADMIN . "</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><font class=\"option\"><b>" . _REMOVEEXISTING . "</b></font><br><br>"
."" . _POLLDELWARNING . "</center><br><br>"
."" . _CHOOSEPOLL . "<br>"
."<form action=\"admin.php\" method=\"post\">"
."<input type=\"hidden\" name=\"op\" value=\"removePosted\">"
."<table border=\"0\">";
$result = $db->sql_query("SELECT pollID, pollTitle, timeStamp, planguage FROM ".$prefix."_poll_desc ORDER BY timeStamp");
if(!$result) {
return;
}
/* cycle through the descriptions until everyone has been fetched */
while($object = $db->sql_fetchrow($result)) {
$pollID = $object['pollID'];
$pollID = intval($pollID);
echo "<tr><td><input type=\"radio\" name=\"id\" value=\"".$object['pollID']."\">".$object['pollTitle']." - (".$object['planguage'].")</td></tr>";
}
echo "</table>";
echo "<input type=\"submit\" value=\"" . _DELETE . "\">";
echo "</form>";
CloseTable();
include ('footer.php');
}
function poll_removePosted() {
global $id, $prefix, $db;
$id = intval($id);
$db->sql_query("DELETE FROM " . $prefix . "_poll_desc WHERE pollID='$id'");
$db->sql_query("DELETE FROM " . $prefix . "_poll_data WHERE pollID='$id'");
Header("Location: admin.php?op=adminMain");
}
function polledit_select() {
global $prefix, $db;
include ('header.php');
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>" . _POLLSADMIN . "</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><font class=\"option\"><b>" . _EDITPOLL . "</b></font></center><br><br>"
."" . _CHOOSEPOLLEDIT . "<br>"
."<form action=\"admin.php\" method=\"post\">"
."<input type=\"hidden\" name=\"op\" value=\"polledit\">"
."<table border=\"0\">";
$result = $db->sql_query("SELECT pollID, pollTitle, timeStamp, planguage FROM ".$prefix."_poll_desc ORDER BY timeStamp");
if(!$result) {
return;
}
/* cycle through the descriptions until everyone has been fetched */
while($object = $db->sql_fetchrow($result)) {
$pollID = $object['pollID'];
$pollID = intval($pollID);
echo "<tr><td><input type=\"radio\" name=\"pollID\" value=\"".$object['pollID']."\">".$object['pollTitle']." - (".$object['planguage'].")</td></tr>";
}
echo "</table>";
echo "<input type=\"submit\" value=\"" . _EDIT . "\">";
echo "</form>";
CloseTable();
include ('footer.php');
}
function polledit($pollID) {
global $prefix, $db, $multilingual;
include ('header.php');
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>" . _POLLSADMIN . "</b></font></center>";
$pollID = intval($pollID);
$row = $db->sql_fetchrow($db->sql_query("SELECT pollTitle, planguage from " . $prefix . "_poll_desc where pollID='$pollID'"));
$pollTitle = $row['pollTitle'];
$planguage = $row['planguage'];
CloseTable();
echo "<br>";
OpenTable();
echo "<center><b>"._POLLEDIT." $pollTitle</b></center><br><br>";
echo "<form action=\"admin.php\" method=\"post\">";
echo "<table border=\"0\" align=\"center\"><tr><td align=\"right\">";
echo "<b>" . _TITLE . ":</b></td><td colspan=\"2\"><input type=\"text\" name=\"pollTitle\" value=\"$pollTitle\" size=\"40\" maxlength=\"100\"></td></tr>";
if ($multilingual == 1) {
echo "<tr><td><b>" . _LANGUAGE . ":</b></td><td>"
."<select name=\"planguage\">";
$handle=opendir('language');
while ($file = readdir($handle)) {
if (preg_match("/^lang\-(.+)\.php/", $file, $matches)) {
$langFound = $matches[1];
$languageslist .= "$langFound ";
}
}
closedir($handle);
$languageslist = explode(" ", $languageslist);
sort($languageslist);
for ($h=0; $h < sizeof($languageslist); $h++) {
if($languageslist[$h]!="") {
echo "<option value=\"$languageslist[$h]\" ";
if($languageslist[$h]==$planguage) echo "selected";
echo ">".ucfirst($languageslist[$h])."</option>\n";
}
}
echo "</select><br><br>";
echo "</td></tr>";
} else {
echo "<input type=\"hidden\" name=\"planguage\" value=\"$planguage\"><br><br>";
}
$result2 = $db->sql_query("SELECT optionText, optionCount, voteID from ".$prefix."_poll_data where pollID='$pollID' order by voteID");
while ($row2 = $db->sql_fetchrow($result2)) {
$optionText = $row2['optionText'];
$optionCount = intval($row2['optionCount']);
$voteID = intval($row2['voteID']);
echo "<tr><td align=\"right\"><b>" . _OPTION . " $voteID:</b></td><td><input type=\"text\" name=\"optiontext$voteID\" value=\"$optionText\" size=\"40\" maxlength=\"50\"></td><td align=\"right\">$optionCount "._VOTES."</td></tr>";
}
echo "</table><input type=\"hidden\" name=\"pollID\" value=\"$pollID\"><input type=\"hidden\" name=\"op\" value=\"savepoll\">"
."<br><br><center><input type=\"submit\" value=\"" . _SAVECHANGES . "\"><br>" . _GOBACK . "</center><br><br></form>";
CloseTable();
include("footer.php");
}
function savepoll($pollID, $pollTitle, $planguage, $optiontext1, $optiontext2, $optiontext3, $optiontext4, $optiontext5, $optiontext6, $optiontext7, $optiontext8, $optiontext9, $optiontext10, $optiontext11, $optiontext12) {
global $prefix, $db;
$pollID = intval($pollID);
$result = $db->sql_query("update " . $prefix . "_poll_desc set pollTitle='$pollTitle', planguage='$planguage' where pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext1' where voteID='1' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext2' where voteID='2' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext3' where voteID='3' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext4' where voteID='4' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext5' where voteID='5' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext6' where voteID='6' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext7' where voteID='7' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext8' where voteID='8' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext9' where voteID='9' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext10' where voteID='10' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext11' where voteID='11' AND pollID='$pollID'");
$result = $db->sql_query("update " . $prefix . "_poll_data set optionText='$optiontext12' where voteID='12' AND pollID='$pollID'");
Header("Location: admin.php");
}
switch($op) {
case "create":
poll_createPoll();
break;
case "createPosted":
poll_createPosted($pollTitle, $optionText, $planguage, $title, $hometext, $topic, $bodytext, $catid, $ihome, $acomm);
break;
case "ChangePoll":
ChangePoll($pollID, $pollTitle, $optionText, $voteID);
break;
case "remove":
poll_removePoll();
break;
case "removePosted":
poll_removePosted();
break;
case "polledit":
polledit($pollID);
break;
case "savepoll":
savepoll($pollID, $pollTitle, $planguage, $optiontext1, $optiontext2, $optiontext3, $optiontext4, $optiontext5, $optiontext6, $optiontext7, $optiontext8, $optiontext9, $optiontext10, $optiontext11, $optiontext12);
break;
case "polledit_select":
polledit_select();
break;
}
} else {
include("header.php");
GraphicAdmin();
OpenTable();
echo "<center><b>"._ERROR."</b><br><br>You do not have administration permission for module \"$module_name\"</center>";
CloseTable();
include("footer.php");
}
?>
And I also used the index.php code that is located in surveys/
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/* Additional security & Abstraction layer conversion */
/* 2003 chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "._SURVEYS."";
if (isset($pollID)) {
$pollID = intval($pollID);
}
if(!isset($pollID)) {
include ('header.php');
pollList();
include ('footer.php');
} elseif(isset($forwarder)) {
pollCollector($pollID, $voteID, $forwarder);
} elseif($op == "results" && $pollID > 0) {
include ("header.php");
OpenTable();
echo "<center><font class=\"title\"><b>"._CURRENTPOLLRESULTS."</b></font></center>";
CloseTable();
echo "<br>";
echo "<table border='0' width='100%'><tr><td width='70%' valign='top'>";
OpenTable();
pollResults($pollID);
CloseTable();
echo "</td><td> </td><td width='30%' valign='top'>";
OpenTable();
echo "<b>"._LAST5POLLS." $sitename</b><br><br>";
if (isset($cookie[4])) { $r_options .= "&mode=$cookie[4]"; }
if (isset($cookie[5])) { $r_options .= "&order=$cookie[5]"; }
if (isset($cookie[6])) { $r_options .= "&thold=$cookie[6]"; }
$result = $db->sql_query("SELECT pollID, pollTitle, voters FROM ".$prefix."_poll_desc where artid='0' order by timeStamp DESC limit 1,5");
while ($row = $db->sql_fetchrow($result)) {
$plid = intval($row['pollID']);
$pltitle = stripslashes(check_html($row['pollTitle'], "nohtml"));
$plvoters = intval($row['voters']);
if ($pollID == $plid) {
echo "<img src='images/arrow.gif' border='0'> $pltitle ($plvoters "._LVOTES.")<br><br>";
} else {
echo "<img src='images/arrow.gif' border='0'> <a href='modules.php?name=$module_name&op=results&pollID=$plid$r_options'>$pltitle</a> ($plvoters "._LVOTES.")<br><br>";
}
}
echo "<a href='modules.php?name=$module_name'><b>"._MOREPOLLS."</b></a>";
CloseTable();
echo "</td></tr></table>";
cookiedecode($user);
if (($pollcomm) AND ($mode != "nocomments")) {
echo "<br><br>";
include("modules/Surveys/comments.php");
}
include ("footer.php");
} elseif($voteID > 0) {
pollCollector($pollID, $voteID);
} elseif($pollID != pollLatest()) {
include ('header.php');
OpenTable();
echo "<center><font class=\"option\"><b>"._SURVEY."</b></font></center>";
CloseTable();
echo "<br><br>";
echo "<table border=\"0\" align=\"center\"><tr><td>";
pollMain($pollID);
echo "</td></tr></table>";
include ('footer.php');
} else {
include ('header.php');
OpenTable();
echo "<center><font class=\"option\"><b>"._CURRENTSURVEY."</b></font></center>";
CloseTable();
echo "<br><br><table border=\"0\" align=\"center\"><tr><td>";
pollNewest();
echo "</td></tr></table>";
include ('footer.php');
}
/*********************************************************/
/* Functions */
/*********************************************************/
function pollMain($pollID) {
global $boxTitle, $boxContent, $pollcomm, $user, $cookie, $prefix, $dbi, $module_name, $db;
$pollID = intval($pollID);
if(!isset($pollID))
$pollID = 1;
if(!isset($url))
$url = sprintf("modules.php?name=$module_name&op=results&pollID=%d", $pollID);
$boxContent .= "<form action=\"modules.php?name=$module_name\" method=\"post\">";
$boxContent .= "<input type=\"hidden\" name=\"pollID\" value=\"".$pollID."\">";
$boxContent .= "<input type=\"hidden\" name=\"forwarder\" value=\"".$url."\">";
$result_a = $db->sql_query("SELECT pollTitle, voters FROM ".$prefix."_poll_desc WHERE pollID='$pollID'");
list($pollTitle, $voters) = $db->sql_fetchrow($result_a);
$boxTitle = _SURVEY;
$boxContent .= "<font class=\"content\"><b>$pollTitle</b></font><br><br>\n";
$boxContent .= "<table border=\"0\" width=\"100%\">";
for($i = 1; $i <= 12; $i++) {
$result = sql_query("SELECT pollID, optionText, optionCount, voteID FROM ".$prefix."_poll_data WHERE pollID='$pollID' AND voteID='$i'", $dbi);
$object = sql_fetch_object($result, $dbi);
if(is_object($object)) {
$optionText = $object->optionText;
if($optionText != "") {
$boxContent .= "<tr><td valign=\"top\"><input type=\"radio\" name=\"voteID\" value=\"".$i."\"></td><td width=\"100%\"><font class=\"content\">$optionText</font></td></tr>\n";
}
}
}
$boxContent .= "</table><br><center><font class=\"content\"><input type=\"submit\" value=\""._VOTE."\"></font><br>";
if (is_user($user)) {
cookiedecode($user);
}
for($i = 0; $i < 12; $i++) {
$result2 = sql_query("SELECT optionCount FROM ".$prefix."_poll_data WHERE pollID='$pollID' AND voteID='$i'", $dbi);
$object = sql_fetch_object($result2, $dbi);
$optionCount = $object->optionCount;
$sum = (int)$sum+$optionCount;
}
$boxContent .= "<br><font class=\"content\"><a href=\"modules.php?name=$module_name&op=results&pollID=$pollID&mode=$cookie[4]&order=$cookie[5]&thold=$cookie[6]\"><b>"._RESULTS."</b></a><br><a href=\"modules.php?name=$module_name\"><b>"._POLLS."</b></a><br>";
if ($pollcomm) {
list($numcom) = $db->sql_fetchrow($db->sql_query("select count(*) from ".$prefix."_pollcomments where pollID='$pollID'"));
$boxContent .= "<br>"._VOTES.": <b>$sum</b> <br> "._PCOMMENTS." <b>$numcom</b>\n\n";
} else {
$boxContent .= "<br>"._VOTES." <b>$sum</b>\n\n";
}
$boxContent .= "</font></center></form>\n\n";
themesidebox($boxTitle, $boxContent);
}
function pollLatest() {
global $prefix, $multilingual, $currentlang, $db;
if ($multilingual == 1) {
$querylang = "WHERE planguage='$currentlang' AND artid='0'";
} else {
$querylang = "WHERE artid='0'";
}
$pollID = $db->sql_fetchrow($db->sql_query("SELECT pollID FROM ".$prefix."_poll_desc $querylang ORDER BY pollID DESC LIMIT 1"));
return($pollID[0]);
}
function pollNewest() {
$pollID = pollLatest();
pollMain($pollID);
}
function pollCollector($pollID, $voteID, $forwarder) {
global $HTTP_COOKIE_VARS, $prefix, $db;
/* Fix for lamers that like to cheat on polls */
if (empty($ip)) {
$ip = $_SERVER["REMOTE_ADDR"];
}
$pollID = intval($pollID);
$voteID = intval($voteID);
$past = time()-1800;
$db->sql_query("DELETE FROM ".$prefix."_poll_check WHERE time < '$past'");
$row = $db->sql_fetchrow($db->sql_query("SELECT ip FROM ".$prefix."_poll_check WHERE (ip='$ip') AND (pollID='$pollID')"));
$ips = $row['ip'];
$ctime = time();
if ($ip == $ips) {
$voteValid = 0;
} else {
$db->sql_query("INSERT INTO ".$prefix."_poll_check (ip, time, pollID) VALUES ('$ip', '$ctime', '$pollID')");
$voteValid = "1";
}
/* Fix end */
/* update database if the vote is valid */
if($voteValid>0) {
$db->sql_query("UPDATE ".$prefix."_poll_data SET optionCount=optionCount+1 WHERE pollID='$pollID' AND voteID='$voteID'");
if ($voteID != "") {
$db->sql_query("UPDATE ".$prefix."_poll_desc SET voters=voters+1 WHERE pollID='$pollID'");
update_points(8);
}
Header("Location: $forwarder");
} else {
Header("Location: $forwarder");
}
/* a lot of browsers can't handle it if there's an empty page */
echo "<html><head></head><body></body></html>";
}
function pollList() {
global $user, $cookie, $prefix, $multilingual, $currentlang, $admin, $dbi, $module_name, $db;
if (isset($cookie[4])) { $r_options .= "&mode=$cookie[4]"; }
if (isset($cookie[5])) { $r_options .= "&order=$cookie[5]"; }
if (isset($cookie[6])) { $r_options .= "&thold=$cookie[6]"; }
if ($multilingual == 1) {
$querylang = "WHERE planguage='$currentlang' AND artid='0'";
} else {
$querylang = "WHERE artid='0'";
}
$result = sql_query("SELECT pollID, pollTitle, timeStamp, voters FROM ".$prefix."_poll_desc $querylang ORDER BY timeStamp DESC", $dbi);
$counter = 0;
OpenTable();
OpenTable();
echo "<center><font class=\"title\"><b>"._PASTSURVEYS."</b></font></center>";
CloseTable();
echo "<table border=\"0\" cellpadding=\"8\"><tr><td>";
while($object = sql_fetch_object($result, $dbi)) {
$resultArray[$counter] = array($object->pollID, $object->pollTitle, $object->timeStamp, $object->voters);
$counter++;
}
for ($count = 0; $count < count($resultArray); $count++) {
$id = $resultArray[$count][0];
$id = intval($id);
$i = intval($i);
$pollTitle = $resultArray[$count][1];
$voters = $resultArray[$count][3];
for($i = 0; $i < 12; $i++) {
$result2 = sql_query("SELECT optionCount FROM ".$prefix."_poll_data WHERE pollID='$id' AND voteID='$i'", $dbi);
$object = sql_fetch_object($result2, $dbi);
$optionCount = $object->optionCount;
$sum = (int)$sum+$optionCount;
}
echo "<strong><big>·</big></strong> <a href=\"modules.php?name=$module_name&pollID=$id\">$pollTitle</a> ";
if (is_admin($admin)) {
$editing = " - <a href=\"admin.php?op=polledit&pollID=$id\">Edit</a>";
} else {
$editing = "";
}
echo "(<a href=\"modules.php?name=$module_name&op=results&pollID=$id$r_options\">"._RESULTS."</a> - $sum "._LVOTES."$editing)<br>\n";
$sum = 0;
}
echo "</td></tr></table>"
."<br>";
OpenTable();
echo "<center><font class=\"title\"><b>"._SURVEYSATTACHED."</b></font></center>";
CloseTable();
echo "<table border=\"0\" cellpadding=\"8\"><tr><td>";
if ($multilingual == 1) {
$querylang = "WHERE planguage='$currentlang' AND artid!='0'";
} else {
$querylang = "WHERE artid!='0'";
}
$counter = 0;
$result3 = sql_query("SELECT pollID, pollTitle, timeStamp, voters FROM ".$prefix."_poll_desc $querylang ORDER BY timeStamp DESC", $dbi);
while($object = sql_fetch_object($result3, $dbi)) {
$resultArray2[$counter] = array($object->pollID, $object->pollTitle, $object->timeStamp, $object->voters);
$counter++;
}
for ($count = 0; $count < count($resultArray2); $count++) {
$id = $resultArray2[$count][0];
$id = intval($id);
$i = intval($i);
$pollTitle = $resultArray2[$count][1];
$voters = $resultArray2[$count][3];
for($i = 0; $i < 12; $i++) {
$result4 = sql_query("SELECT optionCount FROM ".$prefix."_poll_data WHERE pollID='$id' AND voteID='$i'", $dbi);
$object = sql_fetch_object($result4, $dbi);
$optionCount = $object->optionCount;
$sum = (int)$sum+$optionCount;
}
echo "<strong><big>·</big></strong> <a href=\"modules.php?name=$module_name&pollID=$id\">$pollTitle</a> ";
if (is_admin($admin)) {
$editing = " - <a href=\"admin.php?op=polledit&pollID=$id\">Edit</a>";
} else {
$editing = "";
}
$res = $db->sql_query("select sid, title from ".$prefix."_stories where pollID='$id'");
list($sid, $title) = $db->sql_fetchrow($res);
$sid = intval($sid);
$title = stripslashes(check_html($title, "nohtml"));
echo "(<a href=\"modules.php?name=$module_name&op=results&pollID=$id$r_options\">"._RESULTS."</a> - $sum "._LVOTES."$editing)<br>\n"
.""._ATTACHEDTOARTICLE." <a href=\"modules.php?name=News&file=article&sid=$sid$r_options\">$title</a><br><br>\n";
$sum = "";
}
echo "</td></tr></table>";
CloseTable();
}
function pollResults($pollID) {
global $resultTableBgColor, $resultBarFile, $Default_Theme, $user, $cookie, $prefix, $dbi, $admin, $module_name, $db;
if(!isset($pollID)) $pollID = 1;
$pollID = intval($pollID);
$result = $db->sql_query("SELECT pollID, pollTitle, timeStamp, artid FROM ".$prefix."_poll_desc WHERE pollID='$pollID'");
$holdtitle = $db->sql_fetchrow($result);
echo "<b>$holdtitle[1]</b><br><br>";
$i = intval($i);
for($i = 0; $i < 12; $i++) {
$result2 = sql_query("SELECT optionCount FROM ".$prefix."_poll_data WHERE pollID='$pollID' AND voteID='$i'", $dbi);
$object = sql_fetch_object($result2, $dbi);
$optionCount = $object->optionCount;
$sum = (int)$sum+$optionCount;
}
echo "<table border=\"0\">";
/* cycle through all options */
for($i = 1; $i <= 12; $i++) {
/* select next vote option */
$result3 = sql_query("SELECT pollID, optionText, optionCount, voteID FROM ".$prefix."_poll_data WHERE pollID='$pollID' AND voteID='$i'", $dbi);
$object = sql_fetch_object($result3, $dbi);
if(is_object($object)) {
$optionText = $object->optionText;
$optionCount = $object->optionCount;
if($optionText != "") {
echo "<tr><td>";
echo "$optionText";
echo "</td>";
if($sum) {
$percent = 100 * $optionCount / $sum;
} else {
$percent = 0;
}
echo "<td>";
$percentInt = (int)$percent * 4 * 1;
$percent2 = (int)$percent;
if(is_user($user)) {
if($cookie[9]=="") $cookie[9]=$Default_Theme;
if(!$file=@opendir("themes/$cookie[9]")) {
$ThemeSel = $Default_Theme;
} else {
$ThemeSel = $cookie[9];
}
} else {
$ThemeSel = $Default_Theme;
}
if (file_exists("themes/$ThemeSel/images/survey_leftbar.gif") AND file_exists("themes/$ThemeSel/images/survey_mainbar.gif") AND file_exists("themes/$ThemeSel/images/survey_rightbar.gif")) {
$l_size = getimagesize("themes/$ThemeSel/images/survey_leftbar.gif");
$m_size = getimagesize("themes/$ThemeSel/images/survey_mainbar.gif");
$r_size = getimagesize("themes/$ThemeSel/images/survey_rightbar.gif");
$leftbar = "survey_leftbar.gif";
$mainbar = "survey_mainbar.gif";
$rightbar = "survey_rightbar.gif";
} else {
$l_size = getimagesize("themes/$ThemeSel/images/leftbar.gif");
$m_size = getimagesize("themes/$ThemeSel/images/mainbar.gif");
$r_size = getimagesize("themes/$ThemeSel/images/rightbar.gif");
$leftbar = "leftbar.gif";
$mainbar = "mainbar.gif";
$rightbar = "rightbar.gif";
}
if (file_exists("themes/$ThemeSel/images/survey_mainbar_d.gif")) {
$m1_size = getimagesize("themes/$ThemeSel/images/survey_mainbar_d.gif");
$mainbar_d = "survey_mainbar_d.gif";
if ($percent2 > 0 AND $percent2 <= 23) {
$salto = "<img src=\"themes/$ThemeSel/images/$mainbar\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m_size[1]\" width=\"$percentInt\">";
} elseif ($percent2 > 24 AND $percent2 < 50) {
$a = $percentInt - 100;
$salto = "<img src=\"themes/$ThemeSel/images/$mainbar\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m_size[1]\" width=\"70\">"
."<img src=\"themes/$ThemeSel/images/$mainbar_d\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m1_size[1]\" width=\"30\">"
."<img src=\"themes/$ThemeSel/images/$mainbar\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m_size[1]\" width=\"$a\">";
} elseif ($percent2 > 49 AND $percent2 < 75) {
$a = $percentInt - 200;
$salto = "<img src=\"themes/$ThemeSel/images/$mainbar\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m_size[1]\" width=\"70\">"
."<img src=\"themes/$ThemeSel/images/$mainbar_d\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m1_size[1]\" width=\"30\">"
."<img src=\"themes/$ThemeSel/images/$mainbar\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m_size[1]\" width=\"70\">"
."<img src=\"themes/$ThemeSel/images/$mainbar_d\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m1_size[1]\" width=\"30\">"
."<img src=\"themes/$ThemeSel/images/$mainbar\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m_size[1]\" width=\"$a\">";
} elseif ($percent2 > 74 AND $percent2 <= 100) {
$a = $percentInt - 300;
$salto = "<img src=\"themes/$ThemeSel/images/$mainbar\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m_size[1]\" width=\"70\">"
."<img src=\"themes/$ThemeSel/images/$mainbar_d\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m1_size[1]\" width=\"30\">"
."<img src=\"themes/$ThemeSel/images/$mainbar\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m_size[1]\" width=\"70\">"
."<img src=\"themes/$ThemeSel/images/$mainbar_d\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m1_size[1]\" width=\"30\">"
."<img src=\"themes/$ThemeSel/images/$mainbar\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m_size[1]\" width=\"70\">"
."<img src=\"themes/$ThemeSel/images/$mainbar_d\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m1_size[1]\" width=\"30\">"
."<img src=\"themes/$ThemeSel/images/$mainbar\" alt=\"$percent2 %\" title=\"$percent2 %\" height=\"$m_size[1]\" width=\"$a\">";
}
}
if ($percent > 0) {
echo "<img src=\"themes/$ThemeSel/images/$leftbar\" height=\"$l_size[1]\" width=\"$l_size[0]\" alt=\"$percent2 %\" title=\"$percent2 %\">";
if (file_exists("themes/$ThemeSel/images/survey_mainbar_d.gif")) {
echo "$salto";
} else {
echo "<img src=\"themes/$ThemeSel/images/$mainbar\" height=\"$m_size[1]\" width=\"$percentInt\" alt=\"$percent2 %\" title=\"$percent2 %\">";
}
echo "<img src=\"themes/$ThemeSel/images/$rightbar\" height=\"$r_size[1]\" width=\"$r_size[0]\" alt=\"$percent2 %\" title=\"$percent2 %\">";
} else {
echo "<img src=\"themes/$ThemeSel/images/$leftbar\" height=\"$l_size[1]\" width=\"$l_size[0]\" alt=\"$percent2 %\" title=\"$percent2 %\">";
if (!file_exists("themes/$ThemeSel/images/survey_mainbar_d.gif")) {
echo "<img src=\"themes/$ThemeSel/images/$mainbar\" height=\"$m_size[1]\" width=\"$m_size[0]\" alt=\"$percent2 %\" title=\"$percent2 %\">";
}
echo "<img src=\"themes/$ThemeSel/images/$rightbar\" height=\"$r_size[1]\" width=\"$r_size[0]\" alt=\"$percent2 %\" title=\"$percent2 %\">";
}
printf(" %.2f%% (%s)", $percent, $optionCount);
echo "</td></tr>";
}
}
}
echo "</table><br>";
echo "<center><font class=\"content\">";
echo "<b>"._TOTALVOTES." $sum</b><br>";
echo "<br><br>";
$booth = $pollID;
$booth = intval($booth);
if ($holdtitle[3] > 0) {
$article = "<br><br>"._GOBACK."</font></center>";
} else {
$article = "</font></center>";
}
echo "[ <a href=\"modules.php?name=$module_name&pollID=$booth\">"._VOTING."</a> | "
."<a href=\"modules.php?name=$module_name\">"._OTHERPOLLS."</a> ] $article";
if (is_admin($admin)) {
echo "<br><center>[ <a href=\"admin.php?op=create\">"._ADD."</a> | <a href=\"admin.php?op=polledit&pollID=$pollID\">"._EDIT."</a> ]</center>";
}
return(1);
}
?>
I am using chatserv's survey block to display the surveys.
I know it's probably a security risk to mix and match codes from different versions, but I was tired of not being able to find a solution to this.
violated New Member Joined: Jan 25, 2006 Posts: 1
Posted:
Wed Jan 25, 2006 11:18 pm
has anyone found a fix for this problem yet? i've tried every suggested solution (on 7.6 patched and unpatched) and with all of them everytime i try to create a new poll i get a blank page.
montego Site Admin Joined: Aug 29, 2004 Posts: 9136 Location: Arizona
Posted:
Sun Oct 08, 2006 2:18 pm
Turns out that the apostrophe's issue was addressed in the 3.2b/3.3 patchset from Chatserv. You can simply replace modules/Survey/admin/index.php with the patch version and it seems to work fine.
pmaryan Regular Joined: Oct 06, 2005 Posts: 76
Posted:
Mon Dec 04, 2006 11:52 am
Quote: Turns out that the apostrophe's issue was addressed in the 3.2b/3.3 patchset from Chatserv. You can simply replace modules/Survey/admin/index.php with the patch version and it seems to work fine.
Well seeing as this bug still exists within the *current* release available to download off this site, where do I go about finding this to fix my new site.
Any reason why raven doesn't roll fixes up into a fix pack? Or is the newest version around the corner....
Raven Site Admin/Owner Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Mon Dec 04, 2006 12:18 pm
I am really only supporting RavenNuke as far as fixes go. Version 2.10.00 has been postponed until the first of the year because we found so many things that have never work correctly and some, not at all. We have been cleaning up code, the themes, incorporating replacement modules, etc. And, other than Forums, we have been removing all the Notices and Warnings that get suppressed but slow down your site. I just have always felt that users are perfectly able to make corrections after the fact. We shouldn't have to do everything
pmaryan Regular Joined: Oct 06, 2005 Posts: 76
Posted:
Mon Dec 04, 2006 1:45 pm
Completely understandable, as your only making money off of hosting and donations.
Any ideas about what finally solves this posting a new survey causes it to refresh to a blank window?
If it is the 3.2b/3.3, where can I obtain that to put it up to my site, as it still has the default survey...
thx for your work!
montego Site Admin Joined: Aug 29, 2004 Posts: 9136 Location: Arizona
Posted:
Tue Dec 05, 2006 6:23 am
pmaryan , the official PHP-Nuke patches are made available through Make sure you back up your files first and I would recommend only applying the few Survey related files (block and module) rather than the whole thing, as you want to first ensure that it fixes the Survey problem.
pmaryan Regular Joined: Oct 06, 2005 Posts: 76
Posted:
Tue Dec 05, 2006 8:41 am
Giddy up!
Goto page Previous 1 , 2
View next topic
View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum