1 |
cvsjoko |
1.1 |
<?php |
2 |
|
|
|
3 |
|
|
/* |
4 |
|
|
* Smarty plugin |
5 |
|
|
* ------------------------------------------------------------- |
6 |
|
|
* Type: function |
7 |
|
|
* Name: popup_init |
8 |
|
|
* Purpose: initialize overlib |
9 |
|
|
* ------------------------------------------------------------- |
10 |
|
|
*/ |
11 |
|
|
function smarty_function_popup_init($params, &$smarty) |
12 |
|
|
{ |
13 |
|
|
$zindex = 1000; |
14 |
|
|
|
15 |
|
|
if (!empty($params['zindex'])) { |
16 |
|
|
$zindex = $params['zindex']; |
17 |
|
|
} |
18 |
|
|
|
19 |
|
|
if (!empty($params['src'])) { |
20 |
|
|
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>'."\n"; |
21 |
|
|
echo '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>'."\n"; |
22 |
|
|
} else { |
23 |
|
|
$smarty->trigger_error("popup_init: missing src parameter"); |
24 |
|
|
} |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
/* vim: set expandtab: */ |
28 |
|
|
|
29 |
|
|
?> |