Need Help ?
  " ."" .""; } else { echo "" ."" ."" .""; if ($iCatalogElements >= 1) { if (($iCatalogElements % 2) == 1 ) { $g = fopen("C:\\Documents and Settings\\stgben.AD3\\logs\\dbcalls_odd.txt", "w"); fwrite($g, "CCMStart = " . $sCcmStart . "\r\n\r\n"); fwrite($g, "iNext = " . $iNext . "\r\n"); $sElementNuber = "ODD NUMBER OF ELEMENTS"; for($j = $sCcmStart; $j < $iNext; $j++) { if ($j <= $iCatalogElements - 2) { fwrite($g, strftime('%c') ."\tDatabase call1..." . "\r\n"); // Database functionality // Left side of tabe $oSqlLeft = ccmDatabase($sDatabaseType, $sUser, $sPass, $sServer, $sDatabaseName); $sSqlLeft = "SELECT images.uin, " ."images.experiment, " ."experiment.id, " ."experiment.experimental_design, " ."experiment.exp_description " ."FROM images " ."LEFT JOIN experiment " ."ON images.experiment=experiment.id " ."WHERE uin = '".substr($aCatalog[$j], 0, -4)."' OR cross_ref = '".substr($aCatalog[$j], 0, -4)."'"; $oSqlLeft->queryDatabase($sSqlLeft); $leftImages = $oSqlLeft->fetchRowDict(); $sSqlLeftGene = "SELECT gene.gene, gene.genotype, gene.promoter " ."FROM gene " ."WHERE gene.uin = '".substr($aCatalog[$j], 0, -4)."'"; $oSqlLeft->queryDatabase($sSqlLeftGene); $leftGenes = $oSqlLeft->fetchAllDict(); $oSqlLeft->closeConnection(); // Right side of table $oSqlRight = ccmDatabase($sDatabaseType, $sUser, $sPass, $sServer, $sDatabaseName); $sSqlRight = "SELECT images.uin, " ."images.experiment, " ."experiment.id, " ."experiment.experimental_design, " ."experiment.exp_description " ."FROM images " ."LEFT JOIN experiment " ."ON images.experiment=experiment.id " ."WHERE uin = '".substr($aCatalog[$j+1], 0, -4)."' OR cross_ref = '".substr($aCatalog[$j+1], 0, -4)."'"; $oSqlRight->queryDatabase($sSqlRight); $rightImages = $oSqlRight->fetchRowDict(); $sSqlRightGene = "SELECT gene.gene, gene.genotype, gene.promoter " ."FROM gene " ."WHERE gene.uin = '".substr($aCatalog[$j+1], 0, -4)."'"; $oSqlRight->queryDatabase($sSqlRightGene); $rightGenes = $oSqlRight->fetchAllDict(); $oSqlRight->closeConnection(); echo ""; fwrite($g, "Image path: " . $_SERVER["HTTP_HOST"]."".$sByteHandlerPath."?file=".$sArchivePrefix ."".$sCcmArchive."/".$aCatalog[$j] . "\r\n"); // Left Column if ($leftImages[uin] == '') { echo ""; } else { echo ""; } echo ""; // Right Column $j = $j + 1; if ($rightImages[uin] == '') { echo ""; } else { echo ""; } echo ""; echo ""; } elseif ($j == $iCatalogElements - 1) { fwrite($g, strftime('%c') . "\tDatabase call...2" . "\r\n"); if ($aCatalog[$j] != '') { // Only execute SQL once for the left column // Left side of tabe $oSqlLeft = ccmDatabase($sDatabaseType, $sUser, $sPass, $sServer, $sDatabaseName); $sSqlLeft = "SELECT images.uin, " ."images.experiment, " ."experiment.id, " ."experiment.experimental_design, " ."experiment.exp_description " ."FROM images " ."LEFT JOIN experiment " ."ON images.experiment=experiment.id " ."WHERE uin = '".substr($aCatalog[$j], 0, -4)."' OR cross_ref = '".substr($aCatalog[$j], 0, -4)."'"; $oSqlLeft->queryDatabase($sSqlLeft); $leftImages = $oSqlLeft->fetchRowDict(); $sSqlLeftGene = "SELECT gene.gene, gene.genotype, gene.promoter " ."FROM gene " ."WHERE gene.uin = '".substr($aCatalog[$j], 0, -4)."'"; $oSqlLeft->queryDatabase($sSqlLeftGene); $leftGenes = $oSqlLeft->fetchAllDict(); $oSqlLeft->closeConnection(); echo ""; fwrite($g, "Image path: " . $_SERVER["HTTP_HOST"]."".$sByteHandlerPath."?file=".$sArchivePrefix ."".$sCcmArchive."/".$aCatalog[$j] . "\r\n"); if ($leftImages[uin] == '') { echo ""; } else { echo ""; } echo "" .""; $j = $j + 1; } else { echo ""; echo ""; echo ""; } } } fclose($g); } else { $sElementNumber = "EVEN NUMBER OF ELEMENTS"; $h = fopen("C:\\Documents and Settings\\stgben.AD3\\logs\\dbcalls_even.txt", "w"); fwrite($h, "CCMStart = " . $sCcmStart . "\r\n\r\n"); fwrite($h, "iNext = " . $iNext . "\r\n"); for($j = $sCcmStart; $j < $iNext; $j++) { fwrite($h, "\t" . strftime('%c') . " DB Loop.\r\n"); if ($j <= $iCatalogElements-2) { // Database functionality // Left side of table $oSqlLeft = ccmDatabase($sDatabaseType, $sUser, $sPass, $sServer, $sDatabaseName); $sSqlLeft = "SELECT images.uin, " ."images.experiment, " ."experiment.id, " ."experiment.experimental_design, " ."experiment.exp_description " ."FROM images " ."LEFT JOIN experiment " ."ON images.experiment=experiment.id " ."WHERE uin = '".substr($aCatalog[$j], 0, -4)."' OR cross_ref = '".substr($aCatalog[$j], 0, -4)."'"; $oSqlLeft->queryDatabase($sSqlLeft); $leftImages = $oSqlLeft->fetchRowDict(); $sSqlLeftGene = "SELECT gene.gene, gene.genotype, gene.promoter " ."FROM gene " ."WHERE gene.uin = '".substr($aCatalog[$j], 0, -4)."'"; $oSqlLeft->queryDatabase($sSqlLeftGene); $leftGenes = $oSqlLeft->fetchAllDict(); $oSqlLeft->closeConnection(); // Right side of table $oSqlRight = ccmDatabase($sDatabaseType, $sUser, $sPass, $sServer, $sDatabaseName); $sSqlRight = "SELECT images.uin, " ."images.experiment, " ."experiment.id, " ."experiment.experimental_design, " ."experiment.exp_description " ."FROM images " ."LEFT JOIN experiment " ."ON images.experiment=experiment.id " ."WHERE uin = '".substr($aCatalog[$j+1], 0, -4)."' OR cross_ref = '".substr($aCatalog[$j+1], 0, -4)."'"; $oSqlRight->queryDatabase($sSqlRight); $rightImages = $oSqlRight->fetchRowDict(); $sSqlRightGene = "SELECT gene.gene, gene.genotype, gene.promoter " ."FROM gene " ."WHERE gene.uin = '".substr($aCatalog[$j+1], 0, -4)."'"; $oSqlRight->queryDatabase($sSqlRightGene); $rightGenes = $oSqlRight->fetchAllDict(); $oSqlRight->closeConnection(); echo ""; // Left Column fwrite($h, "Image path: " . $_SERVER["HTTP_HOST"]."".$sByteHandlerPath."?file=".$sArchivePrefix ."".$sCcmArchive."/".$aCatalog[$j] . "\r\n"); if ($leftImages[uin] == '') { echo ""; } else { echo ""; } echo ""; // Right Column if ($rightImages[uin] == '') { echo ""; } else { echo ""; } echo ""; echo ""; $j = $j + 1; } } fclose($h); } } else { echo ""; echo ""; echo ""; } echo ""; echo ""; echo ""; echo ""; } ?>
