14 define(
"PARM_INTEGER",1);
16 define(
"PARM_NUMBER",2);
18 define(
"PARM_STRING",3);
20 define(
"PARM_TEXT",4);
46 function GetParm($parameterName, $parameterType)
49 if (array_key_exists($parameterName, $_GET)) {
50 $Var = $_GET[$parameterName];
52 if (! isset($Var) && isset($_POST) && array_key_exists($parameterName, $_POST)) {
53 $Var = $_POST[$parameterName];
55 if (! isset($Var) && isset($_SERVER) &&
56 array_key_exists($parameterName, $_SERVER)) {
57 $Var = $_SERVER[$parameterName];
59 if (! isset($Var) && isset($_SESSION) &&
60 array_key_exists($parameterName, $_SESSION)) {
61 $Var = $_SESSION[$parameterName];
63 if (! isset($Var) && isset($_COOKIE) &&
64 array_key_exists($parameterName, $_COOKIE)) {
65 $Var = $_COOKIE[$parameterName];
71 switch ($parameterType) {
73 return (intval($Var));
75 return (floatval($Var));
77 return (stripslashes($Var));
79 return (urldecode($Var));
91 return(@$_SERVER[
'REQUEST_URI']);
99 $V = explode(
'?',@$_SERVER[
'REQUEST_URI'],2);
111 $V = explode(
'?',@$_SERVER[
'REQUEST_URI'],2);
115 if (count($V) >= 2) {
116 $V = preg_replace(
"/^mod=/",
"", $V[1]);
117 }
else if (count($V) == 1) {
122 $V = preg_replace(
"/^[^&]*/",
"", $V);
140 for ($i = 0; $i < $Max; $i ++) {
144 $Opt .=
"&" .
"$L=$Val";
155 $V = explode(
'?',@$_SERVER[
'REQUEST_URI'],2);
158 while (($i > 0) && ($V[$i - 1] !=
'/')) {
161 $V = substr($V,0,$i);
170 if (! empty(@$_SERVER[
'HTTPS']) && $_SERVER[
'HTTPS'] !=
'off' &&
171 $_SERVER[
'HTTPS'] ==
'on' || @$_SERVER[
'HTTP_X_FORWARDED_PROTO'] ==
'https') {
172 $protoUri =
'https://';
174 $protoUri =
'http://';
176 $portUri = (@$_SERVER[
"SERVER_PORT"] ==
"80") ?
"" : (
":" . @$_SERVER[
"SERVER_PORT"]);
177 $V = $protoUri . @$_SERVER[
'SERVER_NAME'] . $portUri .
Traceback_uri();
Traceback_uri()
Get the URI without query to this location.
Traceback_parm($ShowMod=1)
Get the URI query to this location.
tracebackTotalUri()
Get the total url without query.
Traceback_dir()
Get the directory of the URI without query.
Traceback()
Get the URI + query to this location.
GetParm($parameterName, $parameterType)
This function will retrieve the variables and check data types.
Traceback_parm_keep($List)
Create a new URI, keeping only these items.