<?php 
defined('IN_TS') or die('Access Denied.');


switch($ts){
	case "":
		$title = '采集方式';
		include template("collecttype");
		break;
		
	case "do":
	
		$collecttype = $_POST['collecttype'];
		$db->query("update ".dbprefix."system_options set `optionvalue`='$collecttype' where optionname='collecttype'");
		
		
		$arrOptions = $db->fetch_all_assoc("select optionname,optionvalue from ".dbprefix."system_options");
		
		foreach($arrOptions as $item){
				$arrOption[$item['optionname']] = $item['optionvalue'];
		}
		
		fileWrite('system_options.php','data',$arrOption);
		qiMsg("采集方式更换成功！");
		break;
}