<?php if ($edit) { $operation = $result->operation_title; } elseif (isset($_POST['operation'])) { $operation = $_POST['operation']; } else { $operation = ''; } ?> <select name="operation_title" id="category_data" class="form-control validate[required] "> <option value=""><?php _e('Select Operation', 'hospital_mgt'); ?> </option> <?php $operation_type = new Hmgt_operation(); $operation_array = $operation_type->get_all_operationtype(); if ($edit) { $operation1 = $result->operation_title; } elseif (isset($_REQUEST['operation_title'])) { $operation1 = $_REQUEST['operation_title']; } else { $operation1 = ""; } if (!empty($operation_array)) { foreach ($operation_array as $retrieved_data) { ?> <option value="<?php echo $retrieved_data->ID; ?> " <?php
function hmgt_add_category() { global $wpdb; $model = $_REQUEST['model']; $array_var = array(); $data['category_name'] = $_REQUEST['medicine_cat_name']; if ($model == 'medicine') { $obj_medicine = new Hmgtmedicine(); $obj_medicine->hmgt_add_medicinecategory($data); $id = $wpdb->insert_id; } if ($model == 'department') { $user_object = new Hmgtuser(); $user_object->add_staff_department($data); $id = $wpdb->insert_id; } if ($model == 'bedtype') { $bed_type = new Hmgtbedmanage(); $bed_type->hmgt_add_bedtype($data); $id = $wpdb->insert_id; } if ($model == 'specialization') { $user_object = new Hmgtuser(); $user_object->add_doctor_specilize($data); $id = $wpdb->insert_id; } if ($model == 'operation') { $operation_type = new Hmgt_operation(); $operation_type->hmgt_add_operationtype($data); $id = $wpdb->insert_id; } if ($model == 'report_type') { $report_type = new Hmgt_dignosis(); $report_type->hmgt_add_report_type($data); $id = $wpdb->insert_id; } $row1 = '<tr id="cat-' . $id . '"><td>' . $_REQUEST['medicine_cat_name'] . '</td><td><a class="btn-delete-cat badge badge-delete" href="#" id=' . $id . '>X</a></td></tr>'; $option = "<option value='{$id}'>" . $_REQUEST['medicine_cat_name'] . "</option>"; $array_var[] = $row1; $array_var[] = $option; echo json_encode($array_var); die; }
<?php //Operation Theator $obj_ot = new Hmgt_operation(); $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'operationlist'; ?> <!-- POP up code --> <div class="popup-bg"> <div class="overlay-content"> <div class="modal-content"> <div class="category_list"> </div> </div> </div> </div> <!-- End POP-UP Code --> <div class="page-inner" style="min-height:1631px !important"> <div class="page-title"> <h3><img src="<?php echo get_option('hmgt_hospital_logo'); ?> " class="img-circle head_logo" width="40" height="40" /><?php echo get_option('hmgt_hospital_name'); ?> </h3> </div> <?php if (isset($_REQUEST['save_operation'])) {