本文整理汇总了PHP中email::add_account方法的典型用法代码示例。如果您正苦于以下问题:PHP email::add_account方法的具体用法?PHP email::add_account怎么用?PHP email::add_account使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类email
的用法示例。
在下文中一共展示了email::add_account方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$novalidate_cert = isset($_REQUEST['novalidate_cert']) ? '1' : '0';
$sent = $_POST['type'] == 'pop3' ? '' : smart_addslashes($_POST['sent']);
$draft = $_POST['type'] == 'pop3' ? '' : smart_addslashes($_POST['draft']);
$spam = $_POST['type'] == 'pop3' ? '' : smart_addslashes($_POST['spam']);
$trash = $_POST['type'] == 'pop3' ? '' : smart_addslashes($_POST['trash']);
$auto_check = isset($_POST['auto_check']) ? '1' : '0';
if (isset($_POST['account_id'])) {
if (!$email->update_account($_POST['account_id'], $_POST['type'], smart_addslashes($_POST['host']), $_POST['port'], $use_ssl, $novalidate_cert, $mbroot, smart_addslashes($_POST['user']), $_POST['pass'], smart_addslashes($_POST['name']), smart_addslashes($_POST['mail_address']), smart_addslashes($_POST['signature']), $sent, $spam, $trash, $draft, $auto_check)) {
$feedback = '<p class="Error">' . $ml_connect_failed . ' \'' . $_POST['host'] . '\' ' . $ml_at_port . ': ' . $_POST['port'] . '</p>';
$feedback .= '<p class="Error">' . $email->last_error . '</p>';
} else {
header('Location: ' . $return_to);
exit;
}
} else {
if (!($email_id = $email->add_account($GO_SECURITY->user_id, $_POST['type'], smart_addslashes($_POST['host']), $_POST['port'], $use_ssl, $novalidate_cert, $mbroot, smart_addslashes($_POST['user']), $_POST['pass'], smart_addslashes($_POST['name']), smart_addslashes($_POST['mail_address']), smart_addslashes($_POST['signature']), $sent, $spam, $trash, $draft, $auto_check))) {
$feedback = '<p class="Error">' . $ml_connect_failed . ' \'' . $_POST['host'] . '\' ' . $ml_at_port . ': ' . $_POST['port'] . '</p>' . '<p class="Error">' . $email->last_error . '</p>';
} else {
header('Location: ' . $return_to);
exit;
}
}
}
}
if (isset($_REQUEST['account_id']) && $_SERVER['REQUEST_METHOD'] != "POST") {
$account = $email->get_account($_REQUEST['account_id']);
if ($account['user_id'] != $GO_SECURITY->user_id) {
require $GO_CONFIG->root_path . "error_docs/403.inc";
require $GO_THEME->theme_path . "footer.inc";
exit;
}
示例2: elseif
$error = "<p class='Error'>" . $error_username_exists . "</p>";
//check if email is already registered
} elseif ($GO_USERS->email_exists($_POST['email'])) {
$error = "<p class='Error'>" . $error_email_exists . "</p>";
} else {
$birthday = date_to_db_date($_POST['birthday']);
$email = $_POST['email'] == '' ? $_POST['username'] . '@' . $GO_CONFIG->inmail_host : $_POST['email'];
//register the new user. function returns new user_id or -1 on failure.
if ($new_user_id = $GO_USERS->add_user($username, $pass1, $first_name, $middle_name, $last_name, $initials, $title, $_POST['sex'], $birthday, $email, $work_phone, $home_phone, $fax, $cellular, $country, $state, $city, $zip, $address, $company, $work_country, $work_state, $work_city, $work_zip, $work_address, $work_fax, $homepage, $department, $function, $_POST['language'], $_POST['theme'], '', isset($_POST['visible']))) {
if (isset($_POST['create_email'])) {
require_once $GO_CONFIG->class_path . "email.class.inc";
$email_client = new email();
$middle_name = $middle_name == '' ? '' : $middle_name . ' ';
$name = $last_name . ' ' . $middle_name . $first_name;
require $GO_LANGUAGE->get_language_file('email');
if (!($account_id = $email_client->add_account($new_user_id, $GO_CONFIG->inmail_type, $GO_CONFIG->local_email_host, $GO_CONFIG->inmail_port, $GO_CONFIG->inmail_root, $username, $pass1, $name, $username . "@" . $GO_CONFIG->inmail_host, "", $ml_sent_items, $ml_spam, $ml_trash))) {
echo "<p class=\"Error\">" . $registration_email_error . "</p>";
echo "<p class=\"Error\">" . $email_client->last_error . "</p>";
}
}
//send email to the user with password
$registration_mail_body = str_replace("%sex%", $sir_madam[$_POST['sex']], $registration_mail_body);
$registration_mail_body = str_replace("%last_name%", $_POST['last_name'], $registration_mail_body);
$registration_mail_body = str_replace("%middle_name%", $middle_name, $registration_mail_body);
$registration_mail_body = str_replace("%first_name%", $_POST['first_name'], $registration_mail_body);
$registration_mail_body = str_replace("%username%", $_POST['username'], $registration_mail_body);
$registration_mail_body = str_replace("%password%", $_POST['pass1'], $registration_mail_body);
$registration_mail_body .= "\n\n" . $GO_CONFIG->full_url;
sendmail($email, $GO_CONFIG->webmaster_email, $GO_CONFIG->title, $registration_mail_subject, $registration_mail_body);
//used for professional version
//$user_count = $GO_USERS->get_users();
示例3: isset
$mbroot = isset($_POST['mbroot']) ? $_POST['mbroot'] : '';
if ($_POST['name'] == "" || $_POST['mail_address'] == "" || $_POST['port'] == "" || $_POST['user'] == "" || $_POST['pass'] == "" || $_POST['host'] == "") {
$feedback = $error_missing_field;
} else {
$sent = $_POST['type'] == 'pop3' ? '' : $_POST['sent'];
$draft = $_POST['type'] == 'pop3' ? '' : $_POST['draft'];
$spam = $_POST['type'] == 'pop3' ? '' : $_POST['spam'];
$trash = $_POST['type'] == 'pop3' ? '' : $_POST['trash'];
$auto_check = isset($_POST['auto_check']) ? '1' : '0';
if (isset($_POST['account_id'])) {
if (!$email->update_account($_POST['account_id'], $_POST['type'], $_POST['host'], $_POST['port'], $mbroot, $_POST['user'], $_POST['pass'], $_POST['name'], $_POST['mail_address'], $_POST['signature'], $sent, $spam, $trash, $draft, $auto_check)) {
$feedback = '<p class="Error">' . $ml_connect_failed . ' \'' . $_POST['host'] . '\' ' . $ml_at_port . ': ' . $_POST['port'] . '</p>';
$feedback .= '<p class="Error">' . $email->last_error . '</p>';
}
} else {
if (!($email_id = $email->add_account($GO_SECURITY->user_id, $_POST['type'], $_POST['host'], $_POST['port'], $mbroot, $_POST['user'], $_POST['pass'], $_POST['name'], $_POST['mail_address'], $_POST['signature'], $sent, $spam, $trash, $draft, $auto_check))) {
$feedback = '<p class="Error">' . $ml_connect_failed . ' \'' . $_POST['host'] . '\' ' . $ml_at_port . ': ' . $_POST['port'] . '</p>';
$feedback .= '<p class="Error">' . $email->last_error . '</p>';
}
}
}
}
require $GO_THEME->theme_path . "header.inc";
echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '" name="email_client">';
echo '<input type="hidden" name="task" value="" />';
echo '<input type="hidden" name="close" value="false" />';
echo '<input type="hidden" name="return_to" value="' . $return_to . '" />';
echo '<input type="hidden" name="link_back" value="' . $link_back . '" />';
echo '<input type="hidden" name="delete_account_id" />';
$tabtable = new tabtable('accounts_list', $ml_your_accounts, '600', '300', '100', '', true);
$tabtable->print_head();