Best Atoum code snippet using script.testHelp
Reports.php
Source:Reports.php
...49 ->from("testdetails")50 ->join("client_info", 'client_info.client_id=testdetails.client_id')51 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')52 ->join("tests", 'tests.test_id=testdetails.test_id')53 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')54 ->join("samples", 'samples.sample_id=testdetails.sample_id')55 // ->where('testdetails.created_by',$this->session->userdata('user')['user_id'])56 ->where('testdetails.result_date >=', $date)57 ->where('testdetails.result_date <=', $datee)58 ->order_by('testdetails.testdetails_id', 'DESC')59 ->get()->result();60 echo json_encode($query1);61 } else if ($permissions[4]->module_id == 5 && $permissions[4]->show_lab_by == 1) {62 $query1 = $this->db->select("*")63 ->from("testdetails")64 ->join("client_info", 'client_info.client_id=testdetails.client_id')65 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')66 ->join("tests", 'tests.test_id=testdetails.test_id')67 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')68 ->join("samples", 'samples.sample_id=testdetails.sample_id')69 ->where('tests.lab_id', $lab_id)70 ->where('testdetails.result_date', $date)71 ->order_by('testdetails.testdetails_id', 'DESC')72 ->get()->result();73 echo json_encode($query1);74 } else if ($permissions[4]->module_id == 5 && $permissions[4]->show_none == 1) {75 echo json_encode($query1);76 }77 }78 }79 public function lab_wise_data() {80 # code...81 if ($this->input->post('center_station_labs') != null) {82 $query2 = $this->db->select("*")83 ->from("labs")84 //->join("center_station",'center_station.center_station_id=labs.center_station_id')85 ->where("center_station_id", $this->input->post('center_station_labs'))86 ->get()->result();87 echo json_encode($query2);88 } else if ($this->input->post('labs_id') == "all") {89 $status = $this->input->post('statuslab');90 $date = $this->input->post('first_date');91 $datee = $this->input->post('second_date');92 $center_station_id = $this->input->post('center_id');93 $labs_id = $this->input->post('labs_id');94 if ($status == "progress") {95 $query1 = $this->db->select("*")96 ->from("testdetails")97 ->join("client_info", 'client_info.client_id=testdetails.client_id')98 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')99 ->join("tests", 'tests.test_id=testdetails.test_id')100 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')101 ->join("samples", 'samples.sample_id=testdetails.sample_id')102 ->where('tests.center_station_id', $center_station_id)103 ->where('testdetails.post_status', 0)104 ->where('testdetails.is_cancel', 0)105 ->where('testdetails.result_date >=', $date)106 ->where('testdetails.result_date <=', $datee)107 ->order_by('testdetails.testdetails_id', 'DESC')108 ->get()->result();109 echo json_encode($query1);110 } else if ($status == "Completed") {111 $query2 = $this->db->select("*")112 ->from("testdetails")113 ->join("client_info", 'client_info.client_id=testdetails.client_id')114 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')115 ->join("tests", 'tests.test_id=testdetails.test_id')116 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')117 ->join("samples", 'samples.sample_id=testdetails.sample_id')118 ->where('tests.center_station_id', $center_station_id)119 ->where('testdetails.post_status', 1)120 ->where('testdetails.is_cancel', 0)121 ->where('testdetails.result_date >=', $date)122 ->where('testdetails.result_date <=', $datee)123 ->order_by('testdetails.testdetails_id', 'DESC')124 ->get()->result();125 echo json_encode($query2);126 } else if ($status == "Cancelled") {127 $query3 = $this->db->select("*")128 ->from("testdetails")129 ->join("client_info", 'client_info.client_id=testdetails.client_id')130 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')131 ->join("tests", 'tests.test_id=testdetails.test_id')132 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')133 ->join("samples", 'samples.sample_id=testdetails.sample_id')134 ->where('tests.center_station_id', $center_station_id)135 ->where('testdetails.is_cancel', 1)136 ->where('testdetails.result_date >=', $date)137 ->where('testdetails.result_date <=', $datee)138 ->order_by('testdetails.testdetails_id', 'DESC')139 ->get()->result();140 echo json_encode($query3);141 } else if ($status == "selectall") {142 $query4 = $this->db->select("*")143 ->from("testdetails")144 ->join("client_info", 'client_info.client_id=testdetails.client_id')145 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')146 ->join("tests", 'tests.test_id=testdetails.test_id')147 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')148 ->join("samples", 'samples.sample_id=testdetails.sample_id')149 ->where('tests.center_station_id', $center_station_id)150 ->where('testdetails.result_date >=', $date)151 ->where('testdetails.result_date <=', $datee)152 ->order_by('testdetails.testdetails_id', 'DESC')153 ->get()->result();154 echo json_encode($query4);155 } else {156 $query1 = $this->db->select("*")157 ->from("testdetails")158 ->join("client_info", 'client_info.client_id=testdetails.client_id')159 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')160 ->join("tests", 'tests.test_id=testdetails.test_id')161 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')162 ->join("samples", 'samples.sample_id=testdetails.sample_id')163 ->where('tests.center_station_id', $center_station_id)164 ->order_by('testdetails.testdetails_id', 'DESC')165 ->get()->result();166 echo json_encode($query1);167 }168 } else {169 $center_station_id = $this->input->post('center_id');170 $labs_id = $this->input->post('labs_id');171 $date = $this->input->post('first_date');172 $datee = $this->input->post('second_date');173 $status = $this->input->post('statuslab');174 if ($status == "progress") {175 $query5 = $this->db->select("*")176 ->from("testdetails")177 ->join("client_info", 'client_info.client_id=testdetails.client_id')178 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')179 ->join("tests", 'tests.test_id=testdetails.test_id')180 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')181 ->join("samples", 'samples.sample_id=testdetails.sample_id')182 ->where('tests.center_station_id', $center_station_id)183 ->where('tests.lab_id', $labs_id)184 ->where('testdetails.post_status', 0)185 ->where('testdetails.is_cancel', 0)186 ->where('testdetails.result_date >=', $date)187 ->where('testdetails.result_date <=', $datee)188 ->order_by('testdetails.testdetails_id', 'DESC')189 ->get()->result();190 echo json_encode($query5);191 } else if ($status == "Completed") {192 $query6 = $this->db->select("*")193 ->from("testdetails")194 ->join("client_info", 'client_info.client_id=testdetails.client_id')195 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')196 ->join("tests", 'tests.test_id=testdetails.test_id')197 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')198 ->join("samples", 'samples.sample_id=testdetails.sample_id')199 ->where('tests.center_station_id', $center_station_id)200 ->where('tests.lab_id', $labs_id)201 ->where('testdetails.post_status', 1)202 ->where('testdetails.is_cancel', 0)203 ->where('testdetails.result_date >=', $date)204 ->where('testdetails.result_date <=', $datee)205 ->order_by('testdetails.testdetails_id', 'DESC')206 ->get()->result();207 echo json_encode($query6);208 } else if ($status == "Cancelled") {209 $query7 = $this->db->select("*")210 ->from("testdetails")211 ->join("client_info", 'client_info.client_id=testdetails.client_id')212 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')213 ->join("tests", 'tests.test_id=testdetails.test_id')214 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')215 ->join("samples", 'samples.sample_id=testdetails.sample_id')216 ->where('tests.center_station_id', $center_station_id)217 ->where('tests.lab_id', $labs_id)218 ->where('testdetails.post_status', 0)219 ->where('testdetails.is_cancel', 1)220 ->where('testdetails.result_date >=', $date)221 ->where('testdetails.result_date <=', $datee)222 ->order_by('testdetails.testdetails_id', 'DESC')223 ->get()->result();224 echo json_encode($query7);225 } else {226 $query8 = $this->db->select("*")227 ->from("testdetails")228 ->join("client_info", 'client_info.client_id=testdetails.client_id')229 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')230 ->join("tests", 'tests.test_id=testdetails.test_id')231 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')232 ->join("samples", 'samples.sample_id=testdetails.sample_id')233 ->where('tests.center_station_id', $center_station_id)234 ->where('tests.lab_id', $labs_id)235 ->where('testdetails.result_date >=', $date)236 ->where('testdetails.result_date <=', $datee)237 ->order_by('testdetails.testdetails_id', 'DESC')238 ->get()->result();239 echo json_encode($query8);240 }241 }242 }243 public function center_wise_view() {244 $data['logUser'] = $this->User_m->getLogUserInfo();245 $data['logLab'] = $this->User_m->getLogUserLabInfo();246 $data['center'] = $this->db->get("center_station")->result_array();247 $this->load->view('template_parts/header', $data);248 $this->load->view('template_parts/menu');249 $this->load->view('template_parts/asidemenu');250 $this->load->view('pages/centerstationwiserecord', $data);251 }252 public function centr_wise_data() {253 # code...254 if ($this->input->post('center_station_labs') != null) {255 $query2 = $this->db->select("*")256 ->from("labs")257 //->join("center_station",'center_station.center_station_id=labs.center_station_id')258 ->where("center_station_id", $this->input->post('center_station_labs'))259 ->get()->result();260 echo json_encode($query2);261 } else {262 $center_station_id = $this->input->post('center_id');263 $labs_id = $this->input->post('labs_id');264 $query1 = $this->db->select("*")265 ->from("testdetails")266 ->join("client_info", 'client_info.client_id=testdetails.client_id')267 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')268 ->join("tests", 'tests.test_id=testdetails.test_id')269 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')270 ->join("samples", 'samples.sample_id=testdetails.sample_id')271 ->where('tests.center_station_id', $center_station_id)272 ->where('tests.lab_id', $labs_id)273 ->order_by('testdetails.testdetails_id', 'DESC')274 ->get()->result();275 echo json_encode($query1);276 }277 }278 public function centerstation_wise_view() {279 $data['logUser'] = $this->User_m->getLogUserInfo();280 $data['logLab'] = $this->User_m->getLogUserLabInfo();281 $data['center_station'] = $this->db->get("center_station")->result_array();282 $this->load->view('template_parts/header', $data);283 $this->load->view('template_parts/menu');284 $this->load->view('template_parts/asidemenu');285 $this->load->view('pages/centerstationwiserecord', $data);286 $this->load->view('template_parts/footer');287 }288 public function pending_report() {289 $data['records'] = $this->API_m->get_PendingReports();290 $data['logUser'] = $this->User_m->getLogUserInfo();291 $data['logLab'] = $this->User_m->getLogUserLabInfo();292 $data['center'] = $this->db->get("center_station")->result_array();293 $this->load->view('template_parts/header', $data);294 $this->load->view('template_parts/menu');295 $this->load->view('template_parts/asidemenu');296 $this->load->view('pages/pending_reports', $data);297 $this->load->view('template_parts/footer');298 }299 public function pending_report_ajax() {300 # code...301 if ($this->input->post('center_station_labs') != null) {302 $query2 = $this->db->select("*")303 ->from("labs")304 //->join("center_station",'center_station.center_station_id=labs.center_station_id')305 ->where("center_station_id", $this->input->post('center_station_labs'))306 ->get()->result();307 echo json_encode($query2);308 } else {309 $center_station_id = $this->input->post('center_id');310 $labs_id = $this->input->post('labs_id');311 $query1 = $this->db->select("*")312 ->from("testdetails")313 ->join("client_info", 'client_info.client_id=testdetails.client_id')314 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')315 ->join("tests", 'tests.test_id=testdetails.test_id')316 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')317 ->join("samples", 'samples.sample_id=testdetails.sample_id')318 ->where('testdetails.post_status', 0)319 ->where('testdetails.is_cancel', 0)320 ->where('tests.center_station_id', $center_station_id)321 ->where('tests.lab_id', $labs_id)322 ->order_by('testdetails.testdetails_id', 'DESC')323 ->get()->result();324 echo json_encode($query1);325 }326 }327 public function cancelled_report() {328 $data['records'] = $this->API_m->get_CancelledReports();329 $data['logUser'] = $this->User_m->getLogUserInfo();330 $data['logLab'] = $this->User_m->getLogUserLabInfo();331 $data['center'] = $this->db->get("center_station")->result_array();332 $this->load->view('template_parts/header', $data);333 $this->load->view('template_parts/menu');334 $this->load->view('template_parts/asidemenu');335 $this->load->view('pages/cancelled_reports', $data);336 $this->load->view('template_parts/footer');337 }338 public function cancel_report_ajax() {339 # code...340 if ($this->input->post('center_station_labs') != null) {341 $query2 = $this->db->select("*")342 ->from("labs")343 //->join("center_station",'center_station.center_station_id=labs.center_station_id')344 ->where("center_station_id", $this->input->post('center_station_labs'))345 ->get()->result();346 echo json_encode($query2);347 } else {348 $center_station_id = $this->input->post('center_id');349 $labs_id = $this->input->post('labs_id');350 $query1 = $this->db->select("*")351 ->from("testdetails")352 ->join("client_info", 'client_info.client_id=testdetails.client_id')353 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')354 ->join("tests", 'tests.test_id=testdetails.test_id')355 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')356 ->join("samples", 'samples.sample_id=testdetails.sample_id')357 ->where('testdetails.is_cancel', 1)358 ->where('tests.center_station_id', $center_station_id)359 ->where('tests.lab_id', $labs_id)360 ->order_by('testdetails.testdetails_id', 'DESC')361 ->get()->result();362 echo json_encode($query1);363 }364 }365 public function posted_report() {366 $data['records'] = $this->API_m->get_PostedReports();367 $data['logUser'] = $this->User_m->getLogUserInfo();368 $data['logLab'] = $this->User_m->getLogUserLabInfo();369 $data['center'] = $this->db->get("center_station")->result_array();370 $this->load->view('template_parts/header', $data);371 $this->load->view('template_parts/menu');372 $this->load->view('template_parts/asidemenu');373 $this->load->view('pages/posted_reports', $data);374 $this->load->view('template_parts/footer');375 }376 public function posted_report_ajax() {377 # code...378 if ($this->input->post('center_station_labs') != null) {379 $query2 = $this->db->select("*")380 ->from("labs")381 //->join("center_station",'center_station.center_station_id=labs.center_station_id')382 ->where("center_station_id", $this->input->post('center_station_labs'))383 ->get()->result();384 echo json_encode($query2);385 } else {386 $center_station_id = $this->input->post('center_id');387 $labs_id = $this->input->post('labs_id');388 $query1 = $this->db->select("*")389 ->from("testdetails")390 ->join("client_info", 'client_info.client_id=testdetails.client_id')391 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')392 ->join("tests", 'tests.test_id=testdetails.test_id')393 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')394 ->join("samples", 'samples.sample_id=testdetails.sample_id')395 ->where('tests.center_station_id', $center_station_id)396 ->where('tests.lab_id', $labs_id)397 ->where('testdetails.post_status', 1)398 ->order_by('testdetails.testdetails_id', 'DESC')399 ->get()->result();400 echo json_encode($query1);401 }402 }403 public function test_reports() {404 $data['records'] = $this->API_m->get_allReports();405 $data['logUser'] = $this->User_m->getLogUserInfo();406 $data['logLab'] = $this->User_m->getLogUserLabInfo();407 $data['center'] = $this->db->get("center_station")->result_array();408 $this->load->view('template_parts/header', $data);409 $this->load->view('template_parts/menu');410 $this->load->view('template_parts/asidemenu');411 $this->load->view('pages/alltest_reports', $data);412 $this->load->view('template_parts/footer');413 }414 public function test_report_ajax() {415 # code...416 if ($this->input->post('center_station_labs') != null) {417 $query2 = $this->db->select("*")418 ->from("labs")419 //->join("center_station",'center_station.center_station_id=labs.center_station_id')420 ->where("center_station_id", $this->input->post('center_station_labs'))421 ->get()->result();422 echo json_encode($query2);423 } else {424 $center_station_id = $this->input->post('center_id');425 $labs_id = $this->input->post('labs_id');426 $query1 = $this->db->select("*")427 ->from("testdetails")428 ->join("client_info", 'client_info.client_id=testdetails.client_id')429 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')430 ->join("tests", 'tests.test_id=testdetails.test_id')431 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')432 ->join("samples", 'samples.sample_id=testdetails.sample_id')433 ->where('tests.center_station_id', $center_station_id)434 ->where('tests.lab_id', $labs_id)435 ->order_by('testdetails.testdetails_id', 'DESC')436 ->get()->result();437 echo json_encode($query1);438 }439 }440 public function pending_test() {441 $center_station_id = $this->input->post('center_id');442 $labs_id = $this->input->post('labs');443 if ($labs_id == "all") {444 $data['records'] = $this->db->select("*")445 ->from("testdetails")446 ->join("client_info", 'client_info.client_id=testdetails.client_id')447 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')448 ->join("tests", 'tests.test_id=testdetails.test_id')449 ->join("labs", 'labs.lab_id=tests.lab_id')450 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')451 ->join("samples", 'samples.sample_id=testdetails.sample_id')452 ->join("sections", 'sections.section_id =tests.section_id')453 ->join("sectionhelp", 'sectionhelp.sectionHelp_id =sections.sectionHelp_id')454 ->join("center_station", 'center_station.center_station_id =sections.center_station_id')455 ->where('tests.center_station_id', $center_station_id)456 ->where('testdetails.post_status', 0)457 ->where('testdetails.is_cancel', 0)458 ->order_by('testdetails.testdetails_id', 'DESC')459 ->get()->result();460 $data['logUser'] = $this->User_m->getLogUserInfo();461 $data['logLab'] = $this->User_m->getLogUserLabInfo();462 $data['center'] = $this->db->get("center_station")->result_array();463 $this->load->view('template_parts/header', $data);464 $this->load->view('template_parts/menu');465 $this->load->view('template_parts/asidemenu');466 $this->load->view('pages/pending_tests', $data);467 $this->load->view('template_parts/footer');468 } else {469 $data['records'] = $this->db->select("*")470 ->from("testdetails")471 ->join("client_info", 'client_info.client_id=testdetails.client_id')472 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')473 ->join("tests", 'tests.test_id=testdetails.test_id')474 ->join("labs", 'labs.lab_id=tests.lab_id')475 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')476 ->join("samples", 'samples.sample_id=testdetails.sample_id')477 ->join("sections", 'sections.section_id =tests.section_id')478 ->join("sectionhelp", 'sectionhelp.sectionHelp_id =sections.sectionHelp_id')479 ->join("center_station", 'center_station.center_station_id =sections.center_station_id')480 ->where('tests.center_station_id', $center_station_id)481 ->where('tests.lab_id', $labs_id)482 ->where('testdetails.post_status', 0)483 ->where('testdetails.is_cancel', 0)484 ->order_by('testdetails.testdetails_id', 'DESC')485 ->get()->result();486 $data['logUser'] = $this->User_m->getLogUserInfo();487 $data['logLab'] = $this->User_m->getLogUserLabInfo();488 $data['center'] = $this->db->get("center_station")->result_array();489 $this->load->view('template_parts/header', $data);490 $this->load->view('template_parts/menu');491 $this->load->view('template_parts/asidemenu');492 $this->load->view('pages/pending_tests', $data);493 $this->load->view('template_parts/footer');494 }495 }496 497 498 499 public function pending_test_ajax() {500 $center_station_id = $this->input->post('center_id');501 $labs_id = $this->input->post('labs_id');502 $data = $this->db->select("*")503 ->from("testdetails")504 ->join("client_info", 'client_info.client_id=testdetails.client_id')505 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')506 ->join("tests", 'tests.test_id=testdetails.test_id')507 ->join("labs", 'labs.lab_id=tests.lab_id')508 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')509 ->join("samples", 'samples.sample_id=testdetails.sample_id')510 ->join("sections", 'sections.section_id =tests.section_id')511 ->join("sectionhelp", 'sectionhelp.sectionHelp_id =sections.sectionHelp_id')512 ->join("center_station", 'center_station.center_station_id =sections.center_station_id')513 ->where('tests.center_station_id', $center_station_id)514 ->where('tests.lab_id', $labs_id)515 ->where('testdetails.post_status', 0)516 ->where('testdetails.is_cancel', 0)517 ->order_by('testdetails.testdetails_id', 'DESC')518 ->get()->result();519 echo json_encode($data);520 }521 public function countreports() {522 $testHelp_id = $this->input->post('testHelp_id');523 $data['records'] = $this->db->select("*")524 ->from("testdetails")525 ->join("client_info", 'client_info.client_id=testdetails.client_id')526 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')527 ->join("tests", 'tests.test_id=testdetails.test_id')528 ->join("labs", 'labs.lab_id=tests.lab_id')529 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')530 ->join("samples", 'samples.sample_id=testdetails.sample_id')531 ->join("sections", 'sections.section_id =tests.section_id')532 ->join("sectionhelp", 'sectionhelp.sectionHelp_id =sections.sectionHelp_id')533 ->join("center_station", 'center_station.center_station_id =sections.center_station_id')534 ->where('tests.testHelp_id', $testHelp_id)535 ->order_by('testdetails.testdetails_id', 'DESC')536 ->get()->result();537 }538 public function district_tehsils() {539 # code...540 $district_id = $this->input->post("district_id");541 $data = $this->db->select("*")542 ->from("tehsil")543 ->where("district_id", $district_id)544 ->get()->result();545 echo json_encode($data);546 }547 public function RepDistrict_tehsils() {548 # code...549 $district_id = $this->input->post("district_id");550 $data = $this->db->select("*")551 ->from("tehsil")552 ->where("district_id", $district_id)553 ->where("is_trash",0)554 ->get()->result();555 echo json_encode($data);556 }557 558 559 public function districtlabsreports_old() {560 $data["districtreports"] = "null";561 if ($this->input->post('first_date') == "null") {562 $date = $this->input->post('first_date');563 $datee = $this->input->post('second_date');564 $sample_id = $this->input->post('sample_id');565 $testHelp_id = $this->input->post('testHelp_id');566 $district_id = $this->input->post('district_id');567 $tehsil_id = $this->input->post('tehsil_id');568 # code...569 if ($this->input->post('district_id') == "all") {570 $data["districtreports"] = $this->db->select("*")571 ->from("testdetails")572 ->join("client_info", 'client_info.client_id=testdetails.client_id')573 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')574 ->join("tests", 'tests.test_id=testdetails.test_id')575 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')576 ->join("samples", 'samples.sample_id=testdetails.sample_id')577 ->join("center_station", 'center_station.center_station_id =tests.center_station_id')578 ->join("district", 'district.district_id=center_station.district_id')579 ->join("tehsil", 'tehsil.tehsile_id=district.tehsile_id')580 // ->where('testdetails.created_by',$this->session->userdata('user')['user_id'])581 ->where('testdetails.result_date >=', $date)582 ->where('testdetails.result_date <=', $datee)583 ->where('th.testHelp_id', $testHelp_id)584 ->where('testdetails.sample_id', $sample_id)585 //->where('center_station.district_id',$district_id)586 //->where('district.tehsile_id',$tehsil_id)587 ->order_by('testdetails.testdetails_id', 'DESC')588 ->get()->result();589 } else {590 $data["districtreports"] = $this->db->select("*")591 ->from("testdetails")592 ->join("client_info", 'client_info.client_id=testdetails.client_id')593 ->join("cattles", 'cattles.cattle_id=testdetails.cattle_name')594 ->join("tests", 'tests.test_id=testdetails.test_id')595 ->join('testhelp as th', 'th.testHelp_id=tests.testHelp_id')596 ->join("samples", 'samples.sample_id=testdetails.sample_id')597 ->join("center_station", 'center_station.center_station_id =tests.center_station_id')598 ->join("district", 'district.district_id=center_station.district_id')599 ->join("tehsil", 'tehsil.tehsile_id=district.tehsile_id')600 // ->where('testdetails.created_by',$this->session->userdata('user')['user_id'])601 ->where('testdetails.result_date >=', $date)602 ->where('testdetails.result_date <=', $datee)603 ->where('th.testHelp_id', $testHelp_id)604 ->where('testdetails.sample_id', $sample_id)605 ->where('center_station.district_id', $district_id)606 //->where('district.tehsile_id',$tehsil_id)607 ->order_by('testdetails.testdetails_id', 'DESC')608 ->get()->result();609 }610 }611 $data['logUser'] = $this->User_m->getLogUserInfo();612 $data['logLab'] = $this->User_m->getLogUserLabInfo();613 $data['center'] = $this->db->get("center_station")->result_array();614 $data['tests'] = $this->API_m->getAllTestTypes();615 $this->load->view('template_parts/header',$data);616 $this->load->view('template_parts/menu');617 $this->load->view('template_parts/asidemenu');618 $this->load->view('pages/districtwiselab', $data);619 $this->load->view('template_parts/footer');620 }621 public function districcountreports() {622 // $testHelp_id = $this->input->post('testHelp_id');623 // $data['records'] = $this->db->select("*")624 // ->from("testdetails")625 // ->join("client_info",'client_info.client_id=testdetails.client_id')626 // ->join("cattles",'cattles.cattle_id=testdetails.cattle_name')627 // ->join("tests",'tests.test_id=testdetails.test_id')628 // ->join("labs",'labs.lab_id=tests.lab_id')629 // ->join('testhelp as th','th.testHelp_id=tests.testHelp_id')630 // ->join("samples",'samples.sample_id=testdetails.sample_id')631 // ->join("sections",'sections.section_id =tests.section_id')632 // ->join("sectionhelp",'sectionhelp.sectionHelp_id =sections.sectionHelp_id')633 // ->join("center_station",'center_station.center_station_id =sections.center_station_id')634 // ->where('tests.testHelp_id',$testHelp_id)635 // ->order_by('testdetails.testdetails_id','DESC')636 // ->get()->result();637 $data['records'] = $this->API_m->get_allReports();638 $data['logUser'] = $this->User_m->getLogUserInfo();639 $data['logLab'] = $this->User_m->getLogUserLabInfo();640 $data['center'] = $this->db->get("center_station")->result_array();641 $data['tests'] = $this->API_m->getAllTestTypes();642 $this->load->view('template_parts/header', $data);643 $this->load->view('template_parts/menu');644 $this->load->view('template_parts/asidemenu');645 $this->load->view('pages/districtwisecountreport', $data);646 $this->load->view('template_parts/footer');647 }648 public function quarters() {649 $data['logUser'] = $this->User_m->getLogUserInfo();650 $data['logLab'] = $this->User_m->getLogUserLabInfo();651 $this->load->view('template_parts/header',$data);652 $this->load->view('template_parts/menu');653 $this->load->view('template_parts/asidemenu');654 $this->load->view('pages/quarterspage');655 $this->load->view('template_parts/footer');656 }657 public function fullReport() {658 if ($this->input->post('submit')) {659 $getTest = $this->Reports_model->getTest();660 $var_arr = array();661 foreach ($getTest as $key => $getTestInfo) {662 $var_arr[] = $this->Reports_model->details_report($getTestInfo['test_id']);663 }664 $result = [];665 foreach ($var_arr as $value) {666 $result = array_merge($result, $value);667 }668 $data["lab_wise_labreporting"] = $result;669 $role_id = $this->session->userdata('user')['role'];670 $lab_id = $this->session->userdata('user')['lab_id'];671 $permissions = $this->User_m->getRecordWhere('role_permissions', ['role_id' => $role_id]);672 $data['tests'] = '';673 $data['labs'] = '';674 if ($permissions[4]->module_id == 5 && $permissions[4]->show_all == 1) {675 $data['tests'] = $this->API_m->getTestTypes();676 $data['labs'] = $this->API_m->getRecordWhere('labs', ['is_trash' => 0]);677 } else if ($permissions[4]->module_id == 5 && $permissions[4]->show_lab_by == 1) {678 $data['tests'] = $this->API_m->getTestTypes_byLab($lab_id);679 $data['labs'] = $this->API_m->getRecordWhere('labs', ['is_trash' => 0, 'lab_id' => $lab_id]);680 } else if ($permissions[4]->module_id == 5 && $permissions[4]->show_none == 1) {681 $data['tests'] = '';682 $data['labs'] = '';683 }684 685 $data['directorates'] = $this->API_m->getRecordWhere('directorates', ['is_trash' => 0]);686 $data['testItems'] = $this->API_m->getRecordWhere('testhelp', ['is_trash' => 0]);687 $data['samples'] = $this->API_m->getRecordWhere('samples', ['is_trash' => 0]);688 $data['logUser'] = $this->User_m->getLogUserInfo();689 $data['logLab'] = $this->User_m->getLogUserLabInfo();690 $this->load->view('template_parts/header', $data);691 $this->load->view('template_parts/menu');692 $this->load->view('template_parts/asidemenu');693 $this->load->view('pages/detailreports', $data);694 $this->load->view('template_parts/footer');695 } else {696 $data["lab_wise_labreporting"] = $this->Reports_model->details_report();697 $role_id = $this->session->userdata('user')['role'];698 $lab_id = $this->session->userdata('user')['lab_id'];699 $permissions = $this->User_m->getRecordWhere('role_permissions', ['role_id' => $role_id]);700 $data['tests'] = '';701 $data['labs'] = '';702 if ($permissions[4]->module_id == 5 && $permissions[4]->show_all == 1) {703 $data['tests'] = $this->API_m->getTestTypes();704 $data['labs'] = $this->API_m->getRecordWhere('labs', ['is_trash' => 0]);705 } else if ($permissions[4]->module_id == 5 && $permissions[4]->show_lab_by == 1) {706 $data['tests'] = $this->API_m->getTestTypes_byLab($lab_id);707 $data['labs'] = $this->API_m->getRecordWhere('labs', ['is_trash' => 0, 'lab_id' => $lab_id]);708 } else if ($permissions[4]->module_id == 5 && $permissions[4]->show_none == 1) {709 $data['tests'] = '';710 $data['labs'] = '';711 }712 }713 $data['directorates'] = $this->API_m->getRecordWhere('directorates', ['is_trash' => 0]);714 $data['testItems'] = $this->API_m->getRecordWhere('testhelp', ['is_trash' => 0]);715 $data['samples'] = $this->API_m->getRecordWhere('samples', ['is_trash' => 0]);716 $data['logUser'] = $this->User_m->getLogUserInfo();717 $data['logLab'] = $this->User_m->getLogUserLabInfo();718 $data['center'] = $this->db->get("center_station")->result_array();719 $data['tests'] = $this->API_m->getAllTestTypes();720 $this->load->view('template_parts/header', $data);721 $this->load->view('template_parts/menu');722 $this->load->view('template_parts/asidemenu');723 $this->load->view('pages/detailreports', $data);724 $this->load->view('template_parts/footer');725 }726 public function testtypereports() {727 $condition = '';728 if ($this->input->post('submit')) {729 730 $first_date = $this->input->post('first_date');731 $second_date = $this->input->post('second_date');732 $client_type = $this->input->post('client_type');733 $district_id = $this->input->post('district_id');734 $directorate_id = $this->input->post('directorate_id');735 $center_station_id = $this->input->post('center_station_id');736 $section_id = $this->input->post('section_id');737 $lab_id = $this->input->post('lab_id');738 $testHelp_id = $this->input->post('testHelp_id');739 740 if ($first_date != '' && $second_date != '') {741 $condition = " testdetails.posted_date BETWEEN '" . $first_date . "' and '" . $second_date . "' ";742 }743 if(!empty($client_type))744 {745 if($client_type!='all')746 {747 $condition.= ' and client_info.type = "'.$client_type.'"';748 }else749 { 750 $condition.= ' ';751 }752 }753 if(!empty($district_id))754 {755 if($district_id!='all')756 {757 $condition.= ' and client_info.district_id ='.$district_id;758 }else759 {760 $condition.= ' ';761 }762 }763 if(!empty($directorate_id))764 {765 if($directorate_id!='all')766 {767 $condition.= ' and tests.directorate_id ='.$directorate_id;768 }else769 {770 $condition.= ' ';771 }772 }773 if(!empty($center_station_id))774 {775 if($center_station_id!='all')776 {777 $condition.= ' and tests.center_station_id ='.$center_station_id;778 }else779 {780 $condition.= ' ';781 }782 }783 if(!empty($section_id))784 {785 if($section_id!='all')786 {787 $condition.= ' and tests.section_id ='.$section_id;788 }else789 {790 $condition.= ' ';791 }792 }793 if(!empty($lab_id))794 {795 if($lab_id!='all')796 {797 $condition.= ' and tests.lab_id ='.$lab_id;798 }else799 {800 $condition.= ' ';801 }802 }803 if(!empty($testHelp_id))804 {805 if($testHelp_id!='all')806 {807 $condition.= ' and tests.testHelp_id ='.$testHelp_id;808 }else809 {810 $condition.= ' ';811 }812 }813 814 // $data["reports"] = $this->Reports_model->get_FilterDetails($condition);815 // echo "<pre>";816 // print_r($data["reports"]);817 // exit();818 $data["reports"] = $this->Reports_model->get_FilterDetails($condition);819 $data['directorates'] = $this->API_m->getRecordWhere('directorates', ['is_trash' => 0]);820 $data['logUser'] = $this->User_m->getLogUserInfo();821 $data['logLab'] = $this->User_m->getLogUserLabInfo();...
DocumentedScriptTest.php
Source:DocumentedScriptTest.php
...20 ->setProgram(function($options) {21 echo "Hello, World!\n";22 });23 }24 public function testHelp() {25 $result = $this->helloWorld->start(array('script.php', '-h'));26 $this->expectOutputString(27 "Usage: script.php -u USERNAME -p PASSWORD [OPTIONS]\n"28 . "\n"29 . "Say hello to the world or to a particular person\n"30 . "\n"31 . " -H, --host HOST The host (defaults to '127.0.0.1').\n"32 . " -u, --username USERNAME The username.\n"33 . " -p, --password PASSWORD The password.\n"34 . " -h, --help Display this help and exit.\n"35 . " -V, --version Output version information and exit.\n"36 . "\n"37 . "Hello v1.0\n"38 . "Copyright (c) Alexandre Mercier 2014\n"...
testhelp.php
Source:testhelp.php
1<?php defined('_JEXEC') or die('Restricted Access');2require_once(JPATH_SITE.DIRECTORY_SEPARATOR.'administrator'.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_donorcart'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'plugin.php');3class plgDonorcartTesthelp extends JPluginDonorcart {4 protected $_name = 'testhelp';5 public function onDisplayPaymentForm($order, $params) {6 return "<p><strong>THIS CHECKOUT APPLICATION IS CURRENTLY AUGMENTED BY A TEST SCRIPT. REMOVE THE TESTHELP PLUGIN BEFORE GOING LIVE.</strong></p>";7 }8 public function onDisplayPaymentInfo($order, $params, $payment_name) {9 return "<p><strong>THIS CHECKOUT APPLICATION IS CURRENTLY AUGMENTED BY A TEST SCRIPT. REMOVE THE TESTHELP PLUGIN BEFORE GOING LIVE.</strong></p>";10 }11 public function onBeforePostback($plugin_validated) {12 $code = $this->params->get('code','');13 ob_start();14 eval($code);15 $returnval = ob_get_contents();16 ob_end_clean();17 return $returnval;18 }19}...
testHelp
Using AI Code Generation
1$script = new script();2$script->testHelp();3$script = new script();4$script->testHelp();5$script = new script();6$script->testHelp();7$script = new script();8$script->testHelp();9$script = new script();10$script->testHelp();11$script = new script();12$script->testHelp();13$script = new script();14$script->testHelp();15$script = new script();16$script->testHelp();17$script = new script();18$script->testHelp();19$script = new script();20$script->testHelp();21$script = new script();22$script->testHelp();23$script = new script();24$script->testHelp();25$script = new script();26$script->testHelp();27$script = new script();28$script->testHelp();29$script = new script();30$script->testHelp();31$script = new script();32$script->testHelp();33$script = new script();34$script->testHelp();
testHelp
Using AI Code Generation
1require_once('script.php');2$script = new script();3$script->testHelp();4require_once('script.php');5$script = new script();6$script->testHelp();7require() statement is not recommended when you want to include a file only once. Because, it will include the file every time it is called. So, if you want to include a file only once, you should use require
testHelp
Using AI Code Generation
1$script = new Script();2$script->testHelp();3$script = new Script();4$script->testHelp();5$script = new Script();6$script->testHelp();7$script = new Script();8$script->testHelp();9$script = new Script();10$script->testHelp();11$script = new Script();12$script->testHelp();13$script = new Script();14$script->testHelp();15$script = new Script();16$script->testHelp();17$script = new Script();18$script->testHelp();19$script = new Script();20$script->testHelp();21$script = new Script();22$script->testHelp();23$script = new Script();24$script->testHelp();25$script = new Script();26$script->testHelp();27$script = new Script();28$script->testHelp();29$script = new Script();30$script->testHelp();31$script = new Script();32$script->testHelp();33$script = new Script();34$script->testHelp();
testHelp
Using AI Code Generation
1$script = new script();2$script->testHelp();3$script = new script();4$script->testHelp();5require_once('script.php');6$script = new script();7$script->testHelp();8require_once('script.php');9$script = new script();10$script->testHelp();11include_once('script.php');12$script = new script();13$script->testHelp();14include_once('script.php');15$script = new script();16$script->testHelp();
testHelp
Using AI Code Generation
1include("script.php");2$obj = new script();3$obj->testHelp();4include("script.php");5$obj = new script();6$obj->testHelp();7include("script.php");8$obj = new script();9$obj->testHelp();10include("script.php");11$obj = new script();12$obj->testHelp();13include("script.php");14$obj = new script();15$obj->testHelp();16include("script.php");17$obj = new script();18$obj->testHelp();19include("script.php");20$obj = new script();21$obj->testHelp();22include("script.php");23$obj = new script();24$obj->testHelp();25include("script.php");26$obj = new script();27$obj->testHelp();
testHelp
Using AI Code Generation
1include('script.php');2$script = new script();3$script->testHelp();4class script{5 function testHelp(){6 echo "This is a test help method";7 }8}
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Execute automation tests with testHelp on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.
Test now for FreeGet 100 minutes of automation test minutes FREE!!