Exemplo n.º 1
0
<?php

if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if (!$discuz_user) {
    showmessage('not_loggedin');
}
//搜索看是否有记录
if (!$loveid_cache[$massages]) {
    showmessage("没有找到该纸条,可能已被删除或是输入不正确,请返回!", "lovewall.php");
}
$page = $loveid_cache[$massages];
$dir = DISCUZ_ROOT . "./extend/lovewall/cache_lovewall_{$page}.php";
if (file_exists($dir)) {
    @(require_once $dir);
}
if (is_array($love_cache) && $lovecache == 1) {
    $lovewall = $love_cache;
} else {
    $lovewall = lovecache();
}
/*$lovewall[$massages]['show'] = 'f';
$cursearch	= $lovewall[$massages];
$layerid	= 999999;*/
$page = $lovek + 1 - $page;
$multipage = multi($lovek, 1, $page, "lovewall.php", $threadmaxpages);
    if ($lovepmswitch) {
        sendpm($discuz_uid, $subject, $message, $fromid, $from);
    }
    if ($lovemailswitch) {
        $mailsend = 1;
        $mailfrom = $lovemail ? $lovemail : $adminemail;
        $query = $db->query("select email from `" . $tablepre . "members` where `uid`='{$discuz_uid}'");
        $rowu = $db->fetch_array($query);
        sendmail($rowu[email], $subject, $message, $mailfrom);
    }
    $lovetime = gmdate("{$dateformat} {$timeformat}", $timestamp + 3600 * $timeoffset);
    $massages = dhtmlspecialchars($massages);
    $massages = nl2br(str_replace(array("\t", '   ', '  ', "\r\n"), array('&nbsp; &nbsp; &nbsp; &nbsp; ', '&nbsp; &nbsp;', '&nbsp;&nbsp;', '<br>'), $massages));
    if (!$smileyoff && !empty($GLOBALS['_DCACHE']['smilies']) && is_array($GLOBALS['_DCACHE']['smilies'])) {
        $massages = preg_replace($GLOBALS['_DCACHE']['smilies']['searcharray'], $GLOBALS['_DCACHE']['smilies']['replacearray'], $massages, $maxsmilies);
    }
    $massages = str_replace(array('\\&quot;', "\\'"), array('&quot;', "'"), $massages);
    //生成LOVEID缓存
    $loveid_cache = loveidcache();
    if ($lovecache == 1) {
        $page = $lovek;
        lovecache();
    }
    $tipsa = '您在爱墙发布的祝福号码已经发到您的收件箱,请注意查收';
    $tipsb = $loveokmsg ? $loveokmsg : "您在爱墙发布信息成功";
    $lovesay_send_succeed = $lovepmswitch ? $tipsa : $tipsb;
    showmessage("{$lovesay_send_succeed}", 'lovewall.php');
} else {
    require_once DISCUZ_ROOT . './forumdata/cache/cache_post.php';
}
$navigation .= " &raquo; <a href=\"lovewall.php\">{$lovetitle}</a> &raquo; 新的留言";