<?php
// 每个文件上传成功后，均会执行该程序，这里将所有上传的文件名写入到文件 upstat.txt 中
// 统计文件上传的结果：上传时间、参考网页、上传文件
require_once("../../include/label.php");
if(isset($_COOKIE["s_id"])){
	$S_UID=$_COOKIE["s_id"];
}
else{
	$S_UID="";
}
if(isset($_COOKIE["s_name"])){
	$S_Name=$_COOKIE["s_name"];
}
else{
	$S_Name="";
}
$sql= "select s_id from s_users where S_Name='".$S_Name."' and S_id=$S_UID";
$s_id= $db->Getone($sql);
if(!$s_id){
exit('非法操作！');
}
$filename = "upstat.txt";
$file_tag = trim($_GET['tag']);
if ($file_tag != "") {
	$handle = fopen($filename,"a");
	fputs($handle,date("Y-m-d G:i:s\t"));
	fputs($handle,$_SERVER['HTTP_REFERER']);
	fputs($handle,"\t$file_tag\r\n");
	fclose($handle);
}
?>