From 01da41cf8a21a07734e25a5bce4c2d35f81a0134 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Sat, 14 Mar 2009 01:25:46 -0500 Subject: Sajax is no more, long live Prototype This eliminates one AJAX library, but not all "non-Prototype" AJAX code --- usr/local/www/includes/sajax.class.php | 266 --------------------------------- 1 file changed, 266 deletions(-) delete mode 100644 usr/local/www/includes/sajax.class.php (limited to 'usr/local/www/includes') diff --git a/usr/local/www/includes/sajax.class.php b/usr/local/www/includes/sajax.class.php deleted file mode 100644 index dc070bd..0000000 --- a/usr/local/www/includes/sajax.class.php +++ /dev/null @@ -1,266 +0,0 @@ -sajax_remote_uri = $this->sajax_get_my_uri(); - } - - - /** - * PHP 4 Constructor - * - * @param string $remoteURI - */ - function sajax($remoteURI = NULL) - { - $this->__construct($$remoteURI); - } - - - /** - * - * - */ - function sajax_get_my_uri() - { - global $REQUEST_URI; - - return $REQUEST_URI; - } - - - - function sajax_handle_client_request() { - - $mode = ""; - - if (! empty($_GET["rs"])) - $mode = "get"; - - if (!empty($_POST["rs"])) - $mode = "post"; - - if (empty($mode)) - return; - - if ($mode == "get") { - // Bust cache in the head - header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past - header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - // always modified - header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 - header ("Pragma: no-cache"); // HTTP/1.0 - $func_name = $_GET["rs"]; - if (! empty($_GET["rsargs"])) - $args = $_GET["rsargs"]; - else - $args = array(); - } - else { - $func_name = $_POST["rs"]; - if (! empty($_POST["rsargs"])) - $args = $_POST["rsargs"]; - else - $args = array(); - } - - if (! in_array($func_name, $this->sajax_export_list)) - echo "-:$func_name not callable"; - else { - echo "+:"; - $result = call_user_func_array($func_name, $args); - echo $result; - } - exit; - } // End sajax_handle_client_request() function ... - - - function sajax_get_common_js() { - - $t = strtoupper($this->sajax_request_type); - if ($t != "GET" && $t != "POST") - return "// Invalid type: $t.. \n\n"; - - ob_start(); - ?> - - sajax_get_common_js(); - } - - - function sajax_esc($val) - { - return str_replace('"', '\\\\"', $val); - } - - - /** - * sajax_get_one_stub - * - * @param string $func_name - */ - function sajax_get_one_stub($func_name) - { - ob_start(); - ?> - - // wrapper for - - function x_() { - sajax_do_call("", - x_.arguments); - } - - sajax_export_list[] = func_get_arg($i); - } - } - - - function sajax_get_javascript() - { - $html = ""; - if (! $this->sajax_js_has_been_shown) { - $html .= $this->sajax_get_common_js(); - $this->sajax_js_has_been_shown = 1; - } - foreach ($this->sajax_export_list as $func) { - $html .= $this->sajax_get_one_stub($func); - } - return $html; - } - - - function sajax_show_javascript() - { - echo $this->sajax_get_javascript(); - } - - -} // End sajax class - - -?> \ No newline at end of file -- cgit v1.1