<div id="ontologyArea">
	<h2>Ontology surfing</h2>




	<?php 
//HERE WE GENERATE A loginArea if the user is not logged in, otherwise a "Welcome screen and logout area"
$LoginManager = new LoginManager();
if (!$LoginManager->isLoggedin()) {
    ?>
		<div id="loginArea">
			<hr/>
			<p>Login here to interact with ontology</p>
			<table>
				<tr><td>User </td> <td><input type="text" id="usrfield" name="usr" /></td> </tr>
				<tr><td>Password </td> <td><input type="text" id="pwdfield" name="psw" /></td> </tr>
				<tr><td><input type="submit" value="Login" onclick="doLogin();" /></td><td><input type="submit" value="Register" onclick="doRegister();"/></td></tr>
			</table>
			<hr/>
		</div>
	<?php 
} else {
    ?>
		<div id="loginArea">
			<hr/>
			<p>Welcome in Tagonto</p>
			<p><strong><a onclick="doLogout();"/>Logout</a></strong></p>
			<hr/>
		</div>
		
Esempio n. 2
0
 */
require_once '../config.php';
//Getting parameters
$conceptIDToShow = $_GET['concept'];
$tag = $_GET['tag'];
//to avoid setting tag to map if the caller function is navigationConcept
$isOnlyNavigation = $_GET['noTag'];
//Creating classes
$res = new ReasoningManager($TAGONTOLIB_MAPPING_ENDPOINT);
$Ontology = new Ontology($ONTOLOGYID);
//Retrieving the mapped concept by ID
$mappedConcept = $Ontology->getConceptById($conceptIDToShow);
//Adding support for reinforcement mapping
$logman = new LoginManager();
//if the user is logged
if ($logman->isLoggedin()) {
    $user = $logman->getLoggedUserDetails();
    if (!$isOnlyNavigation) {
        $res->mapTagOnConcept(new Tag($tag), $mappedConcept, $user['id'], $user['significance'], $ONTOLOGYID);
    }
}
//Error handling
if ($mappedConcept == null) {
    die('Mapped concept is null!');
}
?>

	<div id="ontologyResults">

	<p id="ontologyMappedConcept">
		<span id="concept"><?php