<?php

require "pumaDigitalLibrary.php";
$puma = new PumaDigitalLibrary();
$result = $puma->getListOfAuthorsJSON();
echo "************************************************" . PHP_EOL;
echo "{$result}" . PHP_EOL;
echo "************************************************" . PHP_EOL;
Beispiel #2
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
require "include/puma/pumaDigitalLibrary.php";
if (!$_SESSION['username']) {
    $main = new Skin("nevia");
} else {
    $main = new Skin("loggato");
}
$body = new Skinlet("pubs");
/* fetch json encoded publication from the puma system */
$puma = new PumaDigitalLibrary();
//$result = $puma->getPublicationsByAuthorJSON("polini", "andrea");
$result = $puma->getPublicationsByTypeJSON();
$result = json_decode($result);
foreach ($result as $type => $row) {
    /*if ($type == "Journal articles") {
    		$type = "Publications";
    	}*/
    $body->setContent("type", $type);
    foreach ($row as $year => $row) {
        $body->setContent("year", $year);
        foreach ($row as $row) {
            foreach ($row as $name => $value) {
                /*if ($name == "link") {
                        			foreach ($value as $name => $value2) {
                        				echo "-> $name: {$value[$name]}<br>";
                        			}
<?php

Header("Content-type: text/plain");
require "include/puma/pumaDigitalLibrary.php";
$puma = new PumaDigitalLibrary();
$result = $puma->getPublicationsByAuthorJSON("polini", "andrea");
$result = json_decode($result);
foreach ($result as $type => $row) {
    echo "\n TYPE ", $type, "\n\n";
    foreach ($row as $year => $row) {
        echo "\n YEAR ", $year, "\n\n";
        foreach ($row as $row) {
            foreach ($row as $name => $value) {
                echo "{$name}: {$value}\n";
            }
        }
    }
}