} if ($createtime_s) { $data['createtime_s'] = PwStrtoTime($createtime_s); $url_add .= '&createtime_s=' . $createtime_s; } if ($createtime_e) { $data['createtime_e'] = PwStrtoTime($createtime_e); $url_add .= '&createtime_e=' . $createtime_e; } $limit = intval($limit); $limit < 1 && ($limit = 30); $url_add .= "&orderway={$orderway}&ordertype={$ordertype}&limit={$limit}"; !$orderway && ($orderway = 'id'); require_once A_P . 'lib/active.class.php'; $newActive = new PW_Active(); list($activedb, $total) = $newActive->searchList($data, $limit, ($page - 1) * $limit, $orderway, $ordertype, true); if (empty($activedb)) { //Showmsg('没有找到相关的活动!'); } $pages = numofpage($total, $page, ceil($total / $limit), "{$basename}&job=list{$url_add}&"); $uids = $cids = array(); foreach ($activedb as $key => $value) { $activedb[$key]['createtime'] = get_date($value['createtime']); $uids[] = $value['uid']; $cids[] = $value['cid']; } $users = array(); if ($uids) { $userService = L::loadClass('UserService', 'user'); /* @var $userService PW_UserService */ $users = $userService->getUserNamesByUserIds($uids);
$membersLimit = 20; $actMembers = $newActive->getActMembers($id, $membersLimit); $webPageTitle = $colonySeo->getPageTitle($active['title'], $colony['cname']); $metaDescription = $colonySeo->getPageMetadescrip($active['introduction']); $metaKeywords = $colonySeo->getPageMetakeyword($active['title'], $colony['cname']); $active['content'] = str_replace("\n", '<br />', $active['content']); require_once R_P . 'require/bbscode.php'; $active['content'] = convert($active['content'], $db_windpost); if ($attachs = $newActive->getAttById($id)) { extract(L::style()); $attachShow = new attachShow($isGM || $pwSystem['delattach'], '', 0, 'active'); $attachShow->setData($attachs); $active += $attachShow->parseAttachs('tpc', $active['content'], $winduid == $active['uid']); } $newActive->updateHits($id); list($newactivedb) = $newActive->searchList(array('cid' => $cyid), 3, 0, 'id', 'DESC'); $hotactivedb = $newActive->getHotActive(3); $relateactivedb = $newActive->getRelateActive($id, 3); list($commentdb, $subcommentdb, $pages, $count) = getCommentDbByTypeid('active', $id, $page, "{$basename}a={$a}&job={$job}&cyid={$cyid}&id={$id}&"); $comment_type = 'active'; $comment_typeid = $id; list($isheader, $isfooter, $tplname, $isleft) = array(false, true, "m_group", true); } elseif ($job == 'quit') { define('AJAX', 1); S::gp(array('id')); require_once A_P . 'groups/lib/active.class.php'; $newActive = new PW_Active(); if (!($active = $newActive->getActiveById($id)) || $active['cid'] != $cyid) { Showmsg('data_error'); } if (empty($_POST['step'])) {