function PreparePHP_SELF($tmp_REQUEST = '', $remove = array(), $add = array())
{
    if (!$tmp_REQUEST) {
        $tmp_REQUEST = $_REQUEST;
    }
    foreach ($_COOKIE as $key => $value) {
        unset($tmp_REQUEST[$key]);
    }
    foreach ($remove as $key) {
        unset($tmp_REQUEST[$key]);
    }
    foreach ($add as $key => $value) {
        $tmp_REQUEST[$key] = $value;
    }
    $PHP_tmp_SELF = 'Modules.php?modname=' . $tmp_REQUEST['modname'];
    unset($tmp_REQUEST['modname']);
    if (count($tmp_REQUEST)) {
        foreach ($tmp_REQUEST as $key => $value) {
            if (is_array($value)) {
                foreach ($value as $key1 => $value1) {
                    if (is_array($value1)) {
                        foreach ($value1 as $key2 => $value2) {
                            if (is_array($value2)) {
                                foreach ($value2 as $key3 => $value3) {
                                    $PHP_tmp_SELF .= '&' . $key . '[' . $key1 . '][' . $key2 . '][' . $key3 . ']=' . myUrlEncode(str_replace('\\"', '"', $value3));
                                }
                            } else {
                                $PHP_tmp_SELF .= '&' . $key . '[' . $key1 . '][' . $key2 . ']=' . myUrlEncode(str_replace('\\"', '"', $value2));
                            }
                        }
                    } else {
                        $PHP_tmp_SELF .= '&' . $key . '[' . $key1 . ']=' . myUrlEncode(str_replace('\\"', '"', $value1));
                    }
                }
            } else {
                if ($value != '') {
                    $PHP_tmp_SELF .= '&' . $key . "=" . myUrlEncode(str_replace('\\"', '"', $value));
                }
            }
        }
    }
    return $PHP_tmp_SELF;
}
Ejemplo n.º 2
0
<?php

//prepare the templates and include all neccessary
if (!isset($rootpath)) {
    $rootpath = '';
}
require_once './lib/common.inc.php';
global $stat_menu, $mnu_siteid;
//Preprocessing
if ($error == false) {
    //user logged in?
    if ($usr == false) {
        $target = myUrlEncode(tpl_get_current_page());
        tpl_redirect('login.php?target=' . $target);
    } else {
        // check for old-style parameters
        if (isset($_REQUEST['userid'])) {
            $user_id = $_REQUEST['userid'];
        } else {
            $user_id = $usr['userid'];
        }
        tpl_set_var('userid', $user_id);
        require $stylepath . '/viewprofile.inc.php';
        require $stylepath . '/lib/icons.inc.php';
        $tplname = 'viewprofile';
        if ($user_id != $usr['userid']) {
            // do not highlight My stats menu item if browsing other users stats
            $mnu_siteid = 'start';
        }
        $stat_menu = array('title' => tr('Statictics'), 'menustring' => tr('Statictics'), 'siteid' => 'statlisting', 'navicolor' => '#E8DDE4', 'visible' => false, 'filename' => 'viewprofile.php?userid=' . $user_id, 'submenu' => array(array('title' => tr('graph_find'), 'menustring' => tr('graph_find'), 'visible' => true, 'filename' => 'ustatsg2.php?userid=' . $user_id, 'newwindow' => false, 'siteid' => 'findstat', 'icon' => 'images/actions/stat'), array('title' => tr('graph_created'), 'menustring' => tr('graph_created'), 'visible' => true, 'filename' => 'ustatsg1.php?userid=' . $user_id, 'newwindow' => false, 'siteid' => 'createstat', 'icon' => 'images/actions/stat')));
        $content = "";
Ejemplo n.º 3
0
                    $rdf_header .= "\n  xmlns:{$prefixTmp}=\"{$NSTmp}\"";
                }
                $strOutput = "{$rdf_header} >\n<owl:Ontology rdf:about=\"" . preg_replace('/\\/obo\\//', "/obo/{$o}/about/", $iri) . "\">\n</owl:Ontology>\n{$strOutput}\n</rdf:RDF>";
                if (strpos($_SERVER['HTTP_ACCEPT'], 'application/rdf+xml') !== false) {
                    header("Content-type: application/rdf+xml");
                } elseif (strpos($_SERVER['HTTP_ACCEPT'], 'application/xml') !== false) {
                    header("Content-type: application/xml");
                } else {
                    header("Content-type: text/xml");
                }
                $filename = createRandomPassword();
                //				file_put_contents("/tmp/$filename.in", $strOutput);
                $strOutput = curl_post_contents("http://141.211.109.48:8080/Ontobee/Reformat.jsp", array("ifile" => $strOutput));
                //				$strOutput = file_get_contents("http://141.211.109.48:8080/Ontobee/Reformat.jsp?ifile=/tmp/$filename.in");
                //				$strOutput = file_get_contents("/tmp/$filename.out");
                $strOutput = str_replace('<rdf:RDF', '<?xml-stylesheet type="text/xsl" href="/browser/xslt.php?o=' . $o . '&amp;iri=' . myUrlEncode($iri) . '"?>
<rdf:RDF', $strOutput);
                $strOutput = str_replace('</owl:Ontology>', '    <owl:imports rdf:resource="' . $settings['ns_main_original'] . '"/>
    </owl:Ontology>', $strOutput);
                print $strOutput;
                //<owl:imports rdf:resource=\"".$settings['ns_main_original']."\"/>
            } else {
                // can not find this term
                header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");
                include '404.php';
            }
        } else {
            header("Content-type: text/xml");
            $strOutput = '<?xml version="1.0"?>
	<error>Incorrect ontology or term URL</error>';
            print $strOutput;
Ejemplo n.º 4
0
                } else {
                    false;
                }
            }
        }
    }
}
function myUrlEncode($string)
{
    $entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%25', '%23', '%5B', '%5D');
    $replacements = array('!', '*', "'", "(", ")", ";", ":", "@", "&", "=", "+", "\$", ",", "/", "?", "%", "#", "[", "]");
    return str_replace($entities, $replacements, urlencode($string));
}
$url = 'https://vasilis.nl/';
if (isset($_GET["u"])) {
    $url = myUrlEncode(GET('u'));
}
?>
	<article tabindex="0">
		<iframe tabindex="-1" src="<?php 
