View file sdark.mobi/hiking/cancel.php

File size: 626B
<?php
require_once '../core/system.php';
$header = 'Приглашение в команду';
require_once '../core/head.php';

$req = mysql_query("SELECT * FROM `hik_zay` WHERE `id`  = '".intval($_GET['id'])."' and `kogo` = '".$user['id']."'");
$zayav = mysql_num_rows($req);
if($zayav==0){
	header('Location: /');
	$_SESSION['err'] ='Заявка не найдена'; 
	exit;
	}


mysql_query("DELETE FROM `hik_zay` WHERE `id`  = '".intval($_GET['id'])."' and `kogo` = '".$user['id']."'");
$_SESSION['message'] = 'Приглашение отменено';
header('Location: /');
exit;

require_once '../core/foot.php';
?>