예제 #1
0
        $_POST['thumbnail'] = $_POST['photo'][0]['photo'];
    } else {
        $_POST['thumbnail'] = $_POST['photo'];
    }
    $_POST['photo'] = array_values($_POST['photo']);
    $_POST['video'] = array_values($_POST['video']);
    #自动拆字生成tag
    if (empty($_POST['tag'])) {
        $objSP = new SplitWord();
        $_POST['tag'] = $objSP->SplitRMM($_POST['title'], false);
    }
    //print_r($_POST);//exit;
    $_POST = array_merge($arrInfo, $_POST);
    $objWebInit->saveInfo($_POST, 1);
    $objWebInit->updateCache($_POST['id'], $_POST['type_id'], $arrMOutput);
    check::WindowLocation('index.php', 'page=' . $_GET['page']);
}
if (!is_array($arrMType) || empty($arrMType)) {
    $arrMType = $objWebInit->getTypeList();
    $arrMType = $objWebInit->formatTypeList(0, $arrMType);
}
// 输出到模板
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['FileCallPath'] = $objWebInit->arrGPic['FileCallPath'];
$arrMOutput["smarty_assign"]['FileListPicSize'] = $objWebInit->arrGPic['FileListPicSize'];
$arrMOutput["smarty_assign"]['arrData'] = $arrInfo;
$arrMOutput["smarty_assign"]['arrMType'] = $arrMType;
$arrMOutput["smarty_assign"]['action_type'] = "save";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'submit.htm';
$objWebInit->output($arrMOutput);