summaryrefslogtreecommitdiffstats
path: root/application/controllers/EventController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/EventController.php')
-rw-r--r--application/controllers/EventController.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index 09d08e2..4d4759d 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -34,7 +34,7 @@ class EventController extends Zend_Controller_Action
{
$events = $this->eventMapper->fetchAll();
if(is_array($events)) {
- $bootOsApiResult = PostToHost($this->pbs2host, '/resource/getbootos/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
+ $bootOsApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['getbootoss'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
$bootOsXMLString = $bootOsApiResult['http-body'];
$bootOsXML = new SimpleXMLElement($bootOsXMLString);
foreach($bootOsXML->bootoslist->bootos as $bootos) {
@@ -55,7 +55,7 @@ class EventController extends Zend_Controller_Action
$bootosobj->setTitle(sprintf("%s", $bootos->title));
$bootoslist[$bootosobj->getID()] = $bootosobj;
}
- $poolApiResult = PostToHost($this->pbs2host, '/resource/getpool/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
+ $poolApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['getpools'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
$poolXMLString = $poolApiResult['http-body'];
$poolXML = new SimpleXMLElement($poolXMLString);
foreach($poolXML->poollist->pool as $pool) {
@@ -90,7 +90,7 @@ class EventController extends Zend_Controller_Action
public function addAction()
{
$eventcategorylist = $this->eventcategoryMapper->fetchAll();
- $bootOsApiResult = PostToHost($this->pbs2host, '/resource/getbootos/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
+ $bootOsApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['getbootoss'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
$bootOsXMLString = $bootOsApiResult['http-body'];
$bootOsXML = new SimpleXMLElement($bootOsXMLString);
foreach($bootOsXML->bootoslist->bootos as $bootos) {
@@ -111,7 +111,7 @@ class EventController extends Zend_Controller_Action
$bootosobj->setTitle(sprintf("%s", $bootos->title));
$bootoslist[$bootosobj->getID()] = $bootosobj;
}
- $poolApiResult = PostToHost($this->pbs2host, '/resource/getpool/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
+ $poolApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['getpools'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
$poolXMLString = $poolApiResult['http-body'];
$poolXML = new SimpleXMLElement($poolXMLString);
foreach($poolXML->poollist->pool as $pool) {
@@ -134,7 +134,7 @@ class EventController extends Zend_Controller_Action
$event = new Application_Model_Event($this->getRequest()->getParams());
$event->setPbs_membershipID(1);
$bootmenuquery = "bootosID=" . $event->getPbs_bootosID() . "&startcounter=0&title=" . $event->getTitle() . "&defaultbootmenu=1&order=0&kcl=0";
- $bootmenuApiResult = PostToHost($this->pbs2host, '/resource/addbootmenu/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $bootmenuquery);
+ $bootmenuApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['addbootmenu'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $bootmenuquery);
$bootmenuXMLString = $bootmenuApiResult['http-body'];
$bootmenuXML = new SimpleXMLElement($bootmenuXMLString);
$bootmenuID = sprintf("%s", $bootmenuXML->bootmenuid);
@@ -163,10 +163,10 @@ class EventController extends Zend_Controller_Action
if(isset($eventID)) {
$event = new Application_Model_Event();
if($event->getPbs_bootmenuID()) {
- $bootmenuApiResult = PostToHost($this->pbs2host, '/resource/deletebootmenu/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_bootmenuID());
+ $bootmenuApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['deletebootmenu'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_bootmenuID());
}
if($event->getPbs_filterID()) {
- $filterApiResult = PostToHost($this->pbs2host, '/resource/deletefilter/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_filterID());
+ $filterApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['deletefilter'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_filterID());
}
$this->eventMapper->find($eventID, $event);
try {
@@ -187,7 +187,7 @@ class EventController extends Zend_Controller_Action
public function editAction()
{
$eventcategorylist = $this->eventcategoryMapper->fetchAll();
- $bootOsApiResult = PostToHost($this->pbs2host, '/resource/getbootos/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
+ $bootOsApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['getbootoss'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
$bootOsXMLString = $bootOsApiResult['http-body'];
$bootOsXML = new SimpleXMLElement($bootOsXMLString);
foreach($bootOsXML->bootoslist->bootos as $bootos) {
@@ -208,7 +208,7 @@ class EventController extends Zend_Controller_Action
$bootosobj->setTitle(sprintf("%s", $bootos->title));
$bootoslist[$bootosobj->getID()] = $bootosobj;
}
- $poolApiResult = PostToHost($this->pbs2host, '/resource/getpool/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
+ $poolApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['getbootoss'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', '');
$poolXMLString = $poolApiResult['http-body'];
$poolXML = new SimpleXMLElement($poolXMLString);
foreach($poolXML->poollist->pool as $pool) {
@@ -234,17 +234,17 @@ class EventController extends Zend_Controller_Action
$event = new Application_Model_Event();
$this->eventMapper->find($eventID, $event);
if($event->getPbs_bootmenuID()) {
- $bootmenuApiResult = PostToHost($this->pbs2host, '/resource/deletebootmenu/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_bootmenuID());
+ $bootmenuApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['deletebootmenu'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_bootmenuID());
unset($bootmenuApiResult);
}
if($event->getPbs_filterID()) {
- $filterApiResult = PostToHost($this->pbs2host, '/resource/deletefilter/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_filterID());
+ $filterApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['deletefilter'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_filterID());
unset($filterApiResult);
}
$event->setOptions($this->getRequest()->getParams());
$event->setID($eventID);
$bootmenuquery = "bootosID=" . $event->getPbs_bootosID() . "&startcounter=0&title=" . $event->getTitle() . "&defaultbootmenu=1&order=0&kcl=0";
- $bootmenuApiResult = PostToHost($this->pbs2host, '/resource/addbootmenu/apikey/apikey1', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $bootmenuquery);
+ $bootmenuApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['addbootmenu'] . $this->config['pbs2']['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', $bootmenuquery);
$bootmenuXMLString = $bootmenuApiResult['http-body'];
$bootmenuXML = new SimpleXMLElement($bootmenuXMLString);
$bootmenuID = sprintf("%s", $bootmenuXML->bootmenuid);