1) && (SubStr($starting_point, 0, 1) == "0")) $starting_point = SubStr($starting_point, 1); //Convert/cast it to an integer if possible, else signal failure with //FALSE. if (is_numeric($starting_point)) $starting_point = (int)$starting_point; else $starting_point = FALSE; //Assign final value. $PAR_resourceidx = $starting_point; } // //-------------------------------------------------------------------------------- //Obtains the useridx parameter and assigns it to the variable //$PAR_useridx if it exists. If it does not exist, the value of FALSE //is assigned. // function PAR_get_useridx() { global $PAR_useridx; if ((! isset($_GET["useridx"])) && (! isset($_POST["useridx"]))) { $PAR_useridx = FALSE; return; } else if (isset($_POST["useridx"])) //Post gets precedence--arbitrary choice. { $starting_point = $_POST["useridx"]; } else if (isset($_GET["useridx"])) { $starting_point = $_GET["useridx"]; } //Trim all disallowed characters. $starting_point = STRFUNC_force_into_subset($starting_point, "0123456789"); //Strip off any leading zeros. while ((strlen($starting_point) > 1) && (SubStr($starting_point, 0, 1) == "0")) $starting_point = SubStr($starting_point, 1); //Convert/cast it to an integer if possible, else signal failure with //FALSE. if (is_numeric($starting_point)) $starting_point = (int)$starting_point; else $starting_point = FALSE; //Assign final value. $PAR_useridx = $starting_point; } // //-------------------------------------------------------------------------------- //Determines whether the commitbuttonpressed parameter is present and assigns //the variable $PAR_commitbuttonpressed FALSE if it does not exist or TRUE if it //does not exist. // function PAR_get_commitbuttonpressed() { global $PAR_commitbuttonpressed; if (isset($_GET["commitbuttonpressed"]) || isset($_POST["commitbuttonpressed"])) { $PAR_commitbuttonpressed = TRUE; } else { $PAR_commitbuttonpressed = FALSE; } } // //-------------------------------------------------------------------------------- //Determines whether the addbuttonpressed parameter is present and assigns //the variable $PAR_addbuttonpressed FALSE if it does not exist or TRUE if it //does not exist. // function PAR_get_addbuttonpressed() { global $PAR_addbuttonpressed; if (isset($_GET["addbuttonpressed"]) || isset($_POST["addbuttonpressed"])) { $PAR_addbuttonpressed = TRUE; } else { $PAR_addbuttonpressed = FALSE; } } // //-------------------------------------------------------------------------------- //End of $RCSfile: parx.inc,v $. //-------------------------------------------------------------------------------- ?>