Ejemplo n.º 1
0
 function getGroupSignupHtml($data)
 {
     //群组活动的状态获取
     global $winduid;
     $replaceArray = $data;
     require_once A_P . 'groups/lib/active.class.php';
     $newActive = new PW_Active();
     if ($this->timestamp > $data['endtime']) {
         $activityStatusKey = 'activity_is_ended';
     } elseif ($this->timestamp > $data['deadline'] && $this->timestamp > $data['begintime']) {
         $activityStatusKey = 'activity_group_running';
     } elseif ($this->timestamp > $data['deadline']) {
         $activityStatusKey = 'signup_is_ended';
     } elseif ($data['limitnum'] && $data['members'] >= $data['limitnum']) {
         $activityStatusKey = 'signup_number_limit_is_reached';
     } elseif ($newActive->isJoin($data['id'], $winduid) && $winduid != $data['uid']) {
         $activityStatusKey = 'activity_is_joined';
     } elseif ($winduid == $data['uid']) {
         $activityStatusKey = 'activity_group_edit';
     } else {
         $activityStatusKey = 'group_is_available_for_member';
     }
     $signupHtml = '<p class="t3">';
     $signupHtml .= $this->getSignupHtmlByActivityKey($activityStatusKey, $replaceArray);
     $signupHtml .= '</p>';
     return $signupHtml;
 }
Ejemplo n.º 2
0
         S::gp(array('realname', 'phone', 'mobile', 'address', 'anonymous'));
         $return = $newActive->appendMember($id, $winduid, array('realname' => $realname, 'phone' => $phone, 'mobile' => $mobile, 'address' => $address, 'anonymous' => $anonymous));
         $return !== true && Showmsg($return);
         Showmsg("报名成功\treload");
     }
 } elseif ($job == 'view') {
     S::gp(array('id', 'page'), '', 2);
     $page < 1 && ($page = 1);
     $tmpActionUrl .= '&job=view&id=' . $id;
     require_once A_P . 'groups/lib/active.class.php';
     $newActive = new PW_Active();
     if (!($active = $newActive->getActiveInfoById($id)) || $active['cid'] != $cyid) {
         Showmsg('data_error');
     }
     //检查是否是群组的成员
     $isJoin = $newActive->isJoin($id, $winduid);
     require_once R_P . 'require/showimg.php';
     list($active['icon']) = showfacedesign($active['icon'], 1, 'm');
     $active = $newActive->convert($active);
     $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);