ckyshop.co.uk Posted November 20, 2004 Share Posted November 20, 2004 I too get the previously declared database.php......... Quote Thanks for any help/comments. Regards, Lewis Hill Link to comment Share on other sites More sharing options...
Taipa Posted November 25, 2004 Share Posted November 25, 2004 Fatal error: Cannot redeclare pollnewest() (previously declared in /home/taipa/public_html/testshop/includes/boxes/polls.php:6) in /home/taipa/public_html/testshop/includes/boxes/polls.php on line 5 you will have to find the second entry and delete it. It cannot be declaired twice my new version fixes this problem: http://www.oscommerce.com/community/contributions,20 this also has a fix for the security problem if any one find's other bug's would be interested in hearing about it. <{POST_SNAPBACK}> I just installed the latest version (the Oct 19 update)), and I still get this error. Is there something else I need to change/do? Quote Link to comment Share on other sites More sharing options...
Taipa Posted November 25, 2004 Share Posted November 25, 2004 Well, now I'm caught up with everyone else. I installed the Oct 19th version two more times, and on the last time it worked! So yay ^_^ Now I'm where everyone else is, when a user votes, this error comes up: Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/taipa/public_html/testshop/includes/functions/database.php:13) in /home/taipa/public_html/testshop/includes/functions/database.php on line 13 But as you said, the error only happen sometimes. I hit the Back button on my browser and tried to vote again, and it worked perfectly that time. I will keep my eyes on this thread in case a solution is found. ^_^ Quote Link to comment Share on other sites More sharing options...
Guest Posted November 27, 2004 Share Posted November 27, 2004 Begging! :) Look at this: http://www.shopabundle.com/pollbooth.php/op/list The (other polls) PAGE and COLUMN RIGHT...only goes out of whack when (more than one) poll is added. If only one poll is listed...the page is fine. ANY HELP...Please!!!??.. All other pages of the pollbooth work fine...just the link to "other polls". I have to get column right and the page like the rest of the site...soon. Thanks folks!!!!! Here's the code....I'd appreciate if you'd tell me what to put....and where. ----------------------------------------------------------------------------------------------- <?php /* $Id: pollbooth.php,v 2.1.1 2004/04/06 22:29:47 wilt Exp $ The Exchange Project - Community Made Shopping! http://www.theexchangeproject.org Copyright © 2000,2001 The Exchange Project Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/pollbooth.php'); $location = ' : <a href="' . tep_href_link('pollbooth.php', 'op=results', 'NONSSL') . '" class="headerNavigation"> ' . NAVBAR_TITLE_1 . '</a>'; DEFINE('MAX_DISPLAY_NEW_COMMENTS', '5'); if ($HTTP_GET_VARS['action']=='do_comment') { $comment_query_raw = "insert into phesis_comments (pollid, customer_id, name, date, host_name, comment,language_id) values ('" . $HTTP_GET_VARS['pollid'] . "', '" . $customer_id . "', '" . addslashes($HTTP_POST_VARS['comment_name']) . "', now(),'" . $REMOTE_ADDR . "','" . addslashes($HTTP_POST_VARS['comment']) . "','" . $languages_id . "')"; $comment_query = tep_db_query($comment_query_raw); $HTTP_GET_VARS['action'] = ''; $HTTP_GET_VARS['op'] = 'results'; } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="1" cellpadding="1"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_pollbooth.gif', HEADING_TITLE); ?></td> </tr> </table><table><br> <?php if (!isset($HTTP_GET_VARS['op'])) { $HTTP_GET_VARS['op']="list"; } switch ($HTTP_GET_VARS['op']) { case "results": if (isset($HTTP_GET_VARS['pollid'])) { $pollid=$HTTP_GET_VARS['pollid']; } else { $pollid=1; } $poll_query = tep_db_query("SELECT pollid, timeStamp FROM phesis_poll_desc WHERE pollid='".$pollid."'"); $polls = tep_db_fetch_array($poll_query); $title_query = tep_db_query("SELECT optionText from phesis_poll_data where pollid='".$pollid."' and voteid='0' and language_id = '" . $languages_id . "'"); $title = tep_db_fetch_array($title_query); ?> <table align="center"> <tr><td colspan="2" align="center" class="pageHeading"><b><u><br><br><?php echo $title['optionText']?></u></b></td></tr> <tr><td> </td></tr> <?php $query="SELECT SUM(optionCount) AS sum FROM phesis_poll_data WHERE pollid='".$pollid."'"; $result=tep_db_query($query); $polls=tep_db_fetch_array($result); $sum=$polls['sum']; for($i = 1; $i <= 12; $i++) { $query = "SELECT pollid, optiontext, optioncount, voteid FROM phesis_poll_data WHERE (language_id = '" . $languages_id . "') and (pollid='".$pollid."') AND (voteid='".$i."')"; $result=tep_db_query($query);$polls=tep_db_fetch_array($result); $optiontext=$polls['optiontext']; $optioncount=$polls['optioncount']; if ($optiontext) { ?> <tr><td align="right" class="main"> <?php echo $optiontext?></td> <?php if ($sum) { $percent = 100 * $optioncount / $sum; } else { $percent = 0; } ?> <td align="left" class="main"> <?php $percentInt = (int)$percent * 4 * 1; $percent2 = (int)$percent; if ($percent > 0) { ?> <img src="images/leftbar.gif" height="15" width="7" Alt="<?echo $percent2?> %"><img src="images/mainbar.gif" height="15" width="<?echo $percentInt?>" Alt="<?echo $percent2?> %"><img src="images/rightbar.gif" height="15" width="7" Alt="<?echo $percent2?> %"> <?php } else { ?> <img src="images/leftbar.gif" height="15" width="7" Alt="<? echo $percent2?> %"><img src="images/mainbar.gif" height="15" width="3" Alt="<? echo $percent2?> %"><img src="images/rightbar.gif" height="15" width="7" Alt="<? echo $percent2?> %"> <?php } printf(" %.2f%% (%d)", $percent, $optioncount); ?> <?php } } ?><tr><td> </td><td> </td></tr><?php $comments_query_raw = "select * from phesis_comments where pollid = '" . $pollid . "' and language_id = '" . $languages_id . "'"; // $comments_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_NEW_COMMENTS, $comments_query_raw, $comments_numrows); $comments_query = tep_db_query($comments_query_raw); if ($comments_numrows > 0) { ?> <tr><td colspan="2"> </td></tr> <tr><td class="pageheading" colspan="2"><?php echo _COMMENTS_POSTED; ?></td></tr> <?php } if (($comments_numrows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td colspan="2"><br><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $comments_split->display_count($comments_numrows, MAX_DISPLAY_NEW_COMMENTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_COMMENTS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE; ?> <?php echo $comments_split->display_links($comments_numrows, MAX_DISPLAY_NEW_COMMENTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table><table> <?php } while ($comments = tep_db_fetch_array($comments_query)) { if ($comments['customer_id'] != '0') { $name_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '". $comments['customer_id'] . "'"); $name = tep_db_fetch_array($name_query); $comment_name = $name['customers_firstname'] . " " . $name['customers_lastname']; } else { $comment_name = $comments['name']; } $post_details = _COMMENTS_BY . "<u>" . $comment_name . "</u>" . _COMMENTS_ON . $comments['date'] . '<br>'; ?> <tr><td class="main" colspan="2"><b><?php echo $post_details; ?></b></td></tr> <tr><td class="main" colspan="2"><?php echo htmlspecialchars($comments['comment']); ?></td></tr> <?php } if (($comments_numrows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td colspan="2"><br><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $comments_split->display_count($comments_numrows, MAX_DISPLAY_NEW_COMMENTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_COMMENTS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE; ?> <?php echo $comments_split->display_links($comments_numrows, MAX_DISPLAY_NEW_COMMENTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table></td> </tr> <?php } ?><table align="center"> <tr><td colspan="2" align="center"> </td></tr> <tr><td colspan="2" align="center" class="main"><? echo _TOTALVOTES?> = <? echo $sum?></td></tr> <tr><td colspan="2" align="center" class="main">[<a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=comment','NONSSL')?>"><? echo _ADD_COMMENTS?></a> | <a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=vote','NONSSL')?>"><? echo _VOTING?></a> | <a href="<? echo tep_href_link('pollbooth.php','op=list','NONSSL')?>"><?echo _OTHERPOLLS?></a>]</td></tr> </table> <?php break; case 'comment': if (isset($HTTP_GET_VARS['pollid'])) { $pollid=$HTTP_GET_VARS['pollid']; } else { $pollid=1; } $poll_query = tep_db_query("SELECT pollid, timeStamp FROM phesis_poll_desc WHERE pollid='".$pollid."'"); $polls = tep_db_fetch_array($poll_query); $title_query = tep_db_query("select optionText from phesis_poll_data where pollid='".$pollid."' and voteid='0' and language_id = '" . $languages_id . "'"); $title = tep_db_fetch_array($title_query); ?> <?php echo tep_draw_form('poll_comment', tep_href_link('pollbooth.php', 'action=do_comment&pollid=' . $pollid), 'post'); ?> <table> <tr><td colspan="2" align="left" class="pageHeading">>> <u><?echo $title['optionText']?></u><BR><BR></td> <?php if (!$customer_id) { ?> <tr><td class="main"><?php echo _YOURNAME; ?><BR><?php echo tep_draw_input_field('comment_name',''); ?><BR><BR></td></tr> <?php } ?> <tr><td class="main"><?php echo _YOURCOMMENTS; ?><BR><?php echo tep_draw_textarea_field('comment', 'soft', '30', '4', ''); ?></td></tr> <tr><td class="main"><?php echo _THANKSCOMMENTS; ?> <tr><td><BR><BR><?php echo tep_image_submit('button_continue.gif'); ?></td></tr> </table> <?php $nolink = true; break; case 'list': ?> <tr><td colspan="3"> </td></tr> <?php $result=tep_db_query("SELECT pollid, timestamp, voters, poll_type, poll_open FROM phesis_poll_desc ORDER BY timestamp desc"); $row=0; while ($polls=tep_db_fetch_array($result)) { $row++; $id=$polls['pollid']; if (($row / 2) == floor($row / 2)) { ?> <tr class="Payment-even"> <?php } else { ?> <tr class="Payment-odd"> <?php } $title_query = tep_db_query("SELECT optionText from phesis_poll_data where pollid='".$id."' and voteid='0' and language_id = '" . $languages_id . "'"); $title = tep_db_fetch_array($title_query); $fullresults="<a href=\"".tep_href_link('pollbooth.php','op=results&pollid='.$id,'NONSSL')."\">"._POLLRESULTS."</a>"; $result1 = tep_db_query("SELECT sum(optioncount) AS sum FROM phesis_poll_data WHERE pollid='".$id."'"); $poll_sum=tep_db_fetch_array($result1); $sum=$poll_sum['sum']; $query1=tep_db_query("select count(pollid) as comments from phesis_comments where pollid='".$id."' and language_id='".$languages_id."'"); $result1 = tep_db_fetch_array($query1); $comments = $result1['comments']; echo("<table align='center' width='100%' border='1'><tr><td align='center' class=\"main\">".$title['optionText']."</td><td align='center' class=\"main\">".$sum." "._VOTES."</td><td align='center' class=\"main\">".$comments." "._COMMENTS."</td><td align='center' class=\"main\">".$fullresults."</td>"); if ($polls['poll_type']=='0') { echo ("<td align='center' class=\"main\">"._PUBLIC."</td>"); } else { echo ("<td align='center' class=\"main\">"._PRIVATE."</td>"); } if ($polls['poll_open']=='0') { echo ("<td align='center' class=\"main\">"._POLLOPEN."</td>"); } else { echo ("<td align='center' class=\"main\">"._POLLCLOSED."</td>"); } echo("</tr></table>\n"); } break; case "vote": if (isset($HTTP_GET_VARS['pollid'])) { $pollid=$HTTP_GET_VARS['pollid']; } else { $pollid=1; } $poll_query=tep_db_query("select voters from phesis_poll_desc where pollid='".$pollid."'"); $poll_details=tep_db_fetch_array($poll_query); $title_query = tep_db_query("Select optionText from phesis_poll_data where pollid='".$pollid."' and voteid='0' and language_id = '" . $languages_id . "'"); $title = tep_db_fetch_array($title_query); ?> <b><table align="center"><tr><td class="pageHeading">Poll Question: >> <u><?php echo $title['optionText']; ?></u></b></td></center> <table align="center"><BR><BR><td class="main"> <?php $url = tep_href_link('pollbooth.php','op=results&pollid='.$pollid,'NONSSL'); $content = "<input type=\"hidden\" name=\"pollid\" value=\"".$pollid."\">\n"; $content .= "<input type=\"hidden\" name=\"forwarder\" value=\"".$url."\">\n"; for ($i=1;$i<=12;$i++) { $query=tep_db_query("select pollid, optiontext, optioncount, voteid from phesis_poll_data where (pollid='".$pollid."') and (voteid=$i) and (language_id='".$languages_id."')"); if ($result=tep_db_fetch_array($query)) { if ($result['optiontext']) { $content .= "<b><left><input type=\"radio\" name=\"voteid\" value=\"" . $i . "\">" . $result['optiontext'] . "<br><br></center></b>\n"; } } } $content .= "<br><center><input type=\"submit\" value=\""._VOTE."\"></center><br>\n"; $query=tep_db_query("select sum(optioncount) as sum from phesis_poll_data where pollid='".$pollid."'"); if ($result=tep_db_fetch_array($query)) { $sum=$result['sum']; } $content .= "<center>[ <a href=\"".tep_href_link('pollbooth.php','op=results&pollid= . $pollid,'NONSSL') . "\">" . _RESULTS . "</a> | <a href=\"".tep_href_link('pollbooth.php','op=list','NONSSL') . "\">" . _OTHERPOLLS . "</a>" . ]" . "</center>"; $content .= "</br><center>" . $sum . " "._VOTES."</center>\n"; ?> <form name="poll" method="post" action="pollcollect.php"> <?php echo $content; ?> </form> </tr></table> <?php break; } if (!$nolink) { ?> <br><center><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>' . "</center>"; ?> <?php } ?> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"></td><tr><td> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </td> </tr></table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
trashy Posted December 6, 2004 Share Posted December 6, 2004 Well, now I'm caught up with everyone else. I installed the Oct 19th version two more times, and on the last time it worked! So yay ^_^ Now I'm where everyone else is, when a user votes, this error comes up: Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/taipa/public_html/testshop/includes/functions/database.php:13) in /home/taipa/public_html/testshop/includes/functions/database.php on line 13 But as you said, the error only happen sometimes. I hit the Back button on my browser and tried to vote again, and it worked perfectly that time. I will keep my eyes on this thread in case a solution is found. ^_^ <{POST_SNAPBACK}> trashy Seinet Online http://www.seinet-online.com El Tragadero.com http://www.eltragadero.com Hi, I have the same problem, have u found the solution ? Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/virtual/site255/fst/var/www/html/catalog/includes/functions/database.php:13) in /home/virtual/site255/fst/var/www/html/catalog/includes/functions/database.php on line 13 anybody help me. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 8, 2004 Share Posted December 8, 2004 Hi First of all I must say this is a nice forum here. Most of my problems with osC were solved here. But now I feel quite helpless. I too have the problem with the poll contribution. The same database error as described before. Does nobody has a solution for this? Or asked another way, is there anyone who got it working without problems? Thank you so far :thumbsup: Quote Link to comment Share on other sites More sharing options...
Guest Posted December 9, 2004 Share Posted December 9, 2004 Hi I have 2 problems whit this contr 1. When i vote i get blank page on pollcollect.php 2. When you got more then one poll the tables go wicked and i got column_rigth.php under column_left.php And i would like some help on this it?s a good contribution if it works :thumbsup: Quote Link to comment Share on other sites More sharing options...
mittoni Posted January 1, 2005 Share Posted January 1, 2005 I'd say the problem is related to catalog/pollcollect.php -- this file includes the application_top.php and then has a buggy statement at the very bottom of the file: include ('index.php'); index.php would then re-include application_top.php and hence duplicate the connection to tep_db_connect(). I simply replaced the include statement at the bottom of pollcollect.php with the following: header("Location: index.php"); exit; Alternatively you could replace with: header("Location: pollbooth.php?op=results&pollid=".$pollid); exit; OR, if you are using SEF URL's: header("Location: pollbooth.php/op/results/pollid/".$pollid); exit; Personally I hate these types of errors, sure they occur because people aren't perfect but when they are posted to a site like this and 100's of people download them it causes all sorts of problems. Great contribution, valuable etc etc but please if you are an author of this contribution - visit this thread in a few weeks time and upload some of the corrections / suggestions to the contrib database. Quote Link to comment Share on other sites More sharing options...
mittoni Posted January 1, 2005 Share Posted January 1, 2005 I should also have mentioned, one of the older contributions had the following statement instead of the include('index.php'): header("Location: $forwarder"); This takes it back to pollbooth.php to display the results, then the user can click on continue to go back to the page they were on when they voted! Better to use this. Quote Link to comment Share on other sites More sharing options...
IceTheNet Posted January 1, 2005 Share Posted January 1, 2005 Personally I hate these types of errors, sure they occur because people aren't perfect but when they are posted to a site like this and 100's of people download them it causes all sorts of problems. Great contribution, valuable etc etc but please if you are an author of this contribution - visit this thread in a few weeks time and upload some of the corrections / suggestions to the contrib database. <{POST_SNAPBACK}> I did some work on the contribution I read your remarks and will attempt to apply them to future realeases however if you or anyone has time to make repairs to this contribution and make it better you are more than welcome too. I am very busy at the moment I take wacks at it everyonce and while when I have time. or when I can get paid for a long job designing a osc store with this or that contribution I try to improve what is out there if I can and you all can do the same. Thank's for everyone that has taken the time to help others on this board. My first challange with this contribution was to fix the huge security whole. and make it easyier for others to read and install. I am aware of a few bugs and almost got them worked out. should be releasing my version in the next month if I do inded get the time. I will let you know I find alot of the problems come in the second file pollcollect.php it has to do with the include() on the top I alredy have that partially figgured on the new one. Quote Link to comment Share on other sites More sharing options...
trashy Posted January 1, 2005 Share Posted January 1, 2005 I'd say the problem is related to catalog/pollcollect.php -- this file includes the application_top.php and then has a buggy statement at the very bottom of the file: include ('index.php'); index.php would then re-include application_top.php and hence duplicate the connection to tep_db_connect(). I simply replaced the include statement at the bottom of pollcollect.php with the following: header("Location: index.php"); exit; Alternatively you could replace with: header("Location: pollbooth.php?op=results&pollid=".$pollid); exit; OR, if you are using SEF URL's: header("Location: pollbooth.php/op/results/pollid/".$pollid); exit; Personally I hate these types of errors, sure they occur because people aren't perfect but when they are posted to a site like this and 100's of people download them it causes all sorts of problems. Great contribution, valuable etc etc but please if you are an author of this contribution - visit this thread in a few weeks time and upload some of the corrections / suggestions to the contrib database. <{POST_SNAPBACK}> thaks very much i change to : header("Location: pollbooth.php/op/results/pollid/".$pollid); exit; and work fine no more bug i'm happy trash El Tragadero.com Seinet Online Quote Link to comment Share on other sites More sharing options...
mittoni Posted January 1, 2005 Share Posted January 1, 2005 I did some work on the contribution I read your remarks and will attempt to apply them to future realeases however if you or anyone has time to make repairs to this contribution and make it better you are more than welcome too. I am very busy at the moment I take wacks at it everyonce and while when I have time. or when I can get paid for a long job designing a osc store with this or that contribution I try to improve what is out there if I can and you all can do the same. Thank's for everyone that has taken the time to help others on this board. My first challange with this contribution was to fix the huge security whole. and make it easyier for others to read and install. I am aware of a few bugs and almost got them worked out. should be releasing my version in the next month if I do inded get the time. I will let you know I find alot of the problems come in the second file pollcollect.php it has to do with the include() on the top I alredy have that partially figgured on the new one. <{POST_SNAPBACK}> Your contribution is very much appreciated, personally I plan to use it a great deal. I would like to stress again for anyone to post bug reports and solutions to this thread -- this can help you as the author to simply test and incorporate them into a new release in a few weeks or months if they are correct. No need for a new release to be made available fast, just stable :) ... the approach advocated by the main osc team. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 3, 2005 Share Posted January 3, 2005 I can?t post any bugs so far, since it works great for me now. I changed the "include index.php" in pollbooth.php and the pollcollect.php and works fine now. no more php redeclare errors. Thank you for the solution. Keep up the good work. Ciao ToSam Quote Link to comment Share on other sites More sharing options...
ts201 Posted January 5, 2005 Share Posted January 5, 2005 hello, my english is very bad. this is my problem : http://www.north-point.de/shopping/pollbooth.php/op/list the table ist to broadly... why ? Quote Link to comment Share on other sites More sharing options...
bugzmaster Posted January 6, 2005 Share Posted January 6, 2005 hello, i have a new problem after installing the latest version of the contrib. i get 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1 select pollID, voters, timeStamp, poll_type, poll_open from phesis_poll_desc order by pollID asc limit -20, 20 anybody an idea ??? i use xampp ..... !!! thnx for repeating bugzmaster Quote Link to comment Share on other sites More sharing options...
stalkert Posted February 1, 2005 Share Posted February 1, 2005 I think I found a bug. I used the poll in a multilanguage site (french and dutch) and this didn't work quite well. When someone votes in the the dutch section the sum of votes was also updated in the french section (and visa versa). This causes some wrong bars in the graph. I changed the follow line: $query="SELECT SUM(optionCount) AS sum FROM phesis_poll_data WHERE pollid='".$pollid."'"; in $query="SELECT SUM(optionCount) AS sum FROM phesis_poll_data WHERE (language_id = '" . $languages_id . "') and pollid='".$pollid."'"; and it works fine to me. Maybe someone roll in to the same problem Quote Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2005 Share Posted February 2, 2005 Just installed this,, all apears to work fine on the customer side. In the admin side, when I click on "poll manager" i get the poll manager,, and when i click on "Poll Configurator" i get it, but if i try to edit one of the items under the configurator, it takes me over to the poll manager to input a new poll Anyone have a clue? I downloaded the most recent one, dated, oct. 19, 2004 @ http://www.oscommerce.com/community/contributions,20 I am lost, can someone help? Regards Tom Quote Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2005 Share Posted February 2, 2005 Also, upon further investigation, I do notice that when i am in the configurator, and i move my mouse over the mouse button, it does reflect the url, but is not picking up the numbers of the information to pass on, so this is why it drops back to the input poll spot, I just dont know how to fix this. Regards Tom Quote Link to comment Share on other sites More sharing options...
goring_gap Posted February 2, 2005 Share Posted February 2, 2005 Just installed this,, all apears to work fine on the customer side.In the admin side, when I click on "poll manager" i get the poll manager,, and when i click on "Poll Configurator" i get it, but if i try to edit one of the items under the configurator, it takes me over to the poll manager to input a new poll Anyone have a clue? I downloaded the most recent one, dated, oct. 19, 2004 @ http://www.oscommerce.com/community/contributions,20 I am lost, can someone help? Regards Tom <{POST_SNAPBACK}> I get the same - does anyone know what's going on? Cheers Simon Quote Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2005 Share Posted February 2, 2005 Glad to know I am not the only one Simon, ;) At least I know its something wrong with one of the files, or its in some instructions somewhere left a step out. Maybe someone will catch it soon and tell us what to do to fix it. Have a great day Tom Quote Link to comment Share on other sites More sharing options...
shawkes Posted February 3, 2005 Share Posted February 3, 2005 Has anyone found a solution to the page display problem with more than 1 poll on the Other Polls page? I saw that a couple of people reported having the probem, but have not seen a solution. I don't know much about writing code, but have tried hacking at what I thougt I knew. I did not break anything, but did not even come close to fixing it. Sean Quote Link to comment Share on other sites More sharing options...
Guest Posted February 6, 2005 Share Posted February 6, 2005 I'd say the problem is related to catalog/pollcollect.php -- this file includes the application_top.php and then has a buggy statement at the very bottom of the file: include ('index.php'); index.php would then re-include application_top.php and hence duplicate the connection to tep_db_connect(). I simply replaced the include statement at the bottom of pollcollect.php with the following: header("Location: index.php"); exit; Alternatively you could replace with: header("Location: pollbooth.php?op=results&pollid=".$pollid); exit; OR, if you are using SEF URL's: header("Location: pollbooth.php/op/results/pollid/".$pollid); exit; Personally I hate these types of errors, sure they occur because people aren't perfect but when they are posted to a site like this and 100's of people download them it causes all sorts of problems. Great contribution, valuable etc etc but please if you are an author of this contribution - visit this thread in a few weeks time and upload some of the corrections / suggestions to the contrib database. <{POST_SNAPBACK}> Thank You very much.You solved my problem. atatan www.nikahlaniyoruz.com Quote Link to comment Share on other sites More sharing options...
goring_gap Posted February 7, 2005 Share Posted February 7, 2005 Just installed this,, all apears to work fine on the customer side.In the admin side, when I click on "poll manager" i get the poll manager,, and when i click on "Poll Configurator" i get it, but if i try to edit one of the items under the configurator, it takes me over to the poll manager to input a new poll Anyone have a clue? I downloaded the most recent one, dated, oct. 19, 2004 @ http://www.oscommerce.com/community/contributions,20 I am lost, can someone help? Regards Tom <{POST_SNAPBACK}> Hi Tom, The error is at approximately line 227 in admin/polls.php find: $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info', 'x', 'y')) . 'action=edit&cID=' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info', 'x', 'y')) . 'action=confirm&info=' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_POLLBOOTH, 'op=list' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>'); replace with: $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info', 'x', 'y')) . 'action=edit_config' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info', 'x', 'y')) . 'action=confirm&info=' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_POLLBOOTH, 'op=list' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>'); For those interested, the offending section is 'action=edit&cID=' and should be 'action=edit_config' Cheers Simon Quote Link to comment Share on other sites More sharing options...
IceTheNet Posted February 7, 2005 Share Posted February 7, 2005 Hi Tom, The error is at approximately line 227 in admin/polls.php find: $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info', 'x', 'y')) . 'action=edit&cID=' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info', 'x', 'y')) . 'action=confirm&info=' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_POLLBOOTH, 'op=list' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>'); replace with: $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info', 'x', 'y')) . 'action=edit_config' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_POLLS, tep_get_all_get_params(array('action', 'info', 'x', 'y')) . 'action=confirm&info=' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_POLLBOOTH, 'op=list' . $poInfo->pollID, 'NONSSL') . '">' . tep_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>'); For those interested, the offending section is 'action=edit&cID=' and should be 'action=edit_config' Cheers Simon <{POST_SNAPBACK}> thanks I will look into it and update the files thanks for your contributions to the community much appriciated Quote Link to comment Share on other sites More sharing options...
Guest Posted February 7, 2005 Share Posted February 7, 2005 Hi Tom, The error is at approximately line 227 in admin/polls.php ......................... For those interested, the offending section is 'action=edit&cID=' and should be 'action=edit_config' Cheers Simon <{POST_SNAPBACK}> Hey Simon, Thanks bunches for the info, that took care of my problem. Pm me if you are interested in some free banner impressions on my ad server as a thanks for the help. Regards Tom Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.