function get_view($id) { global $dbh; $req = "select * from authperso_authorities,authperso where id_authperso=authperso_authority_authperso_num and id_authperso_authority=" . $id; $res = pmb_mysql_query($req, $dbh); if ($r = pmb_mysql_fetch_object($res)) { $p_perso = new custom_parametres_perso("authperso", "authperso", $r->authperso_authority_authperso_num, "./autorites.php?categ=authperso&sub=update&id_authperso=" . $this->id, $option_navigation, $option_visibilite); $fields = $p_perso->get_out_values($id); $authperso_fields = $p_perso->values; $aut_link = new aut_link($r->authperso_authority_authperso_num + 1000, $id); $authperso_fields['authorities_link'] = $aut_link->get_data(); //printr($authperso_fields); if ($r->authperso_view_script) { $view = H2o::parseString($r->authperso_view_script)->render($authperso_fields); } else { foreach ($authperso_fields as $field) { $view .= $field[values][0][format_value] . ". "; } } } return $view; }
function get_fields_options() { global $msg; $p_perso = new custom_parametres_perso("authperso", "authperso", $this->id); return $p_perso->get_selector_options_1() . "<option value='{% for index_concept in index_concepts %}\n {{index_concept.label}}\n{% endfor %}'>index_concepts</option>"; }
function delete($id) { global $dbh; $p_perso = new custom_parametres_perso("authperso", "authperso", $this->id); $p_perso->delete_values($id); // nettoyage indexation concepts $index_concept = new index_concept($id, TYPE_AUTHPERSO); $index_concept->delete(); indexation_authperso::delete_all_index($id, "authorities", "id_authority", AUT_TABLE_AUTHPERSO); // effacement de l'identifiant unique d'autorité $authority = new authority(0, $id, AUT_TABLE_AUTHPERSO); $authority->delete(); $req = "DELETE FROM authperso_authorities where id_authperso_authority=" . $id; $resultat = pmb_mysql_query($req); audit::delete_audit($this->id + 1000, $id); }
function delete($id) { global $dbh; $p_perso = new custom_parametres_perso("authperso", "authperso", $this->id); $p_perso->delete_values($id); // nettoyage indexation concepts $index_concept = new index_concept($id, TYPE_AUTHPERSO); $index_concept->delete(); $req = "DELETE FROM authperso_authorities where id_authperso_authority=" . $id; $resultat = pmb_mysql_query($req); audit::delete_audit($this->id + 1000, $id); }