recDDName = $rec; $this->compDDName = $comp; $this->recTAName = $recArea; $this->compTAName = $compArea; $this->recHidden = $hiddenRec; $this->compHidden = $hiddenComp; $this->form = $formName; $this->LIST_SIZE = 10; $this->multiView = new pickMultiView(); $this->multiView->printJSFunctions(); } function printPDSPHumanView($tableClass, $tdClass) { // so we have basically two main tables... print("Configure Receptors:
"); $this->printReceptorControlTable($tableClass, $tdClass); print("

Configure Compounds:
"); $this->printCompoundControlTable($tableClass, $tdClass); print("recHidden."\" value=\"\">\n"); print("compHidden."\" value=\"\">\n"); print("
"); $this->printButtons($tableClass, $tdClass); } function printReceptorControlTable($tableClass, $tdClass) { $this->printTable($tableClass); print("\n"); //$this->printDD($this->recDDName, "recID", "recName", "receptors"); $this->printReceptorDropDown(); print("\n"); print("\n"); //print("\n"); $formName = "document.".$this->form."."; $rec = $formName.$this->recDDName; $recTA = $formName.$this->recTAName; $recH = $formName.$this->recHidden; print(""); $this->buttonWithHandler("addRec", "Add Receptor To List", "addItem(".$rec.", ".$recTA.", ".$recH.");", $tdClass); $this->buttonWithHandler("addAllRec", "Add All Receptors To List", "addAll(".$rec.", ".$recTA.", ".$recH.");", $tdClass); $this->buttonWithHandler("remRec", "Remove Receptor From List", "removeSelected(".$rec.", ".$recTA.", ".$recH.");", $tdClass); $this->buttonWithHandler("remAll", "Remove All Receptors From List", "removeAll(".$recTA.");", $tdClass); print("
\n"); print(""); print(""); print("Receptor List:
"); $this->printTextArea($this->recTAName, 45); print("\n"); print("\n"); } function printCompoundControlTable($tableClass, $tdClass) { $this->printTable($tableClass); print("\n"); //$this->printDD($this->compDDName, "tstID", "tstName", "testLigands"); $this->printCompoundDropDown(); print("\n"); print("\n"); //print("
"); print(""); $formName = "document.".$this->form."."; $comp = $formName.$this->compDDName; $compTA = $formName.$this->compTAName; $compH = $formName.$this->compHidden; $this->buttonWithHandler("addComp", "Add Compound To List", "addItem(".$comp.", ".$compTA.", ".$compH.");", $tdClass); $this->buttonWithHandler("addAllComp", "Add All Compounds To List", "addAll(".$comp.", ".$compTA.", ".$compH.");", $tdClass); $this->buttonWithHandler("remComp", "Remove Compound From List", "removeSelected(".$comp.", ".$compTA.", ".$compH.");", $tdClass); $this->buttonWithHandler("remAll", "Remove All Compounds From List", "removeAll(".$compTA.");", $tdClass); print("
\n"); print("Compound List:
"); $this->printTextArea($this->compTAName, 90); print("\n"); } function printButtons($tableClass, $tdClass) { $this->printTable($tableClass); print(""); print(""); } function printDD($ddName, $id, $colName, $tableName) { print($this->getSelectAndDefault($ddName, $this->LIST_SIZE, NULL, NULL)); $this->populateDropDown($id, $colName, $tableName); print(""); } function populateDropDown($id, $colName, $tableName) { $query = "select ".$id.", ".$colName." from ".$tableName." order by ".$colName; $queryError = "Unable to retrieve ".$tableName.": "; global $link; $queryResult = mysqli_query($link,$query) or die ($queryError.mysqli_error($link)); if (mysqli_num_rows($queryResult) == 0) { print("\n"); } else { while ($row = mysqli_fetch_row($queryResult)) { print("\n"); } } mysqli_free_result($queryResult); } function getSelectAndDefault($ddName, $size, $defaultString, $defaultValue) { $selectString = "\n"); $query = "select ".$id.", ".$colName." from ".$tableName." order by ".$colName; $queryError = "Unable to retrieve ".$tableName.": "; global $link; $queryResult = mysqli_query($link,$query) or die ($queryError.mysqli_error($link)); if (mysqli_num_rows($queryResult) == 0) { print("\n"); } else { while ($row = mysqli_fetch_row($queryResult)) { print("\n"); } } mysqli_free_result($queryResult); print(""); } // this one is by itself because we have a subset of the receptors // on the search page, so we only print some of them... function printReceptorDropDown() { print(""); } function printCompoundDropDown() { print(""); } function printTable($tableClass) { print("\n"); } function printTextArea($taName, $numCols) { print("\n"); } function buttonWithHandler($buttonName, $value, $handleString, $tdClass) { print("\n"); } } ?>
\n"); print("\n"); print("