Exemple #1
0
        }
        break;
    default:
        $TYPE = $L['message_type'];
        $typeid = isset($typeid) ? intval($typeid) : -1;
        $lists = array();
        if ($_userid) {
            $condition = "touser='******' AND status=3";
            if ($typeid != -1) {
                $condition .= " AND typeid={$typeid}";
            }
            if ($keyword) {
                $condition .= " AND title LIKE '%{$keyword}%'";
            }
            $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}message WHERE {$condition}");
            $pages = mobile_pages($r['num'], $page, $pagesize);
            $result = $db->query("SELECT * FROM {$DT_PRE}message WHERE {$condition} ORDER BY itemid DESC LIMIT {$offset},{$pagesize}");
            while ($r = $db->fetch_array($result)) {
                $r['adddate'] = timetodate($r['addtime'], 'Y/m/d H:i');
                $r['type'] = $TYPE[$r['typeid']];
                $lists[] = $r;
            }
        }
        $head_name = $kw ? $L['message_search'] : $L['message_title'];
        $head_title = $L['message_title'] . $DT['seo_delimiter'] . $head_title;
        break;
}
$foot = 'my';
include template('message', 'mobile');
if (DT_CHARSET != 'UTF-8') {
    toutf8();
Exemple #2
0
 if ($kw) {
     $head_title = $kw . $DT['seo_delimiter'] . $head_title;
 }
 $condition = "status=3";
 if ($keyword) {
     $condition .= " AND keyword LIKE '%{$keyword}%'";
 }
 if ($catid) {
     $condition .= $CAT ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}";
 }
 if ($areaid) {
     $condition .= $ARE['child'] ? " AND areaid IN (" . $ARE['arrchildid'] . ")" : " AND areaid={$areaid}";
 }
 $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table} WHERE {$condition}", 'CACHE');
 $items = $r['num'];
 $pages = mobile_pages($items, $page, $pagesize);
 $lists = array();
 if ($items) {
     $order = $MOD['order'];
     $time = strpos($MOD['order'], 'add') !== false ? 'addtime' : 'edittime';
     $result = $db->query("SELECT " . $MOD['fields'] . " FROM {$table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}");
     while ($r = $db->fetch_array($result)) {
         if ($kw) {
             $r['title'] = str_replace($kw, '<b class="f_red">' . $kw . '</b>', $r['title']);
         }
         $r['linkurl'] = mobileurl($moduleid, 0, $r['itemid']);
         $r['date'] = timetodate($r[$time], 5);
         $lists[] = $r;
     }
     $db->free_result($result);
 }
Exemple #3
0
        }
        include template('mall_comment', 'mobile');
        if (DT_CHARSET != 'UTF-8') {
            toutf8();
        }
        break;
    case 'order':
        $itemid or exit;
        $lists = array();
        $pages = '';
        /*
        $pagesize = 2;
        $offset = ($page-1)*$pagesize;
        */
        $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}mall_order WHERE mallid={$itemid} AND status=4");
        $items = $r['num'];
        $pages = mobile_pages($items, $page, $pagesize, 'javascript:load_order({destoon_page});');
        $result = $db->query("SELECT * FROM {$DT_PRE}mall_order WHERE mallid={$itemid} AND status=4 ORDER BY itemid DESC LIMIT {$offset},{$pagesize}");
        while ($r = $db->fetch_array($result)) {
            $r['updatetime'] = timetodate($r['updatetime'], 6);
            $lists[] = $r;
        }
        include template('mall_order', 'mobile');
        if (DT_CHARSET != 'UTF-8') {
            toutf8();
        }
        break;
    default:
        dheader(mobileurl($moduleid));
        break;
}