| Server IP : 68.183.124.220 / Your IP : 216.73.216.141 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/wp-content/plugins/ninja-forms/deprecated/includes/admin/upgrades/ |
Upload File : |
<?php if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Upgrade Screen
*
* @package Ninja Forms
* @subpackage Admin/Upgrades
* @copyright Copyright (c) 2014, WP Ninjas
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 2.7
*/
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
/**
* Render Upgrades Screen
*
* @since 2.7
* @return void
*/
function nf_upgrades_screen() {
$action = isset( $_GET['nf-upgrade'] ) ? sanitize_text_field( $_GET['nf-upgrade'] ) : '';
$step = isset( $_GET['step'] ) ? absint( $_GET['step'] ) : 1;
$total = isset( $_GET['total'] ) ? absint( $_GET['total'] ) : false;
$custom = isset( $_GET['custom'] ) ? $_GET['custom'] : 0;
$form_id = isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
if ( is_string( $custom ) ) {
$custom = urlencode( $custom );
}
?>
<div class="wrap">
<h2><?php _e( 'Ninja Forms - Processing', 'ninja-forms' ); ?></h2>
<?php if( ! empty( $action ) ) : ?>
<div id="nf-upgrade-status">
<p><?php _e( 'The process has started, please be patient. This could take several minutes. You will be automatically redirected when the process is finished.', 'ninja-forms' ); ?></p>
<?php if( ! empty( $total ) ) : ?>
<p><strong><?php printf( __( 'Step %d of approximately %d running', 'ninja-forms' ), $step, $total + 1 ); ?></strong>
<span class="spinner" id="nf-upgrade-loader"/></span></p>
<?php endif; ?>
</div>
<script type="text/javascript">
document.location.href = "index.php?nf_action=<?php echo $action; ?>&step=<?php echo $step; ?>&total=<?php echo $total; ?>&custom=<?php echo $custom; ?>&form_id=<?php echo $form_id; ?>";
</script>
<?php else : ?>
<div id="nf-upgrade-status">
<p>
<?php _e( 'The process has started, please be patient. This could take several minutes. You will be automatically redirected when the process is finished.', 'edd' ); ?>
<span class="spinner" id="nf-upgrade-loader"/></span>
</p>
</div>
<script type="text/javascript">
jQuery( document ).ready( function() {
// Trigger upgrades on page load
var data = { action: 'edd_trigger_upgrades' };
jQuery.post( ajaxurl, data, function (response) {
if( response == 'complete' ) {
jQuery('#nf-upgrade-loader').hide();
//document.location.href = 'index.php?page=edd-about'; // Redirect to the welcome page
}
});
});
</script>
<?php endif; ?>
</div>
<?php
}