示例#1
0
     $sel_search_form = str_replace("!!bouton_ajouter!!", $bouton_ajouter, $sel_search_form);
     $sel_search_form = str_replace("!!deb_rech!!", htmlentities(stripslashes($f_user_input), ENT_QUOTES, $charset), $sel_search_form);
     print $sel_search_form;
     print $jscript;
     show_results($dbh, $user_input, $nbr_lignes, $page);
     break;
 case "add_expl":
     if ($id_groupexpl) {
         print $jscript;
         $informations = array();
         $groupexpl = new groupexpl($id_groupexpl);
         $exemplaires = explode(",", $expl_list);
         $flag_error = 0;
         if (count($exemplaires)) {
             foreach ($exemplaires as $cb) {
                 $added = $groupexpl->add_expl($cb);
                 if ($added) {
                     $informations[$cb] = $groupexpl->info_message;
                     print "<script type='text/javascript'>\n\t\t\t\t\t\t\tset_parent('groupexpl_name_" . $cb . "','" . $id_groupexpl . "','" . $groupexpl->info['name'] . "');\n\t\t\t\t\t\t</script>";
                 } else {
                     $id_group = $groupexpl->get_id_group_from_cb($cb);
                     $error_html_message = "<a style='cursor:pointer' onclick=\"window.opener.document.location.href='./circ.php?categ=groupexpl&action=form&id=" . $id_group . "'\">" . $groupexpl->get_name_group_from_id($id_group) . "</a>";
                     $informations[$cb] = $groupexpl->error_message . " " . $error_html_message;
                     $flag_error = 1;
                 }
             }
         }
         if ($flag_error) {
             foreach ($informations as $cb => $information) {
                 $query = "SELECT expl_id FROM exemplaires WHERE expl_cb='" . $cb . "'";
                 $result = pmb_mysql_query($query);
示例#2
0
     $data['statut_principal'] = $statut_principal;
     $data['statut_others'] = $statut_others;
     $data['resp_expl_num'] = $resp_expl_num;
     $groupexpl->save($data);
     $groupexpls = new groupexpls();
     print $groupexpls->get_list();
     break;
 case 'delete':
     $groupexpl = new groupexpl($id);
     $groupexpl->delete();
     $groupexpls = new groupexpls();
     print $groupexpls->get_list();
     break;
 case "add_expl":
     $groupexpl = new groupexpl($id);
     $groupexpl->add_expl($form_cb_expl);
     print $groupexpl->get_form();
     break;
 case "search_expl":
     if ($id = groupexpls::get_group_expl($form_cb_expl)) {
         $groupexpl = new groupexpl($id);
         print $groupexpl->get_see_form();
     } else {
         $groupexpls = new groupexpls();
         $groupexpls->set_error_message($msg["groupexpl_list_error_cb_not_in_group"]);
         print $groupexpls->get_list();
     }
     break;
 case "del_expl":
     $groupexpl = new groupexpl($id);
     $groupexpl->del_expl($form_cb_expl);