<?php ob_start(); ?>
<?php $mobile= $_SESSION['user_mobile'];?>
<?php $touchs= $_SESSION['user_touchs'];?>
<?php $pbground='#D4FEF9'; ?>

<?php $osver= $_SESSION['osver'];?>
<?php if(empty($plong)){$plong=10;} ?>
<?php if(mb_stristr($osver,'NT 10.0')){$plong=12;} ?>
<?php if($mobile=='true'){$plong=12;} ?>
<?php if(empty($psize)){$psize=12;} ?>
<?php if(empty($pobj)){$pobj=3;} ?>
<?php if($pobj>6){$pobj=3;} ?>
<?php if(empty($pdefa)){$pdefa=date('Y-m-d');} ?>
<?php if(empty($pclass)){$pclass="";}?>
<?php if(empty($preado)){$preado=0;} ?>
<?php if(empty($pvalue)){$pvalue=$pdefa;} ?>
<?php if(empty($phide)){$phide=0;} ?>
<?php if(empty($pmin)){$pmin="1900-01-01";}?>
<?php if(empty($pmax)){$pmax="2030-12-31";}?>

<?php if($pobj==2){?>
<th id="th_<?php echo $pidtxt; ?>" class="<?php //echo $pclass; ?>" width="<?php echo $plong ?>px" valign="top" style="<?php if($phide==1){echo 'display:none;';} ?>">
<?php } ?>
<?php if($pobj==3 or $pobj==6){?>
<td valign="top" class="<?php //echo $pclass; ?>" style="<?php if($phide==1){echo 'display:none;';} ?>">
<?php } ?>
<?php if($pobj==2 or $pobj==3  or $pobj==6){?>
<div class="<?php echo $pclass; ?>" >
  <input type="button" 
         class="getfec_btn"
         id="<?php echo $pidtxt; ?>_btn" 
         name="<?php echo $pidtxt; ?>"  
         onClick="_defafec(event,'<?php echo $pidtxt;?>','<?php echo $pdefa;?>');" 
         onKeyUp="_okupfec(event,'<?php echo $pidtxt;?>','<?php echo $pdefa;?>');" 
         style="
								font-size:<?php echo $psize;?>px;
								<?php if($pobj==2)
											{
												if(mb_stristr($plong,'%')){echo 'width:'.$plong.';';}
												else
												{
												if(strlen($pcaption)<=$plong){echo 'width:100%;';}
												if(strlen($pcaption)>$plong){echo 'width:'.(strlen($pcaption)*$psize).'px;';}
												}
											}
								?>;
								<?php //if($pobj==2){echo 'width:100%;';}?>;
								<?php if($pobj==3  or $pobj==6){echo 'width:100%;';}?>;
								
								" 
				 tabIndex="-1"
         value="<?php echo strtoupper($pcaption) ?>" 
				 ></input>
</div>
<?php } ?>
<?php if($pobj==3 or $pobj==6){?>
</td>
<td valign="top" align="left" class="<?php //echo $pclass; ?>" >
<?php } ?>
<?php if($pobj==1 or $pobj==5){?>
<td valign="top" class="<?php //echo $pclass; ?>" style="<?php if($phide==1){echo 'display:none;';} ?>">
<?php } ?>
<div class="<?php echo $pclass; ?>" style="<?php if($phide==1){echo 'display:none;';} ?>">
  <input
         value="<?php echo $pvalue;?>" 
				 type="<?php if($touchs=='true' or 1==1){echo 'date';}else{echo 'text';}?>"
         class="getfec_txt"
				 <?php if($preado==1){echo ' readonly ';}?>
				 accesskey="<?php echo substr($pcaption,0,1);?>"
         id="<?php echo $pidtxt; ?>"  
         name="<?php echo $pidtxt; ?>"  
          <?php if($pobj==1){echo 'placeholder="aaaa-mm-dd"';} ?>
				 maxlength="10"
         onfocus="{this.style.background='<?php echo $pbground;?>';}"
         onblur="_valfec(event,'<?php echo $pidtxt;?>','<?php echo $pdefa;?>');<?php echo $ponblur;?>;_valfec(event,'<?php echo $pidtxt;?>','<?php echo $pdefa;?>');{this.style.background='white';}" 
	     onmouseover="this.onblur(event)"
         XonKeyUp="_okupfec(event,'<?php echo $pidtxt;?>','<?php echo $pdefa;?>');" 
         size="10px"
				 min="<?php echo $pmin; ?>"
				 max="<?php echo $pmax; ?>"
         style="
								<?php if($pobj>1){echo 'font-weight:bold;';} ?>
								font-size:<?php echo $psize;?>px;
								width:<?php if(mb_stristr($plong,'%')){echo $plong.';';}else{echo ($plong*$psize*.7+25).'px;';}?>
								" 
				 title="<?php echo strtolower($pcaption); ?>" 
         defa="<?php echo $pdefa;?>" 
				 ></input>
        <?php if($pobj>1){ ?>
      	<div
         id="<?php echo $pidtxt; ?>_descri"
         name="<?php echo $pidtxt; ?>"  
				 onmouseover="document.getElementById('<?php echo $pidtxt; ?>').onblur(event)"
				 style="
								font-weight:bold;
								font-family:arial;
								font-size:<?php echo $psize+2;?>px;
								<?php if($pobj==1 or $pobj==2  or $pobj==6){echo 'display:none;';} ?>
								"
	      >
        <?php echo substr(date('l',strtotime($pdefa)),0,3).' '.date('d/M/y',strtotime($pdefa)); ?>		
        </div>
	      <span id="<?php echo $pidtxt; ?>_error" class="txt_error" style="color:red;"></span>
        <?php } ?>
</div>

<?php if($mobile=='true' and $preado==0){ ?><div class="getheight" style="height:100px;"></div><?php } ?>

<?php if($pobj==2){?>
</th>
<?php } ?>
<?php if($pobj==1 or $pobj==3 or $pobj==5 or $pobj==6){?>
</td>
<?php } ?>

<?php $pcaption='';?>
<?php $ptabla='';?>
<?php $pidtxt='';?>
<?php $plong='';?>
<?php $pobj='';?>
<?php $pdefa='';?>
<?php $ponblur='';?>
<?php $psize=0;?>
<?php $pclass='';?>
<?php $preado='';?>
<?php $pvalue='';?>
<?php $pmin='';?>
<?php $pmax='';?>
<?php $phide=0; ?>


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