5) {
$arrUrl = explode("?", $strUrl);
$strUrl = $arrUrl[0];
$arrUrl = explode("#", $strUrl);
$strUrl = $arrUrl[0];
$arrUrl = explode("&", $strUrl);
$strUrl = $arrUrl[0];
$query_eb = "SELECT * FROM " . $ebrochure . "_accounts WHERE purl='$strUrl' ORDER BY Event, Section, Row, SeatNumber ASC";
$eb = mysql_query($query_eb, $channel1media) or die(mysql_error());
$row_eb = mysql_fetch_assoc($eb);
$totalRows_eb = mysql_num_rows($eb);
if ($totalRows_eb > 0) {
$isRealPurl = true;
do {
$myaccount[] = $row_eb;
} while ($row_eb = mysql_fetch_assoc($eb));
if ($myaccount[0]['id'] < 3693) {
$isRenewal = true;
}
$account = $myaccount[0]['Account'];
$firstname = $myaccount[0]['FirstName'];
$email = $myaccount[0]['Email'];
$purl = $myaccount[0]['purl'];
if ($myaccount[0]['Rep'] != "") {
$rep = $myaccount[0]['Rep'];
$repPhone = $myaccount[0]['RepPhone'];
$repEmail = $myaccount[0]['RepEmail'];
}
$myaddress = $myaccount[0]['Address'];
if ($myaccount[0]['Address2'] != "") {
$myaddress .= "
" . $myaccount[0]['Address2'];
}
$myaddress .= "
" . $myaccount[0]['City'];
if ($hitsCount) {
$updateSQL = "UPDATE " . $ebrochure . "_accounts SET hits=hits+1 , `lasttime`='$thetime' WHERE `purl`='$strUrl'";
$Result1 = mysql_query($updateSQL, $channel1media) or die(mysql_error());
}
} else {
$aname = explode(".", $strUrl);
$firstname = str_replace("_", " ", $aname[0]);
if (count($aname)>1) {
$lastname = str_replace("_", " ", $aname[1]);
} else {
$lastname = "";
}
}
}
if ($isRealPurl) {
//echo "account type $accountType";
$_SESSION['myaccount'] = $myaccount;
$_SESSION['account'] = $account;
$_SESSION['purl'] = $strUrl;
$_SESSION['isRenewal'] = $isRenewal;
}
require_once('renewal.php');
}
?>