日期:2014-05-17 浏览次数:20468 次
$SetID=$_REQUEST[ID]; //分离价格类型 $temp_day = ""; $temp_ary = $_POST[SetCountID]; for($a=0;$a<count($temp_ary);$a++){ $temp_day = empty($temp_day) ? $temp_ary[$a] : $temp_day.",".$temp_ary[$a]; } if (count($temp_ary)>1){ $temp_day="0,".$temp_day; }else{ $temp_day=$temp_day; } ///分离出发日期 $temp_str = ""; $shyt = $_POST[SetCountID2]; for($i=0;$i<count($shyt);$i++){ $temp_str = empty($temp_str) ? $shyt[$i] : $temp_str.",".$shyt[$i]; } $ClassCot=explode(",",$temp_str); //插入数据 for($i=0;$i<count($ClassCot);$i++){ $SetDayTime=gmdate("Y-m-d",strtotime("+$_REQUEST[SetDay] day",strtotime($ClassCot[$i]))); //echo $SetDayTime; $Insert_Days="insert into setdays(TeamDate,ReturnDate,PlaneNums,TakeNums,P_ID,,YnDisable,Adddate)values('$ClassCot[$i]','$SetDayTime','$_POST[PeopleNums]','0','$SetID','0',now())"; echo $Insert_Days; mysql_query($Insert_Days); }