本文整理汇总了PHP中mailto函数的典型用法代码示例。如果您正苦于以下问题:PHP mailto函数的具体用法?PHP mailto怎么用?PHP mailto使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mailto函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smarty_function_url
/**
* Smarty {url} function plugin
*
* Type: function
* Name: url
* @author: Trimo
* @mail: trimo.1992[at]gmail[dot]com
*/
function smarty_function_url($params, &$smarty)
{
if (!function_exists('current_url')) {
if (!function_exists('get_instance')) {
$smarty->trigger_error("url: Cannot load CodeIgniter");
return;
}
$CI =& get_instance();
$CI->load->helper('url');
}
if ($params['type'] == 'string') {
return uri_string();
} elseif ($params['type'] == 'anchor' && isset($params['url'])) {
return anchor($params['url'], $params['text'], $params['attr']);
} elseif ($params['type'] == 'safemail' && isset($params['url'])) {
return safe_mailto($params['url'], $params['text'], $params['attr']);
} elseif ($params['type'] == 'mail' && isset($params['url'])) {
return mailto($params['url'], $params['text'], $params['attr']);
} elseif ($params['type'] == 'autolink' && isset($params['url'])) {
return auto_link($params['url'], isset($params['mode']) ? $params['mode'] : 'both', $params['new'] == 1 ? TRUE : FALSE);
} elseif ($params['type'] == 'urltitle' && isset($params['title'])) {
return url_title($params['title'], isset($params['mode']) ? $params['mode'] : 'dash', $params['lower'] == 1 ? TRUE : FALSE);
} elseif ($params['type'] == 'prep' && isset($params['url'])) {
return prep_url($params['url']);
} elseif ($params['type'] == 'current') {
return current_url();
} elseif ($params['type'] == 'site') {
return site_url($params['url']);
} else {
return base_url();
}
}
示例2: showProvider
function showProvider($clsRpt, $provider, $lProviderID)
{
//--------------------------------------------------
// provider section
//--------------------------------------------------
openBlock('Funding Provider', strLinkEdit_GrantProvider($lProviderID, 'Edit Provider Record', true) . ' ' . strLinkRem_Provider($lProviderID, 'Remove Provider', true, true));
echoT($clsRpt->openReport() . $clsRpt->openRow() . $clsRpt->writeLabel('Funder/Provider ID:') . $clsRpt->writeCell(str_pad($lProviderID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell(htmlspecialchars($provider->strGrantOrg)) . $clsRpt->closeRow());
echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($provider->strAddress) . $clsRpt->closeRow());
echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars($provider->strPhone)) . $clsRpt->closeRow());
echoT($clsRpt->openRow() . $clsRpt->writeLabel('Cell:') . $clsRpt->writeCell(htmlspecialchars($provider->strCell)) . $clsRpt->closeRow());
if ($provider->strEmail == '') {
$strOut = ' ';
} else {
$strOut = mailto($provider->strEmail, htmlspecialchars($provider->strEmail));
}
echoT($clsRpt->openRow() . $clsRpt->writeLabel('Email:') . $clsRpt->writeCell($strOut) . $clsRpt->closeRow());
if ($provider->strWebSite == '') {
$strOut = ' ';
} else {
if (!strtoupper(substr($provider->strWebSite, 0, 4)) == 'HTTP') {
$provider->strWebSite = 'http://' . $provider->strWebSite;
}
$strOut = '<a target="_blank" href="' . prep_url($provider->strWebSite) . '">' . htmlspecialchars($provider->strWebSite) . '</a>';
}
echoT($clsRpt->openRow() . $clsRpt->writeLabel('Web:') . $clsRpt->writeCell($strOut) . $clsRpt->closeRow());
echoT($clsRpt->openRow() . $clsRpt->writeLabel('Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($provider->strNotes))) . $clsRpt->closeRow());
echoT($clsRpt->openRow() . $clsRpt->writeLabel('Attributed to:') . $clsRpt->writeCell(htmlspecialchars($provider->strAttributedTo)) . $clsRpt->closeRow());
echoT($clsRpt->closeReport());
closeBlock();
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->data['title'] = 'mully-ci-jqwidgets';
$this->data['footer'] = 'ci-jqwidgets by ' . mailto('mully.ryudo@gmail.com', 'mully') . ' © 2013';
//load model
$this->load->model('orders');
}
示例4: pre_output_plugin
/**
* Process before outputting for the plugin
*
* This creates an array of data to be merged with the
* tag array so relationship data can be called with
* a {field.column} syntax
*
* @access public
* @param string
* @param string
* @param array
* @return array
*/
public function pre_output_plugin($input, $params)
{
$choices = array();
get_instance()->load->helper('url');
$choices['email_address'] = $input;
$choices['mailto_link'] = mailto($input, $input);
$choices['safe_mailto_link'] = safe_mailto($input, $input);
return $choices;
}
示例5: strPhoneWebEmail
function strPhoneWebEmail($provider)
{
//---------------------------------------------------------------------
//
//---------------------------------------------------------------------
$strOut = '<table cellpadding="0" cellspacing="0" border="0" style="margin: 0px; padding: 0px; width: 100%">';
// phone
$strOut .= '<tr>
<td style="padding-left: 0px; margin-left: 0px; width: 50pt;">
phone:
</td>
<td>' . htmlspecialchars($provider->strPhone) . '
</td>
</tr>';
// cell
$strOut .= '<tr>
<td style="padding-left: 0px; margin-left: 0px;">
cell:
</td>
<td>' . htmlspecialchars($provider->strCell) . '
</td>
</tr>';
// email
$strOut .= '<tr>
<td style="padding-left: 0px; margin-left: 0px;">
email:
</td>
<td>';
if ($provider->strEmail == '') {
$strOut .= ' ';
} else {
$strOut .= mailto($provider->strEmail, htmlspecialchars($provider->strEmail));
}
$strOut .= '
</td>
</tr>';
// web
$strOut .= '<tr>
<td style="padding-left: 0px; margin-left: 0px;">
web:
</td>
<td>';
if ($provider->strWebSite == '') {
$strOut .= ' ';
} else {
if (!strtoupper(substr($provider->strWebSite, 0, 4)) == 'HTTP') {
$provider->strWebSite = 'http://' . $provider->strWebSite;
}
$strOut .= '<a target="_blank" href="' . prep_url($provider->strWebSite) . '">' . htmlspecialchars($provider->strWebSite) . '</a>';
}
$strOut .= '
</td>
</tr>';
$strOut .= '</table>';
return $strOut;
}
示例6: listemails
function listemails()
{
$page = CurrentPageName();
$and = "AND filesize>0";
$head = "\n\t<table>\n\t<td valign='middle' width=99%>\n\t\t<H3>{user_backup_emails_query_text}</H3>\n\t</td>\n\t<td>" . imgtootltip("question-48.png", '{search}', "Loadjs('{$page}?search-js=yes')") . "</td>\n\t<td>" . imgtootltip("48-infos.png", '{infos}', "Loadjs('user.messaging.php?email-infos-js=quarantine')") . "</td>\n\t</tr>\n\t</table>\n\t";
//filter-body
//$sql="SELECT storage.MessageID,storage.mailfrom$recipient_to_find_fields,storage.zDate,storage.subject,storage.MessageBody,MATCH (storage.MessageBody)
// AGAINST (\"$stringtofind\") AS pertinence
// FROM storage,storage_recipients WHERE storage.MessageID=storage_recipients.MessageID$recipient_to_find$sender_to_find ORDER BY pertinence DESC LIMIT 0,90";
$order = "ORDER BY zDate DESC";
if (isset($_GET["filter-sender"])) {
if ($_GET["filter-sender"] != null) {
if (strpos($_GET["filter-sender"], '*') > 0 or $_GET["filter-sender"][0] == '*') {
$and = $and . " AND mailfrom LIKE '" . str_replace("*", "%", "{$_GET["filter-sender"]}") . "'";
} else {
$and = $and . " AND mailfrom='{$_GET["filter-sender"]}'";
}
$back = true;
}
}
if ($_GET["body"] != null) {
$pertinance = ",MATCH (MessageBody) AGAINST (\"{$_GET["filter-body"]}\") AS pertinence ";
$order = "ORDER BY pertinence DESC";
}
$delivery_users = mailto($and);
$q = new mysql();
$sql = "select MessageID,mailfrom,mailto,DATE_FORMAT(zDate,'%Y-%m-%d %H:%i') as tdate ,filesize,subject{$pertinance} FROM storage WHERE ({$delivery_users}) {$order} LIMIT 0,150";
writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
$results = $q->QUERY_SQL($sql, "artica_backup");
if ($back) {
$html = $html . "<table style='width:90%'>\n\t\t<tr>\n\t\t\t<td><a href='backup.php'><H3>« {back}</H3></td>\n\t\t</tr>\n\t\t</table>";
}
$html = $html . "<table style='width:95%' class=table_form>\n\t\n\t\t<tr>\n\t\t<th>{date}</span></th>\n\t\t<th>{size}</span></th>\n\t\t<th>{subject}</span></th>\n\t\t<th>{senderm}</span></th>\t\t\n\t\t<th>{recipient}</span></th>\n\n\t\t</tr>\n\t\t\n\t\t";
$date_hier = strftime("%y-%m-%d", mktime(0, 0, 0, date('m'), date('d') - 1, date('y')));
$date = date('Y-m-d');
while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
$filesize = $ligne["filesize"] / 1024;
if ($class == "row1") {
$class = "row2";
} else {
$class = "row1";
}
$filesize = FormatBytes($filesize);
if (strlen($ligne["subject"]) > 40) {
$ligne["subject"] = substr($ligne["subject"], 0, 37) . "...";
}
$ligne["tdate"] = str_replace($date, '{today}', $ligne["tdate"]);
$ligne["tdate"] = str_replace($date_hier, '{yesterday}', $ligne["tdate"]);
$html = $html . "\n\t\t<tr class={$class}>\n\t\t<td valign='top' nowrap width=1%> {$ligne["tdate"]} </td>\n\t\t<td valign='top' > {$filesize} </td>\n\t\t\t<td valign='top' class={$class}>" . divlien("Loadjs('{$page}?ShowID={$ligne["MessageID"]}')", $ligne["subject"]) . "</td>\n\t\t<td valign='top' >{$ligne["mailfrom"]}</td>\n\t\t<td valign='top' >{$ligne["mailto"]}</td>\n\t\t</tr>";
}
$html = $html . "</table>";
$tpl = new templates();
return $tpl->_ENGINE_parse_body("<div style='width:100%;height:500px;overflow:auto'>{$head}{$html}</div>");
}
示例7: get_person_data_row
function get_person_data_row($person, $controller)
{
$CI =& get_instance();
$controller_name = $CI->uri->segment(1);
$width = $controller->get_form_width();
$table_data_row = '<tr>';
$table_data_row .= "<td width='5%'><input type='checkbox' id='person_{$person->person_id}' value='" . $person->person_id . "'/></td>";
$table_data_row .= '<td width="20%">' . character_limiter($person->last_name, 13) . '</td>';
$table_data_row .= '<td width="20%">' . character_limiter($person->first_name, 13) . '</td>';
$table_data_row .= '<td width="30%">' . mailto($person->email, character_limiter($person->email, 22)) . '</td>';
$table_data_row .= '<td width="20%">' . character_limiter($person->phone_number, 13) . '</td>';
$table_data_row .= '<td width="5%">' . anchor($controller_name . "/view/{$person->person_id}/width:{$width}", $CI->lang->line('common_edit'), array('class' => 'thickbox', 'title' => $CI->lang->line($controller_name . '_update'))) . '</td>';
$table_data_row .= '</tr>';
return $table_data_row;
}
示例8: listemails
function listemails()
{
$order = "ORDER BY zDate DESC";
$page = CurrentPageName();
if (isset($_GET["filter-sender"])) {
if ($_GET["filter-sender"] != null) {
$_SESSION["QUARANTINE"]["SENDER"] = $_GET["filter-sender"];
if (strpos($_GET["filter-sender"], '*') > 0 or $_GET["filter-sender"][0] == '*') {
$and = " AND mailfrom LIKE '" . str_replace("*", "%", "{$_GET["filter-sender"]}") . "'";
} else {
$and = " AND mailfrom='{$_GET["filter-sender"]}'";
}
$back = true;
}
}
if ($_GET["body"] != null) {
$_SESSION["QUARANTINE"]["body"] = $_GET["body"];
$pertinance = ",MATCH (MessageBody) AGAINST (\"{$_GET["body"]}\") AS pertinence ";
$order = "ORDER BY pertinence DESC";
}
$mailto = mailto($and);
$q = new mysql();
$sql = "select MessageID,mailfrom,mailto,zDate,subject{$pertinance} FROM quarantine WHERE ({$mailto}) {$order} LIMIT 0,150";
writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
$results = $q->QUERY_SQL($sql, "artica_backup");
$head = "\n\t<table>\n\t<td valign='middle' width=99%>\n\t\t<H3>{quarantine_mails}</H3>\n\t</td>\n\t<td>" . imgtootltip("48-logs.png", '{quarantine_email_report}', "Loadjs('quarantine.report.php')") . "</td>\n\t<td>" . imgtootltip("question-48.png", '{search}', "Loadjs('{$page}?search-js=yes')") . "</td>\n\t<td>" . imgtootltip("48-infos.png", '{infos}', "Loadjs('user.messaging.php?email-infos-js=quarantine')") . "</td>\n\t</tr>\n\t</table>\n\t";
$table = "<table style='width:95%' class=table_form>\n\t\t<tr>\n\t\t<th><span style='color:white'>{date}</span></th>\n\t\t<th><span style='color:white'>{subject}</span></th>\n\t\t<th><span style='color:white'>{senderm}</span></th>\t\t\n\t\t<th><span style='color:white'>{recipient}</span></th>\n\t\t</tr>\n\t\t\n\t\t";
$date_hier = strftime("%Y-%m-%d", mktime(0, 0, 0, date('m'), date('d') - 1, date('Y')));
$date = date('Y-m-d');
while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
$ligne["zDate"] = str_replace($date, '{today}', $ligne["zDate"]);
$ligne["zDate"] = str_replace($date_hier, '{yesterday}', $ligne["zDate"]);
if ($class == "row1") {
$class = "row2";
} else {
$class = "row1";
}
if (strlen($ligne["subject"]) > 40) {
$ligne["subject"] = substr($ligne["subject"], 0, 37) . "...";
}
$table = $table . "<tr class={$class}>\n\t\t<td valign='top' nowrap class={$class} width=1%>{$ligne["zDate"]}</td>\n\t\t<td valign='top' class={$class}>" . divlien("Loadjs('{$page}?ShowID={$ligne["MessageID"]}')", $ligne["subject"]) . "</td>\n\t\t<td valign='top' class={$class}>{$ligne["mailfrom"]}</a></td>\n\t\t<td valign='top' class={$class}>{$ligne["mailto"]}</td>\n\t\t\n\t\t</tr>";
}
$table = $table . "</table>";
if ($back) {
return "{$head}{$table}";
}
return "<div style='width:100%;height:500px;overflow:auto' id='rtmm-panel'>{$head}{$table}</div>\n\t\n\t\n\t";
}
示例9: index
/**
* My Account main page
*
* @access public
* @return void
*/
function index()
{
$vars['cp_page_title'] = lang('my_account');
$vars = array_merge($this->_account_menu_setup(), $vars);
$query = $this->member_model->get_member_data($this->id, array('email', 'ip_address', 'join_date', 'last_visit', 'total_entries', 'total_comments', 'last_entry_date', 'last_comment_date', 'last_forum_post_date', 'total_forum_topics', 'total_forum_posts'));
if ($query->num_rows() > 0) {
$vars['username'] = $this->username;
$vars['fields'] = array('email' => mailto($query->row('email'), $query->row('email')), 'join_date' => $this->localize->human_time($query->row('join_date')), 'last_visit' => ($query->row('last_visit') == 0 or $query->row('last_visit') == '') ? '--' : $this->localize->human_time($query->row('last_visit')), 'total_entries' => $query->row('total_entries'), 'total_comments' => $query->row('total_comments'), 'last_entry_date' => ($query->row('last_entry_date') == 0 or $query->row('last_entry_date') == '') ? '--' : $this->localize->human_time($query->row('last_entry_date')), 'last_comment_date' => ($query->row('last_comment_date') == 0 or $query->row('last_comment_date') == '') ? '--' : $this->localize->human_time($query->row('last_comment_date')), 'user_ip_address' => $query->row('ip_address'));
if ($this->config->item('forum_is_installed') == "y") {
$fields['last_forum_post_date'] = $query->row('last_forum_post_date') == 0 ? '--' : $this->localize->human_time($query->row('last_forum_post_date'));
$fields['total_forum_topics'] = $query->row('total_forum_topics');
$fields['total_forum_replies'] = $query->row('total_forum_posts');
$fields['total_forum_posts'] = $query->row('total_forum_posts') + $query->row('total_forum_topics');
}
}
$this->cp->render('account/index', $vars);
}
示例10: __construct
public function __construct()
{
parent::__construct();
if (!$this->session->userdata('idUsuario')) {
$this->session->sess_destroy();
redirect(url_site() . 'administracao');
} else {
$this->template->set_diretorio('admin');
//$this->template->set_title("Fábrica Pinheiro");
$this->template->set_title("Pinheiro Shop");
$this->template->set_css("admin.css");
$this->template->set_css("select2.css");
$this->template->set_js("geral.js");
$this->template->set_js("select2.min.js");
$this->template->set_js("admin.js");
$this->template->set_css(FCPATH . "template/admin/js/redactor/css/redactor.css");
$this->template->set_js("redactor/redactor.js");
$rodape = '<div>Todos os direitos reservados 2011-' . date('Y') . '</div>';
$rodape .= '<div>Designer: ' . mailto('pinheirolouco@gmail.com', 'Lucas Pinheiro') . '</div>';
$this->template->set_rodape($rodape);
}
}
示例11: index
/**
* My Account main page
*
* @access public
* @return void
*/
function index()
{
$vars['cp_page_title'] = $this->lang->line('my_account');
$this->javascript->output('');
$this->javascript->compile();
$vars = array_merge($this->_account_menu_setup(), $vars);
$query = $this->member_model->get_member_data($this->id, array('email', 'ip_address', 'join_date', 'last_visit', 'total_entries', 'total_comments', 'last_entry_date', 'last_comment_date', 'last_forum_post_date', 'total_forum_topics', 'total_forum_posts'));
if ($query->num_rows() > 0) {
foreach ($query->row_array() as $key => $val) {
${$key} = $val;
}
$vars['username'] = $this->username;
$vars['fields'] = array('email' => mailto($email, $email), 'join_date' => $this->localize->set_human_time($join_date), 'last_visit' => ($last_visit == 0 or $last_visit == '') ? '--' : $this->localize->set_human_time($last_visit), 'total_entries' => $total_entries, 'total_comments' => $total_comments, 'last_entry_date' => ($last_entry_date == 0 or $last_entry_date == '') ? '--' : $this->localize->set_human_time($last_entry_date), 'last_comment_date' => ($last_comment_date == 0 or $last_comment_date == '') ? '--' : $this->localize->set_human_time($last_comment_date), 'user_ip_address' => $ip_address);
if ($this->config->item('forum_is_installed') == "y") {
$fields['last_forum_post_date'] = $last_forum_post_date == 0 ? '--' : $this->localize->set_human_time($last_forum_post_date);
$fields['total_forum_topics'] = $total_forum_topics;
$fields['total_forum_replies'] = $total_forum_posts;
$fields['total_forum_posts'] = $total_forum_posts + $total_forum_topics;
}
}
$this->load->view('account/index', $vars);
}
示例12: display_email_data_for_person
function display_email_data_for_person($person, $persontype)
{
$CI =& get_instance();
$controller_name = strtolower($persontype) . 's';
switch ($persontype) {
case 'Customer':
$width = 350;
break;
case 'Supplier':
$width = 360;
break;
case 'Employee':
$width = 650;
break;
}
$table_data_row = '<tr id="person-' . $person->person_id . '">';
$table_data_row .= '<td width="13%">' . character_limiter($person->last_name, 13) . '</td>';
$table_data_row .= '<td width="13%">' . character_limiter($person->first_name, 13) . '</td>';
$table_data_row .= '<td width="24%" class="email">' . mailto($person->email, character_limiter($person->email, 22)) . '</td>';
$table_data_row .= '<td width="50%" class="action">' . anchor($controller_name . "/view/{$person->person_id}/width:{$width}", $CI->lang->line($controller_name . '_update'), array('class' => 'thickbox button pill left', 'title' => $CI->lang->line($controller_name . '_update'), 'onClick' => 'thickit(this); return false;')) . '<a class="negative button remove pill right"' . ' onClick="listremove(this)">' . 'Remove</a>' . '</td>';
$table_data_row .= '</tr>';
return $table_data_row;
}
示例13: mailto
<p style="text-align: center;">
<span style="display:inline-block;padding:8px 12px;background-color:#95c033;color:#fff;font-size:20px;font-weight:bold;text-decoration:none;box-shadow:0 1px 0 #b7db81 inset, 0 -1px 0 #b7db81 inset;text-shadow:0 1px 0 #6b8e4a">
<?php
echo $new_password;
?>
</span>
</p>
<p> </p>
</td>
<td width="10px"></td>
</tr>
<tr>
<td width="10px"></td>
<td>
<p>If you have not asked for your password to be reset, please <?php
echo mailto('support@lunchsparks.me', 'Contact Us');
?>
. </p>
</td>
<td width="10px"></td>
</tr>
<tr>
<td width="10px"></td>
<td>
<p> </p>
<p>
Cheers,
<br />
Lunchsparks Support
</p>
</td>
示例14: foreach
</tfoot>
<tbody>
<?php
foreach ($users as $member) {
?>
<tr>
<td align="center"><?php
echo form_checkbox('action_to[]', $member->id);
?>
</td>
<td><?php
echo anchor('admin/users/edit/' . $member->id, $member->full_name);
?>
</td>
<td><?php
echo mailto($member->email);
?>
</td>
<td><?php
echo $member->role_title;
?>
</td>
<td><?php
echo date('M d, Y', $member->created_on);
?>
</td>
<td><?php
echo $member->last_login > 0 ? date('M d, Y', $member->last_login) : lang('user_never_label');
?>
</td>
<td>
示例15: if
<?php if( strlen($comment->comment) > 30 ): ?>
<?php echo character_limiter($comment->comment, 30); ?>
<?php else: ?>
<?php echo $comment->comment; ?>
<?php endif; ?>
</a>
</td>
<td><?php echo isset($comment->item) ? $comment->item : '???'; ?></td>
<td>
<?php if($comment->user_id > 0): ?>
<?php echo anchor('admin/users/edit/' . $comment->user_id, $comment->name); ?>
<?php else: ?>
<?php echo $comment->name;?>
<?php endif; ?>
</td>
<td><?php echo mailto($comment->email);?></td>
<td><?php echo format_date($comment->created_on);?></td>
<td class="align-center buttons buttons-small">
<?php if ($this->settings->moderate_comments): ?>
<?php if($comment->is_active): ?>
<?php echo anchor('admin/comments/unapprove/' . $comment->id, lang('comments.deactivate_label'), 'class="button deactivate"'); ?>
<?php else: ?>
<?php echo anchor('admin/comments/approve/' . $comment->id, lang('comments.activate_label'), 'class="button activate"'); ?>
<?php endif; ?>
<?php endif; ?>
<?php echo anchor('admin/comments/edit/' . $comment->id, lang('comments.edit_label'), 'class="button edit"'); ?>
<?php echo anchor('admin/comments/delete/' . $comment->id, lang('comments.delete_label'), array('class'=>'confirm button delete')); ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>