<?php
$conf_basedir	= "../../";	//相对主目录的位置
$conf_where		= "admin";	//选择调用相应模块
$directory		= basename(dirname(__FILE__));	//定义当前所在的目录，引入模块公用函数
include_once($conf_basedir."base.inc.php");
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"); 
//checkAuth('84');	//判断登录和权限
$referer = $_SERVER['HTTP_REFERER'];
$status = true;
if(!empty($activity)&&isset($type)&&isset($limittype)&&!empty($filepath)&&!empty($brokernumber)){   
    if ($limittype == 1 && $num<=0) {
        $status = false;
    } else {
        $operator = $_SESSION[$web_auth]["username"];
        $payGive = new PaymentRewardUpload();
        $payGive->insertReward($activity, $type, $num, $filepath, $brokernumber,$operator);   
        echo "<script>location.replace('reward_upload_confirm.php');</script>";
    }
   
} else {
    $status = false;
}
if ($status == false) { 
    echo "<script>alert('所填有误，请重新上传');location.replace('".$referer."');</script>";
}
?>