Esempio n. 1
0
    function Order_clean()
    {
        $this->CheckAdminPrivs('rechargeorder','ajax');
		$ckey = 'business.recharge.order.clean.lock';
        fcache($ckey, dfTimer('com.recharge.order.clean')) && exit('no');
        $cleans = logic('recharge')->Clean();
        fcache($ckey, 'DNA.'.md5(time()));
        $rel = $cleans > 0 ? '(系统已经自动清理掉 '.$cleans.' 个过期的充值流水号)' : 'no';
        exit($rel);
    }
Esempio n. 2
0
 private function __GetMsgFlags($flag, $msg, $data)
 {
     $fid = 'notify.msg.'.$flag;
     $flags = fcache($fid, dfTimer('com.notify.mf.cache'));
     if ($flags)
     {
         return $flags;
     }
     preg_match_all('/{([a-z0-9\._]+)}/i', $msg, $matchs);
     $flags = array();
     foreach ($matchs[1] as $key)
     {
         $flags[] = $key;
     }
     fcache($fid, $flags);
     return $flags;
 }
Esempio n. 3
0
	private function ProCountSync()
	{
		$lastUpdate = fcache($this->cacheKEY, dfTimer('com.catalog.procount.sync'));
		if (!$lastUpdate)
		{
			$topClasses = $this->GetList();
			foreach ($topClasses as $i => $topClass)
			{
				$subClasses = $this->GetList($topClass['id']);
				if (!$subClasses) continue;
				foreach ($subClasses as $ii => $subClass)
				{
															$r = dbc(DBCMax)->select('product')->in('COUNT(1) AS procount')->where('category='.$subClass['id'])->limit(1)->done();
										dbc(DBCMax)->update('catalog')->data('procount='.$r['procount'])->where('id='.$subClass['id'])->done();
										$r = dbc(DBCMax)->select('product')->in('COUNT(1) AS oslcount')->where('category='.$subClass['id'].' AND (status='.PRO_STA_Normal.' OR status='.PRO_STA_Success.')')->limit(1)->done();
										dbc(DBCMax)->update('catalog')->data('oslcount='.$r['oslcount'])->where('id='.$subClass['id'])->done();
				}
			}
			fcache($this->cacheKEY, time());
		}
	}
Esempio n. 4
0
	function ETS_iCheck($flag = false)
	{
		$ckey = 'notify.event.tags.lang.upcheck';
		if ($flag)
		{
			fcache($ckey, $flag);
			return $flag;
		}
		$etsCheck = true;
		if (fcache($ckey, dfTimer('com.notify.etl.upcheck')))
		{
			$etsCheck = false;
		}
		return $etsCheck;
	}
Esempio n. 5
0
	private function __field_clear()
	{
		$isCheck = rand(1, 13);
		if ($isCheck != 13) return;
		$ckey = 'logic.me.field.clear';
		$lastClear = fcache($ckey, dfTimer('com.meta.expired.clean'));
		if ($lastClear) return;
				dbc(DBCMax)->delete('metas')->where('life != 0 AND uptime+life < '.time())->done();
				fcache($ckey, 'UPS:'.time());
	}
Esempio n. 6
0
	public function Clear_manual()
	{
		$this->CheckAdminPrivs('zlog','ajax');
		$type = get('type');
		exit((string)zlog()->Clear($type, dfTimer('system.zlog.clear.manual') * 7 ));
	}
Esempio n. 7
0
	private function __clear()
	{
		$flagKey = 'push.logic.clear.flag';
		$timeInv = dfTimer('com.push.queue.clean');
		$flag = fcache($flagKey, $timeInv);
		if (!$flag)
		{
			$timeBefore = time() - $timeInv;
			dbc()->SetTable(table('push_queue'));
			dbc()->Delete('', 'rund="true" AND `update`<'.$timeBefore);
			fcache($flagKey, 'mark');
		}
	}
Esempio n. 8
0
 function lrcmd_nt()
 {
     $lv = get('lv');
     $ckey = 'home.console.lrcmd.nt';
     $last = fcache($ckey, dfTimer('system.lrcmd.check'));
     $last && exit($last);
     $response = request('lrcmd', array('lv'=>$lv), $error);
     $error && exit('false');
     $nt = $response['transfer'] ? $response['recommend'] : 'false';
     exit(fcache($ckey, $nt));
 }