=<[columnName]>&= e.g. fId = [DOC.id] (the querystring will be build by replacing with the actual value from the column retrieved from the query)*/ var $aQueryStringText; /** number of rows for text area if text area option is being used */ var $iTextAreaRows = 6; /** number of colums for text area if text area option is being used */ var $iTextAreaColums = 20; /** heading for table */ var $sTableHeading; /** set the table width */ var $iTableWidth = null; /** * Default constructor * * @param String Query to execute * @param */ function PatternListFromQuery($sNewQuery, $aNewColumns, $aNewColumnNames, $aNewColumnTypes, $aNewHyperLinkURL = null, $aNewQueryStringText = null) { $this->sQuery = $sNewQuery; $this->aColumns = $aNewColumns; $this->aColumnNames = $aNewColumnNames; $this->aColumnTypes = $aNewColumnTypes; $this->aHyperLinkURL = $aNewHyperLinkURL; $this->aQueryStringText = $aNewQueryStringText; } function setTableWidth($iNewValue) { $this->iTableWidth = $iNewValue; } function setTextAreaRows($iNewValue) { $this->iTextAreaRows = $iNewValue; } function setTextAreaColumns($iNewValue) { $this->iTextAreaColumns = $iNewValue; } function setTableHeading($sNewValue) { $this->sTableHeading = $sNewValue; } function setRenderIndividualTableForEachResult($bNewValue) { $this->bIndividualTableForEachResult = $bNewValue; } function & render() { $sql = new Owl_DB(); $sql->query($this->sQuery); $sToRender = ""; $sToRender .= "iTableWidth) ? ", width = $this->iTableWidth" : "") . " >\n"; while ($sql->next_record()) { if (isset($this->sTableHeading)) { $sToRender .= "\n"; } $sToRender .= "\n"; switch ($this->aColumnTypes[$i]) { //plain text field case 1: $sToRender .= "\n"; break; //text area case 2: $sToRender .= "\n"; break; case 3: $sToRender .= "\n"; break; default: break; } $sToRender .= "\n"; } } $sToRender .= "
$this->sTableHeading
\n"; for ($i = 0; $i < count($this->aColumns); $i++) { $sToRender .= "
" . $this->aColumnNames[$i] . "" . $sql->f($this->aColumns[$i]) . "" . $this->aColumnNames[$i] . "" . $this->aColumnNames[$i] . "aHyperLinkURL[$i] . "?" . $this->replaceValues($this->aQueryStringText[$i], $sql) . "\">" . $sql->f($this->aColumns[$i]) . "
\n"; return $sToRender; } function replaceValues($sQueryStringText, $sql) { return $sQueryStringText; } } ?>