function getNews() { EasyRdf_Namespace::set('sd', 'http://symbolicdata.org/Data/Model#'); EasyRdf_Namespace::set('sioc', 'http://rdfs.org/sioc/ns#'); $query1 = ' PREFIX sd: <http://symbolicdata.org/Data/Model#> construct { ?a ?b ?c . } from <http://symbolicdata.org/Data/News/> Where { ?a a sioc:BlogPost ; ?b ?c . } '; $query2 = ' PREFIX sd: <http://symbolicdata.org/Data/Model#> construct { ?p foaf:name ?n . } from <http://symbolicdata.org/Data/News/> from <http://symbolicdata.org/Data/People/> Where { ?a a sioc:BlogPost ; dc:publisher ?p . ?p foaf:name ?n . } '; $sparql = new EasyRdf_Sparql_Client('http://symbolicdata.org:8890/sparql'); $result = $sparql->query($query1); // a CONSTRUCT query returns an EasyRdf_Graph //echo $result->dump("turtle"); $people = $sparql->query($query2); //echo $people->dump("turtle"); /* generate data structure for output table */ $s = array(); foreach ($result->allOfType("sioc:BlogPost") as $v) { $a = $v->getUri(); $label = $v->get('rdfs:label'); $created = $v->get('dc:created'); $subject = $v->join('dc:subject'); $abstract = $v->get('dc:abstract'); $publisher = $people->get($v->get('dc:publisher'), 'foaf:name'); $link = $v->get('sioc:link'); $linksTo = $v->get('sioc:links_to'); $out = '<p><dl> <dt><strong><a href="' . $a . '">' . $label . '</a></strong></dt> '; $out .= addLine($created, "Created"); $out .= addLine($subject, "Subject"); $out .= addLine($abstract, "Abstract"); $out .= addLine($publisher, "Publisher"); $out .= addLink($link, "More"); $out .= addLink($linksTo, "Links to"); $out .= '</dl></p>'; $s["{$created_}{$a}"] = $out; } krsort($s); return join($s, "\n"); }
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_POST['src'] == $_POST['dest']) { ?> <span style="font-family: Courier;"> Please specify DIFFERENT source and destination directory names! </span><?php } elseif (is_readable($_POST['src']) && is_writable($_POST['dest'])) { // Save current settings $code = ''; $code .= addLine('source', $_POST['src']); $code .= addLine('destination', $_POST['dest']); foreach ($availableDirectives as $id => $void) { if (isset($_POST['f'][$id])) { $code .= addLine($id, '1'); } else { $code .= addLine($id, '0'); } } file_put_contents('./savedsettings.ini', $code); foreach ($projectFiles as $file) { $src = file($_POST['src'] . $file); if ($file == 'opt.compiler.php') { echo $src[0] . '<br/>'; } $cutting = 0; $nesting = 0; foreach ($src as $i => $line) { if (preg_match('/# (\\/?)([A-Z_0-9]+)/', trim($line), $found)) { if (isset($availableDirectives[$found[2]]) && !isset($_POST['f'][$found[2]])) { if ($found[1] == '/') { if ($nesting == 1) {
This file and it's functions are to be used solely by ../lists/editList.php in conjunction with ../js/editlist.js. All functions are listed in alphabetical order. */ $fileInfo = array('fileName' => 'includes/editListMethods.php'); $debug->newFile($fileInfo['fileName']); $success = false; initializeList(); if (isset($_SESSION['listId']) && (bool) $_SESSION['listId']) { if (isset($_SESSION['listRoleId']) && $_SESSION['listRoleId'] > 0) { if ($_SESSION['listRoleId'] > 1) { //List roles edit or greater. if (MODE == 'addComment') { addComment(); } elseif (MODE == 'addLine') { addLine(); } elseif (MODE == 'createNewCharacter') { createNewCharacter(); } elseif (MODE == 'buildCharactersList') { buildCharactersList(); } elseif (MODE == 'deleteLine') { deleteLine(); } elseif (MODE == 'deleteCharacter') { deleteCharacter(); } elseif (MODE == 'deleteComment') { deleteComment(); } elseif (MODE == 'editCharacterPart1') { editCharacterPart1(); } elseif (MODE == 'editCharacterPart2') { editCharacterPart2(); } elseif (MODE == 'editLinePart1') {