detail part 1
<?php require_once('Connections/connNids.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
if (!session_id()) session_start();
?>
<?php
$Paramid_WADAReport = "-1";
if (isset($_GET['id'])) {
$Paramid_WADAReport = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']);
}
$ParamSessionid_WADAReport = "-1";
if (isset($_SESSION['WADA_Insert_Report'])) {
$ParamSessionid_WADAReport = (get_magic_quotes_gpc()) ? $_SESSION['WADA_Insert_Report'] : addslashes($_SESSION['WADA_Insert_Report']);
}
$Paramid2_WADAReport = "-1";
if (isset($_GET['id'])) {
$Paramid2_WADAReport = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']);
}
mysql_select_db($database_connNids, $connNids);
$query_WADAReport = sprintf("SELECT id, submittedDate, last_name, first_name, primary_email, secondary_email, street_address, city, county, state_us, province_ca, zip_code, country, pri_phone, sec_phone, event_date, event_time, event_country, event_state_us, event_province_ca, event_city, event_county, num_witnesses, number_objects, short_description, long_description, upload1, upload2, upload3, _shape, _fivehundfeet FROM Report WHERE id = %s OR ( -1= %s AND id= %s)", GetSQLValueString($Paramid_WADAReport, "int"),GetSQLValueString($Paramid2_WADAReport, "int"),GetSQLValueString($ParamSessionid_WADAReport, "int"));
$WADAReport = mysql_query($query_WADAReport, $connNids) or die(mysql_error());
$row_WADAReport = mysql_fetch_assoc($WADAReport);
$totalRows_WADAReport = mysql_num_rows($WADAReport);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Details Report</title>
<link href="mystyles.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Modular_Pacifica.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Verdana.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/* Title Section */
#WADAPageTitleArea {
width: 555px;
}
#WADAPageTitleArea div, #WADAPageTitleArea p {
font-size: 11px;
padding-bottom: 5px;
}
#WADAPageTitleArea div#WADAPageTitle, #WADAPageTitle {
font-size: 14px;
font-weight: bold;
}
/* Details page CSS */
.WADADetailsContainer {
font-size: 11px;
}
#WADADetails, .WADANoResults {
border-top: 1px solid #BABDC2;
padding-top: 5px;
}
</style>
</head>
<body>
<div class="WADADetailsContainer"> <a name="top"></a>
<div id="WADAPageTitleArea">
<div id="WADAPageTitle">Page Title</div>
<div><a href="HBCCSearch.php">New Search</a></div>
</div>
<?php if ($totalRows_WADAReport > 0) { // Show if recordset not empty ?>
<div id="WADADetails">
<div class="WADAHeader">Details</div>
<table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
<tr>
<th class="WADADataTableHeader">Case Number:</th>
<td class="WADADataTableCell"><?php echo($row_WADAReport['id']); ?></td>
</tr>
<tr>
<th class="WADADataTableHeader">Date Submitted:</th>
<td class="WADADataTableCell"><?php echo($row_WADAReport['submittedDate']); ?></td>
</tr>
<tr>
<th class="WADADataTableHeader">Last name:</th>
<td class="WADADataTableCell"><?php echo($row_WADAReport['last_name']); ?></td>
</tr>
<tr>
<th class="WADADataTableHeader">First name:</th>
<td class="WADADataTableCell"><?php echo($row_WADAReport['first_name']); ?></td>
</tr>
<tr>
<th class="WADADataTableHeader">Primary email:</th>
<td class="WADADataTableCell"><?php echo($row_WADAReport['primary_email']); ?></td>
</tr>
<tr>
<th class="WADADataTableHeader">Secondary email:</th>
<td class="WADADataTableCell"><?php echo($row_WADAReport['secondary_email']); ?></td>
</tr>
<tr>
<th class="WADADataTableHeader">Street address:</th>
<td class="WADADataTableCell"><?php echo($row_WADAReport['street_address']); ?></td>
</tr>
<tr>
<th class="WADADataTableHeader">City:</th>
<td class="WADADataTableCell"><?php echo($row_WADAReport['city']); ?></td>
</tr>
<tr>
<th class="WADADataTableHeader">County:</th>
<td class="WADADataTableCell"><?php echo($row_WADAReport['county']); ?></td>