public function mail()
 {
     $post = $_POST;
     if ($post['submit']) {
         unset($post['submit']);
         mod_config::set_configs($post);
         mod_login::message('更新邮箱发送配置成功');
     } else {
         $configs = mod_config::get_configs(array('fl_sendemail', 'fl_sendemailtype', 'fl_fromemail', 'fl_smtpserver', 'fl_smtpport', 'fl_smtpssl', 'fl_smtpauth', 'fl_smtpid', 'fl_smtppass'));
         $action_link = array('href' => '?c=config&a=index', 'text' => '返回系统配置');
         pm_tpl::assign('action_link', $action_link);
         pm_tpl::assign('ur_here', '配置SMTP发送');
         pm_tpl::assign('config', $configs);
         pm_tpl::display('config_mail');
     }
 }
示例#2
0
}
//加载常量定义库
require_once PATH_ADMIN . '/config/cfg_constants.php';
// 加载函数库
require_once PATH_APPLICATION . '/pm_core_functions.php';
// 自动转义
if (@function_exists(auto_addslashes)) {
    auto_addslashes($_POST);
    auto_addslashes($_GET);
    auto_addslashes($_COOKIE);
    auto_addslashes($_REQUEST);
}
//加载相关文件
require_once PATH_CONFIG . '/cfg_database.php';
require_once PATH_APPLICATION . '/pm_router.php';
require_once includesqlfile();
//加载数据库文件
require_once PATH_MODULE . '/smarty/Smarty.class.php';
require_once PATH_APPLICATION . '/pm_tpl.php';
defined('DEBUG_LEVEL') || define('DEBUG_LEVEL', TRUE);
defined('HOST') || define('HOST', 'http://' . $_SERVER['HTTP_HOST']);
$path_info = pathinfo($_SERVER['PHP_SELF']);
$path_x = rtrim(strtr($path_info['dirname'], array('\\' => '/')), '/');
//URL定义
defined('URL') || define('URL', 'http://' . $_SERVER['HTTP_HOST'] . $path_x);
defined('VERIFY_CODE') || define('VERIFY_CODE', mod_config::get_one_config('fl_verify_code'));
// 分页
defined('PAGE_ROWS') || define('PAGE_ROWS', 20);
defined('PATH_COOKIE') || define('PATH_COOKIE', '/');
$global_config = mod_config::get_configs(array('fl_timedf', 'fl_sysname', 'fl_sysurl'));
pm_tpl::assign('cp_home', $global_config['fl_sysname']);