<?
$credits = '50'; //Credits per vote
$votetime = 43200; // 43200 for 12 hours ,86400 for 24 hours
$banner = 'http://'; // Link for banner
$votelink = 'http://'; //Link for vote
//Start voting code
$account = $GLOBALS['mu_user'];
$voted = mssql_fetch_array(mssql_query("SELECT * FROM Vote WHERE account='$account'"));
$del = mssql_query("DELETE FROM Vote WHERE VoteEnd < ".time()."");
if(($_GET['op']=='yes') AND (!$voted))
{
$query = mssql_fetch_array(mssql_query("exec XCredits '".$account."','".$credits."';"));
$sql = mssql_query("INSERT INTO Vote VALUES('$account',".( time() + $votetime ).")");
}
$voteip = mssql_fetch_array(mssql_query("SELECT * FROM Vote WHERE account='$account'"));
if($voteip['VoteEnd'] > time())
{
$voteend = $voteip['VoteEnd'] - time();
echo "You already vote! You can vote after:<br><script src=\"index/clock.js\" type=\"text/javascript\"></script><div id=\"bxx\"></div><script src=\"index/clock.js\" type=\"text/javascript\"></script><div id=\"bxx\"></div><SCRIPT language=\"JavaScript\">pp='$voteend'; pk='1'; pl='$account'; ps=''; t(); </script>"; $error=1;
}
if($error!=1)
{
echo "<a href='?op=yes' OnClick=\"window.open('$votelink')\"><img src='$banner'></a>";
}
/****************************************
End
Coded by Mephisto
Feedback, bug reports at this email -> [[email protected]]
*****************************************/
?>
Трябва ми sql query script-a от тоя php script на mephisto