<?php //session_start();?>
<?php include('../_cfg/config.php');?>
<?php include('php_session.php');?>
<?php $widesc=$_POST['widesc']; ?>
<?php $orient=$_POST['orient']; ?>
<?php $version=$_POST['version']; ?>

<?php

$jwib_sql='insert into cong0(cong_codigo,cong_descri)value("00000000","NO DEFINIDA")';
$jwib_res=msql_query($jwib_sql,$link_vcrx);

$jwib_sql='update user0 set user_cong="000000000" where user_cong="" or user_cong is null';
$jwib_res=msql_query($jwib_sql,$link_vcrx);

$jwib_sql='update user0 set user_tipo="user" where user_tipo="invi" and (user_vida=1 or user_mmae=1 or user_estu=1 or user_asem=1 or user_dpub=1)';
$jwib_res=msql_query($jwib_sql,$link_vcrx);



$jwib_sql='select *, user_vida +user_mmae +user_estu +user_dpub +user_vari 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');
?>

<?php $fsize=15?>
<?php $trbreak='';?>
<?php $tipomenu='';?>
<?php $maxmenu=2 ;?>
<?php //if($mobile=='true' and $orient=='V'){$fsize=40; echo '<br>';}?>
<?php //if($mobile=='true' and $orient=='H'){$fsize=15; $trbreak='</tr><tr><td style="font-size:4px;"></br></td></tr><tr>';}?>
<?php if($mobile=='true'){$desktop='false';$maxmenu=2;}else{$desktop='true';} ?>

<resul>
    <?php for($cmenu=1;$cmenu<=$maxmenu;$cmenu++){ ?>
    <?php if($cmenu==1){$tipomenu='_top';}else{$tipomenu='_left';}?>
    <?php if($mobile=='true' and $cmenu==1){$fsize=40;}?>
    <?php if($mobile=='true' and $cmenu==2){$fsize=15; $trbreak='</tr><tr><td style="font-size:4px;"></br></td></tr><tr>';}?>
    <menu<?php echo $tipomenu; ?>>
      <div style="display:none;" ><top1>PRINCIPAL</top1><top2>Principal</top2></div>

      <?php if($mobile=='true'){echo '<br>';}?>
      <table id="menu<?php echo $tipomenu; ?>" width ="100%" valign="middle" border=0 >
        <tr valign="middle" style="height:100%;">
            <?php echo $trbreak; ?>
            <td valign="middle">
            <?php $pidtxt='mnu1_asem'.$tipomenu; $pcaption='Asig.Seman.'; $psize=$fsize; $ponclick='jwib_asig1("ASEM");'; include('vrbutton.php'); ?>
            </td>
            <?php echo $trbreak; ?>
            <td valign="middle">
            <?php $pidtxt='mnu1_maes'.$tipomenu; $pcaption='Mej.Maestros'; $psize=$fsize; $ponclick='jwib_asig1("MMAE");'; include('vrbutton.php'); ?>
            </td>
            <?php echo $trbreak; ?>
            <td valign="middle">
            <?php $pidtxt='mnu1_vida'.$tipomenu; $pcaption='Vida & Ministerio'; $psize=$fsize; $ponclick='jwib_asig1("VIDA");'; include('vrbutton.php'); ?>
            </td>
            <?php echo $trbreak; ?>
            <td valign="middle">
            <?php $pidtxt='mnu1_estu'.$tipomenu; $pcaption='Estudios'; $psize=$fsize; $ponclick='jwib_asig1("ESTU");'; include('vrbutton.php'); ?>
            </td>
            <?php echo $trbreak; ?>
            <td valign="middle">
            <?php $pidtxt='mnu1_rpu1'.$tipomenu; $pcaption='Reunion Publica'; $psize=$fsize; $ponclick='jwib_asig1("DPU1");'; include('vrbutton.php'); ?>
            </td>
            <?php echo $trbreak; ?>
            <td valign="middle">
            <?php $pidtxt='mnu1_rpu2'.$tipomenu; $pcaption='Discursantes'; $psize=$fsize; $ponclick='jwib_asig1("DPU2");'; include('vrbutton.php'); ?>
            </td>
            <?php echo $trbreak; ?>
            <td valign="middle">
            <?php $pidtxt='mnu1_vari'.$tipomenu; $pcaption='Varios'; $psize=$fsize; $ponclick='jwib_asig1("VARI");'; include('vrbutton.php'); ?>
            </td>
            <?php if(!mb_stristr('invi',$_SESSION['user_tipo'])){ ?>
            <?php echo $trbreak; ?>
                <td valign="middle">
                <?php $pidtxt='mnu1_prog'.$tipomenu; $pcaption='Carga.JW'; $psize=$fsize; $ponclick='jwib_prog1();'; include('vrbutton.php'); ?>
                </td>
            <?php } ?>
            <?php if(mb_stristr('sist.admi',$_SESSION['user_tipo'])){ ?>
            <?php echo $trbreak; ?>
                <td valign="middle">
                <?php $pidtxt='mnu1_hora'.$tipomenu; $pcaption='Horario'; $psize=$fsize; $ponclick='jwib_asig1("HORA");'; include('vrbutton.php'); ?>
                </td>
            <?php echo $trbreak; ?>
                <td valign="middle">
                <?php $pidtxt='mnu1_user'.$tipomenu; $pcaption='Usuarios'; $psize=$fsize; $ponclick='jwib_user("USER0");'; include('vrbutton.php'); ?>
                </td>
            <?php echo $trbreak; ?>
                <td valign="middle">
                <?php $pidtxt='mnu1_info'.$tipomenu; $pcaption='Informes'; $psize=$fsize; $ponclick='jwib_rpc1("RPC0");'; include('vrbutton.php'); ?>
                </td>
            <?php echo $trbreak; ?>
                <td valign="middle">
                <?php $pidtxt='mnu1_jwtv'.$tipomenu; $pcaption='JW TV'; $psize=$fsize; $ponclick='jwib_jwtv();'; include('vrbutton.php'); ?>
                </td>
            <?php } ?>
        </tr>
      </table>

    </menu<?php echo $tipomenu; ?>>
    <?php } ?>

</resul>


