init
[garradin.git] / include / libs / template_lite / plugins / function.popup_init.php
1 <?php
2
3 /*
4 * Template Lite plugin
5 * -------------------------------------------------------------
6 * Type: function
7 * Name: popup_init
8 * Purpose: initialize overlib
9 * Taken from the original Smarty
10 * http://smarty.php.net
11 * -------------------------------------------------------------
12 */
13 function tpl_function_popup_init($params, &$template_object)
14 {
15 $zindex = 1000;
16 if (!empty($params['zindex']))
17 {
18 $zindex = $params['zindex'];
19 }
20
21 if (!empty($params['src']))
22 {
23 return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
24 . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
25 }
26 else
27 {
28 throw new Template_Exception("popup_init: missing src parameter", $template_object);
29 }
30 }
31
32 ?>