<?php session_start();?>
<?php include('../_cfg/config.php');?>
<?php include('php_gene1.php'); ?>
<?php include('php_session.php');?>
<?php //$orient=$_POST['orient']; ?>
<?php //foreach($_POST as $campo => $valor){${$campo}=$valor;} ?>

<?php include('simplexlsx.class.php');?>
<?php $docu=$_POST['docu']; ?>
<?php $anio=$_POST['anio']; ?>
<?php $mes=$_POST['mes']; ?>
<?php $sema=$_POST['sema']; ?>
<?php $sala=$_POST['sala']; ?>
<?php $modif=$_POST['modif']; ?>
<?php $orient=$_POST['orient']; ?>
<?php $fecha1r=date('Y-m-01',strtotime('today -3 month'));?>

<?php $fecmodasis= date('Y-m-1',strtotime('today'));?>
<?php $fecmodasis= date('Y-m-1',strtotime('today -3 month'));?>
<?php
if(empty($cong_codigo)){$cong_codigo=$_SESSION['cong_codigo'];}
if(empty($cong_codigo)){$cong_codigo=$_POST['cong'];}

$print=$_POST['print'];

// echo '*/*/*/'.$cong_codigo;
// gen_acce();
// gen_usrdoc();

$xfontsize=12;
if($mobile=='true' and $orient=='V'){$xfontsize=30;}
if($mobile=='true' and $orient=='H'){$xfontsize=20;}


$jworgs='http://wol.jw.org';
$jworgl=$jworgs.'/es/wol/dt/r4/lp-s/';
// echo $jworgl;

$cong_sql='update jwib1 set conteo=0 where conteo is null';
$cong_res=msql_query($cong_sql,$link_vcrx);

$cong_sql='update jwiv1 set caduca=adddate(fecha,15) where caduca="" or caduca is null or caduca<fecha';
$cong_res=msql_query($cong_sql,$link_vcrx);

$cong_sql='update jwib1 set nombre3=nombre2 where (docu="AS11" or docu="AS12") and nombre2!="" and nombre2 is not null';
$cong_res=msql_query($cong_sql,$link_vcrx);

$cong_sql='update jwib1 set nombre2="" where (docu="AS11" or docu="AS12") and nombre2!="" and nombre2 is not null';
$cong_res=msql_query($cong_sql,$link_vcrx);

$cong_sql='select * from cong0 where cong_codigo="'.$cong_codigo.'"';
$cong_res=msql_query($cong_sql,$link_vcrx);
$salas = msql_result($cong_res,0,'cong_sala');

// echo '*/*/*'.$cong_codigo;
// echo '*/*/*'.$cong_sql;
// echo '*/*/*'.$salas;

$cong_sql='update jwib1 set nombre1="." where docu ="VM19" and (nombre1="" or nombre1 is null) and (nombre2!="" or nombre2 is null)';
$cong_res=msql_query($cong_sql,$link_vcrx);

$cong_sql='update jwib1 set nombre1="" where docu ="VM19" and (nombre2="" or nombre2 is null)';
$cong_res=msql_query($cong_sql,$link_vcrx);

// $jwib_sql='select * from user0 where user_codigo="'.$_SESSION['user_codigo'].'"';
// $jwib_res=msql_query($jwib_sql,$link_vcrx);

$jwib_sql='select *, user_vida +user_mmae +user_estu +user_dpub +user_vari +user_asem +user_asis as modifica ';
$jwib_sql.='from user0 where user_codigo="'.$_SESSION['user_codigo'].'"';
$jwib_res=msql_query($jwib_sql,$link_vcrx);

$modifica= msql_result($jwib_res,0,'modifica');

$full=false;
$invi=false;

// echo '****'.$modif;

// if($modif=='1') 
{
$acce=msql_result($jwib_res,0,'user_acce');
$vida=msql_result($jwib_res,0,'user_vida');
$mmae=msql_result($jwib_res,0,'user_mmae');
$dpub=msql_result($jwib_res,0,'user_dpub');
$estu=msql_result($jwib_res,0,'user_estu');
$reun=msql_result($jwib_res,0,'user_estu');
$asem=msql_result($jwib_res,0,'user_asem');
$asis=msql_result($jwib_res,0,'user_asis');
$vari=msql_result($jwib_res,0,'user_vari');

if(mb_stristr('sist.admi',$_SESSION['user_tipo'])){$full=true;}

if(mb_stristr('invi',$_SESSION['user_tipo'])){$invi=true;}

}


if(mb_stristr('invi',$_SESSION['user_tipo'])){$modif='';}


if($modifica>0 and $anio=='' and $modif=='') {$bmodif=true;}

$semaa=date('W',strtotime('now'));
$fechaa=date('Y-m-d');
$prdoa=date('Ym');

$fecha2=strtotime ('last Monday');
// $fecha2=strtotime ('last Monday -730 days');
if($modif=='1'){$fecha2=strtotime ('last Monday -7 days');}
$fecha2=date('Y-m-d',$fecha2);

$fecha=date('Y-m-01');
$printer=false;

if($fecha2>$fecha){$fecha2=$fecha;}


if($docu=='ASEM')
{
	$modif=$modif*$asem;

	$jwib_sql='select *, ';
	
	for($cas10=11; $cas10<=19; $cas10++)
	{
	$jwib_sql.='max(case when docu="AS'.$cas10.'" then idnum1 end) as idn_'.$cas10.',';
	$jwib_sql.='max(case when docu="AS'.$cas10.'" then docu end) as docuc_'.$cas10.',';
	$jwib_sql.='max(case when docu="AS'.$cas10.'" then docu_descri end) as docud_'.$cas10.',';
	$jwib_sql.='max(case when docu="AS'.$cas10.'" then nombre1 end) as nom1_'.$cas10.',';
	$jwib_sql.='max(case when docu="AS'.$cas10.'" then nombre2 end) as nom2_'.$cas10.',';
	$jwib_sql.='max(case when docu="AS'.$cas10.'" then nombre3 end) as nom3_'.$cas10.',';
	$jwib_sql.='max(case when docu="AS'.$cas10.'" then nombre4 end) as nom4_'.$cas10.',';
	$jwib_sql.='max(case when docu="AS'.$cas10.'" then fechar end) as fecha_'.$cas10.',';
	$jwib_sql.='max(case when docu="AS'.$cas10.'" then concat(fdianr," /",fdiar) end) as fec_'.$cas10.',';
	}

	$jwib_sql.='case when fecha2 is not null then upper(date_format(fecha2,"%a/%d")) end as fecha2dm,';
	$jwib_sql.='status as st1 ';
 	$jwib_sql.='from jwib11 ';
	$jwib_sql.='where cong="'.$cong_codigo.'" and docu like "AS%"  ';

	if($anio!='')
	{	
		$jwib_sql.=' and fanior="'.$anio.'"';
		$jwib_sql.=' and fmesr="'.$mes.'"';
		$printer=true;
	}
	else
	{$jwib_sql.=' and fechar>="'.$fecha2.'" ';}

// 	$jwib_sql.=' and fechar>="2017-07-20" ';
// 	$jwib_sql.=' and fechar<="2017-07-30" ';
	
// 	if($invi or $asem==0){$jwib_sql.=' and nombre1>"" ';}	
	if($modif==0){$jwib_sql.=' and nombre1>"" ';}	
	$jwib_sql.=' group by fanio,fsema ';
	$jwib_sql.=' order by fecha,fechar ';

}

if($docu=='DPU2')
{
	$jwib_sql='update jwib1, cong0 set fechar=adddate(fecha,5) where cong="'.$cong_codigo.'" and docu="DPU2" and fecha>="'.$fecha.'"';
	$jwib_res=msql_query($jwib_sql,$link_vcrx);

	$jwib_sql='update jwib1, cong0 set fechar=adddate(fecha,6) where cong="'.$cong_codigo.'" and docu="DPU2" and fecha>="'.$fecha.'" and (left(cong2_dpud,1)="7" or left(cong2_dpud,1)="D")';
	$jwib_res=msql_query($jwib_sql,$link_vcrx);
}

if(mb_stristr('DPU1.DPU2',$docu))
{
	$modif=$modif*$dpub;
	
	$jwib_sql='select * from jwib11 where docu="'.$docu.'" and cong="'.$cong_codigo.'" ';
// 	if($invi or $dpub==0){$jwib_sql.=' and bsqj!="" ';}	
// 	if($dpub==0){$jwib_sql.=' and bsqj!="" ';}	
	if($dpub==0){$jwib_sql.=' and nombre1!="" ';}	
	if($anio!='')
	{	
	$jwib_sql.=' and fanior="'.$anio.'"';
	$jwib_sql.=' and fmesr="'.$mes.'"';
	$printer=true;
	}
	else
	{$jwib_sql.=' and fechar>="'.$fecha2.'" ';}
	
	
	if($docu=='DPU1')
	{$jwib_sql.=' order by fecha ';}

	if($docu=='DPU2')
	{$jwib_sql.=' order by fanior,fmesr,cong2_descri,fecha ';}
}

if($docu=='ESTU')
{
	$modif=$modif*$estu;
	
	$jwib_sql='select *, ';
	$jwib_sql.='max(case when docu="ELIB" then idnum1 end) as idn_lib,';
	$jwib_sql.='max(case when docu="ELIB" then nombre1 end) as nom1_lib,';
	$jwib_sql.='max(case when docu="ELIB" then nombre2 end) as nom2_lib,';
	$jwib_sql.='max(case when docu="ELIB" then fechar end) as fecha_lib,';
	$jwib_sql.='max(case when docu="ELIB" then concat(fdianr," /",fdiar) end) as fec_lib,';
	$jwib_sql.='max(case when docu="EATA" then idnum1 end) as idn_ata,';
	$jwib_sql.='max(case when docu="EATA" then nombre1 end) as nom1_ata,';
	$jwib_sql.='max(case when docu="EATA" then nombre2 end) as nom2_ata,';
	$jwib_sql.='max(case when docu="EATA" then fechar end) as fecha_ata,';
	$jwib_sql.='max(case when docu="EATA" then concat(fdianr," /",fdiar) end) as fec_ata,';
	$jwib_sql.='status as st1 ';
	$jwib_sql.=' from jwib11 where docu in ("ELIB","EATA") and cong="'.$cong_codigo.'" ';

	if($anio!='')
	{	
	$jwib_sql.=' and fanior="'.$anio.'"';
	$jwib_sql.=' and fmesr="'.$mes.'"';
	$printer=true;
	}
	else
	{$jwib_sql.=' and fechar>="'.$fecha2.'" ';}
	
	if($invi or $estu==0){$jwib_sql.=' and nombre2>"" ';}	
	$jwib_sql.=' group by fanio,fsema ';
	$jwib_sql.=' order by fecha,fechar ';
// 	echo $jwib_sql;
}

if($docu=='REUN')
{
	$modif=$modif*$reun;
	
	$jwib_sql='select *, ';
	$jwib_sql.='max(case when docu="REU1" then idnum1 end) as idn_reu1,';
	$jwib_sql.='max(case when docu="REU1" then conteo end) as cont_reu1,';
	$jwib_sql.='max(case when docu="REU1" then fechar end) as fecha_reu1,';
	$jwib_sql.='max(case when docu="REU1" then concat(fdianr," /",fdiar) end) as fec_reu1,';
	$jwib_sql.='max(case when docu="REU2" then idnum1 end) as idn_reu2,';
	$jwib_sql.='max(case when docu="REU2" then conteo end) as cont_reu2,';
	$jwib_sql.='max(case when docu="REU2" then fechar end) as fecha_reu2,';
	$jwib_sql.='max(case when docu="REU2" then concat(fdianr," /",fdiar) end) as fec_reu2,';
	$jwib_sql.='status as st1 ';
	$jwib_sql.=' from jwib11 where docu in ("REU1","REU2") and cong="'.$cong_codigo.'" ';

	if($anio!='')
	{	
	$jwib_sql.=' and fanior="'.$anio.'"';
	$jwib_sql.=' and fmesr="'.$mes.'"';
	$printer=true;
	}
	else
	{$jwib_sql.=' and fecha<=now() ';}
	
	if($invi or $reun==0){$jwib_sql.=' and fecha<=now() ';}	
	if($cong_codigo=='2790'){$jwib_sql.=' and fecha>="'.$fecha1r.'"';}	
	$jwib_sql.=' group by fanio,fsema ';
	$jwib_sql.=' order by fanio desc, fmesr desc, fechar';
// 	echo $jwib_sql;
}


if($docu=='VIDA')
{
	$modif=$modif*$vida;

	$jwib_sql='select *, ';
	$jwib_sql.='max(case when docu="VM11" then idnum1 end) as idn_vmc,';
	$jwib_sql.='max(case when docu="VM11" then nombre1 end) as nom1vmc,';
	$jwib_sql.='max(case when docu="VM11" then nombre2 end) as nom2vmc,';
	$jwib_sql.='max(case when docu="VM19" then idnum1 end) as idn_ora,';
	$jwib_sql.='max(case when docu="VM19" then nombre1 end) as nom1ora,';
	$jwib_sql.='max(case when docu="VM19" then nombre2 end) as nom2ora,';
	$jwib_sql.='max(case when docu="VM21" then idnum1 end) as idn_tdb,';
	$jwib_sql.='max(case when docu="VM21" then nombre1 end) as nom1tdb,';
	$jwib_sql.='max(case when docu="VM21" then nombre2 end) as nom2tdb,';
	$jwib_sql.='max(case when docu="VM41" then idnum1 end) as idn_nvc,';
	$jwib_sql.='max(case when docu="VM41" then nombre1 end) as nom1nvc,';
	$jwib_sql.='max(case when docu="VM41" then nombre2 end) as nom2nvc,';
	$jwib_sql.='status as st1 ';
	$jwib_sql.=' from jwib11 where docu like "VM%" and docu not like "VM3%" and cong="'.$cong_codigo.'" ';
	
	if($anio!='')
	{	
	$jwib_sql.=' and fanior="'.$anio.'"';
	$jwib_sql.=' and fmesr="'.$mes.'"';
	$printer=true;
	}
	else
	{$jwib_sql.=' and fechar>="'.$fecha2.'" ';}
	
// 	if($invi or $vida==0){$jwib_sql.=' and nombre1>"" ';}	
	if($modif==0){$jwib_sql.=' and nombre1>"" ';}	
	$jwib_sql.=' group by fanio,fsema ';
	$jwib_sql.=' order by fecha,fechar ';
// 	echo $jwib_sql;
}

if($docu=='MMAE')
{
	$modif=$modif*$mmae;
	
	$jwib_sql='select *, ';
	$jwib_sql.='max(case when sala=0 then idnum1 end) as idn_sala0,';
	$jwib_sql.='max(case when sala=0 then nombre1 end) as nom1sala0,';
	$jwib_sql.='max(case when sala=0 then nombre2 end) as nom2sala0,';
	$jwib_sql.='max(case when sala=0 then orat end) as oratsala0,';
	
	$jwib_sql.='max(case when sala=1 then idnum1 end) as idn_sala1,';
	$jwib_sql.='max(case when sala=1 then nombre1 end) as nom1sala1,';
	$jwib_sql.='max(case when sala=1 then nombre2 end) as nom2sala1,';
	$jwib_sql.='max(case when sala=1 then orat end) as oratsala1,';
	
	$jwib_sql.='max(case when sala=2 then idnum1 end) as idn_sala2,';
	$jwib_sql.='max(case when sala=2 then nombre1 end) as nom1sala2,';
	$jwib_sql.='max(case when sala=2 then nombre2 end) as nom2sala2,';
	$jwib_sql.='max(case when sala=2 then orat end) as oratsala2,';
	
	$jwib_sql.='max(case when sala=3 then idnum1 end) as idn_sala3,';
	$jwib_sql.='max(case when sala=3 then nombre1 end) as nom1sala3,';
	$jwib_sql.='max(case when sala=3 then nombre2 end) as nom2sala3,';
	$jwib_sql.='max(case when sala=3 then orat end) as oratsala3,';
	
	$jwib_sql.='status as st1 ';
	$jwib_sql.=' from jwib11 where docu like "VM3%" and cong="'.$cong_codigo.'" ';
	
	if($anio!='')
	{	
	$jwib_sql.=' and fanior="'.$anio.'"';
	$jwib_sql.=' and fmesr="'.$mes.'"';
	$printer=true;
	}
	else
	{$jwib_sql.=' and fechar>="'.$fecha2.'"';}
// 	{$jwib_sql.=' and fechar>=date(now()) ';}
// 	{$jwib_sql.=' and fechar>="'.$fecha2.'" ';}
	
// 	if($invi or $mmae==0){$jwib_sql.=' and nombre1>"" ';}	
	if($modif==0){$jwib_sql.=' and nombre1>"" ';}	
	
 	if($mobile!='true' and !$printer)
	{	
	}
	$jwib_sql.=' group by fanio,fsema,docu';
	$jwib_sql.=' order by fecha,fechar,docu,sala ';
	
 	if($mobile=='true' and !$printer)
	{
// 	$jwib_sql.=' order by fecha,fechar,sala,docu ';
// 	$jwib_sql=str_replace('max(','(',$jwib_sql);
	}
	
// 	echo $jwib_sql;
}









