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(); } }
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(); }