예제 #1
0
     if (!empty($_FILES['Filedata' . $num]['name'])) {
         $arrTemp = array();
         $arrTemp['photo'] = $objWebInit->uploadInfoImage($_FILES['Filedata' . $num], $num, $objWebInit->arrGPic['FileListPicSize'], $objWebInit->arrGPic['FileSourPicSize']);
         $arrTemp['photo_narrate'] = $_POST['photo_narrate' . $num];
         $_POST['photo'][$num] = $arrTemp;
     }
 }
 //新视频上传
 foreach ($_FILES as $key => $val) {
     if (strrpos($key, 'vFiledata') === false) {
         continue;
     }
     $num = substr($key, strlen('vFiledata'));
     if (!empty($_FILES['vFiledata' . $num]['name'])) {
         $arrTemp = array();
         $arrTemp['video'] = $objWebInit->uploadInfoFile($_FILES['vFiledata' . $num], $num, 0, array('.flv'));
         $arrTemp['video_narrate'] = $_POST['video_narrate' . $num];
         $arrTemp['video_title'] = $_POST['video_title' . $num];
         $arrTemp['video_time'] = $_POST['video_time' . $num];
         $_POST['video'][$num] = $arrTemp;
     }
 }
 //新视频图片上传
 sleep(1);
 foreach ($_FILES as $key => $val) {
     if (strrpos($key, 'pFiledata') === false) {
         continue;
     }
     $num = substr($key, strlen('pFiledata'));
     if (!empty($_FILES['pFiledata' . $num]['name'])) {
         $_POST['video'][$num]['videopic'] = $objWebInit->uploadInfoImage($_FILES['pFiledata' . $num], $num, 0, $objWebInit->arrGPic['FileSourPicSize']);
예제 #2
0
     if (strrpos($key, 'vFiledata') === false) {
         continue;
     }
     $num = substr($key, strlen('vFiledata'));
     if (!empty($_FILES['vFiledata' . $num]['name'])) {
         if (!empty($_POST['savevideo'][$num])) {
             $strOldFile = $arrGPic['FileSavePath'] . 'f/' . $_POST['savevideo'][$num];
         } else {
             $strOldFile = '';
         }
         if (is_file($strOldFile)) {
             // 视频文件删除
             unlink($strOldFile);
         }
         $arrTemp = array();
         $arrTemp['video'] = $objWebInit->uploadInfoFile($_FILES['vFiledata' . $num], $num, $_POST['id'], array('.flv'));
         if (!empty($_POST['video_narrate' . $num])) {
             $arrTemp['video_narrate'] = $_POST['video_narrate' . $num];
         }
         if (!empty($_POST['video_title' . $num])) {
             $arrTemp['video_title'] = $_POST['video_title' . $num];
         }
         if (!empty($_POST['video_time' . $num])) {
             $arrTemp['video_time'] = $_POST['video_time' . $num];
         }
         $_POST['video'][$num] = $arrTemp;
     }
 }
 //替换旧视频图片和新视频图片上传
 sleep(1);
 foreach ($_FILES as $key => $val) {