webmain/model/flow/carmsModel.php

(开头部分) 2KB

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

<?php
//车辆信息登记
class flow_carmsClassModel extends flowModel
{
	
	
	public function flowrsreplace($rs)
	{
		$ztname	= '';
		if(!isempt($rs['enddt'])){
			$jg = c('date')->datediff('d', $this->rock->date, $rs['enddt']);
			if($jg<0){
				$ztname='<font color="#888888">已到期</font>';
				$rs['ishui'] = 1;
			}
			if($jg==0)$ztname='<font color="blue">今日到期</font>';
			if($jg>0 && $jg<30)$ztname='<font color="#ff6600">'.$jg.'天后到期</font>';
			if($jg>=30)$ztname='<font color="green">生效中</font>';
		}
		if(isset($rs['carnum'])){
			$ors 	= $rs;
		}else{
			$ors 	= m('carm')->getone($rs['carid']);
		}
		if($ors)$rs['carid'] = ''.$ors['carbrand'].','.$ors['carmode'].'('.$ors['carnum'].')';
		$rs['ztname']	= $ztname;

		return $rs;
	}

	public function flowbillwhere($uid, $lx)
	{
		$where = '';
		$carid = (int)$this->rock->get('carid',0);
		if($carid>0)$where='and a.`carid`='.$carid.'';
		
		return array(
			'table' 		=> '`[Q]'.$this->mtable.'` a left join `[Q]carm` b on a.`carid`=b.id',
			'fields'		=> 'a.*,b.carnum,b.carbrand,b.carmode,cartype',
			'orlikefields'	=> 'b.carnum,b.carbrand,b.carmode,b.`cartype`,a.`otype`@1',
			'asqom'			=> 'a.',
			'where'			=> $where,
		);
	}
	
	//每天信息提醒
	public function todocarms($toid)
	{
		if(isempt($toid))return '没设置提醒人员';
		$dt 	= $this->rock->date;
		$dt30	= c('date')->adddate($dt,'d', 30);
		$rows 	= $this->db->getall('select a.`enddt`,a.`otype`,b.`carnum` from `[Q]carms` a left join `[Q]carm` b on a.carid=b.id where b.id is not null and a.`enddt` is not null and  a.`enddt`>=\''.$dt.'\'');
		$txlist = m('option')->getval('cartodo','0,3,7,15,30');
		$txarr 	= explode(',', $txlist);
		$dtobj 	= c('date');
		$cars	= array();
		$str 	= '';
		foreach($rows as $k=>$rs){
			$jg = $dtobj->datediff('d', $dt, $rs['enddt']);
			if(in_array($jg, $txarr)){
后面还有 25 行代码,购买后查看完整代码

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

AI 解读 AI

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

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