25 define(
"PARM_INTEGER",1);
27 define(
"PARM_NUMBER",2);
29 define(
"PARM_STRING",3);
31 define(
"PARM_TEXT",4);
57 function GetParm($parameterName, $parameterType)
60 if (array_key_exists($parameterName, $_GET)) {
61 $Var = $_GET[$parameterName];
63 if (! isset($Var) && isset($_POST) && array_key_exists($parameterName, $_POST)) {
64 $Var = $_POST[$parameterName];
66 if (! isset($Var) && isset($_SERVER) &&
67 array_key_exists($parameterName, $_SERVER)) {
68 $Var = $_SERVER[$parameterName];
70 if (! isset($Var) && isset($_SESSION) &&
71 array_key_exists($parameterName, $_SESSION)) {
72 $Var = $_SESSION[$parameterName];
74 if (! isset($Var) && isset($_COOKIE) &&
75 array_key_exists($parameterName, $_COOKIE)) {
76 $Var = $_COOKIE[$parameterName];
82 switch ($parameterType) {
84 return (intval($Var));
86 return (floatval($Var));
88 return (stripslashes($Var));
90 return (urldecode($Var));
102 return(@$_SERVER[
'REQUEST_URI']);
110 $V = explode(
'?',@$_SERVER[
'REQUEST_URI'],2);
122 $V = explode(
'?',@$_SERVER[
'REQUEST_URI'],2);
126 if (count($V) >= 2) {
127 $V = preg_replace(
"/^mod=/",
"", $V[1]);
128 }
else if (count($V) == 1) {
133 $V = preg_replace(
"/^[^&]*/",
"", $V);
151 for ($i = 0; $i < $Max; $i ++) {
155 $Opt .=
"&" .
"$L=$Val";
166 $V = explode(
'?',@$_SERVER[
'REQUEST_URI'],2);
169 while (($i > 0) && ($V[$i - 1] !=
'/')) {
172 $V = substr($V,0,$i);
181 if (! empty(@$_SERVER[
'HTTPS']) && $_SERVER[
'HTTPS'] !=
'off' &&
182 $_SERVER[
'HTTPS'] ==
'on' || @$_SERVER[
'HTTP_X_FORWARDED_PROTO'] ==
'https') {
183 $protoUri =
'https://';
185 $protoUri =
'http://';
187 $portUri = (@$_SERVER[
"SERVER_PORT"] ==
"80") ?
"" : (
":" . @$_SERVER[
"SERVER_PORT"]);
188 $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.
GetParm($parameterName, $parameterType)
This function will retrieve the variables and check data types.
Traceback_dir()
Get the directory of the URI without query.
Traceback_parm_keep($List)
Create a new URI, keeping only these items.
Traceback()
Get the URI + query to this location.