function guestBookPost($intSpamFiler, $intIsSecret)
{
    global $DMC, $DBPrefix, $arrSideModule;
    $parent = 0;
    $_POST['isSecret'] = !empty($_POST['isSecret']) ? $_POST['isSecret'] : 0;
    $author = !empty($_POST['username']) ? $_POST['username'] : $_SESSION['username'];
    $replypassword = !empty($_POST['replypassword']) ? md5($_POST['replypassword']) : "";
    if (!empty($_POST['homepage'])) {
        if (strpos(";" . $_POST['homepage'], "http://") < 1) {
            $homepage = "http://" . $_POST['homepage'];
        } else {
            $homepage = $_POST['homepage'];
        }
    } else {
        $homepage = "";
    }
    $email = !empty($_POST['email']) ? $_POST['email'] : "";
    $_POST['bookface'] = !empty($_POST['bookface']) ? $_POST['bookface'] : "face1";
    $sql = "insert into " . $DBPrefix . "guestbook(author,password,homepage,email,ip,content,postTime,isSecret,parent,face,isSpam) values('{$author}','{$replypassword}','" . encode($homepage) . "','" . encode($email) . "','" . getip() . "','" . encode($_POST['message']) . "','" . time() . "','" . max(intval($intIsSecret), intval($_POST['isSecret'])) . "','{$parent}','" . substr(encode($_POST['bookface']), 4) . "','" . $intSpamFiler . "')";
    //echo $sql;
    $DMC->query($sql);
    //更新cache
    settings_recount("guestbook");
    settings_recache();
    recentGbooks_recache();
    logs_sidebar_recache($arrSideModule);
    //保存时间
    $_SESSION['replytime'] = time();
}
Example #2
0
        $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}";
    foreach ($pingurl as $durl) {
        $result = send_trackback($durl, $dataInfo['logTitle'], $dataInfo['logContent'], $logurl);
        //echo $ActionMessage.=$durl." : ".$result."\n";
    }
    if ($result == "ok") {
Example #3
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);
}
Example #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;
    }
}
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;
}
Example #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;
    }
}
Example #7
0
function blogger_deletePost($values)
{
    global $settingInfo, $DMC, $DBPrefix, $arrSideModule;
    global $strArrayMonth, $strArrayDay, $strYear, $strMonth, $arrWeek, $strDayLogs, $strCalendar;
    global $strModifyInfo, $strLogout, $strLoginSubmit, $strUserRegister;
    global $strSearchErr, $strKeyword, $strSearchTitle, $strSearchContent, $strSearchTitleContent, $strFind;
    $userdetail = check_user_pw($values['username'], $values['password']);
    $records = $DMC->fetchArray($DMC->query("SELECT * FROM `{$DBPrefix}logs` WHERE `id`='{$values['postid']}'"));
    if ($records['id'] == '') {
        xml_error("Entry does not exist.");
    } else {
        $DMC->query("DELETE FROM `{$DBPrefix}logs` WHERE `id`='{$values['postid']}'");
        //更新Cache
        settings_recount("logs");
        settings_recache();
        categories_recount();
        categories_recache();
        recentLogs_recache();
        archives_recache();
        calendar_recache();
        logsTitle_recache();
        logs_sidebar_recache($arrSideModule);
        $xml_logContent = make_xml_piece("boolean", '1');
        $body_xml = xml_generate($xml_logContent);
        //writetofile ("text2.xml", $body_xml); //For debug use
        send_response($body_xml);
    }
}
function guestBookPost($intSpamFiler, $intIsSecret)
{
    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 (!empty($_POST['homepage'])) {
        if (strpos(";" . $_POST['homepage'], "http://") < 1) {
            $_POST['homepage'] = "http://" . $_POST['homepage'];
        }
    } else {
        $_POST['homepage'] = "";
    }
    $sql = "insert into " . $DBPrefix . "guestbook(author,password,homepage,email,ip,content,postTime,isSecret,parent,face,isSpam) values('{$author}','{$replypassword}','" . encode($_POST['homepage']) . "','" . encode($_POST['email']) . "','" . getip() . "','" . encode($_POST['message']) . "','" . time() . "','" . max(intval($intIsSecret), intval($_POST['isSecret'])) . "','{$parent}','" . substr(encode($_POST['bookface']), 4) . "','" . $intSpamFiler . "')";
    //echo $sql;
    $DMC->query($sql);
    //更新cache
    settings_recount("guestbook");
    settings_recache();
    recentGbooks_recache();
    logs_sidebar_recache($arrSideModule);
    //保存时间
    $_SESSION['replytime'] = time();
    //清空内容
    $_POST['message'] = "";
    //echo "<script language=\"javascript\">window.location.href='$gourl';</script>";
    //echo "<script language=\"javascript\">window.reload</script>";
    header("location:" . str_replace("&amp;", "&", $gourl) . "{$settingInfo['stype']}");
    exit;
}