webmain/model/agent/todoModel.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
/**
*	消息提醒的应用
*/
class agent_todoClassModel extends agentModel
{
	public function initModel()
	{
		$this->settable('todo');
	}
	
	public function gettotal()
	{
		$stotal	= $this->getdbtotal($this->adminid);
		$titles	= '';
		return array('stotal'=>$stotal,'titles'=> $titles);
	}
	
	private function getdbtotal($uid)
	{
		$optdt 	= $this->rock->now;
		$stotal	= $this->rows("uid='$uid' and `status`=0 and `tododt`<='$optdt'");
		return $stotal;
	}
	
	protected function agenttotals($uid)
	{
		return array(
			'wdtodo' => $this->getdbtotal($uid)
		);
	}
	
	//数据读取应用
	protected function agentdata($uid, $lx)
	{
		$where = '';
		if($lx=='wdtodo')$where='and `status`=0';
		if($lx=='allydu'){
			$this->update("`status`=1", "uid='$uid' and `status`=0");
		}
		$key = $this->rock->post('key');
		if(!isempt($key))$where.=" and (`title`='$key' or `mess` like '%$key%')"; //关键词搜索
		
		$arr = $this->getlimit("uid='$uid' $where", $this->page,'*', 'id desc', $this->limit);
		$rows = $arr['rows'];
		$darr = array();
		foreach($rows as $k=>$rs){
			$statustext = '已读';
			$statuscolor = '#aaaaaa';
			if($rs['status']=='0'){
				$statustext = '未读';
				$statuscolor = 'red';
			}
			
			$cont   = $rs['mess'];
			
			$xiangurl   = '';
			if(!isempt($rs['modenum']) && !isempt($rs['mid']) && $rs['mid']>'0'){
				$xiangurl = 'task.php?a=x&num='.$rs['modenum'].'&mid='.$rs['mid'].'';
			}
后面还有 16 行代码,购买后查看完整代码

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

AI 解读 AI

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

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