<?
    
    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 `podval_key` SET
  `key_1` = '._string(_num($_POST['key_1'])).'
 ,`key_2` = '._string(_num($_POST['key_2'])).'
 ,`key_3` = '._string(_num($_POST['key_3'])).'
 ,`key_4` = '._string(_num($_POST['key_4'])).'
 ,`key_5` = '._string(_num($_POST['key_5'])).'
 ,`key_6` = '._string(_num($_POST['key_6'])).'
 ,`key_7` = '._string(_num($_POST['key_7'])).'
 ,`key_8` = '._string(_num($_POST['key_8'])).'
 ,`key_9` = '._string(_num($_POST['key_9'])).'
 ,`key_10` = '._string(_num($_POST['key_10'])).'
 ,`key_11` = '._string(_num($_POST['key_11'])).'
 ,`key_12` = '._string(_num($_POST['key_12'])).'
 ,`key_13` = '._string(_num($_POST['key_13'])).'
 ,`key_14` = '._string(_num($_POST['key_14'])).'
 ,`key_15` = '._string(_num($_POST['key_15'])).'
 ,`key_16` = '._string(_num($_POST['key_16'])).'
 ,`key_17` = '._string(_num($_POST['key_17'])).'
, `boss_1` = '._string(_num($_POST['boss_1'])).'
, `boss_2` = '._string(_num($_POST['boss_2'])).'
, `boss_3` = '._string(_num($_POST['boss_3'])).'
, `boss_4` = '._string(_num($_POST['boss_4'])).'
, `boss_5` = '._string(_num($_POST['boss_5'])).'
, `boss_6` = '._string(_num($_POST['boss_6'])).'
, `boss_7` = '._string(_num($_POST['boss_7'])).'
, `boss_8` = '._string(_num($_POST['boss_8'])).'
, `boss_9` = '._string(_num($_POST['boss_9'])).'
, `boss_10` = '._string(_num($_POST['boss_10'])).'
, `boss_11` = '._string(_num($_POST['boss_11'])).'
, `boss_12` = '._string(_num($_POST['boss_12'])).'
, `boss_13` = '._string(_num($_POST['boss_13'])).'
, `boss_14` = '._string(_num($_POST['boss_14'])).'
, `boss_15` = '._string(_num($_POST['boss_15'])).'
, `boss_16` = '._string(_num($_POST['boss_16'])).'
, `boss_17` = '._string(_num($_POST['boss_17'])).'


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






<table style='width:100%;'><tr><td style="width: 33%;" > 

    <?  
for($h = 1; $h <= 17; $h++) {
       ?> 
        


					Босс <?=$h?>:
					<br/>
					<input class='text medium-text' style="width: 45%;" name='boss_<?=$h?>' value='<?=$cl['boss_'.$h.'']?>'/> 
					<br/>
				
	
<? } ?>

</td>
<td style='width:33%;' >
    
        <?  
for($h = 1; $h <= 17; $h++) {
       ?> 
        



					Ключи босса <?=$h?>:
					<br/>
					<input class='text medium-text' style="width: 45%;" name='key_<?=$h?>' value='<?=$cl['key_'.$h.'']?>'/> 
	<br/>
<? } ?>
    
      </td></tr></table>


					<br/>
					
					
					<span class="btn_start">
<span class="btn_end"><input class="btn" type='submit' name='submit' value='изменить' /></span></span>
				</form>
			</div>
		<?
		include ''.$_SERVER['DOCUMENT_ROOT'].'/system/f.php';
	break;
?>