function menu_logout($el_usuario, $configuracion, $cripto, $usuario, $acceso_db, $acceso)
{
    $indice = $configuracion["host"] . $configuracion["site"] . "/index.php?";
    ?>
<table width="100%" align="center" border="0" cellpadding="10" cellspacing="0" >
	<tbody>
		<tr>
			<td >
				<table align="center" border="0" cellpadding="5" cellspacing="0" class="bloquelateral_2" width="100%">
					<tr class="centralcuerpo">
						<td>
						<b>::::..</b>  Usuario Actual
						</td>
					</tr>
					<tr class="bloquelateralcuerpo" align="center">
						<td><b><?php 
    if (isset($el_usuario)) {
        echo $el_usuario;
    } else {
        echo "Anonimo";
    }
    ?>
</b>						
						</td>
					</tr>
					<tr class="bloquelateralcuerpo" align="center">
						<td><hr class="hr_division">
							<a href="<?php 
    $variable = "pagina=logout";
    $variable .= "&accion=logout";
    $variable = $cripto->codificar_url($variable, $configuracion);
    echo $indice . $variable;
    ?>
">Terminar sesi&oacute;n<br><img width="24" height="24" src="<?php 
    echo $configuracion["host"] . $configuracion["site"] . $configuracion["grafico"];
    ?>
/logout.png" alt="Terminar sesi&oacute;n" title="Terminar sesi&oacute;n" border="0" /></A>
							
							<!--br><br>Tiempo Actual:<br><b><?php 
    echo date('Y-m-d  H:i:s', time() - 60 * 60 * 5);
    ?>
</b-->
						</td>
					</tr>
					<?php 
    rol($usuario, $configuracion, $acceso_db, $acceso, $cripto);
    ?>
				
					<tr>
						<td>
						<br>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</tbody>
</table>
<?php 
}
Exemple #2
0
function calc_sha1($str)
{
    $x = str2blks_SHA1($str);
    $a = 1732584193;
    $b = -271733879;
    $c = -1732584194;
    $d = 271733878;
    $e = -1009589776;
    for ($i = 0; $i < sizeof($x); $i += 16) {
        $olda = $a;
        $oldb = $b;
        $oldc = $c;
        $oldd = $d;
        $olde = $e;
        for ($j = 0; $j < 80; $j++) {
            if ($j < 16) {
                $w[$j] = $x[$i + $j];
            } else {
                $w[$j] = rol($w[$j - 3] ^ $w[$j - 8] ^ $w[$j - 14] ^ $w[$j - 16], 1);
            }
            $t = safe_add(safe_add(rol($a, 5), ft($j, $b, $c, $d)), safe_add(safe_add($e, $w[$j]), kt($j)));
            $e = $d;
            $d = $c;
            $c = rol($b, 30);
            $b = $a;
            $a = $t;
        }
        $a = safe_add($a, $olda);
        $b = safe_add($b, $oldb);
        $c = safe_add($c, $oldc);
        $d = safe_add($d, $oldd);
        $e = safe_add($e, $olde);
    }
    return sprintf("%08s%08s%08s%08s%08s", dechex($a), dechex($b), dechex($c), dechex($d), dechex($e));
}