$msg['288'], TYPE_AUTHOR => $msg['isbd_author'], TYPE_CATEGORY => $msg['isbd_categories'], TYPE_PUBLISHER => $msg['isbd_editeur'], TYPE_COLLECTION => $msg['isbd_collection'], TYPE_SUBCOLLECTION => $msg['isbd_subcollection'], TYPE_SERIE => $msg['isbd_serie'], TYPE_TITRE_UNIFORME => $msg['isbd_titre_uniforme'], TYPE_INDEXINT => $msg['isbd_indexint'], TYPE_EXPL => $msg['376'], TYPE_EXPLNUM => $msg['search_explnum'], TYPE_AUTHPERSO => $msg['search_by_authperso_title'], TYPE_CMS_SECTION => $msg['cms_menu_editorial_section'], TYPE_CMS_ARTICLE => $msg['cms_menu_editorial_article'], TYPE_CONCEPT => $msg['search_concept_title'] ); return $entities; } public static function get_entities_options($selected) { global $charset; $entities = static::get_entities_list(); $html = ''; foreach ($entities as $value => $label) { $html .= ''; } return $html; } public static function get_string_from_const_type($type){ if(!is_numeric($type)){ return $type; } switch ($type) { case TYPE_NOTICE : return 'notices'; case TYPE_AUTHOR : return 'authors'; case TYPE_CATEGORY : return 'categories'; case TYPE_PUBLISHER : return 'publishers'; case TYPE_COLLECTION : return 'collections'; case TYPE_SUBCOLLECTION : return 'subcollections'; case TYPE_SERIE : return 'series'; case TYPE_TITRE_UNIFORME : return 'titres_uniformes'; case TYPE_INDEXINT : return 'indexint'; case TYPE_CONCEPT_PREFLABEL: case TYPE_CONCEPT: return 'concepts'; case TYPE_AUTHPERSO : return 'authperso'; case TYPE_EXTERNAL : return 'notices_externes'; } if ($type > 1000) { return 'authperso_'.($type - 1000); } } public static function get_query_from_entity_linked($id, $get_type, $from_type) { $query = ""; switch($get_type){ case 'publisher': $query .= "SELECT ed_id FROM publishers"; switch($from_type){ case 'collection': $query .= " JOIN collections ON ed_id = collection_parent where collection_id = ".$id; break; case 'sub_collection': $query .= " JOIN collections ON ed_id = collection_parent JOIN sub_collections ON sub_coll_parent = collection_id where sub_coll_id = ".$id; break; } break; case 'collection': $query .= "SELECT collection_id FROM collections"; switch($from_type){ case 'publisher': $query .= " JOIN publishers ON ed_id = collection_parent where ed_id = ".$id; break; case 'sub_collection': $query .= " JOIN sub_collections ON sub_coll_parent = collection_id where sub_coll_id = ".$id; break; } break; case 'sub_collection': $query = "SELECT sub_coll_id FROM sub_collections"; switch($from_type){ case 'publisher': $query .= " JOIN collections ON sub_coll_parent = collection_id WHERE collection_parent = ".$id; break; case 'collection': $query .= " WHERE sub_coll_parent = ".$id; break; } break; } return $query; } public static function get_aut_table_from_type($type) { switch ($type) { case TYPE_AUTHOR : return AUT_TABLE_AUTHORS; case TYPE_CATEGORY : return AUT_TABLE_CATEG; case TYPE_PUBLISHER : return AUT_TABLE_PUBLISHERS; case TYPE_COLLECTION : return AUT_TABLE_COLLECTIONS; case TYPE_SUBCOLLECTION : return AUT_TABLE_SUB_COLLECTIONS; case TYPE_SERIE : return AUT_TABLE_SERIES; case TYPE_TITRE_UNIFORME : return AUT_TABLE_TITRES_UNIFORMES; case TYPE_INDEXINT : return AUT_TABLE_INDEXINT; case TYPE_CONCEPT_PREFLABEL: case TYPE_CONCEPT: return AUT_TABLE_CONCEPT; case TYPE_AUTHPERSO : return AUT_TABLE_AUTHPERSO; default: return 0; } } public static function get_prefixes() { return array( 'author', 'categ', 'publisher', 'collection', 'subcollection', 'serie', 'indexint', 'skos', 'tu', 'authperso', 'expl', 'notices' ); } }