Ejemplo n.º 1
0
 function GetLikers()
 {
     //$this->GotoLogin();
     $item_id = $this->Post['item_id'] ? $this->Post['item_id'] : $this->Get['item_id'];
     $item = $this->Post['item'] ? $this->Post['item'] : $this->Get['item'];
     $from = $this->Post['from'] ? $this->Post['from'] : $this->Get['from'];
     $childDivId = $this->Post['key'] ? $this->Post['key'] : $this->Get['key'];
     $baobei = $this->baobeiLogic->GetBaobeiDetail($item_id, $from);
     $this->TemplateHandler->AssignValue('baobei', $baobei);
     $page = $this->Post['page'] ? $this->Post['page'] : $this->Get['page'];
     $pageSize = $this->Config['item_boxy_pagesize'];
     $pstepsize = $this->Config['page_step_size_likers'];
     if ($page == '') {
         $page = 1;
     }
     $result = $this->baobeiLogic->GetBaobeiFans($item_id, $page, $pageSize, 'baobei');
     $total = $result['total'];
     $records = $result['data'];
     $this->TemplateHandler->AssignValue('item_likers', $records);
     $url = "ajax.main.php?mod=baobei&action=getfans&item_id={$item_id}&item={$item}";
     $pageHtml = BoxyPagerRecords($childDivId, $url, $pageSize, $page, $total, $pstepsize);
     $this->TemplateHandler->AssignValue('pageHtml', $pageHtml);
     $this->TemplateHandler->AssignValue('total', $total);
     $this->TemplateHandler->Display('item_likers.html');
 }
Ejemplo n.º 2
0
 function GetEvents()
 {
     $create_uid = $this->QueryString('cuid');
     $apply_id = $this->QueryString('apply_id');
     $page = $this->QueryString('page');
     $clientFunName = $this->QueryString('clientFun');
     $div = $this->QueryString('div');
     $ids = '';
     if ($page == '' || !$page) {
         $page = 1;
     }
     $pageSize = 20;
     $pstepsize = 5;
     if ($apply_id && $apply_id > 0) {
         $ids = "select event_id from event_application where uid={$apply_id}";
     }
     $events = $this->EventLogic->SearchEvents($create_uid, $ids, '', '', '', $page, $pageSize);
     $total = $events['total'];
     $events = $events['data'];
     $return = array();
     if ($total == 0) {
         $return['status'] = 'failed';
         $return['message'] = urlencode("没有找到匹配的活动!");
         echo urldecode(json_encode($return));
         exit;
     }
     $url = "ajax.main.php?mod=event&action=getevent&cuid=" . $create_uid . "&apply_id=" . $apply_id;
     $pageHtml = BoxyPagerRecords($div, $url, $pageSize, $page, $total, $pstepsize, $clientFunName);
     $events = ArrayToJson($events);
     $return['status'] = 'ok';
     $return['message'] = urlencode("找到匹配的活动!");
     $return['item'] = $events;
     $return['pager'] = $pageHtml;
     $this->Logger->Write(urldecode(json_encode($return)));
     echo urldecode(json_encode($return));
 }
Ejemplo n.º 3
0
 function GetVote_Votes_User()
 {
     $vote_id = $this->QueryString('id');
     $getmyfollowings = $this->QueryString("getmyfollowings");
     $page = $this->QueryString('page');
     $clientFunName = $this->QueryString('clientFun');
     $div = $this->QueryString('div');
     $pageSize = $this->Config['vote_votes_user_pagesize'];
     $pstepsize = 5;
     if (!$page || $page == '') {
         $page = 1;
     }
     $uids = "";
     if (!$getmyfollowings || $getmyfollowings == '') {
         $getmyfollowings = 0;
     }
     if ($getmyfollowings == 1) {
         $this->NoLoginAjaxReturn();
         $current_uid = $this->User['uid'];
         $uids = "select uid from vote_vote where vid={$vote_id} and uid in(select buddyid from buddys where uid={$current_uid})";
     }
     $results = $this->VoteLogic->GetVote_VotesByUser($vote_id, $uids, $page, $pageSize);
     $total = $results['total'];
     $voteUsers = $results['data'];
     $voteUsers = ArrayToJson($voteUsers);
     $url = "ajax.main.php?mod=vote&action=votesuser&id=" . $vote_id . "&getmyfollowings=" . $getmyfollowings;
     $pageHtml = BoxyPagerRecords($div, $url, $pageSize, $page, $total, $pstepsize, $clientFunName);
     if ($total == 0) {
         $return['status'] = 'ok';
         $return['message'] = urlencode("没有用户对此投票进行投票");
     } else {
         $return['status'] = 'ok';
         $return['message'] = urlencode("找到了投票的用户!");
         $return['item'] = $voteUsers;
         $return['pager'] = $pageHtml;
     }
     echo urldecode(json_encode($return));
 }