public function admin_proceed($action, $id) { switch ($action) { case 'add': $ontology = new ontology(); print $ontology->get_form(); break; case 'edit': print $this->ontologies[$id]->get_form(); break; case "delete": if (is_object($this->ontologies[$id])) { if ($this->ontologies[$id]->delete()) { unset($this->ontologies[$id]); } else { //loupé } } print $this->get_list(); break; case 'save': if (!$this->ontologies[$id]) { $ontology = new ontology($id); $ontology->get_values_from_form(); $this->ontologies[$ontology->save()] = $ontology; } else { $this->ontologies[$id]->get_values_from_form(); $this->ontologies[$id]->save(); } default: print $this->get_list(); break; } }
<?php // +-------------------------------------------------+ // © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net) // +-------------------------------------------------+ // $Id: main.inc.php,v 1.1 2015-08-10 23:16:26 arenou Exp $ if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) { die("no access"); } error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT); require_once $class_path . "/autoloader.class.php"; $autoloader = new autoloader(); $autoloader->add_register("onto_class", true); $ontologies = new ontologies(); $admin_layout = str_replace("!!ontologies_menu!!", $ontologies->get_admin_menu(), $admin_layout); switch ($sub) { case 'general': print str_replace("!!menu_sous_rub!!", $msg['ontologies_general'], $admin_layout); $ontologies->admin_proceed($act, $ontology_id); break; default: print str_replace("!!menu_sous_rub!!", "", $admin_layout); $ontology = new ontology($ontology_id); $ontology->exec_onto_framework(); break; }
public function set_vedette_element_from_database() { $ontology = new ontology($this->params['id_ontology']); $this->isbd = $ontology->get_instance_label(onto_common_uri::get_uri($this->id)); }
<?php // +--------------------------------------------------------------------------+ // | PMB est sous licence GPL, la réutilisation du code est cadrée | // +--------------------------------------------------------------------------+ // $Id: ontologie.php,v 1.1 2015-08-10 23:16:25 arenou Exp $ //Impression $base_path = "."; $base_auth = "ADMIN_AUTH"; $base_title = ""; $base_nobody = 1; $base_noheader = 1; require $base_path . "/includes/init.inc.php"; require_once $class_path . "/ontology.class.php"; $onto = new ontology($ontologie_id); if ($sparql) { $onto->get_onto_endpoint(); } else { if ($draw) { $onto->draw_onto(); } else { if ($get_data) { $onto->print_datas_rdf(); } else { $onto->print_onto_rdf(); } } }
} /* $caller = Nom du formulaire appelant * $objs = type d'objet demandé * $element = id de l'element à modifier * $order = numéro du champ à modifier * $range = id du range à afficher * $deb_rech = texte à rechercher */ if (!isset($range)) { $range = 0; } if (!isset($page)) { $page = 1; } if ($parent_id) { $deb_rech = ""; } $base_url = "./select.php?what=ontologies&ontology_id={$ontology_id}&source={$source}&caller=" . rawurlencode($caller) . "&objs={$objs}&element={$element}&order={$order}&infield={$infield}&callback={$callback}&dyn={$dyn}&deb_rech={$deb_rech}¶m1={$param1}¶m2={$param2}"; // contenu popup selection require './selectors/templates/sel_ontology.tpl.php'; require_once $class_path . "/autoloader.class.php"; $autoloader = new autoloader(); $autoloader->add_register("onto_class", true); $ontology = new ontology($ontology_id); $params = new onto_param(array('categ' => '', 'sub' => '', 'objs' => $objs, 'action' => 'list_selector', 'page' => '1', 'nb_per_page' => '20', 'caller' => $caller, 'element' => $element, 'order' => $order, 'callback' => $callback, 'base_url' => $base_url, 'deb_rech' => $deb_rech, 'range' => $range, 'parent_id' => '', 'param1' => $param1, 'param2' => $param2, 'item_uri' => $item_uri, 'ontology_id' => $ontology_id, 'base_resource' => "admin.php")); if ($source != "onto") { $ontology->exec_data_selector_framework($params); } else { $ontology->exec_onto_selector_framework($params); } //
$base_title = "\$msg[semantic]"; $base_use_dojo = 1; require_once "{$base_path}/includes/init.inc.php"; // ini_set('errors_display',1); // error_reporting(E_ALL); require_once $class_path . "/autoloader.class.php"; $autoloader = new autoloader(); $autoloader->add_register("onto_class", true); require_once $class_path . "/ontologies.class.php"; require_once $include_path . "/templates/semantic.tpl.php"; print "<div id='att' style='z-Index:1000'></div>"; print $menu_bar; print $extra; print $extra2; print $extra_info; if ($use_shortcuts) { include "{$include_path}/shortcuts/circ.sht"; } $ontologies = new ontologies(); $layout = str_replace("!!ontologies_menu!!", $ontologies->get_semantic_menu(), $semantic_layout); print $layout; if ($ontology_id) { $ontology = new ontology($ontology_id); $ontology->exec_data_framework(); } else { //TODO print "<div class='row'>PAGE D'AIDE</div>"; } print $semantic_layout_end; print $footer; mysql_close($dbh);
public function get_ontology_display_name_from_uri($uri) { global $opac_url_base; $display_name = ""; if (strpos($uri, "skos") !== false) { $display_name = "http://www.w3.org/2004/02/skos/core#prefLabel"; } if (strpos($uri, $opac_url_base . "ontologies/") !== false) { $ontology_id = substr(str_replace($opac_url_base . "ontologies/", "", $uri), 0, strpos(str_replace($opac_url_base . "ontologies/", "", $uri), "#")); $ontology = new ontology($ontology_id); $display_name = $ontology->get_display_label_property($uri); } return $display_name; }