Хранилища Subversion ant

Редакция

Редакция 2 | Только различия | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 2 Редакция 3
1
<?php
1
<?php
2
/**
2
/**
3
 * Smarty plugin
3
 * Smarty plugin
4
 * @package Smarty
4
 * @package Smarty
5
 * @subpackage plugins
5
 * @subpackage plugins
6
 */
6
 */
7
7
8
8
9
/**
9
/**
10
 * Smarty {popup_init} function plugin
10
 * Smarty {popup_init} function plugin
11
 *
11
 *
12
 * Type:     function<br>
12
 * Type:     function<br>
13
 * Name:     popup_init<br>
13
 * Name:     popup_init<br>
14
 * Purpose:  initialize overlib
14
 * Purpose:  initialize overlib
15
 * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init}
15
 * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init}
16
 *          (Smarty online manual)
16
 *          (Smarty online manual)
17
 * @author   Monte Ohrt <monte at ohrt dot com>
17
 * @author   Monte Ohrt <monte at ohrt dot com>
18
 * @param array
18
 * @param array
19
 * @param Smarty
19
 * @param Smarty
20
 * @return string
20
 * @return string
21
 */
21
 */
22
function smarty_function_popup_init($params, &$smarty)
22
function smarty_function_popup_init($params, &$smarty)
23
{
23
{
24
    $zindex = 1000;
24
    $zindex = 1000;
25
   
25
   
26
    if (!empty($params['zindex'])) {
26
    if (!empty($params['zindex'])) {
27
        $zindex = $params['zindex'];
27
        $zindex = $params['zindex'];
28
    }
28
    }
29
   
29
   
30
    if (!empty($params['src'])) {
30
    if (!empty($params['src'])) {
31
        return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
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";
32
         . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
33
    } else {
33
    } else {
34
        $smarty->trigger_error("popup_init: missing src parameter");
34
        $smarty->trigger_error("popup_init: missing src parameter");
35
    }
35
    }
36
}
36
}
37
37
38
/* vim: set expandtab: */
38
/* vim: set expandtab: */
39
39
40
?>
40
?>
41
 
41