Example #1
0
    }
    if ($_FILES['UploadFile']['name'] != "") {
        $_POST['UploadFile'] = $objWebInit->uploadInfoImage($_FILES['UploadFile']);
    }
    //取得图片链接的文件类型
    if (!empty($_POST['UploadFile'])) {
        $Uploadfile = $_POST['UploadFile'];
        $_POST['FileExt'] = strrchr($Uploadfile, ".");
    } else {
        if (!empty($_POST['weblogo'])) {
            $_POST['FileExt'] = strrchr($_POST['weblogo'], ".");
        }
    }
    //清除不要的字段
    unset($_POST['savefilename']);
    $objWebInit->saveInfo($_POST, 0);
    if (!empty($_POST['position'])) {
        $position = $_POST['position'];
        if ($position > 0) {
            $strWhere = "  where pass=1 and deadline_date > now() and position=" . $position;
            $arrData = $objWebInit->getInfoList($strWhere, ' ORDER BY submit_date DESC');
            $objWebInit->creatJS($arrData, $position);
        }
    }
    echo "<script>" . check::WindowLocation('index.php', 'page=' . $_GET['page']) . "</script>";
    exit;
}
// 输出到模板
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['arrPosition'] = $arrMType;
$arrMOutput["smarty_assign"]['FileCallPath'] = $arrGPic['FileCallPath'];