Exemple #1
0
<?php

include_once "./www/StoreRDF.php";
if ($_POST['one'] and $_POST['two']) {
    echo $_POST['one'] + $_POST['two'];
}
if ($_POST['subject'] and $_POST['predicate'] and $_POST['object']) {
    $store = new StoreRDF();
    $store->setObject($_POST['subject'], $_POST['predicate'], $_POST['object']);
    echo 1;
}
Exemple #2
0
<?php

//require_once 'editor/edt.html';
//exit;
require_once 'www/StoreRDF.php';
require_once 'PHPTAL.php';
$store = new StoreRDF();
//$store->test();
//$store->setObject('http://www.example.com/People/II/contact#me', 'foaf:homepage', 'http://www.example.com/People/II');
//exit;
$subj = $store->subjects('a', 'foaf:Person')[0];
//$q = getSubjects('foaf:Person', $store);
//$subj = $q[0];
/*foreach ($q as $row) {
    //$r .= '<li>' . $row['obj'] . ' - ' . $row['rel'] . ' - ' . $row['subj'] . '</li>';
    if ($rows = $row->getTempl()){
      foreach ($rows as $name) {
        $r .= '<li>' . $name . '</li>';
      }
    }
    if ($rows = $row->getObj('?rel')){
      foreach ($rows as $name) {
        $r .= '<li>' . $name . '</li>';
      }
    }
  }*/
// создать обработчик шаблонов
$template = new PHPTAL();
$template->setSource($store->getTempl('foaf:Person'));
$editortmpl = new PHPTAL('./editor/index.html');
//$template = new PHPTAL('/home/paskal/public/mytests/www/templ_.html');