--- multi.php 2001/07/03 12:41:05 1.1
+++ multi.php 2001/07/10 07:50:34 1.4
@@ -1,4 +1,7 @@
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") {
+ if (file_exists(find_html_file("",$row[path]))) {
+ $main=join('',file(find_html_file("",$row[path])));
+ } else {
+ $main="can't find $row[path] for id $p";
+ }
+ // try to load translation (html fix-up or something)
+ $fix_up="./fix_up/".str_replace("/","_",dirname($row[path])).".inc";
+
+# $main.=""; ## DEBUG
+ if (file_exists($fix_up)) {
+ include($fix_up);
+# $main.=""; ## DEBUG
+ }
} else {
$main="can't find multi page for id $p";
}
@@ -46,8 +63,9 @@
while ($row=$sth->fetchrow_hash()) {
array_push($multi_page_url,"$PHP_SELF?p=$row[id]");
array_push($multi_page_id,$row[id]);
- $multi_page_options[$row[id]]=$row[name];
- #array_push($multi_page_options,array( value=>$row[id], output=>$row[name]));
+ $drop_title=$row[name];
+ if (strlen($drop_title) > $max_title_len) $drop_title=substr($drop_title,0,$max_title_len)."...";
+ $multi_page_options[$row[id]]=$drop_title;
if ($row[id] == $p) {
$current=$max;
$curr_id=$row[id];