Update 5.tpl

This commit is contained in:
Shadow
2014-02-11 13:13:28 +02:00
parent e43de8face
commit 3293b6f94d
-38
View File
@@ -1,19 +1,5 @@
<?php
include("Templates/Plus/pmenu.tpl");
if(!empty($_GET['gold'])) {
$gold =$_GET['gold'];
$user = $_GET['user'];
$q= mysql_query("update ".TB_PREFIX."users set gold=gold+$R_GOLD where id=$id");
mysql_query($q);
$q= mysql_query("update ".TB_PREFIX."users set reflink=0 where id=$user");
mysql_query($q);
}
?>
<h2>Invite friends and receive free Gold</h2>
@@ -45,13 +31,6 @@ include("Templates/Plus/pmenu.tpl");
<tr>
<th colspan="6">Players brought in</th>
</tr>
<!-- Fix Reference Link -->
<?php
mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
mysql_select_db(SQL_DB);
$query = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE reflink = ".$id."");
$row = mysql_num_rows($query);
?>
<tr>
<td>UID</td>
@@ -60,15 +39,7 @@ $row = mysql_num_rows($query);
<td>Inhabitants</td>
<td>Villages</td>
<td>Gold</td>
</tr>
<?php
if ($row<>0){
while($reference = mysql_fetch_array($query)){
}
}
?>
</thead>
<tbody>
<?php
@@ -89,15 +60,6 @@ while($reference = mysql_fetch_array($query)){
<td><?php echo $totalpop; ?></td>
<td><?php echo count($varray); ?></td>
<td> <?php
if ($villaggi >= ACTIVATE4){ ?>
<a href="?id=<?php echo $id; ?>&gold=true&user=<?php echo $reference['id']; ?>"><img src="../img/admin/gold.gif"></a>
<?php
}else{ ?>
<img src="../img/admin/gold_g.gif">
<?php
} ?> </td>
</tr>
<?php
}}else{