//query 4 select page subject and page content 4 print
$result = mysql_query("select * from w3village_item_pages where page_hidden = '0' and pagesecnum = '$_GET[booid]' and pageid= '$_GET[pgid]'");
while ($row = mysql_fetch_array($result))
{
extract($row);
$sql = mysql_query("UPDATE w3village_item_pages set pageview=pageview+1 where pageid='$_GET[pgid]'");
$pagecontents = nl2br ($pagecontents);
$tpl_printer= explode("
",template ("$userstyle/print.html"));
eval("echo stripslashes(\"$tpl_printer[1]\");");
}
//query 4 select title of book
eval("echo stripslashes(\"$tpl_printer[2]\");");
$result = mysql_query("select * from w3village_sec_library where hidden = '0' and id = '$_GET[booid]' and CatID != '0'");
while ($row = mysql_fetch_array($result))
{
extract($row);
$tpl_printer= explode("",template ("$userstyle/print.html"));
eval("echo stripslashes(\"$tpl_printer[3]\");");
}
eval("echo stripslashes(\"$tpl_printer[4]\");");
$masir = str_replace("printer.php","lib-pg.php",$_SERVER[PHP_SELF]);
$url1 = "
$lprint_from http://$_SERVER[SERVER_NAME]$masir?booid=$_GET[booid]&mid=$_GET[mid]&pgid=$_GET[pgid]
";
eval("echo stripslashes(\"$tpl_printer[5]\");");
?>