<?php ob_start(); ?>

<?php $mobile= $_SESSION['user_mobile'];?>
<?php $touchs= $_SESSION['user_touchs'];?>
<?php $osver= $_SESSION['osver'];?>
<?php $user_tipo = $_SESSION['user_tipo']; ?>

<?php $pbground='#D4FEF9'; ?>

<?php if(file_exists('../_cfg/config.php')){include('../_cfg/config.php');} ?>

<?php //if(file_exists('../cfg/config.php')){include('../cfg/config.php');}?>	

<?php $pbground='#D4FEF9'; ?>

<?php if(empty($pclass)){$pclass="";}?>
<?php if($pidtxt==''){$pidtxt=$ptabla;}?>
<?php if($paccept==''){$paccept=".*";}?>
<?php if(substr($paccept,0,1)!='.'){$paccept=".".$paccept;}?>
<?php if(empty($pidtxt)){$pidtxt=$ptabla;}?>
<?php if(empty($ponblur)){$ponblur="";}?>
<?php if(empty($pdocu)){$pdocu="";}?>
<?php if(empty($pidnum)){$pidnum="";}?>
<?php if(empty($piddet)){$piddet="";}?>
<?php if(empty($pnotob)){$pnotob="";}?>
<?php if(empty($pobj)){$pobj=1;} ?>
<?php if(empty($psize)){$psize=12;} ?>
<?php if(empty($pmulti)){$pmulti=2;} ?>
<?php $ponclick=str_replace('"',"'",$ponclick); ?>


<?php if($pobj>5){$pobj=3;} ?>
<script type="text/javascript">
</script>
<?php if($pobj==1){?>
<div class="<?php echo $pclass; ?>" >
<?php } ?>	

<?php if($pobj!=3){?>
  <input type="button" 
         id="<?php echo $pidtxt; ?>_btn" 
				 onCLick="
 									{document.getElementById('<?php echo $pidtxt; ?>_btn').setAttribute('disabled','disabled');} 
 									{document.getElementById('<?php echo $pidtxt; ?>_btn').value='Subiendo';}
									<?php if($ponclick==""){echo "_clickfile('".$pidtxt."');";}else{echo $ponclick.';';}?>
									{setTimeout(function rd()
											{
												document.getElementById('<?php echo $pidtxt; ?>_btn').removeAttribute('disabled');
												document.getElementById('<?php echo $pidtxt; ?>_btn').value='<?php echo $pcaption; ?>';
											},2000);} 
									"
				 tabIndex="-1"
         style="
								text-transform:uppercase;
								border-style:outset;
								border-width:3px;
								border-radius:5px;
								font-weight:bold;
								font-family:arial;
								font-size:<?php echo $psize;?>px;
								padding:2px;
								margin:0px;
								<?php if($pobj==1){echo 'width:100%;';} ?>	
								<?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==3){echo 'width:100%;';}?>;
								<?php if($pobj==3){echo 'display:none;';}?>; -->
								" 
         value="<?php echo ($pcaption) ?>" 
         />
<?php } ?>	

	
<?php if($pobj==1){?>
</div>	
<div class="<?php echo $pclass; ?>" >
<?php } ?>	
<?php if($pobj==2){?>
<br>	
<?php } ?>	
<input type="file"
			<?php if($pmulti>=2){echo 'multiple';} ?>	
			 id="<?php echo $pidtxt; ?>" 
         class="<?php echo $pclass; ?>"        
			 	 accept="<?php echo $paccept; ?>" 
         onfocus="{this.style.background='<?php echo $pbground;?>';}"
        onblur="{this.style.background='white';}"

         style="
								<?php if($pobj>1){echo 'font-weight:bold';} ?>
								border-style:outset;
								border-width:3px;
								border-radius:5px;
								font-family:arial;
								font-size:<?php echo $psize;?>px;
								padding:2px;
								margin:0px;
								width:<?php echo $psize*10+100;?>px;
								<?php if($pobj==1){echo 'width:100%;';} ?>	
								<?php //if($pobj==2){echo 'width:100%;';} ?>	
								" 
				 docu="<?php echo $pdocu; ?>" 
				 idnum="<?php echo $pidnum; ?>" 
				 iddet="<?php echo $piddet; ?>" 
         />

	
<?php if($pobj==3){?>
  <input type="button" 
         id="<?php echo $pidtxt; ?>_btn" 
				 onCLick="<?php if($ponclick==""){echo "_clickfile('".$pidtxt."')";}else{echo $ponclick;}?>"
				 tabIndex="-1"
          class="<?php echo $pclass; ?>"
         style="
								text-transform:uppercase;
								border-style:outset;
								border-width:3px;
								border-radius:5px;
								font-weight:bold;
								font-family:arial;
								font-size:<?php echo $psize;?>px;
								padding:2px;
								margin:0px;
								<?php if($pobj==1){echo 'width:100%;';} ?>	
								<?php if($pobj==3)
											{
												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==3){echo 'width:100%;';}?>;
								" 
         value="<?php echo ($pcaption) ?>" 
         />
<?php } ?>	
	
<?php if($mobile=='true' and $preado==0){ ?><div class="getheight" style="height:100px;"></div><?php } ?>
	
	
<?php if($pobj==1){?>
</div>
<?php } ?>	
	
<?php //include('vrbutton.php'); ?>
<!-- </div> -->
<div class="<?php echo $pclass; ?>" >
		<span id="<?php echo $pidtxt; ?>_error" class="txt_error" style="color:red;"></span>
</div>


<?php $pextension='';?>
<?php $pcaption='';?>
<?php $ptabla='';?>
<?php $pidtxt='';?>
<?php $plong='';?>
<?php $ponclick='';?>
<?php $pobj='';?>
<?php $ponblur='';?>
<?php $pnotob='';?>
<?php $pdefa='';?>
<?php $psize='';?>
<?php $pmulti='';?>
<?php $paccept='';?>
<?php $pdocu='';?>
<?php $pidnum='';?>
<?php $piddet='';?>
<?php $pclass='';?>

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