";
$rec=$row[0];
$incnt=$row[5];
$incnt++;
mysqli_query($linkwsd, "UPDATE a1afftraffic SET hi_cnt=$incnt WHERE recno=$rec ");
}
}
else
{
//no matching record - create one and update inbound
$cnt=1;
mysqli_query($linkwsd, "INSERT INTO a1afftraffic (hi_mbrid, hi_link, hi_date, hi_ipno, hi_cnt, hi_src)
VALUES('$id', '$in', '$today', '$usrip', '$cnt', '$trksrc')");
//print "debug point 2
";
// process inbound
$year = date("Y");
$mth= date("m");
$result2=mysqli_query($linkwsd, "SELECT * FROM a1afftraffictotals WHERE (hi_src='$trksrc' and hi_mbrid='$id' and hi_link='$in' and hi_date='$today') ");
if ($result2)
{
$num_rows2 = mysqli_num_rows($result2);
if ($num_rows2!=0)
{
while($row2 = mysqli_fetch_row($result2))
{
$rec=$row2[0];
$incnt=$row2[4];
$incnt++;
mysqli_query($linkwsd, "UPDATE a1afftraffictotals SET hi_cnt='$incnt' WHERE recno='$rec' ");
//print "debug point 3
";
}
}
else
{
// no result - add record to inbound
$cnt=1;
mysqli_query($linkwsd, "INSERT INTO a1afftraffictotals (hi_mbrid, hi_link, hi_date, hi_cnt, hi_src)
VALUES('$id', '$in', '$today', '$cnt', '$trksrc')");
//print "debug point 4
";
}
}
else
{
// no result - add record to inbound
$cnt=1;
mysqli_query($linkwsd, "INSERT INTO a1afftraffictotals (hi_mbrid, hi_link, hi_date, hi_cnt, hi_src)
VALUES('$id', '$in', '$today', '$cnt', '$trksrc')");
//print "debug point 5
";
}
}
}
else
{
//print "debug point 6
";
// no result - create a record
$cnt=1;
mysqli_query($linkwsd, "INSERT INTO a1afftraffic (hi_mbrid, hi_link, hi_date, hi_ipno, hi_cnt, hi_src)
VALUES('$id', '$in', '$today', '$usrip', '$cnt', '$trksrc')");
// process inbound
$year = date("Y");
$mth= date("m");
$result2=mysqli_query($linkwsd, "SELECT * FROM a1afftraffictotals WHERE (hi_src='$trksrc' and hi_mbrid='$id' and hi_link='$in' and hi_date='$today') ");
if ($result2)
{
$num_rows2 = mysqli_num_rows($result2);
if ($num_rows2!=0)
{
while($row2 = mysqli_fetch_row($result2))
{
$rec=$row2[0];
$incnt=$row2[4];
$incnt++;
mysqli_query($linkwsd, "UPDATE a1afftraffictotals SET hi_cnt='$incnt' WHERE recno='$rec' ");
//print "debug point 3
";
}
}
else
{
// no result - add record to inbound
$cnt=1;
mysqli_query($linkwsd, "INSERT INTO a1afftraffictotals (hi_mbrid, hi_link, hi_date, hi_cnt, hi_src)
VALUES('$id', '$in', '$today', '$cnt', '$trksrc')");
//print "debug point 4
";
}
}
else
{
// no result - add record to inbound
$cnt=1;
mysqli_query($linkwsd, "INSERT INTO a1afftraffictotals (hi_mbrid, hi_link, hi_date, hi_cnt, hi_src)
VALUES('$id', '$in', '$today', '$cnt', '$trksrc')");
//print "debug point 5
";
}
}
// end of traffic monitoring routine
if ($login=="Y")
{
$affstat="N";
$result=mysqli_query($linkwsd, "SELECT * FROM a1members WHERE m1_userid='$f4user' ");
while($row = mysqli_fetch_row($result))
{
if ($row[1]==$f4user)
{ $bkcredit=$row[25]; $nletter=$row[28];}
}
$resultm=mysqli_query($linkwsd, "SELECT * FROM a1affachdr where ah_number='$f4user' ");
while($rowm = mysqli_fetch_row($resultm))
{
$acbal=$rowm[2];
$acbaluk=$rowm[5];
$acbaleuro=$rowm[6];
}
}
if ($pagecfg=="A")
{
$lastpage="/".$id.".htm";
$_SESSION['lastpage']=$lastpage;
$_SESSION['lastlib']=$lastpage."?catseq=".$catseq."&sh=".$sh;
}
else
{
$resultad=mysqli_query($linkwsd, "SELECT * FROM a1members WHERE m1_userid='$id' ");
while($rowad = mysqli_fetch_row($resultad))
{
$mbrno=$rowad[0];
}
$lastpage="/".$mbrno.".htm";
$_SESSION['lastpage']=$lastpage;
$_SESSION['lastlib']=$lastpage."?catseq=".$catseq."&sh=".$sh;
}
$sh="1";
$thisurl=$lastpage;
$_SESSION['thisurl']=$thisurl;
?>
$sitename";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
?>
";
print "";
print "";
// column=1
print "";
print "";
print "";
print "";
if ($usebanner=="Y")
{
print "";
}
else
{
if ($sitename!="" and $sitename!=" ")
{
print " $sitename ";
}
if ($subtag!="" and $subtag!=" ")
{
print " $subtag ";
}
}
if ($w1legalopt=="1") { print "";}
if ($w1legalopt=="2") { print "";}
if ($w1legalopt=="3") { print "";}
if ($w1fantasyopt=="1") { print "";}
if ($w1fantasyopt=="2") { print "";}
if ($w1fantasyopt=="3") { print "";}
if ($id==$f4user)
{
print " Configure your front page: ";
}
print " | ";
print "";
if ($incpromos!="0")
{
print " FEATURED BOOKS ";
print "";
}
else
{
print " CURRENT HOT BOOKS ";
print "";
}
if ($id==$f4user)
{
print " Configure featured books: ";
}
print " | ";
print " | ";
print "";
// display up to the most recent 7 entries on the timeline
if (!isset($tlstart)) { $tlstart=0; }
$tlcnt=0;
print "";
print "";
print "";
print " Timeline";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
}
print " ";
print " ";
$tlend=$tlstart+7;
$tloop=1;
$numtl=0;
if ($inpaut!=0)
{
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_autno='$inpaut' and tl_sequence='1' order by tl_postno DESC ");
$numtl=mysqli_num_rows($resultti);
}
else
{
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_userid='$id' and tl_autno='0' and tl_sequence='1' order by tl_postno DESC ");
$numtl=mysqli_num_rows($resultti);
}
while($rowti = mysqli_fetch_row($resultti))
{
if ($tlstart>=$tloop)
{
$tloop++;
}
elseif ($tlcnt<7)
{
$recno=$rowti[0];
$postno=$rowti[3];
$datestamp=$rowti[4];
$callow=$rowti[8];
$comment=$rowti[7];
$comment=html_entity_decode($comment,ENT_QUOTES);
$comment=nl2br($comment);
$postmth=substr($datestamp,4,2);
if ($postmth=="01") {$postm="Jan";}
if ($postmth=="02") {$postm="Feb";}
if ($postmth=="03") {$postm="Mar";}
if ($postmth=="04") {$postm="Apr";}
if ($postmth=="05") {$postm="May";}
if ($postmth=="06") {$postm="Jun";}
if ($postmth=="07") {$postm="Jul";}
if ($postmth=="08") {$postm="Aug";}
if ($postmth=="09") {$postm="Sep";}
if ($postmth=="10") {$postm="Oct";}
if ($postmth=="11") {$postm="Nov";}
if ($postmth=="12") {$postm="Dec";}
$posty=substr($datestamp,0,4);
$postd=substr($datestamp,6,2);
$posth=substr($datestamp,8,2);
$postmin=substr($datestamp,10,2);
$posts=substr($datestamp,12,2);
$postdesc="Posted: $postd $postm $posty at $posth:$postmin:$postd";
if ($callow=="N") {$cadesc="Comments not allowed for this post"; }
if ($callow!="N")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' and tl_sequence>'1' and tl_callow='A' ");
$numcom=mysqli_num_rows($resultti2);
}
if ($callow=="M")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' and tl_sequence>'1' and tl_callow='M' ");
$numcommod=mysqli_num_rows($resultti2);
}
print " $postdesc";
if ($callow=="N") { print " $cadesc"; }
if ($callow!="N") { print " Comments: $numcom"; }
if ($callow=="M" and $numcommod!=0) { print " Not moderated: $numcommod"; }
print " ";
print " $comment ";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
print " ";
print " ";
}
print " ";
$tlcnt++;
}
}
if ($tlcnt==0)
{
print " No timeline has been created yet. ";
}
print "";
if ($tlend>14)
{
$tlstart=0;
print " ";
}
if ($tlend>7)
{
$tlstart=$tlend-14;
print " ";
}
if ($numtl>$tlend)
{
$tlstart=$tlend;
print " ";
}
print " ";
print " | ";
print " |
";
print "";
print "";
print "
";
print "";
// column=1
print "";
print "";
print "";
print "";
if ($usebanner=="Y")
{
print "";
}
else
{
if ($sitename!="" and $sitename!=" ")
{
print " $sitename ";
}
if ($subtag!="" and $subtag!=" ")
{
print " $subtag ";
}
}
if ($w1legalopt=="1") { print "";}
if ($w1legalopt=="2") { print "";}
if ($w1legalopt=="3") { print "";}
if ($w1fantasyopt=="1") { print "";}
if ($w1fantasyopt=="2") { print "";}
if ($w1fantasyopt=="3") { print "";}
if ($id==$f4user)
{
print " Configure your front page: ";
}
print " | ";
print "";
if ($incpromos!="0")
{
print " FEATURED BOOKS ";
print "";
}
else
{
print " CURRENT HOT BOOKS ";
print "";
}
if ($id==$f4user)
{
print " Configure featured books: ";
}
print " | ";
print " | ";
print "";
// display up to the most recent 7 entries on the timeline
if (!isset($tlstart)) { $tlstart=0; }
$tlcnt=0;
print "";
print "";
print "";
print " Timeline";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
}
print " ";
print " ";
$tlend=$tlstart+7;
$tloop=1;
$numtl=0;
if ($inpaut!=0)
{
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_autno='$inpaut' and tl_sequence='1' order by tl_postno DESC ");
$numtl=mysqli_num_rows($resultti);
}
else
{
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_userid='$id' and tl_autno='0' and tl_sequence='1' order by tl_postno DESC ");
$numtl=mysqli_num_rows($resultti);
}
while($rowti = mysqli_fetch_row($resultti))
{
if ($tlstart>=$tloop)
{
$tloop++;
}
elseif ($tlcnt<7)
{
$recno=$rowti[0];
$postno=$rowti[3];
$datestamp=$rowti[4];
$callow=$rowti[8];
$comment=$rowti[7];
$comment=html_entity_decode($comment,ENT_QUOTES);
$comment=nl2br($comment);
$postmth=substr($datestamp,4,2);
if ($postmth=="01") {$postm="Jan";}
if ($postmth=="02") {$postm="Feb";}
if ($postmth=="03") {$postm="Mar";}
if ($postmth=="04") {$postm="Apr";}
if ($postmth=="05") {$postm="May";}
if ($postmth=="06") {$postm="Jun";}
if ($postmth=="07") {$postm="Jul";}
if ($postmth=="08") {$postm="Aug";}
if ($postmth=="09") {$postm="Sep";}
if ($postmth=="10") {$postm="Oct";}
if ($postmth=="11") {$postm="Nov";}
if ($postmth=="12") {$postm="Dec";}
$posty=substr($datestamp,0,4);
$postd=substr($datestamp,6,2);
$posth=substr($datestamp,8,2);
$postmin=substr($datestamp,10,2);
$posts=substr($datestamp,12,2);
$postdesc="Posted: $postd $postm $posty at $posth:$postmin:$postd";
if ($callow=="N") {$cadesc="Comments not allowed for this post"; }
if ($callow!="N")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' and tl_sequence>'1' and tl_callow='A' ");
$numcom=mysqli_num_rows($resultti2);
}
if ($callow=="M")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' and tl_sequence>'1' and tl_callow='M' ");
$numcommod=mysqli_num_rows($resultti2);
}
print " $postdesc";
if ($callow=="N") { print " $cadesc"; }
if ($callow!="N") { print " Comments: $numcom"; }
if ($callow=="M" and $numcommod!=0) { print " Not moderated: $numcommod"; }
print " ";
print " $comment ";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
print " ";
print " ";
}
print " ";
$tlcnt++;
}
}
if ($tlcnt==0)
{
print " No timeline has been created yet. ";
}
print "";
if ($tlend>14)
{
$tlstart=0;
print " ";
}
if ($tlend>7)
{
$tlstart=$tlend-14;
print " ";
}
if ($numtl>$tlend)
{
$tlstart=$tlend;
print " ";
}
print " ";
print " | ";
print " |
";
print "
";
print "";
print "
";
print "";
// column=1
print "";
print "";
print "";
print "";
if ($usebanner=="Y")
{
print "";
}
else
{
if ($sitename!="" and $sitename!=" ")
{
print " $sitename ";
}
if ($subtag!="" and $subtag!=" ")
{
print " $subtag ";
}
}
if ($w1legalopt=="1") { print "";}
if ($w1legalopt=="2") { print "";}
if ($w1legalopt=="3") { print "";}
if ($w1fantasyopt=="1") { print "";}
if ($w1fantasyopt=="2") { print "";}
if ($w1fantasyopt=="3") { print "";}
if ($id==$f4user)
{
print " Configure your front page: ";
}
print " | ";
print "";
if ($incpromos!="0")
{
print " FEATURED BOOKS ";
print "";
}
else
{
print " CURRENT HOT BOOKS ";
print "";
}
if ($id==$f4user)
{
print " Configure featured books: ";
}
print " | ";
print " | ";
print "";
// display up to the most recent 7 entries on the timeline
if (!isset($tlstart)) { $tlstart=0; }
$tlcnt=0;
print "";
print "";
print "";
print " Timeline";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
}
print " ";
print " ";
$tlend=$tlstart+7;
$tloop=1;
$numtl=0;
if ($inpaut!=0)
{
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_autno='$inpaut' and tl_sequence='1' order by tl_postno DESC ");
$numtl=mysqli_num_rows($resultti);
}
else
{
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_userid='$id' and tl_autno='0' and tl_sequence='1' order by tl_postno DESC ");
$numtl=mysqli_num_rows($resultti);
}
while($rowti = mysqli_fetch_row($resultti))
{
if ($tlstart>=$tloop)
{
$tloop++;
}
elseif ($tlcnt<7)
{
$recno=$rowti[0];
$postno=$rowti[3];
$datestamp=$rowti[4];
$callow=$rowti[8];
$comment=$rowti[7];
$comment=html_entity_decode($comment,ENT_QUOTES);
$comment=nl2br($comment);
$postmth=substr($datestamp,4,2);
if ($postmth=="01") {$postm="Jan";}
if ($postmth=="02") {$postm="Feb";}
if ($postmth=="03") {$postm="Mar";}
if ($postmth=="04") {$postm="Apr";}
if ($postmth=="05") {$postm="May";}
if ($postmth=="06") {$postm="Jun";}
if ($postmth=="07") {$postm="Jul";}
if ($postmth=="08") {$postm="Aug";}
if ($postmth=="09") {$postm="Sep";}
if ($postmth=="10") {$postm="Oct";}
if ($postmth=="11") {$postm="Nov";}
if ($postmth=="12") {$postm="Dec";}
$posty=substr($datestamp,0,4);
$postd=substr($datestamp,6,2);
$posth=substr($datestamp,8,2);
$postmin=substr($datestamp,10,2);
$posts=substr($datestamp,12,2);
$postdesc="Posted: $postd $postm $posty at $posth:$postmin:$postd";
if ($callow=="N") {$cadesc="Comments not allowed for this post"; }
if ($callow!="N")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' and tl_sequence>'1' and tl_callow='A' ");
$numcom=mysqli_num_rows($resultti2);
}
if ($callow=="M")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' and tl_sequence>'1' and tl_callow='M' ");
$numcommod=mysqli_num_rows($resultti2);
}
print " $postdesc";
if ($callow=="N") { print " $cadesc"; }
if ($callow!="N") { print " Comments: $numcom"; }
if ($callow=="M" and $numcommod!=0) { print " Not moderated: $numcommod"; }
print " ";
print " $comment ";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
print " ";
print " ";
}
print " ";
$tlcnt++;
}
}
if ($tlcnt==0)
{
print " No timeline has been created yet. ";
}
print "";
if ($tlend>14)
{
$tlstart=0;
print " ";
}
if ($tlend>7)
{
$tlstart=$tlend-14;
print " ";
}
if ($numtl>$tlend)
{
$tlstart=$tlend;
print " ";
}
print " ";
print " | ";
print " |
";
print "
";
print "";
print "
";
print "";
// column=1
print "";
print "";
print "";
print "";
if ($usebanner=="Y")
{
print "";
}
else
{
if ($sitename!="" and $sitename!=" ")
{
print " $sitename ";
}
if ($subtag!="" and $subtag!=" ")
{
print " $subtag ";
}
}
if ($w1legalopt=="1") { print "";}
if ($w1legalopt=="2") { print "";}
if ($w1legalopt=="3") { print "";}
if ($w1fantasyopt=="1") { print "";}
if ($w1fantasyopt=="2") { print "";}
if ($w1fantasyopt=="3") { print "";}
if ($id==$f4user)
{
print " Configure your front page: ";
}
print " | ";
print "";
if ($incpromos!="0")
{
print " FEATURED BOOKS ";
print "";
}
else
{
print " CURRENT HOT BOOKS ";
print "";
}
if ($id==$f4user)
{
print " Configure featured books: ";
}
print " | ";
print " | ";
print "";
// display up to the most recent 7 entries on the timeline
if (!isset($tlstart)) { $tlstart=0; }
$tlcnt=0;
print "";
print "";
print "";
print " Timeline";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
}
print " ";
print " ";
$tlend=$tlstart+7;
$tloop=1;
$numtl=0;
if ($inpaut!=0)
{
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_autno='$inpaut' and tl_sequence='1' order by tl_postno DESC ");
$numtl=mysqli_num_rows($resultti);
}
else
{
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_userid='$id' and tl_autno='0' and tl_sequence='1' order by tl_postno DESC ");
$numtl=mysqli_num_rows($resultti);
}
while($rowti = mysqli_fetch_row($resultti))
{
if ($tlstart>=$tloop)
{
$tloop++;
}
elseif ($tlcnt<7)
{
$recno=$rowti[0];
$postno=$rowti[3];
$datestamp=$rowti[4];
$callow=$rowti[8];
$comment=$rowti[7];
$comment=html_entity_decode($comment,ENT_QUOTES);
$comment=nl2br($comment);
$postmth=substr($datestamp,4,2);
if ($postmth=="01") {$postm="Jan";}
if ($postmth=="02") {$postm="Feb";}
if ($postmth=="03") {$postm="Mar";}
if ($postmth=="04") {$postm="Apr";}
if ($postmth=="05") {$postm="May";}
if ($postmth=="06") {$postm="Jun";}
if ($postmth=="07") {$postm="Jul";}
if ($postmth=="08") {$postm="Aug";}
if ($postmth=="09") {$postm="Sep";}
if ($postmth=="10") {$postm="Oct";}
if ($postmth=="11") {$postm="Nov";}
if ($postmth=="12") {$postm="Dec";}
$posty=substr($datestamp,0,4);
$postd=substr($datestamp,6,2);
$posth=substr($datestamp,8,2);
$postmin=substr($datestamp,10,2);
$posts=substr($datestamp,12,2);
$postdesc="Posted: $postd $postm $posty at $posth:$postmin:$postd";
if ($callow=="N") {$cadesc="Comments not allowed for this post"; }
if ($callow!="N")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' and tl_sequence>'1' and tl_callow='A' ");
$numcom=mysqli_num_rows($resultti2);
}
if ($callow=="M")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' and tl_sequence>'1' and tl_callow='M' ");
$numcommod=mysqli_num_rows($resultti2);
}
print " $postdesc";
if ($callow=="N") { print " $cadesc"; }
if ($callow!="N") { print " Comments: $numcom"; }
if ($callow=="M" and $numcommod!=0) { print " Not moderated: $numcommod"; }
print " ";
print " $comment ";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
print " ";
print " ";
}
print " ";
$tlcnt++;
}
}
if ($tlcnt==0)
{
print " No timeline has been created yet. ";
}
print "";
if ($tlend>14)
{
$tlstart=0;
print " ";
}
if ($tlend>7)
{
$tlstart=$tlend-14;
print " ";
}
if ($numtl>$tlend)
{
$tlstart=$tlend;
print " ";
}
print " ";
print " | ";
print " |
";
print "
";
print "";
print "
";
print "";
// column=1
print "";
print "";
print "";
print "";
if ($usebanner=="Y")
{
print "";
}
else
{
if ($sitename!="" and $sitename!=" ")
{
print " $sitename ";
}
if ($subtag!="" and $subtag!=" ")
{
print " $subtag ";
}
}
if ($w1legalopt=="1") { print "";}
if ($w1legalopt=="2") { print "";}
if ($w1legalopt=="3") { print "";}
if ($w1fantasyopt=="1") { print "";}
if ($w1fantasyopt=="2") { print "";}
if ($w1fantasyopt=="3") { print "";}
if ($id==$f4user)
{
print " Configure your front page: ";
}
print " | ";
print " ";
print "";
print "";
if ($incpromos!="0")
{
print " FEATURED BOOKS ";
print "";
}
else
{
print " CURRENT HOT BOOKS ";
print "";
}
if ($id==$f4user)
{
print " Configure featured books: ";
}
print " | ";
print " | ";
print "
";
print "";
print "";
// display up to the most recent 7 entries on the timeline
if (!isset($tlstart)) { $tlstart=0; }
$tlcnt=0;
print "";
print "";
print "";
print " Timeline";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
}
print " ";
print " ";
$tlend=$tlstart+7;
$tloop=1;
$numtl=0;
if ($inpaut!=0)
{
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_autno='$inpaut' and tl_sequence='1' order by tl_postno DESC ");
$numtl=mysqli_num_rows($resultti);
}
else
{
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_userid='$id' and tl_autno='0' and tl_sequence='1' order by tl_postno DESC ");
$numtl=mysqli_num_rows($resultti);
}
while($rowti = mysqli_fetch_row($resultti))
{
if ($tlstart>=$tloop)
{
$tloop++;
}
elseif ($tlcnt<7)
{
$recno=$rowti[0];
$postno=$rowti[3];
$datestamp=$rowti[4];
$callow=$rowti[8];
$comment=$rowti[7];
$comment=html_entity_decode($comment,ENT_QUOTES);
$comment=nl2br($comment);
$postmth=substr($datestamp,4,2);
if ($postmth=="01") {$postm="Jan";}
if ($postmth=="02") {$postm="Feb";}
if ($postmth=="03") {$postm="Mar";}
if ($postmth=="04") {$postm="Apr";}
if ($postmth=="05") {$postm="May";}
if ($postmth=="06") {$postm="Jun";}
if ($postmth=="07") {$postm="Jul";}
if ($postmth=="08") {$postm="Aug";}
if ($postmth=="09") {$postm="Sep";}
if ($postmth=="10") {$postm="Oct";}
if ($postmth=="11") {$postm="Nov";}
if ($postmth=="12") {$postm="Dec";}
$posty=substr($datestamp,0,4);
$postd=substr($datestamp,6,2);
$posth=substr($datestamp,8,2);
$postmin=substr($datestamp,10,2);
$posts=substr($datestamp,12,2);
$postdesc="Posted: $postd $postm $posty at $posth:$postmin:$postd";
if ($callow=="N") {$cadesc="Comments not allowed for this post"; }
if ($callow!="N")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' and tl_sequence>'1' and tl_callow='A' ");
$numcom=mysqli_num_rows($resultti2);
}
if ($callow=="M")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' and tl_sequence>'1' and tl_callow='M' ");
$numcommod=mysqli_num_rows($resultti2);
}
print " $postdesc";
if ($callow=="N") { print " $cadesc"; }
if ($callow!="N") { print " Comments: $numcom"; }
if ($callow=="M" and $numcommod!=0) { print " Not moderated: $numcommod"; }
print " ";
print " $comment ";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
print " ";
print " ";
}
print " ";
$tlcnt++;
}
}
if ($tlcnt==0)
{
print " No timeline has been created yet. ";
}
print "";
if ($tlend>14)
{
$tlstart=0;
print " ";
}
if ($tlend>7)
{
$tlstart=$tlend-14;
print " ";
}
if ($numtl>$tlend)
{
$tlstart=$tlend;
print " ";
}
print " ";
print " | ";
print " |
";
print "
";
print "";
print "";
print "";
print " ";
if ($ontl=="Y")
{
print "Unexpand Timeline ";
}
print " ";
print " |
";
if ($ontl!="Y")
{
// standard unexpanded display section
print "";
print "";
if ($hpcontent=="A" or $hpcontent=="O") {$bkpage="/ebooks/newtitles.htm"; $bkdesc="Latest Books In Store";}
if ($hpcontent=="E") {$bkpage="/ebooks/newerotica.htm"; $bkdesc="Latest Erotica In Store";}
if ($hpcontent=="S") {$bkpage="/ebooks/newdarkerotica.htm"; $bkdesc="Latest Dark Erotica In Store";}
if ($hpcontent=="R") {$bkpage="/ebooks/newromance.htm"; $bkdesc="Latest Romance In Store";}
if ($hpcontent=="D") {$bkpage="/ebooks/newbdsm.htm"; $bkdesc="Latest BDSM In Store";}
if ($hpcontent=="F") {$bkpage="/ebooks/newgeneral.htm"; $bkdesc="Latest Non-Erotica In Store";}
//if ($hpcontent=="O") {$bkpage=$autpage; $bkdesc="My Latest Books In Store";}
if ($hpcontent=="P") {$bkpage=$pubpage; $bkdesc="Our Latest Books In Store";}
// now the books across the page
print "";
print "";
print "";
print " ";
print "$bkdesc ";
$cntpr=0;
// display the 10 latest titles
print "";
while ($cntpr<10)
{
$pr=$getpr[$cntpr];
$result=mysqli_query($linkwsd, "SELECT * FROM 00products WHERE pr_code='$pr' ");
while($row = mysqli_fetch_row($result))
{
include("scripts/bookproci.php");
print "";
include("scripts/booklayout2019i.php");
print " | ";
$cntpr++;
}
}
print " ";
print " |
";
}
elseif ($ontl=="Y")
{
if (!isset($tlstart)) { $tlstart=0; }
$tlcnt=0;
// dispay timeline expanded
print "";
print "";
print "";
print " Timeline ";
print " ";
$tlend=$tlstart+7;
$tloop=1;
$numtl=0;
$resultti=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postno' order by tl_sequence ");
$numtl=mysqli_num_rows($resultti);
while($rowti = mysqli_fetch_row($resultti))
{
if ($tlstart>=$tloop)
{
$tloop++;
}
elseif ($tlcnt<7)
{
$recno=$rowti[0];
$postnum=$rowti[3];
$datestamp=$rowti[4];
$callow=$rowti[8];
$comment=$rowti[7];
$comment=html_entity_decode($comment,ENT_QUOTES);
$comment=nl2br($comment);
$sequence=$rowti[9];
$cname=$rowti[11];
$cname=html_entity_decode($cname,ENT_QUOTES);
$cuser=$rowti[12];
$cstatus=$rowti[10];
$postmth=substr($datestamp,4,2);
if ($postmth=="01") {$postm="Jan";}
if ($postmth=="02") {$postm="Feb";}
if ($postmth=="03") {$postm="Mar";}
if ($postmth=="04") {$postm="Apr";}
if ($postmth=="05") {$postm="May";}
if ($postmth=="06") {$postm="Jun";}
if ($postmth=="07") {$postm="Jul";}
if ($postmth=="08") {$postm="Aug";}
if ($postmth=="09") {$postm="Sep";}
if ($postmth=="10") {$postm="Oct";}
if ($postmth=="11") {$postm="Nov";}
if ($postmth=="12") {$postm="Dec";}
$posty=substr($datestamp,0,4);
$postd=substr($datestamp,6,2);
$posth=substr($datestamp,8,2);
$postmin=substr($datestamp,10,2);
$posts=substr($datestamp,12,2);
if ($sequence==1)
{
$postdesc="Posted: $postd $postm $posty at $posth:$postmin:$postd";
if ($callow=="N") {$cadesc="Comments not allowed for this post"; }
if ($callow!="N")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postnum' and tl_sequence>'1' and tl_callow='A' ");
$numcom=mysqli_num_rows($resultti2);
}
if ($callow=="M")
{
// get number of existing comments
$resultti2=mysqli_query($linkwsd, "SELECT * FROM a1timeline where tl_postno='$postnum' and tl_sequence>'1' and tl_callow='M' ");
$numcommod=mysqli_num_rows($resultti2);
}
print " $postdesc";
if ($callow=="N") { print " $cadesc"; }
if ($callow!="N") { print " Comments: $numcom"; }
if ($callow=="M" and $numcommod!=0) { print " Not yet moderated: $numcommod"; }
print " ";
print " $comment ";
if ($id==$f4user)
{
$_SESSION['inpaut']=$inpaut;
print " ";
print " ";
print " ";
}
}
else
{
print "";
print "";
print "";
print " | ";
print "";
$postdesc="Reply Posted: $postd $postm $posty at $posth:$postmin:$postd by ".$cname;
print " $postdesc";
if ($cstatus=="U" and $callow=="M")
{
print " This comment has not yet been moderated by the page owner";
if ($id==$f4user)
{
$_SESSION['postreply']=$postno;
print " $comment ";
print " ";
}
}
if ($cstatus=="A")
{
print " $comment ";
}
print " | ";
}
print " ";
$tlcnt++;
}
}
if ($postno!=0)
{
$_SESSION['postreply']=$postno;
print " ";
print " ";
}
if ($tlcnt==0)
{
print " No timeline has been created yet. ";
}
if ($id==$f4user and $postno==0)
{
$_SESSION['inpaut']=$inpaut;
print " ";
}
if ($tlend>14)
{
$tlstart=0;
print " ";
}
if ($tlend>7)
{
$tlstart=$tlend-14;
print " ";
}
if ($numtl>$tlend)
{
$tlstart=$tlend;
print " ";
}
print "";
print " |
";
print "
";
}
include("comscripts/bottombar.php");
mysqli_close($linkwsd);
?>
SSL Certificates