aParameters[$Name] = array("Value" => $Value, "Id" => $Id, "IsConstant" => $IsConstant); } // Completely clear the collection function Clear() { // This option will not clear any items marked with IsConstant $tmp = array(); while (list($Name, $Value) = each($this->aParameters)) { if ($Value['IsConstant'] == 1) $tmp[$Name] = $Value; } $this->aParameters = $tmp; } // Return a count of how many elements are in the collection function Count() { return count($this->aParameters); } // Retrieves all get and post variables function DefineCollection($Collection, $ParameterPrefix = '', $IncludeByPrefix = '0', $ExcludeByPrefix = '0') { $ParameterPrefix = ForceString($ParameterPrefix, ''); $IncludeByPrefix = ForceBool($IncludeByPrefix, 0); $ExcludeByPrefix = ForceBool($ExcludeByPrefix, 0); $Add = 1; while (list($key, $value) = each($Collection)) { $Add = 1; if ($ParameterPrefix != '') { $PrefixMatchLocation = strstr($key, $ParameterPrefix); // If the prefix isn't found or the location is anywhere other than 0 (the start of the variable name) if ($PrefixMatchLocation === false || $PrefixMatchLocation != 0) { if ($IncludeByPrefix) $Add = 0; } else { if ($ExcludeByPrefix) $Add = 0; } } if ($Add) $this->Add($key, $value); } } function GetHiddenInputs() { $sReturn = ''; $Id = ''; $Value = ''; while (list($key, $val) = each($this->aParameters)) { $Value = $val['Value']; $Id = $val['Id']; if(is_array($Value)) { $nmrows = count($Value); $i = 0; for ($i = 0; $i < $nmrows; ++$i) { // Repetitive values cannot have an unique id, so ignore the id param $sReturn .= ' '; } } else { $sReturn .= ' '; } } reset($this->aParameters); return '