本文整理汇总了PHP中email::update_account方法的典型用法代码示例。如果您正苦于以下问题:PHP email::update_account方法的具体用法?PHP email::update_account怎么用?PHP email::update_account使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类email
的用法示例。
在下文中一共展示了email::update_account方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
//delete accounts if requested
if ($task == 'save_account') {
$task = 'account';
$mbroot = isset($_POST['mbroot']) ? smart_addslashes($_POST['mbroot']) : '';
if ($_POST['name'] == "" || $_POST['mail_address'] == "" || $_POST['port'] == "" || $_POST['user'] == "" || $_POST['pass'] == "" || $_POST['host'] == "") {
$feedback = $error_missing_field;
} else {
$use_ssl = isset($_REQUEST['use_ssl']) ? '1' : '0';
$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;
}
}
}
示例2: isset
$return_to = isset($_REQUEST['return_to']) && $_REQUEST['return_to'] != '' ? $_REQUEST['return_to'] : $_SERVER['HTTP_REFERER'];
$link_back = isset($_REQUEST['link_back']) && $_REQUEST['link_back'] != '' ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI'];
//delete accounts if requested
if ($task == 'save_account') {
$task = 'account';
$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" />';