if($docu=='S89S')
{
	$sema=$mes;
	$jwib_sql='select *, ';
	$jwib_sql.='status as st1 ';
	$jwib_sql.=' from jwib11 where docu like "VM3%" and cong="'.$cong_codigo.'" ';
	
	if($anio!='')
	{	
	$jwib_sql.=' and fanior="'.$anio.'"';
	$jwib_sql.=' and fsema="'.$sema.'"';
	$jwib_sql.=' and sala="'.$sala.'"';
	$printer=true;
	}
	else
	{$jwib_sql.=' and fechar>="'.$fecha2.'"';}

 	$jwib_sql.=' group by fanio,fsema,docu';
	$jwib_sql.=' order by fanio,fsema,docu';
}

if($docu=='AVMC')
{
	$sema=$mes;
	$jwib_sql='select *, ';
	$jwib_sql.='status as st1 ';
	$jwib_sql.=' from jwib11 where (docu like "VM2%" or docu like "VM4%") and cong="'.$cong_codigo.'" ';
	
	if($anio!='')
	{	
	$jwib_sql.=' and fanior="'.$anio.'"';
	$jwib_sql.=' and fmesr="'.$mes.'"';
// 	$jwib_sql.=' and sala="'.$sala.'"';
	$printer=true;
	}
// 	else 
// 	{$jwib_sql.=' and fechar>="'.$fecha2.'"';}
	
 	$jwib_sql.=' group by fanio,fsema,docu';
 	$jwib_sql.=' order by fanio,fsema,docu';
}

if(mb_stristr('VARI',$docu))
{
	$jwib_sql='select * from jwiv11 where docu="'.$docu.'" and cong="'.$cong_codigo.'" ';
	if($bmodif) {$jwib_sql.=' and (caduca>=now() or adddate(fecha,+30)>=now())';}
	if(!$bmodif) {$jwib_sql.=' and caduca>=now() ';}
	$jwib_sql.=' and status!="O"';
	$jwib_sql.=' order by fecha desc';
	if($anio!=''){$printer=true;}
// 	echo $jwib_sql;
}


?>

<?php
?>


<?php
//$ponclick="jwib_asig1('".$docu."','".$jwib_aso['fanior']."','".''.$jwib_aso['fmesr']."')";
// echo '****'.$orient;

?>
<?php ob_start(); ?>

<?php //echo explain_sql($jwib_sql); ?>
<div id="tabla">
<?php if(mb_stristr('ASEM',$docu)) { ?>
  <?php if($modif==1){ ?>
    <?php for($cas10=11; $cas10<=19; $cas10++)	{ ?>
      <?php $pdocu='AS'.$cas10; $pcolu='nombre1'; $pidtxt='dl_nom1_'.$cas10; include('vrsetlist.php'); ?>
      <?php $pdocu='AS'.$cas10; $pcolu='nombre2'; $pidtxt='dl_nom2_'.$cas10; include('vrsetlist.php'); ?>
      <?php $pdocu='AS'.$cas10; $pcolu='nombre3'; $pidtxt='dl_nom3_'.$cas10; include('vrsetlist.php'); ?>
      <?php $pdocu='AS'.$cas10; $pcolu='nombre4'; $pidtxt='dl_nom4_'.$cas10; include('vrsetlist.php'); ?>
    <?php } ?>  
  <?php } ?>  

  <?php //echo '<br>'.date('H:i:s'); ?>
		<?php if($mobile=='false' and !$printer){ ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx);?>
	<?php //echo '<br>'.date('H:i:s'); ?>
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;" border=1>
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php $ardocu=array(); ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
<!-- 					<input type="text" class="jwfecha" style="display:none;" value="<?php //echo $jwib_aso['fecha'] ?>"> -->
					<?php $lsema=$jwib_aso['fsema']; ?>
					<?php } ?>
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;">
									<th align="center" style="" width="">
					<?php if($jwib_aso['fanior'].$jwib_aso['fmesr']>=$prdoa){  ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
									<?php for($cas10=11; $cas10<=19; $cas10++)	{ ?>
											<?php $ardocu[$cas10]=$jwib_aso['docud_'.$cas10]; ?>
											<th colspan=1 width=""><?php echo $ardocu[$cas10]; ?></th>
									<?php } ?>
									<th>
									<?php 
                                                if($print==0)
                                                {
											$pcaption="Imprimir"; $pidtxt='imprimir'.$jwib_aso['idnum1']; 
											$ponclick="jwib_asig1('".$docu."','".$jwib_aso['fanior']."','".$jwib_aso['fmesr']."')";
											include('vrbutton.php');
                                                }
									?>
									<?php if($bmodif) { ?>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
									<?php } ?>
										
									</th>
								</tr>
					<?php } ?>
				<tr style="<?php if($jwib_aso['fsema']==$semaa){echo 'font-weight:bold;';}?>text-transform:capitalize;" align="center">
					<td>
						<?php
							echo ucwords2(strtolower($jwib_aso['fdianr'].'/'.$jwib_aso['fdiar']));
							if($jwib_aso['nom3_13']==""){echo ' - ';}else{echo '<br><br><br>';};
							echo ucwords2(strtolower($jwib_aso['fecha2dm']));
						?>
					</td>
			
					<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
								<?php for($cas10=11; $cas10<=19; $cas10++)	{ ?>
									<td valign="top">
									<div style="<?php if($ardocu[$cas10]==''){echo 'display:none;';}else{echo 'display:block;';} ?> ">
										
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_'.$cas10]; $pobj=5; $pdefa=$jwib_aso['nom1_'.$cas10]; $plong=20; $pdocu=$jwib_aso['docuc_'.$cas10]; $pcolu='nombre1'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_'.$cas10]."').click()}";
                  $plist='dl_nom1_'.$cas10;
									include('vrgettxt.php'); ?>
								<div style="<?php if($cas10>=13 and $cas10<=16){echo "display:block;";}else{echo "display:none;";}?>">
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_'.$cas10]; $pobj=5; $pdefa=$jwib_aso['nom2_'.$cas10]; $plong=20; $pdocu=$jwib_aso['docuc_'.$cas10]; $pcolu='nombre2'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_'.$cas10]."').click()}";
                  $plist='dl_nom2_'.$cas10;
									include('vrgettxt.php'); ?>
									</div>

									<hr>
								<?php $pcaption='Nombre'; $pidtxt='nom3'.$jwib_aso['idn_'.$cas10]; $pobj=5; $pdefa=$jwib_aso['nom3_'.$cas10]; $plong=20; $pdocu=$jwib_aso['docuc_'.$cas10]; $pcolu='nombre3'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_'.$cas10]."').click()}";
                  $plist='dl_nom3_'.$cas10;
									include('vrgettxt.php'); ?>
								<div style="<?php if($cas10>=13 and $cas10<=16){}else{echo "display:none;";}?>">
								<?php $pcaption='Nombre'; $pidtxt='nom4'.$jwib_aso['idn_'.$cas10]; $pobj=5; $pdefa=$jwib_aso['nom4_'.$cas10]; $plong=20; $pdocu=$jwib_aso['docuc_'.$cas10]; $pcolu='nombre4'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_'.$cas10]."').click()}";
                  $plist='dl_nom4_'.$cas10;
									include('vrgettxt.php'); ?>
								</div>
										
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_'.$cas10]; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_'.$cas10]."','".$docu."','nom1".$jwib_aso['idn_'.$cas10]."','nom2".$jwib_aso['idn_'.$cas10]."')";
								 include('vrbutton.php'); ?>
									</div>	
								</td>
								<?php } ?>
					<?php }else{ ?>
								<?php for($cas10=11; $cas10<=19; $cas10++)	{ ?>
<!-- 								<td style="<?php if($ardocu[$cas10]==''){echo 'display:none;';}else{echo 'display:block;';} ?> "> -->
								<td valign="top">
	                 <?php 
                   gen_icsjw($jwib_aso['idn_'.$cas10]); 
                   $xref='_doc/'.'AS'.$cas10.'_'.fillzero($jwib_aso['idn_'.$cas10]).'.ics';
                 ?>
									<a href="<?phpecho $xref; ?>" target="_blank">
							<?php echo ucwords2(($jwib_aso['nom1_'.$cas10])); ?>
									</a>
								<br>
								<?php echo ucwords2(($jwib_aso['nom2_'.$cas10])); ?>
								<?php if($jwib_aso['nom3_'.$cas10]!="")	{ ?>
									<br>
									<hr>
									<?php echo ucwords2(($jwib_aso['nom3_'.$cas10])); ?>
									<br>
									<?php echo ucwords2(($jwib_aso['nom4_'.$cas10])); ?>
								<?php } ?>
								</td>
								<?php } ?>
					<?php } ?>

					</tr>
				<?php } ?>
		</table>
		<?php } ?>

		<?php if($mobile=='true' and !$printer){ ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; $psize=30;include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>

		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;font-size:<?php echo $xfontsize;?>px;" border=1>
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php $ardocu=array(); ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
<!-- 					<input type="text" class="jwfecha" style="display:none;" value="<?php //echo $jwib_aso['fecha'] ?>"> -->
					<?php $lsema=$jwib_aso['fsema']; ?>
					<?php } ?>
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;">
									<th colspan="3" align="center" style="" width="">
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
								</tr>
					<?php } ?>
			<tr style="border-top:solid 2px; border-bottom:solid 2px;background: #A9F5F2;<?php if($jwib_aso['fsema']==$semaa){echo 'font-weight:bold;';}?>">
					<td colspan="1" align="center" style="" width="">
						<?php echo 'ASIGNACION'; ?>
					</td>
					<td colspan="2" align="center">
					<?php if($jwib_aso['fsema']>=$semaa){ ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
						<?php  echo ucwords2(strtolower($jwib_aso['fdianr'].'/'.$jwib_aso['fdiar'].' - '.$jwib_aso['fecha2dm'])); ?>
					</td>
			</tr>

					<?php for($cas10=11; $cas10<=19; $cas10++)	{ ?>
							<?php $ardocu[$cas10]=$jwib_aso['docud_'.$cas10]; ?>
						<?php if($ardocu[$cas10]!=''){ ?>
						<tr>
							<td ><?php echo $ardocu[$cas10]; ?></td>
							<td align="center">

						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
									<div style="<?php if($ardocu[$cas10]==''){echo 'display:none;';}else{echo 'display:block;';} ?> ">
										
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_'.$cas10]; $pobj=5; $pdefa=$jwib_aso['nom1_'.$cas10]; $plong=20; $psize=25; $pdocu=$jwib_aso['docuc_'.$cas10]; $pcolu='nombre1'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_'.$cas10]."').click()}";
									include('vrgettxt.php'); ?>
									<br>	
								<div style="<?php if($cas10>=13 and $cas10<=16){echo "display:block;";}else{echo "display:none;";}?>">
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_'.$cas10]; $pobj=5; $pdefa=$jwib_aso['nom2_'.$cas10]; $plong=20; $psize=25; $pdocu=$jwib_aso['docuc_'.$cas10]; $pcolu='nombre2'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_'.$cas10]."').click()}";
									include('vrgettxt.php'); ?>
									<br>	
								</div>
<!-- 								</td><td align="center"> -->
								<?php $pcaption='Nombre'; $pidtxt='nom3'.$jwib_aso['idn_'.$cas10]; $pobj=5; $pdefa=$jwib_aso['nom3_'.$cas10]; $plong=20; $psize=25; $pdocu=$jwib_aso['docuc_'.$cas10]; $pcolu='nombre3'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_'.$cas10]."').click()}";
									include('vrgettxt.php'); ?>
									<br>	
								<div style="<?php if($cas10>=13 and $cas10<=16){}else{echo "display:none;";}?>">
								<?php $pcaption='Nombre'; $pidtxt='nom4'.$jwib_aso['idn_'.$cas10]; $pobj=5; $pdefa=$jwib_aso['nom4_'.$cas10]; $plong=20; $psize=25; $pdocu=$jwib_aso['docuc_'.$cas10]; $pcolu='nombre4'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_'.$cas10]."').click()}";
									include('vrgettxt.php'); ?>
									<br>	
								</div>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_'.$cas10]; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_'.$cas10]."','".$docu."','nom1".$jwib_aso['idn_'.$cas10]."','nom2".$jwib_aso['idn_'.$cas10]."')";
								 include('vrbutton.php'); ?>
									<br>	
									</div>	
					<?php }else{ ?>
								<?php echo ucwords2(strtolower($jwib_aso['nom1_'.$cas10])); ?>
								<br>
								<?php echo ucwords2(strtolower($jwib_aso['nom2_'.$cas10])); ?>
								</td><td align="center">
								<?php echo ucwords2(strtolower($jwib_aso['nom3_'.$cas10])); ?>
								<br>
								<?php echo ucwords2(strtolower($jwib_aso['nom4_'.$cas10])); ?>
					<?php } ?>


							</td>
							</tr>
						<?php } ?>
			
					<?php } ?>

			<tr style="<?php if($jwib_aso['fsema']==$semaa){echo 'font-weight:bold;';}?>text-transform:capitalize;" align="center">

			
					</tr>
				<?php } ?>
		</table>

		<?php } ?>

		<?php if($printer){ ?>
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>
		<?php echo 'ESTUDIOS'; ?>
		</title>
		<style type="text/css">
		/* body{ font-family:"Courier New", Courier, monospace;} */
		@page {
		/*    size: 7in 9.25in; */
		/* 	 top left bott right */
		/*     size: 210mm 297mm;  */
		/*     margin: 0mm 10mm 10mm 0mm; /* 	top right bottom left */ */
				size: 105mm 148mm; 
				margin: 20mm 5mm 0mm 5mm; /* 	top right bottom left */
		}

		</style>

		</head>
		<body>

	
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;" border=1>
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
<!-- 					<input type="text" class="jwfecha" style="display:none;" value="<?php //echo $jwib_aso['fecha'] ?>"> -->
					<?php $lsema=$jwib_aso['fsema']; ?>
					<?php } ?>
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;font-size:10px;">
									<th align="center" style="" width="1%">
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
									<?php for($cas10=11; $cas10<=19; $cas10++)	{ ?>
									<?php $ardocu[$cas10]=$jwib_aso['docud_'.$cas10]; ?>
									<th >
											<?php echo $ardocu[$cas10]; ?>
									</th>
									<?php } ?>
								</tr>
					<?php } ?>
				<tr style="text-transform:capitalize;font-size:12px;" align="center">
					<td>
						<?php
							echo ucwords2(strtolower($jwib_aso['fdianr']));
							echo '/'.$jwib_aso['fdiar'];
							if($jwib_aso['nom3_13']==""){echo '<br>';}else{echo '<br><br><br>';};
							echo ucwords2(strtolower($jwib_aso['fecha2dm']));
						?>
					</td>
								<?php for($cas10=11; $cas10<=19; $cas10++)	{ ?>
									<td >
								<?php echo ucwords2(strtolower($jwib_aso['nom1_'.$cas10])); ?>
								<br>
								<?php echo ucwords2(strtolower($jwib_aso['nom2_'.$cas10])); ?>
								<?php if($jwib_aso['nom3_'.$cas10]!="")	{ ?>
									<br><br>
									<?php echo ucwords2(strtolower($jwib_aso['nom3_'.$cas10])); ?>
									<br>
									<?php echo ucwords2(strtolower($jwib_aso['nom4_'.$cas10])); ?>
								<?php } ?>
								</td>
								<?php } ?>
					</tr>
				<?php } ?>
			<tr style="border-top:solid 2px;font-size:10px;">
				<td colspan="10" align="right">
				<?php echo 'jwib.vcrxol.com/?'.$cong_codigo; ?>
				</td>
			</tr>
		</table>


		<?php } ?>

	<?php //echo '<br>'.date('H:i:s'); ?>
			
