コード例 #1
0
ファイル: sqladmin.php プロジェクト: holin/sstour
                if ($table == '') {
                    break;
                }
            }
        }
        $tabletxt = "<?php\n\$tablename = array('" . implode("','", $tablename) . "');\n";
        $tabletxt .= "\$table = \"{$table}\";\n";
        $tabletxt .= "\$start = \"{$start}\";\n";
        $tabletxt .= "\$sizelimit = \"{$sizelimit}\";\n";
        $tabletxt .= "\$np = \"{$np}\";\n";
        $tabletxt .= "\$fHtmlcode = \"{$fHtmlcode}\";\n";
        $tabletxt .= "?>";
        ffile("data/backup.php", $tabletxt, "w");
        if ($bakupdata != '') {
            $url = "admin.php?action={$action}&option={$option}";
            ffile("data/sql_" . date("Ymd") . "_" . $fHtmlcode . "_{$np}.sql", $bak . $bakupdata, "w");
            echo "<meta http-equiv='refresh' content='2;url={$boardurl}{$url}'>";
            //echo "<script type='text/javascript' language='javascript'>parent.sqlFrame.location.reload();</script>";
            die("{$successtext}<BR>");
            //$url = "<meta http-equiv='refresh' content='1;url=admin.php?action={$action}&option={$option}&update=sqlback&tables={$tables}&start={$num[0]}&sizelimit={$sizelimit}&np={$np}&fHtmlcode={$fHtmlcode}'>";
            //$textmesg =  "<a href='admin.php?action={$action}&option={$option}&update=sqlbacktables={$tables}&start={$num[0]}&sizelimit={$sizelimit}&np={$np}&fHtmlcode={$fHtmlcode}'>下一页</a>";
        } else {
            P_unlink("data/backup.php");
            die('数据备份完成<BR>');
        }
    }
}
if ($option == 'sqlbck') {
    if ($type == 'del') {
        P_unlink(R_P . "data/{$id}");
        die(gb2utf8("删除备份文件成功"));
コード例 #2
0
ファイル: member.php プロジェクト: holin/sstour
            $_POST['blog_tags'] = implode(",", $gametag);
            $sql_gametag = $GETSQL->fSql("tag_id,tag_subject", "`{$ODBC['tablepre']}travelyoutag`", "`tag_subject` IN ({$gametags})");
            foreach ($sql_gametag as $value) {
                foreach ($gametag as $key => $ver) {
                    if ($ver == $value['tag_subject']) {
                        unset($gametag[$key]);
                    }
                }
            }
            $GETSQL->fUpdate("`{$ODBC['tablepre']}travelyoutag`", "`tag_num`=`tag_num`+1", "`tag_subject` IN ({$gametags})");
            foreach ($gametag as $value) {
                $cQuery = array("`tag_subject`");
                $cData = array($value);
                $GETSQL->fInsert("`{$ODBC['tablepre']}travelyoutag`", $cQuery, $cData);
            }
        }
        $cQuery = array("`thr_id`", "`thr_hid`", "`thr_subject`", "`thr_tages`", "`thr_content`", "`thr_date`");
        $cData = array($nowtime, $id, $_POST['blog_title'], $_POST['blog_tags'], $_POST['blog_body'], fgetdate());
        $GETSQL->fInsert("`{$ODBC['tablepre']}travelyou`", $cQuery, $cData);
        if ($actionhtml = GetCache('travel')) {
            include_once $actionhtml;
            if ($cache_config['cache'] == '1') {
                P_unlink(R_P . "html/travel/travelyou_I_{$id}.htm");
                ffile("{$boardurl}index.php?action=travel&option=travelyou&id={$id}", '', "r");
            }
        }
        header("Location: update.php?action=add&title=" . urlencode("发表成功") . "&a=travel&p=travelyouthread&id={$id}&in={$nowtime}");
        exit;
    }
    $smarty->display("travelyouedit.htm");
}
コード例 #3
0
ファイル: classification.php プロジェクト: holin/sstour
        fgetposttoupdatd($_POST, $ODBC['charset']);
        if ($_POST['addsubject'] != '') {
            $cQuery = array("`type_subject`", "`type_live`", "`type_sp`");
            $cData = array($_POST['addsubject'], $_POST['addlive'], $_POST['addsp']);
            $GETSQL->fInsert("`{$ODBC['tablepre']}class`", $cQuery, $cData);
        }
        if (is_array($_POST['type_id'])) {
            foreach ($_POST['type_id'] as $v) {
                $GETSQL->fUpdate("`{$ODBC['tablepre']}class`", "`type_subject`='{$_POST['type_subject'][$v]}',`type_live`='{$_POST['type_live'][$v]}',`type_sp`='{$_POST['type_sp'][$v]}'", "`type_id`='{$v}' AND `type_id`!='{$_POST['type_live'][$v]}'");
            }
        }
        $sql_class = $GETSQL->fSql("*", "`{$ODBC['tablepre']}class`", "", "ORDER BY `type_sp`,`type_id` DESC");
        foreach ($sql_class as $vale) {
            $configtxt .= "classtf[{$vale['type_id']}]='{$vale['type_live']}';classvf[{$vale['type_id']}]='{$vale['type_subject']}';\n";
        }
        ffile(R_P . "lang/class.js", $configtxt);
        die(gb2utf8("后台组件操作完成"));
    }
    $sql_about = $GETSQL->fSql("*", "`{$ODBC['tablepre']}class`", "", "ORDER BY `type_sp`,`type_id` DESC");
    $soptions = "<option value='0'>系统根组</option>" . flist_option($sql_about);
    $smarty->assign('showtext', flist_top($sql_about, '0', $soptions));
    $smarty->assign('sql_about', $sql_about);
    $smarty->assign('soptions', $soptions);
    $smarty->display("classification.htm");
}
if ($option == 'del') {
    $sql_class = $GETSQL->fSql("*", "`{$ODBC['tablepre']}class`", "`type_live`='{$id}'", "", "", "", "U_B");
    if ($sql_class['type_id'] > 0) {
        die(gb2utf8("请先删除分类下的子类"));
    } else {
        $GETSQL->fDelete("`{$ODBC['tablepre']}class`", "`type_id`='{$id}'", "1");
コード例 #4
0
ファイル: hack.php プロジェクト: holin/sstour
        $sql_config = $GETSQL->fSql("*", "`{$ODBC['tablepre']}hack`", "", "");
        foreach ($sql_config as $value) {
            $configtxt = "<?php\n\$cache_config['subject'] = \"{$value['hack_subject']}\";\n\$cache_config['cache'] = \"{$value['hack_cache']}\";\n\$cache_config['cachetime'] = \"{$value['hack_cachetime']}\";\n\$cache_config['htmlteml'] = \"{$value['hack_htmlteml']}\";\n\$cache_config['numser'] = \"{$value['hack_numser']}\";\n\$cache_config['hack_adhead'] = stripslashes(\"" . addslashes($value['hack_adhead']) . "\");\n\$cache_config['hack_adbody'] = stripslashes(\"" . addslashes($value['hack_adbody']) . "\");\n\$cache_config['hack_adfoot'] = stripslashes(\"" . addslashes($value['hack_adfoot']) . "\");\n?>";
            ffile(R_P . "cache/cache_{$value['hack_action']}.php", $configtxt);
        }
        die(gb2utf8("插件设置修改成功"));
    }
    $sql_config = $GETSQL->fSql("*", "`{$ODBC['tablepre']}hack`", "", "");
    $smarty->assign('sql_config', $sql_config);
    $smarty->display("hack.htm");
}
if ($option == 'edit') {
    if ($_POST['edit'] == 'edit') {
        fgetposttoupdatd($_POST, $ODBC['charset']);
        $sql_config = $GETSQL->fSql("*", "`{$ODBC['tablepre']}hack`", "`hack_action`='{$id}'", "", "", "", "U_B");
        ffile(R_P . "require/{$sql_config['hack_action']}.php", StripSlashes($P['editrequire']), "w");
        die(gb2utf8("插件编辑保存"));
    }
    $sql_config = $GETSQL->fSql("*", "`{$ODBC['tablepre']}hack`", "`hack_action`='{$id}'", "", "", "", "U_B");
    $phptext = file_get_contents(R_P . "require/{$sql_config['hack_action']}.php");
    echo "<form name=formedit method=post action=''>\n\t<input type=hidden name=edit value='edit'>\n\trequire/{$sql_config['hack_action']}.php文件<BR>\n\t<textarea cols=80 rows=30 name=editrequire onkeydown='editTab()'>{$phptext}</textarea><BR>\n\t<center>\n\t<input id=Submit name=Submit type=button style=\"width:62px;height:22px;border:0;background:url('./image/edit/smb_btn_bg.gif');line-height:20px;\" value='确认' onfocus=true onclick=\"saveUserlogin('admin.php?action={$action}&option={$option}&id={$sql_config['hack_action']}','formedit','','fshowwindowsclos(\\'showwindow\\');')\" /> &nbsp; <input id=Submit name=Submit type=button style=\"width:62px;height:22px;border:0;background:url('./image/edit/smb_btn_bg.gif');line-height:20px;\" value='取消' onclick=\"new dialog().reset();fshowwindowsclos('showwindow');\" /></center></form>";
    /*
    echo "<div align=right class=itemtag><img src='image/msg/edit.gif' alt='保存' onclick=\"saveUserlogin('admin.php?action={$action}&option={$option}&id={$sql_config['hack_action']}','formedit','','getNews(\'showwindow\',\'admin.php?action={$action}&option={$option}&id={$sql_config['hack_action']}\')')\" style='cursor: hand;'> <img src='image/msg/closed.gif' alt='关闭' onclick=\"fshowwindowsclos('showwindow');\" style='cursor: hand;'></div>
    <form name=formedit method=post action=''><input type=hidden name=edit value='edit'>require/{$sql_config['hack_action']}.php文件<BR><textarea cols=150 rows=100 name=editrequire onkeydown='editTab()'>{$phptext}</textarea></form>
    <div align=right class=itemtag><img src='image/msg/edit.gif' alt='保存' onclick=\"saveUserlogin('admin.php?action={$action}&option={$option}&id={$sql_config['hack_action']}','formedit','','getNews(\'showwindow\',\'admin.php?action={$action}&option={$option}&id={$sql_config['hack_action']}\')')\" style='cursor: hand;'> <img src='image/msg/closed.gif' alt='关闭' onclick=\"fshowwindowsclos('showwindow');\" style='cursor: hand;'></div>";
    */
}
if ($option == 'del') {
    $GETSQL->fDelete("`{$ODBC['tablepre']}hack`", "`hack_action`='{$id}'", "1");
    P_unlink(R_P . "cache/cache_{$id}.php");
    die(gb2utf8("插件删除服务器上仍然保留插件文件,如果要彻底删除请到服务器require目录下删除{$id}"));
コード例 #5
0
ファイル: basic.php プロジェクト: holin/sstour
<?php

if ($option == 'index') {
    if ($_POST['update'] == 'update') {
        fgetposttoupdatd($_POST, $ODBC['charset']);
        foreach ($_POST['config'] as $k => $v) {
            //$sql_config = $GETSQL->fSql("*","`{$ODBC['tablepre']}config`","`config_subject`='{$k}'","","","","U_B");
            $GETSQL->fUpdate("`{$ODBC['tablepre']}config`", "`config_content`='{$v}'", "`config_subject`='{$k}'");
        }
        $sql_config = $GETSQL->fSql("*", "`{$ODBC['tablepre']}config`", "", "");
        $configtxt = "<?php\n";
        foreach ($sql_config as $value) {
            $value['config_content'] = addslashes($value['config_content']);
            if (@eregi("\\'", $value['config_content'])) {
                $configtxt .= "\$config['{$value['config_subject']}']=stripslashes(\"{$value['config_content']}\");\n";
            } else {
                $configtxt .= "\$config['{$value['config_subject']}']=\"{$value['config_content']}\";\n";
            }
        }
        $configtxt .= "?>";
        ffile(R_P . "include/config.php", $configtxt);
        die(gb2utf8("信息设置修改成功"));
    }
    $sql_config = $GETSQL->fSql("*", "`{$ODBC['tablepre']}config`", "`config_subject` IN ('webclose','webname','title','icp','main','keywords','description','mail','time','attach','size','bbs')", "");
    foreach ($sql_config as $value) {
        $smarty->assign($value['config_subject'], htmlspecialchars($value['config_content']));
    }
    $smarty->display("basic.htm");
}
コード例 #6
0
ファイル: columns.php プロジェクト: holin/sstour
        fgetposttoupdatd($_POST, $ODBC['charset']);
        if ($_POST['addsubject'] != '') {
            $cQuery = array("`type_subject`", "`type_live`", "`type_sp`");
            $cData = array($_POST['addsubject'], $_POST['addlive'], $_POST['addsp']);
            $GETSQL->fInsert("`{$ODBC['tablepre']}columns`", $cQuery, $cData);
        }
        if (is_array($_POST['type_id'])) {
            foreach ($_POST['type_id'] as $v) {
                $GETSQL->fUpdate("`{$ODBC['tablepre']}columns`", "`type_subject`='{$_POST['type_subject'][$v]}',`type_live`='{$_POST['type_live'][$v]}',`type_sp`='{$_POST['type_sp'][$v]}'", "`type_id`='{$v}' AND `type_id`!='{$_POST['type_live'][$v]}'");
            }
        }
        $sql_class = $GETSQL->fSql("*", "`{$ODBC['tablepre']}columns`", "", "ORDER BY `type_sp`,`type_id` DESC");
        foreach ($sql_class as $vale) {
            $configtxt .= "columnstf[{$vale['type_id']}]='{$vale['type_live']}';columnsvf[{$vale['type_id']}]='{$vale['type_subject']}';\n";
        }
        ffile(R_P . "lang/columns.js", $configtxt);
        die(gb2utf8("后台组件操作完成"));
    }
    $sql_about = $GETSQL->fSql("*", "`{$ODBC['tablepre']}columns`", "", "ORDER BY `type_sp`,`type_id` DESC");
    $soptions = "<option value='0'>系统根组</option>" . flist_option($sql_about);
    $smarty->assign('showtext', flist_top($sql_about, '0', $soptions));
    $smarty->assign('sql_about', $sql_about);
    $smarty->assign('soptions', $soptions);
    $smarty->display("classification.htm");
}
if ($option == 'del') {
    $sql_class = $GETSQL->fSql("*", "`{$ODBC['tablepre']}columns`", "`type_live`='{$id}'", "", "", "", "U_B");
    if ($sql_class['type_id'] > 0) {
        die(gb2utf8("请先删除分类下的子类"));
    } else {
        $GETSQL->fDelete("`{$ODBC['tablepre']}columns`", "`type_id`='{$id}'", "1");
コード例 #7
0
ファイル: weather.php プロジェクト: holin/sstour
<?php

if ($option == 'index') {
    if ($_POST['update'] == 'update') {
        if ($_POST['username'] != 'weather') {
            die("<script>top._confirm_msg_show('用户名出错', ' ');</script>");
        }
        if ($_POST['password'] != 'sstourweather') {
            die("<script>top._confirm_msg_show('密码出错', ' ');</script>");
        }
        if ($_POST['info'] == '') {
            die("<script>top._confirm_msg_show('内容不能为空', ' ');</script>");
        }
        ffile(R_P . "html/weather.text", $_POST['info'], "w");
        die("<script>top._confirm_msg_show('提交完成', ' ');</script>");
    }
    $smarty->display("weather.htm");
} elseif ($option == 'weather') {
    $text = ffile(R_P . "html/weather.text", '', 'rb');
    $smarty->assign('text', $text);
    $smarty->display("weather.htm");
}
コード例 #8
0
ファイル: town.php プロジェクト: holin/sstour
        fgetposttoupdatd($_POST, $ODBC['charset']);
        if ($_POST['addsubject'] != '') {
            $cQuery = array("`type_subject`", "`type_live`", "`type_sp`");
            $cData = array($_POST['addsubject'], $_POST['addlive'], $_POST['addsp']);
            $GETSQL->fInsert("`{$ODBC['tablepre']}town`", $cQuery, $cData);
        }
        if (is_array($_POST['type_id'])) {
            foreach ($_POST['type_id'] as $v) {
                $GETSQL->fUpdate("`{$ODBC['tablepre']}town`", "`type_subject`='{$_POST['type_subject'][$v]}',`type_live`='{$_POST['type_live'][$v]}',`type_sp`='{$_POST['type_sp'][$v]}'", "`type_id`='{$v}'");
            }
        }
        $sql_class = $GETSQL->fSql("*", "`{$ODBC['tablepre']}town`", "", "ORDER BY `type_sp`,`type_id` DESC");
        foreach ($sql_class as $vale) {
            $configtxt .= "citytf[{$vale['type_id']}]='{$vale['type_live']}';cityvf[{$vale['type_id']}]='{$vale['type_subject']}';\n";
        }
        ffile(R_P . "lang/town.js", $configtxt);
        die(gb2utf8("后台组件操作完成"));
    }
    $sql_about = $GETSQL->fSql("*", "`{$ODBC['tablepre']}town`", "", "ORDER BY `type_sp`,`type_id` DESC");
    $soptions = "<option value='0'>系统根组</option>" . flist_option($sql_about);
    $smarty->assign('showtext', flist_top($sql_about, '0', $soptions));
    $smarty->assign('sql_about', $sql_about);
    $smarty->assign('soptions', $soptions);
    $smarty->display("town.htm");
}
if ($option == 'del') {
    $GETSQL->fDelete("`{$ODBC['tablepre']}town`", "`type_id`='{$id}'", "1");
    die(gb2utf8("删除成功"));
}
function flist_top($array, $top = '0', $more)
{
コード例 #9
0
ファイル: word.php プロジェクト: holin/sstour
        }
        die(gb2utf8("ÈÏÖ¤Âë³ö´í"));
    }
    die(gb2utf8("ÁôÑÔʧ°Ü"));
}
if ($option == 'travelword') {
    $sql_hotel = $GETSQL->fSql("sc_id", "`{$ODBC['tablepre']}travel`", "`sc_id`='{$_POST['hid']}'", "", "", "", "U_B");
    if ($sql_hotel['sc_id'] == '') {
        die(gb2utf8("¾Æµê²»´æÔÚ²»ÄÜÁôÑÔ"));
    }
    if ($_POST['gdcode'] != '' && $_POST['message'] != '' && $_POST['hid'] != '') {
        $upauth = $_COOKIE['authnum'] ? $_COOKIE['authnum'] : $_SESSION['authnum'];
        Cookie("authnum", '');
        if ($_POST['gdcode'] == $upauth) {
            fgetposttoupdatd($_POST, $ODBC['charset']);
            $cQuery = array("`word_id`", "`word_hid`", "`word_uid`", "`word_username`", "`word_content`", "`word_ip`", "`word_date`");
            $cData = array($nowtime, $_POST['hid'], $uid, $_POST['nickname'], $_POST['message'], $onlineip, fgetdate());
            $GETSQL->fInsert("`{$ODBC['tablepre']}travelword`", $cQuery, $cData);
            if ($actionhtml = GetCache('travel')) {
                include_once $actionhtml;
                if ($cache_config['cache'] == '1') {
                    P_unlink(R_P . "html/travel/hotelword_I_{$_POST['hid']}.htm");
                    ffile("{$boardurl}index.php?action=travel&option=travelword&id={$_POST['hid']}", '', "r");
                }
            }
            die(gb2utf8("ÁôÑԳɹ¦"));
        }
        die(gb2utf8("ÈÏÖ¤Âë³ö´í"));
    }
    die(gb2utf8("ÁôÑÔʧ°Ü"));
}
コード例 #10
0
ファイル: template.php プロジェクト: holin/sstour
    $smarty->display("template.htm");
}
if ($option == 'edit') {
    if ($_GET['update'] == 'img' && $_FILES['fileContent']['name'] != '') {
        include_once GetLang('image');
        include_once Getincludefun("image");
        $img = fUploadimg_process($_FILES['fileContent'], "{$config['attach']}/template/");
        if ($IMG_upment['watermark'] == '1') {
            ImgWaterMark("{$config['attach']}/template/{$img}", $IMG_upment['waterpos'], $IMG_upment['waterimg'], $IMG_upment['watertext'], $IMG_upment['waterfont'], $IMG_upment['watercolor'], $IMG_upment['waterpct']);
        }
        header("Location: update.php?action=img&fileKey={$_POST['fileKey']}&img={$img}");
        exit;
    }
    if ($_POST['blog_body'] != '') {
        //fgetposttoupdatd($_POST,$ODBC['charset']);
        ffile(R_P . "template/{$id}/{$type}", StripSlashes($_POST['blog_body']), "w");
        header("Location: update.php?action=add&title=" . urlencode("Ä£°å±à¼­±£´æ") . "&a={$action}&p={$option}&id={$nowtime}&u=admin");
        exit;
        //die(gb2utf8("Ä£°å±à¼­±£´æ"));
    }
    $ncontent = file_get_contents(R_P . "template/{$id}/{$type}");
    //echo "<div align=right class=itemtag><img src='image/msg/edit.gif' alt='±£´æ' onclick=\"saveUserlogin('admin.php?action={$action}&option={$option}&id={$id}&type={$type}','formedit','','getNews(\'showwindow\',\'admin.php?action={$action}&option={$option}&id={$id}&type={$type}\')');\" style='cursor: hand;'> <img src='image/msg/closed.gif' alt='¹Ø±Õ' onclick=\"fshowwindowsclos('showwindow');\" style='cursor: hand;'></div>
    //<form name=formedit method=post action=''><input type=hidden name=edit value='edit'>template/{$id}/{$type}Îļþ<BR><textarea cols=150 rows=100 name=editrequire onkeydown='editTab()'>{$phptext}</textarea></form>
    //<div align=right class=itemtag><img src='image/msg/edit.gif' alt='±£´æ' onclick=\"saveUserlogin('admin.php?action={$action}&option={$option}&id={$id}&type={$type}','formedit','','getNews(\'showwindow\',\'admin.php?action={$action}&option={$option}&id={$id}&type={$type}\')');\" style='cursor: hand;'> <img src='image/msg/closed.gif' alt='¹Ø±Õ' onclick=\"fshowwindowsclos('showwindow');\" style='cursor: hand;'></div>";
    $ncontent = str_replace("\\", "\\\\", $ncontent);
    $ncontent = str_replace("\n", "\\n", $ncontent);
    $ncontent = str_replace("\r", "\\r", $ncontent);
    $ncontent = str_replace("\"", "\\\"", $ncontent);
    $smarty->assign('ncontent', $ncontent);
    $smarty->display("template.htm");
}
コード例 #11
0
ファイル: setmain.php プロジェクト: holin/sstour
        $closewindow = "javascript:document.getElementById('setmain').innerHTML='';document.getElementById('setmain').style.width='0px';document.getElementById('setmain').style.height='0px';void(null);";
        foreach ($sql_config as $value) {
            if ($value['main_subject'] == 'bgcolor') {
                $maintxt .= "background-color: {$value['main_info']};";
            }
            if ($value['main_subject'] == 'bgimage') {
                $maintxt .= "background-image: url({$value['main_info']});";
            }
            if ($value['main_subject'] == 'transparent') {
                $maintxt .= "filter:Alpha(Opacity={$value['main_info']}, FinishOpacity=100);";
            }
            if ($value['main_subject'] == 'info') {
                $infotxt = $value['main_info'];
            }
            if ($value['main_subject'] == 'nesting') {
                if ($value['main_info'] == '0') {
                    $phptext = "<TITLE>引导页</TITLE>\n<LINK href='lang/css.css' type='text/css' rel=stylesheet>\n<?php\n exit; \n?>";
                    $closewindow = "index.php?action=index";
                }
            }
        }
        $configtxt = "<div id=setmain style=\"left:0px;top:0px;right:0px;position:absolute;z-index:1;width:100%;height:100%;{$maintxt};\">{$infotxt}</div>{$phptext}";
        ffile(R_P . "cache/main.php", $configtxt);
        die(gb2utf8("引导页设置修改成功"));
    }
    $sql_config = $GETSQL->fSql("*", "`{$ODBC['tablepre']}main`", "", "");
    foreach ($sql_config as $value) {
        $smarty->assign($value['main_subject'], htmlspecialchars($value['main_info']));
    }
    $smarty->display("setmain.htm");
}
コード例 #12
0
ファイル: advertising.php プロジェクト: holin/sstour
<?php

