<?
    
    include ''.$_SERVER['DOCUMENT_ROOT'].'/system/common.php';
    
 include ''.$_SERVER['DOCUMENT_ROOT'].'/system/functions.php';
        
      include ''.$_SERVER['DOCUMENT_ROOT'].'/system/user.php';
    
if(!$user OR $user['access'] < 3) {

  header('location: /');
    
exit;

}



    $title = 'Редактирование клана';    

include ''.$_SERVER['DOCUMENT_ROOT'].'/system/h.php';

	$id = _string(_num($_GET['id']));
		if(isset($_GET['yes'])){
		echo _string($_POST['login']);
			mysql_query('UPDATE `clans` SET `name` = \''._string($_POST['name']).'\', `s` = '._string(_num($_POST['s'])).', `g` = '._string(_num($_POST['g'])).', `level` = '._string(_num($_POST['level'])).', `exp` = '._string(_num($_POST['exp'])).'



, `built_1` = '._string(_num($_POST['built_1'])).'
, `built_2` = '._string(_num($_POST['built_2'])).'
, `built_3` = '._string(_num($_POST['built_3'])).'
, `built_4` = '._string(_num($_POST['built_4'])).'
, `built_5` = '._string(_num($_POST['built_5'])).'

 WHERE `id` = '.$id.' LIMIT 1');
			header('location: /admc.php?id='.$id.'');
			exit;
		}
		
			$cl = mysql_fetch_array(mysql_query('SELECT * FROM `clans` WHERE `id` = '.$id.' '));
if(!$cl){
header('location: /');
    
exit;}
			?>
			<div class="block_zero center">
				<form action='/admc.php?yes&id=<?=$id?>' method='post'>



			Название банды:
					<br/>
					<input class='text medium-text' type='text' name='name' value='<?=$cl['name']?>'/> 
					<br/>
					Кол-во рублей:
					<br/>
					<input class='text medium-text' name='s' value='<?=$cl['s']?>'/> 
					<br/>
					Кол-во сгущенки:
					<br/>
					<input class='text medium-text' name='g' value='<?=$cl['g']?>'/> 
					<br/>
					Уровень:
					<br/>
					<input class='text medium-text' name='level' value='<?=$cl['level']?>'/> 
					<br/>	
					Опыт:
					<br/>
					<input class='text medium-text' name='exp' value='<?=$cl['exp']?>'/> 
					<br/>	
				Здоровье:
					<br/>
					<input class='text medium-text' name='built_1' value='<?=$cl['built_1']?>'/> 
					<br/>	
				Сила:
					<br/>
					<input class='text medium-text' name='built_2' value='<?=$cl['built_2']?>'/> 
					<br/>	
				Защита:
					<br/>
					<input class='text medium-text' name='built_3' value='<?=$cl['built_3']?>'/> 
					<br/>	
				Опыт :
					<br/>
					<input class='text medium-text' name='built_4' value='<?=$cl['built_4']?>'/> 
					<br/>	

				Опыт банды :
					<br/>
					<input class='text medium-text' name='built_5' value='<?=$cl['built_5']?>'/> 
					<br/>	
					<br/>
<span class='btn'><span class='end'><input class='label' type='submit' name='submit' value='изменить' /></span></span>
				</form>
			</div>
			
	
		
		<?
		
		include ''.$_SERVER['DOCUMENT_ROOT'].'/system/f.php';
	break;


  
?>