<?php
namespace app\admin\controller;

use think\Controller;
use think\Db;
/*
其他通用
*/
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2021 http://mifenlei.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: 梦雨 <50361804@qq.com>
// +----------------------------------------------------------------------
class Com extends Common
{
	//前台导航
    public function link_index()
    {
        return md5Qm();
    }
	//友情链接
    public function link_youqing()
    {
        return md5Qm();
    }
	//添加编辑链接
    public function link_add()
    {
        $c=Db::name('link')->where(array('id' => get('id',0)))->find();
        $this->assign('c',$c);
        return md5Qm();
    }
	//会员
    public function member()
    {
    	$ks = input('ks');
    	$html = Db::name('member')->order('userid desc')->where('phone|username|userid', 'like', '%' . $ks . '%')->paginate(15, false, $config = ['query' => array('ks' => $ks)]);
		$this->assign('html', $html);
        return md5Qm();
    }
	//添加编辑会员
    public function member_add()
    {
		$c=Db::name('member')->where(array('userid' => input('id')))->find();
        $this->assign('c',$c);
        return md5Qm();
    }
	//文件管理
    public function file()
    {
		return md5Qm();
    }
    //验证码
    public function yanzhengma()
    {
		return md5Qm();
    }
    //单页管理
    public function dan()
    {
        return md5Qm();
    }
    //单页添加编辑
    public function dan_add()
    {
        $c=Db::name('dan')->where(array('id' => get('id',0)))->find();
        $this->assign('c',$c);
        return md5Qm();
    }
    // 主题模板
    public function muban()
    {
        return md5Qm();
    }
    // 广告管理
    public function ad()
    {
        return md5Qm();
    }
    // 广告编辑
    public function ads()
    {
        $c=Db::name('ad')->where(array('id' => get('id',0)))->find();
        $this->assign('c',$c);
        return md5Qm();
    }

    // 积分记录
    public function jifen()
    {
        return md5Qm();
    }
    // 实名认证
    public function sm()
    {
        $ks = input('ks');
        $html = Db::name('member')->order('sm_time desc')->where('sm_open > 0')->where('phone|username|userid|sm_name', 'like', '%' . $ks . '%')->paginate(15, false, $config = ['query' => array('ks' => $ks)]);
        $this->assign('html', $html);
        return md5Qm();
    }
    // 模板设置
    public function muban_config()
    {
        return view('template/'.input('id').'/admin.html');
    }
    // 消息记录
    public function xiaoxi()
    {
        return md5Qm();
    }
    // 创建模板
    public function muban_add()
    {
        $this->error(config('web.sq')); 
        return md5Qm();
    }

}