if ($option == 'index') {
    if ($_POST['update'] == 'update') {
        fgetposttoupdatd($P, $ODBC['charset']);
        foreach ($P['hack_adhead'] as $k => $v) {
            $GETSQL->fUpdate("`{$ODBC['tablepre']}hack`", "`hack_adhead`='{$v}'", "`hack_action`='{$k}'");
        }
        foreach ($P['hack_adbody'] as $k => $v) {
            $GETSQL->fUpdate("`{$ODBC['tablepre']}hack`", "`hack_adbody`='{$v}'", "`hack_action`='{$k}'");
        }
        foreach ($P['hack_adfoot'] as $k => $v) {
            $GETSQL->fUpdate("`{$ODBC['tablepre']}hack`", "`hack_adfoot`='{$v}'", "`hack_action`='{$k}'");
        }
        $sql_config = $GETSQL->fSql("*", "`{$ODBC['tablepre']}hack`", "", "");
        foreach ($sql_config as $value) {
            $configtxt = "<?php\n\$cache_config['subject'] = \"{$value['hack_subject']}\";\n\$cache_config['cache'] = \"{$value['hack_cache']}\";\n\$cache_config['cachetime'] = \"{$value['hack_cachetime']}\";\n\$cache_config['htmlteml'] = \"{$value['hack_htmlteml']}\";\n\$cache_config['numser'] = \"{$value['hack_numser']}\";\n\$cache_config['hack_adhead'] = stripslashes(\"" . addslashes($value['hack_adhead']) . "\");\n\$cache_config['hack_adbody'] = stripslashes(\"" . addslashes($value['hack_adbody']) . "\");\n\$cache_config['hack_adfoot'] = stripslashes(\"" . addslashes($value['hack_adfoot']) . "\");\n?>";
            ffile(R_P . "cache/cache_{$value['hack_action']}.php", $configtxt);
        }
        die(gb2utf8("插件设置修改成功"));
    }
    $sql_hack = $GETSQL->fSql("*", "`{$ODBC['tablepre']}hack`", "", "");
    $smarty->assign('sql_hack', $sql_hack);
    $smarty->display("advertising.htm");
}