<?php } ?>

<?php if(mb_stristr('MMAE',$docu)) { ?>
  <?php if($modif==1){ ?>
      <?php $ptabla='orat'; $pidtxt='dl_orat'; include('vrsetlist.php'); ?>
    <?php for($cas10=30; $cas10<=33; $cas10++)	{ ?>
      <?php $pdocu='VM'.$cas10; $pcolu='nombre1'; $pidtxt='dl_nom1_vm'.$cas10; include('vrsetlist.php'); ?>
      <?php $pdocu='VM'.$cas10; $pcolu='nombre2'; $pidtxt='dl_nom2_vm'.$cas10; include('vrsetlist.php'); ?>
    <?php } ?>  
      
  <?php } ?>  

		<?php if($mobile=='false' and !$printer){ ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>
										

			<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
<!-- <div id="scrollhere" ></div>			 -->
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;" border=0>
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
				<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #C18626;">
									<th width="30%" align="center" style="">
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
									<th width="" colspan=2 style="background-color:#C18626; color:white;">SEAMOS MEJORES MAESTROS</th>
									<th width="" align="right">
									<?php 
                                                if($print==0)
                                                {
											$pcaption="Imprimir"; $pidtxt='imprimir'.$jwib_aso['idnum1']; 
											$ponclick="jwib_asig1('".$docu."','".$jwib_aso['fanior']."','".$jwib_aso['fmesr']."')";
											include('vrbutton.php');}
									?>
									<?php if($bmodif) { ?>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
									<?php } ?>
										
									</th>
								</tr>
					<?php } ?>
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
					<?php $pfecha=$jwib_aso['fecha']; //include('jwib_geturl.php') ?>
<!-- 					<input type="text" class="jwfecha" style="display:none;" value="<?php //echo $jwib_aso['fecha'] ?>"> -->
					<?php $lsema=$jwib_aso['fsema']; ?>
								<tr id="sema<?php echo $jwib_aso['fsema']; ?>" 
										style="border-top:solid 1px;border-bottom:solid 1px;background-color: #C18626;font-size:15px; 
													 <?php if(date_diff(date_create($jwib_aso['fechar']),date_create($fechaa))->format("%a")<4){echo 'font-weight:bold;';}?>
													 display:;">
									<th  width="" style="background-color:#C18626; color:white;" 
											onclick="{window.open('<?php echo $jworgl.str_replace('-','/',$jwib_aso['fecha']); ?>','_blank');}">
										<?php if($jwib_aso['fechar']>=$fechaa){ ?>
										<a name="scroll"></a>
										<div id="scrollhere" ></div>
										<?php } ?>
										<?php echo $jwib_aso['fdianr'].' - '.$jwib_aso['fdiar'].'/'.$jwib_aso['fmesnr']; ?>
									</th>
									<th style="background-color:#C18626; color:white;">
									<?php if($bmodif || $mmae==1){ ?>	
									<?php// if($mmae==1 or 1==1){ ?>	
									<?php 
                                                if($print==0)
                                                {
											$pcaption="Principal"; $pidtxt='imprimir0'.$jwib_aso['idnum1']; 
											$ponclick="jwib_asig1('S89S','".$jwib_aso['fanior']."','".$jwib_aso['fsema']."','1','0')";
											include('vrbutton.php');}
									?>
									<?php }else{ ?>
										PRINCIPAL
									<?php } ?>
									</th>
									<th style="background-color:#C18626; color:white;">
									<?php if($bmodif || $mmae==1){ ?>	
									<?php //if($mmae==1){ ?>	
									<?php 
                                                if($print==0)
                                                {
     
											$pcaption="SALA 1"; $pidtxt='imprimir1'.$jwib_aso['idnum1']; 
											$ponclick="jwib_asig1('S89S','".$jwib_aso['fanior']."','".$jwib_aso['fsema']."','1','1')";
											include('vrbutton.php');}
									?>
									<?php }else{ ?>
										SALA 1
									<?php } ?>
									</th>
									<th style="background-color:#C18626; color:white;">
									<?php if($bmodif || $mmae==1){ ?>	
									<?php //if($mmae==1){ ?>	
									<?php 
                                                if($print==0)
                                                {
											$pcaption="SALA 2"; $pidtxt='imprimir2'.$jwib_aso['idnum1']; 
											$ponclick="jwib_asig1('S89S','".$jwib_aso['fanior']."','".$jwib_aso['fsema']."','1','2')";
											include('vrbutton.php');}
									?>
									<?php }else{ ?>
										SALA 2
									<?php } ?>
									</th>
								</tr>
					<?php } ?>
			
				<?php $jwol_smm=''; ?>
				<?php if($jwib_aso['docu']=='VM30'){$jwol_smm=$jwib_aso['jwol_smm0'];} ?>
				<?php if($jwib_aso['docu']=='VM31'){$jwol_smm=$jwib_aso['jwol_smm1'];} ?>
				<?php if($jwib_aso['docu']=='VM32'){$jwol_smm=$jwib_aso['jwol_smm2'];} ?>
				<?php if($jwib_aso['docu']=='VM33'){$jwol_smm=$jwib_aso['jwol_smm3'];} ?>
				<tr style="border-bottom:dotted 1px; <?php if($jwol_smm=='' and $jwib_aso['jwol_smm0']!=''){echo 'display:none;';} ?>" align="center" valign="top" >
					<td align="">
						<?php if($jwol_smm!=''){echo $jwol_smm;}else{echo $jwib_aso['docu_descri']; } ?>
						<?php //echo $jwib_aso['docu_descri']; ?>
<!-- 						<br> -->
						<?php //echo $jwol_smm; ?>
					</td>

					
				<?php  //$salas=2; ?>
					
					<?php for ($csala=0;$csala<=3;$csala++) { ?>
					<?php //if(($full or $mmae==1) and $jwib_aso['fechar']>=date('Y-m-d')) {?>
					<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<td style="<?php if($csala>$salas){echo 'display:none;';} ?>" >
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_sala'.$csala]; $pobj=5; $pdefa=$jwib_aso['nom1sala'.$csala]; $plong=20; $pdocu=$jwib_aso['docu']; $pcolu='nombre1'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_sala'.$csala]."').click()}";
                  $plist='dl_nom1_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
							<?php $ptabla='orat'; $pidtxt='orat'.$jwib_aso['idn_sala'.$csala]; $pobj=5; $pdefa=$jwib_aso['oratsala'.$csala]; $pdisab='0'; $plist='dl_orat'; include('vrgetcod.php'); ?>
								<div style="<?php if($jwib_aso['docu']=='VM30'){echo 'display:none;';} ?>" >
								<br>
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_sala'.$csala]; $pobj=5; $pdefa=$jwib_aso['nom2sala'.$csala]; $plong=20; $pdocu=$jwib_aso['docu']; $pcolu='nombre2';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_sala'.$csala]."').click()}";
                  $plist='dl_nom2_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
								</div>
								<br>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_sala'.$csala]; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_sala'.$csala]."','".$docu."','nom1".$jwib_aso['idn_sala'.$csala]."','nom2".$jwib_aso['idn_sala'.$csala]."','orat".$jwib_aso['idn_sala'.$csala]."')";
								 include('vrbutton.php'); ?>
								<br>
						</td>
					<?php }else{ ?>
						<td>
								<div style="<?php if(date_diff(date_create($jwib_aso['fechar']),date_create($fechaa))->format("%a")<4){echo 'font-weight:bold;';}?>;">
                 <?php 
                   gen_icsjw($jwib_aso['idn_sala'.$csala]); 
                   $xref='_doc/'.$jwib_aso['docu'].'_'.fillzero($jwib_aso['idn_sala'.$csala]).'.ics';
                 ?>
									<a href="<?phpecho $xref; ?>" target="_blank">
								<?php echo (($jwib_aso['nom1sala'.$csala])); ?>
									</a>
										<?php
											$xorat=$jwib_aso['oratsala'.$csala];
											$xrefn=$xorat;
											if($xorat>=1){$xrefn=$xorat+1;}
											if($xorat>=34){$xrefn=$xorat+2;}
											if($xorat>=35){$xrefn=$xorat+3;}
											$xref= 'http://wol.jw.org/es/wol/d/r4/lp-s/110200'.(1068+$xrefn); 
										?>
									<?php //if(($full or $mmae==1) and $xorat>0){ ?>
									<?php if($xorat>0){ ?>
									<a href="<?phpecho $xref; ?>" target="_blank">
										<?php echo '('.$jwib_aso['oratsala'.$csala].')'; ?>
									</a>
									<?php } ?>
								</div>
								<div style="<?php if($jwib_aso['docu']=='VM30'){echo 'display:none;';} ?>;" >
<!-- 								<br> -->
								<?php echo ucwords2(strtolower($jwib_aso['nom2sala'.$csala])); ?>
								</div>
						</td>
					<?php } ?>
					<?php } ?>
				</tr>
				<?php } ?>
		</table>
		<?php } ?>

		<?php if($mobile=='true' and !$printer){ ?>
<?php // echo $jwib_sql; ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; $psize=30;include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>

			<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
			
		<table cellspacing="0" cellpadding="2" width="100%" border=1
					 style="border-collapse:collapse;border:#000000 solid 2px;background-color:white; font-size:<?php echo $xfontsize;?>px;" 
					 >
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php $ldocu=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
				<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #C18626; font-size:<?php echo $xfontsize;?>px; ">
									<th align="center" style="" colspan=3 >
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
<!-- 									<th width="" colspan=1 style="background-color:#C18626; font-size:<?php echo $xfontsize;?>px; color:white;">SEAMOS MEJORES MAESTROS</th> -->
								</tr>
					<?php } ?>
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
					<?php $pfecha=$jwib_aso['fecha']; //include('jwib_geturl.php') ?>
<!-- 					<input type="text" class="jwfecha" style="display:none;" value="<?php //echo $jwib_aso['fecha'] ?>"> -->
					<?php $lsema=$jwib_aso['fsema']; ?>
					<?php $ldocu=''; ?>
								<tr style="border-top:solid 1px;border-bottom:solid 1px;background: #C18626;
													 font-size:<?php echo $xfontsize;?>px; display:;">
									<th style="background-color:#C18626; color:white;" colspan=3 
											onclick="{window.open('<?php echo $jworgl.str_replace('-','/',$jwib_aso['fecha']); ?>','_blank');}">
										<?php if($jwib_aso['fechar']>=$fechaa){ ?>
										<a name="scroll"></a>
										<div id="scrollhere" ></div>
										<?php } ?>
										<?php echo $jwib_aso['fdianr'].' - '.$jwib_aso['fdiar'].' /'.$jwib_aso['fmesnr']; ?>
									</th>
								</tr>
								<tr style="border-top:solid 1px;border-bottom:solid 1px;background: #C18626;
													 font-size:<?php echo $xfontsize;?>px; display:none;">
									<td style="background-color:#C18626; color:white;" align="left" >
										<?php echo '1'; ?>
									</td>
									<th style="background-color:#C18626; color:white;" align="left" >
										<?php echo '2'; ?>
									</th>
									<th style="background-color:#C18626; color:white;" align="left" >
										<?php echo '3'; ?>
									</th>
								</tr>
					<?php } ?>
			
					<?php if($jwib_aso['docu']!=$ldocu){ ?>
					<?php $ldocu=$jwib_aso['docu']; ?>

							<?php $jwol_smm=''; ?>
							<?php if($jwib_aso['docu']=='VM30'){$jwol_smm=$jwib_aso['jwol_smm0'];} ?>
							<?php if($jwib_aso['docu']=='VM31'){$jwol_smm=$jwib_aso['jwol_smm1'];} ?>
							<?php if($jwib_aso['docu']=='VM32'){$jwol_smm=$jwib_aso['jwol_smm2'];} ?>
							<?php if($jwib_aso['docu']=='VM33'){$jwol_smm=$jwib_aso['jwol_smm3'];} ?>
			
							<tr style="border-top:solid 2px;border-bottom:solid 2px; " align="center" valign="top">
								<td align="left"  colspan=3 style="font-size:<?php echo $xfontsize;?>px;">
									<?php $jwol_smm=str_replace('<br>',' ',$jwol_smm); ?>
									<?php $jwol_smm=str_replace('<div ','<div style="font-size:'.$xfontsize*(.7).'px;" ',$jwol_smm); ?>
									<?php //$jwol_smm=str_replace('<div ','<div style="font-size:90%;" ',$jwol_smm); ?>
									<?php echo $jwol_smm; ?>
								</td>
							</tr>
					<?php } ?>
			
				<tr style="border-bottom:solid 1px;">
					<?php for ($csala=0;$csala<=2;$csala++) { ?>
					<?php //if(($full or $mmae==1) and $jwib_aso['fechar']>=date('Y-m-d')) {?>
					<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<td style="font-size:<?php echo $xfontsize;?>px;<?php if($csala>$salas){echo 'display:none;';} ?>" align="center" valign="top">
								<i><small>
								<?php if($csala==0){echo 'PRINCIPAL';}else{echo $csala;}; ?>
								<br>
								</small></i>
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_sala'.$csala]; $pobj=5; $pdefa=$jwib_aso['nom1sala'.$csala]; $plong=20; $pdocu=$jwib_aso['docu']; $psize=25; $pcolu='nombre1'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_sala'.$csala]."').click()}";
                  $plist='dl_nom1_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
							<?php $ptabla='orat'; $pidtxt='orat'.$jwib_aso['idn_sala'.$csala]; $pobj=5; $pdefa=$jwib_aso['oratsala'.$csala]; $psize=25; $plist='dl_orat'; include('vrgetcod.php'); ?>
							<div style="<?php if($jwib_aso['docu']=='VM30'){echo 'display:none;';} ?>" >
								<br>
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_sala'.$csala]; $pobj=5; $pdefa=$jwib_aso['nom2sala'.$csala]; $plong=20; $pdocu=$jwib_aso['docu']; $psize=25; $pcolu='nombre2';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_sala'.$csala]."').click()}";
                  $plist='dl_nom2_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
								</div>
								<br>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_sala'.$csala]; $psize=20; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_sala'.$csala]."','".$docu."','nom1".$jwib_aso['idn_sala'.$csala]."','nom2".$jwib_aso['idn_sala'.$csala]."','orat".$jwib_aso['idn_sala'.$csala]."')";
								 include('vrbutton.php'); ?>
								<br>
						</td>
					<?php }else{ ?>
<!-- 						<td style="font-size:<?php //echo $xfontsize;?>px;" align="center" valign="top" > -->
						<td style="font-size:100%;" align="center" valign="top" >
								<i><small>
								<?php if($csala==0){echo 'PRINCIPAL';}else{echo $csala;}; ?>
								<br>
								</small></i>
								<div style="<?php if(date_diff(date_create($jwib_aso['fechar']),date_create($fechaa))->format("%a")<4) {echo 'font-weight:bold;';} ?>">
                 <?php 
                   gen_icsjw($jwib_aso['idn_sala'.$csala]); 
                   $xref='_doc/'.$jwib_aso['docu'].'_'.fillzero($jwib_aso['idn_sala'.$csala]).'.ics';
                 ?>
									<a href="<?phpecho $xref; ?>" target="_blank">
								<?php echo (($jwib_aso['nom1sala'.$csala])); ?>
									</a>
                  
								<?php //echo ''.(($jwib_aso['nom1sala'.$csala]));   ?>
										<?php
											$xorat=$jwib_aso['oratsala'.$csala];
											$xrefn=$xorat;
											if($xorat>=1){$xrefn=$xorat+1;}
											if($xorat>=34){$xrefn=$xorat+2;}
											if($xorat>=35){$xrefn=$xorat+3;}
											$xref= 'http://wol.jw.org/es/wol/d/r4/lp-s/110200'.(1068+$xrefn); 
										?>
									<?php //if(($full or $mmae==1) and $xorat>0){ ?>
									<?php if($xorat>0){ ?>
									<a href="<?phpecho $xref; ?>" target="_blank"><?php echo '('.$jwib_aso['oratsala'.$csala].')'; ?></a>
									<?php }?>
								<br>
								</div>	
								<?php echo ucwords2(strtolower($jwib_aso['nom2sala'.$csala])); ?>
								<br>
								<?php if($csala==0){echo '<br>';} ?>
						</td>
					<?php } ?>
					<?php } ?>
			</tr>
				<?php } ?>
		</table>

		<?php } ?>

		<?php if($printer){ ?>
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>
		<?php echo 'MEJORES MAESTROS'; ?>
		</title>
		<style type="text/css">
		/* body{ font-family:"Courier New", Courier, monospace;} */
		@page {
		/*    size: 7in 9.25in; */
		/* 	 top left bott right */
		/*     size: 210mm 297mm;  */
		/*     margin: 0mm 10mm 10mm 0mm; /* 	top right bottom left */ */
				size: 105mm 148mm; 
				margin: 20mm 5mm 0mm 5mm; /* 	top right bottom left */
		}

		</style>

		</head>
		<body>


		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;" border=0>
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
				<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #C18626;">
									<th width="40%" align="center" style="">
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
									<th width="" colspan=2 style="background-color:#C18626; color:white;">SEAMOS MEJORES MAESTROS</th>
									<th width="" align="right">
									</th>
								</tr>
					<?php } ?>
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
					<?php $pfecha=$jwib_aso['fecha']; //include('jwib_geturl.php') ?>
