Esempio n. 1
0
    check::AlertExit('对不起,您没有权限访问此页', -1);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) {
        check::AlertExit("错误:有必填选项没填!", -1);
    }
    //新图上传
    set_time_limit(0);
    foreach ($_FILES as $key => $val) {
        if (strrpos($key, 'Filedata') === false) {
            continue;
        }
        $num = substr($key, strlen('Filedata'));
        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];