Fiction

Energion fiction titles cover a broad range of Christian fiction.

 

‘;
$dbh = mysql_connect (DBHOST, DBUSER, DBPWD) or die (‘I cannot connect to the database because: ‘ . mysql_error());
mysql_select_db (DBCAT);

$qres = mysql_query(“SELECT * FROM books WHERE (Type=’Book’ AND Category LIKE ‘%Fiction%’) ORDER BY Title ASC”);
echo ‘

‘.$type_names[$type_code].’

‘;
echo ‘


‘;
$result = mysql_fetch_array($qres);
while ($result) {
$title = $result[‘Title’];
$isbn = $result[‘ISBN’];
$sku = $result[‘SKU’];
$ene_date = date(‘Y-m-j’);
$rel_date = $result[‘Release’];
//Checking for special prices
$spec_price = DiscountPrice($sku,$so_note,$sp_end);
echo ‘

‘.$title.’

‘;
//Left
echo ‘

'.$title.'

‘;
//Right
echo ‘

‘;
if ($result[‘Status’] != ‘FORTH’) {
echo ‘

‘.$result[‘EnergionDirect’].’

‘;
} else {
echo ‘

This title is forthcoming. The final release date has not been set. ‘;
echo ‘Release is expected: ‘.$result[‘Planned’];
}
echo ‘

‘;

echo ‘

Pages: ‘.$result[‘Pages’].’
‘;
echo ‘ISBN: ‘.$isbn.’
‘;
echo ‘SKU: ‘.$sku.’
‘;
$price = $result[‘Price’];
if ($price != 0.00) {
$price = money_format(‘%i’,$price);
echo ‘Price: $’.$price.’
‘;
} else {
$price = ‘To be announced’;
}

if ($spec_price > 0.0 && $spec_price != $price) {
$sp_price = money_format(‘%i’,$spec_price);
echo ‘Special Price: $’.$sp_price.’
‘;
echo ‘(Sale Ends: ‘.$sp_end.’)
‘;
}
$qr = mysql_query(“SELECT * FROM Authors WHERE ISBN='”.$sku.”‘”);
$r = mysql_numrows($qr);
if ($r) {
$res = mysql_fetch_array($qr);
echo ‘Author: ‘;
while ($res) {
if ($j++ > 0)
echo ‘; ‘;
echo ‘‘.$res[‘LastName’].’, ‘.$res[‘FirstName’].’ ‘.$res[‘MI’].’‘;
$res = mysql_fetch_array($qr);

}
}
echo ‘
Note: ‘.$result[‘ShortDesc’].’
‘;
echo ‘

‘;
$result = mysql_fetch_array($qres);
}
?>