Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
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));
 }