/** Setup an individual page
  * @access public
  * @return void
  */
 public function pageAction()
 {
     if ($this->getParam('slug', 0)) {
         $this->view->contents = $this->_content->getContent('medievalcoins', (string) $this->getParam('slug'));
     } else {
         throw new Pas_Exception_Param($this->_missingParameter, 500);
     }
 }
 public function indexAction()
 {
     $content = new Content();
     $slug = $this->_getParam('slug');
     if ($slug == '\\d+') {
         $content = new Content();
         $this->view->contents = $content->getFrontContent('treports');
         $service = Zend_Gdata_Docs::AUTH_SERVICE_NAME;
         $client = Zend_Gdata_ClientLogin::getHttpClient($this->_config->webservice->google->username, $this->_config->webservice->google->password, $service);
         $docs = new Zend_Gdata_Docs($client);
         $docsQuery = new Zend_Gdata_Docs_Query();
         $docsQuery->setQuery('title:Treasure Annual Report');
         $feed = $docs->getDocumentListFeed($docsQuery);
         $documents = array();
         foreach ($feed->entries as $entry) {
             $title = $entry->title;
             foreach ($entry->link as $link) {
                 if ($link->getRel() === 'alternate') {
                     $altlink = $link->getHref();
                 }
             }
             $documents[] = array('title' => $title, 'altlink' => $altlink, 'updated' => $entry->updated, 'type' => $entry->content->type, 'published' => $entry->published);
         }
         $this->view->documents = $documents;
     } else {
         $this->view->contents = $content->getContent('treports', $this->_getParam('slug'));
     }
 }
 /** Render the index pages
  * @access public
  * @return void
  */
 public function indexAction()
 {
     $content = new Content();
     if (!in_array($this->getParam('slug'), array('gold', 'other'))) {
         $this->view->content = $content->getContent('bronzeage', $this->getParam('slug'));
     } else {
         if ($this->getParam('slug') == 'gold') {
             $this->view->content = $content->getContent('bronzeage', $this->getParam('slug'));
             $this->view->menu = 'gold';
         } else {
             if ($this->getParam('slug') == 'other') {
                 $this->view->content = $content->getContent('bronzeage', $this->getParam('slug'));
                 $this->view->menu = 'other';
             }
         }
     }
 }
 /** The default action - show the home page
  */
 public function indexAction()
 {
     if ($this->_getParam('slug', 0)) {
         $content = new Content();
         $this->view->content = $content->getContent('frg', $this->_getParam('slug'));
     } else {
         throw new Pas_ParamException($this->_missingParameter);
     }
 }
 /** Set up each page
  * @access public
  * @return void
  * @throws Pas_Exception_Param
  */
 public function indexAction()
 {
     if ($this->getParam('slug', false)) {
         $content = new Content();
         $this->view->contents = $content->getContent('conservation', $this->getParam('slug'));
     } else {
         throw new Pas_Exception_Param('That page is not found.', 404);
     }
 }
 /** Setup an individual page
  */
 public function pageAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('medievalcoins', (string) $this->_getParam('slug'));
 }
 /** Display the list of topics or individual pages.
  */
 public function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('info', $this->_getParam('slug'));
 }
 /**  Render the index page
  */
 function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('treasure', $this->getRequest()->getParam('slug'));
 }
 /** Set up individual page
  */
 public function pageAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('romancoins', $this->_getParam('slug'));
 }
Beispiel #10
0
<?php

include_once "../includes/webservice.inc.php";
$webService = new Webservices_Writer();
$webService->init();
$contentObj = new Content();
$result = $contentObj->getContent();
if (count($result) > 0) {
    $webService->createXMLInstance();
    $webService->appendArrayToRootNode('', $result);
    $webService->displayXML();
} else {
    $xmls = $webService->errorXML(join(",", $contentObj->errorMessages));
    $webService->outputXML($xmls);
}
 /** The index action
  * @access public
  * @return void
  */
 public function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('research', 'advice-for-researchers');
 }
Beispiel #12
0
require 'vendor/autoload.php';
include 'tempM/databaseAccess.php';
include 'models/content.php';
include 'models/mmscontent.php';
$app = new \Slim\Slim(array('mode' => 'development'));
require 'routes/crawl.php';
$app->get('/hello/:name', function ($name) {
    echo "Hello " . $name;
});
$app->get('/', function () use($app) {
    echo 'You have reached the API home route for Linkubi MMS App';
});
$app->get('/content', function () {
    $content = new Content();
    $result = $content->getContent();
    header("Content-Type: application/json");
    echo json_encode($result);
});
$app->get('/content/:id', function ($id) {
    $content = new Content();
    $result = $content->getContentById($id);
    header("Content-Type: application/json");
    echo json_encode($result);
});
$app->get('/mms_content/:id', function ($id) {
    $content = new MmsContent();
    $result = $content->getMmsContentById($id);
    header("Content-Type: application/json");
    echo json_encode($result);
});
Beispiel #13
0
 /** Display list of RSS feeds.
  */
 public function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('datalabs', 'rss');
 }
 /** Render treasure report pages
  * @access public
  * @return void
  */
 public function treasureAction()
 {
     //Magic in view
     $content = new Content();
     $this->view->contents = $content->getContent('treports', $this->getParam('slug'));
 }
Beispiel #15
0
    function setContent($content_body)
    {
        $this->content_body = htmlentities("{$content_body}");
    }
    function getContent()
    {
        return $this->content_body;
    }
}
/* Test Id */
$content = new Content();
$content->setID();
$content->setID();
$content->setID();
$content->setID();
$content->setID();
$content->setID() . '<br/>';
$content->setAuthor('Guillermina', 'Gonjon') . '<br/>';
$content->setTitle("this is my title") . '<br/>';
$content->setContent("This is an example of what this page can do.  This is my content for this page.");
echo $content->getAuthor() . '<br/>';
echo $content->getDate() . '<br/>';
echo $content->getTitle() . '<br/>';
echo $content->getContent() . '<br/>';
$theid = $content->content_id;
echo $content->formatID($theid) . '<br/>';
var_dump($content);
//echo $content->formatted_id.'<br/>';
$output = shell_exec('cal 2016 | grep 2016') . '<br/>';
//echo "<pre>$output</pre>";
//echo "<br>".phpversion().'<br/>';
 /** Show the intro content for the section
  * @access public
  * @return void
  */
 public function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getContent('getinvolved', $this->getRequest()->getParam('slug'));
 }