<?php
/*
|--------------------------------------------------------------------------
| log.php 后台操作日志
|--------------------------------------------------------------------------
*/
namespace DeverApp\Manage\Filter;

use Dever;

class Manage
{
	static public function cron($config, $content, $project, $table, $id, $ids)
	{
		$data = Dever::load('manage/filter-all');
		if($data)
		{
			foreach($data as $k => $v)
			{
				/*
				if(strpos($v['name'], ','))
				{
					$temp = explode(',', $v['name']);
				}
				*/
				if(strpos($content, $v['name']) !== false)
				{
					self::delete($project, $table, $id);

					Dever::load('manage/filter-up', array('where_id' => $v['id']));
				}
			}
		}
	}

	static public function delete($project, $table, $id)
	{
		Dever::load($project . '/' . $table . '-update', array('where_id' => $id, 'set_state' => 2));
	}
}