<?php
/*
\* ===========================================
\* 项目: CTB文本论坛
\* 版本: 1.2
\* 团队: 实易数码
\* 小组: CTB文本论坛小组
\* 作者: 险情
\* 功能: 后台系统-系统参数处理程式
\* ===========================================
\* Copyright (c) 2002
\* 团队主页: http://www.11cn.org
\* 技术论坛: http://ctb.11cn.org
\* 创建日期: 2002/7/10
\* 修改日期: ------
\* 修改说明: ------
\* 版权声明: 这个程序是免费软件.
\* ===========================================
*/

//=============================================================================
class Module extends CommonClass
//系统管理模块子类
{
    function execute() {
        switch($this->input['action']) {
            //
            case 'showSystem':
                $this->showSystem();
                break;
            case 'saveSystem':
                $this->saveSystem();
                break;
            case 'closeBoard':
                $this->closeBoard();
                break;
            case 'closeBoardSave':
                $this->closeBoardSave();
                break;
            case 'registerMode':
                $this->registerMode();
                break;
            case 'registerModeSave':
                $this->registerModeSave();
                break;
            //
        }    
    } // end func

//-----------------------------------------------------------------------------
//---系统处理模块
//1---显示系统参数页面:showSystem()
//2---保存系统参数: saveSystem()
//3---显示论坛开关界面:closeBoard()
//4---保存论坛开关:closeBoardSave()
//5---显示论坛注册控制界面:registerMode()
//6---保存论坛注册:registerModeSave();
//---
//---
//-----------------------------------------------------------------------------

//1=============================================================================
//显示系统参数页面
function showSystem()
{
    //是否防止而已刷新
    $refreshLimitChecked = $this->getChecked($this->set[refreshLimit]);
    
    //在线显示射定
    $showIndexOnlineChecked = $this->getChecked($this->set[showIndexOnline]);
    $showForumOnlineChecked = $this->getChecked($this->set[showForumOnline]);

    //是否允许上传附件
    $allowUploadFileChecked = $this->getChecked($this->set[allowUploadFile]);

    //是否允许上传头像
    $allowUploadPhotoChecked = $this->getChecked($this->set[allowUploadPhoto]);
    
    //是否允许上传头像
    $showLinkForumChecked = $this->getChecked($this->set[showLinkForum]);
    $rollLinkForumChecked = $this->getChecked($this->set[rollLinkForum]);

    //选择发送邮件类型
        if ($this->set[emailMode] == "mail"){
            $emailModeChecked[mail] = "checked";
            $emailModeChecked[smtp] = "";
        }
        if ($this->set[emailMode] == "smtp"){
            $emailModeChecked[mail] = "";
            $emailModeChecked[smtp] = "checked";
        }

    //是否隐藏联盟
    $forumHideChecked = $this->getChecked($this->set[forumHide]);
    
	//是否压缩网页
    $enableZipChecked = $this->getChecked($this->set[enableZip]);
    $enableZipChecked = $this->getChecked($this->set[enableZip]);
	//是否发表过滤
    $replaceWhenPostChecked = $this->getChecked($this->set[replaceWhenPost]);
    $replaceWhenPostChecked = $this->getChecked($this->set[replaceWhenPost]);

	//是否打开论坛日志
    $logRecordChecked = $this->getChecked($this->set[logRecord]);
    $logRecordChecked = $this->getChecked($this->set[logRecord]);
	
	//取得摸版显示
        $this->file = "../".$this->set[dataPath]."/templates.php";
        $template = $this->read_file();
        $templateShowAll = "";
        foreach ($template as $templateLine) {
            $templateLineCode = $this->make_array($templateLine);
            if ($this->set[tplMode] == $templateLineCode[1])
                $template_showline = "<option value=".$templateLineCode[1]." selected>".$templateLineCode[2]."</option>";
            else 
                $template_showline = "<option value=".$templateLineCode[1].">".$templateLineCode[2]."</option>";
                $templateShowAll .= $template_showline;
        }
     //
    eval("\$this->outPut(\"".$this->getTemplate("systemShow")."\");");
} // end func

//2=============================================================================
//保存系统参数
function saveSystem()
{  
    //格式化输入数据
    if (in_array("",$this->input)){
      $this->adminShowWrong("main.php?mod=system&action=showSystem","所有资料为必填选项，请不要留空。");
    }
    $this->input = $this->adminSafeChars($this->input);

    //系统数据正式写入系统
$newSystemParameter="<?php
/*
\* ========================================================
\* 项目: CTB文本论坛
\* 版本: v1.2
\* 团队: 实易数码
\* 小组: CTB文本论坛开发组
\* 作者: windnets,16hot,险情
\* 功能: CTB论坛属性设置
\* ========================================================
\* Copyright (c) 2002 
\* 团队主页: http://www.11cn.org
\* 技术论坛: http://ctb.11cn.org
\* 创建日期: 2002/5/1/
\* 修改日期: ------
\* 修改说明: ------
\* 版权声明: 这个程序是免费软件.
\* ========================================================
*/

//=============================================================================
//设置论坛名称
\$set[ctbTitle] = \"{$this->input[ctbTitle]}\";  //论坛名字

//+---------------------------------------------------------
//数据文件路径
\$set[dataPath] = \"{$this->input[dataPath]}\"; //数据存储路径

//+---------------------------------------------------------
//模板文件路径
\$set[tplMode] = \"{$this->input[tplMode]}\";  //模版路径
\$set[tplRoot] = \"{$this->input[tplRoot]}\";  //模版文件夹

//+---------------------------------------------------------
//ctb所在url
\$set[webPath] = \"{$this->input[webPath]}\";  //ctb的web地址

//+---------------------------------------------------------
//日期格式设定
\$set[dateformat] = \"{$this->input[dateformat]}\"; //发表主题限制 秒数

//+---------------------------------------------------------
//版块文章分页显示
\$set[topicList] = \"{$this->input[topicList]}\"; //每页显示的主题数量 
\$set[postList] = \"{$this->input[postList]}\"; //主题分页每页显示帖子
\$set[pageLimit] = \"{$this->input[pageLimit]}\"; //页数s

//+---------------------------------------------------------
//注册用户显示
\$set[userList] = \"{$this->input[userList]}\"; //每页显示的主题数量 

//+---------------------------------------------------------
//短信息显示
\$set[msgList] = \"{$this->input[msgList]}\"; //每页显示的主题数量 
\$set[msgMax] = \"{$this->input[msgMax]}\" ; //最大消息数量

//+---------------------------------------------------------
//防止灌水时间设定
\$set[limitReplyTime] = \"{$this->input[limitReplyTime]}\"; //回复限制 秒数
\$set[limitPostTime] = \"{$this->input[limitPostTime]}\"; //发表主题限制 秒数

//+---------------------------------------------------------
//论坛标题截取
\$set[postTopicWidth] = \"{$this->input[postTopicWidth]}\";  //发表文章标题长度
\$set[postCommonWidth] = \"{$this->input[postCommonWidth]}\"; //发表文章内容长度
\$set[showIndexTopicWidth] = \"{$this->input[showIndexTopicWidth]}\"; //首页标题截取
\$set[showForumTopicWidth] = \"{$this->input[showForumTopicWidth]}\"; //文章列表标题截取

//+---------------------------------------------------------
//是否显示联盟论坛
\$set[showLinkForum] = \"{$this->input[showLinkForum]}\"; //Y滚动N不显示
\$set[rollLinkForum] = \"{$this->input[rollLinkForum]}\"; //Y显示N不滚动

//+---------------------------------------------------------
//是否显示版块在线
\$set[refreshLimit] = \"{$this->input[refreshLimit]}\";  //防止恶意刷新
\$set[refreshLimitTime] = \"{$this->input[refreshLimitTime]}\";  //防止恶意刷新时间
\$set[showOnlineTime] = \"{$this->input[showOnlineTime]}\";  //多长时间为在线
\$set[showIndexOnline] = \"{$this->input[showIndexOnline]}\";  //Y显示N不显示（首页）
\$set[showForumOnline] = \"{$this->input[showForumOnline]}\";  //Y显示N不显示（分类）

//+---------------------------------------------------------
//是否允许上传附件
\$set[allowUploadFile] = \"{$this->input[allowUploadFile]}\";  //是否允许上传附件
\$set[uploadFileLimit] = \"{$this->input[uploadFileLimit]}\";  //上传附件最小发帖子数量
\$set[downloadFileLimit] = \"{$this->input[downloadFileLimit]}\";//下载附件最小发帖子数量
\$set[uploadFileType] = \"{$this->input[uploadFileType]}\";  //允许上传文件类型
\$set[uploadFileSize] = \"{$this->input[uploadFileSize]}\";  //允许上传文件大小

//+---------------------------------------------------------
//是否允许上传个人头像
\$set[allowUploadPhoto] = \"{$this->input[allowUploadPhoto]}\";  //是否允许上传头像
\$set[uploadPhotoLimit] = \"{$this->input[uploadPhotoLimit]}\";  //上传投降最小发帖子数量
\$set[uploadPhotoType] = \"{$this->input[uploadPhotoType]}\";  //允许上传图片类型
\$set[uploadPhotoSize] = \"{$this->input[uploadPhotoSize]}\";  //允许上传图片大小
\$set[uploadPhotoHeight] = \"{$this->input[uploadPhotoHeight]}\";  //允许上传图片高
\$set[uploadPhotoWidth] = \"{$this->input[uploadPhotoWidth]}\";  //允许上传图片宽

//+---------------------------------------------------------
//加密版块设置
\$set[forumHide] = \"{$this->input[forumHide]}\"; //Y显示N隐藏

//+---------------------------------------------------------
//联盟论坛设置
\$set[showLinkForum] = \"{$this->input[showLinkForum]}\"; //Y显示N不显示      
\$set[rollLinkForum] = \"{$this->input[rollLinkForum]}\"; //Y显示N不滚动  

//+---------------------------------------------------------
//邮件属性设置
\$set[emailAdmin] = \"{$this->input[emailAdmin]}\"; //管理员的邮件地址   
\$set[emailMode] = \"{$this->input[emailMode]}\"; //选择邮件发送类型（smtp，mail） 

//+---------------------------------------------------------
//邮件属性设置
\$set[smtpHost] = \"{$this->input[smtpHost]}\"; //smtp服务器地址    
\$set[smtpUserName] = \"{$this->input[smtpUserName]}\"; //信箱名称        
\$set[smtpPassWord] = \"{$this->input[smtpPassWord]}\"; //信箱密码       

//==========================================================
//+---------------------------------------------------------
//论坛注册设置
\$set[allowRegister] = \"{$this->set[allowRegister]}\"; //是否允许注册
\$set[registerLimitIp] = \"{$this->set[registerLimitIp]}\"; //是否限制同一ip注册用户
\$set[registerLimitTime] = \"{$this->set[registerLimitTime]}\"; //限制同一ip注册时间
\$set[registerSentPass] = \"{$this->set[registerSentPass]}\"; //是否进行注册认证
\$set[registerEmailSubmit] = \"{$this->set[registerEmailSubmit]}\"; //邮件确认

//+---------------------------------------------------------
//论坛是否关闭
\$set[openLimit] = \"{$this->set[openLimit]}\";  //Y开启N关闭，开启后将对访问进行限制
\$set[openLimitGuest] = \"{$this->set[openLimitGuest]}\";  //Y开启N关闭，开启后将禁止防客访问
\$set[openLimitShow] = \"{$this->set[openLimitShow]}\";  //论坛限制开启理由
\$set[boardClose] = \"{$this->set[boardClose]}\";  //Y关闭N开启
\$set[boardCloseShow] = \"{$this->set[boardCloseShow]}\"; //关闭理由

//其他选项
\$set[enableZip] = \"{$this->input[enableZip]}\";  //Y是N否，是否使用网页压缩输出
\$set[replaceWhenPost] = \"{$this->input[replaceWhenPost]}\";  //Y是N否，是否在发表时进行脏话过滤
\$set[logRecord] = \"{$this->input[logRecord]}\";  //Y是N否，是否打开论坛日志
\$set[logRecordSize] = \"{$this->input[logRecordSize]}\";  //当论坛日志达到最大时自动清除

//+---------------------------------------------------------

//+---------------------------------------------------------

//=============================================================================
?>";
    $fp=fopen("../include/config.php","w");
    fwrite($fp, $newSystemParameter);
    fclose($fp);

    $this->adminShowMsg("main.php?mod=system&action=showSystem","您已经成功更新了系统资料");


 } // end func


//3=============================================================================
//显示论坛开关界面
function closeBoard()
{
    //判断论坛是否关闭
    $boardCloseChecked = $this->getChecked($this->set[boardClose]);
    //判断论坛是否限制访客访问
    $openLimitGuestChecked = $this->getChecked($this->set[openLimitGuest]);
    //是否打开节省资源模式
    $openLimitChecked = $this->getChecked($this->set[openLimit]);
    $this->set[boardCloseShow] = str_replace("<br>", "\n", $this->set[boardCloseShow]);
    $this->set[openLimitShow] = str_replace("<br>", "\n", $this->set[openLimitShow]);
    eval("\$this->outPut(\"".$this->getTemplate("systemCloseBoard")."\");");

} // end func

//4=============================================================================
//保存论坛开关
function closeBoardSave()
{  
    //格式化输入数据
    if (in_array("",$this->input)){
      $this->adminShowWrong("main.php?mod=system&action=closeBoard","所有资料为必填选项，请不要留空。");
    }
    $this->input = $this->adminSafeChars($this->input);

    //系统数据正式写入系统
$newSystemParameter="<?php
/*
\* ========================================================
\* 项目: CTB文本论坛
\* 版本: v1.2
\* 团队: 实易数码
\* 小组: CTB文本论坛开发组
\* 作者: windnets,16hot,险情
\* 功能: CTB论坛属性设置
\* ========================================================
\* Copyright (c) 2002 
\* 团队主页: http://www.11cn.org
\* 技术论坛: http://ctb.11cn.org
\* 创建日期: 2002/5/1/
\* 修改日期: ------
\* 修改说明: ------
\* 版权声明: 这个程序是免费软件.
\* ========================================================
*/

//=============================================================================
//设置论坛名称
\$set[ctbTitle] = \"{$this->set[ctbTitle]}\";  //论坛名字

//+---------------------------------------------------------
//数据文件路径
\$set[dataPath] = \"{$this->set[dataPath]}\"; //数据存储路径

//+---------------------------------------------------------
//模板文件路径
\$set[tplMode] = \"{$this->set[tplMode]}\";  //模版路径
\$set[tplRoot] = \"{$this->set[tplRoot]}\";  //模版文件夹

//+---------------------------------------------------------
//ctb所在url
\$set[webPath] = \"{$this->set[webPath]}\";  //ctb的web地址

//+---------------------------------------------------------
//日期格式设定
\$set[dateformat] = \"{$this->set[dateformat]}\"; //发表主题限制 秒数

//+---------------------------------------------------------
//版块文章分页显示
\$set[topicList] = \"{$this->set[topicList]}\"; //每页显示的主题数量 
\$set[postList] = \"{$this->set[postList]}\"; //主题分页每页显示帖子
\$set[pageLimit] = \"{$this->set[pageLimit]}\"; //页数s

//+---------------------------------------------------------
//注册用户显示
\$set[userList] = \"{$this->set[userList]}\"; //每页显示的主题数量 

//+---------------------------------------------------------
//短信息显示
\$set[msgList] = \"{$this->set[msgList]}\"; //每页显示的主题数量 
\$set[msgMax] = \"{$this->set[msgMax]}\" ; //最大消息数量

//+---------------------------------------------------------
//防止灌水时间设定
\$set[limitReplyTime] = \"{$this->set[limitReplyTime]}\"; //回复限制 秒数
\$set[limitPostTime] = \"{$this->set[limitPostTime]}\"; //发表主题限制 秒数

//+---------------------------------------------------------
//论坛标题截取
\$set[postTopicWidth] = \"{$this->set[postTopicWidth]}\";  //发表文章标题长度
\$set[postCommonWidth] = \"{$this->set[postCommonWidth]}\"; //发表文章内容长度
\$set[showIndexTopicWidth] = \"{$this->set[showIndexTopicWidth]}\"; //首页标题截取
\$set[showForumTopicWidth] = \"{$this->set[showForumTopicWidth]}\"; //文章列表标题截取

//+---------------------------------------------------------
//是否显示联盟论坛
\$set[showLinkForum] = \"{$this->set[showLinkForum]}\"; //Y滚动N不显示
\$set[rollLinkForum] = \"{$this->set[rollLinkForum]}\"; //Y显示N不滚动

//+---------------------------------------------------------
//是否显示版块在线
\$set[refreshLimit] = \"{$this->set[refreshLimit]}\";  //防止恶意刷新
\$set[refreshLimitTime] = \"{$this->set[refreshLimitTime]}\";  //防止恶意刷新时间
\$set[showOnlineTime] = \"{$this->set[showOnlineTime]}\";  //多长时间为在线
\$set[showIndexOnline] = \"{$this->set[showIndexOnline]}\";  //Y显示N不显示（首页）
\$set[showForumOnline] = \"{$this->set[showForumOnline]}\";  //Y显示N不显示（分类）

//+---------------------------------------------------------
//是否允许上传附件
\$set[allowUploadFile] = \"{$this->set[allowUploadFile]}\";  //是否允许上传附件
\$set[uploadFileLimit] = \"{$this->set[uploadFileLimit]}\";  //上传附件最小发帖子数量
\$set[downloadFileLimit] = \"{$this->set[downloadFileLimit]}\";//下载附件最小发帖子数量
\$set[uploadFileType] = \"{$this->set[uploadFileType]}\";  //允许上传文件类型
\$set[uploadFileSize] = \"{$this->set[uploadFileSize]}\";  //允许上传文件大小

//+---------------------------------------------------------
//是否允许上传个人头像
\$set[allowUploadPhoto] = \"{$this->set[allowUploadPhoto]}\";  //是否允许上传头像
\$set[uploadPhotoLimit] = \"{$this->set[uploadPhotoLimit]}\";  //上传投降最小发帖子数量
\$set[uploadPhotoType] = \"{$this->set[uploadPhotoType]}\";  //允许上传图片类型
\$set[uploadPhotoSize] = \"{$this->set[uploadPhotoSize]}\";  //允许上传图片大小
\$set[uploadPhotoHeight] = \"{$this->set[uploadPhotoHeight]}\";  //允许上传图片高
\$set[uploadPhotoWidth] = \"{$this->set[uploadPhotoWidth]}\";  //允许上传图片宽

//+---------------------------------------------------------
//加密版块设置
\$set[forumHide] = \"{$this->set[forumHide]}\"; //Y显示N隐藏

//+---------------------------------------------------------
//联盟论坛设置
\$set[showLinkForum] = \"{$this->set[showLinkForum]}\"; //Y显示N不显示      
\$set[rollLinkForum] = \"{$this->set[rollLinkForum]}\"; //Y显示N不滚动  

//+---------------------------------------------------------
//邮件属性设置
\$set[emailAdmin] = \"{$this->set[emailAdmin]}\"; //管理员的邮件地址   
\$set[emailMode] = \"{$this->set[emailMode]}\"; //选择邮件发送类型（smtp，mail） 

//+---------------------------------------------------------
//邮件属性设置
\$set[smtpHost] = \"{$this->set[smtpHost]}\"; //smtp服务器地址    
\$set[smtpUserName] = \"{$this->set[smtpUserName]}\"; //信箱名称        
\$set[smtpPassWord] = \"{$this->set[smtpPassWord]}\"; //信箱密码       

//==========================================================
//+---------------------------------------------------------
//论坛注册设置
\$set[allowRegister] = \"{$this->set[allowRegister]}\"; //是否允许注册
\$set[registerLimitIp] = \"{$this->set[registerLimitIp]}\"; //是否限制同一ip注册用户
\$set[registerLimitTime] = \"{$this->set[registerLimitTime]}\"; //限制同一ip注册时间
\$set[registerSentPass] = \"{$this->set[registerSentPass]}\"; //是否进行注册认证
\$set[registerEmailSubmit] = \"{$this->set[registerEmailSubmit]}\"; //邮件确认

//+---------------------------------------------------------
//论坛是否关闭
\$set[openLimit] = \"{$this->input[openLimit]}\";  //Y开启N关闭，开启后将对访问进行限制
\$set[openLimitGuest] = \"{$this->input[openLimitGuest]}\";  //Y开启N关闭，开启后将禁止防客访问
\$set[openLimitShow] = \"{$this->input[openLimitShow]}\";  //论坛限制开启理由
\$set[boardClose] = \"{$this->input[boardClose]}\";  //Y关闭N开启
\$set[boardCloseShow] = \"{$this->input[boardCloseShow]}\"; //关闭理由

//+---------------------------------------------------------
//其他选项
\$set[enableZip] = \"{$this->set[enableZip]}\";  //Y是N否，是否使用网页压缩输出
\$set[replaceWhenPost] = \"{$this->set[replaceWhenPost]}\";  //Y是N否，是否在发表时进行脏话过滤
\$set[logRecord] = \"{$this->set[logRecord]}\";  //Y是N否，是否打开论坛日志
\$set[logRecordSize] = \"{$this->set[logRecordSize]}\";  //当论坛日志达到最大时自动清除

//+---------------------------------------------------------

//=============================================================================
?".">";
    $fp=fopen("../include/config.php","w");
    fwrite($fp, $newSystemParameter);
    fclose($fp);

    $this->adminShowMsg("main.php?mod=system&action=closeBoard","您已经成功更新了论坛开关设置");

 } // end func

//5=============================================================================
//显示论坛注册控制界面
function registerMode()
{
    //判断论坛是否允许注册
    $allowRegisterChecked = $this->getChecked($this->set[allowRegister]);

    //判断论坛是否限制同一ip注册
    $registerLimitIpChecked = $this->getChecked($this->set[registerLimitIp]);

    //是否进行注册验证
    $registerSentPassChecked = $this->getChecked($this->set[registerSentPass]);

    //注册验证模式
        if ($this->set[registerEmailSubmit] == "email"){
            $registerEmailSubmitChecked[email] = "checked";
            $registerEmailSubmitChecked[admin] = "";
        }
        if ($this->set[registerEmailSubmit] == "admin"){
            $registerEmailSubmitChecked[email] = "";
            $registerEmailSubmitChecked[admin] = "checked";
        }

    eval("\$this->outPut(\"".$this->getTemplate("systemRegisterMode")."\");");
} // end func

//6============================================================================
//保存论坛注册
function registerModeSave()
{  
    //格式化输入数据
    if (in_array("",$this->input)){
      $this->adminShowWrong("main.php?mod=system&action=registerMode","所有资料为必填选项，请不要留空。");
    }
    $this->input = $this->adminSafeChars($this->input);

    //系统数据正式写入系统
$newSystemParameter="<?php
/*
\* ========================================================
\* 项目: CTB文本论坛
\* 版本: v1.2
\* 团队: 实易数码
\* 小组: CTB文本论坛开发组
\* 作者: windnets,16hot,险情
\* 功能: CTB论坛属性设置
\* ========================================================
\* Copyright (c) 2002 
\* 团队主页: http://www.11cn.org
\* 技术论坛: http://ctb.11cn.org
\* 创建日期: 2002/5/1/
\* 修改日期: ------
\* 修改说明: ------
\* 版权声明: 这个程序是免费软件.
\* ========================================================
*/

//=============================================================================
//设置论坛名称
\$set[ctbTitle] = \"{$this->set[ctbTitle]}\";  //论坛名字

//+---------------------------------------------------------
//数据文件路径
\$set[dataPath] = \"{$this->set[dataPath]}\"; //数据存储路径

//+---------------------------------------------------------
//模板文件路径
\$set[tplMode] = \"{$this->set[tplMode]}\";  //模版路径
\$set[tplRoot] = \"{$this->set[tplRoot]}\";  //模版文件夹

//+---------------------------------------------------------
//ctb所在url
\$set[webPath] = \"{$this->set[webPath]}\";  //ctb的web地址

//+---------------------------------------------------------
//日期格式设定
\$set[dateformat] = \"{$this->set[dateformat]}\"; //发表主题限制 秒数

//+---------------------------------------------------------
//版块文章分页显示
\$set[topicList] = \"{$this->set[topicList]}\"; //每页显示的主题数量 
\$set[postList] = \"{$this->set[postList]}\"; //主题分页每页显示帖子
\$set[pageLimit] = \"{$this->set[pageLimit]}\"; //页数s

//+---------------------------------------------------------
//注册用户显示
\$set[userList] = \"{$this->set[userList]}\"; //每页显示的主题数量 

//+---------------------------------------------------------
//短信息显示
\$set[msgList] = \"{$this->set[msgList]}\"; //每页显示的主题数量 
\$set[msgMax] = \"{$this->set[msgMax]}\" ; //最大消息数量

//+---------------------------------------------------------
//防止灌水时间设定
\$set[limitReplyTime] = \"{$this->set[limitReplyTime]}\"; //回复限制 秒数
\$set[limitPostTime] = \"{$this->set[limitPostTime]}\"; //发表主题限制 秒数

//+---------------------------------------------------------
//论坛标题截取
\$set[postTopicWidth] = \"{$this->set[postTopicWidth]}\";  //发表文章标题长度
\$set[postCommonWidth] = \"{$this->set[postCommonWidth]}\"; //发表文章内容长度
\$set[showIndexTopicWidth] = \"{$this->set[showIndexTopicWidth]}\"; //首页标题截取
\$set[showForumTopicWidth] = \"{$this->set[showForumTopicWidth]}\"; //文章列表标题截取

//+---------------------------------------------------------
//是否显示联盟论坛
\$set[showLinkForum] = \"{$this->set[showLinkForum]}\"; //Y滚动N不显示
\$set[rollLinkForum] = \"{$this->set[rollLinkForum]}\"; //Y显示N不滚动

//+---------------------------------------------------------
//是否显示版块在线
\$set[refreshLimit] = \"{$this->set[refreshLimit]}\";  //防止恶意刷新
\$set[refreshLimitTime] = \"{$this->set[refreshLimitTime]}\";  //防止恶意刷新时间
\$set[showOnlineTime] = \"{$this->set[showOnlineTime]}\";  //多长时间为在线
\$set[showIndexOnline] = \"{$this->set[showIndexOnline]}\";  //Y显示N不显示（首页）
\$set[showForumOnline] = \"{$this->set[showForumOnline]}\";  //Y显示N不显示（分类）

//+---------------------------------------------------------
//是否允许上传附件
\$set[allowUploadFile] = \"{$this->set[allowUploadFile]}\";  //是否允许上传附件
\$set[uploadFileLimit] = \"{$this->set[uploadFileLimit]}\";  //上传附件最小发帖子数量
\$set[downloadFileLimit] = \"{$this->set[downloadFileLimit]}\";//下载附件最小发帖子数量
\$set[uploadFileType] = \"{$this->set[uploadFileType]}\";  //允许上传文件类型
\$set[uploadFileSize] = \"{$this->set[uploadFileSize]}\";  //允许上传文件大小

//+---------------------------------------------------------
//是否允许上传个人头像
\$set[allowUploadPhoto] = \"{$this->set[allowUploadPhoto]}\";  //是否允许上传头像
\$set[uploadPhotoLimit] = \"{$this->set[uploadPhotoLimit]}\";  //上传投降最小发帖子数量
\$set[uploadPhotoType] = \"{$this->set[uploadPhotoType]}\";  //允许上传图片类型
\$set[uploadPhotoSize] = \"{$this->set[uploadPhotoSize]}\";  //允许上传图片大小
\$set[uploadPhotoHeight] = \"{$this->set[uploadPhotoHeight]}\";  //允许上传图片高
\$set[uploadPhotoWidth] = \"{$this->set[uploadPhotoWidth]}\";  //允许上传图片宽

//+---------------------------------------------------------
//加密版块设置
\$set[forumHide] = \"{$this->set[forumHide]}\"; //Y显示N隐藏

//+---------------------------------------------------------
//联盟论坛设置
\$set[showLinkForum] = \"{$this->set[showLinkForum]}\"; //Y显示N不显示      
\$set[rollLinkForum] = \"{$this->set[rollLinkForum]}\"; //Y显示N不滚动  

//+---------------------------------------------------------
//邮件属性设置
\$set[emailAdmin] = \"{$this->set[emailAdmin]}\"; //管理员的邮件地址   
\$set[emailMode] = \"{$this->set[emailMode]}\"; //选择邮件发送类型（smtp，mail） 

//+---------------------------------------------------------
//邮件属性设置
\$set[smtpHost] = \"{$this->set[smtpHost]}\"; //smtp服务器地址    
\$set[smtpUserName] = \"{$this->set[smtpUserName]}\"; //信箱名称        
\$set[smtpPassWord] = \"{$this->set[smtpPassWord]}\"; //信箱密码       

//==========================================================
//+---------------------------------------------------------
//论坛注册设置
\$set[allowRegister] = \"{$this->input[allowRegister]}\"; //是否允许注册
\$set[registerLimitIp] = \"{$this->input[registerLimitIp]}\"; //是否限制同一ip注册用户
\$set[registerLimitTime] = \"{$this->input[registerLimitTime]}\"; //限制同一ip注册时间
\$set[registerSentPass] = \"{$this->input[registerSentPass]}\"; //是否进行注册认证
\$set[registerEmailSubmit] = \"{$this->input[registerEmailSubmit]}\"; //邮件确认

//+---------------------------------------------------------
//论坛是否关闭
\$set[openLimit] = \"{$this->set[openLimit]}\";  //Y开启N关闭，开启后将对访问进行限制
\$set[openLimitGuest] = \"{$this->set[openLimitGuest]}\";  //Y开启N关闭，开启后将禁止防客访问
\$set[openLimitShow] = \"{$this->set[openLimitShow]}\";  //论坛限制开启理由
\$set[boardClose] = \"{$this->set[boardClose]}\";  //Y关闭N开启
\$set[boardCloseShow] = \"{$this->set[boardCloseShow]}\"; //关闭理由

//+---------------------------------------------------------
//其他选项
\$set[enableZip] = \"{$this->set[enableZip]}\";  //Y是N否，是否使用网页压缩输出
\$set[replaceWhenPost] = \"{$this->set[replaceWhenPost]}\";  //Y是N否，是否在发表时进行脏话过滤
\$set[logRecord] = \"{$this->set[logRecord]}\";  //Y是N否，是否打开论坛日志
\$set[logRecordSize] = \"{$this->set[logRecordSize]}\";  //当论坛日志达到最大时自动清除

//+---------------------------------------------------------

//=============================================================================
?".">";
    $fp=fopen("../include/config.php","w");
    fwrite($fp, $newSystemParameter);
    fclose($fp);

    $this->adminShowMsg("main.php?mod=system&action=registerMode","您已经成功更新了论坛注册设置");

 } // end func




//=============================================================================
} //end class
