<?php //session_start();?>
<?php include('../_cfg/config.php');?>
<?php include('php_gene1.php'); ?>
<?php //include('php_session.php');?>

<?php $orient=$_POST['orient']; ?>
<?php $pant=$_POST['pant']; ?>
<?php $regis=$_POST['regis']; ?>
<?php $email=$_POST['email']; ?>
<?php $wsapp=$_POST['wsapp']; ?>
<?php $codigo=$_POST['codigo']; ?>
<?php $clave=$_POST['clave']; ?>
<?php $orient=$_POST['orient']; ?>

<?php //foreach($_POST as $campo => $valor){${$campo}=$valor;} ?>

<?php
$xfontsize=12;
if($orient=='V'){$xfontsize=48;}

if(empty($regis) or $regis=='undefined'){$regis='registra';}
if(empty($email) or $email=='undefined'){$email='';}
if(empty($clave) or $clave=='undefined'){$clave='';}
?>


<?php ob_start(); ?>
<resultado>
<pant1>
<!-- <script src='https://www.google.com/recaptcha/api.js'></script> -->
<br>	
<div width="100%" style="" align="center">
<?php if($mobile=='true'){?>	
<br>
<?php } ?>
<?php $classtab='filtro'; ?>
<?php $classcol=$classtab.'_coligua'; ?>
<table id="filtro" cellspacing="0" cellpadding="2" width="100%"  border="0" align="center" class="<?php echo $classtab?>"
			style="font-size:<?php echo $xfontsize; ?>px;border-collapse:collapse;  ">
	<tr align="center">
	<td width="10%">
		<?php $pidtxt='f_nuevo';  $pcaption='REGISTRAR'; $psize=$xfontsize;
		$ponclick='{window.open("?regis=registra&","_self")}';
		include('vrbutton.php'); ?>
	</td>
	<td width="10%">
		<?php $pidtxt='f_confirmar';  $pcaption='CONFIRMAR'; $psize=$xfontsize;
		$ponclick='regi_user("confirma")';
		include('vrbutton.php'); ?>
	</td>
	<td width="10%">
		<?php $pidtxt='f_restaurar';  $pcaption='RESTAURAR'; $psize=$xfontsize;
		$ponclick='{window.open("?regis=restaura&","_self")}';
		include('vrbutton.php'); ?>
	</td>
    
  <?php if($cfg_empr=='demo'){ ?>
	<td width="10%">
		<?php $pidtxt='f_nuevo';  $pcaption='WhatsApp'; $psize=$xfontsize;
		$ponclick='regi_user("whatsapp")';
// 		include('vrbutton.php'); ?>
	</td>
  <?php } ?>
    
	<?php if($orient=='H'){?>
	<td width="90%"></td>
	<?php } ?>
	</tr>
</table>	
<?php if($mobile=='true'){?>	
<br>
<?php } ?>
</div>
<hr>
	
<div style="scroll:auto;">
	
<?php if($orient=='H'){?>		
<table id="tpant0" cellpadding="2" width="40%" align="left" border="0"
			style="font-size:<?php echo $xfontsize; ?>px;border-collapse:collapse;  ">
    <tr>
      <?php $pidtxt='email'; $pcaption='e-mail'; $plong=20; $pobj=3; $pdefa=$email; $psize=$xfontsize; include('vrgettxt.php'); ?>
		  <?php //if($regis=='whatsapp'){?>
      <?php //$pidtxt='usuario'; $pcaption='WhatsApp'; $plong=15; $pobj=3; $pdefa=$email; $psize=$xfontsize; include('vrgetnum.php'); ?>
		  <?php //} ?>  
    </tr>
 		<tr>
		<?php //if($regis=='registra'){?>
		<?php if($regis=='registra' or $regis=='registra2'){?>
		<?php $pidtxt='clave'; $pcaption='clave'; $plong=10; $pobj=3; $ppass=1; $psize=$xfontsize; include('vrgettxt.php'); ?>
		<?php } ?>  
		<?php if($regis=='confirma'){?>
		<?php $pidtxt='clave'; $pcaption='codigo'; $plong=6;  $pobj=3; $pdefa=$clave; $psize=$xfontsize; $ptitle='Código de Confirmación'; include('vrgetnum.php'); ?>
		<?php } ?>  
		<?php if($regis=='restaura'){?>
		<?php $pidtxt='clave'; $pcaption='Nueva Clave'; $plong=10; $pobj=3; $ppass=1; $psize=$xfontsize; include('vrgettxt.php'); ?>
		<?php //$pidtxt='codigo'; $pcaption='codigo'; $plong=6;  $pobj=3; $pdefa=$restaura; $psize=$xfontsize; $ptitle='Código de Confirmación'; include('vrgetnum.php'); ?>
		<?php } ?>  
		</tr>

		<tr style="<?php if($regis=='confirma'){echo 'display:none;';} ?>">
      <td></td>
      <td>
        <div id='recaptcha' style="transform:scale(1);-webkit-transform:scale(1);">
      </td>
    </tr>
		<tr>
			<td></td>
			<td align="center" colspan="1">
			<?php if($regis=='registra'){?>
			<?php $pcaption='Registrarse'; $psize=$xfontsize;
					$ponclick="regi_user('registra','email','clave');";
					include('vrbutton.php');?>
			<?php } ?>
			<?php if($regis=='confirma'){?>
			<?php $pcaption='Confirmar'; $psize=$xfontsize;
					$ponclick="regi_user('confirma','email','clave');";
					include('vrbutton.php');?>
			<?php } ?>
			<?php if($regis=='restaura'){?>
			<?php $pcaption='Restaurar Clave'; $psize=$xfontsize;
					$ponclick="regi_user('restaura','email','clave');";
					include('vrbutton.php');?>
			<?php } ?>
			</td>
		</tr>
</table>
<?php } ?>

