!defined('DEBUG') and exit('Access Denied.'); $smtplist = (include './conf/smtp.conf.php'); include './xiunophp/form.func.php'; include './model/smtp.func.php'; $action = param(1); if ($action == 'list') { 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');
include './xiunophp/form.func.php'; include './model.inc.php'; $user = user_token_get('', 'bbs'); $user['gid'] != 1 and message(-1, '需要管理员权限才能设置。'); // 检测浏览器 $browser = get__browser(); check_browser($browser); $runtime = runtime_init(); if ($method == 'GET') { $sphinx = kv_get('sphinx'); !isset($sphinx['enable']) && ($sphinx['enable'] = 0); !isset($sphinx['sphinx_host']) && ($sphinx['sphinx_host'] = ''); !isset($sphinx['sphinx_port']) && ($sphinx['sphinx_port'] = ''); !isset($sphinx['sphinx_datasrc']) && ($sphinx['sphinx_datasrc'] = ''); !isset($sphinx['sphinx_deltasrc']) && ($sphinx['sphinx_deltasrc'] = ''); $input['enable'] = form_radio_yes_no('enable', $sphinx['enable']); $input['sphinx_host'] = form_text('sphinx_host', $sphinx['sphinx_host'], 300); $input['sphinx_port'] = form_text('sphinx_port', $sphinx['sphinx_port'], 100); $input['sphinx_datasrc'] = form_text('sphinx_datasrc', $sphinx['sphinx_datasrc'], 300); $input['sphinx_deltasrc'] = form_text('sphinx_deltasrc', $sphinx['sphinx_deltasrc'], 300); $header = array(); $header['title'] = 'Sphinx 搜索服务设置'; include './plugin/xn_sphinx/setting.htm'; } else { $enable = param('enable', 0); $sphinx_host = param('sphinx_host'); $sphinx_port = param('sphinx_port'); $sphinx_datasrc = param('sphinx_datasrc'); $sphinx_deltasrc = param('sphinx_deltasrc'); $arr = array('enable' => $enable, 'sphinx_host' => $sphinx_host, 'sphinx_port' => $sphinx_port, 'sphinx_datasrc' => $sphinx_datasrc, 'sphinx_deltasrc' => $sphinx_deltasrc); kv_set('sphinx', $arr);
include './xiunophp/form.func.php'; include './model.inc.php'; include './plugin/xn_qq_login/qq_login.func.php'; $user = user_token_get('', 'bbs'); $user['gid'] != 1 and message(-1, '需要管理员权限才能设置。'); // 检测浏览器 $browser = get__browser(); check_browser($browser); $runtime = runtime_init(); if ($method == 'GET') { $qq = kv_get('qq_login'); !isset($qq['enable']) && ($qq['enable'] = 0); !isset($qq['meta']) && ($qq['meta'] = ''); !isset($qq['appid']) && ($qq['appid'] = ''); !isset($qq['appkey']) && ($qq['appkey'] = ''); $input['enable'] = form_radio_yes_no('enable', $qq['enable']); $input['meta'] = form_text('meta', htmlspecialchars($qq['meta']), 600); $input['appid'] = form_text('appid', $qq['appid'], 300); $input['appkey'] = form_text('appkey', $qq['appkey'], 300); $header = array(); $header['title'] = 'QQ 登陆设置'; include './plugin/xn_qq_login/setting.htm'; } else { $enable = param('enable', 0); $meta = param('meta', '', FALSE); $appid = param('appid'); $appkey = param('appkey'); $arr = array('enable' => $enable, 'meta' => $meta, 'appid' => $appid, 'appkey' => $appkey); kv_set('qq_login', $arr); // 此处会丢失 runtime_set('qq_login_enable', $enable, TRUE);
// 发布的时候改为 0 define('APP_NAME', 'bbs'); // 应用的名称 define('APP_PATH', '../../'); // 应用的路径 chdir(APP_PATH); $conf = (include './conf/conf.php'); include './xiunophp/xiunophp.php'; include './xiunophp/form.func.php'; include './model.inc.php'; $user = user_token_get('', 'bbs'); $user['gid'] != 1 and message(-1, '需要管理员权限才能设置。'); // 检测浏览器 $browser = get__browser(); check_browser($browser); $runtime = runtime_init(); if ($method == 'GET') { $input = array(); $input['tietuku_on'] = form_radio_yes_no('tietuku_on', $conf['tietuku_on']); $input['tietuku_token'] = form_textarea('tietuku_token', htmlspecialchars($conf['tietuku_token']), 600, 100); $header = array(); $header['title'] = '贴图库设置'; include './plugin/xn_tietuku/setting.htm'; } else { $tietuku_on = param('tietuku_on', 0); $tietuku_token = param('tietuku_token', '', FALSE); conf_set('tietuku_on', $tietuku_on); conf_set('tietuku_token', $tietuku_token); conf_save(); message(0, '设置成功!'); }
<?php !defined('DEBUG') and exit('Access Denied.'); include './xiunophp/form.func.php'; $action = param(1); if (empty($action) || $action == 'list') { $method != 'GET' and message(-1, 'Method error'); $header['title'] = '禁止IP'; $baniplist = banip_find(); $maxbanid = banip_maxid(); $input_banip_on = form_radio_yes_no('banip_on', $conf['banip_on']); empty($baniplist) and $baniplist = array(array('banid' => 1, 'ip0' => 0, 'ip1' => 0, 'ip2' => 0, 'ip3' => 0, 'create_date_fmt' => '', 'expiry_fmt' => '')); include "./admin/view/banip.htm"; } elseif ($action == 'update') { $method != 'POST' and message(-1, 'Method error'); $banid = param(2, 0); $ip0 = param('ip0', 0); $ip1 = param('ip1', 0); $ip2 = param('ip2', 0); $ip3 = param('ip3', 0); $expiry = param('expiry'); $expiry = strtotime($expiry); $ip0 = mid($ip0, 0, 255); $ip1 = mid($ip1, 0, 255); $ip2 = mid($ip2, 0, 255); $ip3 = mid($ip3, 0, 255); $banip = banip_read($banid); if (empty($banip)) { $r = banip_create(array('banid' => $banid, 'ip0' => $ip0, 'ip1' => $ip1, 'ip2' => $ip2, 'ip3' => $ip3, 'expiry' => $expiry)); $r !== FALSE ? message(0, '创建成功') : message(-1, '创建失败'); }
<?php !defined('DEBUG') and exit('Access Denied.'); include './xiunophp/form.func.php'; $action = param(1); if ($method == 'GET') { $badwords = kv_get('badwords'); $input_badword_on = form_radio_yes_no('badword_on', $conf['badword_on']); $badwords = badword_implode(':', ' ', $badwords); include './admin/view/badword.htm'; } elseif ($method == 'POST') { $badwords = param('badwords'); $badword_on = param('badword_on', 0); $badwords = str_replace(" ", ' ', $badwords); $badwords = str_replace(":", ':', $badwords); $badwords = str_replace(": ", ':', $badwords); $badwords = preg_replace('#\\s+#is', ' ', $badwords); $badwordarr = badword_explode(':', ' ', $badwords); kv_set('badwords', $badwordarr); conf_set('badword_on', $badword_on); message(0, '保存成功'); }
<?php !defined('DEBUG') and exit('Access Denied.'); include './xiunophp/form.func.php'; $action = param(1); if (empty($action)) { $conffile = './conf/conf.php'; $readable = is_writeable($conffile); if ($method == 'GET') { $input = array(); $input['ipaccess_on'] = form_radio_yes_no('ipaccess_on', $conf['ipaccess_on']); $input['ipaccess_mails'] = form_text('mails', $conf['ipaccess']['mails']); $input['ipaccess_threads'] = form_text('threads', $conf['ipaccess']['threads']); $input['ipaccess_posts'] = form_text('posts', $conf['ipaccess']['posts']); $input['ipaccess_attachs'] = form_text('attachs', $conf['ipaccess']['attachs']); $input['ipaccess_attachsizes'] = form_text('attachsizes', $conf['ipaccess']['attachsizes']); include './admin/view/ip.htm'; } else { $ipaccess_on = param('ipaccess_on', 0); $ipaccess = array('mails' => param('mails', 0), 'threads' => param('threads', 0), 'posts' => param('posts', 0), 'attachs' => param('attachs', 0), 'attachsizes' => param('attachsizes', 0)); $conf['ipaccess_on'] = $ipaccess_on; $conf['ipaccess'] = array_merge($conf['ipaccess'], $ipaccess); conf_save(); message(0, '修改成功'); } }