Ejemplo n.º 1
0
function redirectToReferer($time = 0)
{
    //echo "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
    //echo "<br>";
    //echo $_SERVER["HTTP_REFERER"];
    if ("http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] == $_SERVER["HTTP_REFERER"] || $_SERVER["HTTP_REFERER"] == null) {
        return redirect("");
        //echo "cuak";
    } else {
        $options = array();
        $options["http-equiv"] = "refresh";
        $options["content"] = $time . "; URL=" . $_SERVER["HTTP_REFERER"];
        $meta = new HTMLTag("meta", $options);
        return $meta->build();
    }
}
Ejemplo n.º 2
0
function textarea_tag($name, $value, $options = array())
{
    if (!array_key_exists("id", $options)) {
        $options["id"] = $name;
    }
    $options["name"] = $name;
    $text = new HTMLTag("textarea", $options, $value);
    return $text->build();
}