Example #1
0
         }
         $form_loc_retrait .= '</tbody></table>';
     } else {
         error_message($msg[350], $msg['resa_planning_no_item_available'], 1, "./circ.php?categ=resa_planning&resa_action=search_resa&mode=0&id_empr={$id_empr}&groupID={$groupID}");
         break;
     }
     $form_resa_dates = str_replace('!!resa_qty!!', sprintf($msg['resa_planning_qty_requested'], $nb_items), $form_resa_dates);
     $form_resa_dates = str_replace('!!resa_loc_retrait!!', $form_loc_retrait, $form_resa_dates);
     print $form_resa_dates;
     //Affichage des previsions sur le document courant par le lecteur courant
     print doc_planning_list($id_empr, $id_notice, $id_bulletin);
     break;
 case 'add_resa_suite':
     //Enregistrement prévision depuis fiche
     $empr_cb = 0;
     if (!aff_entete($id_empr, $layout_begin, $empr_cb)) {
         error_message($msg[350], $msg[54], 1);
         break;
     }
     if (!check_record($id_notice, $id_bulletin)) {
         error_message($msg[350], $msg['resa_planning_unknown_record'], 1);
         break;
     }
     $check_qty = 0;
     if (isset($location) && is_array($location)) {
         foreach ($location as $k => $v) {
             $check_qty += $v * 1;
         }
     }
     if ($check_qty == 0) {
         error_message($msg[350], $msg['resa_planning_alert_qty'], 1);
Example #2
0
     $query = "SELECT DATEDIFF('{$resa_fin}', '{$resa_deb}') AS diff";
     $resultatdate = mysql_query($query);
     if (mysql_numrows($resultatdate)) {
         $resdate = mysql_fetch_object($resultatdate);
         if ($resdate->diff > 0) {
             $r = new resa_planning();
             $r->resa_idempr = $id_empr;
             $r->resa_idnotice = $id_notice;
             $r->resa_date_debut = $resa_deb;
             $r->resa_date_fin = $resa_fin;
             $r->save();
             $q = "select empr_cb from empr where id_empr='" . $id_empr . "' ";
             $r = mysql_result(mysql_query($q, $dbh), 0, 0);
             print "<script type='text/javascript'>document.location='./circ.php?categ=pret&form_cb=" . rawurlencode($r) . "'</script>";
         } else {
             print aff_entete($id_empr);
             $display = new mono_display($id_notice, 6, '', 0, '', '', '', 0, 1, 1, 1);
             print $display->result;
             print "<script type='text/javascript' src='./javascript/tablist.js'></script>\n";
             $form_resa_dates = str_replace('!!resa_date_debut!!', formatdate($resa_deb), $form_resa_dates);
             $form_resa_dates = str_replace('!!resa_date_fin!!', formatdate($resa_fin), $form_resa_dates);
             $form_resa_dates = str_replace('!!resa_deb!!', $resa_deb, $form_resa_dates);
             $form_resa_dates = str_replace('!!resa_fin!!', $resa_fin, $form_resa_dates);
             print $form_resa_dates;
             //Affichage des réservations planifiées sur le document courant par le lecteur courant
             print doc_planning_list($id_empr, $id_notice);
         }
     }
     break;
 case 'val_resa':
     //Validation réservation depuis liste