コード例 #1
0
ファイル: modifyinfo.php プロジェクト: TiMoChao/lc_ad_first
    }
    if (is_array($_POST['photo'])) {
        $_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);
    }
    $_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);
コード例 #2
0
ファイル: addinfo.php プロジェクト: TiMoChao/lc_ad_first
    }
    if ($_POST['summary'] == '') {
        $_POST['summary'] = check::csubstr(trim(str_replace(" ", " ", str_replace("\r\n", "", strip_tags($_POST['intro'])))), 0, $arrGWeb['db_summary_len']);
    }
    if ($_POST['title'] != '') {
        $_POST['title_md5'] = md5($_POST['title']);
    }
    if (is_array($_POST['photo'])) {
        $_POST['thumbnail'] = $_POST['photo'][0]['photo'];
    } else {
        $_POST['thumbnail'] = $_POST['photo'];
    }
    //自动拆字生成tag
    if (empty($_POST['tag'])) {
        $objSP = new SplitWord();
        $_POST['tag'] = $objSP->SplitRMM($_POST['title'], false);
    }
    $objWebInit->saveInfo($_POST, 0);
    $objWebInit->updateCache($objWebInit->lastInsertIdG(), $_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"]['arrMType'] = $arrMType;
$arrMOutput["smarty_assign"]['FileListPicSize'] = $objWebInit->arrGPic['FileListPicSize'];
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'submit.htm';
$objWebInit->output($arrMOutput);