1 Attachment(s)
Guest user gives only one vote.How?
I use component for joomla.This component in vote system.And for example one guest user give continuous vote any article(one ip).But I want one guest user give one vote(not 2,3,...votes).
vote.php is this;
PHP Code:
<?php
defined ('_VALID_MOS') or die( 'Direct Access to this location is not allowed.' );
$database->setQuery( "SELECT imgvotes, imgvotesum FROM #__productbook WHERE id = '$id'" );
$result1=$database->query();
list( $imgvotes, $imgvotesum )=mysql_fetch_row( $result1 );
$imgvotes++;
$imgvotesum=$imgvotesum + $imgvote;
$database->setQuery( "UPDATE #__productbook SET imgvotes='$imgvotes', imgvotesum='$imgvotesum' WHERE id=$id" );
$database->query();
echo "<script> alert('".$PRODUBK->PRODUBK_0031."');
document.location.href='".sefRelToAbs("index.php?option=com_productbook&func=detail&Itemid=$Itemid&id=$id")."';</script>";
?>
Note:My english is bad. sorry. And product book component all files is in attachment