<?php session_start();?>

<?php include('../_cfg/config.php');?>
<?php include('php_gene1.php');?>
<?php include('php_session.php');?>
<?php $titulo=$_POST['titulo']; ?>
<?php $titulo2=$_POST['titulo2']; ?>
<?php $mobile=$_POST['mobile']; ?>
<?php $orient=$_POST['orient']; ?>

<?php $_SESSION['user_mobile']=$mobile; ?>
<?php $_SESSION['orient']=$orient; ?>
<?php if(!empty($_POST['screenw'])){$_SESSION['screen_width']=$_POST['screenw'];} ?>
<?php if(!empty($_POST['screenh'])){$_SESSION['screen_height']=$_POST['screenh'];} ?>

<?php
$xfontsize=40;
if($mobile=='true' && $orient=='V'){$xfontsize=60;}
if($mobile=='true' && $orient=='H'){$xfontsize=40;}
?>
<?php $usuario=$_POST['usuario'] ?>

     

<div id='empr' style="display:none"><?php echo trim(strtoupper($cfg_empr)); ?></div>
<div id='loginok' style="display:none"><?php echo $_SESSION['user_codigo'];?></div>

<form>

<?php
$color1=r_fiel('empr',$cfg_empr,'color1');
$color1f=r_fiel('empr',$cfg_empr,'color1f');
if($color1f==''){$color1f='white';}  
?>  
     
<table 
       noprint
       id="top_table"
       border="0"
       style="width:100%;cellspacing:0;cellpadding:0;color:<?php echo $color1f; ?>;font-family:times new roman;"
       >
  <tr id="top_tr" style="" >
      <?php if($_SESSION['user_codigo']!='') {?>      
      <?php if($mobile=='false' ){?>
        <td width="1%" title="<?php echo $cfg_tipo; ?>">
         <?php $pidtxt='btn_main'; $pcaption='⌂'; $pabrev="⌂"; $ptitle="Menu Principal"; $psize=$fsize+24; $ponclick='menu_main();';  include('vrbutton.php'); ?>
        </td>
      <?php } ?>
      <?php } ?>
    
    <td id="top_left" width="" align="center" title="Updt:<?php echo date('d/M/y H:i',strtotime($empr_updated)); ?>">
      <div id="" align="left" style="width:98%;font-size:<?php echo $xfontsize;?>px;border:solid 0px;" onclick="{window.location.href='/';}">
      <?php $logo1='../../_logo/logo'.$cfg_empr.'1.png'; ?>
      <?php if(file_exists($logo1)){?>
          <?php if(mb_stristr('cont.pyme.cele.tfe1',$cfg_tipo)){?>
                  <img id="logo1" src="<?php echo 'https://vcrxol.com/_logo/logo'.$cfg_empr.'1.png';?>" alt=""
                       title="<?php echo $cfg_descri; ?>" style="max-height:15mm; "
                       >		
          <?php } ?>
      <?php }else{ ?>
        <?php echo $cfg_descri; ?>
      <?php } ?>

        <?php if($cfg_tipo=='cong'){?>
        <?php if($_SESSION['cong_codigo']!=''){echo ' '.ucwords(strtolower($_SESSION['cong_descri'])).'';}?>  
        <?php } ?>
      </div>
    </td>
    
    <td id="top_center" width="" align="left" style="font-family:arial;display:;">
      <div id="titulo" style="width:98%;font-size:<?php echo $xfontsize-10;?>px;border:solid 0px;" >
      <?php echo  $titulo; ?>
      </div> 
      <?php if($user_codigo=='' and mb_stristr('gnya.gmny',$cfg_empr) and 1==2){ ?>
      <div align="center" style="font-size:<?php echo $xfontsize-26;?>">
      <?php echo ' Registrate como nuevo usuario y compra todo el año con descuentos ';?>
      <?php echo '<br>'; ?>  
      <?php echo ' Trabaja con nosotros desde casa';?>

      <a href="tel:0959516316" style="font-weight:bolder;float:left;color:white;">Llamar: 0959516316</a>        
      <a href="//wa.me/5930959516316" style="font-weight:bolder;float:right;color:white;"  target="_blank">Whatsapp</a>        
      </div> 
      <?php } ?>
    </td>
    
    <td id="top_right" width="" align="right"  >
      <?php if($mobile=='false'){?>
      <div id="login1" style="width:100%;font-size:<?php echo $xfontsize-20;?>px;border:solid 0px;" >
        <table align="right">
          <tr valign="middle" style="" >
              <?php if($_SESSION['user_codigo']=='') {?>
                    <?php $pidtxt='loguser'; $pcaption='Usuario'; $plong=20; $pdefa=$usuario; include('vrgettxt.php'); ?>
                    <?php $pidtxt='logpass'; $pcaption='Clave'; $plong=15; $ppass=1; $ponclick="login1();"; include('vrgettxt.php'); ?>
                    <td width="">
                    <?php $pidtxt='login'; $pcaption='Iniciar Sesión'; $ponclick="login1();"; include('vrbutton.php'); ?>
                    </td>
                    <td width="">
                    </td>
              <?php } ?>
            
              <?php if($_SESSION['user_codigo']!='') {?>
                      <td width="50%">
                      <?php $pidtxt='userok'; $pcaption=$_SESSION['user_descri']; $ptitle=$_SESSION['user_tipo']; $ponclick="user_dato()"; include('vrbutton.php'); ?>
                      </td>
                      <td width="50%">
                      <?php $pidtxt='logout'; $pcaption='Cerrar Sesión'; $ponclick="logout1();"; include('vrbutton.php'); ?>
                      </td>
              <?php } ?>
          </tr>
          
        </table>
      </div> 
      <?php } ?>
  
  </td>
  </tr>

     
