当前位置: 首页>>代码示例>>PHP>>正文


PHP base::send_email_from_admin方法代码示例

本文整理汇总了PHP中base::send_email_from_admin方法的典型用法代码示例。如果您正苦于以下问题:PHP base::send_email_from_admin方法的具体用法?PHP base::send_email_from_admin怎么用?PHP base::send_email_from_admin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在base的用法示例。


在下文中一共展示了base::send_email_from_admin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: trim

            $error .= '<li> Title cannot be left blank';
        }
    }
    if ($text) {
        $text = trim($text);
        if (strlen($text) > 65535) {
            $error .= '<li> Text is too long (Max. 65535 Characters)';
        }
    } else {
        $error .= '<li> Message cannot be left blank';
    }
    if (!$error) {
        $datetime = $_POST['datetime'];
        $base_instance->query('INSERT INTO ' . $base_instance->entity['FORUM']['MAIN'] . ' (datetime,updated,text,title,followup,user) VALUES ("' . sql_safe($datetime) . '","' . sql_safe($datetime) . '","' . sql_safe($text) . '","' . sql_safe($title) . '",' . $followup . ',' . $userid . ')');
        if (_FORUM_NOTIFY == 1 && $userid != _ADMIN_USERID) {
            $msg = "New Forum Message:\n\n" . $title . "\n\n" . $text;
            $base_instance->send_email_from_admin('New Forum Message Notification', $msg, _ADMIN_EMAIL);
        }
        header('Location: show-forum.php');
        exit;
    } else {
        $html_instance->error_message = $error;
        $text = stripslashes($text);
        $title = stripslashes($title);
    }
}
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'New Forum Message', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BODY' => 'onLoad="javascript:document.form1.title.focus()"', 'BUTTON_TEXT' => 'Post new Message'));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'followup', 'VALUE' => "{$followup}"));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title', 'VALUE' => "{$title}", 'SIZE' => 50, 'TEXT' => 'Title'));
$html_instance->add_form_field(array('TYPE' => 'textarea', 'NAME' => 'text', 'VALUE' => "{$text}", 'COLS' => 90, 'ROWS' => 11));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-forum-message.php

示例2: Comment

            $image_random_value = $_SESSION['image_random_value'];
        } else {
            $image_random_value = '';
        }
        if (md5($number) != $image_random_value) {
            $error .= '<li> You entered the wrong number, please try again';
        }
    } else {
        $error .= '<li> Please enter the shown number';
    }
    if (!$error) {
        $msg = 'Hello ' . $username . '!' . "\n\n";
        $msg .= 'Somebody has left a comment on the following blog post:' . "\n\n";
        $msg .= $blog_title . "\n\n";
        $msg .= 'To approve the comment log into the Blue Smiley Organizer,' . "\n" . 'under "Blog" click on Comments. Next to each comment is a "Publish" link.' . "\n";
        $base_instance->send_email_from_admin('Blog Comment (Blue Smiley Organizer)', $msg, $email_of_blogger);
        $datetime = date('Y-m-d H:i:s');
        $base_instance->query('INSERT INTO ' . $base_instance->entity['BLOG']['COMMENTS'] . ' (datetime,user,text,name,email,blog_id) VALUES ("' . sql_safe($datetime) . '",' . $userid . ',"' . sql_safe($text) . '","' . sql_safe($name) . '","' . sql_safe($email) . '",' . $blog_id . ')');
        $main = 'Thank you for your comment. To avoid spam the comments are approved manually before they are published.';
        require 'template-blog.html';
        exit;
    }
}
#
if (!empty($error)) {
    $msg = '<font color="#ff0000"><ul>' . $error . '</ul></font>';
} else {
    $msg = '<h1>Add Blog Comment</h1>';
}
$main = $msg . '
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:30,代码来源:add-blog-comment.php

