mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-22 02:57:14 +00:00
update: now player cannot delete link of another player
This commit is contained in:
@@ -2907,13 +2907,11 @@
|
|||||||
function getLinks($id){
|
function getLinks($id){
|
||||||
$q = 'SELECT * FROM `' . TB_PREFIX . 'links` WHERE `userid` = ' . $id . ' ORDER BY `pos` ASC';
|
$q = 'SELECT * FROM `' . TB_PREFIX . 'links` WHERE `userid` = ' . $id . ' ORDER BY `pos` ASC';
|
||||||
return mysql_query($q, $this->connection);
|
return mysql_query($q, $this->connection);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeLinks($id){
|
function removeLinks($id,$uid){
|
||||||
$q = "DELETE FROM " . TB_PREFIX . "links WHERE `id` = ".$id."";
|
$q = "DELETE FROM " . TB_PREFIX . "links WHERE `id` = ".$id." and `userid` = ".$uid."";
|
||||||
return mysql_query($q, $this->connection);
|
return mysql_query($q, $this->connection);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getVilFarmlist($wref){
|
function getVilFarmlist($wref){
|
||||||
@@ -2940,13 +2938,11 @@
|
|||||||
return mysql_query($q, $this->connection);
|
return mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function delSlotFarm($id) {
|
function delSlotFarm($id) {
|
||||||
$q = "DELETE FROM " . TB_PREFIX . "raidlist where id = $id";
|
$q = "DELETE FROM " . TB_PREFIX . "raidlist where id = $id";
|
||||||
return mysql_query($q, $this->connection);
|
return mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function createFarmList($wref, $owner, $name) {
|
function createFarmList($wref, $owner, $name) {
|
||||||
$q = "INSERT INTO " . TB_PREFIX . "farmlist (`wref`, `owner`, `name`) VALUES ('$wref', '$owner', '$name')";
|
$q = "INSERT INTO " . TB_PREFIX . "farmlist (`wref`, `owner`, `name`) VALUES ('$wref', '$owner', '$name')";
|
||||||
return mysql_query($q, $this->connection);
|
return mysql_query($q, $this->connection);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if(isset($_GET['del'])){
|
if(isset($_GET['del'])){
|
||||||
$database->removeLinks($_GET['del']);
|
$database->removeLinks($_GET['del'],$session->uid);
|
||||||
header("Location: spieler.php?s=2");
|
header("Location: spieler.php?s=2");
|
||||||
}
|
}
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user