本文整理汇总了PHP中obfuscate_email函数的典型用法代码示例。如果您正苦于以下问题:PHP obfuscate_email函数的具体用法?PHP obfuscate_email怎么用?PHP obfuscate_email使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了obfuscate_email函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: impressum_show
function impressum_show($a, &$b)
{
$b .= '<h3>' . t('Impressum') . '</h3>';
$owner = get_config('impressum', 'owner');
$owner_profile = get_config('impressum', 'ownerprofile');
$postal = bbcode(get_config('impressum', 'postal'), true);
$notes = bbcode(get_config('impressum', 'notes'), true);
$email = obfuscate_email(get_config('impressum', 'email'));
if (strlen($owner)) {
if (strlen($owner_profile)) {
$tmp = '<a href="' . $owner_profile . '">' . $owner . '</a>';
} else {
$tmp = $owner;
}
if (strlen($email)) {
$b .= '<p><strong>' . t('Site Owner') . '</strong>: ' . $tmp . '<br /><strong>' . t('Email Address') . '</strong>: ' . $email . '</p>';
} else {
$b .= '<p><strong>' . t('Site Owner') . '</strong>: ' . $tmp . '</p>';
}
if (strlen($postal)) {
$b .= '<p><strong>' . t('Postal Address') . '</strong><br />' . $postal . '</p>';
}
if (strlen($notes)) {
$b .= '<p>' . $notes . '</p>';
}
} else {
$b .= '<p>' . t('The impressum addon needs to be configured!<br />Please add at least the <tt>owner</tt> variable to your config file. For other variables please refer to the README file of the addon.') . '</p>';
}
}
示例2: DeObfuscateLinkIMap
function DeObfuscateLinkIMap($pagename, $imap, $path, $title, $txt, $fmt = NULL)
{
global $FmtV, $IMap, $IMapLinkFmt, $DeObMail;
$FmtV['$LinkUrl'] = obfuscate_email(PUE(str_replace('$1', $path, $IMap[$imap])));
$FmtV['$LinkText'] = obfuscate_email(preg_replace('/^mailto:/i', '', $txt));
if ($FmtV['$LinkText'] == preg_replace('/^mailto:/i', '', $FmtV['$LinkUrl'])) {
$FmtV['$LinkUrl'] = '';
} else {
$FmtV['$LinkUrl'] = " -> " . $FmtV['$LinkUrl'];
}
$FmtV['$LinkAlt'] = str_replace(array('"', "'"), array('"', '''), obfuscate_email($title, 0));
return str_replace(array_keys($FmtV), array_values($FmtV), $IMapLinkFmt['mailto:']);
}
示例3: obfuscate_mailto
/**
* This function uses the {@link obfuscate_email()} and {@link obfuscate_text()}
* to generate a fully obfuscated email link, ready to use.
*
* @param string $email The email address to display
* @param string $label The text to displayed as hyperlink to $email
* @param boolean $dimmed If true then use css class 'dimmed' for hyperlink
* @return string The obfuscated mailto link
*/
function obfuscate_mailto($email, $label = '', $dimmed = false)
{
if (empty($label)) {
$label = $email;
}
if ($dimmed) {
$title = get_string('emaildisable');
$dimmed = ' class="dimmed"';
} else {
$title = '';
$dimmed = '';
}
return sprintf("<a href=\"%s:%s\" {$dimmed} title=\"{$title}\">%s</a>", obfuscate_text('mailto'), obfuscate_email($email), obfuscate_text($label));
}
示例4: test_obfuscate_email
public function test_obfuscate_email()
{
$email = 'some.user@example.com';
$obfuscated = obfuscate_email($email);
$this->assertNotSame($email, $obfuscated);
$back = core_text::entities_to_utf8(urldecode($email), true);
$this->assertSame($email, $back);
}
示例5: htmlspecialchars
break;
default:
$out .= $char;
++$pos;
break;
}
}
// Clean up any html-unfriendly characters
$out = htmlspecialchars($out);
// Special handling for email addresses
if (preg_match('/\\s*(maintainers\\s+)(.*)/i', $out, $matches)) {
$func = $matches[1];
$params = $matches[2];
$addresses = preg_split('/\\s+/', $params);
foreach ($addresses as $addr) {
$emails[] = obfuscate_email($addr);
}
$out = $func . (count($emails) ? join(' ', $emails) : '') . "\n";
}
// Output line
print $out;
}
print "</pre>";
} else {
print "No se pudo abrir el documento {$target}";
}
?>
</body>
</html>
示例6: obfuscate_mailto
/**
* This function uses the {@link obfuscate_email()} and {@link obfuscate_text()}
* to generate a fully obfuscated email link, ready to use.
*
* @param string $email The email address to display
* @param string $label The text to displayed as hyperlink to $email
* @param boolean $dimmed If true then use css class 'dimmed' for hyperlink
* @param string $subject The subject of the email in the mailto link
* @param string $body The content of the email in the mailto link
* @return string The obfuscated mailto link
*/
function obfuscate_mailto($email, $label = '', $dimmed = false, $subject = '', $body = '')
{
if (empty($label)) {
$label = $email;
}
$label = obfuscate_text($label);
$email = obfuscate_email($email);
$mailto = obfuscate_text('mailto');
$url = new moodle_url("mailto:{$email}");
$attrs = array();
if (!empty($subject)) {
$url->param('subject', format_string($subject));
}
if (!empty($body)) {
$url->param('body', format_string($body));
}
// Use the obfuscated mailto.
$url = preg_replace('/^mailto/', $mailto, $url->out());
if ($dimmed) {
$attrs['title'] = get_string('emaildisable');
$attrs['class'] = 'dimmed';
}
return html_writer::link($url, $label, $attrs);
}
示例7: mysql_query
?>
<br />
<?php
// MAINTAINERS
$nquery = "SELECT maintainer FROM darwinports.maintainers WHERE portfile='" . $row['name'] . "' ORDER BY is_primary DESC, maintainer";
$nresult = mysql_query($nquery);
if ($nresult) {
?>
<i>Maintainer:</i>
<?php
$primary = 1;
while ($nrow = mysql_fetch_array($nresult)) {
if ($primary) {
echo "<b>";
}
$addr = obfuscate_email($nrow[0]);
print $addr;
if ($primary) {
echo "</b>";
}
$primary = 0;
}
}
// CATEGORIES
$nquery = "SELECT category FROM darwinports.categories WHERE portfile='" . $row['name'] . "' ORDER BY is_primary DESC, category";
$nresult = mysql_query($nquery);
if ($nresult) {
?>
<br />
<i>Categorie:</i>
<?php
示例8: array
$ticketLabels = array();
if (!empty($labels['T'][crc32($row['type'])])) {
$ticketLabels[] = $labels['T'][crc32($row['type'])];
}
if (!empty($labels['C'][crc32($row['component'])])) {
$ticketLabels[] = $labels['C'][crc32($row['component'])];
}
if (!empty($labels['P'][crc32($row['priority'])])) {
$ticketLabels[] = $labels['P'][crc32($row['priority'])];
}
if (!empty($labels['R'][crc32($row['resolution'])])) {
$ticketLabels[] = $labels['R'][crc32($row['resolution'])];
}
$body = make_body($row['description']);
$timestamp = date("j M Y H:i e", $row['time'] / ($time_in_us ? 1000000 : 1));
$body = '**Reported by ' . obfuscate_email($row['reporter']) . ' on ' . $timestamp . "**\n" . $body;
if (empty($row['milestone'])) {
$milestone = NULL;
} else {
$milestone = $milestones[crc32($row['milestone'])];
}
if (!empty($row['owner'])) {
$assignee = isset($users_list[$row['owner']]) ? $users_list[$row['owner']] : $row['owner'];
} else {
$assignee = NULL;
}
$resp = github_add_issue(array('title' => $row['summary'], 'body' => body_with_possible_suffix($body, $row['id']), 'assignee' => $assignee, 'milestone' => $milestone, 'labels' => $ticketLabels));
if (isset($resp['number'])) {
// OK
$tickets[$row['id']] = (int) $resp['number'];
$last_ticket_number = $resp['number'];
示例9: mysql_real_escape_string
}
print "<br />";
}
/* Maintainers */
$nquery = "SELECT maintainer FROM {$portsdb_name}.maintainers WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY is_primary DESC, maintainer";
$nresult = mysql_query($nquery);
if ($nresult) {
$primary = 1;
print '<i>Maintained by:</i>';
while ($nrow = mysql_fetch_row($nresult)) {
if ($primary) {
print ' <b>';
} else {
print ' ';
}
print obfuscate_email($nrow[0]);
if ($primary) {
print '</b>';
}
$primary = 0;
}
}
/* Categories */
$nquery = "SELECT category FROM {$portsdb_name}.categories WHERE portfile='" . mysql_real_escape_string($row['name']) . "' ORDER BY is_primary DESC, category";
$nresult = mysql_query($nquery);
if ($nresult) {
$primary = 1;
print '<br /><i>Categories:</i>';
while ($nrow = mysql_fetch_row($nresult)) {
if ($primary) {
print ' <b>';
示例10: htmlentities
<meta charset="utf-8">
<title>Email Obfuscator</title>
</head>
<body>
<h1>Email Obfuscator</h1>
<?php
$email1 = EmailObfuscator::obfuscate('contact@sample.com');
?>
<p>This is obfuscated email: <?php
echo $email1;
?>
</p>
<pre><?php
echo htmlentities($email1);
?>
</pre>
<hr>
<?php
$email2 = obfuscate_email('contact@sample.com', 'Contact us', ['class' => 'some-class', 'id' => 'some-id', 'noscript' => 'Custom noscript contents']);
?>
<p>This is obfuscated email: <?php
echo $email2;
?>
</p>
<pre><?php
echo htmlentities($email2);
?>
</pre>
</body>
</html>
示例11: choice
<p>Read-only, low volume list for project related major announcements.</p>
</li>
</ul>
<p>Note that due to spam control policies you must subscribe to our non read-only lists in order to post to any of them.
Members are expected to abide by the very simple <a href="http://tools.ietf.org/html/rfc1855">Netiquette guidelines</a>
that are common to most open forums when posting; of particular relevance is sticking to plain text messages, our language
of choice (English), and reducing the number and size of attachments in any way possible (e.g, by using paste bins such
as <a href="http://paste.lisp.org/new/macports">lisppaste</a> or <a href="http://pastie.org">Pastie</a> and
passing along the paste URL rather than full error messages).</p>
<h3 class="subhdr" id="PortMgr">Administrative Contact</h3>
<p>The private and read-only “<?php
print obfuscate_email("macports-mgr@lists.macosforge.org");
?>
” mailing
list is where you should send mail to in case you need to get in touch with the The MacPorts Project's <a href="<?php
print $guide_url . '#project.portmgr';
?>
">management team</a> (A.K.A. “PortMgr”), in case you have any administrative
request or if you wish to discuss anything you might feel is of private nature (like the interaction between MacPorts and
NDA'd software).</p>
<p>This is also where you should turn to if you are a developer and/or a contributor interested in joning The MacPorts
Project with full write access to our SVN repository and Wiki pages, either to work on MacPorts itself or as a ports
maintainer. Please read the <a href="<?php
print $guide_url . '#project.membership';
?>
">documentation available</a>