function reservationDispatch($op) { if (isset($_POST['add_event'])) { Util::jump_to('index.php?modname=reservation&op=add_event'); } if (isset($_POST['category_gestion'])) { Util::jump_to('index.php?modname=reservation&op=view_category&id_course=' . $_SESSION['idCourse']); } if (isset($_POST['location_gestion'])) { Util::jump_to('index.php?modname=reservation&op=classroom&id_course=' . $_SESSION['idCourse']); } if (isset($_POST['undo'])) { Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=subscribed_user'); } if (isset($_POST['undo_switch'])) { Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=events'); } if (isset($_POST['undo_profile'])) { Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=events'); } if (isset($_POST['undo_mail'])) { Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=events'); } if (isset($_POST['okselector'])) { if (isset($_GET['id_course'])) { $op = 'send_registration'; } } if (isset($_POST['cancelselector'])) { Util::jump_to('index.php?modname=reservation&op=reservation&active_tab=subscribed_user'); } if (isset($_POST['undo_cat'])) { $op = 'view_category'; } if (isset($_POST['undo_lab'])) { $op = 'view_laboratories'; } switch ($op) { case 'del_subscription': delSubscription(); break; case 'add_subscription': addSubscription(); break; case 'add_registration': addRegistration(); break; case 'send_registration': sendRegistration(); break; case 'del_event': delEvent(); break; case 'mod_event': modEvent(); break; case 'add_event': addEvent(); break; case 'view_user_event': viewUserEvent(); break; case 'send_user_event': sendUserEvent(); break; case 'excel': getExcelFile(); break; case 'reservation': default: reservation(); break; case 'view_category': viewCategoy(); break; case 'add_category': addCategoy(); break; case 'mod_category': modCategoy(); break; case 'del_category': delCategoy(); break; /*case 'view_laboratories': viewLaboratories(); break; case 'add_laboratory': addLaboratory(); break; case 'mod_laboratory': modLaboratory(); break; case 'del_laboratory': delLaboratory(); break;*/ //TODO: /*case 'view_laboratories': viewLaboratories(); break; case 'add_laboratory': addLaboratory(); break; case 'mod_laboratory': modLaboratory(); break; case 'del_laboratory': delLaboratory(); break;*/ //TODO: case "classroom": classroom(); break; case "addclassroom": editclassroom(); break; case "modclassroom": editclassroom(true); break; case "saveclassroom": saveclassroom(); break; case "delclassroom": delclassroom(); break; //TODO: //TODO: case 'switch_subscription': switchSubscription(); break; case 'set_room_view_perm': setRoomViewPerm(); break; case 'send_mail': reservationSendMail(); break; case 'info_location': infoLocation(); break; } }
$lager = $row['kodenr']; } } $lager = $lager * 1; } $query = db_select("select * from lagerstatus where vare_id='{$vare_id[$x]}' and lager='{$lager}'", __FILE__ . " linje " . __LINE__); if ($row = db_fetch_array($query)) { db_modify("update lagerstatus set beholdning={$row['beholdning']}+{$leveres[$x]} where id={$row['id']}", __FILE__ . " linje " . __LINE__); } else { db_modify("insert into lagerstatus (vare_id, lager, beholdning) values ({$vare_id[$x]}, {$lager}, {$leveres[$x]})", __FILE__ . " linje " . __LINE__); } if ($box9 == 'on') { if ($leveres[$x] < 0) { returnering($id, $linje_id[$x], $leveres[$x], $vare_id[$x], $pris[$x], $serienr[$x], $kred_linje_id[$x], $levdate); } else { reservation($linje_id[$x], $leveres[$x], $vare_id[$x], $serienr[$x]); } } else { db_modify("update ordrelinjer set bogf_konto='{$box4}' where id='{$linje_id[$x]}'", __FILE__ . " linje " . __LINE__); # if ($fifo) { # $rest=$leveres[$x]-($leveres[$x]-$beholdning); # if ($rest<0) $rest=0; # elseif ($rest>$leveres[$x])$rest=$leveres[$x]; #cho __LINE__." insert into batch_kob(vare_id,linje_id,kobsdate,ordre_id,antal,rest) values ($vare_id[$x],$linje_id[$x],'$levdate','$id','$leveres[$x]','$leveres[$x]')<br>"; db_modify("insert into batch_kob(vare_id,linje_id,kobsdate,ordre_id,antal,rest) values ({$vare_id[$x]},{$linje_id[$x]},'{$levdate}','{$id}','{$leveres[$x]}','{$leveres[$x]}')", __FILE__ . " linje " . __LINE__); # } else { #Pris fjernet fra nedenstaende 06.04.08 - Prisen skal ikke saettes ved modtagelse #cho "insert into batch_kob(vare_id, linje_id, kobsdate, ordre_id, antal,rest) values ($vare_id[$x],$linje_id[$x],'$levdate','$id','$leveres[$x]','$leveres[$x]')<br>"; # db_modify("insert into batch_kob(vare_id, linje_id, kobsdate, ordre_id, antal,rest) values ($vare_id[$x],$linje_id[$x],'$levdate','$id','$leveres[$x]','$leveres[$x]')",__FILE__ . " linje " . __LINE__); # } }