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;
 }
Esempio n. 2
0
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: profil.inc.php,v 1.1 2012-01-25 15:20:35 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/harvest_profil_import.class.php";
switch ($action) {
    case 'form':
        $harvest = new harvest_profil_import($id_profil);
        print $harvest->get_form();
        break;
    case 'save':
        $harvest = new harvest_profil_import($id_profil);
        $data['name'] = $name;
        $data['num_harvest'] = $num_harvest;
        print $harvest->save($data);
        $harvests = new harvest_profil_imports();
        print $harvests->get_list();
        break;
    case 'delete':
        $harvest = new harvest_profil_import($id_profil);
        print $harvest->delete();
        $harvests = new harvest_profil_imports();
        print $harvests->get_list();
        break;
    default:
        $harvests = new harvest_profil_imports();
        print $harvests->get_list();
        break;
}