Ejemplo n.º 1
0
 function get_form_sel()
 {
     global $harvest_notice_tpl, $harvest_notice_tpl_error;
     //Je regarde si la notice à un isbn
     $req = "SELECT code FROM notices WHERE notice_id='" . $this->id . "'";
     $res = pmb_mysql_query($req);
     if (pmb_mysql_num_rows($res) && (isISBN(pmb_mysql_result($res, 0, 0)) || isEAN(pmb_mysql_result($res, 0, 0)))) {
         $tpl = $harvest_notice_tpl;
         $harvests = new harvests();
         $tpl = str_replace('!!sel_harvest!!', $harvests->get_sel('harvest_id', 0), $tpl);
         $h = new harvest_profil_imports();
         $tpl = str_replace('!!sel_profil!!', $h->get_sel('profil_id', 0), $tpl);
         $tpl = str_replace('!!notice_id!!', $this->id, $tpl);
     } else {
         $tpl = $harvest_notice_tpl_error;
     }
     return $tpl;
 }