-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconf-new.php
More file actions
123 lines (111 loc) · 3.21 KB
/
conf-new.php
File metadata and controls
123 lines (111 loc) · 3.21 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
/**
* User: Hans-Gert Gräbe
* last update: 2020-11-06
*/
require 'vendor/autoload.php';
require_once 'helper.php';
require_once 'layout.php';
function theEvent($v,$graph) {
$label=$v->get("schema:name");
$start=$v->get("schema:startDate");
$end=$v->get("schema:endDate");
$description=$v->get("schema:description");
$about=$v->get("schema:about");
$loc=$v->get("schema:location");
if ($loc) { $location=$loc->get("schema:name"); }
$url=$v->all("schema:url");
$workPresented=getWorkPresented($v);
$series=$v->get("od:toConferenceSeries");
$out='
<h2>'.$label.'</h2>
<ul>
<li>From '.showDate($start).' until '.showDate($end).'</li>
';
if ($series) {
$name=$graph->resource($series)->get("rdfs:label");
$out.='
<li><strong>Conference Series: </strong>'.$name.'</li>';
}
if ($location) {
$out.='
<li><strong>Location: </strong>'.$location.'</li>';
}
if ($summary) {
$out.='
<li><strong>Summary: </strong>'.$summary.'</li>';
}
if ($description) {
$out.='
<li><strong>Description: </strong>'.$description.'</li>';
}
if ($url) {
$out.='
<li><strong>URL: </strong>'
.join("<br/> ",array_map('createLink',$url,$url)).'</li>';
}
if ($workPresented) {
$out.='
<li><strong>Sources: </strong>'.join("<br/> ",$workPresented).'</li>';
}
if ($details) {
$link="conferences.php?conference=$details";
$out.='
<li><strong>'.createLink($link,"Detailed Report").'</strong></li>';
}
if ($reports) {
$out.='
<li><strong>Personal Reports: </strong>'
.join("<br/> ",array_map('createLink',$reports,$reports)).'</li>';
}
if ($fotos) {
$out.='
<li><strong>Conference Fotos: </strong>'
.join("<br/> ",array_map('createLink',$fotos,$fotos)).'</li>';
}
if ($videos) {
$out.='
<li><strong>Conference Videos: </strong>'
.join("<br/> ",array_map('createLink',$videos,$videos)).'</li>';
}
return $out.'
</ul>';
}
function getWorkPresented($v) {
$a=array();
foreach($v->all("schema:workPresented") as $entry) {
$link=$entry->get("schema:url");
$what=$entry->get("schema:name");
$a[]=createLink($link,$what);
}
return $a;
}
function generalConferenceInfo($graph) {
$graph->parseFile("rdf/Konf.rdf");
$res = $graph->allOfType('schema:Event');
$a=array();
foreach ($res as $entry) {
$start=$entry->get("schema:startDate");
$a["$start"]=theEvent($entry,$graph);
}
krsort($a);
return theTitle().'<ul>'.join("\n",$a).'</ul>';
}
function theTitle() {
return '
<h2 align="center"> Past TRIZ Conferences </h2>
<p>This web site is generated from the RDF descriptions of different
conferences collected within our
<a href="https://github.com/wumm-project/RDFData">RDFData subproject</a>. </p>
';
}
function mainConferences() {
setNamespaces();
$graph = new \EasyRdf\Graph('http://opendiscovery.org/rdf/Conference/');
$graph->parseFile("rdf/ConferenceSeries.rdf");
$out=generalConferenceInfo($graph);
return '<div class="container">'.$out.'</div>';
}
echo showpage(mainConferences());
// echo mainConferences(); // for testing
?>