HEX
Server: Apache/2.4.57 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.2
System: Linux vmi267337.contaboserver.net 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64
User: ohirex (1008)
PHP: 8.2.8
Disabled: 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,exec,system,passthru,shell_exec
Upload Files
File: /home/ohirex/web/ohirex.com/public_html/wp-content/plugins/mailster-gmail/views/settings.php
<table class="form-table">
	<?php if ( ! $verified ) : ?>
	<tr valign="top">
		<th scope="row">&nbsp;</th>
		<td><p class="description"><?php echo sprintf( __( 'Please follow our guide %s and enter Client ID and Client Secret to continue.', 'mailster-gmail' ), '<a href="https://kb.mailster.co/send-your-newsletters-via-gmail/" class="external">' . __( 'here', 'mailster-gmail' ) . '</a>' ); ?></p>
		</td>
	</tr>
	<?php endif; ?>
	<tr valign="top">
		<th scope="row"><?php esc_html_e( 'Gmail Client ID', 'mailster-gmail' ); ?></th>
		<td><input type="text" name="mailster_options[gmail_client_id]" value="<?php echo esc_attr( mailster_option( 'gmail_client_id' ) ); ?>" class="regular-text"></td>
	</tr>
	<tr valign="top">
		<th scope="row"><?php esc_html_e( 'Gmail Client Secret', 'mailster-gmail' ); ?></th>
		<td><input type="password" name="mailster_options[gmail_client_secret]" value="<?php echo esc_attr( mailster_option( 'gmail_client_secret' ) ); ?>" class="regular-text"></td>
	</tr>
	<tr valign="top">
		<th scope="row"><?php esc_html_e( 'Authorized redirect URI', 'mailster-gmail' ); ?></th>
		<td><code id="copy-redirect_url"><?php echo $this->get_redirect_url(); ?></code><br><a class="clipboard" data-clipboard-target="#copy-redirect_url"><?php esc_html_e( 'copy URL', 'mailster-gmail' ); ?></a></td>
	</tr>

	<?php if ( mailster_option( 'gmail_client_id' ) && mailster_option( 'gmail_client_secret' ) ) : ?>

		<?php if ( $verified ) : ?>

			<tr valign="top">
				<th scope="row">&nbsp;</th>
				<td>
					<span style="color:#3AB61B">&#10004;</span> <?php esc_html_e( 'Your are authorized!', 'mailster-gmail' ); ?>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row"></th>
				<td><p><input type="submit" class="button button-secondary" value="<?php esc_attr_e( 'Remove connection', 'mailster-gmail' ); ?>" onclick="return confirm('<?php esc_attr_e( 'Do you really like to remove the connection?', 'mailster-gmail' ); ?>') && jQuery('#gmail_token').val('');"> <?php esc_html_e( 'or check given', 'mailster-gmail' ); ?> <a href="https://myaccount.google.com/permissions" class="external"><?php esc_html_e( 'Permissions', 'mailster-gmail' ); ?></a>.</p></td>
			</tr>

		<?php else : ?>

			<?php
			$authurl = add_query_arg(
				array(
					'response_type'          => 'code',
					'access_type'            => 'offline',
					'client_id'              => mailster_option( 'gmail_client_id' ),
					'redirect_uri'           => rawurlencode( $this->get_redirect_url() ),
					'state'                  => '',
					'scope'                  => rawurlencode( 'https://mail.google.com/' ),
					'approval_prompt'        => 'force',
					'include_granted_scopes' => 'true',
				),
				'https://accounts.google.com/o/oauth2/auth'
			)
			?>
		<tr valign="top">
			<th scope="row"></th>
			<td><a class="button button-hero button-primary" href="<?php echo esc_url( $authurl ); ?>"><?php esc_html_e( 'Authorize', 'mailster-gmail' ); ?></a></td>
		</tr>

		<?php endif; ?>
	<?php endif; ?>

	<input type="hidden" id="gmail_token" name="mailster_options[gmail_token]" value="<?php echo esc_attr( mailster_option( 'gmail_token' ) ); ?>">

</table>