PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/donotedelete/123movies.kerhosting.com/wp-content/themes/betube/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/donotedelete/123movies.kerhosting.com/wp-content/themes/betube/template-reset.php

<?php
/**
 * Template name: Reset Password Page
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage betube
 * @since betube 3.0
 */

if ( is_user_logged_in() ) {
	$profile = betube_get_template_url('template-profile.php');
	wp_redirect( $profile ); exit;
}
global $success;
if(isset($_POST)){	
	if($_POST['submit'] == 'Reset'){

		// First, make sure the email address is set
		if ( isset( $_POST['email'] ) && ! empty( $_POST['email'] ) ) {
		  	// Next, sanitize the data
		  	$email_addr = trim( strip_tags( stripslashes( $_POST['email'] ) ) );
			$user_ID = '';
		  	$user = get_user_by( 'email', $email_addr );
			if($user){
				$user_ID = $user->ID;
				$userName = $user->user_login;
				$new_password = wp_generate_password( 12, false );
				if ( isset($new_password) ) {
					wp_set_password( $new_password, $user_ID );
					$message = esc_html__( 'Check your email for new password', 'betube' );

			      	$from = get_option('admin_email');
					$headers = 'From: '.$from . "\r\n";
					$subject = "Password reset!";
					$msg = "Your New Password is: $new_password and your user name is:$userName";
					betube_send_email($email_addr, $subject, $msg, $headers);
					$success = true;
				}

		    }else{
				$success = false;
		      	$message = esc_html__( 'There is no user available for this email', 'betube' );
		    }

		} else {
			$success = false;
			$message = esc_html__( 'Email should not be empty.', 'betube' );
		}
	}
}
get_header();
global $redux_demo;
$betube_boxed= 'boxed';
if(isset($redux_demo)){		
	$betube_boxed = $redux_demo['betube_boxed'];
}
?>
<div class="container<?php if($betube_boxed == 'wide'){ echo "-fluid"; }?>">
	<div class="row">
		<div class="col-12">
			<!-- breadcrumb -->
			<nav aria-label="breadcrumb">
				<ol class="breadcrumb bg-transparent border-bottom mb-4 rounded-0 pl-0">
					<li class="breadcrumb-item">
						<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="breadcrumb-link">
							<?php esc_html_e('Home ', 'betube' ); ?>
						</a>
					</li>
					<li class="breadcrumb-item active" aria-current="page">
						<?php echo get_the_title(); ?>
					</li>
				</ol>
			</nav>
		</div><!--col-12-->
	</div><!--row-->
</div><!--container-->
<section class="btp_inner_page pb-5">
	<div class="container<?php if($betube_boxed == 'wide'){ echo "-fluid"; }?>">
		<div class="row">
			<div class="col-lg-8 mx-auto">
				<h4 class="text-center mb-4"><?php the_title(); ?></h4>
				<div class="text-center mb-4">
				<?php
				if (have_posts()) : while (have_posts()) : the_post();
				the_content();
				endwhile; endif;
				?>
				</div>
				<h5 class="mb-4 text-center"><?php esc_html_e('Type email ', 'betube' ); ?></h5>
			</div><!--col-lg-8-->
			<div class="col-lg-5 mx-auto">
				<?php
				if(isset($_POST['submit']) && $success == false){					
					echo '<p class="alert alert-warning">';
						echo esc_html($message);
					echo '</p>';
				}elseif(isset($_POST['submit']) && $success == true){
					echo '<p class="alert alert-success">';
						echo esc_html($message);
					echo '</p>';
				}
				?>
				<form class="validator" method="POST">
					<div class="form-group">
						<div class="input-group">
							<div class="input-group-prepend">
								<span class="input-group-text bg-transparent border-right-0">
									<i class="fas fa-envelope input-group-text-icon"></i>
								</span>
							</div>
							<input id="signupEmail" type="email" name="email" class="form-control border-left-0" placeholder="<?php esc_attr_e('Enter your email', 'betube') ?>" aria-label="email" data-rule-required="true" data-msg="<?php esc_attr_e('Please provide valid email', 'betube') ?>" required>
							<div class="valid-feedback">
								<?php esc_html_e('Looks good!', 'betube') ?>
							</div><!--valid-feedback-->
							<div class="invalid-feedback"></div><!--invalid-feedback-->
						</div><!--input-group-->
					</div><!--form-group-->
					<button type="submit" name="submit" value="Reset" class="btn btn-danger btn-block mb-4"><?php esc_html_e('Reset Now', 'betube') ?></button>
				</form>
			</div><!--col-lg-5-->
		</div><!--row-->
	</div><!--container-->
</section>
<?php get_footer(); ?>