echo $url;
?>
"></iframe>
	</article>
	<article tabindex="0">
		<iframe tabindex="-1" src="<?php 
echo $url;
?>
"></iframe>
	</article>
	<article tabindex="0">
Ejemplo n.º 5
0
            ?>
<div style="background-color:#EAF1F2; border:#99CCFF 1px solid; margin-top:4px; margin-bottom:12px">
	<ul>
	<?php 
            if ($l != '') {
                $final_results = $results_by_letter[$l];
            } else {
                $final_results = array_slice($final_results, $recordsPerPage * ($currPage - 1), $recordsPerPage);
            }
            foreach ($final_results as $sub => $obj) {
                ?>
	<li><a href="/browser/rdf.php?o=<?php 
                print $o;
                ?>
&amp;iri=<?php 
                print myUrlEncode($sub);
                ?>
"><?php 
                print htmlentities($obj);
                ?>
</a></li>
	<?php 
            }
            ?>
	</ul>
</div>
<?php 
        }
    } else {
        include '../inc/input_error.php';
    }
Ejemplo n.º 6
0
    if (isset($settings['ontology_fullname'])) {
        foreach ($ref_types as $ref_type) {
            $querystring = "\nPREFIX rdf: <{$settings['ns_rdf']}>\nPREFIX owl: <{$settings['ns_owl']}>\nSELECT count(distinct ?s) as ?num_o\nFROM <{$settings['ns_main']}>\n\n\nWHERE {?s rdf:type owl:{$ref_type}.\nFILTER regex(?s, '^http')\n} \n";
            //error_log($querystring, 3, '/tmp/error.log');
            $result = json_query($querystring);
            //			$num_queries++;
            //					var_dump($result);
            if (isset($result[0]['num_o']) && $result[0]['num_o'] > 0) {
                $total_terms += $result[0]['num_o'];
                ?>
		
		<li><a href="term.php?o=<?php 
                print $o;
                ?>
&amp;iri=<?php 
                print myUrlEncode($settings['ns_owl'] . $ref_type);
                ?>
">
			<?php 
                print $ref_type;
                ?>
			</a> (
			<?php 
                print $result[0]['num_o'];
                ?>
			)</li>
		<?php 
            }
        }
    } else {
        ?>
Ejemplo n.º 7
0
function printRDFjsonEquivalent($obj_equiv, $a_label, $relation = 'and', $last_re = 'and', $first_re = true)
{
    global $o;
    $strOut = '';
    $bracket = false;
    if (isset($obj_equiv['r'])) {
        if ($first_re) {
            $relation = $obj_equiv['r'];
            $last_re = $relation;
        } else {
            $last_re = $relation;
            $relation = $obj_equiv['r'];
        }
        $first_re = false;
        if ($relation != $last_re) {
            $bracket = true;
        }
    }
    if (isset($obj_equiv['v'])) {
        $v = $obj_equiv['v'];
        if ($bracket) {
            $strOut .= '(';
        }
        if ($relation == 'not') {
            $strOut .= "{$relation} ";
        }
        if (!is_array($v[0])) {
            if ($v[0] != 'http://www.w3.org/1999/02/22-rdf-syntax-ns#nil') {
                $strOut .= '<a oncontextmenu="return false;" href="/browser/rdf.php?o=' . $o . '&amp;iri=' . myUrlEncode($v[0]) . '">' . UTF_to_Unicode($a_label[$v[0]]) . '</a>';
            }
        } else {
            $strOut .= printRDFjsonEquivalent($v[0], $a_label, $relation, $last_re, $first_re);
        }
        if (isset($v[1])) {
            if (!is_array($v[1])) {
                if ($v[1] != 'http://www.w3.org/1999/02/22-rdf-syntax-ns#nil') {
                    $strOut .= " {$relation} " . '<a oncontextmenu="return false;" href="/browser/rdf.php?o=' . $o . '&amp;iri=' . myUrlEncode($v[1]) . '">' . UTF_to_Unicode($a_label[$v[1]]) . '</a>';
                }
            } else {
                $strOut .= " {$relation} " . printRDFjsonEquivalent($v[1], $a_label, $relation, $last_re, $first_re);
            }
        }
        if ($bracket) {
            $strOut .= ')';
        }
    }
    return $strOut;
}
Ejemplo n.º 8
0
                if (!empty($settings['core_terms'])) {
                    ?>
<div style="font-weight:bold">Top level terms and selected core <?php 
                    print $settings['ontology_name'];
                    ?>
	terms</div>
<div style="background-color:#EAF1F2; border:#99CCFF 1px solid; margin-top:4px; margin-bottom:12px">
	<ul>
		<?php 
                    foreach ($settings['core_terms'] as $term_url => $term_label) {
                        ?>
		<li><a href="/browser/rdf.php?o=<?php 
                        print $o;
                        ?>
&amp;iri=<?php 
                        print myUrlEncode($term_url);
                        ?>
">
			<?php 
                        print $term_label;
                        ?>
		</a></li>
		<?php 
                    }
                    ?>
	</ul>
</div>
<?php 
                }
            }
            ?>