<!-- 					<input type="text" class="jwfecha" style="display:none;" value="<?php //echo $jwib_aso['fecha'] ?>"> -->
					<?php $lsema=$jwib_aso['fsema']; ?>
								<tr style="border-top:solid 1px;border-bottom:solid 1px;background: #C18626;font-size:15px; display:;">
									<th style="background-color:#C18626; color:white;">
										<?php echo $jwib_aso['fdianr'].' - '.$jwib_aso['fdiar'].'/'.$jwib_aso['fmesnr']; ?>
									</th>
									<th style="background-color:#C18626; color:white;">PRINCIPAL</th>
									<th style="background-color:#C18626; color:white;">SALA 1</th>
									<th style="background-color:#C18626; color:white;">SALA 2</th>
								</tr>
					<?php } ?>
			
				<tr style="border-bottom:dotted 1px; <?php if($jwib_aso['fsema']==$semaa){echo '';}?>" align="center" valign="center">
					<td align="center" style="font-size:12px;">
						<?php if($jwib_aso['docu']=='VM30'){echo $jwib_aso['jwol_smm0'];} ?>
						<?php if($jwib_aso['docu']=='VM31'){echo $jwib_aso['jwol_smm1'];} ?>
						<?php if($jwib_aso['docu']=='VM32'){echo $jwib_aso['jwol_smm2'];} ?>
						<?php if($jwib_aso['docu']=='VM33'){echo $jwib_aso['jwol_smm3'];} ?>
					</td>

					<?php for ($csala=0;$csala<=2;$csala++) { ?>
					<td align="center" style="font-size:12px;">
								<?php echo (($jwib_aso['nom1sala'.$csala])); ?>
								<br>
								<?php echo ucwords2(strtolower($jwib_aso['nom2sala'.$csala])); ?>
						</td>
					<?php } ?>
				</tr>
				<?php } ?>
			
			<tr style="border-top:solid 2px;">
				<td colspan="4" align="right">
				<?php echo 'jwib.vcrxol.com/?'.$cong_codigo; ?>
				</td>
			</tr>
		</table>

		<?php } ?>

<?php } ?>
      
<?php if(mb_stristr('VIDA',$docu)) { ?>
  <?php if($modif==1){ ?>
      <?php $pdocu='VM11'; $pcolu='nombre1'; $pidtxt='dl_nom1_'.strtolower($pdocu); include('vrsetlist.php'); ?>
      <?php $pdocu='VM19'; $pcolu='nombre1'; $pidtxt='dl_nom1_'.strtolower($pdocu); include('vrsetlist.php'); ?>
      <?php $pdocu='VM21'; $pcolu='nombre1'; $pidtxt='dl_nom1_'.strtolower($pdocu); include('vrsetlist.php'); ?>
      <?php $pdocu='VM41'; $pcolu='nombre1'; $pidtxt='dl_nom1_'.strtolower($pdocu); include('vrsetlist.php'); ?>
      
      <?php $pdocu='VM11'; $pcolu='nombre2'; $pidtxt='dl_nom2_'.strtolower($pdocu); include('vrsetlist.php'); ?>
      <?php $pdocu='VM19'; $pcolu='nombre2'; $pidtxt='dl_nom2_'.strtolower($pdocu); include('vrsetlist.php'); ?>
      <?php $pdocu='VM21'; $pcolu='nombre2'; $pidtxt='dl_nom2_'.strtolower($pdocu); include('vrsetlist.php'); ?>
      <?php $pdocu='VM41'; $pcolu='nombre2'; $pidtxt='dl_nom2_'.strtolower($pdocu); include('vrsetlist.php'); ?>
    <?php } ?>  
		<?php if($mobile=='false' and !$printer){ ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<?php $lmes=''; ?>
		<?php $lsema=''; ?>
			
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;" border=0>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){ ?>  
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
					<?php $pfecha=$jwib_aso['fecha'];?>
					<?php $lsema=$jwib_aso['fsema']; ?>
					<?php } ?>
				<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: white;">
									<th width="1%" align="center" style="">
					<?php if($jwib_aso['fanior'].$jwib_aso['fmesr']>=$prdoa){  ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
									<th width="10%" colspan=2 style="background-color:#799FCC; color:white;">VIDA Y MINISTERIO</th>
									<th width="1%"></th>
									<th width="15%" colspan=2 style="background-color:#799FCC; color:white;">ORACION</th>
									<th width="1%"></th>
									<th width="35%" colspan=2 style="background-color:#5A6A70; color:white;">TESOROS DE LA BIBLIA</th>
									<th width="1%"></th>
									<th width="30%" colspan=2 style="background-color:#961526; color:white;">NUESTRA VIDA CRISTIANA</th>
									<th width="1%">
									<?php 
                                                if($print==0)
                                                {
                                                     
											$pcaption="Imprimir"; $pidtxt='imprimir'.$jwib_aso['idnum1']; 
											$ponclick="jwib_asig1('".$docu."','".$jwib_aso['fanior']."','".$jwib_aso['fmesr']."')";
											include('vrbutton.php');}
									?>
									<?php if($bmodif || $vida==1){ ?>	
									<?php 
                                                if($print==0)
                                                {
											$pcaption="Asignaciones"; $pidtxt='imprimir0'.$jwib_aso['idnum1']; 
											$ponclick="jwib_asig1('AVMC','".$jwib_aso['fanior']."','".$jwib_aso['fmesr']."')";
											include('vrbutton.php');}
									?>
									<?php } ?>	
									</th>
								</tr>
								<tr style="border-bottom:solid 1px;background: #A9F5F2;font-size:12px; display:;">
									<th></th>
									<th style="background-color:#799FCC; color:white;">PRESIDENTE</th>
									<th style="background-color:#799FCC; color:white;">S.AUXILIAR</th>
									<th></th>
									<th style="background-color:#799FCC; color:white;">INICIAL</th>
									<th style="background-color:#799FCC; color:white;">FINAL</th>
									<th></th>
									<th style="background-color:#5A6A70; color:white;">DISCURSO 1</th>
									<th style="background-color:#5A6A70; color:white;">PERLAS ESCONDIDAS</th>
									<th style=""></th>
									<th style="background-color:#961526; color:white;">ASIGNACION 1</th>
									<th style="background-color:#961526; color:white;" width="15%">ASIGNACION 2</th>
									<th>
									<?php if($bmodif) { ?>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')";  $pabrev=""; include('vrbutton.php');?>
									<?php } ?>

									</th>
								</tr>
					<?php } ?>
				<tr style="<?php if(date_diff(date_create($jwib_aso['fechar']),date_create($fechaa))->format('%a')<4){echo 'font-weight:bold;';}?>" align="center" valign="top" >
					<td onclick="{window.open('<?php echo $jworgl.str_replace('-','/',$jwib_aso['fecha']); ?>','_blank');}">
						<?php echo $jwib_aso['fdianr'].' /'.$jwib_aso['fdiar'] ?>
					</td>

					<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<td>
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_vmc']; $pobj=5; $pdefa=$jwib_aso['nom1vmc']; $plong=20; $pdocu='VM11'; $pcolu='nombre1'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_vmc']."').click()}";
                  $plist='dl_nom1_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
						</td>
						<td>
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_vmc']; $pobj=5; $pdefa=$jwib_aso['nom2vmc']; $plong=20; $pdocu='VM11'; $pcolu='nombre2';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_vmc']."').click()}";
                  $plist='dl_nom2_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>

							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_vmc']; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_vmc']."','".$docu."','nom1".$jwib_aso['idn_vmc']."','nom2".$jwib_aso['idn_vmc']."')";
								 include('vrbutton.php'); ?>
						</td>
						<td>
						</td>
					<?php }else{ ?>
						<td><?php echo (($jwib_aso['nom1vmc'])); ?></td>
						<td><?php echo (($jwib_aso['nom2vmc'])); ?></td>
						<td></td>
					<?php } ?>

					<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<td>
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_ora']; $pobj=5; $pdefa=$jwib_aso['nom1ora']; $plong=20; $pdocu='VM19'; $pcolu='nombre1'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_ora']."').click()}";
                  $plist='dl_nom1_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
						</td>
						<td>
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_ora']; $pobj=5; $pdefa=$jwib_aso['nom2ora']; $plong=20; $pdocu='VM19'; $pcolu='nombre2';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_ora']."').click()}";
                  $plist='dl_nom2_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_ora']; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_ora']."','".$docu."','nom1".$jwib_aso['idn_ora']."','nom3".$jwib_aso['idn_ora']."','nom4".$jwib_aso['idn_ora']."')";
								 include('vrbutton.php'); ?>
						</td>
						<td>
						</td>
					<?php }else{ ?>
						<td><?php echo (($jwib_aso['nom1ora'])); ?></td>
						<td><?php echo (($jwib_aso['nom2ora'])); ?></td>
						<td></td>
					<?php } ?>

					<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<td>
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_tdb']; $pobj=5; $pdefa=$jwib_aso['nom1tdb']; $plong=20; $pdocu='VM21'; $pcolu='nombre1';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_tdb']."').click()}";
                  $plist='dl_nom1_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
							<?php echo $jwib_aso['jwol_tdb1'];?>
							<br>
						</td>
						<td>
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_tdb']; $pobj=5; $pdefa=$jwib_aso['nom2tdb']; $plong=20; $pdocu='VM21'; $pcolu='nombre2';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_tdb']."').click()}";
                  $plist='dl_nom2_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
							<?php echo $jwib_aso['jwol_tdb2'];?>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_tdb']; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_tdb']."','".$docu."','nom1".$jwib_aso['idn_tdb']."','nom2".$jwib_aso['idn_tdb']."')";
								 include('vrbutton.php'); ?>
						</td>
						<td>
						</td>
					<?php }else{ ?>
						<td>
							<?php echo (($jwib_aso['nom1tdb'])); ?>
							<br>
							<?php echo $jwib_aso['jwol_tdb1'];?>
							<br>
						</td>
						<td>
							<?php echo (($jwib_aso['nom2tdb'])); ?>
							<br>
							<?php echo $jwib_aso['jwol_tdb2'];?>
						</td>
					<td></td>
					<?php } ?>

					<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<td>
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_nvc']; $pobj=5; $pdefa=$jwib_aso['nom1nvc']; $plong=20; $pdocu='VM41'; $pcolu='nombre1';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_nvc']."').click()}";
                  $plist='dl_nom1_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
							<?php echo $jwib_aso['jwol_nvc1'];?>
						</td>
						<td>
								<?php if($jwib_aso['jwol_nvc2']==""){$phide=1;};?>
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_nvc']; $pobj=5; $pdefa=$jwib_aso['nom2nvc']; $plong=20; $pdocu='VM41'; $pcolu='nombre2';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_nvc']."').click()}";
                  $plist='dl_nom2_'.strtolower($pdocu);                                                                   
									include('vrgettxt.php'); ?>
							<?php echo $jwib_aso['jwol_nvc2'];?>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_nvc']; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_nvc']."','".$docu."','nom1".$jwib_aso['idn_nvc']."','nom2".$jwib_aso['idn_nvc']."')";
								 include('vrbutton.php'); ?>
						</td>
						<td>
						</td>
					<td></td>
					<?php }else{ ?>
						<td>
							<?php echo (($jwib_aso['nom1nvc'])); ?>
							<br>
							<?php echo $jwib_aso['jwol_nvc1'];?>
						</td>
						<td>
							<?php echo (($jwib_aso['nom2nvc'])); ?>
							<br>
                                   <?php $jwol_nvc2=$jwib_aso['jwol_nvc2']; ?>
							<?php if(mb_stristr('jw.org',$jwol_nvc2)){echo $jwol_nvc2;}?>
						</td>
					<td></td>
					<?php } ?>

					
				</tr>
				<?php } ?>
		</table>

		<?php } ?>

		<?php if($mobile=='true' and !$printer){ ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; $psize=30;include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>
			
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;font-size:<?php echo $xfontsize;?>px;"  border=0>
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
					<?php $pfecha=$jwib_aso['fecha']; //include('jwib_geturl.php') ?>
<!-- 					<input type="text" class="jwfecha" style="display:none;" value="<?php //echo $jwib_aso['fecha'] ?>"> -->
					<?php $lsema=$jwib_aso['fsema']; ?>
					<?php } ?>
			
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;font-size:<?php echo $xfontsize;?>px;">
									<th align="center" style="" colspan=3>
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
								</tr>
					<?php } ?>
				<tr style="<?php if(date_diff(date_create($jwib_aso['fechar']),date_create($fechaa))->format("%a")<4){echo 'font-weight:bold;';}?>font-size:<?php echo $xfontsize;?>px;border-top:solid 1px; border-bottom:solid 1px;background: #A9F5F2;" align="center">
						<td colspan=3 onclick="{window.open('<?php echo $jworgl.str_replace('-','/',$jwib_aso['fecha']); ?>','_blank');}">
					<?php if($jwib_aso['fechar']>=$fechaa){ ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
								<?php echo $jwib_aso['fdianr'].' - '.$jwib_aso['fechadmyr']; ?>
						</td>
				</tr>
			
				<tr style="<?php if(date_diff(date_create($jwib_aso['fechar']),date_create($fechaa))->format("%a")<4){echo 'font-weight:bold;';}?>font-size:<?php echo $xfontsize;?>px;border-top:solid 1px;" align="center">
					
				</tr>
																											 
			
					<?php if(1==1)	{ ?>
						<tr align="center" style="border-top:solid 1px;" valign="center">
						<td rowspan=4 style="background-color:#799FCC; border-right:solid 1px; ">
						<?php echo 'VMC'; ?>
						</td>
						<td style="border-right:solid 1px;" width="50%" >
							<i><?php echo 'Presidente' ?></i>
							<br>	
						</td>
						<td style="border-right:solid 1px;">
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_vmc']; $pobj=5; $pdefa=$jwib_aso['nom1vmc']; $plong=20; $psize=25; $pdocu='VM11'; $pcolu='nombre1'; 
                  $plist='dl_nom1_'.strtolower($pdocu);                                                                   
                  include('vrgettxt.php'); ?>
						<?php }else{ ?> 
							<?php echo ''.$jwib_aso['nom1vmc']; ?>
							<br>
						<?php } ?>
						</td>
						</tr>
						<tr align="center" >
						<td style="border-right:solid 1px;">
							<i><?php echo 'S.Auxiliar' ?></i>
						</td>
						<td>
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_vmc']; $pobj=5; $pdefa=$jwib_aso['nom2vmc']; $plong=20; $psize=25; $pdocu='VM11'; $pcolu='nombre2';
                  $plist='dl_nom2_'.strtolower($pdocu);                                                                   
                include('vrgettxt.php'); ?>
						<?php }else{ ?> 
							<?php echo ''.$jwib_aso['nom2vmc']; ?>
							<br>
						<?php } ?>
						</td>
						</tr>
						<tr align="center" >
						<td style="border-right:solid 1px;" width="50%" >
							<i><?php echo 'Oración Inicial' ?></i>
							<br>	
						</td>
						<td style="border-right:solid 1px;">
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_ora']; $pobj=5; $pdefa=$jwib_aso['nom1ora']; $plong=20; $psize=25; $pdocu='VM11'; $pcolu='nombre1';
                  $plist='dl_nom1_'.strtolower($pdocu);                                                                   
              include('vrgettxt.php'); ?>
						<?php }else{ ?> 
							<?php echo ''.$jwib_aso['nom1ora']; ?>
							<br>
						<?php } ?>
						</td>
						</tr>
						<tr align="center" >
						<td style="border-right:solid 1px;">
							<i><?php echo 'Oración Final' ?></i>
						</td>
						<td>
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_ora']; $pobj=5; $pdefa=$jwib_aso['nom2ora']; $plong=20; $psize=25; $pdocu='VM11'; $pcolu='nombre2';
                  $plist='dl_nom2_'.strtolower($pdocu);                                                                   
              include('vrgettxt.php'); ?>
						<?php }else{ ?> 
							<?php echo ''.$jwib_aso['nom2ora']; ?>
						<?php } ?>
						</td>
						</tr>
						<tr>
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
							<td></td>
							<td style="border-right:solid 1px;"></td>
							<td>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_ora']; $psize=25;
									//$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_ora']."','".$docu."','nom1".$jwib_aso['idn_ora']."','nom2".$jwib_aso['idn_ora']."')";
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_ora']."','".$docu."','nom1".$jwib_aso['idn_ora']."','nom2".$jwib_aso['idn_ora']."');"."jwib_graba1('".$pidtxt."','".$jwib_aso['idn_vmc']."','".$docu."','nom1".$jwib_aso['idn_vmc']."','nom2".$jwib_aso['idn_vmc']."')";
								 include('vrbutton.php'); ?>
							<br>
							</td>
						<?php } ?>
						</tr>

						<tr align="center" style="border-top:solid 1px;" valign="center">
						<td rowspan=2 style="background-color:#5A6A70; border-right:solid 1px; ">
						<?php echo 'TDB'; ?>
						</td>
						<td style="border-right:solid 1px;"  valign="center">
							<?php //echo $tdb1; ?>
							<?php echo $jwib_aso['jwol_tdb1']; ?>
							<br>
						</td>
						<td style="border-right:solid 1px;" >
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_tdb']; $pobj=5; $pdefa=$jwib_aso['nom1tdb']; $plong=20; $psize=25; $pdocu='VM21'; $pcolu='nombre1';
                  $plist='dl_nom1_'.strtolower($pdocu);                                                                   
                include('vrgettxt.php'); ?>
						<?php }else{ ?> 
							<?php echo ''.$jwib_aso['nom1tdb']; ?>
						<?php } ?>
						</td>
						</tr>
						<tr align="center" valign="center">
						<td style="border-right:solid 1px;">
								<?php //echo $tdb2; ?>
							<?php echo $jwib_aso['jwol_tdb2'];?>
							
						</td>
						<td>
						<?php //if(($full or $vida==1) and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_tdb']; $pobj=5; $pdefa=$jwib_aso['nom2tdb']; $plong=20; $psize=25; $pdocu='VM21'; $pcolu='nombre2';
                  $plist='dl_nom2_'.strtolower($pdocu);                                                                   
                include('vrgettxt.php'); ?>
						<?php }else{ ?> 
							<?php echo ''.$jwib_aso['nom2tdb']; ?>
						<?php } ?>
						</td>
						</tr>
						<tr>
						<?php //if(($full or $vida==1) and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
							<td></td>
							<td style="border-right:solid 1px;"></td>
							<td>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_tdb']; $psize=25;
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_tdb']."','".$docu."','nom1".$jwib_aso['idn_tdb']."','nom2".$jwib_aso['idn_tdb']."')";
								 include('vrbutton.php'); ?>
							<br>
							</td>
						<?php } ?>
						</tr>

						<tr align="center" style="border-top:solid 1px;" valign="center">
						<td rowspan=2 style="background-color:#961526; border-right:solid 1px; ">
						<?php echo 'NVC'; ?>
						</td>
						<td style="border-right:solid 1px;"  >
							<?php //echo $nvc1; ?>
							<?php echo $jwib_aso['jwol_nvc1'];?>
							
							<br>
						</td>
						<td style="border-right:solid 1px;">
						<?php //if(($full or $vida==1) and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
								<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idn_nvc']; $pobj=5; $pdefa=$jwib_aso['nom1nvc']; $plong=20; $psize=25; $pdocu='VM41'; $pcolu='nombre1';
                  $plist='dl_nom1_'.strtolower($pdocu);                                                                   
                include('vrgettxt.php'); ?>
						<?php }else{ ?> 
							<?php echo ''.$jwib_aso['nom1nvc']; ?>
							<?php } ?>
						</td>
						</tr>
						<tr align="center" valign="center">
						<td style="border-right:solid 1px;">
							<i><?php //echo 'Asignación 2' ?></i>
							<?php //echo $nvc2; ?>
							<?php echo $jwib_aso['jwol_nvc2'];?>
						</td>
						<td>
						<?php //if(($full or $vida==1) and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
								<?php if($jwib_aso['jwol_nvc2']==""){$phide=1;};?>							
								<?php $pcaption='Nombre'; $pidtxt='nom2'.$jwib_aso['idn_nvc']; $pobj=5; $pdefa=$jwib_aso['nom2nvc']; $plong=20; $psize=25; $pdocu='VM41'; $pcolu='nombre2';
                  $plist='dl_nom2_'.strtolower($pdocu);                                                                   
                include('vrgettxt.php'); ?>
						<?php }else{ ?> 
							<?php echo ''.$jwib_aso['nom2nvc']; ?>
						<?php } ?>
						</td>
						</tr>
						<tr style="border-bottom:solid 1px;">
						<?php //if(($full or $vida==1) and $jwib_aso['fechar']>=date('Y-m-d')) {?>
						<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
							<td></td>
							<td style="border-right:solid 1px;"></td>
							<td>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_nvc']; $psize=25;
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_nvc']."','".$docu."','nom1".$jwib_aso['idn_nvc']."','nom2".$jwib_aso['idn_nvc']."')";
								 include('vrbutton.php'); ?>
							<br>
							</td>
						<?php } ?>
						</tr>


			
				<?php } ?>
					

				<?php } ?>
			
		</table>

		<?php } ?>

		<?php if($printer){ ?>
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>
		<?php echo 'VIDA Y MINISTERIO'; ?>
		</title>
		<style type="text/css">
		/* body{ font-family:"Courier New", Courier, monospace;} */
		@page {
		/*    size: 7in 9.25in; */
		/* 	 top left bott right */
		/*     size: 210mm 297mm;  */
		/*     margin: 0mm 10mm 10mm 0mm; /* 	top right bottom left */ 
				size: 105mm 148mm; 
				margin: 20mm 5mm 0mm 5mm; /* 	top right bottom left */
		}

		</style>

		</head>
		<body>

	
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<table cellspacing="0" cellpadding="2" width="50%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;font-size:12px;"  border=0>
			<?php $lmes=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;font-size:15px;">
									<th align="center" style="" colspan=3>
										<?php echo 'ASIGNACIONES PARA LA REUNION '; ?>
										<br>
										<?php echo 'VIDA Y MINISTERIO : '.$jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
								</tr>
					<?php } ?>
				<tr style="font-size:15px;border-top:solid 1px; border-bottom:solid 1px;background: #A9F5F2;" align="center">
						<td colspan=3>
								<?php echo $jwib_aso['fdianr'].' - '.$jwib_aso['fechadmyr']; ?>
						</td>
				</tr>
			
				<tr style="font-size:15px;border-top:solid 1px;" align="center">
					
				</tr>
																											 
					<?php if(1==1)	{ ?>
						<tr align="center" style="border-top:solid 1px;">
						<td rowspan=4 style="background-color:#799FCC; border-right:solid 1px; ">
						<?php echo 'VMC'; ?>
						</td>
						<td style="border-right:solid 1px;" width="50%" >
							<i><?php echo 'Presidente' ?></i>
						</td>
						<td style="border-right:solid 1px;" width="45%">
							<?php echo ''.$jwib_aso['nom1vmc']; ?>
						</td>
						</tr>
						<tr align="center">
						<td style="border-right:solid 1px;">
							<i><?php echo 'S.Auxiliar' ?></i>
						</td>
						<td>
							<?php echo ''.$jwib_aso['nom2vmc']; ?>
						</td>
						</tr>
						<tr align="center">
						<td style="border-right:solid 1px;" width="50%" >
							<i><?php echo 'Oración Inicial' ?></i>
						</td>
						<td style="border-right:solid 1px;" width="45%">
							<?php echo ''.$jwib_aso['nom1ora']; ?>
						</td>
						</tr>
						<tr align="center">
						<td style="border-right:solid 1px;">
							<i><?php echo 'Oración Final' ?></i>
						</td>
						<td>
							<?php echo ''.$jwib_aso['nom2ora']; ?>
						</td>
						</tr>

						<tr align="center" style="border-top:solid 1px;">
						<td rowspan=2 style="background-color:#5A6A70; border-right:solid 1px; ">
						<?php echo 'TDB'; ?>
						</td>
						<td style="border-right:solid 1px;"  >
							<i><?php echo $jwib_aso['jwol_tdb1']; ?></i>
						</td>
						<td style="border-right:solid 1px;">
							<?php echo ''.$jwib_aso['nom1tdb']; ?>
						</td>
						</tr>
						<tr align="center">
						<td style="border-right:solid 1px;">
							<i><?php echo $jwib_aso['jwol_tdb2']; ?></i>
						</td>
						<td>
							<?php echo ''.$jwib_aso['nom2tdb']; ?>
						</td>
						</tr>

						<tr align="center" style="border-top:solid 1px;">
						<td rowspan=2 style="background-color:#961526; border-right:solid 1px; ">
						<?php echo 'NVC'; ?>
						</td>
						<td style="border-right:solid 1px;"  >
							<i><?php echo $jwib_aso['jwol_nvc1']; ?></i>
						</td>
						<td style="border-right:solid 1px;">
							<?php echo ''.$jwib_aso['nom1nvc']; ?>
						</td>
						</tr>
						<tr align="center" >
						<td style="border-right:solid 1px; ">
							<i><?php echo $jwib_aso['jwol_nvc2']; ?></i>
						</td>
						<td>
							<?php echo ''.$jwib_aso['nom2nvc']; ?>
						</td>
						</tr>


			
				<?php } ?>
					

				<?php } ?>
			<tr style="border-top:solid 2px;">
				<td colspan="3" align="right">
				<?php echo 'jwib.vcrxol.com/?'.$cong_codigo; ?>
				</td>
			</tr>
		</table>


		<?php } ?>