<?php if($orient=='V'){?>		
<form>
	
<table id="tpant0" cellpadding="2" width="90%" align="center" border="0"
			style="font-size:<?php echo $xfontsize; ?>px;border-collapse:collapse;  ">
		<tr><td><br></td></tr>
    <tr>
      <?php $pidtxt='email'; $pcaption='e-mail'; $plong=18; $pobj=2; $pdefa=$email; $psize=$xfontsize+18; include('vrgettxt.php'); ?>
    </tr>
		<tr><td><br></td></tr>
 		<tr>
		<?php if($regis=='registra'){?>
		<?php $pidtxt='clave'; $pcaption='clave';  $plong=18; $pobj=2; $ppass=1; $psize=$xfontsize+18; include('vrgettxt.php'); ?>
		<?php } ?>  
		<?php if($regis=='confirma'){?>
		<?php $pidtxt='codigo'; $pcaption='codigo';  $plong=6;  $pobj=2; $pdefa=$confirma; $psize=$xfontsize+18; include('vrgetnum.php'); ?>
		<?php } ?>  
		<?php if($regis=='restaura'){?>
		<?php $pidtxt='clave'; $pcaption='Nueva Clave'; $plong=10; $pobj=2; $ppass=1; $psize=$xfontsize+18; include('vrgettxt.php'); ?>
		<?php //$pidtxt='codigo'; $pcaption='codigo'; $plong=6;  $pobj=2; $pdefa=$restaura; $psize=$xfontsize+18; include('vrgetnum.php'); ?>
		<?php } ?>  
		</tr>
		<tr><td><br></td></tr>

		<tr style="<?php if($regis=='confirma'){echo 'display:none;';} ?>">
    	  <td align="center" height="200px" colspan="2">
				<div id='recaptcha' style="transform:scale(2.5);-webkit-transform:scale(2.5); padding:0px;" >
      	</td>
    </tr>
		<tr><td><br></td></tr>
		<tr>
			<td align="left">
			<?php if($regis=='registra'){?>
			<?php $pcaption='Registrarse'; $psize=$xfontsize+24;
					$ponclick="regi_user('registra','email','clave');";
				include('vrbutton.php');?>
			<?php } ?>
			<?php if($regis=='confirma'){?>
			<?php $pcaption='Confirmar'; $psize=$xfontsize+24;
					$ponclick="regi_user('confirma','email','clave');";
				include('vrbutton.php');?>
			<?php } ?>
			<?php if($regis=='restaura'){?>
			<?php $pcaption='Restaurar Clave'; $psize=$xfontsize+24; 
					$ponclick="regi_user('restaura','email','clave');";
				include('vrbutton.php');?>
			<?php } ?>
			</td>
		</tr>
</table>

</form>	
	
<?php } ?>
</div>	
	

<pant2>
<?php 
	if($regis!='' and $email!='' and $clave!='') 
	{echo regi_user($regis,$email,$clave);}
?>
</pant2>
	
	
</pant1>	

<?php ?>
</resultado>

<?php $obstart = ob_get_clean(); ?>
<?php $obstart = alltrim($obstart) ?>
<?php echo $obstart;	?>

		

