File manager - Edit - /home/autoph/public_html/tasks/pdf_bg_service.php.tar
Back
home/autoph/public_html/connectv1/pdf_bg_service.php 0000644 00000007351 15025006014 0016647 0 ustar 00 <?php ini_set('max_execution_time', '0'); set_time_limit(0); //same code above ini_set('memory_limit','-1'). date_default_timezone_set('Asia/Manila'); // include('api/controllers/utility.php'); include('cfg/db.php'); // if(!isset($_SESSION['user']['id'])){ // header('location:requested_reports.php'); // return; // } // $utility = new Utility(); $file_name = $_REQUEST['token']; $decoded = strtr($file_name, "-_~", "+/="); // $decoded = str_replace(".php","", $decoded); $decoded = $db->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']; // } $is_downloadable = 1; // if(!$utility->isNotEmpty($check_request) || intval($check_request) <> 1){ // header('location: requested_sms_service.php'); // return; // } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>BG Service Greetings</title> <!-- <script src="dist/js/filter.js"></script> --> <!-- Google Font: Source Sans Pro --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback"> <!-- Font Awesome --> <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css"> <!-- Theme style --> <link rel="stylesheet" href="dist/css/adminlte.min.css"> <!-- overlayScrollbars --> <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css"> <style> body { overflow: hidden; /* Hide scrollbars */ } </style> </head> <body class="hold-transition sidebar-mini text-sm" oncopy='return false' oncut='return false' onselectstart='return false'> <!-- <body style="font-family: Arial, Helvetica, sans-serif;"> --> <!-- <iframe style="width: 100%;height: 100vh;position: relative;" id="pdf-js-viewer" class="embed-responsive-item"></iframe> --> <?php if($is_downloadable == 0){ ?> <iframe style="width: 100%;height: 100vh;position: relative;" id="pdf-js-viewer" src="plugins/pdfjs-2.8.335-dist/web/viewer_readonly.html?file=../../../bg_service/pdf/<?php echo $file_name.'.pdf'; ?>" class="embed-responsive-item"></iframe> <?php }else if($is_downloadable == 1){ ?> <iframe style="width: 100%;height: 100vh;position: relative;" id="pdf-js-viewer" src="plugins/pdfjs-2.8.335-dist/web/viewer.html?file=../../../bg_service/pdf/<?php echo $file_name.'.pdf'; ?>" class="embed-responsive-item"></iframe> <?php } ?> <!-- </div> --> <!-- jQuery --> <script src="plugins/jquery/jquery.min.js"></script> <!-- Bootstrap 4 --> <script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- bs-custom-file-input --> <script src="plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script> <!-- AdminLTE App --> <script src="dist/js/adminlte.min.js"></script> <script> $(document).ready(function() { // $('#pdf-js-viewer').attr('src', 'http://facebook.com'); }); </script> </body> </html>