示例3: VALUES

     $e10 = 0;
 }
 $base_instance->query('INSERT INTO ' . $base_instance->entity['SEARCH']['MAIN'] . ' (user,element1,element2,element3,element4,element5,element6,element7,element8,element9,element10) VALUES (' . $userid . ',' . $e1 . ',' . $e2 . ',' . $e3 . ',' . $e4 . ',' . $e5 . ',' . $e6 . ',' . $e7 . ',' . $e8 . ',' . $e9 . ',' . $e10 . ')');
 $base_instance->query('INSERT INTO ' . $base_instance->entity['HOME']['MAIN'] . ' (user,title,element1,element2,element3,element4,element5,element6,element7,element8,element9,element10,element11,element12) VALUES (' . $userid . ',"Home 1",5,13,10,38,6,36,28,40,0,0,0,0)');
 $url = $username . '/' . $secure_password;
 $encoded_url = base64_encode($url);
 #if (_SHORT_URLS==1) { $url=_HOMEPAGE.'/login-'.$encoded_url; }	else { $url=_HOMEPAGE.'/autologin.php?code='.$encoded_url; }
 #if (_SHORT_URLS==1) { $url2=_HOMEPAGE.'/user-'.$username; }	else { $url2=_HOMEPAGE.'/show-about-me.php?username='.$username; }
 $msg = 'Hello ' . $username . '!' . "\n\n";
 $msg .= 'You have successfully created an account.' . "\n\n";
 $msg .= 'You can efficiently organize links, contacts, diary entries, reminder, to-do lists with the Blue Smiley Organizer.' . "\n\n";
 #$msg.='Please bookmark the following link to log into your account:'."\n\n".$url."\n\n";
 #$msg.='Your personal space with your blog and "About Me" page can be found here:'."\n\n".$url2."\n\n";
 $msg .= 'We are interested in your feedback. Please send us your comments or questions.' . "\n\n";
 $msg .= 'For Live Help click here ' . _HOMEPAGE . '/live-support.php' . "\n\n";
 $base_instance->send_email_from_admin('Welcome Email', $msg, $email);
 if (_NEW_USER_NOTIFY == 1) {
     $mailheaders = 'From: ' . _ADMIN_SENDER_NAME . ' <' . _ADMIN_EMAIL . '>' . "\n";
     $mailheaders .= 'Reply-To: ' . _ADMIN_EMAIL . "\n";
     $mailheaders .= 'Content-Type: text/html; charset=utf-8' . "\n";
     $country_name = $base_instance->country_array[$country];
     $text = 'Username: ' . $username . '<br>';
     $text .= 'Firstname: ' . $firstname . '<br>';
     $text .= 'Lastname: ' . $lastname . '<br>';
     $text .= 'Email: ' . $email . '<br>';
     $text .= 'Country: ' . $country_name . '<br>';
     $text .= 'IP: ' . $IP . '<p>';
     $text .= _SEPARATOR . '<br>';
     $text .= _SLOGAN . '<br>';
     $text .= _HOMEPAGE . '<br>';
     $text .= 'Email: ' . _ADMIN_EMAIL . '<br>';
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:sign-up.php

示例4: VALUES

        $base_instance->query('INSERT INTO ' . $base_instance->entity['PASSWORD']['MAIN'] . ' (create_time,email,password) VALUES ("' . $now . '","' . sql_safe($email) . '","' . $password . '")');
        $insert_id = mysqli_insert_id($base_instance->db_link);
        # delete old entries
        $auth_time = 604800;
        # 7 days in seconds
        $time = time() - $auth_time;
        $base_instance->query("DELETE FROM {$base_instance->entity['PASSWORD']['MAIN']} WHERE create_time < {$time}");
        #
        $url = $insert_id . '/' . $password;
        $encoded_url = base64_encode($url);
        $msg = 'Hello!' . "\n\n";
        $msg .= 'Your Login is: ' . $username . "\n\n";
        $msg .= 'Please set a new password by clicking on the link below:' . "\n\n";
        $msg .= _HOMEPAGE . "/reset-password.php?code={$encoded_url}\n\n";
        $msg .= 'If you encounter any problems please send an email to ' . _ADMIN_EMAIL . "\n\n";
        $base_instance->send_email_from_admin('Password Reminder', $msg, $email);
        $main .= 'An email has been sent to <strong>' . $email . '</strong> with details on how to reset your password.<p>';
        require 'template.html';
        exit;
    }
}
$header = 'Password Reminder';
$main .= '<p>

<form action="password-reminder.php" method="post">

<table cellpadding="5" cellspacing="0" border=1 class="pastel" bgcolor="#ffffff">

<tr><td align="right"><b>Email:</b></td><td align="left">&nbsp;<input type="text" name="email" size="35" value=""></td></tr>

<tr><td colspan=2 align="center"><input type="SUBMIT" value="Send Reminder" name="save"></td></tr></form></td></tr></table>
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:password-reminder.php


注:本文中的base::send_email_from_admin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。