* -------------------------------------------------------------------- *
* Kurzbeschreibung : Spezialle Funktionen fuer die Anfragebehandlung *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: 856 $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: stelzi $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
// Return value
}
+// Setter for element in $_GET
+function REQUEST_SET_GET ($element, $value) {
+ $_GET[SQL_ESCAPE($element)] = SQL_ESCAPE($value);
+}
+
// Wrapper for elements in $_POST
function REQUEST_POST ($element) {
// By default no element is there
// Return value
}
+// Setter for element in $_POST
+function REQUEST_SET_POST ($element, $value) {
+ if (is_array($element)) {
+ // Set array
+ $eval = "\$_POST['";
+
+ // Add all entries
+ $eval .= implode("', '", $element);
+
+ // Finish eval() command
+ $eval .= sprintf("'] = \"%s\";", SQL_ESCAPE($value));
+
+ // And run it
+ eval($eval);
+ } elseif (is_array($value)) {
+ // Value is an array so set it directly
+ $_POST[SQL_ESCAPE($element)] = $value;
+ } else {
+ // Set regular entry
+ $_POST[SQL_ESCAPE($element)] = SQL_ESCAPE($value);
+ }
+}
+
// Checks wether a form was sent. If so, the $_POST['ok'] element must be set
function IS_FORM_SENT () {
// Simply wrap it!