Пример #1
1
<?php

include '../login/dbc.php';
page_protect();
$fulluri = $_SERVER['REQUEST_URI'];
$id = filter_var($fulluri, FILTER_SANITIZE_NUMBER_INT);
?>

<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
	<link rel="stylesheet" href="../public/css/styles.css">
</head>

<body >
<iframe src="lmenubar.php" height="600" width="15%" frameborder="0" style="float:left;" name="lmenu"></iframe>
<iframe src="paydeb.php" height="650" width="68%" frameborder="0" style="float:none;" name="MAIN"></iframe>
<iframe src="rmenuopd.php" height="600" width="15%" frameborder="0" style="float:right;" name="rmenu"></iframe>
</body>
</html>
Пример #2
0
<?php

include "includes/general.inc.php";
include "includes/dbc.inc.php";
page_protect(false, true);
function debo_mostrar_captcha()
{
    global $globals;
    // Sólo mostramos el captcha si se ha registrado con éxito ya esta ip en las últimas 24 horas
    // o si se han fallado 3 veces durante el registro en las últimas 24 horas
    return log_get("register_ok", ip2long($globals['ip']), 0, 24 * 60 * 60) > 0 || log_get("register_fail", ip2long($globals['ip']), 0, 24 * 60 * 60) >= 3;
}
$mostrar_captcha = debo_mostrar_captcha();
// Cuando pulsamos submit del formulario entramos por aquí...
if (array_key_exists('doRegister', $_POST)) {
    // Filtramos todos los campos del formulario, para evitar código malicioso
    foreach ($_POST as $key => $value) {
        $data[$key] = filter($value);
    }
    // Validamos los datos, y si son correctos creamos el usuario
    do_register();
    if (!empty($hasError)) {
        log_insert("register_fail", ip2long($globals['ip']));
        $mostrar_captcha = debo_mostrar_captcha();
    }
}
get_header("register.php", $mostrar_captcha);
escribir_titulo("Regístrate", "Entra en la comunidad");
// Mostramos una caja con los errores encontrados tras hacer submit
escribir_resultado_validaciones($hasError);
?>