13 |
$section="domov"; |
$section="domov"; |
14 |
} else { |
} else { |
15 |
// fetch current page |
// fetch current page |
16 |
$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"; |
17 |
$sth = $dbh->prepare("$sql"); |
$sth = $dbh->prepare("$sql"); |
18 |
$sth->execute(); |
$sth->execute(); |
19 |
$row=$sth->fetchrow_hash(); |
$row=$sth->fetchrow_hash(); |
20 |
|
|
21 |
$title.=" : $row[name]"; |
$title.=" : $row[name]"; |
22 |
if (file_exists(find_html_file("multi",$row[html]))) { |
if ($row[type]=="h" && file_exists(find_html_file("multi",$row[html]))) { |
23 |
$main=join('',file(find_html_file("multi",$row[html]))); |
$main=join('',file(find_html_file("multi",$row[html]))); |
24 |
|
} elseif ($row[type]=="p" && file_exists(find_html_file("",$row[path]))) { |
25 |
|
$main=join('',file(find_html_file("",$row[path]))); |
26 |
|
// try to load translation (html fix-up or something) |
27 |
|
$fix_up="./fix_up/".str_replace("/","_",dirname($row[path])).".inc"; |
28 |
|
if (file_exists($fix_up)) { |
29 |
|
include($fix_up); |
30 |
|
} |
31 |
} else { |
} else { |
32 |
$main="<b>can't find multi page for id $p</b>"; |
$main="<b>can't find multi page for id $p</b>"; |
33 |
} |
} |