source: branches/1.2/workflow/inc/smarty/plugins/function.popup_init.php @ 1349

Revision 1349, 979 bytes checked in by niltonneto, 15 years ago (diff)

Ticket #561 - Inclusão do módulo Workflow faltante nessa versão.

  • Property svn:executable set to *
Line 
1<?php
2/**
3 * Smarty plugin
4 * @package Smarty
5 * @subpackage plugins
6 */
7
8
9/**
10 * Smarty {popup_init} function plugin
11 *
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 * @author   Monte Ohrt <monte at ohrt dot com>
18 * @param array
19 * @param Smarty
20 * @return string
21 */
22function smarty_function_popup_init($params, &$smarty)
23{
24    $zindex = 1000;
25   
26    if (!empty($params['zindex'])) {
27        $zindex = $params['zindex'];
28    }
29   
30    if (!empty($params['src'])) {
31        return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
32         . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
33    } else {
34        $smarty->trigger_error("popup_init: missing src parameter");
35    }
36}
37
38/* vim: set expandtab: */
39
40?>
Note: See TracBrowser for help on using the repository browser.