<![CDATA[ Support/Comments for Polls Module - My Forums]]> https://forums.modx.com/thread/?thread=48848 <![CDATA[sql injection vulnerability]]> https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283559
$results = $modx->db->select('*', $iptable, 'ipaddress=\'' . $useraddy . '\' AND pollid=' . mysql_escape_string($_POST['poll_pollid']), '');
...
$sql = "UPDATE " . $polltable . " SET votes=votes+1 WHERE id=" . mysql_escape_string($_POST['poll_pollid']) . ";";
$modx->db->query($sql);
$sql = "UPDATE " . $choicetable . " SET votes=votes+1 WHERE id=" . mysql_escape_string($_POST['poll_choice_id']) . ";";
$modx->db->query($sql);


better yet is to add an is_numeric check for both these variables before reaching the DB insertion point]]>
stevs May 16, 2011, 10:29 AM https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283559
<![CDATA[Re: Support/Comments for Polls Module]]> https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283558 Quote from: PaulGregory at Aug 21, 2006, 05:54 PM

  • No need to pass through ID, it picks up the most recent one
I was wondering if there was a way to do this?]]>
jsor Sep 06, 2010, 04:25 AM https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283558
<![CDATA[Re: Support/Comments for Polls Module - votes not logged]]> https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283557 Quote from: jj0101 at Jan 05, 2010, 03:36 PM

Hi all

I have added the 2 snippets and module which all look fine, however the when I vote, it doesn’t log it (ie the module still shows zero votes).

I am using the basic call from the documentation: [!pollvote? &pollid=`1` &redirect=`1` &onevote=true &ovmessage=`You can only vote once` &resultsbutton=true!] and have setup a poll with id = 1.

If anyone has any ideas I would appreciate it!

Thanks.

jj0101 are You still interested in solving Your problem ?

I had the some problem. You have to use &useip=true and &onevote=true together. Then ip numbers will be added to the table in mysql base.


]]>
Szakul Jul 08, 2010, 03:52 PM https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283557
<![CDATA[Re: Support/Comments for Polls Module - votes not logged]]> https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283556
I have added the 2 snippets and module which all look fine, however the when I vote, it doesn’t log it (ie the module still shows zero votes).

I am using the basic call from the documentation: [!pollvote? &pollid=`1` &redirect=`1` &onevote=true &ovmessage=`You can only vote once` &resultsbutton=true!] and have setup a poll with id = 1.

If anyone has any ideas I would appreciate it!

Thanks.


]]>
jj0101 Jan 05, 2010, 09:36 AM https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283556
<![CDATA[Polls Module: Anyone Have Live Example?]]> https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283555
Any examples or anyone advise staying away from this particular module? Would like to use it and can see the time and effort Garry has put into support and updates (which has been great), altho I’m noting not a lot of posting here all around lately... hmm... undecided

TYVM - any advice/help appreciated!]]>
oldwebdude Apr 29, 2009, 01:26 PM https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283555
<![CDATA[Re: Support/Comments for Polls Module]]> https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283554
where i can see IPs who voted?
In my BD i cant`s see this info...]]>
lastoftheromans Apr 03, 2009, 04:51 AM https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283554
<![CDATA[Re: Support/Comments for Polls Module]]> https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283553 pollmanager_module.txt

<script language="JavaScript" type="text/javascript">
function postForm(opcode){
document.module.opcode.value=opcode;
document.module.submit();
// the closing curly brace is missed
}
</script>
]]>
Sedgar Dec 24, 2008, 08:00 AM https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283553
<![CDATA[Re: Support/Comments for Polls Module]]> https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283552 thanks in advance.]]> fazzz Jul 10, 2008, 08:29 AM https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283552 <![CDATA[Re: Support/Comments for Polls Module]]> https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283551
Hope that helps,
Taff]]>
Taff Jan 08, 2008, 06:26 AM https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283551
<![CDATA[Re: Support/Comments for Polls Module]]> https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283550
I’d like to know if its possible to customise this module so that only members are allowed to vote? How would one go about setting this up?

thanks

R]]>
richardjj Jan 07, 2008, 01:27 PM https://forums.modx.com/thread/48848/support-comments-for-polls-module?page=5#dis-post-283550