= "2016-09-01" ) { header("Location:http://sfx.zhizhuchuxing.com/"); exit(); } //DB $objDbh = new Db; $objDbh->setAccount(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB); $objDisney = new DbDisney($objDbh); if( !isset($_GET["id"])) { header("Location:list_qdh.php?cc=".$_COOKIE["companycode"]);exit(); } $good_id = $_GET["id"]; $good_info=$objDisney->getGoodInfoFromId($_GET["id"]); if( false == $good_info) { header("Location:list_qdh.php?cc=".$_COOKIE["companycode"]);exit(); } $start_end_time = $objDisney->getStartEndTimeArray($good_info["good_type"], $base_org_info["org_id"]); $start_time_array = array(); $end_time_array = array(); foreach( $start_end_time as $start_end_info ) { if( $start_end_info["time_type"] == 1 ) { if( !isset($start_time_array[$start_end_info["weekday"]])) { $start_time_array[$start_end_info["weekday"]] = array(); } $start_time_array[$start_end_info["weekday"]][] = $start_end_info; } else { if( !isset($end_time_array[$start_end_info["weekday"]])) { $end_time_array[$start_end_info["weekday"]] = array(); } $end_time_array[$start_end_info["weekday"]][] = $start_end_info; } } $today_week = date("w"); if( $today_week == 0 ) { $today_week = 7; } $start_time_ary = array(); foreach( $start_time_array[$today_week] as $start_time_info ) { $start_time_ary[] = sprintf( "%d%02d",substr($start_time_info["time_info"],0,2),substr($start_time_info["time_info"],3,2)); } $end_time_ary = array(); foreach( $end_time_array[$today_week] as $end_time_info ) { $end_time_ary[] = sprintf( "%d%02d",substr($end_time_info["time_info"],0,2),substr($end_time_info["time_info"],3,2)); } $start_time_txt = implode(",",$start_time_ary); $end_time_txt = implode(",",$end_time_ary); $start_end_type = "disney"; $current_time = date("Y-m-d H:i:s"); ?>