Ejemplo n.º 9
0
"><?php 
                print $other_ontology['ontology_fullname'];
                ?>
</a></td>
    <td bgcolor="#EAF1F2"><a href="<?php 
                echo $owl_file_url;
                ?>
"><?php 
                echo $owl_file_name;
                ?>
</a></td>
    <td bgcolor="#EAF1F2"><a oncontextmenu="return false;" href="/browser/rdf.php?o=<?php 
                print $other_ontology['ontology_abbrv'];
                ?>
&amp;iri=<?php 
                print myUrlEncode($iri);
                ?>
">'<?php 
                print $main_label;
                ?>
' in <?php 
                echo $owl_file_name;
                ?>
</a></td>
    <td bgcolor="#EAF1F2">
  <?php 
                if ($other_ontology['home'] != '') {
                    $tokens = preg_split('/\\|/', $other_ontology['home']);
                    if (sizeof($tokens) == 2) {
                        ?>
  <a href="<?php 
Ejemplo n.º 10
0
<?php 
                }
            }
            $term_count = 0;
            foreach ($subClasses as $subClass_url => $subClass_label) {
                if ($subClass_label == '') {
                    $subClass_label = getShortTerm($subClass_url);
                }
                if (!isset($hasC[$subClass_url])) {
                    $term_count++;
                    ?>
<li>-<a oncontextmenu="return false;" href="/browser/rdf.php?o=<?php 
                    print $o;
                    ?>
&amp;iri=<?php 
                    print myUrlEncode($subClass_url);
                    ?>
"><?php 
                    print UTF_to_Unicode($subClass_label);
                    ?>
</a></li>
<?php 
                }
            }
            ?>
</ul>
</div>
<?php 
        }
        ?>
Ejemplo n.º 11
0
            if (isset($result['g'])) {
                $ontology = isset($array_ontology[$result['g']]) ? $array_ontology[$result['g']] : '';
            }
            if ($ontology != '') {
                ?>
	<li><?php 
                print preg_replace('/(' . $tkeywords . ')/i', '<strong>$1</strong>', $result['o']);
                ?>
 <strong>(<?php 
                print $ontology;
                ?>
)</strong>: <a href="/browser/rdf.php?o=<?php 
                print $ontology;
                ?>
&amp;iri=<?php 
                print myUrlEncode($result['s']);
                ?>
">
		<?php 
                print $result['s'];
                ?>
	</a></li>
<?php 
            }
        }
        ?>
