PATH:
home
/
letacommog
/
aacote
/
wp-content
/
plugins
/
wyz-toolkit
/
wp-csv
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <script src="//code.jquery.com/jquery-1.9.1.js"></script> <script src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <script type="text/javascript"> jQuery( function( ) { jQuery( '#progressbar' ).progressbar( { value: 0 } ); var base_url = '<?php echo site_url( ); ?>'; function getProgress( start, retpercent, lines ) { jQuery.ajax({ url: base_url + '/wp-admin/admin-ajax.php?action=process_import', type: "GET", data: 'start=' + start + '&progress=' + retpercent + '&lines=' + lines, dataType : 'json', success: function( data ) { if ( data.errors ) { jQuery( '#import_wrapper' ).show( ); jQuery( '#progressbar' ).addClass( 'ui-widget-content' ).removeClass( 'stripes' ); window.clearInterval( interval_id ); jQuery( '#timer' ).text( '00:00:00' ); jQuery( '#percent' ).text( '(0%)' ); jQuery( '#error_list' ).append( '<tr><td>' + data.errors + '</td></tr>' ); jQuery( '#errors' ).show( ); } var percentage = parseFloat( data.percentagecomplete ); if ( percentage < 100 ) { jQuery( '#progressbar' ).progressbar( "value", percentage ); jQuery( '#percent' ).text( '(' + percentage + '%)' ); getProgress( data.position, data.percentagecomplete, data.lines ); } else { jQuery( '#progressbar' ).progressbar( "value", percentage ); jQuery( '#percent' ).text( '(' + percentage + '%)' ); var link = window.location.href; link = link.substring(0, link.lastIndexOf("/") ); window.location.href = link + '/admin.php?page=wyzi-report'; } }, error: function( data, textStatus, error ) { alert( 'Import failed due to an error on your server. Click OK to display the error message details.' ); jQuery( '#cpk_wpcsv_left' ).empty( ); heading = '<h2>The following errors were generated by your server:</h2>'; ajax_response = '<p>' + data.responseText + '</p>'; ajax_status = '<p>' + textStatus + '</p>'; ajax_error = '<p>' + error + '</p>'; jQuery( '#cpk_wpcsv_left' ).html( heading + ajax_status + ajax_error + ajax_response ); jQuery( '#cpk_wpcsv_left' ).append( "<p><strong>Please report this error <a href='https://wordpress.org/support/plugin/wp-csv'>here</a>.</strong></p>" ); return; } }); } jQuery( '#start_import' ).on( 'click', function( ) { interval_id = window.setInterval( function() { jQuery("#timer").timer(); }, 1000); jQuery( '#import_wrapper' ).hide( ); jQuery( '#progressbar' ).removeClass( 'ui-widget-content' ).addClass( 'stripes' ); getProgress( 1, 0, 0 ); }); String.prototype.toHHMMSS = function () { var sec_num = parseInt(this, 10); // don't forget the second param var hours = Math.floor(sec_num / 3600); var minutes = Math.floor((sec_num - (hours * 3600)) / 60); var seconds = sec_num - (hours * 3600) - (minutes * 60); if (hours < 10) {hours = "0"+hours;} if (minutes < 10) {minutes = "0"+minutes;} if (seconds < 10) {seconds = "0"+seconds;} var time = hours+':'+minutes+':'+seconds; return time; } var seconds = 0; jQuery.fn.timer = function() { seconds++; jQuery( this ).text( seconds.toString( ).toHHMMSS( ) ); } // timer function end }); </script> <?php if ( $error ) { echo "<p><strong class='red'>{$error}</strong></p>"; } ?> <?php if ( empty( $file_name ) || !empty( $error ) ): ?> <table class='widefat'> <thead> <tr><th colspan='2'><strong><?php _e( 'Upload CSV File For Import', 'wyzi-business-finder' ); ?></strong></th></tr> </thead> <tbody> <tr><th><?php _e( 'Select CSV File', 'wyzi-business-finder' ); ?></th><td> <form enctype="multipart/form-data" action="" method="POST"> <?php if ( isset( $nonce ) ) echo $nonce ?> <input type="hidden" name="action" value="import" /> <input name="uploadedfile" type="file" /> </fieldset> </tbody> </table> <br /> <input type='submit' value='Upload'/> </form> <?php else: ?> <table class='widefat'> <thead> <tr><th colspan='2'><strong><?php _e( 'Import Uploaded File', 'wyzi-business-finder' ); ?></strong></th></tr> </thead> <tbody> <tr><th><?php _e( 'Uploaded file', 'wyzi-business-finder' ); ?>:</th><td><strong><?php echo $file_name ?></strong></td></tr> <tr><th><?php _e( 'Progress', 'wyzi-business-finder' ); ?>:</th><td><div id='progressbar_holder'><div id="progressbar"></div></div><span id='percent'>(0%)</span></td></tr> <tr><th><?php _e( 'Elapsed Time', 'wyzi-business-finder' ); ?>:</th><td><p id="timer">00:00:00</p></td></tr> </tbody> </table> <br /> <div id="import_wrapper"> <div id="start_button_wrapper"> <input type='button' id='start_import' value='Import' /> </div> </div> <?php endif; ?>
[+]
..
[+]
css
[-] export_view.php
[edit]
[-] CPK_WPCSV_Log_Model.php
[edit]
[-] shortcode_view.php
[edit]
[-] CPK_WPCSV_Export_Queue_Model.php
[edit]
[-] readme.txt
[edit]
[-] report_view.php
[edit]
[-] import_view.php
[edit]
[-] CPK_WPCSV_File_Utility.php
[edit]
[-] sidebar.php
[edit]
[-] CPK_WPCSV_View.php
[edit]
[+]
lang
[-] gpl-2.0.txt
[edit]
[-] CPK_WPCSV_Engine.php
[edit]
[-] CPK_WPCSV_Debug_Log.php
[edit]
[-] CPK_WPCSV_CSV.php
[edit]
[-] layout.php
[edit]
[-] wp-csv.php
[edit]
[+]
js
[-] CPK_WPCSV_Posts_Model.php
[edit]
[-] settings_view.php
[edit]
[-] CPK_WPCSV_Html_Components.php
[edit]