當前位置: 首頁>>代碼示例>>PHP>>正文


PHP obfuscate_email函數代碼示例

本文整理匯總了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>';
    }
}
開發者ID:robhell,項目名稱:friendica-addons,代碼行數:29,代碼來源:impressum.php

示例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'] = " -&gt; " . $FmtV['$LinkUrl'];
    }
    $FmtV['$LinkAlt'] = str_replace(array('"', "'"), array('&#34;', '&#39;'), obfuscate_email($title, 0));
    return str_replace(array_keys($FmtV), array_values($FmtV), $IMapLinkFmt['mailto:']);
}
開發者ID:LOZORD,項目名稱:UPL-Website-Revamp,代碼行數:13,代碼來源:deobmail.php

示例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));
}
開發者ID:hatone,項目名稱:moodle,代碼行數:23,代碼來源:weblib.php

示例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);
 }
開發者ID:janaece,項目名稱:globalclassroom4_clean,代碼行數:8,代碼來源:weblib_test.php

示例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>
開發者ID:stevedrake,項目名稱:macports,代碼行數:30,代碼來源:emit_portfile.php

示例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);
}
開發者ID:MoodleMetaData,項目名稱:MoodleMetaData,代碼行數:35,代碼來源:weblib.php

示例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 
開發者ID:stevedrake,項目名稱:macports,代碼行數:31,代碼來源:ports.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'];
開發者ID:makoivis,項目名稱:trac2github,代碼行數:31,代碼來源:trac2github.php

示例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>';
開發者ID:stevedrake,項目名稱:macports,代碼行數:31,代碼來源:ports.php

示例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>
開發者ID:kminek,項目名稱:email-obfuscator,代碼行數:30,代碼來源:index.php

示例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 &#8220;<?php 
print obfuscate_email("macports-mgr@lists.macosforge.org");
?>
&#8221; 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. &#8220;PortMgr&#8221;), 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>
開發者ID:stevedrake,項目名稱:macports,代碼行數:31,代碼來源:contact.php


注:本文中的obfuscate_email函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。