<?php

define('_IN_JOHNCMS', 1);
$textl='Bo`shatish';
require_once("../incfiles/core.php");
require_once("../incfiles/head.php");
require_once("manfunc.php");
if($rights>=7 || $id==$club_id){$q=mysql_query("select * from fman_clubs where id=$id;");
$a=mysql_fetch_array($q);

if($a[u8]>($realtime-604800) && $rights<7)echo"<div class='menu'>Diqqat! O`zingiz 7 kundan kam menejer bo`lgan jamoadan bo`shash taqiqlanadi. Agar asosli sabab bo`lsa bu haqda adminstratorga yozing.</div>"; else{
if(!$_GET[yes]){
echo"<div class='menu'>Bo`shashga ishonchingiz komilmi? Bu qaror so`nggi qaror va uni o`zgartirish mumkin emas!</div>
<div class='menu'><a href='uvol.php?id=$id&amp;yes=yes'>Ha</a> | <a href='club.php?id=$id'>Yo`q</a></div>";}else{
if($id==$club_id || $rights>=7){
mysql_query("update fman_clubs set user_id=0 where id=$id");

mysql_query("update fman_players set forma=6, ust=6, nast=6, u=0, vyn=0, drib=0, pas=0, ig=0, otb=0, priem=0, f=0, toch=0, gk=0, ball=0 where team_id=$a[id] and (trans!=1 or zarplat=0)");
$qu=mysql_query("select * from users where id=$a[user_id];");
$udata=mysql_fetch_array($qu);
$wtext='<a href="club.php?id='.$id.'">'.$a[name].'</a> jamoasi menejeri <a href="/users/profile.php?user='.$a[user_id].'">'.$udata[name].'</a> jamoa murabbiyligidan ketdi.';
if($id!=$club_id)$wtext.="<br/>Bo`shatdi: $login";
mysql_query("insert into fman_news set time=$realtime, pl_id=0, club_id=0, text='$wtext'");
$wtext='<a href="/club.php?id='.$id.'">'.$a[name].'</a> jamoasi menejeri <a href="/users/profile.php?user='.$a[user_id].'">'.$udata[name].'</a> jamoa murabbiyligidan ketdi.';
if($id!=$club_id)$wtext.='<br/>Bo`shatdi: '.$login;
mysql_query("insert into fman_news set time=$realtime, pl_id=0, club_id=$id, text='$wtext'");
echo"<div class='menu'>Bo`shatish harakati ijobiy bajarildi!";
echo"</div>";}}
echo"<div class='phdr'><a href='index.php'>Futbol menejer</a></div>";}}
require_once("../incfiles/end.php"); ?>