<?php
namespace app\admin\controller;


class Adset extends Base
	{
		public function adsetup()
		{
			if (Request()->isPost()) {
				$config = input();
				$config_new["oskad"] = $config["oskad"];
				$config_old = config("oskad");
				$config_new = array_merge($config_old, $config_new);
				$res = mac_arr2file(APP_PATH . "extra/oskad.php", $config_new);
				if ($res === false) {
					return $this->error("保存失败，请重试!");
				}
				return $this->success("保存成功!");
			}
			$this->assign("config", config("oskad"));
			return $this->fetch("admin@system/oskcms");
		}
	}
