1 ) { for ($i=1; $i < $lower; $i++) { $temp = SQL_fetch_array($result); } } $table = "
\n\n"; for ($i=$lower; $i<=$upper; $i++) { $rec = SQL_fetch_array($result); $wrlfile = "raw/" . $rec["metal"] . "/wrl/" . $rec["site_id"] . ".wrl"; $minipdb = "raw/" . $rec["metal"] . "/pdb/" . $rec["site_id"] . ".pdb"; $table .= "\n"; } $table .= "
\n"; $table .= "\n"; $table .= "\n"; /* site info: id, metal, number of ligands */ $table .= "\n"; $table .= "\n"; $table .= "\n\n"; /* download wrl, pdb or view using java viewer */ $table .= "\n"; $table .= "\n"; $table .= "\n"; $table .= "\n"; /* source info: PDB */ $table .= "\n"; $table .= "\n"; $table .= ""; /* links to the pages about this protein */ $table .= "\n\n"; /* short description from the PDB headers */ $table .= "\n\n\n
\n [" . $i . "]"; $table .= "MDB Site ID: " . $rec["site_id"] . "Metal: " . $rec["metal"] . "Number of ligands: "; $table .= $rec["num_ligands"] . "
Download: VRML 2.0 fileMini-PDB file"; $table .= " Interactive 3-D view"; $table .= "
Source: PDBID: " . strtoupper($rec["source_id"]) . ""; $table .= "\t"; /* the PDB's new Structure Explorer at the RCSB */ $table .= "\t
"; $table .= " PDB RCSB Explorer"; $table .= " for "; $table .= strtoupper($rec["source_id"]) . ""; /* and NIH's Molecules R US page */ $table .= "\t
"; $table .= "Molecules R US"; $table .= " page for "; $table .= strtoupper($rec["source_id"]) . ""; $table .= "\t
"; $table .= "
\n"; $table .= "Description: " . substr($rec["description"],0,200) . "\n"; $table .= "
\n
"; echo ($table); } /* generates a form that allows to page through results */ function makeForm($form_str,$sql_str,$nrows,$max,$lower,$upper) { $sf = "
\n"; $sf .= "\n"; $sf .= "\n"; $sf .= "\n"; $sf .= "\n"; $sf .= "\n"; $sf .= "\n"; $sf .= "\n"; $sf .= "
\n"; echo ($sf); } ?>