Advertisement
Guest User

Untitled

a guest
Aug 1st, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for SourceGuardian Encoder)
  6. *
  7. * @ Version : 4.0.8.9
  8. * @ Author : DeZender
  9. * @ Release on : 10.05.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function head_scripts()
  15. {
  16. init_jquery();
  17. require_js_function('standard_ws_call');
  18. echo '<script type="text/javascript">' . "\r\n" . '/* <![CDATA[ */' . "\r\n" . 'function initExport(inFailsafePhase2) {' . "\r\n\t" . 'window._jfw_pagewide_msg_nofade = true;' . "\r\n\t" . 'if ($jq(\'.cancel-button\').length == 0) {' . "\r\n\t\t" . '$jq(\'body\').append(\'<div class="cancel-button"><input type="button" value="Cancel" onclick="cancelExport();" /></div>\');' . "\r\n\t" . '}' . "\r\n\r\n\t" . 'var failsafeValue = ($jq(\':input[name=failsafe_mode]\').is(\':checked\') == true ? \'1\' : \'0\');' . "\r\n\t" . 'if (inFailsafePhase2 === true) {' . "\r\n\t\t" . 'failsafeValue = \'2\';' . "\r\n\t" . '}' . "\r\n\r\n\t" . 'var passInfo = {};' . "\r\n\t" . 'if (failsafeValue == \'1\') {' . "\r\n\t\t" . 'passInfo._custom_process_status = \'Processing in batch (phase 1 of 2)...\';' . "\r\n\t" . '} else if (failsafeValue == \'2\') {' . "\r\n\t\t" . 'passInfo._custom_process_status = \'Processing one by one (phase 2 of 2)...\';' . "\r\n\t" . '}' . "\r\n\r\n\t" . 'standard_ws_call(\'send_scanned_barcodes\', {failsafe: failsafeValue }, \'error/result_quiet\', function(rsp) {' . "\r\n\t\t" . 'if (rsp.data.failed_exports.length > 0) {' . "\r\n\t\t\t" . '$jq(\'#failed-exports\').show();' . "\r\n\t\t\t" . 'for (var i in rsp.data.failed_exports) {' . "\r\n\t\t\t\t" . 'var c = rsp.data.failed_exports[i];' . "\r\n\t\t\t\t" . '$jq(\'#failed-exports-table tbody\').append(\'<tr><td>\'+ c.bc_barcode +\'</td><td>\'+ c.scn_timestamp +\'</td></tr>\');' . "\r\n\t\t\t" . '}' . "\r\n\t\t" . '}' . "\r\n\t\t" . 'if (rsp.success) {' . "\r\n\t\t\t" . '$jq(\'#scans-to-sent\').html(rsp.data.remaining_barcodes);' . "\r\n\t\t\t" . 'if (rsp.data.remaining_barcodes > 0 && rsp.data.interrupted_by_user == false) {' . "\r\n\t\t\t\t" . 'initExport((rsp.data.failsafe_phase2_activated == true ? true : false));' . "\r\n\t\t\t" . '} else {' . "\r\n\t\t\t\t" . '$jq(\'.cancel-button\').remove();' . "\r\n\t\t\t\t" . 'if (rsp.data.interrupted_by_user == true) {' . "\r\n\t\t\t\t\t" . 'alert(\'Export has been interrupted by the user.\');' . "\r\n\t\t\t\t" . '} else if ($jq(\'#failed-exports-table tbody tr\').length > 0) {' . "\r\n\t\t\t\t\t" . 'alert(\'SABO rejected one or more scans. They are listed below.\');' . "\r\n\t\t\t\t" . '} else {' . "\r\n\t\t\t\t\t" . 'alert(\'All ticket scans have now been sent to SABO.\');' . "\r\n\t\t\t\t\t" . 'location.href = \'./\';' . "\r\n\t\t\t\t" . '}' . "\r\n\t\t\t" . '}' . "\r\n\t\t" . '} else {' . "\r\n\t\t\t" . '$jq(\'.cancel-button\').remove();' . "\r\n\t\t" . '}' . "\r\n\t" . '}, \'\', passInfo);' . "\r\n" . '}' . "\r\n" . 'function cancelExport() {' . "\r\n\t" . 'standard_ws_call(\'cancel_sending_scanned_barcodes\', {}, \'nothing\', null, \'skip_show_process\');' . "\r\n\t" . 'change_pagewide_msg(\'Cancelling...\', {dontCreate: true});' . "\r\n" . '}' . "\r\n" . '/* ]]> */' . "\r\n" . '</script>' . "\r\n" . '<style type="text/css">' . "\r\n" . 'h2 {' . "\r\n\t" . 'margin-top: 145px;' . "\r\n\t" . 'color: #808080;' . "\r\n" . '}' . "\r\n" . '.big-counter {' . "\r\n\t" . 'font-size: 300%;' . "\r\n" . '}' . "\r\n" . '#failed-exports-table {' . "\r\n\t" . 'margin-left: auto;' . "\r\n\t" . 'margin-right: auto;' . "\r\n" . '}' . "\r\n" . '#failed-exports-table th {' . "\r\n\t" . 'color: white;' . "\r\n" . '}' . "\r\n" . '#failed-exports-table td {' . "\r\n\t" . 'padding-right: 30px;' . "\r\n" . '}' . "\r\n" . '.cancel-button {' . "\r\n\t" . 'position: fixed;' . "\r\n\t" . 'bottom: 40px;' . "\r\n\t" . 'right: 40px;' . "\r\n\t" . 'z-index: 2000;' . "\r\n" . '}' . "\r\n" . '</style>' . "\r\n";
  19. }
  20.  
  21. require_once 'ini_project.php';
  22. require_function('checkboxHTML');
  23. require_function('change_timestamp_timezone');
  24. require_function('count_scans_to_send_to_sabo');
  25. require_function('html_top');
  26. require_function('init_jquery');
  27. set_page_caching();
  28. set_page_security('accesslevel', ['manager']);
  29. require_database();
  30. html_top('Export - Local Ticket Server');
  31. html_middle();
  32. echo '<div style="text-align: center">' . "\r\n" . '<form action="_404.php" method="get" onsubmit="initExport();return false;">' . "\r\n\r\n" . '<h2>Ticket scans to be exported</h2>' . "\r\n" . '<div class="big-counter" id="scans-to-sent">';
  33. echo count_scans_to_send_to_sabo();
  34. echo '</div>' . "\r\n";
  35. $detailed = count_scans_to_send_to_sabo(true);
  36. $scans_per_day = [];
  37. $local_timezone = get_system_setting('local_timezone');
  38.  
  39. foreach ($detailed as $ckey => $det) {
  40. $localtime = change_timestamp_timezone($det['scn_timestamp'], 'UTC', $local_timezone);
  41. $date = substr($localtime, 0, 10);
  42. $scans_per_day[$date]['count']++;
  43.  
  44. if (!$scans_per_day[$date]['firstscan']) {
  45. $scans_per_day[$date]['firstscan'] = substr($localtime, 11, 5);
  46. ................................................................................
  47. ......................................
  48. .............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement