--- multi.php 2001/07/03 12:41:05 1.1 +++ multi.php 2001/07/09 08:49:46 1.2 @@ -13,14 +13,21 @@ $section="domov"; } else { // fetch current page - $sql="select id,menu_num,name,html from multi where visible and id=$p"; + $sql="select id,menu_num,name,html,path,type from multi where visible and id=$p"; $sth = $dbh->prepare("$sql"); $sth->execute(); $row=$sth->fetchrow_hash(); $title.=" : $row[name]"; - if (file_exists(find_html_file("multi",$row[html]))) { + if ($row[type]=="h" && file_exists(find_html_file("multi",$row[html]))) { $main=join('',file(find_html_file("multi",$row[html]))); + } elseif ($row[type]=="p" && file_exists(find_html_file("",$row[path]))) { + $main=join('',file(find_html_file("",$row[path]))); + // try to load translation (html fix-up or something) + $fix_up="./fix_up/".str_replace("/","_",dirname($row[path])).".inc"; + if (file_exists($fix_up)) { + include($fix_up); + } } else { $main="can't find multi page for id $p"; }