<?php

// dati anagrafica
	$rs_ana = $dbo->fetchArray("SELECT ragione_sociale FROM an_anagrafiche  WHERE idanagrafica=\"".$records[0]['idanagrafica']."\"");	
	$ragione_sociale=$rs_ana[0]['ragione_sociale'];


?>

<form action="" method="post" role="form" enctype="multipart/form-data">
	<input type="hidden" name="backto" value="record-edit">
	<input type="hidden" name="op" value="update">
	<input type="hidden" name="id_record" value="<?php echo $id_record ?>">


	<div class="panel panel-<?php echo $_SESSION['profilo_pannello'] ?>">
		<div class="clearfix"></div>
		</br>	
		<div class="col-md-4">				
			<div class="pull-left">		
				<button type="submit" class="btn-app btn-success"><i class="fa fa-check"></i> Salva </button>							
			</div>
		</div>
		<div class="col-md-4">				
			
		</div>
		
		<div class="col-md-4">
			<a  class="btn btn-app btn-info" target="_blank" href="<?php echo $rootdir ?>/editor.php?id_module=2&id_record=<?php echo $records[0]['idanagrafica'] ?>"><i class="fa fa-user"></i>Anagrafica</a>										
		</div>			
		<div class="clearfix"></div>
		
	</div>
	
	<div class="clearfix"></div>

	<!-- DATI -->
	<div class="panel panel-<?php echo $_SESSION['profilo_pannello'] ?>">
		<div class="panel-heading">
			<h3 class="panel-title"><?php echo _("Profilazione Utente") ?></h3>
		</div>
	
		<div class="panel-body">
			<div class="row">
				<div class="col-md-1">
					<?php
					( $records[0]['immagine01'] == '' ) ? $immagine01='' : $immagine01=$rootdir."/files/utenti/".$records[0]['immagine01'];
					?>
					{[ "type": "image", "label": "Profilo", "name": "immagine01", "required": 0, "class": "img-thumbnail", "value": "<?php echo $immagine01 ?>", "extra": "" ]}
				</div>
				<div class="col-md-4">
					{[ "type": "text", "label": "<?php echo _("Utente") ?>", "username": "valore", "required": 0, "class": "",  "value": "$username$", "extra": "readonly" ]}
				</div>
				<div class="col-md-4">
					{[ "type": "text", "label": "<?php echo _("Associazione ") ?>", "username": "valore", "required": 0, "class": "",  "value": "<?php echo $ragione_sociale ?>", "extra": "readonly" ]}
				</div>				
			</div>
			<div class="row">
				<div class="col-md-2">
					{[ "type": "select", "label": "Colore Skin", "name": "profilo_skin", "required": 0, "class": "", "values": "list=\"blue\": \"Blue\", \"red\": \"Red\", \"green\": \"Green\", \"yellow\": \"Yellow\"", "value": "$profilo_skin$", "extra": "" ]}
				</div>
				<div class="col-md-2">
					{[ "type": "select", "label": "Colore Pannello", "name": "profilo_pannello", "required": 0, "class": "", "values": "list=\"primary\": \"Blue\", \"default\": \"Default\", \"success\": \"Success\", \"warning\": \"Warning\",\"danger \": \"Danger \",\"info\": \"Info\"", "value": "$profilo_pannello$", "extra": "" ]}
				</div>
				<div class="col-md-3">				
					{[ "type": "checkbox", "label": "Abilita avvisi", "name": "vedo_avvisi", "required": 0, "class": "", "values": "$vedo_avvisi$", "value": "$vedo_avvisi$", "extra": "", "help": "Consenti la visualizzazioni avvisi in pannello", "placeholder": "ON" ]}				
				</div>
				<div class="col-md-3">				
					{[ "type": "checkbox", "label": "Abilita News", "name": "vedo_news", "required": 0, "class": "", "values": "$vedo_news$", "value": "$vedo_news$", "extra": "", "help": "Consenti la visualizzazioni pannello News", "placeholder": "ON" ]}				
				</div>
			</div>

		</div>
	</div>
	<div class="panel panel-<?php echo $_SESSION['profilo_pannello'] ?>">
		<div class="panel-heading">
			<h3 class="panel-title">Seleziona Pannelli da visualizzare</h3>
		</div>
	
		<div class="panel-body">
			<button type="button" class="btn btn-primary" data-href="<?php echo $rootdir ?>/modules/utenti_profili/add_tipologia.php?idutente=<?php echo $id_record ?>" data-toggle="modal" data-title="Aggiungi Pannello" data-target="#bs-popup"><i class="fa fa-files-o"></i> Aggiungi Pannello</a>
			
			
		</div>
		<div class="panel-body">
			<div class="row">
				<div class="col-md-6">
					<table class="table table-striped table-hover table-condensed">
						<tr>
						<th width='45%'>Pennello</th>
						<th width='20%'>Dimensione</th>						
						<th width='5%'></th>
						</tr>					
						<?php 
							include($docroot."/modules/utenti_profili/row-list.php"); 
						?>
					</table>
				</div>		
			</div>	
		</div>	
	</div>

</form>

