escape($db -> cipher($decoded,false)); $request_info = $db -> return_result("SELECT tb.is_downloadable, ( IF( (SELECT DATEDIFF(tb.expire,NOW()) < 0),'3', IF( (SELECT count(id) FROM `request_status` WHERE request_id = tb.id AND `status` = 2) = 0 , IF( (SELECT count(id) FROM `request_status` WHERE request_id = tb.id AND `status` = 0) = 0 , '1', '0' ), '2' ) ) ) as status FROM `text_blast` tb /*INNER JOIN report_type rt ON r.report_type_id = rt.id */ WHERE tb.control_number = '".$decoded."' "); foreach($request_info as $request_info_data){ $check_request = $request_info_data['status']; // $is_downloadable = $request_info_data['is_downloadable']; } // if(!$utility->isNotEmpty($check_request) || intval($check_request) <> 1){ // header('location: requested_sms_service.php'); // return; // } ?> SMS Service Request