Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 13:37

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



vote sysetm [help]

Discussion on vote sysetm [help] within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2012
Posts: 33
Received Thanks: 0
vote sysetm [help]

Every time an account votes on my site, all other accounts enter in time to vote again without having voted.

box_votescript.php
Code:
<?php if (!defined('access')) {die("Die gesuchte Ressource wurde entfernt oder umbenannt, oder sie steht vorübergehend nicht zur Verfügung.");} ?>
<?php
if ($_CONFIG['vote_enabled'] AND count($_CONFIG['vote_toplists']) > 0) {
	foreach ($_CONFIG['vote_toplists'] as $intTopListID => $mixedTopListArray) {

		if(isset($_POST['submitVote'.$intTopListID])) {

			$strVoteErrorArray = array();
			$intRecheckIPVotingTime = time() - $mixedTopListArray['timeLimit'];
            $intTimestampOfLastVoteBeforeVote = [MENTION=311501]ODB[/MENTION]c_exec($odbc_connect, 'SELECT TOP 1 [timestamp] FROM [' . $_CONFIG['db_databases']['web'] . '].[dbo].[LOG_VOTE] WHERE [ip] = \'' . $_SERVER['HTTP_CF_CONNECTING_IP'] . '\' AND [account] = \''  . cleanSqlInput($_SESSION['user']) . '\' AND [toplist] = ' . $intTopListID . ' AND [timestamp] > ' . $intRecheckIPVotingTime . ' ORDER BY [id] DESC');
            $intRecheckIP = [MENTION=311501]ODB[/MENTION]c_num_rows($intTimestampOfLastVoteBeforeVote);

			// ACCOUNT
			$intRecheckACCVotingTime = time() - $mixedTopListArray['timeLimit'];
            $intTimestampOfLastVoteBeforeVote = [MENTION=311501]ODB[/MENTION]c_exec($odbc_connect, 'SELECT TOP 1 [timestamp] FROM [' . $_CONFIG['db_databases']['web'] . '].[dbo].[LOG_VOTE] WHERE [account] = \''  . cleanSqlInput($_SESSION['user']) . '\' AND [toplist] = ' . $intTopListID . ' AND [timestamp] > ' . $intRecheckACCVotingTime . ' ORDER BY [id] DESC');
            $intRecheckACC = [MENTION=311501]ODB[/MENTION]c_num_rows($intTimestampOfLastVoteBeforeVote);
			
			if(isSpamming($_POST['inputCheckTimestamp'], $_POST['inputCheckKey'], $_SESSION['inputCheckKey'])) {
				$strVoteErrorArray[] = $_LANG['error_spam'];
			}
			if($intRecheckIP > 0) {
				$strVoteErrorArray[] = $_LANG['error_already_voted'];
			}

			if($intRecheckACC > 0) {
				$strVoteErrorArray[] = $_LANG['error_already_voted'];
			}			

			if(count($strVoteErrorArray) > 0) {
				echo createMessage($strVoteErrorArray, 'fail');
			}
			else {
				if( [MENTION=311501]ODB[/MENTION]c_exec($odbc_connect, '
						INSERT INTO [' . $_CONFIG['db_databases']['web'] . '].[dbo].[LOG_VOTE] (
							[account],
							[ip],
							[toplist],
							[timestamp],
							[character]
						) VALUES (
							\''.cleanSqlInput($_SESSION['user']).'\',
							\''.$_SERVER['HTTP_CF_CONNECTING_IP'].'\',
							'.$intTopListID.',
							'.time().',
							\'\'
						)
					')
				) {
					sleep($_CONFIG['vote_timedelay']);
					if(isset($_SESSION['user'])) {
					 [MENTION=311501]ODB[/MENTION]c_exec($odbc_connect, '
							UPDATE [' . $_CONFIG['db_databases']['acc'] . '].[dbo].[ACCOUNT_TBL]
							SET [votepoints] = [votepoints] + ' . $mixedTopListArray['earnVotePoints'] . '
							WHERE [account] = \'' . cleanSqlInput($_SESSION['user']) . '\'
						');
					}
					echo createMessage($_LANG['success_voting'], 'success');
				}
				else {
					echo createMessage($_LANG['error_no_points_added'], 'fail');
				}
			}
		}



		$intCheckIPVotingTime = time() - $mixedTopListArray['timeLimit'];
		$intTimestampOfLastVote = [MENTION=311501]ODB[/MENTION]c_exec($odbc_connect, '
			SELECT TOP 1 [timestamp]
			FROM 	[' . $_CONFIG['db_databases']['web'] . '].[dbo].[LOG_VOTE]
			WHERE 	[ip] = \'' . $_SERVER['HTTP_CF_CONNECTING_IP'] . '\' AND
					[toplist] = ' . $intTopListID . ' AND
					[timestamp] > ' . $intCheckIPVotingTime . '
			ORDER BY [id] DESC
		');
		$checkIP = [MENTION=311501]ODB[/MENTION]c_num_rows($intTimestampOfLastVote);
		
		if($checkIP < 1) {
			$strVoteButtonText = $mixedTopListArray['name'];
			$strVoteButtonDisabled = '';
			$strVoteButtonOnclick = 'id="voteFormOpener' . $intTopListID . '" onclick="switching(\'voteForm'.$intTopListID.'\');"';
		}
		else {
			$strVoteButtonText = $_LANG['next_vote'] . ' ' . date($_CONFIG['web_date_format']['hours'], $mixedTopListArray['timeLimit'] + [MENTION=311501]ODB[/MENTION]c_result($intTimestampOfLastVote, 'timestamp')) . ' ' . $_LANG['oclock_optional'];
			$strVoteButtonDisabled = 'disabled="disabled"';
			$strVoteButtonOnclick = '';
		}

		echo '<input ' . $strVoteButtonOnclick . ' type="submit" class="p100" value="' . $_LANG['vote_on'] . ' ' . $strVoteButtonText . '" style="margin:2px auto;" ' . $strVoteButtonDisabled . '/>';
		if($checkIP < 1) {
			echo '
			<p id="voteFormWaiting' . $intTopListID . '" class="center" style="display:none; margin-bottom: 15px;">
				' . $_LANG['wait_for_toplists_answer'] . '
				<br /><img src="images/icons/misc/loading.gif" title="' . $_LANG['wait_for_toplists_answer'] . '" alt=""/>
			</p>

			<form method="post" id="voteForm' . $intTopListID . '" style="display:none; margin-bottom: 15px;">
				<input type="hidden" name="inputCheckTimestamp" value="' . time() . '" />
				<input type="hidden" name="inputCheckKey" value="' . random_string() . '" />';
			if(isset($_SESSION['user'])) {echo '
				<p style="margin: 10px 0;" class="x02 right">
					<span class="span">' . $_LANG['you_receive'] . '</span>' . $mixedTopListArray['earnVotePoints'] . ' VPs
				</p>';
			} echo '
				<div>
					<input class="votebutton" style="margin-right: 6px; margin-top: 6px;" type="submit" value="' . $_LANG['button_vote'] . '" name="submitVote' . $intTopListID . '" onclick="openVoteSite(\'' . $mixedTopListArray['link'] . '\'); switching(\'voteForm' . $intTopListID . '\');  switching(\'voteFormWaiting' . $intTopListID . '\'); jQuery(\'#voteFormOpener' . $intTopListID . '\').attr(\'onclick\',\'\').unbind(\'click\');"/>
					<p class="zehn voteNotice">' . $_LANG['voting_additional_information'] . '</p>
				</div>
				<p class="clear"></p>
			</form>';
		}

		$intTopListID++;
	}
} 
else {
	echo createMessage($_LANG['notify_votescript_deactivated'], 'hint');
}
xinc_config.php

Code:
$_CONFIG['vote_enabled'] = true;															
	$_CONFIG['vote_timedelay'] = 20;															
	$_CONFIG['vote_toplists'] = array(															
		0 => array(																				
			'name' => 'Gtop 100',																
			'link' => 'https://gtop100.com/topsites/Flyff/sitedetails/Flyff-Flame-99668?vote=1',								
			'earnVotePoints' => 10,																
			'timeLimit' => 43380																
		),
		

	);
votesystem database
Code:
USE [ACCOUNT_DBF]
GO
 
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_ACCOUNT_TBL_votepoints]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[ACCOUNT_TBL] DROP CONSTRAINT [DF_ACCOUNT_TBL_votepoints]
END
 
GO
 
USE [ACCOUNT_DBF]
GO
 
/****** Object:  Table [dbo].[ACCOUNT_TBL]    Script Date: 08/22/2013 12:07:51 ******/
SET ANSI_NULLS ON
GO
 
SET QUOTED_IDENTIFIER ON
GO
 
SET ANSI_PADDING ON
GO
 
ALTER TABLE [dbo].[ACCOUNT_TBL] ADD
	[votepoints] [int] NOT NULL
GO
 
SET ANSI_PADDING OFF
GO
 
ALTER TABLE [dbo].[ACCOUNT_TBL] ADD  CONSTRAINT [DF_ACCOUNT_TBL_votepoints]  DEFAULT ((0)) FOR [votepoints]
GO
brunoi123 is offline  
Reply


Similar Threads Similar Threads
T> WPE Dupe hack for Vote Hack /Wpe clonar items por vote hack
08/25/2010 - RFO Hacks, Bots, Cheats, Exploits & Guides - 6 Replies
Hello Trade mine WPE dupe hack for Vote hack (Gamepoinst) Tradeo mi WPE dupe hack por Vote Hack Mine msn :[email protected]
[Vote] Vote here plz and tell me ur opinon
12/09/2008 - EO PServer Hosting - 21 Replies
Will People Hate me if i became a Guard ? YES NO
[VOTE]what language do u prefer[VOTE]
01/30/2007 - Conquer Online 2 - 10 Replies
Vote here



All times are GMT +2. The time now is 13:37.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.