Exemple #1
0
        $_POST['type_roue_id'] = ':' . $_POST['type_id'] . ':';
    }
    if ($_POST['summary'] == '') {
        $_POST['summary'] = check::csubstr(trim(str_replace(" ", " ", str_replace("\r\n", "", strip_tags($_POST['intro'])))), 0, $arrGWeb['db_summary_len']);
    }
    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']);
    //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', $_SERVER["QUERY_STRING"]);
}
if (!is_array($arrMType) || empty($arrMType)) {
    $arrMType = $objWebInit->getTypeList();
    $arrMType = $objWebInit->formatTypeList(0, $arrMType);
}
//print_r($arrMYear);
// 输出到模板
$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"]['arrTypeB'] = $arrMTypeB;
$arrMOutput["smarty_assign"]['action_type'] = "save";
Exemple #2
0
    }
    if (strpos($_POST['type_id'], '|') !== false) {
        $arrTemp = explode('|', $_POST['type_id']);
        $_POST['type_id'] = $arrTemp[0];
        $_POST['type_roue_id'] = $arrTemp[1];
    } else {
        $_POST['type_roue_id'] = ':' . $_POST['type_id'] . ':';
    }
    if ($_POST['summary'] == '') {
        $_POST['summary'] = check::csubstr(trim(str_replace(" ", " ", str_replace("\r\n", "", strip_tags($_POST['intro'])))), 0, $arrGWeb['db_summary_len']);
    }
    if (is_array($_POST['photo'])) {
        $_POST['thumbnail'] = $_POST['photo'][0]['photo'];
    } else {
        $_POST['thumbnail'] = $_POST['photo'];
    }
    $objWebInit->saveInfo($_POST, 0);
    //更新smarty缓存文件或纯静态文件
    $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"]['arrTypeB'] = $arrMTypeB;
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'submit.htm';
$objWebInit->output($arrMOutput);