示例#1
0
        $db->query("UPDATE et_users SET priread = priread+1 WHERE user_id='{$user['user_id']}'");
        $db->query("INSERT INTO et_messages (senduid,sendname,sendnickname,sendhead,sendtouid,sendtoname,sendtonickname,messagebody,sendtime) VALUES ('{$my['user_id']}','{$my['user_name']}','{$my['nickname']}','{$my['user_head']}','{$user['user_id']}','{$user['user_name']}','{$user['nickname']}','{$content}','{$addtime}')");
        echo 'success';
        exit;
    } else {
        echo '您没有填写发送的内容,返回重新填写';
        exit;
    }
}
if ($act == 'getuserinfo') {
    $uid = $_GET['uid'];
    $class = $_GET['class'];
    $userquery = $db->query("SELECT nickname,user_head,lastcontent,lastconttime FROM et_users WHERE user_id='{$uid}'");
    $user = $db->fetch_array($userquery);
    $head = $user['user_head'] ? "{$webaddr}/attachments/head/" . $user['user_head'] : "{$webaddr}/images/noavatar.jpg";
    $content = simplecontent($user[lastcontent]);
    $time = $user[lastconttime] ? timeop($user[lastconttime]) : "";
    echo '<div class="' . $class . '"></div><table width="200" border="0" cellpadding="0" cellspacing="0"><tr><td width="53" rowspan="2" align="left" valign="top"><img src="' . $head . '" width="48px" /></td><td><strong>' . $user[nickname] . ':</strong>' . emotionrp($content) . '</td></tr><tr><td class="followtime">' . $time . "</td></tr></table>";
    exit;
}
if ($act == 'getreplycontent') {
    $contid = $_GET['contid'];
    $contdata = getReply($contid);
    if ($contdata) {
        $contents = ubb($contdata['content_body']);
        echo '<div class="status_reply_list">
            <div class="top"></div>
            <div class="cont">
            <h1 class="line">以下是原文:<a href="' . $webaddr . '/op/view/' . $contid . '">原文回复(' . $contdata['replytimes'] . ')</a></h1>
            <div class="replyajaxbox"><a href="' . $webaddr . '/' . $contdata['user_name'] . '">' . $contdata['user_nickname'] . '</a>:' . $contents . '</div>
            </div>
    fputs($fp, "<?php\n");
    fputs($fp, "if(!defined('IN_ET')) {\n");
    fputs($fp, "   exit('Access Denied');\n");
    fputs($fp, "}\n\n");
    fputs($fp, "//热门话题和搜索\n");
    fputs($fp, "\$topics='{$topic}';\n");
    fputs($fp, "\$searchs='{$search}';\n");
    fputs($fp, "?>");
    fclose($fp);
    @(include ET_ROOT . "/include/cache/hottopics.cache.php");
}
//十大热评
if (!file_exists(ET_ROOT . "/include/cache/hotmsg.cache.php")) {
    $query = $db->query("SELECT content_id,content_body,replytimes FROM et_content WHERE replytimes>0 ORDER BY replytimes DESC LIMIT 10");
    while ($data = $db->fetch_array($query)) {
        $hotmsg1 = '<li><a href="' . $webaddr . '/op/view/' . $data['content_id'] . '">' . simplecontent($data['content_body'], 15) . '</a></li>';
        $hotmsg = $hotmsg . $hotmsg1;
    }
    $fp = fopen(ET_ROOT . "/include/cache/hotmsg.cache.php", "a");
    fputs($fp, "<?php\n");
    fputs($fp, "if(!defined('IN_ET')) {\n");
    fputs($fp, "   exit('Access Denied');\n");
    fputs($fp, "}\n\n");
    fputs($fp, "//十大热评\n");
    fputs($fp, "\$hotmsg='{$hotmsg}';\n");
    fputs($fp, "?>");
    fclose($fp);
    @(include ET_ROOT . "/include/cache/hotmsg.cache.php");
}
//推荐,新用户缓存
if (!file_exists(ET_ROOT . "/include/cache/users.cache.php")) {
示例#3
0
<?php

if (!defined('IN_ET')) {
    exit('Access Denied');
}
$viewid = $_GET['id'];
$query = $db->query("SELECT * FROM et_content WHERE content_id='{$viewid}'");
$data = $db->fetch_array($query);
$content = ubb($data['content_body']);
if (!$data) {
    header("location: {$webaddr}/op/web/404");
    exit;
}
//模板和Foot
if ($data['privacy'] == 0) {
    $web_name3 = simplecontent($data['content_body']);
}
$sqlnum = $db->querynum;
$mtime = explode(' ', microtime());
$loadtime = $mtime[1] + $mtime[0] - $starttime;
include $template->getfile('op_view.htm');