" ."
" ."
" ."

" ."No archive was selected
" ."Please return to the archive index and select an archive" ."

" ."
" ."
" ."

".$sCcmArchive."

" ."
".substr($aCatalog[$j], 0, -4)."
Genotype:
"; for ($l =0; $l < sizeof($leftGenes)-5; $l++) { if ($leftGenes[$l][promoter] != ""){ $sPSep = ":"; } else { $sPSep = ""; } echo ""; echo $leftGenes[$l][promoter].$sPSep.$leftGenes[$l][gene]."
".$leftGenes[$l][genotype]."
"; echo "
"; } if ($leftGenes[experiment]) { echo ""; echo $leftImages[experimental_design].":".substr($leftImages[exp_description], 0, 40); echo ""; } echo "
".substr($aCatalog[$j], 0, -4)."
Genotype:
"; for($k = 0; $k < sizeof($rightGenes)-5; $k++) { if ($rightGenes[$k][promoter] != "") { $sPSep = ":"; } else { $sPSep = ""; } echo ""; echo $rightGenes[$k][promoter].$sPSep.$rightGenes[$k][gene]."
".$rightGenes[$k][genotype]."
"; echo "
"; } if ($rightGenes[experiment]) { echo ""; echo $rightImages[experimental_design].":".substr($rightImages[exp_description], 0, 40); echo ""; } echo "
".substr($aCatalog[$j], 0, -4)."
Genotype:
"; for($l=0;$l"; echo $leftGenes[$l][promoter].$sPSep.$leftGenes[$l][gene]."
".$leftGenes[$l][genotype]."
"; echo ""; } if ($leftGenes[experiment]) { echo ""; echo $leftImages[experimental_design].":".substr($leftImages[exp_description], 0, 40); echo ""; } echo "
There are no images in this catalog. Please contact the administrator if you belive this to be in error.
".substr($aCatalog[$j], 0, -4)."
Genotype:
"; for($l = 0; $l < sizeof($leftGenes)-5; $l++) { if ($leftGenes[$l][promoter] != "") { $sPSep = ":"; } else { $sPSep = ""; } echo ""; echo $leftGenes[$l][promoter].$sPSep.$leftGenes[$l][gene]."
".$leftGenes[$l][genotype]."
"; echo "
"; } if ($leftGenes[experiment]) { echo ""; echo $leftImages[experimental_design].":".substr($leftImages[exp_description], 0, 40); echo ""; } echo "
".substr($aCatalog[$j + 1], 0, -4)."
Genotype:
"; for($k = 0; $k < sizeof($rightGenes)-5; $k++) { if ($rightGenes[$k][promoter] != "") { $sPSep = ":"; } else { $sPSep = ""; } echo ""; echo $rightGenes[$k][promoter].$sPSep.$rightGenes[$k][gene]."
".$rightGenes[$k][genotype]."
"; echo "
"; } if ($rightGenes[experiment]) { echo ""; echo $rightImages[experimental_design].":".substr($rightImages[exp_description], 0, 40); echo " "; } echo "
There are no images in this catalog. Please contact the administrator if you belive this to be in error.
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
1"; $totalPages = ceil(($iCatalogElements/8)); $totalPageStart = (($totalPages*8)-8); $currentPage = ceil($iNext/8); if($iPrevious >= 0) { echo "<-- "; } if($currentPage < 10) { if($totalPages < 10) { for($m=1;$m<=$totalPages;$m++) { $start = (($m-1)*8); if($m == $currentPage) { $stringM = "$m"; } else { $stringM = $m; } if($m == $totalPages) { echo "".$stringM.""; } else { echo "".$stringM." | "; } } } else { for($m=1;$m<=10;$m++) { $start = (($m-1)*8); if($m == $currentPage) { $stringM = "$m"; } else { $stringM = $m; } if($m == 10) { echo "".$stringM.""; } else { echo "".$stringM." | "; } } } } elseif(($currentPage > $totalPages -10) && ($currentPage <= $totalPages)) { for($m=$totalPages-10;$m<=$totalPages;$m++) { $start = (($m-1)*8); if($m == $currentPage) { $stringM = "$m"; } else { $stringM = $m; } if($m == $totalPages) { echo "".$stringM.""; } else { echo "".$stringM." | "; } } } else { for($m=1;$m<=$totalPages;$m++) { $start = (($m-1)*8); if($m == $currentPage) { $stringM = "$m"; } else { $stringM = $m; } if(($currentPage - 5 <= $m) && ($m <= $currentPage + 5)) { if(($m == $totalPages) || ($m == $currentPage + 5)) { echo "".$stringM.""; } else { echo "".$stringM." | "; } } } } if($iNext <= $iCatalogElements) { echo " -->"; } echo "
"; echo "
".$totalPages."
"; echo "  ".$sCatalogDir."  <- \$arch_dir"; echo "
"; print_r($aCatalog); echo "
"; echo $iNext; echo "
"; echo $iPrevious; echo "
"; } ?>