getRaidList($_GET['eid']); $x = $eiddata['x']; $y = $eiddata['y']; for($i = 1; $i <= 6; $i++) ${'t'.$i} = $eiddata['t'.$i]; $FLData = $database->getFLData($eiddata['lid']); //Check if we're editing one of ours raidlists if($FLData['owner'] != $session->uid){ header("Location: build.php?id=39&t=99"); exit; } } if(isset($_POST['action']) == 'editSlot' && isset($_GET['eid']) && !empty($_GET['eid']) && isset($_POST['lid']) && !empty($_POST['lid'])) { $FLData = $database->getFLData($_POST['lid']); if(!empty($_POST['target_id'])){ $Wref = $_POST['target_id']; $WrefCoor = $database->getCoor($Wref); $WrefX = $WrefCoor['x']; $WrefY = $WrefCoor['y']; $type = $database->getVillageType2($Wref); $oasistype = $type; $vdata = $database->getVillage($Wref); }elseif($_POST['x'] != "" && $_POST['y'] != "" && is_numeric($_POST['x']) && is_numeric($_POST['y'])){ $Wref = $database->getVilWref($_POST['x'], $_POST['y']); $WrefX = $_POST['x']; $WrefY = $_POST['y']; $type = $database->getVillageType2($Wref); $oasistype = $type; $vdata = $database->getVillage($Wref); } $troops = 0; for($i = 1; $i <= 6; $i++){ if(!in_array($i + ($session->tribe - 1) * 10, [4, 14, 23])) $troops += $_POST['t'.$i]; } if($_POST['x'] == "" && $_POST['y'] == "" && empty($_POST['target_id'])) $errormsg = "Enter coordinates."; elseif(($_POST['x'] == "" || $_POST['y'] == "") && empty($_POST['target_id'])) $errormsg = "Enter the correct coordinates."; elseif($oasistype == 0 && $vdata == 0) $errormsg = "There is no village on those coordinates."; elseif($troops == 0) $errormsg = "No troops has been selected."; elseif($database->hasBeginnerProtection($Wref) == 1) $errormsg = "Player under protection."; elseif($_POST['target_id'] == $FLData['wref'] || $vdata['wref'] == $FLData['wref']) $errormsg = "You can't attack the same village you're sending troops from."; else { if(!empty($_POST['target_id'])){ $Wref = $_POST['target_id']; $WrefCoor = $database->getCoor($Wref); $WrefX = $WrefCoor['x']; $WrefY = $WrefCoor['y']; }else{ $Wref = $database->getVilWref($_POST['x'], $_POST['y']); $WrefX = $_POST['x']; $WrefY = $_POST['y']; } $coor = $database->getCoor($village->wid); $distance = $database->getDistance($coor['x'], $coor['y'], $WrefX, $WrefY); $database->editSlotFarm($_GET['eid'], $_POST['lid'], $database->getRaidList($_GET['eid'])['lid'], $session->uid, $Wref, $WrefX, $WrefY, $distance, $_POST['t1'], $_POST['t2'], $_POST['t3'], $_POST['t4'], $_POST['t5'], $_POST['t6']); header("Location: build.php?id=39&t=99"); exit; } } ?>

Edit Slot

getRaidList($database->escape($_GET["eid"])); $lid2 = $getlid['lid']; ?>
List name:
Target village: