|
Last change
on this file since 72 was
72,
checked in by dkg, 6 years ago
|
|
JPDD: added organizations (with descriptions), editable by admins.
|
|
File size:
1.7 KB
|
| Line | |
|---|
| 1 | <?php /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 2; -*- |
|---|
| 2 | |
|---|
| 3 | */ |
|---|
| 4 | |
|---|
| 5 | require_once 'class.dkg.site.php'; |
|---|
| 6 | |
|---|
| 7 | if (!class_exists('JPDD_JPDD')) { |
|---|
| 8 | |
|---|
| 9 | class JPDD_JPDD extends DKG_Site { |
|---|
| 10 | |
|---|
| 11 | function JPDD_JPDD() { |
|---|
| 12 | $this->DKG_Site(); |
|---|
| 13 | $this->addClassMapEntry('workshop', array('classname' => 'JPDD_Workshop', |
|---|
| 14 | 'filename' => 'class.jpdd.workshop.php', |
|---|
| 15 | 'table' => 'workshop')); |
|---|
| 16 | $this->addClassMapEntry('person', array('classname' => 'JPDD_Person', |
|---|
| 17 | 'filename' => 'class.jpdd.person.php', |
|---|
| 18 | 'table' => 'person')); |
|---|
| 19 | $this->addClassMapEntry('organization', array('classname' => 'JPDD_Organization', |
|---|
| 20 | 'filename' => 'class.jpdd.organization.php', |
|---|
| 21 | 'table' => 'organization')); |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | function getDefaultPage() { |
|---|
| 26 | return '<h1>'.$this->_site_name.'</h1>'.$this->getLoginForm().'<div style="clear:both;">'.$this->viewListing('workshop').'</div>'; |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | function getWorkshops() { |
|---|
| 30 | $this->prepClass('workshop'); |
|---|
| 31 | $workshops = $this->getSeriesFromSQL('SELECT * FROM workshop ORDER BY title', 'JDPP_Workshop'); |
|---|
| 32 | |
|---|
| 33 | $ret = '<dl>'; |
|---|
| 34 | reset($workshops); |
|---|
| 35 | while (list(,$workshop) = each($workshops)) { |
|---|
| 36 | $ret .= '<dt><a href="'.$this->Path('workshop', (int)($workshop->_id)).'">'.htmlentities($workshop->_title).'</a></dt>'. |
|---|
| 37 | '<dd>'.htmlentities($workshop->_description).'</dd>'; |
|---|
| 38 | } |
|---|
| 39 | return $ret.'</ul>'; |
|---|
| 40 | } |
|---|
| 41 | } |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | global $jpdd; |
|---|
| 45 | |
|---|
| 46 | ?> |
|---|
Note: See
TracBrowser
for help on using the repository browser.