echo_template_var (line
186)
Temporary test function to process template vars with formatting.
I use it for viewing the message_header (view_header.php) with a sort of template.
void
echo_template_var
(string|array $var, [array $format_ar = array()])
-
string|array
$var
-
array
$format_ar
html_tag (line
28)
Generate html tags
Function flips 'left' and 'right' alignment tags in RTL translations
string
html_tag
(string $tag, [string $val = ''], [string $align = ''], [string $bgcolor = ''], [string $xtra = ''])
-
string
$tag: Tag to output
-
string
$val: Value between tags
-
string
$align: Alignment (left, center, etc)
-
string
$bgcolor: Back color in hexadecimal
-
string
$xtra: Extra options
nsm_fix_session_url (line
251)
Adds session id to URL, if it is needed
Function makes sure that session id is included in URLs unsupported by PHP session.use_trans_sid.
If you want to do HTTP redirect with PHP header() function, use nsm_http_redirect().
WARNING: don't use function with external urls.
string
nsm_fix_session_url
(string $url, [boolean $link = true])
-
string
$url: URL which needs session id.
-
boolean
$link: Is URL html encoded. HTTP redirects, HTML meta redirects and JavaScript calls need urls that are not html sanitized.
nsm_html2txt (line
269)
Converts HTML to plain text.
string
nsm_html2txt
(string $string, string $input_charset)
-
string
$string: HTML text
-
string
$input_charset: character set
nsm_http_redirect (line
226)
Function sends HTTP 302 header and handles session.use_trans_sid differences.
WARNING: don't use function for redirection to external urls.
void
nsm_http_redirect
(string $url)
-
string
$url: redirection url
set_url_var (line
104)
handy function to set url vars
especially usefull when $url = $PHP_SELF
string
set_url_var
(string $url, string $var, [string $val = null], [boolean $link = true])
-
string
$url: url URL
-
string
$var: name of added, removed or modified variable
-
string
$val: variable value. if value is null, it is removed from url. if value is not null, it is added or replaced. Zero value is handled correctly only in NaSMail 1.2+
-
boolean
$link: Controls if $url contains html encoded url or plain url.
stripos (line
384)
Case insensitive strpos for PHP 4.x
int
stripos
(string $haystack, string $needle, [int $offset = 0])
-
string
$haystack
-
string
$needle
-
int
$offset