Ejemplo n.º 1
0
function check_legal($id = null)
{
    if (!$id) {
        exit('<script>window.location.href="../erroroccur.php";</script>');
    } elseif (check_inject($id)) {
        exit('<script>window.location.href="../erroroccur.php";</script>');
    }
    return $id;
}
Ejemplo n.º 2
0
function check_num($id = null)
{
    if (!$id) {
        exit('<script>window.location.href="../erroroccur.php";</script>');
    } elseif (check_inject($id)) {
        exit('<script>window.location.href="../erroroccur.php";</script>');
    } elseif (!is_numeric($id)) {
        exit('<script>window.location.href="../erroroccur.php";</script>');
    }
    $id = intval($id);
    return $id;
}