<?php
namespace Admin\Controller;
use Think\Controller;
class SystemController extends Controller {
    public function index(){
        $re=M('ms_tools_system')->where("id=1")->find();
        $this->assign('re',$re);
        $this->display();
    }
    public function kfup(){
        $data['qq']=$_POST['qq'];
        $data['weibo']=$_POST['weibo'];

        $re=M('ms_tools_system')->where("id=1")->save($data);
        if (!empty($re)) {
            $this->success('修改成功');
        }else{
            $this->error('修改失败');
        }
    }
    public function logoup(){
        $t=$_POST['tt'];
        $array = explode(",",$t); 
        $data['t1']=$array[0];
        $data['t2']=$array[1];
        $data['t3']=$array[2];
        $data['t4']=$array[3];
        $data['t5']=$array[4];
        $data['t6']=$array[5];
        $data['logo']=$_POST['logo'];
        $re=M('ms_tools_system')->where("id=1")->save($data);
        if (!empty($re)) {
            $this->success('修改成功');
        }else{
            $this->error('修改失败');
        }
    }
    public function jbup(){
        $data['url']=$_POST['url'];
        $data['title']=$_POST['title'];
        $data['ftitle']=$_POST['ft'];
        $data['beian']=$_POST['beian'];
        $data['footer']=$_POST['footer'];
        $data['keyword']=$_POST['kw'];
        $data['descc']=$_POST['descc'];
        $re=M('ms_tools_system')->where("id=1")->save($data);
        if (!empty($re)) {
            $this->success('修改成功');
        }else{
            $this->error('修改失败');
        }
    }
}