echo textMaker('Username', 'user_name', $username); echo textMaker('First Name', 'first_name', $first_name); echo textMaker('Last Name', 'last_name', $last_name); echo selectMaker('User Type', 'user_type', array('Finance Head', 'Secretary', 'QA', 'Admin', 'Cash Release'), 'get_type(this.value)', $user_type); echo "<tr><td colspan=2><div style='display:none' id='phone_id'>"; echo "<table>"; echo "<tr >"; echo textMaker('Phone Number', 'phone_number', $phone_number); echo "</tr>"; echo "</table></td></tr>"; echo "<tr>"; echo "<tr><td colspan=2><div style='display:none' id='department_div'>"; echo "<table>"; echo selectMaker('Department', 'department', $departments, '', $department); echo "</table>"; echo "</div></td></tr>"; echo "<tr><td colspan=2><div style='display:none' id='finance_div'>"; echo "<table>"; echo selectMakerValue('Finance Head', 'finance_head', $finance_head, '', $finance_head); echo "</table>"; echo "</div></td></tr>"; echo "<tr>"; echo "<td colspan=2 style='text-align:center'>"; echo "<input type='submit' name='submit_btn' value='Submit' style='margin:15px'>"; echo "<input type='button' value='Cancel' style='margin:15px'>"; echo "</td>"; echo "</tr>"; echo "<script>get_type(\"{$user_type}\")</script>"; ?> </table> </form>
if (empty($row[$val[$a]])) { $row[$val[$a]] = ""; } $items[$a] = $row[$val[$a]]; } } } $status[] = $row['status']; $data[] = $items; } echo "<table>"; //<a href='view_for_approve.php?type=With Po'> //<a href='view_for_approve.php?type=Without Po'> echo "<tr>\n<td colspan=10 >\n<div>\n <table class='filter' align=left>\n <tr>\n <td role='presentation'> \n <input type='button' {$active_po} onclick='po_go(this.value)' value='With PO'>\n </td>\n <td role='presentation'>\n <input type='button' {$active_wpo} onclick='po_go(this.value)' value='Without PO'>\n </td>\n </tr>\n </table>\n \n</div>\n</td></tr>\n"; $status_array = array('pending', 'For Approval', 'Rejected'); echo selectMakerValue('Status', 'status', $status_array, '', $status_array, $status_type); echo "<tr><th style='border:none;text-align:left'>Date Sent</th>\n <th colspan=10 style='text-align:left; border:none'>\n <table align=left><tr> <td style='border:none'>\n <input title='parseMe' style='width:120px' id='date_from' name='date_from' value='{$date_from}'>\n <span id='date_from_cal' class='calendar-icon'></span>\n \n </td><td style='padding:1px;border:none'>-</td><td style='border:none'>\n <input title='parseMe' style='width:120px' id='date_to' name='date_to' value='{$date_to}'>\n <span id='date_to_cal' class='calendar-icon'></span>\n \n </td></table></td></tr>"; $select = "select concat(first_name,' ',last_name) as name,account_id from master_address_file where mas_status=1 and account_type='Account Executive' order by name"; $result1 = $conn->query($select); while ($row1 = $result1->fetch_assoc()) { $requestor[$row1['account_id']] = $row1['name']; } echo selectMakerEach('Requestor', 'requestor_id', $requestor, '', $requestor_id); echo "<tr ><td colspan=2 style='padding:10px;text-align:center'><input type='submit' value='Search'></td></tr>"; echo "<TR><TD colspan=10><h2 style='text-align:left' >RM {$type}</h2></td></tr> "; ?> <table class='table_data'> <?php echo "<tr>"; for ($a = 0; $a < count($column); $a++) {
$finance_head = array(); $finance_value = array(); while ($row = $result->fetch_assoc()) { $finance_head[] = $row['account_executive']; $finance_value[] = $row['account_id']; } $display_account = "display:none"; $display_dep = "display:none"; if ($type == 'Secretary' || $type == 'Engineer') { $display_account = "display:block"; } if ($type == 'Account Executive') { $display_dep = "display:block"; } echo "<tr><td colspan=2><table id='account_exe' style='width:90%;" . $display_account . "'>"; echo selectMakerValue('Account Executive', 'account_executive', $finance_head, '', $finance_value, $account_executive); echo "</table></td></tr>"; $select = "select department,department_id from master_department_file where mas_status=1 order by department"; $result = $conn->query($select); $departments = array(); while ($row = $result->fetch_assoc()) { $departments[] = array($row['department'], $row['department_id']); } echo "<tr><td colspan=2><table id='dept_div' style='width:90%;" . $display_dep . "'>"; echo selectMakerArray('Department', 'department', $departments, $department); echo "</table></td></tr>"; echo "<tr>"; echo "<td colspan=2 style='text-align:center'>"; if ($account_id == '') { echo "<input type='SUBMIT' name='submit_btn' value='Submit' style='margin:15px'>"; } else {