<?php } ?>

<?php if(mb_stristr('REUN',$docu)) { ?>
		<?php if($mobile=='false' and !$printer){ ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
			<?php //echo $jwib_sql;?>
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;" border=0>
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
					<?php $lsema=$jwib_aso['fsema']; ?>
					<?php } ?>
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;">
									<th align="center" style="" width="">
					<?php if($jwib_aso['fanior'].$jwib_aso['fmesr']>=$prdoa){  ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
									<th colspan=3 width="">REUNION VIDA MINISTERIO </th>
									<th colspan=3 width="">DISCURSO PUBLICO</th>
									<th>
									<?php 
                                                if($print==0)
                                                {
											$pcaption="Imprimir"; $pidtxt='imprimir'.$jwib_aso['idnum1']; 
											$ponclick="jwib_asig1('".$docu."','".$jwib_aso['fanior']."','".$jwib_aso['fmesr']."')";
											include('vrbutton.php');}
									?>
									<?php if($bmodif) { ?>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
									<?php } ?>
										
									</th>
								</tr>
								<tr style="border-bottom:solid 1px;background: #A9F5F2;font-size:12px;">
									<th width="10%">SEMANA</th>
									<th width="15%">FECHA</th>
									<th width="15%">ASISTENCIA</th>
									<th></th>
									<th width="15%">FECHA</th>
									<th width="15%">ASISTENCIA</th>
									<th></th>
								</tr>
					<?php } ?>
				<tr style="<?php if($jwib_aso['fsema']==$semaa){echo 'font-weight:bold;';}?>text-transform:capitalize;" align="center">
					<td>
						<?php echo $jwib_aso['fsemar'] ?>
					</td>
					<td style="border-left:solid 1px;">
						<?php echo $jwib_aso['fec_reu1']; ?>
					</td>
					<?php if($modif==1 and $jwib_aso['fecha_reu1']>=$fecmodasis) {?>
						<td>
								<?php $pcaption='Asis.'; $pidtxt='nom1'.$jwib_aso['idn_reu1']; $pobj=1; $pdefa=$jwib_aso['cont_reu1']; $plong=3; $pdocu='REU1'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_reu1']."').click()}";
									include('vrgetnum.php'); ?>
						</td>
						<td>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_reu1']; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_reu1']."','".$docu."','nom1".$jwib_aso['idn_reu1']."')";
								 include('vrbutton.php'); ?>
						</td>
					<?php }else{ ?>
						<td><?php echo (($jwib_aso['cont_reu1'])); ?></td>
						<th></th>
					<?php } ?>
					<td style="border-left:solid 1px;">
						<?php echo $jwib_aso['fec_reu2']; ?>
					</td>

					<?php if($modif==1 and $jwib_aso['fecha_reu2']>=$fecmodasis) {?>
						<td>
								<?php $pcaption='Asis.'; $pidtxt='nom1'.$jwib_aso['idn_reu2']; $pobj=1; $pdefa=$jwib_aso['cont_reu2']; $plong=3; $pdocu='REU2';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_reu2']."').click()}";
									include('vrgetnum.php'); ?>
						</td>
						<td>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_reu2']; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_reu2']."','".$docu."','nom1".$jwib_aso['idn_reu2']."')";
								 include('vrbutton.php'); ?>
						</td>
					<?php }else{ ?>
						<td><?php echo (($jwib_aso['cont_reu2'])); ?></td>
						<th></th>
					<?php } ?>
					</tr>
				<?php } ?>
		</table>
		<?php } ?>

		<?php if($mobile=='true' and !$printer){ ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; $psize=30;include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>

		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;"  border=0>
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
					<?php $pfecha=$jwib_aso['fecha']; //include('jwib_geturl.php') ?>

			<?php $lsema=$jwib_aso['fsema']; ?>
					<?php } ?>
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;font-size:<?php echo $xfontsize;?>px;">
									<th align="center" style="" colspan=4>
					<?php if($jwib_aso['fanior'].$jwib_aso['fmesr']>=$prdoa){  ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
								</tr>
								<tr style="border-bottom:solid 2px;background: #A9F5F2;font-size:<?php echo $xfontsize;?>px;">
									<th colspan=2 width="45%">REU. VIDA MIN</th>
									<th colspan=2 width="45%">DISC.PUBLICO</th>
								</tr>
					<?php } ?>
			
				<tr style="<?php if($jwib_aso['fsema']==$semaa){echo 'font-weight:bold;';}?>font-size:<?php echo $xfontsize;?>px;border-top:solid 1px;" align="center" valign="top">
					
					<?php if($modif==1 and $jwib_aso['fecha_reu1']>=$fecmodasis) {?>
						<td style="">
								<?php echo $jwib_aso['fec_reu1']; ?>
								<br>
						</td>
						<td style="border-right:solid 1px;">
								<?php $pcaption='Asis.'; $pidtxt='nom1'.$jwib_aso['idn_reu1']; $pobj=1; $pdefa=$jwib_aso['cont_reu1']; $plong=3; $psize=25; $pdocu='REU1'; include('vrgetnum.php'); ?>
								<br>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_reu1']; $psize=25;
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_reu1']."','".$docu."','nom1".$jwib_aso['idn_reu1']."')";
								 include('vrbutton.php'); ?>
								<br>
						</td>
					<?php }else{ ?>
						<td >
							<?php echo $jwib_aso['fec_reu1']; ?>
							<br>
						</td>
						<td style="border-right:solid 1px;">
							<?php echo ''.$jwib_aso['cont_reu1']; ?>
							<br>
						</td>

					<?php } ?>


					<?php if($modif==1 and $jwib_aso['fecha_reu2']>=$fecmodasis) {?>
						<td>
								<?php echo $jwib_aso['fec_reu2']; ?>
								<br>
						</td>
						<td>
								<?php $pcaption='Asis.'; $pidtxt='nom1'.$jwib_aso['idn_reu2']; $pobj=1; $pdefa=$jwib_aso['cont_reu2']; $plong=3; $psize=25; $pdocu='REU2';  include('vrgetnum.php'); ?>
								<br>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_reu2']; $psize=25;
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_reu2']."','".$docu."','nom1".$jwib_aso['idn_reu2']."')";
								 include('vrbutton.php'); ?>
								<br>
						</td>
					<?php }else{ ?>
						<td>
							<?php echo $jwib_aso['fec_reu2']; ?>
							<br>
						</td>
						<td>
							<?php echo ''.$jwib_aso['cont_reu2']; ?>
							<br>
						</td>
					<?php } ?>
					

				</tr>
				<?php } ?>
		</table>

		<?php } ?>

		<?php if($printer){ ?>
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>
		<?php echo 'ESTUDIOS'; ?>
		</title>
		<style type="text/css">
		/* body{ font-family:"Courier New", Courier, monospace;} */
		@page {
		/*    size: 7in 9.25in; */
		/* 	 top left bott right */
		/*     size: 210mm 297mm;  */
		/*     margin: 0mm 10mm 10mm 0mm; /* 	top right bottom left */ */
				size: 105mm 148mm; 
				margin: 20mm 5mm 0mm 5mm; /* 	top right bottom left */
		}

		</style>

		</head>
		<body>

	
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<table cellspacing="0" cellpadding="2" width="40%" style="border-collapse:collapse;border:#000000 solid 2px;font-size:12px;background-color:white; " align="left" border=0>
			<?php $lmes=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;font-size:15px;">
									<th align="center" style="" colspan=2>
										<?php echo 'ESTUDIOS PARA : '.$jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
								</tr>
								<tr style="border-bottom:solid 2px;background: #A9F5F2;font-size:15px;">
									<th colspan=1 width="45%">LIBRO</th>
									<th colspan=1 width="45%">ATALAYA</th>
								</tr>
					<?php } ?>
			
				<tr style="border-top:solid 1px;" align="center">
					
						<td valign="top" style="border-right:solid 1px;">
							<b><?php echo $jwib_aso['fec_lib']; ?></b>
							<br>
							<?php echo ''.$jwib_aso['nom1_lib']; ?>
							<br>
							<?php echo ''.$jwib_aso['nom2_lib']; ?>
							<br>
							<?php echo $jwib_aso['jwol_lib1'];?>
