Ejemplo n.º 1
0
            break;
        }
    }
    if ($fuser) {
        $str = '';
        foreach ($days as $k => $v) {
            $str .= '&nbsp;' . ($day == $k ? $v : "<a href=\"?action=pmbox&box={$box}&page={$page}&fid={$fid}&day={$k}\">{$v}</a>");
        }
        tabheader(lang('fupmrecord', $fuser) . $str . ($fuser ? "&nbsp;&nbsp;>><a href=\"?action=pmsend&box={$box}&page={$page}&tonames=" . rawurlencode($pm['msgfrom']) . "\">" . lang('reply') . "</a>" : ''));
        tabfooter();
    }
    tabheader(lang('pmcontent'));
    $pm = end($ucpm);
    if ($fuser == $pm['msgfrom']) {
        array_pop($ucpm);
        $fuser ? trbasic(lang('senduser'), '', ($pm['new'] ? '[<b style="color:red">new</b>]' : '') . $fuser, '') : trbasic(lang('pmtitle'), '', ($pm['msgtoid'] && $pm['new'] ? '[<b style="color:red">new</b>]' : '') . ($pm['subject'] ? $pm['subject'] : lang('syspm')), '');
        trbasic(lang('sendtime'), '', date("{$dateformat} {$timeformat}", $pm['dateline']), '');
        $fuser && trbasic(lang('pmtitle'), '', mhtmlspecialchars($pm['subject']), '');
        trbasic(lang('pmcontent'), '', mnl2br(mhtmlspecialchars($pm['message'])), '');
    }
    if (!empty($ucpm)) {
        echo '<tr><td class="item2" colspan="2"><b>' . lang('historypm') . '</b></td></tr>';
        foreach ($ucpm as $pm) {
            echo '<tr><td class="item2" colspan="2">' . ($fuser == $pm['msgfrom'] ? ($pm['new'] ? '[<b style="color:red">new</b>]' : '') . lang('onformsay', $pm['msgfrom'], date("{$dateformat} {$timeformat}", $pm['dateline'])) : lang('onyousay', date("{$dateformat} {$timeformat}", $pm['dateline']))) . '</td></tr>' . '<tr><td class="item2" colspan="2">' . ($pm['subject'] ? '<b>' . mhtmlspecialchars($pm['subject']) . '</b><br />' : '') . mnl2br(mhtmlspecialchars($pm['message'])) . '</td></tr>';
        }
    }
    tabfooter();
    echo "<input class=\"button\" type=\"submit\" name=\"\" value=\"" . lang('goback') . "\" onclick=\"redirect('?action=pmbox&box={$box}&page={$page}')\">\n";
}
mcfooter();
Ejemplo n.º 2
0
function mcmessage($key = '', $url = '')
{
    global $mmsgs, $mmsgforwordtime, $inajax, $infloat, $handlekey, $no_mcfooter, $message_class;
    $msnum = $mmsgforwordtime ? $mmsgforwordtime : 1250;
    $str = @$mmsgs[$key] ? $mmsgs[$key] : $key;
    if (($num = func_num_args()) > 2) {
        $ars = func_get_args();
        array_splice($ars, 1, 1);
        $ars[0] =& $str;
        $str = call_user_func_array('sprintf', $ars);
    }
    $class = empty($message_class) ? 'tabmain' : $message_class;
    if ($url) {
        if ($infloat) {
            if (preg_match('/^javascript:/', $url)) {
                $str .= "<script type=\"text/javascript\" reload=\"1\">var t = {$msnum};" . substr($url, 11) . "</script>";
            } else {
                $str .= "<br><br><br><a href=\"{$url}\" onclick=\"return floatwin('update_{$handlekey}', this);\">" . lang('clickhere') . "</a><script type=\"text/javascript\" reload=\"1\">setDelay(\"floatwin('update_{$handlekey}', '{$url}');\",{$msnum});</script>";
            }
        } elseif (!(strpos($url, 'history') === false)) {
            $str .= "<br><br><a href=\"javascript:{$url}\">[" . lang('rightnowjump') . "]</a><script>setTimeout('{$url}',{$msnum});</script>";
        } else {
            $str .= "<br><br><a href=\"{$url}\">[" . lang('rightnowjump') . "]</a><script>setTimeout(\"redirect('{$url}');\",{$msnum});</script>";
        }
    }
    $str .= '&nbsp; <a href="javascript:window.close();"' . ($infloat ? " onclick=\"return floatwin('close_{$handlekey}')\"" : '') . '>[' . lang('closewindow') . ']</a>';
    $infloat && (print '<div style="position:relative;margin-top:-20px">');
    echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"center\">\n" . "<table border=\"0\" cellpadding=\"0\" cellspacing=\"1\" align=\"center\" class=\"{$class}\">\n" . "<tr class=\"header\"><td>" . lang('promptmessage') . "</td></tr><tr><td height=\"120\" align=\"center\" valign=\"middle\">{$str}</td></tr></table>\n" . "</td></tr></table>\n" . "<div class=\"blank9\"></div>";
    $infloat && (print '</div>');
    if ($no_mcfooter) {
        if ($inajax) {
            afooter();
        } else {
            mexit('</div></div></body></html>');
        }
    } else {
        mcfooter();
    }
}