Added X-out of blank boxes for security.
[openemr.git] / library / plugins / function.popup_init.php
blobf62c33c13f68d8e2d65c09b6e8827ef53d923807
1 <?php
2 /**
3 * Smarty plugin
4 * @package Smarty
5 * @subpackage plugins
6 */
9 /**
10 * Smarty {popup_init} function plugin
12 * Type: function<br>
13 * Name: popup_init<br>
14 * Purpose: initialize overlib
15 * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init}
16 * (Smarty online manual)
17 * @param array
18 * @param Smarty
19 * @return string
21 function smarty_function_popup_init($params, &$smarty)
23 $zindex = 1000;
25 if (!empty($params['zindex'])) {
26 $zindex = $params['zindex'];
29 if (!empty($params['src'])) {
30 return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
31 . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
32 } else {
33 $smarty->trigger_error("popup_init: missing src parameter");
37 /* vim: set expandtab: */