예제 #1
0
        }
        $sql = "delete from " . $DBPrefix . "logs where {$stritem}";
        $DMC->query($sql);
        //删除关联的评论和引用
        $stritem1 = str_replace("id=", "logId=", $stritem);
        $sql = "delete from " . $DBPrefix . "comments where {$stritem1}";
        $DMC->query($sql);
        $sql = "delete from " . $DBPrefix . "trackbacks where {$stritem1}";
        $DMC->query($sql);
        settings_recount("logs");
        //更新Cache
        hottags_recache();
        categories_recache();
        settings_recache();
        recentLogs_recache();
        recentComments_recache();
        archives_recache();
        calendar_recache();
        attachments_recache();
        logsTitle_recache();
        logs_sidebar_recache($arrSideModule);
    }
}
//引用传送
if ($action == "sendtb") {
    $mark_id = $_GET['mark_id'];
    $quoteUrl = $_POST['quoteUrl'];
    $dataInfo = getRecordValue($DBPrefix . "logs", " id='{$mark_id}'");
    header("Content-Type: text/html; charset=utf-8");
    $pingurl = explode(";", $quoteUrl);
    $logurl = $settingInfo['blogUrl'] . "index.php?load=read&id={$mark_id}";
예제 #2
0
function reAllCache()
{
    global $arrSideModule;
    categories_recount();
    categories_recache();
    calendar_recache();
    statistics_recache();
    hottags_recache();
    archives_recache();
    links_recache();
    filters_recache();
    keywords_recache();
    recentLogs_recache();
    recentComments_recache();
    recentGbooks_recache();
    logsTitle_recache();
    modulesSetting_recache();
    download_recache();
    attachments_recache();
    members_recache();
    skinlist_recache();
    online_recache();
    logs_sidebar_recache($arrSideModule);
}
예제 #3
0
function reAllCache()
{
    settings_recache();
    modules_recache();
    categories_recache();
    hottags_recache();
    archives_recache();
    links_recache();
    keywords_recache();
    filters_recache();
    recentLogs_recache();
    recentGbooks_recache();
    recentComments_recache();
    calendar_recache();
    statistics_recache();
    categories_recount();
}
예제 #4
0
function guestBookPost($intSpamFiler, $intIsSecret)
{
    global $DMC, $DBPrefix, $arrSideModule, $settingInfo;
    $_POST['isSecret'] = isset($_POST['isSecret']) ? $_POST['isSecret'] : 0;
    $author = isset($_POST['username']) ? $_POST['username'] : $_SESSION['username'];
    $replypassword = isset($_POST['replypassword']) ? md5($_POST['replypassword']) : "";
    //$_POST['homepage']=(isset($_POST['homepage']))?$_POST['homepage']:"";
    if (!empty($_POST['homepage'])) {
        if (strpos(";" . $_POST['homepage'], "http://") < 1) {
            $_POST['homepage'] = "http://" . $_POST['homepage'];
        }
    } else {
        $_POST['homepage'] = "";
    }
    $_POST['email'] = isset($_POST['email']) ? $_POST['email'] : "";
    $_POST['bookface'] = !empty($_POST['bookface']) ? $_POST['bookface'] : "face1";
    if ($_GET['load'] == "read") {
        //评论
        $sql = "insert into " . $DBPrefix . "comments(author,password,logId,homepage,email,face,ip,content,postTime,isSecret,parent) values('{$author}','{$replypassword}','" . $id . "','" . encode($_POST['homepage']) . "','" . encode($_POST['email']) . "','" . substr(encode($_POST['bookface']), 4) . "','" . getip() . "','" . encode($_POST['message']) . "','" . time() . "','" . max(intval($intIsSecret), intval($_POST['isSecret'])) . "','{$postid}')";
    } else {
        $sql = "insert into " . $DBPrefix . "guestbook(author,password,homepage,email,ip,content,postTime,isSecret,parent,face) values('{$author}','{$replypassword}','" . encode($_POST['homepage']) . "','" . encode($_POST['email']) . "','" . getip() . "','" . encode($_POST['message']) . "','" . time() . "','" . max(intval($intIsSecret), intval($_POST['isSecret'])) . "','{$postid}','" . substr(encode($_POST['bookface']), 4) . "')";
    }
    //echo $sql;
    $DMC->query($sql);
    //保存时间
    $_SESSION['replytime'] = time();
    //更新cache
    if ($_GET['load'] == "read") {
        //评论
        //更新LOGS评论数量
        settings_recount("comments");
        settings_recache();
        $DMC->query("UPDATE " . $DBPrefix . "logs SET commNums=commNums+1 WHERE id='{$id}'");
        //更新cache
        recentComments_recache();
        logs_sidebar_recache($arrSideModule);
    } else {
        settings_recount("guestbook");
        settings_recache();
        recentGbooks_recache();
        logs_sidebar_recache($arrSideModule);
    }
    //不使用Ajax技术
    if (strpos(";{$settingInfo['ajaxstatus']};", "G") < 1) {
        $load = $_GET['load'];
        $page = $_GET['page'];
        echo "<script language=javascript> \n";
        if ($_GET['load'] == "read") {
            if ($settingInfo['rewrite'] == 0) {
                $gourl = "index.php?load={$load}&id={$id}&page={$page}";
            }
            if ($settingInfo['rewrite'] == 1) {
                $gourl = "rewrite.php/{$load}-{$id}-{$page}";
            }
            if ($settingInfo['rewrite'] == 2) {
                $gourl = "{$load}-{$id}-{$page}";
            }
            echo " opener.location.href='{$gourl}{$settingInfo['stype']}';\n";
            echo " opener.reload;\n";
        } else {
            if ($settingInfo['rewrite'] == 0) {
                $gourl = "index.php?load={$load}&page={$page}";
            }
            if ($settingInfo['rewrite'] == 1) {
                $gourl = "rewrite.php/{$load}-{$page}";
            }
            if ($settingInfo['rewrite'] == 2) {
                $gourl = "{$load}-{$page}";
            }
            echo " opener.location.href='{$gourl}{$settingInfo['stype']}';\n";
            echo " opener.reload;\n";
        }
        echo " window.close();\n";
        echo "</script> \n";
        exit;
    }
}
예제 #5
0
function guestBookPost($id, $intSpamFiler, $intIsSecret, $settingInfo, $gourl)
{
    global $DMC, $DBPrefix, $arrSideModule;
    $parent = 0;
    $_POST['isSecret'] = $_POST['isSecret'] ? $_POST['isSecret'] : 0;
    $author = $_POST['username'] ? $_POST['username'] : $_SESSION['username'];
    $replypassword = $_POST['replypassword'] ? md5($_POST['replypassword']) : "";
    $_POST['bookface'] = !empty($_POST['bookface']) ? $_POST['bookface'] : "face1";
    if (isset($_POST['homepage'])) {
        if (strpos(";" . $_POST['homepage'], "http://") < 1) {
            $_POST['homepage'] = "http://" . $_POST['homepage'];
        }
    } else {
        $_POST['homepage'] = "";
    }
    $_POST['email'] = !empty($_POST['email']) ? $_POST['email'] : "";
    $sql = "insert into " . $DBPrefix . "comments(author,password,logId,homepage,email,face,ip,content,postTime,isSecret,parent) values('{$author}','{$replypassword}','" . $id . "','" . encode($_POST['homepage']) . "','" . encode($_POST['email']) . "','" . substr(encode($_POST['bookface']), 4) . "','" . getip() . "','" . encode($_POST['message']) . "','" . time() . "','" . max(intval($intIsSecret), intval($_POST['isSecret'])) . "','{$parent}')";
    //echo $sql;
    $DMC->query($sql);
    //更新LOGS评论数量
    settings_recount("comments");
    settings_recache();
    $DMC->query("UPDATE " . $DBPrefix . "logs SET commNums=commNums+1 WHERE id='{$id}'");
    //更新cache
    recentComments_recache();
    logs_sidebar_recache($arrSideModule);
    //保存时间
    $_SESSION['replytime'] = time();
    //清空内容
    $_POST['message'] = "";
    header("location:" . str_replace("&amp;", "&", $gourl) . "{$settingInfo['stype']}");
    exit;
}
예제 #6
0
function guestBookPost($intSpamFiler, $intIsSecret)
{
    global $DMC, $DBPrefix, $arrSideModule, $settingInfo;
    $author = !empty($_POST['username']) ? $_POST['username'] : $_SESSION['username'];
    $replypassword = !empty($_POST['replypassword']) ? md5($_POST['replypassword']) : $old_password;
    $_POST['isSecret'] = isset($_POST['isSecret']) ? intval($_POST['isSecret']) : 0;
    $sql = "update {$op_table} set password='******',ip='" . getip() . "',content='" . encode($_POST['message']) . "',isSecret='" . max(intval($intIsSecret), intval($_POST['isSecret'])) . "'{$op_update} where id='" . $postid . "'";
    //echo $sql;
    $DMC->query($sql);
    //exit;
    //更新cache
    if ($_GET['load'] == "read") {
        //评论
        recentComments_recache();
        logs_sidebar_recache($arrSideModule);
    } else {
        recentGbooks_recache();
        logs_sidebar_recache($arrSideModule);
    }
    //不使用Ajax技术
    if (strpos(";{$settingInfo['ajaxstatus']};", "G") < 1) {
        $load = $_GET['load'];
        $page = $_GET['page'];
        echo "<script language=javascript> \n";
        if ($_GET['load'] == "read") {
            if ($settingInfo['rewrite'] == 0) {
                $gourl = "index.php?load={$load}&id={$id}&page={$page}";
            }
            if ($settingInfo['rewrite'] == 1) {
                $gourl = "rewrite.php/{$load}-{$id}-{$page}";
            }
            if ($settingInfo['rewrite'] == 2) {
                $gourl = "{$load}-{$id}-{$page}";
            }
            echo " opener.location.href='{$gourl}{$settingInfo['stype']}';\n";
            echo " opener.reload;\n";
        } else {
            if ($settingInfo['rewrite'] == 0) {
                $gourl = "index.php?load={$load}&page={$page}";
            }
            if ($settingInfo['rewrite'] == 1) {
                $gourl = "rewrite.php/{$load}-{$page}";
            }
            if ($settingInfo['rewrite'] == 2) {
                $gourl = "{$load}-{$page}";
            }
            echo " opener.location.href='{$gourl}{$settingInfo['stype']}';\n";
            echo " opener.reload;\n";
        }
        echo " window.close();\n";
        echo "</script> \n";
        exit;
    }
}