print_object($tr_data); break; case 'deletetr': //check office can use this function if (!require_office()) { print_error($string_arr['er003']); } //check user permission, if (!check_office_staff($_SESSION['staff_no'])) { print_error($string_arr['er004']); } $tr = new tr($tr_no); if ($tr->get_errmsg()) { print_error($tr->get_errmsg()); exit; } $tr_data = $tr->get_tr(); if ($tr_data->with_po) { //no handle po with tr print_error('[!]not-in handle case (tr with po)'); } $tr_delete_action = $tr->delete_tr(); break; case 'viewdeleedtr': $data = tr::get_trdeleted_record(5529); break; default: //echo 'here is default po'; print_error('[x][tr004]Default no action'); break; }