Пример #1
0
         }
         if (is_file($strOldFile)) {
             // 缩略图删除
             unlink($strOldFile);
         }
         if (!empty($_POST['savephoto'][$num])) {
             $strOldFile = $arrGPic['FileSavePath'] . 'b/' . $_POST['savephoto'][$num];
         } else {
             $strOldFile = '';
         }
         if (is_file($strOldFile)) {
             // 原文件删除
             unlink($strOldFile);
         }
         $arrTemp = array();
         $arrTemp['photo'] = $objWebInit->uploadInfoImage($_FILES['Filedata' . $num], $num, $objWebInit->arrGPic['FileListPicSize'], $objWebInit->arrGPic['FileSourPicSize'], $_POST['id']);
         if (!empty($_POST['photo_narrate' . $num])) {
             $arrTemp['photo_narrate'] = $_POST['photo_narrate' . $num];
         }
         $_POST['photo'][$num] = $arrTemp;
     }
 }
 //还原视频数组
 $_POST['video'] = array();
 if (!empty($_POST['savevideo'])) {
     foreach ($_POST['savevideo'] as $key => $val) {
         $_POST['video'][$key] = array('video' => $val, 'videopic' => $_POST['savevideopic'][$key], 'video_narrate' => $_POST['video_narrate' . $key], 'video_title' => $_POST['video_title' . $key], 'video_time' => $_POST['video_time' . $key]);
     }
 }
 //删除旧视频
 if (!empty($_POST['delvideo'])) {