aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/MeetController.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2010-10-30 16:53:58 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2010-10-30 16:53:58 +0000
commitde4b3670d8252fe180f634fe17647226b9a1b2a6 (patch)
tree3197c660fee107785ddb7abbe087c7d0247d2a9b /h-source/Application/Controllers/MeetController.php
parent19272c7c88f5df7fbba47f120efe440b5a472315 (diff)
improved users history - part 2
Diffstat (limited to 'h-source/Application/Controllers/MeetController.php')
-rw-r--r--h-source/Application/Controllers/MeetController.php38
1 files changed, 37 insertions, 1 deletions
diff --git a/h-source/Application/Controllers/MeetController.php b/h-source/Application/Controllers/MeetController.php
index d2ccc27..314f273 100644
--- a/h-source/Application/Controllers/MeetController.php
+++ b/h-source/Application/Controllers/MeetController.php
@@ -34,6 +34,7 @@ class MeetController extends BaseController
$this->model('HardwareModel');
$this->model('IssuesModel');
$this->model('MessagesModel');
+ $this->model('TalkModel');
$argKeys = array(
'page:forceNat' => 1,
@@ -107,9 +108,12 @@ class MeetController extends BaseController
$messNumb = $this->m['MessagesModel']->select('id_mes,messages.id_issue,messages.creation_date')->where(array('created_by'=>$clean['id_user'],'deleted'=>'no'))->rowNumber();
+ $talkNumb = $this->m['TalkModel']->select('talk.title')->where(array('created_by'=>$clean['id_user'],'deleted'=>'no'))->rowNumber();
+
$data['hasHardware'] = $hardNumb > 0 ? true : false;
$data['hasIssues'] = $issuesNumb > 0 ? true : false;
$data['hasMessages'] = $messNumb > 0 ? true : false;
+ $data['hasTalk'] = $talkNumb > 0 ? true : false;
$this->append($data);
$this->load('contributions');
@@ -208,7 +212,39 @@ class MeetController extends BaseController
$this->load('messages');
$this->right();
}
+ }
+
+ //messages in the talk page
+ public function talk($lang = 'en', $user = '')
+ {
+ $clean['user'] = ctype_alnum($user) ? sanitizeAll($user) : '';
+ $data['title'] = "messages submitted - ".Website::$generalName;
+
+ $this->shift(2);
+
+ if ($this->userExists($clean['user']))
+ {
+ //load the Pages helper
+ $this->helper('Pages','meet/talk/'.$this->lang.'/'.$clean['user'],'page');
+
+ $clean['id_user'] = (int)$this->m['UsersModel']->getUserId($clean['user']);
+ $this->m['TalkModel']->from('talk inner join hardware')->using('id_hard')->select('talk.title,talk.creation_date,talk.id_hard,talk.id_talk,hardware.type')->where(array('created_by'=>$clean['id_user'],'deleted'=>'no'))->orderBy('id_talk desc');
+
+ $recordNumber = $this->m['TalkModel']->rowNumber();
+ $page = $this->viewArgs['page'];
+
+ $this->m['TalkModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,20);
+
+ $data['table'] = $this->m['TalkModel']->send();
+
+ $data['meet_username'] = $clean['user'];
+
+ $data['pageList'] = $this->h['Pages']->render($page-3,7);
+
+ $this->append($data);
+ $this->load('talk');
+ $this->right();
+ }
}
-
} \ No newline at end of file