</table>

<table 
       id="top_table2"
       border=0px
       style="width:100%;cellspacing:0;cellpadding:0;color:<?php echo $color1f; ?>;font-family:times new roman;"
       >
  <tr id="top_tr2" style="" >
      <?php if($mobile=='true' && $orient=='V') {?>
            <?php if($_SESSION['user_codigo']=='') {?>
                    <td width="20%">
                    </td>
                    <td width="20%">
                    <?php $pidtxt='login'; $pcaption='Ingresar'; $psize=40;  $ponclick='location.href=\'?scri=user_login\';'; include('vrbutton.php'); ?>                      
                    </td>
            <?php } ?>
      <?php } ?>
      
      
      <?php if($mobile=='true' && $orient=='H') {?>
            <?php if($_SESSION['user_codigo']!='') {?>
                    <td width="20%">
                    <?php $pidtxt='userok'; $pcaption=$_SESSION['user_descri']; $ponclick="user_dato()"; include('vrbutton.php'); ?>
                    </td>
                    <td width="20%">
                    <?php $pidtxt='logout'; $pcaption='Cerrar Sesión'; $ponclick="logout1();"; include('vrbutton.php'); ?>
                    </td>
            <?php } ?>
      <?php } ?>

    
    
  <?php if($mobile=='true' and $orient=='H' and 1==1) {?>
      <tr>
      <td colspan=3>
      <div id="login1">
      <table>
        <tr>
            <?php if($_SESSION['user_codigo']=='') {?>
                    <?php $pidtxt='loguser'; $pcaption='usuario'; $plong="100%"; $psize=30; $pobj=3;  $pdefa=$usuario; include('vrgettxt.php'); ?>
                    <?php $pidtxt='logpass'; $pcaption='Clave'; $plong="100%"; $psize=30; $pobj=3; $ppass=1; $ponclick="login1();"; include('vrgettxt.php'); ?>
                    <td width="20%" align="center" valign="top" >
                    <?php $pidtxt='login'; $pcaption='Iniciar Sesión'; $psize=30; $ponclick="login1();"; include('vrbutton.php'); ?>
                    </td>
            <?php } ?>
        </tr>
      </table>
      </div>
      </td>
      </tr>
      <?php } ?>


  <?php if($mobile=='true' and $orient=='V' and 1==1 ) {?>
<?php // quitar esto para nueva verison mobile?>
      <?php if($_SESSION['user_codigo']=='' and 1==2 ) {?>
      <tr>
        <td align="center" colspan=3>
        <div id="login1">

        <table id="top_table2" width="100%" style="display:;">
          <?php if(1==1){ ?>
          <tr valign="middle" style="height:150;" >
              <td align="center" colspan="2">
          </tr>
          <tr valign="middle" style="height:150; display:none;" >
              <td align="center" colspan="2">
              </td>
          </tr>
          
          <?php if(mb_stristr('cont.pyme.cele',$cfg_tipo)){?>
          <tr valign="middle" style="height:150;" >
              <td align="center" colspan="2">
              </td>
          </tr>
          <?php } ?>
          
          <?php } ?>
          
        </table>
          </div>
        </td>
      </tr>
      <?php } ?>
      <?php if($_SESSION['user_codigo']!='') {?>
          <tr>
              <?php if($orient=='H'){ ?>
              <?php } ?>
              <td width="50%">
              <?php $pidtxt='userok'; $pcaption=$_SESSION['user_descri']; $psize=50; $ponclick=";"; include('vrbutton.php'); ?>
              </td>
              <td width="50%">
              <?php $pidtxt='logout'; $pcaption='Cerrar Sesión'; $psize=50; $ponclick="logout1();"; include('vrbutton.php'); ?>
              </td>
          </tr>
        <?php //} ?>
      <?php } ?>
<?php } ?>
  


  <?php if($mobile=='true' and $orient=='V' and 1==2 ) {?>
<?php // quitar esto para nueva verison mobile?>
      <?php if($_SESSION['user_codigo']=='' ) {?>
      <tr>
        <td align="center" colspan=3>
        <div id="login1">

        <table id="top_table2" width="100%" style="display:;">
          
          <tr valign="middle" style="height:150;">
              <?php $pidtxt='loguser'; $pcaption='Usuario'; $plong="90%"; $psize=80; $pobj=2; $pdefa=$usuario; include('vrgettxt.php'); ?>
          </tr>
          
          <?php if(1==1){ ?>
          <tr valign="middle" style="height:150;">
              <?php $pidtxt='logpass'; $pcaption='Clave'; $plong="90%"; $psize=80; $pobj=2; $ppass=1; $ponclick="login1()"; include('vrgettxt.php'); ?>
          </tr>
          <tr valign="middle" style="height:150;" >
              <td align="center" colspan="2">
              <?php $pidtxt='login'; $pcaption='Iniciar Sesión'; $psize=80; $ponclick="login1();"; include('vrbutton.php'); ?>
              </td>
          </tr>
          <tr valign="middle" style="height:150; display:none;" >
              <td align="center" colspan="2">
              <?php  $pidtxt='nuevo'; $pcaption='Nuevo usuario'; $psize=80; 
                  $ponclick="{if(document.getElementById('regis1').style.display=='none')
                              {
                                document.getElementById('login1').style.display='none';
                                document.getElementById('regis1').style.display='block';
                                document.getElementById('main_top').style.height='120px';
                                document.getElementById('nuevo').scrollIntoView();
                              }
                              else
                              {
                                document.getElementById('regis1').style.display='none';
                                document.getElementById('main1').scrollIntoView();
                              }
                              };";
//                   include('vrbutton.php');
                ?>
              </td>
          </tr>
          
          <?php if(mb_stristr('cont.pyme.cele',$cfg_tipo)){?>
          <tr valign="middle" style="height:150;" >
              <td align="center" colspan="2">
              </td>
          </tr>
          <?php } ?>
          
          <?php } ?>
          
        </table>
          </div>
        </td>
      </tr>
      <?php } ?>
      <?php if($_SESSION['user_codigo']!='') {?>
          <tr>
              <?php if($orient=='H'){ ?>
              <?php } ?>
              <td width="50%">
              <?php $pidtxt='userok'; $pcaption=$_SESSION['user_descri']; $psize=50; $ponclick=";"; include('vrbutton.php'); ?>
              </td>
              <td width="50%">
              <?php $pidtxt='logout'; $pcaption='Cerrar Sesión'; $psize=50; $ponclick="logout1();"; include('vrbutton.php'); ?>
              </td>
          </tr>
        <?php //} ?>
      <?php } ?>
<?php } ?>
    
    
  </tr>
</table>



</form>

  <img id="loading" src="https://vcrxol.com/_lib/loading1.gif" align="center" style="display:none;">		
