-
Notifications
You must be signed in to change notification settings - Fork 1
/
ListOfAttendeesHandler.inc.php
52 lines (38 loc) · 1.69 KB
/
ListOfAttendeesHandler.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* @file ListOfAttendeesHandler.inc.php
*
* Copyright (c) 2013 Péter Fankhauser
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @package plugins.generic.listOfAttendees
* @class ListOfAttendeesHandler
*
* Find the content and display the appropriate page
*
*/
import('handler.Handler');
class ListOfAttendeesHandler extends Handler {
function index() {
AppLocale::requireComponents(array(LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_APPLICATION_COMMON));
$templateMgr =& TemplateManager::getManager();
$conference =& Request::getConference();
$schedConf =& Request::getSchedConf();
$schedConfId = ($schedConf ? $schedConf->getId() : $conference->getId());
$templateMgr->addStyleSheet(Request::getBaseUrl().'/plugins/generic/listOfAttendees/listOfAttendees.css');
$templateMgr->assign('pageHierarchy', array(
array(Request::url(null, 'index', 'index'), $conference->getConferenceTitle(), true),
array(Request::url(null, null, 'index'), $schedConf->getSchedConfTitle(), true)));
$templateMgr->assign('title', __('plugins.generic.listOfAttendees.pageTitle'));
$listOfAttendeesDAO =& DAORegistry::getDAO('ListOfAttendeesDAO');
$attendees =& $listOfAttendeesDAO->getListOfAttendees($schedConfId);
$attendees =& $attendees->toArray();
$templateMgr->assign_by_ref('attendees', $attendees);
$countryDao =& DAORegistry::getDAO('CountryDAO');
$countries =& $countryDao->getCountries();
$templateMgr->assign_by_ref('countries', $countries);
$listOfAttendeesPlugin =& PluginRegistry::getPlugin('generic', 'ListOfAttendeesPlugin');
$templateMgr->display($listOfAttendeesPlugin->getTemplatePath().'index.tpl');
}
}
?>