$stmt1->bindParam(":dept", $department, PDO::PARAM_STR); $stmt1->execute(); if ($stmt1->error) { throw new Exception($stmt1->errno . ' ' . $stmt1->error . '<br/>There was an error submitting this request. Please click the back button and try again.'); exit; } $biz_mgr = $stmt1->fetch(PDO::FETCH_ASSOC); $mgrName = $biz_mgr['mgr_fname'] . " " . $biz_mgr['mgr_lname']; $mgrEmail = $biz_mgr['mgr_email']; $stmt1 = null; $conn1 = null; // ======================================================================================== // ADD REQUEST TO DATABASE // using named placeholders // ======================================================================================== $facil2_conn = new DBConnection('facil2'); $conn2 = $facil2_conn->openConnection(); $sql2 = "INSERT INTO addl_pay_request(`date_of_request` ,\n\t\t `requester_fname` ,\n\t\t `requester_lname` ,\n\t\t `requester_phone` ,\n\t\t `employee_fname` ,\n\t\t `employee_lname` ,\n\t\t `dept_name` ,\n\t\t `dept_phone` ,\n\t\t `reason_for_payment` ,\n\t\t `work_start_date` ,\n\t\t `work_end_date` ,\n\t\t `job_title` ,\n\t\t `description_of_work` ,\n\t\t `work_classification` ,\n\t\t `business_mgr`)\n\t\tVALUES (CURDATE(),\n\t\t :req_fname ,\n\t\t :req_lname ,\n\t\t :req_phone ,\n\t\t :emp_fname ,\n\t\t :emp_lname ,\n\t\t :dept_name ,\n\t\t :dept_phone ,\n\t\t :reason_for_payment ,\n\t\t :work_start_date ,\n\t\t :work_end_date ,\n\t\t :job_title ,\n\t\t :description_of_work ,\n\t\t :work_classification ,\n\t\t :biz_mgr\n\t\t )"; /*$sql2 = "INSERT INTO addl_pay_request(`date_of_request` , `requester_fname` , `requester_lname` , `requester_phone` , `employee_fname` , `employee_lname` , `dept_name` , `dept_phone` , `reason_for_payment` , `work_start_date` , `work_end_date` , `job_title` , `description_of_work` ,
} //check if already responded if ($who == 'biz_mgr' && !IS_NULL($row['date_of_response'])) { Utilities::msg_alert("You have already responded to this request.", ""); $disabled = 'disabled'; } if ($who == 'admin' && !IS_NULL($row['date_admin_submit'])) { Utilities::msg_alert("This request was already processed and the notices were sent out.", ""); $disabled = 'disabled'; } } //end who = biz_mgr/admin // ================================================================================== // MYSQL DATABASE CONNECTION - facil_csc (stores dept,clerk,biz_mgr lists) // ================================================================================== $connector = new DBConnection('facil'); $conn = $connector->openConnection(); // ================================================================================== // BOOTSTRAP PAGE TOP WITH NAVIGATION // ================================================================================== $page_view = new PageView(); $page_view->createHTMLHead('Additional Pay Form::Facilities and Services:: University of Rochester'); echo "<body class='home blue'>"; // class determines style of header: home, other... $page_view->createMainHeader(); ?> <main> <div class="top_pad"> <!-- Padding matches height of Header -->