1 |
<?php |
<?php |
2 |
|
|
3 |
|
$max_title_len=20; // max. length of titles in drop-down |
4 |
|
|
5 |
require("Smarty.class.php"); |
require("Smarty.class.php"); |
6 |
require("conn.inc"); |
require("conn.inc"); |
7 |
|
|
24 |
$title.=" : $row[name]"; |
$title.=" : $row[name]"; |
25 |
if ($row[type]=="h" && file_exists(find_html_file("multi",$row[html]))) { |
if ($row[type]=="h" && file_exists(find_html_file("multi",$row[html]))) { |
26 |
$main=join('',file(find_html_file("multi",$row[html]))); |
$main=join('',file(find_html_file("multi",$row[html]))); |
27 |
} elseif ($row[type]=="p" && file_exists(find_html_file("",$row[path]))) { |
} elseif ($row[type]=="p") { |
28 |
$main=join('',file(find_html_file("",$row[path]))); |
if (file_exists(find_html_file("",$row[path]))) { |
29 |
|
$main=join('',file(find_html_file("",$row[path]))); |
30 |
|
} else { |
31 |
|
$main="<b>can't find $row[path] for id $p</b>"; |
32 |
|
} |
33 |
// try to load translation (html fix-up or something) |
// try to load translation (html fix-up or something) |
34 |
$fix_up="./fix_up/".str_replace("/","_",dirname($row[path])).".inc"; |
$fix_up="./fix_up/".str_replace("/","_",dirname($row[path])).".inc"; |
35 |
|
|
36 |
|
# $main.="<!-- trying to use fixup $fix_up -->"; ## DEBUG |
37 |
if (file_exists($fix_up)) { |
if (file_exists($fix_up)) { |
38 |
include($fix_up); |
include($fix_up); |
39 |
|
# $main.="<!-- fixup: $fix_up -->"; ## DEBUG |
40 |
} |
} |
41 |
} else { |
} else { |
42 |
$main="<b>can't find multi page for id $p</b>"; |
$main="<b>can't find multi page for id $p</b>"; |
63 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
64 |
array_push($multi_page_url,"$PHP_SELF?p=$row[id]"); |
array_push($multi_page_url,"$PHP_SELF?p=$row[id]"); |
65 |
array_push($multi_page_id,$row[id]); |
array_push($multi_page_id,$row[id]); |
66 |
$multi_page_options[$row[id]]=$row[name]; |
$drop_title=$row[name]; |
67 |
#array_push($multi_page_options,array( value=>$row[id], output=>$row[name])); |
if (strlen($drop_title) > $max_title_len) $drop_title=substr($drop_title,0,$max_title_len)."..."; |
68 |
|
$multi_page_options[$row[id]]=$drop_title; |
69 |
if ($row[id] == $p) { |
if ($row[id] == $p) { |
70 |
$current=$max; |
$current=$max; |
71 |
$curr_id=$row[id]; |
$curr_id=$row[id]; |