<?php
#
# Projeto :  Bruno
# Data : 13/11/2014
# 
# ROBO Detalhe
#

    //*******************************************************************	
	// INCLUDES nao alterar a ordem dos includes
    //*******************************************************************	
	include "includes/library.php";
	include "includes/session.php";
 	include("includes/top_comum.php");
	
	//recuperando variaveis da tela
	//-----------------------------------
	$mod = request("mod");
	include $mod .  "/consistencia.php";
	
	
	$last_url = request_session("LAST_URL");
	if ( empty($last_url) ){
			$last_url = "area_usuario.php?$sid_get";
	} 
	
?>
	<div class="row">
					<div class="col-xs-12 col-sm-7 col-md-7 col-lg-7">
						<h1 class="page-title txt-color-blueDark"><i class="fa-fw fa fa-desktop"></i> <?php echo show($modules[$mod]["edit_titulo"]) ?> </h1>
					</div>
    </div>
	<div class="row">
		<?php include("includes/mensagem_erro.php");?>
	</div>
	<form name="formfields" action="robo_editar.php" method="post" onsubmit="return consiste(this)" class="form-horizontal" role="form">
	<div id="row">
	<center>
	<?php if (is_allowed(request_session("USER_NIVEL"), request("mod"), "edit")){ ?>
			<input type="submit" value="salvar registro" class="btn btn-primary btn-lg" onclick="javascript:this.disabled = 'disabled';this.form.submit();">
	<?php } ?>        
	        <input type="button" value="cancelar" onclick="javascript:this.disabled='disabled';document.location='<?php echo $last_url?>';" class="btn btn-lg">
	</center>
	</div>
	<br>	
	<?php echo $sid_post?>
	
	<input type="hidden" name="mod" value="<?php echo request("mod")?>">
	<input type="hidden" name="key" value="<?php echo request("key")?>">
	<input type="hidden" name="action" value="edit">
	

    <?php
			//aqui é onde irá o form de acordo com o design personalizado
			$mode = "edit";
			include $mod . "/form.php";
	?>

	<div id="row">
	<center>
	<?php if (is_allowed(request_session("USER_NIVEL"), request("mod"), "edit")){ ?>
			<input type="submit" value="salvar registro" class="btn btn-primary btn-lg" onclick="javascript:this.disabled = 'disabled';this.form.submit();">
	<?php } ?>        
	        <input type="button" value="cancelar" onclick="javascript:this.disabled='disabled';document.location='<?php echo $last_url?>';" class="btn btn-lg">
	</center>
	</div>		
	</form>
	
<?php 	include("includes/bottom_comum.php"); ?>