<?php
$conf_basedir	= "../../";	//相对主目录的位置
$conf_where		= "admin";	//选择调用相应模块
$directory		= basename(dirname(__FILE__));	//定义当前所在的目录，引入模块公用函数
include_once($conf_basedir."base.inc.php");
checkAuth('84');	//判断登录和权限
include_once(CORE_LIB . "/PHPExcel/Classes/PHPExcel.php"); 
include_once(CORE_LIB . "/PHPExcel/Classes/PHPExcel/IOFactory.php"); 
include_once(CORE_LIB . "/PHPExcel/Classes/PHPExcel/Reader/Excel5.php"); 
include_once(CORE_LIB . "/PHPExcel/Classes/PHPExcel.php"); 
include_once(CORE_LIB . "/growth/GrowthRewardUpload.php"); 


$referer = $_SERVER['HTTP_REFERER'];

if(!empty($activity)&&isset($type)&&isset($score)&&!empty($filepath)&&!empty($brokernumber)&&$score>0){    
   $operator = $_SESSION[$web_auth]["username"];
   $growthGive = new GrowthRewardUpload();
   $growthGive->insertReward($activity, $type, $score, $filepath, $brokernumber,$operator);   
 
   echo "<script>location.replace('reward_upload_confirm.php');</script>";
    
}else{
    	echo "<script>alert('所填有误，请重新上传');location.replace('".$referer."');</script>";
}








?>