Edited by Antonio Gonzalez Pena: Mar 15th, 2010 */
if (isset($_GET['taxon_ID'])) {
//$colname_rsSites = (get_magic_quotes_gpc()) ? $_GET['taxon_ID'] : addslashes($_GET['taxon_ID']);
$colname_rsSites = GetSQLValueString($_GET['taxon_ID'], 'int');
}
mysql_select_db($database_connDiatom2, $connDiatom2);
$query_rsSites = sprintf("SELECT DISTINCT sites.site_name, sites.site_type, sites.location FROM sites, sites_and_taxa WHERE sites.site_ID=sites_and_taxa.site_ID AND sites_and_taxa.taxon_ID=$colname_rsSites ORDER BY sites.site_name ASC");
$rsSites = mysql_query($query_rsSites, $connDiatom2) or die(mysql_error());
$row_rsSites = mysql_fetch_assoc($rsSites);
$totalRows_rsSites = mysql_num_rows($rsSites);
/* ==> */
$colname_rsINA_new_combo = "1";
if (isset($_GET['taxon_ID'])) {
//$colname_rsINA_new_combo = (get_magic_quotes_gpc()) ? $_GET['taxon_ID'] : addslashes($_GET['taxon_ID']);
$colname_rsINA_new_combo = GetSQLValueString($_GET['taxon_ID'], 'int');
}
mysql_select_db($database_connDiatom2, $connDiatom2);
$query_rsINA_new_combo = sprintf("SELECT taxa.new_combo_INA FROM taxa WHERE taxa.taxon_ID=%s AND taxa.new_combo_INA IS NOT NULL", $colname_rsINA_new_combo);
$rsINA_new_combo = mysql_query($query_rsINA_new_combo, $connDiatom2) or die(mysql_error());
$row_rsINA_new_combo = mysql_fetch_assoc($rsINA_new_combo);
$totalRows_rsINA_new_combo = mysql_num_rows($rsINA_new_combo);
$colname_rs_images_visible = "21";
if (isset($_GET['taxon_ID'])) {
//$colname_rs_images_visible = (get_magic_quotes_gpc()) ? $_GET['taxon_ID'] : addslashes($_GET['taxon_ID']);
$colname_rs_images_visible = GetSQLValueString($_GET['taxon_ID'], 'int');
}
mysql_select_db($database_connDiatom2, $connDiatom2);
$query_rs_images_visible = sprintf("SELECT images.image_scale FROM images WHERE taxon_ID = %s and image_type='visible' and image_use='use' ORDER BY image_diatom_length DESC", $colname_rs_images_visible);
$rs_images_visible = mysql_query($query_rs_images_visible, $connDiatom2) or die(mysql_error());
$row_rs_images_visible = mysql_fetch_assoc($rs_images_visible);
$totalRows_rs_images_visible = mysql_num_rows($rs_images_visible);
$colname_rs_taxa_samples = "0";
if (isset($_GET['taxon_ID'])) {
//$colname_rs_taxa_samples = (get_magic_quotes_gpc()) ? $_GET['taxon_ID'] : addslashes($_GET['taxon_ID']);
$colname_rs_taxa_samples = GetSQLValueString($_GET['taxon_ID'], 'int');
}
mysql_select_db($database_connDiatom2, $connDiatom2);
$query_rs_taxa_samples = sprintf("SELECT DISTINCT counts.taxon_ID FROM counts, count_headers WHERE counts.taxon_ID=%s AND counts.accession_NUM = count_headers.accession_NUM AND count_headers.active_inactive = 'active'", $colname_rs_taxa_samples);
$rs_taxa_samples = mysql_query($query_rs_taxa_samples, $connDiatom2) or die(mysql_error());
$row_rs_taxa_samples = mysql_fetch_assoc($rs_taxa_samples);
$totalRows_rs_taxa_samples = mysql_num_rows($rs_taxa_samples);
$queryString_rsTaxa = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_rsTaxa") == false &&
stristr($param, "totalRows_rsTaxa") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_rsTaxa = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_rsTaxa = sprintf("&totalRows_rsTaxa=%d", $totalRows_rsTaxa);
/* 08-05-04 (mjc) original Dreamweaver code:
$queryString_rsTaxa = sprintf("&totalRows_rsTaxa=%d%s", $totalRows_rsTaxa, $queryString_rsTaxa);
I removed the $queryString_rsTaxa so that it can be incremented or decremented accordingly in the page navigation. I left the $queryString in there for now b/c it will be useful in case other params are added */
// Hand code. Need two new recordsets for Previous and Next records - start
mysql_select_db($database_connDiatom2, $connDiatom2);
$query_rsTaxaPrev = "SELECT taxon_ID FROM taxa WHERE taxa.taxon_type='specific' AND taxa.active_inactive='active' ORDER BY taxon_name ASC";
$query_limit_rsTaxaPrev = sprintf("%s LIMIT %d, %d", $query_rsTaxaPrev, max(0, $startRow_rsTaxa - 1), $maxRows_rsTaxa);
$rsTaxaPrev = mysql_query($query_limit_rsTaxaPrev, $connDiatom2) or die(mysql_error());
$row_rsTaxaPrev = mysql_fetch_assoc($rsTaxaPrev);
mysql_select_db($database_connDiatom2, $connDiatom2);
$query_rsTaxaNext = "SELECT taxon_ID FROM taxa WHERE taxa.taxon_type='specific' AND taxa.active_inactive='active'ORDER BY taxon_name ASC";
$query_limit_rsTaxaNext = sprintf("%s LIMIT %d, %d", $query_rsTaxaNext, min($totalPages_rsTaxa, $startRow_rsTaxa + 1), $maxRows_rsTaxa);
$rsTaxaNext = mysql_query($query_limit_rsTaxaNext, $connDiatom2) or die(mysql_error());
$row_rsTaxaNext = mysql_fetch_assoc($rsTaxaNext);
// Hand code. Need two new recordsets for Previous and Next records - end
?>
Click any image to enlarge...
0) { // Show if recordset not empty ?>
LM image scalebar = 10 µm =
0) { // Show if recordset not empty ?>
SEM image scalebar = µm