Exemple #1
0
    $cParameter = "action=news";
    $nNums = $GETSQL->fNumrows("SELECT about_id FROM `{$ODBC['tablepre']}about`");
    $sql_about = $GETSQL->fSql("*", "`{$ODBC['tablepre']}about`", "", "ORDER BY `about_id`", $nPage * $nCount, $nCount);
    $fpageup = fPagesadmin($nNums, $nPage, $nCount, $cParameter, "showtable", 1);
    $smarty->assign('sql_about', $sql_about);
    $smarty->assign('fpageup', $fpageup);
    $smarty->display("about.htm");
}
if ($option == 'newsedit') {
    if ($type == 'edit') {
        die("<iframe name='releasediframe' width='700' height='600' frameborder=0 marginheight=0 marginwidth=0 scrolling=auto src='admin.php?action=about&option=newsedit&id={$id}'>您的浏览器不支持iframe</iframe>");
    }
    if ($_GET['update'] == 'img' && $_FILES['fileContent']['name'] != '') {
        include_once GetLang('image');
        include_once Getincludefun("image");
        $img = fUploadimg_process($_FILES['fileContent'], "{$config['attach']}/system/");
        if ($IMG_upment['watermark'] == '1') {
            ImgWaterMark("{$config['attach']}/system/{$img}", $IMG_upment['waterpos'], $IMG_upment['waterimg'], $IMG_upment['watertext'], $IMG_upment['waterfont'], $IMG_upment['watercolor'], $IMG_upment['waterpct']);
        }
        $cQuery = array("`img_picid`", "`img_picsrc`", "`img_picsize`", "`img_uid`");
        $cData = array($nowtime . $_POST['fileKey'], $img, $_FILES['fileContent']['size'], $uid);
        $GETSQL->fInsert("`{$ODBC['tablepre']}images`", $cQuery, $cData);
        header("Location: update.php?action=img&fileKey={$_POST['fileKey']}&img={$img}");
        exit;
    }
    if ($_POST['blog_title'] != '' && $_POST['blog_body'] != '') {
        if ($_POST['bid'] != '') {
            $GETSQL->fUpdate("`{$ODBC['tablepre']}about`", "`about_subject`='{$_POST['blog_title']}',\n\t\t\t`about_content`='{$_POST['blog_body']}'", "`about_id`='{$_POST['bid']}'");
            header("Location: update.php?action=add&title=" . urlencode("{$_POST['blog_title']}修改成功") . "&a={$action}&p={$option}&id={$_POST['bid']}&u=admin");
        } else {
            $cQuery = array("`about_id`", "`about_subject`", "`about_content`");
Exemple #2
0
             $ncontent = str_replace("\\", "\\\\", $sql_hotelthread['attr_content']);
             $ncontent = str_replace("\n", "\\n", $ncontent);
             $ncontent = str_replace("\r", "\\r", $ncontent);
             $ncontent = str_replace("\"", "\\\"", $ncontent);
             $smarty->assign('ncontent', $ncontent);
             $smarty->assign('sql_hotelthread', $sql_hotelthread);
         }
         $smarty->assign('sql_hotel', $sql_hotel);
         $smarty->display("travelattredit.htm");
     }
 }
 if ($option == 'travelphoto') {
     $sql_hotel = $GETSQL->fSql("sc_id,sc_uid,sc_info,sc_traffic", "`{$ODBC['tablepre']}travel`", "`sc_id`='{$id}'", "", "", "", "U_B");
     if ($sql_hotel['sc_id'] != '' and $uid == $sql_hotel['sc_uid'] || in_array('travel', $authority) || $sql_pop['group_authority'] == 'all') {
         if ($_FILES['uploadphoto']['name'] != "" && $_POST['uploadsubject'] != '') {
             $img = "{$config['attach']}/travel/" . fUploadimg_process($_FILES['uploadphoto'], "{$config['attach']}/travel/", "simll/");
             ImgWaterMark($img, $IMG_upment['waterpos'], $IMG_upment['waterimg'], $IMG_upment['watertext'], $IMG_upment['waterfont'], $IMG_upment['watercolor'], $IMG_upment['waterpct']);
             $cQuery = array("`hi_id`", "`hi_hid`", "`hi_src`", "`hi_subject`", "`hi_date`");
             $cData = array($nowtime, $sql_hotel['sc_id'], $img, $_POST['uploadsubject'], fgetdate());
             $GETSQL->fInsert("`{$ODBC['tablepre']}travelimage`", $cQuery, $cData);
             $cQuery = array("`img_picid`", "`img_did`", "`img_picsrc`", "`img_picsize`", "`img_uid`");
             $cData = array($nowtime, $nowtime, $img, $_FILES['uploadphoto']['size'], $uid);
             $GETSQL->fInsert("`{$ODBC['tablepre']}images`", $cQuery, $cData);
             $GETSQL->fUpdate("`{$ODBC['tablepre']}travel`", "`sc_album`=`sc_album`+1", "`sc_id`='{$id}'");
             if ($actionhtml = GetCache('travel')) {
                 include_once $actionhtml;
                 if ($cache_config['cache'] == '1') {
                     P_unlink(R_P . "html/travel/travelphoto_I_{$id}.htm");
                     ffile("{$boardurl}index.php?action=travel&option=travelphoto&id={$id}", '', "r");
                 }
             }