*** empty log message ***
This commit is contained in:
parent
45c9ec3ead
commit
fdc4cbd087
213 changed files with 32511 additions and 0 deletions
82
livesupport/modules/htmlUI/var/SmartyExtensions.inc.php
Normal file
82
livesupport/modules/htmlUI/var/SmartyExtensions.inc.php
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
## some constants ########################
|
||||
$Smarty->assign('UI_BROWSER', UI_BROWSER);
|
||||
$Smarty->assign('UI_HANDLER', UI_HANDLER);
|
||||
|
||||
// --- Smarty Extensions ---
|
||||
/**
|
||||
* str_repeat
|
||||
*
|
||||
* Repeate given string.
|
||||
*
|
||||
* @param str string, string to repeate
|
||||
* @param count numeric, how often to repeate (converted to type integer)
|
||||
* @return string, repeated string
|
||||
*/
|
||||
function S_str_repeat($param)
|
||||
{
|
||||
extract($param);
|
||||
return str_repeat($str, intval($count));
|
||||
|
||||
}
|
||||
$Smarty->register_function('str_repeat', 'S_str_repeat');
|
||||
|
||||
/**
|
||||
* urlencode
|
||||
*
|
||||
* Encode given string to use in URL.
|
||||
*
|
||||
* @param str string, string to encode
|
||||
* @return string, encoded string
|
||||
*/
|
||||
function S_urlencode($param)
|
||||
{
|
||||
extract($param);
|
||||
return urlencode($str);
|
||||
}
|
||||
$Smarty->register_function('urlencode', 'S_urlencode');
|
||||
|
||||
/**
|
||||
* htmlspecialchars
|
||||
*
|
||||
* convert special chars in given string to html-entitys.
|
||||
*
|
||||
* @param str string, string to convert
|
||||
* @return string, converted string
|
||||
*/
|
||||
function S_htmlspecialchars($param)
|
||||
{
|
||||
extract($param);
|
||||
return htmlspecialchars($str);
|
||||
}
|
||||
$Smarty->register_function('htmlspecialchars', 'S_htmlspecialchars');
|
||||
|
||||
/**
|
||||
* system
|
||||
*
|
||||
* Execute some PHP-code.
|
||||
*
|
||||
* @param code string, code to execute
|
||||
*/
|
||||
function S_system($param)
|
||||
{
|
||||
extract($param);
|
||||
eval($code);
|
||||
}
|
||||
$Smarty->register_function('system', 'S_system');
|
||||
|
||||
/**
|
||||
* tra
|
||||
*
|
||||
* Translate given string.
|
||||
*
|
||||
* @param void array, array of strings to be outputted translated
|
||||
*/
|
||||
function S_tra($param)
|
||||
{
|
||||
global $uiBrowser;
|
||||
|
||||
echo $uiBrowser->tra($param[0], $param[1], $param[2], $param[3], $param[4], $param[5], $param[6], $param[7], $param[8], $param[9]);
|
||||
}
|
||||
$Smarty->register_function('tra', 'S_tra');
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue