Exemplo n.º 1
0
 static function get_isbd($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);
         $fields = $p_perso->get_out_values($id);
         $authperso_fields = $p_perso->values;
         if ($r->authperso_isbd_script) {
             $index_concept = new index_concept($id, TYPE_AUTHPERSO);
             $authperso_fields['index_concepts'] = $index_concept->get_data();
             $isbd = H2o::parseString($r->authperso_isbd_script)->render($authperso_fields);
         } else {
             foreach ($authperso_fields as $field) {
                 $isbd .= $field[values][0][format_value] . ".  ";
             }
         }
     }
     return trim(preg_replace('/\\s+/', ' ', $isbd));
 }