","",$metadesc);
$metadesc=str_replace("","",$metadesc);
$metadesc=str_replace("","",$metadesc);
$metadesc=str_replace("","",$metadesc);
$metadesc=str_replace("'","`",$metadesc);
$tagdesc=$metadesc;
$tagkeys="bookstore, book, books, online bookstore, ".$title." by ".$autname.":"." Fiction4All";
if ($hashtags!="" and $hashtags!=" ") {$tagkeys=$tagkeys.",".$hashtags;}
if ($rowpr[31]!="" and $rowpr[31]!=" ") {$tagkeys=$tagkeys.",".$rowpr[31];}
if ($rowpr[32]!="" and $rowpr[32]!=" ") {$tagkeys=$tagkeys.",".$rowpr[32];}
if ($rowpr[33]!="" and $rowpr[33]!=" ") {$tagkeys=$tagkeys.",".$rowpr[33];}
if ($rowpr[192]!="" and $rowpr[192]!=" ") {$tagkeys=$tagkeys.",".$rowpr[192];}
if ($rowpr[193]!="" and $rowpr[193]!=" ") {$tagkeys=$tagkeys.",".$rowpr[193];}
if ($rowpr[194]!="" and $rowpr[194]!=" ") {$tagkeys=$tagkeys.",".$rowpr[194];}
if ($rowpr[195]!="" and $rowpr[195]!=" ") {$tagkeys=$tagkeys.",".$rowpr[195];}
if ($rowpr[196]!="" and $rowpr[196]!=" ") {$tagkeys=$tagkeys.",".$rowpr[196];}
if ($rowpr[197]!="" and $rowpr[197]!=" ") {$tagkeys=$tagkeys.",".$rowpr[197];}
if ($rowpr[198]!="" and $rowpr[198]!=" ") {$tagkeys=$tagkeys.",".$rowpr[198];}
if ($rowpr[199]!="" and $rowpr[199]!=" ") {$tagkeys=$tagkeys.",".$rowpr[199];}
if ($rowpr[200]!="" and $rowpr[200]!=" ") {$tagkeys=$tagkeys.",".$rowpr[200];}
if ($rowpr[201]!="" and $rowpr[201]!=" ") {$tagkeys=$tagkeys.",".$rowpr[201];}
$resultau=mysqli_query($linkbk, "SELECT * FROM 00authors where aut_number='$h1aut'");
while($rowau = mysqli_fetch_row($resultau))
{
$h1mbr=$rowau[2];
}
}
}
if (!isset($id) or $id=="")
{
$id="f4all";
}
?>
";
// get the book details
if ($dispbooks!="N")
{
$pr=$inppr;
print "
";
$prstat="N";
$result=mysqli_query($linkbk, "SELECT pr_code,pr_status,pr_f4gold FROM 00productmeta where pr_code='$pr' ");
while($rowp = mysqli_fetch_row($result))
{
$pr=$rowp[0];
$prstat=$rowp[1];
$f4goldopt=$rowp[2];
include("../scripts/bookprocmeta.php");
$linkpage="";
if ($linkcode!="0")
{
$resultprx=mysqli_query($linkbk, "SELECT pr_linkcode FROM 00productmeta WHERE pr_code='$linkcode' ");
while($rowprx = mysqli_fetch_row($resultprx))
{
$linkpage="/ebooks/".$rowprx[0];
}
}
// get the author's name
$resultau=mysqli_query($linkbk, "SELECT * FROM 00authors where aut_number='$autno'");
while($rowau = mysqli_fetch_row($resultau))
{
if ($rowau[1]==$autno)
{
$autname=$rowau[5];
$autbio=$rowau[6];
$autweb=$rowau[44];
$autlinkno=$rowau[30];
} else {$autbio=""; $autname="Author Unknown";}
}
$headline = stripslashes($headline);
$title = stripslashes($title);
$subtitle = stripslashes($subtitle);
$desc = stripslashes($desc);
$autname = stripslashes($autname);
$extract = stripslashes($extract);
$autbio = stripslashes($autbio);
// get the genre descriptions
$genname1=""; $genname2=""; $genname3="";
if ($gencode1!="" and $gencode1!=" " and isset($gencode1))
{
$resultgr=mysqli_query($linkbk, "SELECT * FROM 00genres where gr_code='$gencode1'");
while($rowgr = mysqli_fetch_row($resultgr))
{
if ($rowgr[1]==$gencode1) {$genname1=$rowgr[2];}
}
}
if ($gencode2!="" and $gencode2!=" " and isset($gencode2))
{
$resultgr=mysqli_query($linkbk, "SELECT * FROM 00genres where gr_code='$gencode2'");
while($rowgr = mysqli_fetch_row($resultgr))
{
if ($rowgr[1]==$gencode2) {$genname2=$rowgr[2];}
}
}
if ($gencode3!="" and $gencode3!=" " and isset($gencode3))
{
$resultgr=mysqli_query($linkbk, "SELECT * FROM 00genres where gr_code='$gencode3'");
while($rowgr = mysqli_fetch_row($resultgr))
{
if ($rowgr[1]==$gencode3) {$genname3=$rowgr[2];}
}
}
// check if product already in member's library
$memtext="";$memop="N";
if ($login=="Y")
{
$resultml=mysqli_query($linkbk, "SELECT * FROM a1mbrshelf where ms_member='$f4user' and ms_prod='$pr'");
while($rowml = mysqli_fetch_row($resultml))
{
if ($rowml[1]==$f4user and $rowml[2]==$pr)
{$memtext=" This book is already in your member library"; $memop="Y";}
}
}
$keylist[]=""; $el=0;
// process any keywords
if ($kwd0!="") {$keylist[$el]=$kwd0; $el++;}
if ($kwd1!="") {$keylist[$el]=$kwd1; $el++;}
if ($kwd2!="") {$keylist[$el]=$kwd2; $el++;}
if ($kwd3!="") {$keylist[$el]=$kwd3; $el++;}
if ($kwd4!="") {$keylist[$el]=$kwd4; $el++;}
if ($kwd5!="") {$keylist[$el]=$kwd5; $el++;}
if ($kwd6!="") {$keylist[$el]=$kwd6; $el++;}
if ($kwd7!="") {$keylist[$el]=$kwd7; $el++;}
if ($kwd8!="") {$keylist[$el]=$kwd8; $el++;}
if ($kwd9!="") {$keylist[$el]=$kwd9; $el++;}
$keyel=$el;
$erflag=$_SESSION['erflag'];
if ($erflag!="N" and $erflag!="C" and $erflag!="A")
{
if ($erconsent=="U") { $erflag="N"; }
elseif ($erconsent=="C") { $erflag="C"; }
else {$erflag="A"; }
$_SESSION['erflag']=$erflag;
}
// got the info for the product so now display it
print "
";
print "
";
print "
";
if ($prstat!="A")
{
print "
$title by $autname
";
print "
Sorry, this book has been withdrawn from sale - so we are no longer able to offer it to you.
";
}
else
{
// active title
print "
";
print "
";
// col 1 - cover, review details
print "
";
if ($headline!="" and $headline!=" ")
{
print "
$headline
";
}
print "
$title
";
if ($subtitle!="")
{
print "
$subtitle
";
}
if ($imprint!="CO")
{
print "
by $autname
";
}
print "
Imprint: $impdesc
";
print "
";
print "
";
print "
";
if ($prtype=="A")
{
print "
THIS IS AN AUDIOBOOK
";
}
if ($srclibs=="A")
{
if ($ldpng=="Y") {$pic="https://a1adultebooks.com/bookimages/".$pr."fs.png";}
elseif ($ldgif=="Y") {$pic="https://a1adultebooks.com/bookimages/".$pr."fs.gif";}
elseif ($ldjpg=="Y") {$pic="https://a1adultebooks.com/bookimages/".$pr."fs.jpg";}
else {$pic="";}
}
if ($srclibs=="F")
{
if ($ldpng=="Y") {$pic="https://fiction4all.com/bookimages/".$pr."fs.png";}
elseif ($ldgif=="Y") {$pic="https://fiction4all.com/bookimages/".$pr."fs.gif";}
elseif ($ldjpg=="Y") {$pic="https://fiction4all.com/bookimages/".$pr."fs.jpg";}
else {$pic="";}
}
if ($pbcoverfront!="" or $pbcoverback!="")
{
print "
";
if ($pbcoverfront!="")
{
print "  ";
}
if ($pbcoverback!="")
{
print "";
}
if ($pbcoverback!="" or $pbcoverfront!="")
{
print " Click cover for larger image";
}
print "
";
}
else
{
if ($pic!="") { print "";}
}
if ($aioption=="Y")
{
print "
This book has been created using A.I. tools
";
}
if ($style=="D")
{
print "
";
print "";
print "
";
}
elseif ($style=="E" or $style=="S")
{
print "
";
print "";
print "
";
}
if ($imprint!="CO")
{
// more by this author
$autpage="/ebooks/a".$autno.".htm";
print "
";
}
// digital book
if ($prtype=="E")
{
if ($viscu=="USD") { $cursym="$";}
if ($viscu=="GBP") { $cursym="£";}
if ($viscu=="EUR") { $cursym="€";}
if ($viscu=="EUR")
{
print "
";
print "eBook not available from our site in Eurozone countries
";
}
else
{
if ($dirate==0)
{
if ($offprice!=$pubprice)
{
// non member gets the published price
print "
Ebook RRP: $cursym$pubprice
";
print "
Today: $cursym$offprice
";
}
else
{
// non member gets the published price
print "
Ebook Price: $cursym$pubprice
";
}
}
else
{
// non member gets the published price
print "
Ebook RRP: $cursym$pubprice
";
print "
Today: $cursym$offprice
";
}
// buy and redeem logos
if ($memop!="Y")
{
print "
";
if ($bkcredit!=0 and $discprice<10.00)
{
print " ";
}
// add to wish list
if ($login=="Y" and $f4user!="nomember")
{
print " ";
}
print "
";
}
if ($linkcode!="0")
{
print "
";
print "";
print "
";
}
}
}
if ($prtype=="P" and $paperback!="Y")
{
if ($viscu=="USD") { $cursym="$";}
if ($viscu=="GBP") { $cursym="£";}
if ($viscu=="EUR") { $cursym="€";}
print "
Collectable Price: $cursym$pubprice
";
print "
";
}
// paperback book
if ($paperback=="Y")
{
if ($pbcover3D!="") { print "";}
print "
Paperback Pages: $pbpages
";
if ($prtype=="P" or $prtype=="E")
{
print "
Paperback RRP: $pbcursym$pbrrp
";
print "
Paperback price: $pbcursym$pbprice
";
}
if ($prtype=="H")
{
print "
Hardcover RRP: $pbcursym$hbrrp
";
print "
Hardcover price: $pbcursym$hbprice
";
}
if ($prtype=="P" or $prtype=="E")
{
print "
";
}
if ($prtype=="H")
{
print "
";
}
// hardback book
if ($lshb=="Y")
{
print "
Hardback Pages: $lshbpages
";
print "
Hardback RRP: $pbcursym$hbrrp
";
print "
Hardback price: $pbcursym$hbprice
";
print "
";
}
}
if ($prtype=="H")
{
// hardback book
if ($lshb=="Y")
{
print "
Hardback Pages: $lshbpages
";
print "
Hardback price: $pbcursym$lshbprice
";
print "
";
}
}
if ($prtype=="A")
{
if ($viscu=="USD") { $cursym="$";}
if ($viscu=="GBP") { $cursym="£";}
if ($viscu=="EUR") { $cursym="€";}
if ($viscu=="EUR")
{
print "
";
print "Audiobook not available from our site in Eurozone countries
";
}
else
{
if ($dirate==0)
{
if ($offprice!=$pubprice)
{
// non member gets the published price
print "
Audiobook RRP: $cursym$pubprice
";
print "
Today: $cursym$offprice
";
}
else
{
// non member gets the published price
print "
Audiobook Price: $cursym$pubprice
";
}
}
else
{
// non member gets the published price
print "
Audiobook RRP: $cursym$pubprice
";
print "
Today: $cursym$offprice
";
}
// buy and redeem logos
if ($memop!="Y")
{
$vb=""; $jin=""; $pub="";
print "
";
}
if ($linkcode!="0")
{
print "
";
print "";
print "
";
}
}
}
print "
";
if ($f4exclusive=="Y")
{
if (($pubkindle=="Y" and $kindleno!="") or ($pubsmash=="Y" and $smashno!='0') or ($pubamazon=="Y" and $amazonno!=""))
{
print "
Purchase elsewhere
";
}
if ($pubkindle=="Y" and $kindleno!="")
{
print "
";
print "
";
}
if ($pubsmash=="Y" and $smashno!="")
{
print "
";
print "
";
}
if ($pubamazon=="Y" and $amazonno!="")
{
print "
";
print "
";
}
}
print "
";
// put in ratings table next
if ($avrt!=0)
{
if ($avrt==0) { $dispstars="/images/0stars.gif"; }
if ($avrt==1) { $dispstars="/images/1stars.gif"; }
if ($avrt==1.5) { $dispstars="/images/1p5stars.gif"; }
if ($avrt==2) { $dispstars="/images/2stars.gif"; }
if ($avrt==2.5) { $dispstars="/images/2p5stars.gif"; }
if ($avrt==3) { $dispstars="/images/3stars.gif"; }
if ($avrt==3.5) { $dispstars="/images/3p5stars.gif"; }
if ($avrt==4) { $dispstars="/images/4stars.gif"; }
if ($avrt==4.5) { $dispstars="/images/4p5stars.gif"; }
if ($avrt==5) { $dispstars="/images/5stars.gif"; }
print "
";
print "
";
print "
";
print " ";
print "
";
print "
";
if ($rvno!=0) { print "Average $dispavrt from $rvno ratings";}
else { print "Not yet rated. Buy this book and be the first to rate it!";}
print "
";
print "
";
print " ";
print "
";
print "
";
print "
";
}
if ($rvcnt!=0)
{
print "
";
print "
";
print "
";
print " ";
print "
";
print "
";
print "
";
$cnt=1;
while ($cnt<=$rvcnt)
{
print "
";
$disptxt=$rvtxt[$cnt];
$disptxt=$disptxt." ".$rvstars[$cnt]." out of 5";
if ($rvnic[$cnt]!="") $disptxt=$disptxt." (".$rvnic[$cnt].")";
$disptxt=wordwrap($disptxt,70);
print "
";
print "
$disptxt";
print "
";
print "
";
$cnt++;
}
print "
";
print "
";
print "
";
print " ";
print "
";
print "
";
print "
";
}
print "
";
if ($trailer=="Y")
{
print "
";
print "
TURN UP YOUR SOUND AND VIEW A TRAILER FOR THIS BOOK
Style: $genname1";
if ($genname2!="" and $genname2!=" ")
{
if ($genname1=="" or $genname1==" ") {print "$genname2";}
else
{print ", $genname2";}
}
if ($genname3!="" and $genname3!=" ") {print ", $genname3";}
print "
";
// next the bit under the synopsis
// print"
Product type: $prtype_text
";
print "
Published: $pubmth / $pubyear
";
if ($seriesno!=0)
{
$seriespage="https://fiction4all.com/ebooks/s_".$seriesno.".htm";
print "
";
}
if ($login=="Y" and $f4user!="nomember")
{
// seee if alert exists for member/author
$resultx=mysqli_query($linkbk, "SELECT * FROM 00alerts where al_memberid='$f4user' and al_type='A' and al_autno='$autno' and al_source='A1' ");
$numrowsx = mysqli_num_rows($resultx);
if ($numrowsx=="0")
{
print "
This is an audio book. Run time is approx. $audiodisp . There are $nofiles parts to download and the total download size is approx. $dldsize Mb
";
print "
";
}
$autbio=html_entity_decode($autbio,ENT_QUOTES);
$autbio=nl2br($autbio);
if ($retlib!="" and $retlib!=" " and $retlib!=$lastpage)
{
print "
";
}
print "
";
print "
";
// col 2 - product details
print "
";
$desc=nl2br($desc);
print "
STORY DESCRIPTION
";
print "
$desc
";
print "
";
print "
";
if ($keyel!=0)
{
print "
Keywords related to this title - click on a keyword to find more, related stories
";
$el=0;
print "
";
while ($el<=$keyel)
{
$srchword1=trim($keylist[$el]);
$srchword=str_replace(" ","%20",$srchword1);
$wordok="Y";
// check the search keyword is not in our banned list (00badwords)
$delims=" ";
$tstwrd= strtok( $srchword,$delims);
while ( is_string($tstwrd) )
{
if ($tstwrd)
{
$srword=" ".$tstwrd;
do {
$result=mysqli_query($linkbk, "SELECT * FROM 00badwords WHERE (bw_word='$srword')");
} while (!$result);
$bwcnt = mysqli_num_rows($result);
if ($bwcnt!=0) {$wordok="N"; }
$tstwrd= strtok($delims);
}
}
if ($wordok=="Y")
{
if ($el==9 or $el==18 or $el==27 or $el==36) {print " ";}
if ($el<30)
{
$srchurl="/searchengine.htm?srchtype=W&srchdept=A&kwd=$srchword";
print "$srchword1";
}
$el++;
print " ";
}
else
{
$el++;
}
}
}
if ($imprint!="CO")
{
if (strlen($autbio)>10)
{
print "
";
$cnt=1;
while ($cnt<=$rvcnt)
{
$disptxt=$rvtxt[$cnt];
$disptxt=$disptxt." ".$rvstars[$cnt]." out of 5";
if ($rvnic[$cnt]!="") $disptxt=$disptxt." (".$rvnic[$cnt].")";
$autreply=$rvreply[$cnt];
print "
";
print "$disptxt";
print "
";
if ($autreply!="" and $autreply!=" ")
{
print "
Author reply: $autreply
";
}
$cnt++;
}
}
// process for external reviews
$resultx=mysqli_query($linkbk, "SELECT * FROM 00rvexternal where re_product='$pr' and re_status='A' ");
$numrowsx = mysqli_num_rows($resultx);
if ($numrowsx!=0)
{
print "
";
print "$exrtext";
$outof=$rowx[8];
if ($outof<'5') {$outof='5';}
if ($rowx[7]>'0' and $rowx[7]<'10')
{
print " Rating: $rowx[7] / $outof";
}
print "
";
}
} // end of numrowsx!=0
// now do announcements for this book
$resultan=mysqli_query($linkbk, "SELECT * FROM 00announce WHERE (pa_aut='$autlinkno' and pa_prod='$pr' )");
$numrows = mysqli_num_rows($resultan);
if ($numrows!=0)
{
print "
";
print "
";
print "
";
print "
ANNOUNCEMENTS FOR THIS BOOK
";
}
$resultan=mysqli_query($linkbk, "SELECT * FROM 00announce WHERE (pa_aut='$autlinkno' and pa_prod='$pr' ) order by pa_date DESC");
while($rowan = mysqli_fetch_row($resultan))
{
$annrec=$rowan[0];
$anntype=$rowan[3];
$anndate=$rowan[4];
$anntitle=html_entity_decode($rowan[5],ENT_QUOTES);
$anndesc=html_entity_decode($rowan[6],ENT_QUOTES);
$annlogo=$rowan[7];
// get type description
$resultad=mysqli_query($linkbk, "SELECT * FROM 00announcetypes where at_type='$anntype' ");
while($rowad = mysqli_fetch_row($resultad))
{
$tdesc=html_entity_decode($rowad[2],ENT_QUOTES);
}
$atyr=substr($anndate,0,4);
$atmth=substr($anndate,4,2);
$atday=substr($anndate,6,2);
$badge="";
if ($annlogo!="")
{
$badge="https://fiction4all.com/announcements/$annlogo";
}
print "";
if ($badge!="")
{
print "
";
print "
";
print "
";
print "";
print "
";
print "
";
}
print "
Date : Day ($atday) Mth ($atmth) Year ($atyr)";
print "