<?php

	@set_time_limit(0);
	@ignore_user_abort(true);

	require_once '../siteinfo.php';

	if (@$_GET['job'] != $websitejob){
		die ('Parameter error!');
	}

	$localhost = mysql_connect ($sqlhost,$sqluser,$sqlpass)or die ('无法连接数据库，请联系网站管理员！');
	mysql_select_db ($sqldata,$localhost);

	$row = mysql_fetch_array (mysql_query ("SELECT * FROM `storage` WHERE `type`='jobday'"));
	if ($row['value'] != date('Y-m-d')){

		require '../Source/class/dayjob.class.php';
		$AnYue_DayJob = new AnYue_DayJob;
		$AnYue_DayJob -> delete_peie();


		mysql_query ("UPDATE `storage` SET `value`='".date('Y-m-d')."' WHERE `type`='jobday'");
		echo '今日任务执行完毕!';

	}else{

		echo '今日已执行任务!';

	}

