Changeset 31626 in spip-zone


Ignore:
Timestamp:
Sep 17, 2009, 4:42:29 PM (10 years ago)
Author:
apachot@…
Message:

Afficher les infos personnelles du lecteur sur une page "mon compte"

Location:
_plugins_/spip-pmb/2_0_0
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/spip-pmb/2_0_0/action/connexion_pmb.php

    r31610 r31626  
    1515$ws=new SoapClient("http://test3.bibli.fr/ostudio/PMBWsSOAP_1?wsdl");
    1616try {
    17         $session_id = $ws->pmbesOPACEmpr_login("apachot","Dark-star");
     17        $session_id = $ws->pmbesOPACEmpr_login(_request('login'),_request('password'));
    1818        if ($session_id) {
    19                 $compte = $ws->pmbesOPACEmpr_get_account_info($session_id);
     19                //$compte = $ws->pmbesOPACEmpr_get_account_info($session_id);
     20                $result = $ws->pmbesOPACEmpr_get_account_info($session_id);
     21                   
     22                session_set('pmb_firstname',$result->personal_information->firstname);
     23                session_set('pmb_lastname',$result->personal_information->lastname);
     24                session_set('pmb_address_part1',$result->personal_information->address_part1);
     25                session_set('pmb_address_part2',$result->personal_information->address_part2);
     26                session_set('pmb_address_cp',$result->personal_information->address_cp);
     27                session_set('pmb_address_city',$result->personal_information->address_city);
     28                session_set('pmb_phone_number1',$result->personal_information->phone_number1);
     29                session_set('pmb_phone_number2',$result->personal_information->phone_number2);
     30                session_set('pmb_email',$result->personal_information->email);
     31                session_set('pmb_birthyear',$result->personal_information->birthyear);
     32                session_set('pmb_location_id',$result->location_id);
     33                session_set('pmb_location_caption',$result->location_caption);
     34                session_set('pmb_adhesion_date',$result->adhesion_date);
     35                session_set('pmb_expiration_date',$result->expiration_date);
    2036                session_set('pmb_session',$session_id);
    2137                redirige_par_entete(_request('redirect'));
  • _plugins_/spip-pmb/2_0_0/pmb_mes_fonctions.php

    r31610 r31626  
    559559       
    560560        pmb_ws_charger_wsdl($ws);
    561         //if ($htmldom = pmb_charger_page($url_base, "index.php?lvl=notice_display&seule=1&id=".$id_notice, $mode)) {
    562                  //pmb_parser_notice($id_notice, $htmldom->find('#notice',0), $tableau_resultat);       
    563                  pmb_ws_recuperer_notice($id_notice, $ws, $tableau_resultat);
    564         //}
    565         return $tableau_resultat;
    566                        
    567 }
     561        pmb_ws_recuperer_notice($id_notice, $ws, $tableau_resultat);
     562        return $tableau_resultat;
     563                       
     564}
     565
     566// retourne un tableau associatif contenant tous les champs d'une notice
     567function pmb_prets_extraire ($session_id, $url_base, $type_pret=0) {
     568        $tableau_resultat = Array();
     569        pmb_ws_charger_wsdl($ws);
     570        $loans = $ws->pmbesOPACEmpr_list_loans($session_id, $type_pret);
     571        $cpt = 0;
     572        foreach ($loans as $loan) {
     573              $tableau_resultat[$cpt] = Array();
     574              $tableau_resultat[$cpt]['empr_id'] = $loan->empr_id;
     575              $tableau_resultat[$cpt]['notice_id'] = $loan->notice_id;
     576              $tableau_resultat[$cpt]['bulletin_id'] = $loan->bulletin_id;
     577              $tableau_resultat[$cpt]['expl_id'] = $loan->expl_id;
     578              $tableau_resultat[$cpt]['expl_cb'] = $loan->expl_cb;
     579              $tableau_resultat[$cpt]['expl_support'] = $loan->expl_support;
     580              $tableau_resultat[$cpt]['expl_location_id'] = $loan->expl_location_id;
     581              $tableau_resultat[$cpt]['expl_location_caption'] = $loan->expl_location_caption;
     582              $tableau_resultat[$cpt]['expl_section_id'] = $loan->expl_section_id;
     583              $tableau_resultat[$cpt]['expl_section_caption'] = $loan->expl_section_caption;
     584              $tableau_resultat[$cpt]['expl_libelle'] = $loan->expl_libelle;
     585              $tableau_resultat[$cpt]['loan_startdate'] = $loan->loan_startdate;
     586              $tableau_resultat[$cpt]['loan_returndate'] = $loan->loan_returndate;
     587              $cpt++;
     588        }
     589
     590        return $tableau_resultat;
     591                       
     592}
     593
    568594
    569595
     
    577603function pmb_prepare_recherche ($recherche) {
    578604        $recherche = str_replace("+"," ",$recherche);
    579         $recherche = str_replace(" ","%20",$recherche);
    580         //$recherche = htmlentities($recherche);
    581         //$recherche = unicode2charset(charset2unicode($recherche, 'utf-8'),'iso-8859-1');
    582605        return $recherche;
    583606}
Note: See TracChangeset for help on using the changeset viewer.