source: gs2-extensions/afrepo/trunk/src/src/html/sparql.php@ 27679

Last change on this file since 27679 was 27679, checked in by davidb, 8 years ago

Embelishment of the web content

File size: 1.7 KB
Line 
1<?php
2 require_once "setup.php";
3 $base = parse_url($repo->getURIPrefix());
4 $basepath = $base["path"];
5?>
6<!DOCTYPE HTML>
7<html>
8 <head>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
11 <link rel="stylesheet" href="css/core-style.css" type="text/css" media="screen" />
12
13
14 <title>SALAMI SPARQL Endpoint</title>
15 </head>
16
17 <body>
18 <div id="container">
19
20 <div id="header">
21 <h1>The SALAMI SPARQL Endpoint</h1>
22 </div>
23
24 <div id="navigation">
25 <ul>
26 <li class="selected"><a href="#">Home</a></li>
27 <li><a href="sparql.php">SPARQL</a></li>
28 <li><a href="contact.php">Contact</a></li>
29 </ul>
30 </div>
31
32 <div id="content-container">
33
34 <div id="content">
35
36 <form action="<?php echo htmlspecialchars($repo->getSparqlEndpoint()); ?>" method="post">
37<input type="hidden" name="output" value="text"/>
38
39 <textarea name="query" cols="80" rows="18">
40PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
41PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
42
43SELECT * WHERE {
44 ?s ?p ?o
45} LIMIT 10
46 </textarea><br>
47
48 <em>Soft limit</em> <input type="text" name="soft-limit">
49 <input type="submit" value="Execute"><input type="reset">
50
51
52 <select name="output">
53 <option>xml</option>
54 <option>json</option>
55 <option>text</option>
56 </select>
57
58 </form>
59
60
61 <p>The <code>Accept</code> header you send is taken into account.
62 Various types of RDF are available, plus an HTML representation and
63 potentially the audio data (use <code>audio/*</code> to accept any
64 format of audio).</p>
65 <?php if ($repo->getSparqlEndpoint()) { ?>
66 <p>A Sparql endpoint is available at
67 <code><?php echo htmlspecialchars($repo->getSparqlEndpoint()); ?></code>.</p>
68 <?php } ?>
69 </body>
70</html>
Note: See TracBrowser for help on using the repository browser.