Team BlueWater Game Online Tutorial's
Bine ati venit la Team-BlueWater!!Tutorial's 4 all Games!

[Release] Vote for site win credits

Go down

[Release] Vote for site win credits

Post  m4s4cru on Tue Aug 02, 2011 11:01 am

Put thise in your Sql Quarety:

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vote_credits]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[vote_credits]

CREATE TABLE [dbo].[vote_credits] (
 [account] [varchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
 [time] [bigint] NOT NULL

Then make a new file .php in your website in folder modules "vote.php"
Put thise code inside:


if (isset($_SESSION['user'])){
$account_id = stripslashes($_SESSION['user']);
$account_id = clean_var($account_id);
$id = (int)$_GET['id'];
$credits = '10'; // how much credits to give
$link = ' '; // edit this [Linka for vote]
echo "
<form method='post' action='' >
<table class='sort-table' width='350' border='0' cellspacing='0' cellpadding='0' align='center'>         
<tr><td> Vote for us and win credits </td></tr>

- Enter the code and vote for us.

- For every vote you will win $credits.

- You can vote only one time for 12 hours.
<tr><td> </td></tr>

$time = time();
$timeup = $time - 43200;
$query = mssql_query("SELECT * from vote_credits WHERE account='$account_id' and time>'$timeup'");
$check = mssql_num_rows($query);
if ($check == "0") {
$insert = mssql_query("INSERT INTO vote_credits (account, time) VALUES ('$account_id','$time')");
$update = mssql_query("Update MEMB_CREDITS set credits = credits+$credits WHERE memb___id='$account_id'");
echo "<meta http-equiv=\"refresh\" content=\"0;url=$link\" />";
echo "
<table class='sort-table' width='350' border='0' cellspacing='0' cellpadding='0' align='center'>         
<tr><td><font color=red>Вече сте гласували за последните 24 часа.</font></td></tr>
else {
echo "<table class='sort-table' width='450' border='0' cellpadding='0' cellspacing='0' align='center'><tr><td> </td></tr><tr><td class='center'><a href='$link' target='_blank'>Please Vote For Us</a></td></tr><tr><td> </td></tr></table>
To test it use thise:
[You must be registered and logged in to see this link.]

Mesaje : 172
Data de inscriere : 2011-07-29
Varsta : 26

View user profile

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum