/
home
/
techb158
/
exp.abdallabala.com
/
vendor
/
smarty
/
smarty
/
libs
/
plugins
/
/home/techb158/exp.abdallabala.com/vendor/smarty/smarty/libs/plugins
mkdir
upload
Name
Size
Mode
Actions
block.textformat.php
3664
0644
edit
dl
rm
function.counter.php
1823
0644
edit
dl
rm
function.cycle.php
3308
0644
edit
dl
rm
function.fetch.php
8068
0644
edit
dl
rm
function.html_checkboxes.php
9592
0644
edit
dl
rm
function.html_image.php
5668
0644
edit
dl
rm
function.html_options.php
8246
0644
edit
dl
rm
function.html_radios.php
8434
0644
edit
dl
rm
function.html_select_date.php
15183
0644
edit
dl
rm
function.html_select_time.php
14375
0644
edit
dl
rm
function.html_table.php
5375
0644
edit
dl
rm
function.mailto.php
5386
0644
edit
dl
rm
function.math.php
3785
0644
edit
dl
rm
modifier.capitalize.php
4211
0644
edit
dl
rm
modifier.date_format.php
2691
0644
edit
dl
rm
modifier.debug_print_var.php
3929
0644
edit
dl
rm
modifier.escape.php
9669
0644
edit
dl
rm
modifier.mb_wordwrap.php
2346
0644
edit
dl
rm
modifier.regex_replace.php
1657
0644
edit
dl
rm
modifier.replace.php
999
0644
edit
dl
rm
modifier.spacify.php
756
0644
edit
dl
rm
modifier.truncate.php
2231
0644
edit
dl
rm
modifiercompiler.cat.php
612
0644
edit
dl
rm
modifiercompiler.count_characters.php
918
0644
edit
dl
rm
modifiercompiler.count_paragraphs.php
659
0644
edit
dl
rm
modifiercompiler.count_sentences.php
745
0644
edit
dl
rm
modifiercompiler.count_words.php
979
0644
edit
dl
rm
modifiercompiler.default.php
770
0644
edit
dl
rm
modifiercompiler.escape.php
5125
0644
edit
dl
rm
modifiercompiler.from_charset.php
752
0644
edit
dl
rm
modifiercompiler.indent.php
712
0644
edit
dl
rm
modifiercompiler.lower.php
724
0644
edit
dl
rm
modifiercompiler.noprint.php
340
0644
edit
dl
rm
modifiercompiler.string_format.php
574
0644
edit
dl
rm
modifiercompiler.strip.php
798
0644
edit
dl
rm
modifiercompiler.strip_tags.php
720
0644
edit
dl
rm
modifiercompiler.to_charset.php
746
0644
edit
dl
rm
modifiercompiler.unescape.php
1190
0644
edit
dl
rm
modifiercompiler.upper.php
678
0644
edit
dl
rm
modifiercompiler.wordwrap.php
1112
0644
edit
dl
rm
outputfilter.trimwhitespace.php
3777
0644
edit
dl
rm
shared.escape_special_chars.php
977
0644
edit
dl
rm
shared.literal_compiler_param.php
1047
0644
edit
dl
rm
shared.make_timestamp.php
1483
0644
edit
dl
rm
shared.mb_str_replace.php
1790
0644
edit
dl
rm
shared.mb_unicode.php
1530
0644
edit
dl
rm
variablefilter.htmlspecialchars.php
451
0644
edit
dl
rm
Edit:
/home/techb158/exp.abdallabala.com/vendor/smarty/smarty/libs/plugins/function.mailto.php
(5386B)
<?php /** * Smarty plugin * * @package Smarty * @subpackage PluginsFunction */ /** * Smarty {mailto} function plugin * Type: function * Name: mailto * Date: May 21, 2002 * Purpose: automate mailto address link creation, and optionally encode them. * Params: * * - address - (required) - e-mail address * - text - (optional) - text to display, default is address * - encode - (optional) - can be one of: * * none : no encoding (default) * * javascript : encode with javascript * * javascript_charcode : encode with javascript charcode * * hex : encode with hexadecimal (no javascript) * - cc - (optional) - address(es) to carbon copy * - bcc - (optional) - address(es) to blind carbon copy * - subject - (optional) - e-mail subject * - newsgroups - (optional) - newsgroup(s) to post to * - followupto - (optional) - address(es) to follow up to * - extra - (optional) - extra tags for the href link * * Examples: * * {mailto address="me@domain.com"} * {mailto address="me@domain.com" encode="javascript"} * {mailto address="me@domain.com" encode="hex"} * {mailto address="me@domain.com" subject="Hello to you!"} * {mailto address="me@domain.com" cc="you@domain.com,they@domain.com"} * {mailto address="me@domain.com" extra='class="mailto"'} * * @link http://www.smarty.net/manual/en/language.function.mailto.php {mailto} * (Smarty online manual) * @version 1.2 * @author Monte Ohrt <monte at ohrt dot com> * @author credits to Jason Sweat (added cc, bcc and subject functionality) * * @param array $params parameters * * @return string */ function smarty_function_mailto($params) { static $_allowed_encoding = array('javascript' => true, 'javascript_charcode' => true, 'hex' => true, 'none' => true); $extra = ''; if (empty($params[ 'address' ])) { trigger_error("mailto: missing 'address' parameter", E_USER_WARNING); return; } else { $address = $params[ 'address' ]; } $text = $address; // netscape and mozilla do not decode %40 (@) in BCC field (bug?) // so, don't encode it. $search = array('%40', '%2C'); $replace = array('@', ','); $mail_parms = array(); foreach ($params as $var => $value) { switch ($var) { case 'cc': case 'bcc': case 'followupto': if (!empty($value)) { $mail_parms[] = $var . '=' . str_replace($search, $replace, rawurlencode($value)); } break; case 'subject': case 'newsgroups': $mail_parms[] = $var . '=' . rawurlencode($value); break; case 'extra': case 'text': $$var = $value; // no break default: } } if ($mail_parms) { $address .= '?' . join('&', $mail_parms); } $encode = (empty($params[ 'encode' ])) ? 'none' : $params[ 'encode' ]; if (!isset($_allowed_encoding[ $encode ])) { trigger_error( "mailto: 'encode' parameter must be none, javascript, javascript_charcode or hex", E_USER_WARNING ); return; } // FIXME: (rodneyrehm) document.write() excues me what? 1998 has passed! if ($encode === 'javascript') { $string = 'document.write(\'<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>\');'; $js_encode = ''; for ($x = 0, $_length = strlen($string); $x < $_length; $x++) { $js_encode .= '%' . bin2hex($string[ $x ]); } return '<script type="text/javascript">eval(unescape(\'' . $js_encode . '\'))</script>'; } elseif ($encode === 'javascript_charcode') { $string = '<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>'; for ($x = 0, $y = strlen($string); $x < $y; $x++) { $ord[] = ord($string[ $x ]); } $_ret = "<script type=\"text/javascript\" language=\"javascript\">\n" . "{document.write(String.fromCharCode(" . implode(',', $ord) . "))" . "}\n" . "</script>\n"; return $_ret; } elseif ($encode === 'hex') { preg_match('!^(.*)(\?.*)$!', $address, $match); if (!empty($match[ 2 ])) { trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.", E_USER_WARNING); return; } $address_encode = ''; for ($x = 0, $_length = strlen($address); $x < $_length; $x++) { if (preg_match('!\w!' . Smarty::$_UTF8_MODIFIER, $address[ $x ])) { $address_encode .= '%' . bin2hex($address[ $x ]); } else { $address_encode .= $address[ $x ]; } } $text_encode = ''; for ($x = 0, $_length = strlen($text); $x < $_length; $x++) { $text_encode .= '&#x' . bin2hex($text[ $x ]) . ';'; } $mailto = "mailto:"; return '<a href="' . $mailto . $address_encode . '" ' . $extra . '>' . $text_encode . '</a>'; } else { // no encoding return '<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>'; } }
Save
cmd:
run