Exemple #1
0
                                    <a href='../formAdministracion.php?<?php 
    echo session_name() . "=" . session_id() . "&{$encabezado}";
    ?>
'>
                                        <input class="botones" type="button" name="Submit4" value="Cancelar"></a></center>
                                </td>
                            </table>
                            </td>
                            </tr>
                            <?php 
    $encabezado = "&krd={$krd}&dep_sel={$dep_sel}&usModo={$usModo}&perfil={$perfil}&cedula={$cedula}&dia={$dia}&mes={$mes}&ano={$ano}&ubicacion={$ubicacion}&piso={$piso}&extension={$extension}&email={$email}";
    ?>
                        </form>
                        <?php 
}
$ImpAux = new ImpUsrClass($db);
$ImpAux->ImpUsrFill($cedula);
$SecAux = new SecSuperClass($db);
$SecAux->SecSuperFill($cedula);
?>

                    <script type="text/javascript">
                        var UsuaDoc=<?php 
echo $cedula;
?>
;
                        var ImpDeps=[];
                        var SuperDeps=[];
<?php 
foreach ($ImpAux->Dep as $key => $value) {
    ?>
Exemple #2
0
    //echo $FunctReload;
}
if ($_POST['Act'] == 'Add') {
    echo CreateSelect($_POST['ImpDeps'], $db);
    //$UsrAux = new ImpUsrClass($db);
    //$UsrAux->ImpUsrAdd($_POST['UsuaDoc'], $_POST['Dep']);
    //echo (" Hola ");
}
if ($_POST['Act'] == 'Del') {
    echo CreateSelect($_POST['ImpDeps'], $db);
    //$UsrAux = new ImpUsrClass($db);
    //$UsrAux->ImpUsrDel($_POST['UsuaDoc'], $_POST['Dep'][0]);
    //echo (" Hola ");
}
if ($_POST['Def']) {
    $UsrAux = new ImpUsrClass($db);
    $UsrAux->ImpDelAllDeps($_POST['UsuaDoc']);
    $UsrAux->ImpUsrFill($_POST['UsuaDoc']);
    foreach ($_POST['ImpDeps'] as $dep) {
        $UsrAux->ImpUsrAdd($_POST['UsuaDoc'], $dep);
    }
    echo " Hola ";
}
function CreateSelect($depArray, $db)
{
    $sql = " select depe_codi,depe_nomb from dependencia order by depe_codi ";
    $rs = $db->conn->query($sql);
    if ($rs) {
        $DepMenu = " <select name='ImpDepHab'> ";
        $DepMenu .= "<option >Seleccione la(s) dependencias</option>";
        while ($arr = $rs->FetchRow()) {