</ol>
</p>
<?php 
    } else {
        ?>
Ejemplo n.º 12
0
		</div>
<?php 
    }
    if (isset($result_main[$settings['ns_owl'] . 'inverseOf'])) {
        ?>
	<div style="font-weight:bold">Inverse Properties</div>
	<div style="background-color:#EAF1F2; border:#99CCFF 1px solid; margin-top:4px; margin-bottom:12px; padding:4px">
	<span>
<?php 
        $a_inverseOf = array();
        foreach ($result_main[$settings['ns_owl'] . 'inverseOf'] as $inverseOf) {
            if ($inverseOf['type'] == 'bnode') {
                $obj_equiv = getRDFjsonEquivalent($term_cbd, $inverseOf['value'], $a_label, $link = true);
                $a_inverseOf[] = printRDFjsonEquivalent($obj_equiv, $a_label);
            } else {
                $a_inverseOf[] = "<a oncontextmenu=\"return false;\" href=\"/browser/rdf.php?o={$o}&amp;iri=" . myUrlEncode($inverseOf['value']) . "\">" . $a_label[$inverseOf['value']] . "</a>";
            }
        }
        print join(', ', $a_inverseOf);
        ?>
	</span>
		</div>
<?php 
    }
    if (!empty($a_term_type)) {
        ?>
	<div style="font-weight:bold">Characteristics</div>
	<div style="background-color:#EAF1F2; border:#99CCFF 1px solid; margin-top:4px; margin-bottom:12px; padding:4px">
	<span>
<?php 
        print join(', ', $a_term_type);
Ejemplo n.º 13
0
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php 
echo $term_short_id;
?>
, <?php 
echo $main_label;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="alternate" type="application/rdf+xml" title="RDF Version" href="/browser/rdf.php?o=<?php 
echo $o;
?>
&amp;iri=<?php 
echo myUrlEncode($iri);
?>
" />
<link rel="canonical" href="<?php 
echo $iri;
?>
"/>
<link href="/css/styleMain.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../js/jquery/themes/base/jquery.ui.all.css"/>
<script src="../js/jquery/jquery-1.7.1.js" type="text/javascript"></script>
<script src="../js/jquery/ui/jquery.ui.core.js" type="text/javascript"></script>
<script src="../js/jquery/ui/jquery.ui.widget.js" type="text/javascript"></script>
<script src="../js/jquery/ui/jquery.ui.position.js" type="text/javascript"></script>
<script src="../js/jquery/ui/jquery.ui.autocomplete.js" type="text/javascript"></script>
<script src="../js/about.js" type="text/javascript"></script>
</head>
Ejemplo n.º 14
0
            }
        } else {
            $results3[] = $result;
        }
    }
    foreach ($results3 as $result) {
        if ($count > 100) {
            break;
        }
        $show_term = true;
        if (isset($result['g'])) {
            if (isset($array_ontology[$result['g']])) {
                $ontology_tmp = $array_ontology[$result['g']];
            } else {
                $show_term = false;
            }
        } else {
            $ontology_tmp = $ontology;
        }
        if ($show_term) {
            $tokens = preg_split('/[\\/#]/', $result['s']);
            $term_id = array_pop($tokens);
            if (!isset($terms[$ontology_tmp . ';' . $result['o']])) {
                $count++;
                $jason[] = array('id' => $ontology_tmp . ':::' . myUrlEncode($result['s']), 'value' => $result['o'], 'label' => $result['o'] . ' (' . $ontology_tmp . ': ' . $term_id . ')');
                $terms[$ontology_tmp . ';' . $result['o']] = 1;
            }
        }
    }
}
print json_encode($jason);
Ejemplo n.º 15
0
        }
        ?>
</ul>
</div>
<?php 
    }
    if (isset($result_main[$settings['ns_owl'] . 'disjointWith'])) {
        ?>
<div style="font-weight:bold">Disjoints</div>
<div style="background-color:#EAF1F2; border:#99CCFF 1px solid; margin-top:4px; margin-bottom:12px; padding:4px">
<span>
<?php 
        $a_disjoint = array();
        foreach ($result_main[$settings['ns_owl'] . 'disjointWith'] as $disjointWith) {
            if ($disjointWith['type'] == 'bnode') {
                $obj_equiv = getRDFjsonEquivalent($term_cbd, $disjointWith['value'], $a_label, $link = true);
                $a_disjoint[] = printRDFjsonEquivalent($obj_equiv, $a_label);
            } else {
                $a_disjoint[] = "<a oncontextmenu=\"return false;\" href=\"/browser/rdf.php?o={$o}&amp;iri=" . myUrlEncode($disjointWith['value']) . "\">" . $a_label[$disjointWith['value']] . "</a>";
            }
        }
        print join(', ', $a_disjoint);
        ?>
</span>
</div>
<?php 
    }
}
?>