<!-- 							<br> -->
						</td>
						<td valign="top">
							<b><?php echo $jwib_aso['fec_ata']; ?></b>
							<br>
							<?php echo ''.$jwib_aso['nom1_ata']; ?>
							<br>
							<?php echo ''.$jwib_aso['nom2_ata']; ?>
							<br>
							<?php echo $jwib_aso['jwol_ata1'];?>
<!-- 							<br> -->
						</td>
					

				</tr>
				<?php } ?>
			<tr style="border-top:solid 2px;">
				<td colspan="2" align="right">
				<?php echo 'jwib.vcrxol.com/?'.$cong_codigo; ?>
				</td>
			</tr>
		</table>


		<?php } ?>

<?php } ?>
      
<?php if(mb_stristr('ESTU',$docu)) { ?>
  <?php if($modif==1){ ?>
    <?php $pdocu='ELIB'; $pcolu='nombre1'; $pidtxt='dl_nom1_'.strtolower($pdocu); include('vrsetlist.php'); ?>
    <?php $pdocu='ELIB'; $pcolu='nombre2'; $pidtxt='dl_nom2_'.strtolower($pdocu); include('vrsetlist.php'); ?>
    <?php $pdocu='EATA'; $pcolu='nombre1'; $pidtxt='dl_nom1_'.strtolower($pdocu); include('vrsetlist.php'); ?>
    <?php $pdocu='EATA'; $pcolu='nombre2'; $pidtxt='dl_nom2_'.strtolower($pdocu); include('vrsetlist.php'); ?>
  <?php } ?>  
      
		<?php if($mobile=='false' and !$printer){ ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;" border=0>
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
<!-- 					<input type="text" class="jwfecha" style="display:none;" value="<?php //echo $jwib_aso['fecha'] ?>"> -->
					<?php $lsema=$jwib_aso['fsema']; ?>
					<?php } ?>
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;">
									<th align="center" style="" width="">
					<?php if($jwib_aso['fanior'].$jwib_aso['fmesr']>=$prdoa){  ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
									<th colspan=3 width="">EST. L I B R O</th>
									<th></th>
									<th colspan=3 width="">EST. A T A L A Y A</th>
									<th>
									<?php 
                                                if($print==0)
                                                {
											$pcaption="Imprimir"; $pidtxt='imprimir'.$jwib_aso['idnum1']; 
											$ponclick="jwib_asig1('".$docu."','".$jwib_aso['fanior']."','".$jwib_aso['fmesr']."')";
											include('vrbutton.php');}
									?>
									<?php if($bmodif) { ?>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
									<?php } ?>
										
									</th>
								</tr>
								<tr style="border-bottom:solid 1px;background: #A9F5F2;font-size:12px;">
									<th width="5%">SEMANA</th>
									<th width="15%">FECHA</th>
									<th width="15%">CONDUCTOR</th>
									<th width="15%">LECTOR</th>
									<th></th>
									<th width="15%">FECHA</th>
									<th width="15%">CONDUCTOR</th>
									<th width="15%">LECTOR</th>
									<th width="5%"></th>
								</tr>
					<?php } ?>
				<tr style="<?php if($jwib_aso['fsema']==$semaa){echo 'font-weight:bold;';}?>text-transform:capitalize;" align="center">
					<td>
						<?php echo $jwib_aso['fsemar'] ?>
					</td>
					<td style="border-left:solid 1px;">
						<?php echo $jwib_aso['fec_lib']; ?>
							<br>
							<?php echo '<div id="jw_lib_'.$jwib_aso['fecha'].'" >'; ?>
							<?php echo $jwib_aso['jwol_lib1'];?>
							<?php echo '</div>'; ?>
					</td>
					<?php //if(($full or $estu==1) and $jwib_aso['fecha_lib']>=date('Y-m-d')) {?>
					<?php if($modif==1 and $jwib_aso['fecha_lib']>=date('Y-m-d')) {?>
						<td>
								<?php $pcaption='Conductor'; $pidtxt='nom1'.$jwib_aso['idn_lib']; $pobj=5; $pdefa=$jwib_aso['nom1_lib']; $plong=20; $pdocu='ELIB'; $pcolu='nombre1'; 
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_lib']."').click()}";
                  $plist='dl_nom1_'.strtolower($pdocu);
                  include('vrgettxt.php'); ?>
						</td>
						<td>
								<?php $pcaption='Lector'; $pidtxt='nom2'.$jwib_aso['idn_lib']; $pobj=5; $pdefa=$jwib_aso['nom2_lib']; $plong=20; $pdocu='ELIB'; $pcolu='nombre2';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_lib']."').click()}";
                  $plist='dl_nom2_'.strtolower($pdocu);
                  include('vrgettxt.php'); ?>
						</td>
						<td>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_lib']; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_lib']."','".$docu."','nom1".$jwib_aso['idn_lib']."','nom2".$jwib_aso['idn_lib']."')";
								 include('vrbutton.php'); ?>
						</td>
					<?php }else{ ?>
						<td><?php echo (($jwib_aso['nom1_lib'])); ?></td>
						<td>
                 <?php 
                   gen_icsjw($jwib_aso['idn_lib']); 
                   $xref='_doc/'.'ELIB'.'_'.fillzero($jwib_aso['idn_lib']).'.ics';
                 ?>
									<a href="<?phpecho $xref; ?>" target="_blank">
              <?php echo (($jwib_aso['nom2_lib'])); ?>
									</a>
          </td>
						<td></td>
					<?php } ?>
					<td style="border-left:solid 1px;">
						<?php echo $jwib_aso['fec_ata']; ?>
							<br>
							<?php echo '<div id="jw_ata_'.$jwib_aso['fecha'].'" >'; ?>
							<?php //echo ''.$ata1; ?>
							<?php echo $jwib_aso['jwol_ata1'];?>
							<?php echo '</div>'; ?>
							<br>
					</td>
					<?php //if(($full or $estu==1) and $jwib_aso['fecha_ata']>=date('Y-m-d')) {?>
					<?php if($modif==1 and $jwib_aso['fecha_ata']>=date('Y-m-d')) {?>
						<td>
							<?php //echo $jwib_aso['fecha_ata'] ;?>
								<?php $pcaption='Conductor'; $pidtxt='nom1'.$jwib_aso['idn_ata']; $pobj=5; $pdefa=$jwib_aso['nom1_ata']; $plong=20; $pdocu='EATA'; $pcolu='nombre1';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_ata']."').click()}";
                  $plist='dl_nom1_'.strtolower($pdocu);
                  include('vrgettxt.php'); ?>
						</td>
						<td>
								<?php $pcaption='Lector'; $pidtxt='nom2'.$jwib_aso['idn_ata']; $pobj=5; $pdefa=$jwib_aso['nom2_ata']; $plong=20; $pdocu='EATA'; $pcolu='nombre1';
									$ponclick="{document.getElementById('gra1_".$jwib_aso['idn_ata']."').click()}";
                  $plist='dl_nom2_'.strtolower($pdocu);
                  include('vrgettxt.php'); ?>
						</td>
						<td>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_ata']; 
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_ata']."','".$docu."','nom1".$jwib_aso['idn_ata']."','nom2".$jwib_aso['idn_ata']."')";
								 include('vrbutton.php'); ?>
						</td>
					<td></td>
					<?php }else{ ?>
						<td>
              <?php echo (($jwib_aso['nom1_ata'])); ?>
          </td>
						<td>
                 <?php 
                   gen_icsjw($jwib_aso['idn_ata']); 
                   $xref='_doc/'.'EATA'.'_'.fillzero($jwib_aso['idn_ata']).'.ics';
                 ?>
									<a href="<?phpecho $xref; ?>" target="_blank">
              <?php echo (($jwib_aso['nom2_ata'])); ?>
									</a>
          </td>
					<td></td>
					<?php } ?>
					</tr>
				<?php } ?>
		</table>
		<?php } ?>

		<?php if($mobile=='true' and !$printer){ ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; $psize=30;include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>

		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;"  border=0>
			<?php $lmes=''; ?>
			<?php $lsema=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fsema']!=$lsema){ ?>
					<?php $pfecha=$jwib_aso['fecha']; //include('jwib_geturl.php') ?>
<!-- 					<input type="text" class="jwfecha" style="display:none;" value="<?php //echo $jwib_aso['fecha'] ?>"> -->
					<?php $lsema=$jwib_aso['fsema']; ?>
					<?php } ?>
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;font-size:<?php echo $xfontsize;?>px;">
									<th align="center" style="" colspan=2>
					<?php if($jwib_aso['fanior'].$jwib_aso['fmesr']>=$prdoa){  ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
								</tr>
								<tr style="border-bottom:solid 2px;background: #A9F5F2;font-size:<?php echo $xfontsize;?>px;">
									<th colspan=1 width="45%">EST. LIBRO</th>
									<th colspan=1 width="45%">EST. ATALAYA</th>
								</tr>
					<?php } ?>
			
				<tr style="<?php if($jwib_aso['fsema']==$semaa){echo 'font-weight:bold;';}?>font-size:<?php echo $xfontsize;?>px;border-top:solid 1px;" align="center" valign="top">
					
					<?php //if(($full or $estu==1) and $jwib_aso['fecha_lib']>=date('Y-m-d')) {?>
					<?php if($modif==1 and $jwib_aso['fecha_lib']>=date('Y-m-d')) {?>
						<td style="border-right:solid 1px;">
								<?php echo $jwib_aso['fec_lib']; ?>
								<br>
								<?php $pcaption='Conductor'; $pidtxt='nom1'.$jwib_aso['idn_lib']; $pobj=5; $pdefa=$jwib_aso['nom1_lib']; $plong=20; $psize=25; $pdocu='ELIB'; $pcolu='nombre1'; 
                  $plist='dl_nom1_'.strtolower($pdocu);
                  include('vrgettxt.php'); ?>
								<br>
								<?php $pcaption='Lector'; $pidtxt='nom2'.$jwib_aso['idn_lib']; $pobj=5; $pdefa=$jwib_aso['nom2_lib']; $plong=20; $psize=25; $pdocu='ELIB'; $pcolu='nombre2';
                  $plist='dl_nom2_'.strtolower($pdocu);
                  include('vrgettxt.php'); ?>
								<br>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_lib']; $psize=25;
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_lib']."','".$docu."','nom1".$jwib_aso['idn_lib']."','nom2".$jwib_aso['idn_lib']."')";
								 include('vrbutton.php'); ?>
								<br>
							<?php echo '<div id="jw_lib_'.$jwib_aso['fecha'].'" >'; ?>
							<?php //echo ''.$lib1; ?>
							<?php echo $jwib_aso['jwol_lib1'];?>
							
							<?php echo '</div>'; ?>
							<br>
						</td>
					
					<?php }else{ ?>
						<td style="border-right:solid 1px;">
							<?php echo $jwib_aso['fec_lib']; ?>
							<br>
							<?php echo ''.$jwib_aso['nom1_lib']; ?>
							<br>
                 <?php 
                   gen_icsjw($jwib_aso['idn_lib']); 
                   $xref='_doc/'.'ELIB'.'_'.fillzero($jwib_aso['idn_lib']).'.ics';
                 ?>
									<a href="<?phpecho $xref; ?>" target="_blank">
              <?php echo ''.$jwib_aso['nom2_lib']; ?>
									</a>
							<br>
							<?php echo '<div id="jw_lib_'.$jwib_aso['fecha'].'" >'; ?>
							<?php //echo ''.$lib1; ?>
							<?php echo $jwib_aso['jwol_lib1'];?>
							<?php echo '</div>'; ?>
							<br>
						</td>

					<?php } ?>

					<?php //if(($full or $estu==1) and $jwib_aso['fecha_ata']>=date('Y-m-d')) {?>
					<?php if($modif==1 and $jwib_aso['fecha_ata']>=date('Y-m-d')) {?>
						<td>
								<?php echo $jwib_aso['fec_ata']; ?>
								<br>
								<?php $pcaption='Conductor'; $pidtxt='nom1'.$jwib_aso['idn_ata']; $pobj=5; $pdefa=$jwib_aso['nom1_ata']; $plong=20; $psize=25; $pdocu='EATA'; $pcolu='nombre1';
                  $plist='dl_nom1_'.strtolower($pdocu);
                  include('vrgettxt.php'); ?>
								<br>
								<?php $pcaption='Lector'; $pidtxt='nom2'.$jwib_aso['idn_ata']; $pobj=5; $pdefa=$jwib_aso['nom2_ata']; $plong=20; $psize=25; $pdocu='EATA'; $pcolu='nombre2';
                  $plist='dl_nom2_'.strtolower($pdocu);
                  include('vrgettxt.php'); ?>
							<br>
							<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idn_ata']; $psize=25;
									$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idn_ata']."','".$docu."','nom1".$jwib_aso['idn_ata']."','nom2".$jwib_aso['idn_ata']."')";
								 include('vrbutton.php'); ?>
								<br>
							<?php echo '<div id="jw_ata_'.$jwib_aso['fecha'].'" >'; ?>
							<?php //echo ''.$ata1; ?>
							<?php echo $jwib_aso['jwol_ata1'];?>
							
							<?php echo '</div>'; ?>
								<br>
						</td>
					<?php }else{ ?>
						<td>
							<?php echo $jwib_aso['fec_ata']; ?>
							<br>
								<?php echo ''.$jwib_aso['nom1_ata']; ?>
							<br>
                 <?php 
                   gen_icsjw($jwib_aso['idn_ata']); 
                   $xref='_doc/'.'EATA'.'_'.fillzero($jwib_aso['idn_ata']).'.ics';
                 ?>
									<a href="<?phpecho $xref; ?>" target="_blank">
							<?php echo ''.$jwib_aso['nom2_ata']; ?>
									</a>
							<br>
							<?php echo '<div id="jw_ata_'.$jwib_aso['fecha'].'" >'; ?>
							<?php //echo ''.$ata1; ?>
							<?php echo $jwib_aso['jwol_ata1'];?>
							
							<?php echo '</div>'; ?>
							<br>
						</td>
					<?php } ?>
					

				</tr>
				<?php } ?>
		</table>

		<?php } ?>

		<?php if($printer){ ?>
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>
		<?php echo 'ESTUDIOS'; ?>
		</title>
		<style type="text/css">
		/* body{ font-family:"Courier New", Courier, monospace;} */
		@page {
		/*    size: 7in 9.25in; */
		/* 	 top left bott right */
		/*     size: 210mm 297mm;  */
		/*     margin: 0mm 10mm 10mm 0mm; /* 	top right bottom left */ */
				size: 105mm 148mm; 
				margin: 20mm 5mm 0mm 5mm; /* 	top right bottom left */
		}

		</style>

		</head>
		<body>

	
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<table cellspacing="0" cellpadding="2" width="40%" style="border-collapse:collapse;border:#000000 solid 2px;font-size:12px;background-color:white; " align="left" border=0>
			<?php $lmes=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;font-size:15px;">
									<th align="center" style="" colspan=2>
										<?php echo 'ESTUDIOS PARA : '.$jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
								</tr>
								<tr style="border-bottom:solid 2px;background: #A9F5F2;font-size:15px;">
									<th colspan=1 width="45%">LIBRO</th>
									<th colspan=1 width="45%">ATALAYA</th>
								</tr>
					<?php } ?>
			
				<tr style="border-top:solid 1px;" align="center">
					
						<td valign="top" style="border-right:solid 1px;">
							<b><?php echo $jwib_aso['fec_lib']; ?></b>
							<br>
							<?php echo ''.$jwib_aso['nom1_lib']; ?>
							<br>
							<?php echo ''.$jwib_aso['nom2_lib']; ?>
							<br>
							<?php echo $jwib_aso['jwol_lib1'];?>
