コード例 #1
0
ファイル: smtp.php プロジェクト: zhangjmy/xibbs
    if ($method == 'GET') {
        $header['title'] = 'SMTP 管理';
        $smtplist = smtp_find();
        $maxid = smtp_maxid();
        $readable = is_writable('./conf/smtp.conf.php');
        $default = array('host' => 'smtp.sina.com', 'port' => 25, 'user' => 'xxxx', 'email' => '*****@*****.**', 'pass' => 'xxxx');
        empty($smtplist) and $smtplist = array($default);
        $input_user_create_email_on = form_radio_yes_no('user_create_email_on', $conf['user_create_email_on']);
        $input_user_find_pw_on = form_radio_yes_no('user_find_pw_on', $conf['user_find_pw_on']);
        include "./admin/view/smtp_list.htm";
    }
    // SMTP更新
} elseif ($action == 'setting') {
    $conf['user_create_email_on'] = param('user_create_email_on', 0);
    $conf['user_find_pw_on'] = param('user_find_pw_on', 0);
    conf_save();
    message(0, '保存成功');
} elseif ($action == 'update') {
    $id = param(2, 0);
    $email = param('email');
    $host = param('host');
    $port = param('port', 0);
    $user = param('user');
    $pass = param('pass');
    empty($email) and message(1, 'Email 不能为空');
    empty($host) and message(2, 'SMTP 主机不能为空');
    empty($port) and message(3, 'SMTP 端口不能为空');
    empty($user) and message(4, 'SMTP 用户名不能为空');
    empty($pass) and message(5, '密码不能为空');
    $smtp = smtp_read($id);
    $arr = array('host' => $host, 'port' => $port, 'user' => $user, 'email' => $email, 'pass' => $pass);
コード例 #2
0
ファイル: misc.func.php プロジェクト: 994724435/Ride
function conf_set($k, $v, $save = TRUE)
{
    global $conf;
    $conf[$k] = $v;
    return $save ? conf_save() : TRUE;
}