- Joined
- Dec 12, 2011
- Messages
- 49
- Reaction score
- 2
Hello Ragezone:
where should i put the vote link site e.g (GTOP, MMORG, etc)
im not really good at this..
my dev wont finish the vote system so il try to add it my own..need help guys
Here you can Vote for the Server<br/>
to support and to receive a Gifts.
<br/>
<?php
if(empty($_GET['page'])) $_GET['page'] = 1;
if(isset($_SESSION['user'])) {
odbc_exec($mssql, 'USE [CHARACTER_01_DBF]');
$player = odbc_exec($mssql, 'SELECT * FROM [CHARACTER_TBL] WHERE account=\''.mssql_escape_string($_SESSION['user']).'\' AND isblock=\'F\' ORDER BY playerslot');
if(odbc_num_rows($player) >= 1) {
echo 'Charakter: <form method="post"><select name="character" id="character">';
while($char = odbc_fetch_array($player)) {
echo '<option value="'.$char['m_idPlayer'].'">'.$char['m_szName'].'</option>';
}
echo '</select></form><br/>';
}
}
?>
Available Gifts:<br/><br/>
<div id="availgifts">
<table>
<?php
odbc_exec($mssql, 'USE [WEBSITE_DBF]');
$items = odbc_exec($mssql, 'SELECT * FROM [web_voteitems]');
$page = $_GET['page'];
if(!isset($page)) { $page = 1; }
$perpage = 2;
$resultset = array();
$counter = 0;
while($row = odbc_fetch_array($items)) {
$resultset[$counter++] = $row;
}
$count = odbc_exec($mssql, 'SELECT COUNT(*) as i FROM [web_voteitems]');
$countpages = odbc_result($count, 'i') / $perpage;
for($i = $perpage * ($page-1);$i < $perpage*$page;$i++) {
if(isset($resultset[$i])) {
echo '<tr>
<td style="vertical-align: top;"><img src="./img/vote/'.$resultset[$i]['icon'].'" /></td>
<td valign="top">
<b>'.$resultset[$i]['name'].'</b><br/>
<table><tr><td><img src="img/Shop/price.png" /></td><td>'.$resultset[$i]['price'].' Vote Points</td></tr></table>';
if(isset($_SESSION['user'])) {
echo '<a href="javascript:voteItem('.$resultset[$i]['vitemid'].')">Take it!</a>';
}
echo '</td>
</tr>
<tr><td colspan="2"><br/></td></tr>';
}
}
?>
</table>
<?php
for($i=0; $i < $countpages; $i++) {
$k = $i + 1;
if($page == $k) {
echo '<span id="page"><b>'.$k.'</b></span>';
} else {
echo '<span id="page"><a href="javascript:voteItemsPage('.$k.');">'.$k.'</a></span>';
}
}
echo '</div><br />';
if(isset($_SESSION['user'])) {
odbc_exec($mssql, 'USE [ACCOUNT_DBF]');
$votepoints = odbc_exec($mssql, 'SELECT votepoints FROM [ACCOUNT_TBL] WHERE account=\''.mssql_escape_string($_SESSION['user']).'\'');
echo 'Current Vote Points: <b><span id="currvp">'.odbc_result($votepoints, 'votepoints').'</span></b><br/><br/>';
echo '<span id="takeitem"></span>';
echo '<a href="javascript:voteTab();"><b>Click Here to Vote</b></a>';
} else {
echo '<b>You have to login to be able to vote!</b>';
}
?>
where should i put the vote link site e.g (GTOP, MMORG, etc)
im not really good at this..
my dev wont finish the vote system so il try to add it my own..need help guys
Here you can Vote for the Server<br/>
to support and to receive a Gifts.
<br/>
<?php
if(empty($_GET['page'])) $_GET['page'] = 1;
if(isset($_SESSION['user'])) {
odbc_exec($mssql, 'USE [CHARACTER_01_DBF]');
$player = odbc_exec($mssql, 'SELECT * FROM [CHARACTER_TBL] WHERE account=\''.mssql_escape_string($_SESSION['user']).'\' AND isblock=\'F\' ORDER BY playerslot');
if(odbc_num_rows($player) >= 1) {
echo 'Charakter: <form method="post"><select name="character" id="character">';
while($char = odbc_fetch_array($player)) {
echo '<option value="'.$char['m_idPlayer'].'">'.$char['m_szName'].'</option>';
}
echo '</select></form><br/>';
}
}
?>
Available Gifts:<br/><br/>
<div id="availgifts">
<table>
<?php
odbc_exec($mssql, 'USE [WEBSITE_DBF]');
$items = odbc_exec($mssql, 'SELECT * FROM [web_voteitems]');
$page = $_GET['page'];
if(!isset($page)) { $page = 1; }
$perpage = 2;
$resultset = array();
$counter = 0;
while($row = odbc_fetch_array($items)) {
$resultset[$counter++] = $row;
}
$count = odbc_exec($mssql, 'SELECT COUNT(*) as i FROM [web_voteitems]');
$countpages = odbc_result($count, 'i') / $perpage;
for($i = $perpage * ($page-1);$i < $perpage*$page;$i++) {
if(isset($resultset[$i])) {
echo '<tr>
<td style="vertical-align: top;"><img src="./img/vote/'.$resultset[$i]['icon'].'" /></td>
<td valign="top">
<b>'.$resultset[$i]['name'].'</b><br/>
<table><tr><td><img src="img/Shop/price.png" /></td><td>'.$resultset[$i]['price'].' Vote Points</td></tr></table>';
if(isset($_SESSION['user'])) {
echo '<a href="javascript:voteItem('.$resultset[$i]['vitemid'].')">Take it!</a>';
}
echo '</td>
</tr>
<tr><td colspan="2"><br/></td></tr>';
}
}
?>
</table>
<?php
for($i=0; $i < $countpages; $i++) {
$k = $i + 1;
if($page == $k) {
echo '<span id="page"><b>'.$k.'</b></span>';
} else {
echo '<span id="page"><a href="javascript:voteItemsPage('.$k.');">'.$k.'</a></span>';
}
}
echo '</div><br />';
if(isset($_SESSION['user'])) {
odbc_exec($mssql, 'USE [ACCOUNT_DBF]');
$votepoints = odbc_exec($mssql, 'SELECT votepoints FROM [ACCOUNT_TBL] WHERE account=\''.mssql_escape_string($_SESSION['user']).'\'');
echo 'Current Vote Points: <b><span id="currvp">'.odbc_result($votepoints, 'votepoints').'</span></b><br/><br/>';
echo '<span id="takeitem"></span>';
echo '<a href="javascript:voteTab();"><b>Click Here to Vote</b></a>';
} else {
echo '<b>You have to login to be able to vote!</b>';
}
?>