<!-- 							<br> -->
						</td>
						<td valign="top">
							<b><?php echo $jwib_aso['fec_ata']; ?></b>
							<br>
							<?php echo ''.$jwib_aso['nom1_ata']; ?>
							<br>
							<?php echo ''.$jwib_aso['nom2_ata']; ?>
							<br>
							<?php echo $jwib_aso['jwol_ata1'];?>
<!-- 							<br> -->
						</td>
					

				</tr>
				<?php } ?>
			<tr style="border-top:solid 2px;">
				<td colspan="2" align="right">
				<?php echo 'jwib.vcrxol.com/?'.$cong_codigo; ?>
				</td>
			</tr>
		</table>


		<?php } ?>

<?php } ?>

<?php if(mb_stristr('DPU1.DPU2',$docu)) { ?>
  <?php if($modif==1){ ?>
    <?php $ptabla='bsqj'; include('vrsetlist.php'); ?>
    <?php $pdocu=$docu; $pcolu='cong2_dpud'; $pidtxt='dl_dpud'; include('vrsetlist.php'); ?>
    <?php $pdocu=$docu; $pcolu='cong2_dpuh'; $pidtxt='dl_dpuh'; include('vrsetlist.php'); ?>
    <?php $pdocu=$docu; $pcolu='nombre1'; $pidtxt='dl_nom1'; include('vrsetlist.php'); ?>
  <?php } ?>  
  
		<?php if($mobile=='false' and !$printer) {?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;" border="0">
			<?php $lmes=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){?>  
			<?php if($jwib_aso['fmesr']!=$lmes){ ?>
			<tr style="height:30px;border-top:solid 2px;border-bottom:solid 1px;background: #A9F5F2;">
			<th align="center" style="">
					<?php if($jwib_aso['fanior'].$jwib_aso['fmesr']>=$prdoa){  ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
									</th>
									<th>No.</th>
									<th>BOSQUEJO</th>
									<th>TEMA</th>
									<th>
										DISCURSANTES
										<br>
									<?php if($docu=='DPU1'){echo ' VIENEN DE : '.$jwib_aso['cong2_descri'];} ?>								
									<?php if($docu=='DPU2'){echo ' VAN A : '.$jwib_aso['cong2_descri'].' / '.$jwib_aso['cong2_dpud'].' / '.$jwib_aso['cong2_dpuh'];} ?>								
									</th>

									<?php //if(($full or $dpub==1) and $jwib_aso['fechar']>=date('Y-m-d')) {?>
									<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
											<?php $pcaption='Congregacion'; $pidtxt='cong2'.$jwib_aso['idnum1']; $pobj=2; $pdefa=$jwib_aso['cong2_descri']; $plong=20; $pdocu=$docu; $pcolu='cong2_descri'; include('vrgettxt.php'); ?>
											<?php if($docu=='DPU2'){?>
											<?php $pcaption='Dia'; $pidtxt='dpud'.$jwib_aso['idnum1']; $pobj=2; $pdefa=$jwib_aso['cong2_dpud']; $plong=3; $pdocu=$docu; $pcolu='cong2_dpud'; $plist='dl_dpud'; include('vrgettxt.php'); ?>
											<?php $pcaption='Hora'; $pidtxt='dpuh'.$jwib_aso['idnum1']; $pobj=2; $pdefa=$jwib_aso['cong2_dpuh']; $plong=5; $pdocu=$docu; $pcolu='cong2_dpuh';  $plist='dl_dpuh'; include('vrgettxt.php'); ?>
											<?php } ?>
											<th>
											<?php 
                                                if($print==0)
                                                {
													$pcaption="Imprimir"; $pidtxt='imprimir'.$jwib_aso['idnum1']; 
													$ponclick="jwib_asig1('".$docu."','".$jwib_aso['fanior']."','".$jwib_aso['fmesr']."')";
													include('vrbutton.php');}
											?>
											<?php 
													$pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idnum1']; 
													$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idnum1']."','".$docu."','nom1".$jwib_aso['idnum1']."','','bsqj".$jwib_aso['idnum1']."','cong2".$jwib_aso['idnum1']."','dpud".$jwib_aso['idnum1']."','dpuh".$jwib_aso['idnum1']."')";
													include('vrbutton.php');
											?>
											</th>
									<?php }else{ ?>
											<th>
											<?php 
                                                if($print==0)
                                                {
													$pcaption="Imprimir"; $pidtxt='imprimir'.$jwib_aso['idnum1']; 
													$ponclick="jwib_asig1('".$docu."','".$jwib_aso['fanior']."','".$jwib_aso['fmesr']."')";
													include('vrbutton.php');}
											?>
									<?php if($bmodif) { ?>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
									<?php } ?>
												
											</th>
									<th></th>
									<?php } ?>
								</tr>
							<?php if($docu=='DPU2'){ ?>
									<tr>
										<td>
										<?php //echo $jwib_aso['cong2_descri']; ?>
										</td>
									</tr>
							<?php } ?>
					<?php } ?>
		<!--   <tr> -->
			<tr style="<?php if(date_diff(date_create($jwib_aso['fechar']),date_create($fechaa))->format("%a")<4){echo 'font-weight:bold;';}?>" >

				<td align="center">
					<?php echo $jwib_aso['fdianr'].' /'.$jwib_aso['fdiar']; ?>
				</td>
        

				<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
  				<td>
				  </td>
  				<td>
				  </td>
					<td>
					<?php $ptabla='bsqj'; $pidtxt='bsqj'.$jwib_aso['idnum1']; $pobj=5; $pdefa=$jwib_aso['bsqj']; $pdisab='0'; $plist='dl_bsqj'; include('vrgetcod.php'); ?>
				  </td>
  				<td>
					<?php $pcaption='Nombre'; $pidtxt='nom1'.$jwib_aso['idnum1']; $pobj=5; $pdefa=$jwib_aso['nombre1']; $plong=20; $pdocu=$docu; $pcolu='nombre1'; $plist='dl_nom1'; include('vrgettxt.php'); ?>
					</td>
  				<td>
					<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idnum1']; 
							$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idnum1']."','".$docu."','nom1".$jwib_aso['idnum1']."','','bsqj".$jwib_aso['idnum1']."')";
						 include('vrbutton.php'); ?>
					</td>
        <?php }else{ ?>
				<td align="center">
					<?php echo ($jwib_aso['bsqj']); ?>
				</td>
				<td>
					<?php echo ($jwib_aso['bsqj_descri']); ?>
				</td>
				<td>
					<?php echo $jwib_aso['bsqj_tema']; ?>
				</td>

        <?php } ?>
        
        
			</tr>

			<?php }  ?>
		</table>  
		<?php } ?>


		<?php if($mobile=='true' and !$printer) {?>
		<?php //if($mobile and !$printer) {?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; $psize=30;include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white; font-size:<?php echo $xfontsize;?>px; " border=0>
			<?php $lmes=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="height:30px;border-top:solid 2px;border-bottom:solid 1px;background: #A9F5F2;font-size:<?php echo $xfontsize;?>px;">
									<th align="center" style="">
					<?php if($jwib_aso['fanior'].$jwib_aso['fmesr']>=$prdoa){  ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
										
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
										<br>
									<?php //if(($full or $dpub==1) and $jwib_aso['fechar']>=date('Y-m-d')) {?>
									<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
									<?php $pcaption='Cong:'; $pidtxt='cong2'.$jwib_aso['idnum1']; $pobj=5; $pdefa=$jwib_aso['cong2_descri']; $plong=20; $psize=30; $pdocu=$docu; $pcolu='cong2_descri'; include('vrgettxt.php'); ?>
									<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idnum1']; $psize=30;
											$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idnum1']."','".$docu."','nom1".$jwib_aso['idnum1']."','','bsqj".$jwib_aso['idnum1']."','cong2".$jwib_aso['idnum1']."','dpud".$jwib_aso['idnum1']."','dpuh".$jwib_aso['idnum1']."')";
											 include('vrbutton.php'); ?>
									<?php }else{?>
									<?php if($docu=='DPU1'){echo ' VIENEN DE : '.$jwib_aso['cong2_descri'];} ?>								
									<?php if($docu=='DPU2'){echo ' VAN A : '.$jwib_aso['cong2_descri'].' / '.$jwib_aso['cong2_dpud'].' / '.$jwib_aso['cong2_dpuh'];} ?>								
									<?php }?>
									</th>
								</tr>
					<?php } ?>
			<tr >
				<td align="center" style="border-top:solid 1px;<?php if($jwib_aso['fsema']==$semaa){echo 'background-color: #E5E5E5;';}?>">
					<?php if($jwib_aso['fecha']>=$prdoa){ ?>
					<a name="scroll"></a>
					<div id="scrollhere" ></div>
					<?php } ?>
					<div style="font-size:<?php echo $xfontsize;?>px;<?php if(date_diff(date_create($jwib_aso['fechar']),date_create($fechaa))->format("%a")<4){echo 'font-weight:bold;';}?>">
					<?php echo $jwib_aso['fdianr'].' /'.$jwib_aso['fdiar']; ?>
					</div>
					<div style=" font-size:<?php echo $xfontsize;?>px;font-weight:bold;">
					<?php echo ($jwib_aso['bsqj']).' - '.($jwib_aso['bsqj_descri']); ?>
					</div>
					<div style="font-size:25px;">
					<?php echo $jwib_aso['bsqj_tema']; ?>
					</div>
				</td>
			</tr>

			<?php //if(($full or $dpub==1) and $jwib_aso['fechar']>=date('Y-m-d')) {?>
			<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
			<tr>
				<td align="center" >
					<?php $pidtxt='nom1'.$jwib_aso['idnum1']; $pobj=5; $pdefa=$jwib_aso['nombre1']; $plong=20; $psize=30; $pdocu=$docu; $pcolu='nombre1'; $plist='dl_nom1'; include('vrgettxt.php'); ?>
				</td>
			</tr>
			<tr align="center" class="">
				<td align="center">
					<?php $ptabla='bsqj'; $pidtxt='bsqj'.$jwib_aso['idnum1']; $pobj=5; $pdefa=$jwib_aso['bsqj']; $pdisab='0'; $psize=30; include('vrgetcod.php'); ?>
				</td>
			</tr>
					<?php }else{ ?>
			<tr align="center" style="font-size:<?php echo $xfontsize;?>px; font-style:italic;<?php if($jwib_aso['fsema']==$semaa){echo 'background-color: #E5E5E5;';}else{echo 'background-color: ;';}?>">
				<td>
					<?php echo ($jwib_aso['nombre1']); ?>
				</td>
			</tr>
			<?php } ?>

			<tr>
				<td>
					<?php //if(($full or $dpub==1)  and $jwib_aso['fechar']>=date('Y-m-d')) {?>
					<?php if($modif==1 and $jwib_aso['fechar']>=date('Y-m-d')) {?>
					<?php $pcaption="Grabar"; $pidtxt='gra1_'.$jwib_aso['idnum1']; $psize=30;
							$ponclick="jwib_graba1('".$pidtxt."','".$jwib_aso['idnum1']."','".$docu."','nom1".$jwib_aso['idnum1']."','','bsqj".$jwib_aso['idnum1']."')";
							 include('vrbutton.php'); ?>
					<?php } ?>
					<br>
				</td>
			</tr>

			<?php }  ?>
		</table>  
		<?php } ?>

		<?php if ($printer) { ?>
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>
		<?php if($docu=='DPU1'){echo 'Conferencias';} ?>	
		<?php if($docu=='DPU2'){echo 'Discursantes';} ?>	
		</title>
		<style type="text/css">
		/* body{ font-family:"Courier New", Courier, monospace;} */
		@page {
		/*    size: 7in 9.25in; */
		/* 	 top left bott right */
		/*     size: 210mm 297mm;  */
		/*     margin: 0mm 10mm 10mm 0mm; /* 	top right bottom left */ */
				size: 105mm 148mm; 
				margin: 20mm 5mm 0mm 5mm; /* 	top right bottom left */
		}

		</style>

		</head>
		<body>


		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<table cellspacing="0" cellpadding="2" width="40%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;" align="left">
			<?php $lmes=''; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fmesr']!=$lmes){ ?>
								<tr style="height:30px;border-top:solid 2px;border-bottom:solid 1px;background: #A9F5F2;font-size:12px;">
									<th align="center" style="">
											<?php echo 'PROGRAMA DE CONFERENCIAS'; ?>
											<br>
											<?php echo $cong_descri; ?>
											<br>
										<?php echo $jwib_aso['fmesnr'].' /'.$jwib_aso['fanior']; ?>
										<?php $lmes= $jwib_aso['fmesr']; ?>
										<br>
									<?php if($docu=='DPU1'){echo ' VIENEN DE : '.$jwib_aso['cong2_descri'];} ?>								
									<?php if($docu=='DPU2'){echo ' VAN A : '.$jwib_aso['cong2_descri'].' / '.$jwib_aso['cong2_dpud'].' / '.$jwib_aso['cong2_dpuh'];} ?>								
										
									</th>
								</tr>
					<?php } ?>
			<tr>
				<td align="center" style="border-top:solid 1px;">
					<div style="font-size:12px;">
					<?php echo $jwib_aso['fdianr'].' /'.$jwib_aso['fdiar']; ?>
					</div>
					<div style=" font-size:12px;font-weight:bold;">
					<?php echo ($jwib_aso['bsqj']).' - '.($jwib_aso['bsqj_descri']); ?>
					</div>
					<div style="font-size:10px;">
					<?php echo $jwib_aso['bsqj_tema']; ?>
					</div>
				</td>
			</tr>

			<tr align="center" style="font-size:12px; font-style:italic;">
				<td>
					<?php echo ($jwib_aso['nombre1']); ?>
				</td>
			</tr>

			<tr>
				<td>
				</td>
			</tr>

			<?php }  ?>
			<tr style="border-top:solid 2px;">
				<td colspan="1" align="right">
				<?php echo 'jwib.vcrxol.com/?'.$cong_codigo; ?>
				</td>
			</tr>
		
		</table>  

		</body>
		</html>

		<?php } ?>

