<?php $opts = array(); foreach (get_valid_languages() as $v) { $opts[] = array($v, $v); } ?> <div class="pull-left"> <label>Language</label> <?php echo select_field_tag("language", "lang", array("options" => $opts, "selected" => $this->search_crit['lang']), array("class" => "span4 dropkick-select")); ?> </div> <div class="pull-left"> <?php echo text_field_tag("owner", "owner", "Owner", array("placeholder" => "Project owner", "value" => $this->search_crit['owner'])); ?> </div> <?php echo submit("Filter", array("class" => "btn btn-large btn-primary pull-left")); ?> </div> <div class="span3"> <h3>Sort by</h3> <?php $opts = array(); foreach (t("sort_by") as $k => $v) { $opts[] = array($k, $v); } ?> <?php
<head> <title>Test EasyRdf_HTTP_Client Get</title> <style type="text/css"> .body { width: 800px; font-family: monospace; font-size: 0.8em; } </style> </head> <body> <h1>Test EasyRdf_HTTP_Client Get</h1> <?php echo form_tag(); echo text_field_tag('uri', 'http://tomheath.com/id/me', array('size' => 50)); ?> <br /> <?php echo label_tag('accept', 'Accept Header: ') . select_tag('accept', $accept_options); echo submit_tag(); echo form_end_tag(); ?> <?php if (isset($_REQUEST['uri'])) { $client = new EasyRdf_Http_Client($_REQUEST['uri']); $client->setHeaders('Accept', $_REQUEST['accept']); $response = $client->request(); ?>
require_once "html_tag_helpers.php"; ## Load the ARC2 parser require_once "EasyRdf/Parser/Arc.php"; ## Add the Google Vocab namespace EasyRdf_Namespace::set('gv', 'http://rdf.data-vocabulary.org/#'); ?> <html> <head><title>Review Extract</title></head> <body> <h1>Review Extract</h1> <?php echo form_tag(); ?> <p>Please enter the URI of a page with a review on it (marked up with Google Review RDFa):</p> <?php echo text_field_tag('uri', 'http://www.bbc.co.uk/music/reviews/2n8c.html', array('size' => 50)); ?> <br /> <?php echo submit_tag(); echo form_end_tag(); ?> <?php if (isset($_REQUEST['uri'])) { $graph = new EasyRdf_Graph($_REQUEST['uri']); $graph->load(); $reviews = $graph->allOfType('gv:Review'); $review = $reviews[0]; } if (isset($review)) {
<?php if (CONFIG::can_see_post(User::$current, $post)) { ?> <?php echo image_tag($post->preview_url); } ?> <?php echo form_tag("#destroy"); ?> <?php echo hidden_field_tag("id", Request::$params->id); ?> <label>Reason</label> <?php echo text_field_tag("reason"); ?> <?php if ($post->is_deleted()) { ?> <?php echo hidden_field_tag("destroy", "1"); ?> <?php } else { ?> <br /> <input type="hidden" name="destroy" value="0" /> <label for="post_destroy">Destroy completely</label> <input id="post_destroy" type="checkbox" name="destroy" value="1" /><br /> <?php }
return 'unknown'; } } ## Add namespaces EasyRdf_Namespace::set('mo', 'http://purl.org/ontology/mo/'); EasyRdf_Namespace::set('bio', 'http://purl.org/vocab/bio/0.1/'); EasyRdf_TypeMapper::set('mo:MusicArtist', 'Model_MusicArtist'); ?> <html> <head><title>EasyRdf Artist Info Example</title></head> <body> <h1>EasyRdf Artist Info Example</h1> <?php echo form_tag(); echo text_field_tag('uri', 'http://www.bbc.co.uk/music/artists/70248960-cb53-4ea4-943a-edb18f7d336f.rdf', array('size' => 50)); echo submit_tag(); echo form_end_tag(); ?> <?php if (isset($_REQUEST['uri'])) { $graph = EasyRdf_Graph::newAndLoad($_REQUEST['uri']); $artist = $graph->primaryTopic(); } if (isset($artist)) { ?> <dl> <dt>Artist Name:</dt><dd><?php echo $artist->get('foaf:name');
/** * Caja de texto con autocompletacion * * @param string $name id de la caja de texto * * action: accion a ejecutar * after_update: despues de actualizar * message: mensaje mientras se carga * * @return string **/ function text_field_with_autocomplete($name) { $params = is_array($name) ? $name : Util::getParams(func_get_args()); /** * Obtengo id, name y value **/ if (isset($params[0])) { $params = array_merge(get_id_and_name($params[0]), $params); if (!isset($params['value'])) { $value = get_value_from_action($params[0]); if ($value) { $params['value'] = $value; } } } $hash = md5(uniqid()); if (isset($params['after_update'])) { $after_update = $params['after_update']; unset($params['after_update']); } else { $after_update = 'function(){}'; } if (isset($params['action'])) { $action = $params['action']; unset($params['action']); } else { $action = ''; } if (isset($params['message'])) { $message = $params['message']; unset($params['message']); } else { $message = 'Consultando..'; } $code = text_field_tag($params); $code .= "\n\t<span id='indicator{$hash}' style='display: none'><img src='" . PUBLIC_PATH . "img/spinner.gif' alt='{$message}'/></span>\n\t<div id='{$params[0]}_choices' class='autocomplete'></div>\n\t<script type='text/javascript'>\n\t<!-- <![CDATA[\n\tnew Ajax.Autocompleter(\"{$params['id']}\", \"{$params['id']}_choices\", \"" . get_kumbia_url($action) . "\", { minChars: 2, indicator: 'indicator{$hash}', afterUpdateElement : {$after_update}});\n\t// ]]> -->\n\t</script>\n\t"; return $code; }
<?php } ?> <table> <tr> <th><label for="tag_alias_name">Name</label></th> <td><?php echo text_field_tag("tag_alias->name", array('size' => 40)); ?> </td> </tr> <tr> <th><label for="tag_alias_alias">Alias to</label></th> <td><?php echo text_field_tag("tag_alias->alias", array('size' => 40)); ?> </td> </tr> <tr> <th><label for="tag_alias_reason">Reason</label></th> <td><?php echo text_area("tag_alias->reason", array('size' => "40x2")); ?> </td> </tr> <tr> <td colspan="2"><?php echo submit_tag("Submit"); ?> </td>
<?php echo form_tag("#update"); ?> <table class="form"> <tr> <th width="15%"><label for="tag_name">Name</label></th> <td width="85%"> <?php echo text_field_tag('tag->name', $tag->name, array('size' => 30, 'autocomplete' => 'off')); ?> <div class="auto_complete" id="tag_name_auto_complete" style="display: none"></div> <script type="text/javascript"> //<![CDATA[ var tag_name_auto_completer = new Ajax.Autocompleter('tag_name', 'tag_name_auto_complete', '/tag/auto_complete_for_tag_name', {minChars:3}) //]]> </script> </td> </tr> <tr> <th><label for="tag_type">Type</label></th> <td><?php echo select_tag('tag->tag_type', array_unique(CONFIG::$tag_types), $tag->tag_type); ?> </td> </tr> <tr> <th><label for="tag_is_ambiguous">Ambiguous</label></th> <td><?php
<h3>Create Pool</h3> <?php echo form_tag("#create", array('class' => 'need-signup')); ?> <table class="form"> <tbody> <tr> <th><label for="pool_name">Name</label></th> <td><?php echo text_field_tag("pool[name]"); ?> </td> </tr> <tr> <th><label for="pool_is_public">Public?</label></th> <td><?php echo checkbox_tag("pool{is_public]"); ?> </td> </tr> <tr> <th><label for="pool_description">Description</label></th> <td><?php echo text_area("pool[description]", array('size' => "40x10")); ?> </td> </tr> <tr> <td colspan="2"><?php echo submit_tag("Save");
<p>Please remember your name will be easy to Google on this site.</p> </th> <td width="85%"> <?php echo text_field_tag("user[name]", array('size' => 30)); ?> </td> </tr> <tr> <th> <label class="block" for="user_email">Email</label> <p>Optional, for email notifications and password resets.</p> </th> <td> <?php echo text_field_tag("user[email]", array('size' => 30)); ?> </td> </tr> <tr> <th> <label class="block" for="user_password">Password</label> <p>Minimum of five characters.</p> </th> <td> <input type="password" size="30" name="user[password]" id="user_password" /> </td> </tr> <tr> <th> <label class="block" for="user_password_confirmation">Confirm password</label>
/** * Returns an input tag of the "text" type. * * Example (<var>$this->post->title</var> returns "PHP for ever") : * <code>text_field('post', 'title', $this->post, array('size' => 35)); * <input id="post_title" name="post[title]" size="35" type="text" value="PHP for ever" /></code> */ function text_field($objectName, $method, $object, $options = array()) { $options = array_merge(array('size' => 30), $options); list($name, $value, $options) = default_options($objectName, $method, $object, $options); return text_field_tag($name, $value, $options); }
<h1>Admin login screen</h1> <div class="well"> <?php echo form_tag(login_admin_login_path(), "post"); ?> <?php echo text_field_tag("username", "username", null, array("placeholder" => "Username")); ?> <?php echo password_field_tag("password", "pwd", array("placeholder" => "Password")); ?> <?php echo submit("Login", array("class" => "btn btn-primary")); ?> <?php echo form_end_tag(); ?> </div>
<div class="palette palette-info-dark"> <?php echo hidden_field_tag("owner_avatar", "owner_avatar"); ?> <?php echo text_field($this->entity, "name", "Project's Name", array("class" => "span6")); ?> <?php echo textarea_field($this->entity, "description", "Project's description", array("class" => "span10")); ?> <div class="one-line-form-elements"> <?php echo text_field_tag("owner_name", "project_owner_name", "Project Owner"); ?> <?php echo text_field($this->entity, "language"); ?> <?php echo text_field($this->entity, "closed_issues", false, array("class" => "hidden")); ?> <?php echo text_field($this->entity, "open_issues", false, array("class" => "hidden")); ?> <?php echo text_field($this->entity, "stars", false, array("class" => "hidden")); ?> <?php
</p> <?php } ?> <?php echo form_tag("#authenticate"); ?> <?php echo hidden_field_tag("url", Request::$params->url); ?> <table class="form"> <tr> <th width="15%"><label class="block" for="user_name">Name</label></th> <td width="85%"><?php echo text_field_tag("user->name", array('tabindex' => 1)); ?> </td> </tr> <tr> <th><label class="block" for="user_password">Password</label></th> <td><input type="password" id="user_password" name="user[password]" tabindex="1" /></td> </tr> <tr> <td colspan="2"><?php echo submit_tag("Login", array('tabindex' => 1)); ?> </td> </tr> </table> </form>
require_once "EasyRdf.php"; require_once "html_tag_helpers.php"; ## Load the rapper based parser require_once "EasyRdf/Parser/Rapper.php"; ?> <html> <head><title>EasyRdf Graph Dumper</title></head> <body> <h1>EasyRdf Graph Dumper</h1> <div style="margin: 10px"> <?php echo form_tag(); ?> URI: <?php echo text_field_tag('uri', 'http://metade.org/foaf.rdf', array('size' => 80)); ?> <br /> Format: <?php echo label_tag('format_html', 'HTML') . ' ' . radio_button_tag('format', 'html', true); ?> <?php echo label_tag('format_text', 'Text') . ' ' . radio_button_tag('format', 'text'); ?> <br /> <?php echo submit_tag(); ?> <?php echo form_end_tag();
<?php } ?> <table> <tr> <th><label for="tag_implication_predicate">Predicate</label></th> <td><?php echo text_field_tag("tag_implication[predicate]", array('size' => 40)); ?> </td> </tr> <tr> <th><label for="tag_implication_consequent">Consequent</label></th> <td><?php echo text_field_tag("tag_implication[consequent]", array('size' => 40)); ?> </td> </tr> <tr> <th><label for="tag_implication_reason">Reason</label></th> <td><?php echo text_area("tag_implication[reason]", array('size' => "40x2")); ?> </td> </tr> <tr> <td colspan="2"><?php echo submit_tag("Submit"); ?> </td>
width: 35em; border: 2px red solid; padding: 1em; margin: 0.5em; background-color: #E6E6E6; } </style> </head> <body> <h1>EasyRdf SPARQL Query Form</h1> <div style="margin: 0.5em"> <?php print form_tag(); print label_tag('endpoint'); print text_field_tag('endpoint', "http://dbpedia.org/sparql", array('size' => 80)) . '<br />'; print "<code>"; foreach (EasyRdf_Namespace::namespaces() as $prefix => $uri) { print "PREFIX {$prefix}: <" . htmlspecialchars($uri) . "><br />\n"; } print "</code>"; print text_area_tag('query', "SELECT * WHERE {\n ?s ?p ?o\n}\nLIMIT 10", array('rows' => 10, 'cols' => 80)) . '<br />'; print check_box_tag('text') . label_tag('text', 'Plain text results') . '<br />'; print reset_tag() . submit_tag(); print form_end_tag(); ?> </div> <?php if (isset($_REQUEST['endpoint']) and isset($_REQUEST['query'])) { $sparql = new EasyRdf_Sparql_Client($_REQUEST['endpoint']);
echo text_area('post->tags', Request::$params->tags, array('size' => "60x2", 'tabindex' => 3)); ?> <a href="#" onclick="RelatedTags.find('post_tags'); return false;">Related tags</a> | <a href="#" onclick="RelatedTags.find('post_tags', 'artist'); return false;">Related artists</a> | <a href="#" onclick="RelatedTags.find('post_tags', 'char'); return false;">Related characters</a> | <a href="#" onclick="RelatedTags.find('post_tags', 'copyright'); return false;">Related copyrights</a> | <a href="#" onclick="RelatedTags.find('post_tags', 'circle'); return false;">Related circles</a> </td> </tr> <?php if (CONFIG::enable_parent_posts) { ?> <tr> <th><label for="post_parent_id">Parent</label></th> <td><?php echo text_field_tag('post->parent_id', Request::$params->parent, array('size' => 5, 'tabindex' => 4)); ?> </td> </tr> <?php } ?> <tr> <th> <label for="post_rating_questionable">Rating</label> <?php if (User::is('<20')) { ?> <p>Explicit tags include sex, pussy, penis, masturbation, b*****b, etc. (<?php echo link_to('help', 'help#ratings', array('target' => "_blank")); ?>
border: 1px gray solid; float: right; margin: 0 0 20px 20px; } th { text-align: right } td { padding: 5px; } </style> </head> <body> <h1>UK Postcode Resolver</h1> <?php echo form_tag(); ?> <?php echo text_field_tag('postcode', 'W1A 1AA', array('size' => 10)); ?> <?php echo submit_tag(); echo form_end_tag(); ?> <?php if (isset($_REQUEST['postcode'])) { $postcode = str_replace(' ', '', strtoupper($_REQUEST['postcode'])); $docuri = "http://www.uk-postcodes.com/postcode/{$postcode}.rdf"; $graph = new EasyRdf_Graph($docuri); $res = $graph->resource("postcode:{$postcode}"); $ll = $res->get('geo:lat') . ',' . $res->get('geo:long'); print "<iframe id='map' width='500' height='250' frameborder='0' scrolling='no' src='http://maps.google.com/maps?f=q&sll={$ll}&output=embed'></iframe>"; print "<table id='facts'>\n";
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/'); require_once "EasyRdf.php"; require_once "html_tag_helpers.php"; ?> <html> <head> <title>SPARQL Query Form</title> </head> <body> <h1>SPARQL Query Form</h1> <div style="margin: 10px"> <?php print form_tag(); print label_tag('endpoint'); print text_field_tag('endpoint', "http://localhost:8080/sparql", array('size' => 70)) . '<br />'; print "<pre>"; foreach (EasyRdf_Namespace::namespaces() as $prefix => $uri) { print "PREFIX {$prefix}: <" . htmlspecialchars($uri) . ">\n"; } print "</pre>"; print text_area_tag('query', "SELECT * WHERE {\n ?s ?p ?o\n}\nLIMIT 10") . '<br />'; print check_box_tag('text') . label_tag('text', 'Plain text results') . '<br />'; print reset_tag() . submit_tag(); print form_end_tag(); ?> </div> <?php if (isset($_REQUEST['endpoint']) and isset($_REQUEST['query'])) { $sparql = new EasyRdf_Sparql_Client($_REQUEST['endpoint']);
<div id="forum"> <div style="margin-bottom: 1em;"> <?php echo form_tag("#search", array('method' => 'get')); ?> <?php echo text_field_tag("query", request::$params->query, array('size' => 40)); ?> <?php echo submit_tag("Search"); ?> </form> </div> <table class="highlightable"> <thead> <tr> <th width="20%">Topic</th> <th width="50%">Message</th> <th width="10%">Author</th> <th width="20%">Last Updated</th> </tr> </thead> <tbody> <?php foreach ($forum_posts as $fp) { ?> <tr class="<?php echo cycle('even', 'odd'); ?> ">
## Load the rapper based parser require_once "EasyRdf/Parser/Rapper.php"; # TODO LIST: # - display rdfs:range # - make use of rdfs:isDefinedBy? # - do clever things witgh rdfs:subPropertyOf? ?> <html> <head><title>EasyRdf Spec Maker</title></head> <body> <h1>EasyRdf Spec Maker</h1> <?php echo form_tag(); echo text_field_tag('short', 'foaf', array('size' => 8)); echo text_field_tag('uri', 'http://xmlns.com/foaf/0.1/', array('size' => 50)); echo submit_tag(); echo form_end_tag(); ?> <?php if (isset($_REQUEST['uri'])) { EasyRdf_Namespace::set($_REQUEST['short'], $_REQUEST['uri']); $graph = new EasyRdf_Graph($_REQUEST['uri']); $ontology = $graph->resource($_REQUEST['uri']); } else { echo "<h2>Some examples:</h2>\n"; echo "<ul>\n"; echo "<li><a href='easyspec.php?short=foaf&uri=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F'>Friend of a Friend</a></li>\n"; echo "<li><a href='easyspec.php?short=mo&uri=http%3A%2F%2Fpurl.org%2Fontology%2Fmo%2F'>Music Ontology</a></li>\n"; echo "<li><a href='easyspec.php?short=po&uri=http%3A%2F%2Fpurl.org%2Fontology%2Fpo%2F'>Programmes Ontology</a></li>\n";
public static function autocompleteModeloClientes($nombre, $opciones, $opcion = "id", $valor = "") { $params = is_array($nombre) ? $nombre : Util::getParams(func_get_args()); $params["value"] = utf8_encode($valor); if (!isset($params['onblur'])) { $params['onblur'] = "texto(this)"; } else { $params['onblur'] .= ";texto(this)"; } if (!isset($params["case"])) { $params["case"] = "minusculas"; } $x = count($opciones); $tmp = ''; if ($opciones) { foreach ($opciones as $opc) { $x--; if ($opc->nombre == "PUBLICO EN GENERAL") { $tmp .= '"' . $opc->nombre . ' "' . ($x != 0 ? ',' : ''); } else { $tmp .= '"' . $opc->rfc . ' :: ' . $opc->nombre . ' :: ' . $opc->calle . ' # ' . $opc->exterior . ' "' . ($x != 0 ? ',' : ''); } } } $code = '<script> $(function() { var available' . $nombre . ' = [ ' . $tmp . ' ]; $( "#' . $nombre . '" ).autocomplete({ source: available' . $nombre . ' }); }); </script><div class="ui-widget">' . ($params["case"] == "mayusculas" ? textupper_field_tag($params) : text_field_tag($params)) . '</div>'; return $code; }
<div style="margin: 1em 0;"> <div id="preview" class="response-list" style="display: none;"> </div> <div id="reply" style="clear: both;"> <?php echo form_tag("#create"); ?> <?php $forum_post->parent_id && (print hidden_field_tag("forum_post->parent_id")); ?> <table> <tr> <td><label for="forum_post_title">Title</label></td> <td><?php echo text_field_tag("forum_post->title", array('size' => 60)); ?> </td> </tr> <tr> <td colspan="2"><?php echo text_area("forum_post->body", array('rows' => 20, 'cols' => 80)); ?> </td> </tr> <tr> <td colspan="2"><?php echo submit_tag("Post"); ?> <input name="preview" onclick="new Ajax.Updater('preview', '/forum/preview', {asynchronous:true, evalScripts:true, method:'get', onSuccess:function(request){$('preview').show()}, parameters:Form.serialize(this.form)});" type="button" value="Preview"/></td> </tr>
function labeled_text_field_tag($name, $default = null, $options = array()) { return label_tag($name) . text_field_tag($name, $default, $options); }
*/ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/'); require 'vendor/autoload.php'; require_once "html_tag_helpers.php"; ?> <html> <head><title>EasyRdf Graph Dumper</title></head> <body> <h1>EasyRdf Graph Dumper</h1> <div style="margin: 10px"> <?php echo form_tag(); ?> URI: <?php echo text_field_tag('uri', 'http://mmt.me.uk/foaf.rdf', array('size' => 80)); ?> <br /> Format: <?php echo label_tag('format_html', 'HTML') . ' ' . radio_button_tag('format', 'html', true); echo label_tag('format_text', 'Text') . ' ' . radio_button_tag('format', 'text'); ?> <br /> <?php echo submit_tag(); echo form_end_tag(); ?> </div> <?php
require_once "BBC/Programmes.php"; require_once "html_tag_helpers.php"; ## Configure the RDF parser to use require_once "EasyRdf/Parser/Arc.php"; EasyRdf_Graph::setRdfParser(new EasyRdf_Parser_Arc()); # Configure the HTTP client to use require_once "EasyRdf/Http/Client.php"; EasyRdf_Graph::setHttpClient(new EasyRdf_Http_Client()); ?> <html> <head><title>Episode Page</title></head> <body> <?php echo form_tag(); echo text_field_tag('pid', 'b00p4h42', array('size' => 12)); echo submit_tag(); echo form_end_tag(); ?> <?php if (isset($_REQUEST['pid'])) { $episode = BBC_Programmes_Programme::find($_REQUEST['pid']); echo content_tag('h1', $episode->getTitle()); if ($episode->get('foaf:depiction')) { echo image_tag($episode->get('foaf:depiction')); } echo content_tag('p', $episode->get('po:long_synopsis')); if ($episode->get('po:clip')) { echo "<h3>Clips</h3>\n"; echo "<ul>\n";
*/ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/'); require_once "EasyRdf.php"; require_once "html_tag_helpers.php"; ?> <html> <head> <title>EasyRdf RSS 1.0 Parsing example</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> </head> <body> <h1>EasyRdf RSS 1.0 Parsing example</h1> <?php echo form_tag(); echo text_field_tag('uri', 'http://planetrdf.com/index.rdf', array('size' => 50)); echo submit_tag(); echo form_end_tag(); ?> <?php if (isset($_REQUEST['uri'])) { $graph = EasyRdf_Graph::newAndLoad($_REQUEST['uri'], 'rdfxml'); $channel = $graph->get('rss:channel', '^rdf:type'); print "<p>Channel: " . link_to($channel->label(), $channel->get('rss:link')) . "</p>\n"; print "<p>Description: " . $channel->get('rss:description') . "</p>\n"; print "<ol>\n"; foreach ($channel->get('rss:items') as $item) { print "<li>" . link_to($item->get('rss:title'), $item) . "</li>\n"; } print "</ol>\n";
?> <html> <head><title>EasyRdf Converter</title></head> <body> <h1>EasyRdf Converter</h1> <div style="margin: 10px"> <?php echo form_tag(); ?> <?php echo label_tag('data', 'Input Data: ') . '<br />' . text_area_tag('data', '', array('cols' => 80, 'rows' => 10)); ?> <br /> <?php echo label_tag('uri', 'or Uri: ') . text_field_tag('uri', 'http://www.dajobe.org/foaf.rdf', array('size' => 80)); ?> <br /> <?php echo label_tag('input_format', 'Input Format: ') . select_tag('input_format', $input_format_options, 'guess'); ?> <br /> <?php echo label_tag('output_format', 'Output Format: ') . select_tag('output_format', $output_format_options, 'turtle'); ?> <br /> <?php echo reset_tag(); ?> <?php echo submit_tag();
* @package EasyRdf * @copyright Copyright (c) 2009-2012 Nicholas J Humfrey * @license http://unlicense.org/ */ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/'); require_once "EasyRdf.php"; require_once "html_tag_helpers.php"; ?> <html> <head><title>EasyRdf FOAF Info Example</title></head> <body> <h1>EasyRdf FOAF Info Example</h1> <?php echo form_tag(); echo text_field_tag('uri', 'http://njh.me/foaf.rdf', array('size' => 50)); echo submit_tag(); echo form_end_tag(); ?> <?php if (isset($_REQUEST['uri'])) { $graph = EasyRdf_Graph::newAndLoad($_REQUEST['uri']); if ($graph->type() == 'foaf:PersonalProfileDocument') { $person = $graph->primaryTopic(); } else { if ($graph->type() == 'foaf:Person') { $person = $graph->resource(); } } }