app/controller/admfor035/main.php

(完整代码) 2KB

<?php

namespace WY\app\controller\admfor035;

use WY\app\libs\Controller;
if (!defined('WY_ROOT')) {
    exit;
}
class main extends CheckAdmin
{
    public function index()
    {
        $tx['tcount'] = $this->model()->select()->from('payments')->where(array('fields' => 'is_state=? and ship_type=? and addtime>=? and addtime<=?', 'values' => array(0, 1, strtotime(date('Y-m-d')), time())))->count();
        $tx['tmoney'] = $this->model()->select(array('money' => 'money'))->from('payments')->where(array('fields' => 'is_state=? and ship_type=? and addtime>=? and addtime<=?', 'values' => array(0, 1, strtotime(date('Y-m-d')), time())))->sum();
        $tx['ycount'] = $this->model()->select()->from('payments')->where(array('fields' => 'is_state=? and ship_type=? and addtime>=? and addtime<=?', 'values' => array(0, 1, strtotime(date('Y-m-d')) - 60 * 60 * 24, strtotime(date('Y-m-d') . ' 23:59:59') - 60 * 60 * 24)))->count();
        $tx['ymoney'] = $this->model()->select(array('money' => 'money'))->from('payments')->where(array('fields' => 'is_state=? and ship_type=? and addtime>=? and addtime<=?', 'values' => array(0, 1, strtotime(date('Y-m-d')) - 60 * 60 * 24, strtotime(date('Y-m-d') . ' 23:59:59') - 60 * 60 * 24)))->sum();
        $user['tcount'] = $this->model()->select()->from('users')->where(array('fields' => 'addtime>=? and addtime<=?', 'values' => array(strtotime(date('Y-m-d')), time())))->count();
        $user['ycount'] = $this->model()->select()->from('users')->where(array('fields' => 'addtime>=? and addtime<=?', 'values' => array(strtotime(date('Y-m-d')) - 60 * 60 * 24, strtotime(date('Y-m-d') . ' 23:59:59') - 60 * 60 * 24)))->count();
        $user['unverify'] = $this->model()->select()->from('users')->where(array('fields' => 'is_state=?', 'values' => array(0)))->count();
        $user['agent'] = $this->model()->select()->from('users')->where(array('fields' => 'is_agent=?', 'values' => array(1)))->count();
        $order['tcount'] = $this->model()->select()->from('orders')->where(array('fields' => 'addtime>=? and addtime<=?', 'values' => array(strtotime(date('Y-m-d')), time())))->count();
        $order['unpaid'] = $this->model()->select()->from('orders')->where(array('fields' => 'is_state=? and addtime>=? and addtime<=?', 'values' => array(0, strtotime(date('Y-m-d')), time())))->count();
        $order['paid'] = $this->model()->select()->from('orders')->where(array('fields' => 'is_state=? and addtime>=? and addtime<=?', 'values' => array(1, strtotime(date('Y-m-d')), time())))->count();
        $order['ycount'] = $this->model()->select()->from('orders')->where(array('fields' => 'addtime>=? and addtime<=?', 'values' => array(strtotime(date('Y-m-d')) - 60 * 60 * 24, strtotime(date('Y-m-d') . ' 23:59:59') - 60 * 60 * 24)))->count();
        $data = array('title' => '管理面板', 'tx' => $tx, 'user' => $user, 'order' => $order);
        $this->put('index.php', $data);
    }
}

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

AI 解读

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

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