--- multi.php 2001/07/10 07:50:34 1.4 +++ multi.php 2001/09/20 09:50:24 1.7 @@ -16,17 +16,20 @@ $section="domov"; } else { // fetch current page - $sql="select id,menu_num,name,html,path,type from multi where visible and id=$p"; + $sql="select id,menu_num,name,html,path,type from multi where $visible_is_true and id=$p"; $sth = $dbh->prepare("$sql"); $sth->execute(); $row=$sth->fetchrow_hash(); $title.=" : $row[name]"; - if ($row[type]=="h" && file_exists(find_html_file("multi",$row[html]))) { + if ($row[type]=="h" && find_html_file("multi",$row[html])) { $main=join('',file(find_html_file("multi",$row[html]))); } elseif ($row[type]=="p") { - if (file_exists(find_html_file("",$row[path]))) { + if (find_html_file("",$row[path])) { $main=join('',file(find_html_file("",$row[path]))); + // fix entities from MS programs + include("fix_msshit.inc"); + $main=fix_msshit($main); } else { $main="can't find $row[path] for id $p"; } @@ -52,7 +55,7 @@ $title=str_replace("\\n"," ",$title); // nuke nl chars // fetch all pages in this multi-page - $sql="select id,name from multi where visible and menu_num=$row[menu_num] order by menu_num,num"; + $sql="select id,name from multi where $visible_is_true and menu_num=$row[menu_num] order by menu_num,num"; $sth = $dbh->prepare("$sql"); $sth->execute();