[Release] PHP Vote Reward System

04/26/2015 00:01 Hazious#1
!important Alright guys I've fixed all the issues that i know of please let me know if you find any more.

Well here is an epic release for elitepvpers I've spent a few hours coding this so I really hope you guys enjoy it.

So what does this PHP Vote Reward System do well if you know Shaiya Invasions Shaiya Vote Reward system well this is almost a complete copy players don't get the points until they click the link back to the website from the vote site.

Also FYI this script can't be exploited by players since it checks if the player has voted with the same ip then just uses the info from that.

Credits to Nubness from Shaiya Invasion for the Vote Images some html and css thank you very much and Thank you abrasive for the function that protects people from sql injection.

For this release to work you need to create a new Database and call is PS_Website

Then execute this Query to add the required table to the database
PHP Code:
USE [PS_Website]
GO

/****** Object:  Table [dbo].[votes]    Script Date: 4/25/2015 9:41:43 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE 
[dbo].[votes](
    [
ID] [intIDENTITY(1,1NOT NULL,
    [
UserID] [varchar](maxNOT NULL,
    [
UserIp] [varchar](maxNOT NULL,
    [
topDate] [datetimeNULL,
    [
topLink] [varchar](maxNULL,
    [
xtremeDate] [datetimeNULL,
    [
xtremeLink] [varchar](maxNULL,
    [
oxigenDate] [datetimeNULL,
    [
oxigenLink] [varchar](maxNULL
ON [PRIMARYTEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO 
Then just edit the vote.php with your database information and set your vote links.

Then edit includeVote.php with your reward_points for each vote.

Now you need to include this file in your index page for your website.
PHP Code:
include 'includes/includeVote.php'
note you need to add your website vote links to all the vote sites you will need them in this format

if you can't get this working then idk lol but yea it's not hard to work it out just read through it.

please read urlsetup.txt

Here is a test link
[Only registered and activated users can see links. Click Here To Register...]

To use the demo you will need to be registered with Eleaf Shaiya.
04/26/2015 00:13 Hazious#2
Replace index.php with

Code:
<?php
include 'includes/db.php';
include 'includes/includeVote.php';
?>
Redirecting....<meta http-equiv="refresh" content="3;url=login.php">
04/26/2015 00:33 Cansas59#3
you have a script to create the table?
04/26/2015 14:31 _Diavolino_#4
Hello,
what does it means ?
Quote:
all the vote sites you will need them in this format
as you present it here ?
PHP Code:
http://topofgames.com/
http://www.shaiyaserver.net/index************top

http://www.xtremetop100.com/
http://www.shaiyaserver.net/index************xtreme

http://www.oxigen-top100.com/
http://www.shaiyaserver.net/index************oxigen 
Or, How ?

Regards ! and Thank You
04/26/2015 15:07 SkuulCandy#5
Thanks but the ip bug (ip by user blocked) is here ?
Regards,
04/26/2015 23:09 Hazious#6
you need to read the urlsetup.txt and replace [Only registered and activated users can see links. Click Here To Register...] with your domain name or server ip.
05/06/2015 13:22 kalib.32#7
Hazious is working on IIS ?
05/06/2015 16:13 Twitch.Tv#8
Quote:
Originally Posted by kalib.32 View Post
Hazious is working on IIS ?
Yes it does work with IIS.
05/07/2015 02:52 Big_#9
any chance you can get this working on MSSQL_connect insted of pdo ?
05/07/2015 11:12 kalib.32#10
Quote:
Originally Posted by Twitch.Tv View Post
Yes it does work with IIS.
Which kind of php version required?
05/07/2015 19:51 _Diavolino_#11
Why are we needed to created the new database ? we could use an exiting one ? (in this case replace in the code php the right name of database)
Regards
05/08/2015 09:43 Hazious#12
Quote:
Originally Posted by _Diavolino_ View Post
Why are we needed to created the new database ? we could use an exiting one ? (in this case replace in the code php the right name of database)
Regards
Well since i have already done this as a project for someone else i already had it setup to use PS_Website but feel free to make any changes that you desire.
05/11/2015 21:18 _Diavolino_#13
Hye,
i got an issue,
i can log in ! i can see the Working way between site and database and table, BUT
just about the referral thing i got
Quote:
Fatal error: Call to a member function prepare() on a non-object in : includes\includeVote.php on line 8
i put the include at start of the page, i was use the link as present in ReadMe :
Quote:
[Only registered and activated users can see links. Click Here To Register...]
could you tell me from where can come this issue ?(without the space)

Kind regards ! and thankyou in advance

and i was verify the driver are well installing :) Mssql Odbc and PDO driver xD
05/12/2015 14:50 Hazious#14
Quote:
Originally Posted by _Diavolino_ View Post
Why are we needed to created the new database ? we could use an exiting one ? (in this case replace in the code php the right name of database)
Regards
Quote:
Originally Posted by _Diavolino_ View Post
Hye,
i got an issue,
i can log in ! i can see the Working way between site and database and table, BUT
just about the referral thing i got

i put the include at start of the page, i was use the link as present in ReadMe :

could you tell me from where can come this issue ?(without the space)

Kind regards ! and thankyou in advance

and i was verify the driver are well installing :) Mssql Odbc and PDO driver xD
Sorry i forgot to include db.php as well as includeVote.php

Code:
<?php
include 'includes/db.php';
include 'includes/includeVote.php';
?>
Redirecting....<meta http-equiv="refresh" content="3;url=login.php">
paste this over the contents of index.php and it should fix the issue.
05/12/2015 20:21 SkuulCandy#15
Code:
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in C:\xampp2\htdocs\ShaiyaVote\includes\db.php:7 Stack trace: #0 C:\xampp2\htdocs\ShaiyaVote\includes\db.php(7): PDO->__construct('sqlsrv:Server=1...', 'my_sql_username', 'my_sql_password') #1 C:\xampp2\htdocs\ShaiyaVote\index.php(2): include('C:\\xampp2\\htdoc...') #2 {main} thrown in C:\xampp2\htdocs\ShaiyaVote\includes\db.php on line 7
I have this error. Do not find the PDO Driver :/