$value['fullname'] = "N" . str_pad($value['id'], 7, "0", STR_PAD_LEFT); $value['fullname_'] = $value['fullname']; } elseif ($value['display_name'] == "3") { if ($value['sex'] == 1) { $value['fullname'] = cut_str($value['fullname'], 1, 0, "先生"); } elseif ($value['sex'] == 2) { $value['fullname'] = cut_str($value['fullname'], 1, 0, "女士"); } $value['fullname_'] = $value['fullname']; } else { $value['fullname_'] = $value['fullname']; $value['fullname'] = $value['fullname']; } $resume[$key]['url'] = wap_url_rewrite("resume-show", array("id" => $value["id"])); $resume[$key]['fullname_'] = $value['fullname_']; $resume[$key]['fullname'] = $value['fullname']; $resume[$key]['refreshtime_cn'] = daterange(time(), $value['refreshtime'], 'Y-m-d', "#FF3300"); //检测该会员的手机认证状态 $user_info = $db->getone("SELECT mobile_audit FROM " . table('members') . " WHERE uid=" . $value['uid']); $resume[$key]['mobile_audit'] = $user_info['mobile_audit']; } } else { $resume = array(); } $smarty->assign('resume', $resume); $smarty->assign('pagehtml', wapmulti($count, $perpage, $page, $theurl)); //热门关键字 $sql = "select w_word,w_hot from " . table("hotword") . " order by w_hot desc limit 15 "; $hotword_list = $db->getall($sql); $smarty->assign('hotword', $hotword_list); $smarty->display("m/m-resume-list.html");
$breaked = 0; } $post['author'] = !$post['anonymous'] ? $post['author'] : $lang['anonymous']; $threadposts .= nl2br(trim($post['message'])); } else { $postlist[] = $post; } } echo $threadposts . (!$breaked ? '' : "<br /><a href=\"index.php?action=thread&tid={$tid}&offset={$offset_next}\">{$lang['next_page']}</a> ") . (!$offset ? '' : "<a href=\"index.php?action=thread&tid={$tid}&offset={$offset_last}\">{$lang['last_page']}</a>") . "<br />\n" . "<br /><a href=\"index.php?action=post&do=reply&fid={$forum['fid']}&tid={$thread['tid']}\">{$lang['post_reply']}</a>|<a href=\"index.php?action=post&do=newthread&fid={$forum['fid']}\">{$lang['post_new']}</a>\n"; if (!empty($postlist)) { echo "<br /><br />{$lang['thread_replylist']} ({$thread['replies']})<br />"; foreach ($postlist as $post) { $waptlength = 30; echo "<a href=\"index.php?action=thread&do=reply&tid={$post['tid']}&pid={$post['pid']}\">#" . ++$number . " " . wapcutstr(trim($post['message']), $waptlength) . "</a>" . "<br />[" . (!$post['anonymous'] ? $post['author'] . ' ' : $lang['anonymous'] . ' ') . gmdate("{$wapdateformat} {$timeformat}", $post['dateline'] + $timeoffset * 3600) . "]<br />"; } echo wapmulti($thread['replies'], $wapppp, $page, "index.php?action=thread&tid={$thread['tid']}"); } } elseif ($do == 'reply') { echo "<p>{$lang['thread_reply']}<a href=\"index.php?action=thread&tid={$thread['tid']}\">{$thread['subject']}</a><br />"; $post = $db->fetch_first("SELECT * FROM {$tablepre}posts WHERE pid='{$pid}' AND invisible='0'"); if ($offset > 0) { $post['message'] = '..' . substr($post['message'], $offset - 4); } if (strlen($threadposts) + strlen($post['message']) - $wapmps > 0) { $length = $wapmps - strlen($threadposts); $post['message'] = wapcutstr($post['message'], $length); $offset += $length; $breaked = 1; } $post['author'] = !$post['anonymous'] ? $post['author'] : $lang['anonymous']; $post['message'] = wapcode($post['message']);
echo "<p><a href=\"index.php?action=pm&do=list&unread=yes\">{$lang['pm_unread']}({$num_unread})</a><br />\n" . "<a href=\"index.php?action=pm&do=list\">{$lang['pm_all']}(" . ($num_read + $num_unread) . ")</a><br />\n" . "<a href=\"index.php?action=pm&do=send\">{$lang['pm_send']}</a><br />\n" . "<a href=\"index.php?action=pm&do=delete\">{$lang['pm_delete_all']}</a></p>"; } else { if ($do == 'list') { echo "<p>{$lang['pm_list']}<br />\n"; $unreadadd = empty($unread) ? '' : 'AND new>\'0\''; $pageadd = empty($unread) ? '' : '&unread=yes'; $page = max(1, intval($page)); $start_limit = $number = ($page - 1) * $waptpp; if (!($totalpms = $db->result_first("SELECT COUNT(*) FROM {$tablepre}pms WHERE msgtoid='{$discuz_uid}' AND folder='inbox' {$unreadadd}"))) { wapmsg('pm_nonexistence'); } $query = $db->query("SELECT pmid, new, msgfrom, subject, dateline FROM {$tablepre}pms\r\n\t\t\tWHERE msgtoid='{$discuz_uid}' AND folder='inbox' {$unreadadd}\r\n\t\t\tORDER BY dateline DESC\r\n\t\t\tLIMIT {$start_limit}, {$waptpp}"); while ($pm = $db->fetch_array($query)) { echo "<a href=\"index.php?action=pm&do=view&pmid={$pm['pmid']}\">#" . ++$number . ' ' . (empty($unread) && $pm['new'] ? "({$lang['unread']})" : '') . cutstr($pm['subject'], 30) . "</a><br />\n" . " <small>" . gmdate("{$wapdateformat} {$timeformat}", $pm['dateline'] + $timeoffset * 3600) . "<br />\n" . " {$pm['msgfrom']}</small><br />\n"; } echo wapmulti($totalpms, $waptpp, $page, "index.php?action=pm&do={$do}{$pageadd}"); echo "<br /><a href=\"index.php?action=pm&do=send\">{$lang['pm_send']}</a>\n"; } elseif ($do == 'view') { $pm = $db->fetch_first("SELECT * FROM {$tablepre}pms WHERE pmid='{$pmid}' AND msgtoid='{$discuz_uid}' AND folder='inbox'"); if (!$pm) { wapmsg('pm_nonexistence'); } echo "<p>{$lang['thread']}{$pm['subject']}<br />\n" . $lang['from'] . $pm['msgfrom'] . "<br />\n" . $lang['dateline'] . gmdate("{$wapdateformat} {$timeformat}", $pm['dateline'] + $timeoffset * 3600) . "<br />\n" . "<br />" . nl2br(dhtmlspecialchars(trim($pm['message']))) . "<br /><br />\n" . "<a href=\"index.php?action=pm&do=send&pmid={$pmid}\">{$lang['reply']}</a>\n" . "<a href=\"index.php?action=pm&do=delete&pmid={$pmid}\">{$lang['delete']}</a><br /><br />\n" . "<a href=\"index.php?action=pm&do=list\">{$lang['pm_all']}</a>"; $db->query("UPDATE {$tablepre}pms SET new='0' WHERE pmid='{$pmid}'"); } elseif ($do == 'send') { if (empty($msgto)) { if (!empty($pmid)) { $pm = $db->fetch_first("SELECT msgfrom, subject FROM {$tablepre}pms WHERE pmid='{$pmid}' AND msgtoid='{$discuz_uid}' AND folder='inbox'"); $pm['subject'] = 'Re: ' . $pm['subject']; } else { $pm = array('msgfrom' => '', 'subject' => '');
$page = max(1, intval($page)); $start_limit = $number = ($page - 1) * $waptpp; $index = $db->fetch_first("SELECT searchstring, keywords, threads, tids FROM {$tablepre}searchindex WHERE searchid='{$searchid}'"); if (!$index) { wapmsg('search_id_invalid'); } $index['keywords'] = rawurlencode($index['keywords']); $index['searchtype'] = preg_replace("/^([a-z]+)\\|.*/", "\\1", $index['searchstring']); $searchnum = $db->result_first("SELECT COUNT(*) FROM {$tablepre}threads WHERE tid IN ({$index['tids']}) AND displayorder>='0'"); if ($searchnum) { echo "<p>{$lang['search_result']}<br />"; $query = $db->query("SELECT * FROM {$tablepre}threads WHERE tid IN ({$index['tids']}) AND displayorder>='0' ORDER BY dateline DESC LIMIT {$start_limit}, {$waptpp}"); while ($thread = $db->fetch_array($query)) { echo "<a href=\"index.php?action=thread&tid={$thread['tid']}\">#" . ++$number . " " . cutstr($thread['subject'], 24) . "</a>({$thread['views']}/{$thread['replies']})<br />\n"; } echo wapmulti($searchnum, $waptpp, $page, "index.php?action=search&searchid={$searchid}&do=submit&sid={$sid}"); echo '</p>'; } else { wapmsg('search_invalid'); } } else { $srchtxt = trim(wapconvert($srchtxt)); $srchuname = trim(wapconvert($srchuname)); $srchuid = intval($srchuid); $searchstring = 'title|' . addslashes($srchtxt) . '|' . $srchuid . '|' . $srchuname; $searchindex = array('id' => 0, 'dateline' => '0'); $query = $db->query("SELECT searchid, dateline,\r\n\t\t\t('{$searchctrl}'<>'0' AND " . (empty($discuz_uid) ? "useip='{$onlineip}'" : "uid='{$discuz_uid}'") . " AND {$timestamp}-dateline<{$searchctrl}) AS flood,\r\n\t\t\t(searchstring='{$searchstring}' AND expiration>'{$timestamp}') AS indexvalid\r\n\t\t\tFROM {$tablepre}searchindex\r\n\t\t\tWHERE ('{$searchctrl}'<>'0' AND " . (empty($discuz_uid) ? "useip='{$onlineip}'" : "uid='{$discuz_uid}'") . " AND {$timestamp}-dateline<{$searchctrl}) OR (searchstring='{$searchstring}' AND expiration>'{$timestamp}')\r\n\t\t\tORDER BY flood"); while ($index = $db->fetch_array($query)) { if ($index['indexvalid'] && $index['dateline'] > $searchindex['dateline']) { $searchindex = array('id' => $index['searchid'], 'dateline' => $index['dateline']); break;
while ($thread = $sdb->fetch_array($query)) { $thread['prefix'] .= $thread['displayorder'] > 0 ? $lang['forum_thread_sticky'] : ''; $thread['prefix'] .= $thread['digest'] ? $lang['forum_thread_digest'] : ''; echo "<a href=\"index.php?action=thread&tid={$thread['tid']}\">#" . ++$number . " " . cutstr($thread['subject'], 30) . "</a>{$thread['prefix']}<br />\n" . "<small>[{$thread['author']} {$lang['replies']}{$thread['replies']} {$lang['views']}{$thread['views']}]</small><br />\n"; } echo wapmulti($threadcount, $waptpp, $page, "index.php?action=forum&fid={$forum['fid']}&sid={$sid}"); if ($do != 'digest') { $subforums = ''; foreach ($_DCACHE['forums'] as $subforum) { if ($subforum['type'] == 'sub' && $subforum['fup'] == $fid && (!$forum['viewperm'] || strexists("\t" . trim($forum['viewperm']) . "\t", "\t" . trim($groupid) . "\t"))) { $subforums .= "<a href=\"index.php?action=forum&fid={$subforum['fid']}\">" . strip_tags($subforum['name']) . "</a><br />"; } } if (!empty($subforums)) { echo "<br /><br />{$lang['forum_sublist']}<br />" . $subforums; } } echo (!empty($allowsearch) ? "<br /><br /><a href=\"index.php?action=post&do=newthread&fid={$forum['fid']}\">{$lang['post_new']}</a><br />" . "<a href=\"index.php?action=my&do=fav&favid={$forum['fid']}&type=forum\">{$lang['my_addfav']}</a><br />" . "<input type=\"text\" name=\"srchtxt\" value=\"\" size=\"6\" format=\"M*m\" emptyok=\"true\"/>" . "<anchor title=\"submit\">{$lang['search']}\n" . "<go method=\"post\" href=\"index.php?action=search&srchfid={$forum['fid']}&do=submit&sid={$sid}\">\n" . "<postfield name=\"srchtxt\" value=\"\$(srchtxt)\" />\n" . "</go></anchor><br />" : '') . "</p>"; } else { echo "<p>{$lang['home_forums']}<br />"; $forumcount = $db->result_first("SELECT COUNT(*) FROM {$tablepre}forums WHERE status>0 AND type='forum'"); $sql = !empty($accessmasks) ? "SELECT f.fid, f.name, ff.viewperm, a.allowview FROM {$tablepre}forums f\r\n\t\t\t\tLEFT JOIN {$tablepre}forumfields ff ON ff.fid=f.fid\r\n\t\t\t\tLEFT JOIN {$tablepre}access a ON a.uid='{$discuz_uid}' AND a.fid=f.fid\r\n\t\t\t\tWHERE f.status>0 AND f.type='forum' ORDER BY f.displayorder LIMIT {$start_limit}, {$waptpp}" : "SELECT f.fid, f.name, ff.viewperm FROM {$tablepre}forums f\r\n\t\t\t\tLEFT JOIN {$tablepre}forumfields ff USING(fid)\r\n\t\t\t\tWHERE f.status>0 AND f.type='forum' ORDER BY f.displayorder LIMIT {$start_limit}, {$waptpp}"; $query = $sdb->query($sql); while ($forum = $sdb->fetch_array($query)) { if (forum($forum) && (!$forum['viewperm'] || strexists("\t" . trim($forum['viewperm']) . "\t", "\t" . trim($groupid) . "\t") && $forum['viewperm'])) { echo "<a href=\"index.php?action=forum&fid={$forum['fid']}\">" . strip_tags($forum['name']) . "</a><br/>"; } } echo wapmulti($forumcount, $waptpp, $page, "index.php?action=forum&sid={$sid}"); echo "</p>"; }