Exemplo n.º 1
0
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();
}
Exemplo n.º 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);
}
Exemplo n.º 3
0
        $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) values('{$author}','{$replypassword}','" . encode($_POST['homepage']) . "','" . encode($_POST['email']) . "','" . getip() . "','" . encode($_POST['message']) . "','" . time() . "','" . encode($_POST['isSecret']) . "','{$parent}','" . substr(encode($_POST['bookface']), 4) . "')";
        //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']}");
    }
}
//允许回复
if ($allow_reply) {
    ?>
<script type="text/javascript">
<!--
Exemplo n.º 4
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();
}
Exemplo n.º 5
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;
    }
}
Exemplo n.º 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;
    }
}
Exemplo n.º 7
0
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;
}