Example #1
0
function showmessage($message)
{
    wapheader();
    echo $message;
    wapfooter();
}
Example #2
0
define('CURSCRIPT', 'wap');
require_once '../include/common.inc.php';
if (preg_match('/(mozilla|m3gate|winwap|openwave)/i', $_SERVER['HTTP_USER_AGENT'])) {
    dheader("Location: {$boardurl}index.php");
}
require_once './include/global.func.php';
require_once DISCUZ_ROOT . './include/forum.func.php';
require_once DISCUZ_ROOT . './include/chinese.class.php';
@(include_once DISCUZ_ROOT . './forumdata/cache/cache_forums.php');
$discuz_action = 191;
$action = isset($action) ? $action : 'home';
if ($action == 'goto' && !empty($url)) {
    header("Location: {$url}");
    exit;
} else {
    wapheader($bbname);
}
include language('wap');
if (!$wapstatus) {
    wapmsg('wap_disabled');
} elseif ($bbclosed) {
    wapmsg('board_closed');
}
$sdb = loadmultiserver('wap');
$chs = '';
if (in_array($action, array('home', 'login', 'register', 'search', 'stats', 'my', 'myphone', 'goto', 'forum', 'thread', 'post'))) {
    require_once './include/' . $action . '.inc.php';
} else {
    wapmsg('undefined_action');
}
wapfooter();
}
//删除确认
if ($act == "delpmsg") {
    $mid = trim($_GET["mid"]);
    showmessage("<div class='showmag'><p>是否确认删除此条私信?</p><p><a href='index.php?op=privatemsg&act=delpmsgok&mid={$mid}'>确认</a> <a href='index.php?op=privatemsg'>取消</a></p></div>");
    exit;
}
//删除OK
if ($act == "delpmsgok") {
    $mid = trim($_GET["mid"]);
    $db->query("DELETE FROM et_messages WHERE (senduid ='{$user['user_id']}' || sendtouid ='{$user['user_id']}') && message_id='{$mid}'");
    showmessage("<div class='showmag'><p>恭喜您,私信删除成功!</p><p><a href='index.php?op=privatemsg'>返回私信页面</a></p></div>");
    exit;
}
$pmtp = $_GET['pmtp'] ? $_GET['pmtp'] : "my";
wapheader();
if ($pmtp == "my") {
    echo "<h2>我收到的私信 | <a href='index.php?op=privatemsg&pmtp=send'>我发出的私信</a></h2>";
} else {
    if ($pmtp == "send") {
        echo "<h2><a href='index.php?op=privatemsg'>我收到的私信</a> | 我发出的私信</h2>";
    }
}
//查询
$start = ($page - 1) * 10;
if ($pmtp == "my") {
    $sql = "SELECT * FROM et_messages WHERE sendtouid='{$user['user_id']}' order by message_id desc limit {$start},10";
} else {
    $sql = "SELECT * FROM et_messages WHERE senduid='{$user['user_id']}' order by message_id desc limit {$start},10";
}
$query = $db->query($sql);
Example #4
0
include 'include/chinese.class.php';
if (preg_match('/(mozilla|m3gate|winwap|openwave|Opera)/i', $_SERVER['HTTP_USER_AGENT']) && !preg_match('/(SymbianOS)/i', $_SERVER['HTTP_USER_AGENT'])) {
    header("Location: ../index.php");
}
$op = $_GET['op'] ? $_GET['op'] : "index";
$addtime = time();
$action = $_POST['action'];
$act = $_GET['act'];
$page = $_GET['page'] ? $_GET['page'] : 1;
$exp = authcode($_COOKIE["wapcookie"], 'DECODE');
$ulmtem = explode("\t", $exp);
if ($ulmtem) {
    $query = $db->query("SELECT user_id,user_name FROM et_users where user_id='{$ulmtem['0']}' && password='******'1']}'");
    $data = $db->fetch_array($query);
    $user_id = $data['user_id'];
    $user_name = $data['user_name'];
}
if (!$user_id) {
    $head = $webn1 . " | ÃÔÄ㲩¿Í ËæʱËæµØ";
} else {
    $head = $webn1 . " | »¶Ó­Äú£¬" . $user_name;
}
if (!$user_id && $op == "index") {
    $op = "login";
}
wapheader($head);
include 'include/' . $op . '.inc.php';
if ($user_id && $op != "logout") {
    echo "<div id=\"nav\" style=\"border-top:1px solid #8FE1FF;margin-top:5px;padding-top:5px;padding-bottom:10px\">" . "<a href='index.php?op=index'>Ê×Ò³</a> | " . "<a href='index.php?op=home'>¿Õ¼ä</a> | " . "<a href='index.php?op=atreplies'>@ÎÒ</a> | " . "<a href='index.php?op=myfriends'>¶¯Ì¬</a> | " . "<a href='index.php?op=privatemsg'>˽ÐÅ</a><br/>" . "<a href='index.php?op=friends'>¹Ø×¢</a> | " . "<a href='index.php?op=browse'>¹ä¹ä</a> | " . "<a href='index.php?op=sendphoto'>·¢ÕÕƬ</a> | " . "<a href='index.php?op=login&act=logout'>Í˳ö</a></div>";
}
wapfooter();