if (sizeof($dates_to_check) > 0) { $row->init(); $row->data("rr_name", $_POST["rr_name"]); $row->data("rr_phone", $_POST["rr_phone"]); $row->data("rr_subject", $_POST["rr_subject"]); $row->data("rr_room", $_POST["rr_room"]); $row->data("rr_date", $dates_to_check[0]); $row->data("rr_time_begin", $time_begin); $row->data("rr_time_end", $time_end); $row->data("rr_repeat_rr_no", "0"); $row->data("rr_repeat_week", $rr_repeat_week_str); $row->data("rr_repeat_begin", $_POST["rr_repeat_begin"]); $row->data("rr_repeat_end", $_POST["rr_repeat_end"]); $row->data("rr_update_date", "FN:now()"); $row->data("rr_update_ip", $_SERVER["REMOTE_ADDR"]); $table->insert($row->values(), $row->fields()); $rr_no = $table->getinsertid(); $table->update("rr_repeat_rr_no='" . $rr_no . "'", "rr_no='" . $rr_no . "'"); } for ($i = 1; $i < sizeof($dates_to_check); $i++) { $row->init(); $row->data("rr_name", $_POST["rr_name"]); $row->data("rr_phone", $_POST["rr_phone"]); $row->data("rr_subject", $_POST["rr_subject"]); $row->data("rr_room", $_POST["rr_room"]); $row->data("rr_date", $dates_to_check[$i]); $row->data("rr_time_begin", $time_begin); $row->data("rr_time_end", $time_end); $row->data("rr_repeat_rr_no", $rr_no); $row->data("rr_repeat_week", $rr_repeat_week_str); $row->data("rr_repeat_begin", $_POST["rr_repeat_begin"]);
break; case "prc_delip": $table = $DB->table("deviceinfo"); $table->delete("di_no='" . $_GET["di_no"] . "'"); print "<SCRIPT> location.href='index.php?mode=device' </SCRIPT>"; break; case "prc_addnotice": $table = $DB->table("noticeinfo"); $row = new rowedit(); $row->init(); $row->data("ni_active", "FN:1"); $row->data("ni_subject", $_POST["ni_subject"]); $row->data("ni_seq", "FN:IF(max(ni_seq) is NULL,1,max(ni_seq)+1)"); $row->data("ni_update_date", "FN:now()"); $row->data("ni_update_ip", $_SERVER["REMOTE_ADDR"]); $table->query("insert into noticeinfo (" . $row->fields() . ") select " . $row->values() . " from noticeinfo"); //$table->lastsql(); print "<SCRIPT> location.href='index.php?mode=notice' </SCRIPT>"; break; case "prc_delnotice": $table = $DB->table("noticeinfo"); $table->delete("ni_no='" . $_GET["ni_no"] . "'"); print "<SCRIPT> location.href='index.php?mode=notice' </SCRIPT>"; break; case "prc_toggleactive": $table = $DB->table("noticeinfo"); $table->update("ni_active=IF(ni_active='1','0','1')", "ni_no='" . $_GET["ni_no"] . "'"); print "<SCRIPT> location.href='index.php?mode=notice' </SCRIPT>"; break; case "prc_sequp": $table = $DB->table("noticeinfo");