<?php } ?>
      
<?php if(mb_stristr('S89S',$docu)) { ?> 
		<?php $ccont=0; ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<div id="s89s" style="width:215mm; height:297mm; border:solid 0px; font-family:arial;" >
					<table cellspacing="1" cellpadding="0" width="100%" style="border-collapse:collapse;background-color:white;" border=1>
						<tr style="height:148mm;">
						<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	$ccont++; ?>
							<td width ="50%" style ="" valign="top">
								<table cellspacing="0" cellpadding="10" width="100%" style="border-collapse:collapse;background-color:white;" border=0>
									<tr align="center" style="height:20mm;">
										<td align="center" colspan="2" style="font-weight:bold; ">
											ASIGNACION PARA LA REUNION<br>VIDA Y MINISTERIO CRISTIANOS
										</td>
									</tr>
									<tr style="height:10mm;">
										<td style="font-weight:bold; width:30mm;">Nombre :</td>
										<td style="font-weight:bold; "><?php echo  $jwib_aso['nombre1']; ?></td>
									</tr>
									<tr style="height:10mm;">
										<td style="font-weight:bold; ">Ayudante :</td>
										<td><?php echo ucfirst2(strtolower($jwib_aso['nombre2'])); ?></td>
									</tr>
									<tr style="height:10mm;">
										<td style="font-weight:bold; ">Fecha : </td>
										<td><?php echo  $jwib_aso['fechadmyr']; ?></td>
									</tr>
									<tr style="height:10mm;">
										<td style="font-weight:bold; font-size:14px; ">Asp.Oratoria : </td>
										<td style="font-size:12px;"><?php echo  $jwib_aso['orat'].' - '.$jwib_aso['orat_descri']; ?></td>
									</tr>
				<?php $jwol_smm=''; ?>
				<?php if($jwib_aso['docu']=='VM30'){$jwol_smm=$jwib_aso['jwol_smm0'];} ?>
				<?php if($jwib_aso['docu']=='VM31'){$jwol_smm=$jwib_aso['jwol_smm1'];} ?>
				<?php if($jwib_aso['docu']=='VM32'){$jwol_smm=$jwib_aso['jwol_smm2'];} ?>
				<?php if($jwib_aso['docu']=='VM33'){$jwol_smm=$jwib_aso['jwol_smm3'];} ?>
									<tr style="height:30mm;">
										<td style="font-weight:bold;  font-size:14px; ">Intervención :</td>
										<td style="font-size:12px;"><?php echo  $jwol_smm; ?></td>
									</tr>
									<tr style="height:10mm;">
										<td style="font-weight:bold; ">Sala : </td>
										<td><?php if($jwib_aso['sala']==0){echo 'PRINCIPAL';}else{echo  'S.AUXILIAR '.$jwib_aso['sala'];} ?></td>
									</tr>
									<tr style="height:10mm; font-size:12px; align:justify;">
										<td colspan="2">
										<b>Nota al estudiante:</b> En la Guía de actividades encontrará la información que necesita para su intervención.<br>
										Prepare con la ayuda del libro Benefíciese el aspecto de la oratoria que se le indica en esta hoja.<br>
										<b>No olvide llevar su libro a la reunión Vida y Ministerio.	</b>
										</td>
									</tr>
					<tr style="border-top:solid 0px;">
				<td colspan="2" align="right" style="font-size:10px;">
				<?php echo 'jwib.vcrxol.com/?'.$cong_codigo; ?>
				</td>
			</tr>
						</table>
							</td>
							<?php if($ccont%2==0){echo '</tr><tr style="height:148mm;">';} ?>
						<?php } ?>			
						</tr>
					</table>
					
<!-- 				</div> -->
		</div>	

		
<?php } ?>

<?php if(mb_stristr('AVMC',$docu)) { ?> 
		<?php $ccont=0; ?>
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<div id="avmc" style="width:215mm; height:297mm; border:solid 0px; font-family:arial;" >
					<table cellspacing="1" cellpadding="0" width="100%" style="border-collapse:collapse;background-color:white;" border=1>
						<tr style="height:50mm;">
						<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	$ccont++; ?>
							
							<?php for($cnombre=1; $cnombre<=2; $cnombre++) { ?>
							<?php if($jwib_aso['nombre'.$cnombre]!="") { ?>
							<td width ="25%" style ="" valign="top">
								<table cellspacing="0" cellpadding="10" width="100%" style="border-collapse:collapse;background-color:white;font-size:12px;" border=0>
									<tr align="center" style="height:10mm;">
										<td align="center" colspan="2" style="font-weight:bold; ">
											ASIGNACION PARA LA REUNION<br><?php echo  $jwib_aso['docu_descri'] ?>
										</td>
									</tr>
									<tr style="height:5mm;">
										<td style="font-weight:bold; width:12mm;font-size:10px;">Nombre :</td>
										<td style="font-weight:bold; "><?php echo  $jwib_aso['nombre'.$cnombre]; ?></td>
									</tr>
									<tr style="height:5mm;">
										<td style="font-weight:bold; font-size:10px;">Fecha : </td>
										<td><?php echo  $jwib_aso['fechadmyr']; ?></td>
									</tr>
									<?php $jwol_smm=''; ?>
									<?php if($jwib_aso['docu']=='VM21'){$jwol_smm=$jwib_aso['jwol_tdb'.$cnombre];} ?>
									<?php if($jwib_aso['docu']=='VM41'){$jwol_smm=$jwib_aso['jwol_nvc'.$cnombre];} ?>
									<tr style="height:10mm;">
										<td style="font-weight:bold; font-size:10px;">Tema :</td>
										<td style=""><?php echo $jwol_smm; ?></td>
									</tr>
									<tr style="border-top:solid 0px;">
									<td colspan="2" align="right" style="font-size:10px;">
									<?php echo 'jwib.vcrxol.com/?'.$cong_codigo; ?>
									</td>
									</tr>
								</table>
							</td>
							<?php } ?>
							<?php } ?>
							
							<?php if($ccont%2==0){echo '</tr><tr style="height:50mm;">';} ?>
						<?php } ?>			
						</tr>
					</table>
					
<!-- 				</div> -->
		</div>	

		
<?php } ?>

<?php if(mb_stristr('VARI',$docu)) { ?>
		<?php if($mobile=='false'){ ?>
		<?php //if(($full or $vari==1) ) {?>
		<?php if($modif==1 ) {?>
			<?php// echo $jwib_sql; ?>
		<?php $xcaduca=date('Y-m-d',strtotime('15 days')); ?>	
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white; " border=0>
			<tr>
			<?php $pcaption='FECHA'; $pidtxt='fecha'; $pobj=2; include('vrgetfec.php'); ?>
			<?php $pcaption='ASUNTO'; $pidtxt='asunto'; $pobj=2; $plong=100; $pdocu='VARI'; $pcolu='concepto'; include('vrgettxt.php'); ?>
			<?php $pcaption='CADUCA'; $pidtxt='caduca'; $pobj=2; $pdefa=$xcaduca; include('vrgetfec.php'); ?>
			<td width = "1%">
			<?php $pcaption='GRABAR'; $pidtxt='grabar'; $ponclick=''; $ponclick="jwib_graba1('".$pidtxt."','','".$docu."','fecha','asunto','caduca')";	include('vrbutton.php'); ?>
			</td>
			<td>
			</td>	
			</tr>
		</table>			
		<br>
		<?php } ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>

		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>
		<?php //if(msql_num_rows($jwib_res)!=0){ ?>
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white; "  border=0>
			<?php $lmes=''; ?>
			<?php $linea=1; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fmes']!=$lmes){ ?>
								<tr style="border-top:solid 2px;border-bottom:solid 2px;background: #A9F5F2;font-size:15px;">
									<th width="10%">
										<?php echo ''.$jwib_aso['fmesn'].' /'.$jwib_aso['fanio']; ?>
										<?php $lmes= $jwib_aso['fmes']; ?>
										<?php $linea= 1; ?>
									</th>
									<th width="50%">ASUNTO</th>
									<th>ADJUNTO</th>
									<th>
									</th>
								</tr>
					<?php } ?>
			
				<tr id="<?php echo 'tr_'.$jwib_aso['docu'].$jwib_aso['idnum1'];?>" style="<?php if($linea==4){echo 'border-bottom:dotted 1px;';$linea=1;}else{$linea++;} ?>" align="center" valign="top">
						<td style="">
							<?php echo $jwib_aso['fdia'].'/'.$jwib_aso['fmesn']; ?>
						</td>
						<td style="" align="left">
							<?php echo $jwib_aso['concepto']; ?>
						</td>
						<td align="left" style="font-family:arial; font-size:12px;" >
						<a target="_blank" href="<?php echo '../'.$docu.'/'.$jwib_aso['adjunto1']; ?>" id="<?php echo $jwib_aso['docu'].$jwib_aso['idnum1']?>">
							<?php echo $jwib_aso['adjunto1'];?>
							</a>
						</td>

					<?php //if(($full or $vari==1) ) {?>
					<?php if($modif==1) {?>
							<td align="center">
								<?php 
										$pcaption="Eliminar"; $pidtxt='elimina'.$jwib_aso['idnum1']; 
										$pdocu=$jwib_aso['docu'];$pidnum=$jwib_aso['idnum1'];
										$ponclick="anul_docu('".$jwib_aso['docu']."','".$jwib_aso['idnum1']."','".$jwib_aso['numero']."');";
										include('vrbutton.php');
									?>
							</td>
							<td align="left">
								<div id="adjt_<?php echo $jwib_aso['docu'].$jwib_aso['idnum1']?>" style="display:<?php if($jwib_aso['adjunto1']==''){echo 'block';}else{echo 'none';} ?>;">
								<?php $pcaption='ADJUNTAR'; $pdocu=$jwib_aso['docu'];$pidnum=$jwib_aso['idnum1'];$pidtxt='adjt'.$jwib_aso['idnum1']; $pobj=3; $pmulti=1; $psize=12; $paccept='.pdf'; 
										 include('vrgetfil.php'); ?>
								</div>
								<div id="remo_<?php echo $jwib_aso['docu'].$jwib_aso['idnum1']?>" style="display:<?php if($jwib_aso['adjunto1']!=''){echo 'block';}else{echo 'none';} ?>;">
								<?php 
										$pcaption="Remover Adj."; $pidtxt='remove'.$jwib_aso['idnum1']; 
										$pdocu=$jwib_aso['docu'];$pidnum=$jwib_aso['idnum1'];
										$pdescri=$jwib_aso['adjunto1'];
										$ponclick="remove_adjt1('".$pidtxt."')";
										include('vrbutton.php');
									?>
								</div>
							</td>
					<?php } ?>
	
				</tr>
			<?php } ?>

		</table>			
		<?php //} ?>
			
		<?php } ?>
			
		<?php if($mobile=='true'){ ?>
									<?php if($bmodif) { ?>
              		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white;">
                    <tr>
                      <td>
									<?php $pcaption='Modificar'; $pidtxt='modificar'; $ponclick="jwib_asig1('".$docu."','','','1')"; $psize=30;include('vrbutton.php');?>
                      </td>
                    </tr>
                  </table>
									<?php } ?>
		<?php //if(($full or $vari==1) ) {?>
		<?php if($modif==1 ) {?>
			<?php// echo $jwib_sql; ?>
			
		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white; font-size:40px;" border=0>
			<tr>
			<?php $pcaption='FECHA'; $pidtxt='fecha'; $pobj=2; $psize=40; include('vrgetfec.php'); ?>
			</tr>
			<tr>
			<?php $pcaption='ASUNTO'; $pidtxt='asunto'; $pobj=2; $psize=40;  $plong=30; $prows=3; $pdocu='VARI'; $pcolu='concepto'; include('vrgettxt.php'); ?>
			</tr>
			<tr>
			<?php $pcaption='CADUCA'; $pidtxt='caduca'; $pobj=2; $psize=40; $pdefa=$xcaduca; include('vrgetfec.php'); ?>
			</tr>
			<tr>
			<td >
			<br>	
			<?php $pcaption='GRABAR'; $pidtxt='grabar'; $psize=40; $ponclick=''; $ponclick="jwib_graba1('".$pidtxt."','','".$docu."','fecha','asunto','caduca')";	include('vrbutton.php'); ?>
			</td>
			</tr>
		</table>			
		<br>
		<?php } ?>
			
		<?php $jwib_res=msql_query($jwib_sql,$link_vcrx); ?>

		<table cellspacing="0" cellpadding="2" width="100%" style="border-collapse:collapse;border:#000000 solid 2px;background-color:white; font-size:<?php echo $xfontsize;?>px;"  border=0>
			<?php $lmes=''; ?>
			<?php $linea=1; ?>
			<?php while($jwib_aso=msql_fetch_assoc($jwib_res)){	?>  
					<?php if($jwib_aso['fmes']!=$lmes){ ?>
								<tr style="border-top:solid 2px;background: #A9F5F2;font-size:<?php echo $xfontsize;?>px;">
									<th align="center" style="" colspan=2>
									</th>
								</tr>
								<tr style="border-bottom:solid 2px;background: #A9F5F2;font-size:<?php echo $xfontsize;?>px;">
									<th width="15%">
										<?php echo ''.$jwib_aso['fmesn'].' /'.$jwib_aso['fanio']; ?>
										<?php $lmes= $jwib_aso['fmes']; ?>
										<?php $linea= 1; ?>
									</th>
									<th >ASUNTO</th>
<!-- 									<th>ADJUNTO</th> -->
<!-- 									<th></th> -->
								</tr>
					<?php } ?>
			
				<tr style="<?php if($linea==1){echo 'border-bottom:dotted 1px;';$linea=1;}else{$linea++;} ?>; " align="center" >
						<td valign="top" style="">
							<?php //echo $jwib_aso['fdian'].' /'.$jwib_aso['fdia']; ?>
							<?php echo $jwib_aso['fdia'].'/'.$jwib_aso['fmesn']; ?>		
						</td>
						<td style="" align="left">
							<div>
							<?php echo $jwib_aso['concepto']; ?>
							</div>
<!-- 						</td> -->
<!-- 						<td align="left" style="font-family:arial; font-size:12px;" > -->
							<div>
								
						<a target="_blank" href="<?php echo '../'.$docu.'/'.$jwib_aso['adjunto1']; ?>" id="<?php echo $jwib_aso['docu'].$jwib_aso['idnum1']?>">
							<?php echo $jwib_aso['adjunto1'];?>
							</a>
							</div>
							<br>
<!-- 						</td>
 -->
					<?php //if(($full or $vari==1) ) {?>
					<?php if($modif==1 ) {?>
					<div>
						
<!-- 							<td align="left"> -->
								<div id="adjt_<?php echo $jwib_aso['docu'].$jwib_aso['idnum1']?>" style="display:<?php if($jwib_aso['adjunto1']==''){echo 'block';}else{echo 'none';} ?>;">
								<?php $pcaption='ADJUNTAR'; $pdocu=$jwib_aso['docu'];$pidnum=$jwib_aso['idnum1'];$pidtxt='adjt'.$jwib_aso['idnum1']; $pobj=2; $psize=40; $pmulti=1; $paccept='.pdf'; 
										 include('vrgetfil.php'); ?>
								</div>
								<div id="remo_<?php echo $jwib_aso['docu'].$jwib_aso['idnum1']?>" style="display:<?php if($jwib_aso['adjunto1']!=''){echo 'block';}else{echo 'none';} ?>;">
								<?php 
										$psize=30;
										$pcaption="Remover Adj."; $pidtxt='remove'.$jwib_aso['idnum1']; 
										$pdocu=$jwib_aso['docu'];$pidnum=$jwib_aso['idnum1'];
										$pdescri=$jwib_aso['adjunto1'];
										$ponclick="remove_adjt1('".$pidtxt."')";
										include('vrbutton.php');
									?>
								</div>
<!-- 								</td> -->
					</div>
							<br>
						</td>
					<?php } ?>
	
				</tr>
			<?php } ?>

		</table>			
		<?php } ?>
			
<?php } ?>
			
</div>	

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