Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for SourceGuardian Encoder)
- *
- * @ Version : 4.0.8.9
- * @ Author : DeZender
- * @ Release on : 10.05.2019
- * @ Official site : http://DeZender.Net
- *
- */
- function head_scripts()
- {
- init_jquery();
- require_js_function('standard_ws_call');
- 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";
- }
- require_once 'ini_project.php';
- require_function('checkboxHTML');
- require_function('change_timestamp_timezone');
- require_function('count_scans_to_send_to_sabo');
- require_function('html_top');
- require_function('init_jquery');
- set_page_caching();
- set_page_security('accesslevel', ['manager']);
- require_database();
- html_top('Export - Local Ticket Server');
- html_middle();
- 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">';
- echo count_scans_to_send_to_sabo();
- echo '</div>' . "\r\n";
- $detailed = count_scans_to_send_to_sabo(true);
- $scans_per_day = [];
- $local_timezone = get_system_setting('local_timezone');
- foreach ($detailed as $ckey => $det) {
- $localtime = change_timestamp_timezone($det['scn_timestamp'], 'UTC', $local_timezone);
- $date = substr($localtime, 0, 10);
- $scans_per_day[$date]['count']++;
- if (!$scans_per_day[$date]['firstscan']) {
- $scans_per_day[$date]['firstscan'] = substr($localtime, 11, 5);
- ................................................................................
- ......................................
- .............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement