app/controller/admfor035/cog.php

(完整代码) 966B

<?php
namespace WY\app\controller\admfor035;

use WY\app\libs\Controller;
if (!defined('WY_ROOT')) {
    exit;
}
class cog extends CheckAdmin
{
    public function index()
    {
        $data = array('title' => '系统设置');
        $this->put('cog.php', $data);
    }
    public function save()
    {
        $data = array();
        if (isset($_POST)) {
            foreach ($_POST as $key => $val) {
                $data[$key] = $this->req->post($key);
            }
        }
        if ($data) {
            $newdata = array('content' => json_encode($data));
            $this->model()->from('navcog')->delete();
            if ($this->model()->from('navcog')->insertData($newdata)->insert()) {
                echo json_encode(array('status' => 1, 'msg' => '设置保存成功', 'url' => $this->dir . 'cog'));
                exit;
            }
        }
        echo json_encode(array('status' => 0, 'msg' => '设置保存失败'));
        exit;
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。