Automatically exported from code.google.com/p/planningalerts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

function.popup_init.php 979 B

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