HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/doccure-wp-market/wp-content/themes/doccure/directory/dashboard-doctor.php
<?php 

global $current_user, $wp_roles, $userdata, $post,$doccure_options;


$user_identity 	= $current_user->ID;
$url_identity 	= !empty($_GET['identity']) ? intval($_GET['identity']) : '';
$user_type		= apply_filters('doccure_get_user_type', $user_identity );
$post_id		= doccure_get_linked_profile_id( $user_identity );
$is_verified 	= get_post_meta($post_id, '_is_verified', true);
$ref 			= !empty($_GET['ref']) ? esc_html( $_GET['ref'] ) : '';
$mode 			= !empty($_GET['mode']) ? esc_html( $_GET['mode'] ) : '';
$verify_user	= !empty( $doccure_options['verify_user'] ) ? $doccure_options['verify_user'] : '';
$doctor_location	= !empty($doccure_options['doctor_location']) ? $doccure_options['doctor_location'] : '';
$doctros_pages	= apply_filters( 'doccure_doctor_redirect_after_login','');
$doctor_booking_option			= '';
if( function_exists( 'doccure_get_booking_oncall_doctors_option' ) ) {
	$doctor_booking_option	= doccure_get_booking_oncall_doctors_option();
}

if( have_posts() ) {
	while ( have_posts() ) : the_post();
	the_content();
	wp_link_pages( array(
		'before'      => '<div class="dc-paginationvtwo 1"><nav class="dc-pagination "><ul>',
		'after'       => '</ul></nav></div>',
		) );
	endwhile;
	wp_reset_postdata();
}

$remove_payouts	= doccure_theme_option('enable_checkout_page');
$payment_type	= doccure_theme_option('payment_type');

$show_payout_settings	= true; 
if( !empty($payment_type) && $payment_type == 'offline' ){
	if( empty($remove_payouts) && $remove_payouts === 'hide'){
		$show_payout_settings	= false; 
	}
}

if ( is_user_logged_in() && ( $user_type === 'doctors' || $user_type === 'regular_users' ) ) {

	if( empty( $is_verified ) || $is_verified === 'no' ){
		$verify   = doccure_get_signup_page_url(); 
		?>
		<div class="container-fluid">
		  <div class="dc-haslayout dc-jobalertsdashboard re-sendverification">
					<?php if(!empty($verify_user) && $verify_user === 'no' ){
							doccure_Prepare_Notification::doccure_warning(esc_html__('Verification', 'doccure'), esc_html__('Your account will be approved after the verification', 'doccure'),'','');
						} elseif(!empty($verify_user) && $verify_user === 'yes' ){
							doccure_Prepare_Notification::doccure_warning(esc_html__('Verification', 'doccure'), esc_html__('Your account is not verified. Please check your email for the verification', 'doccure'),'javascript:;',esc_html__('Resend email', 'doccure'));
						}
					?>
			</div>
			</div>			
	<?php }?>
	<div class="content-doctor-dashboard">
	<div class="container-fluid users_dashboard">
		<div class="row">

		
 <!-- Header -->
 <header class=" doccure_doctor_header doccure_header header-custom relative">
 <nav class="navbar navbar-expand-lg header-nav">
                  <?php
         global $current_user;
		wp_get_current_user();  ?>
 		<?php if (is_user_logged_in()) { ?>
 <div class="nav-item dropdown showdropdown">
		<a href="javascript:void(0)">
		<span class="user-img sss">
       <?php  echo get_avatar( get_current_user_id(), 80 ); ?>

		</span>
		</a>
		<div class="dropdown-menu-end">
		<div class="user-header">
		<div class="avatar avatar-sm">
       <?php echo get_avatar( get_current_user_id(), 80 ); ?>

		</div>
		<div class="user-text">
		<h6><?php  echo  esc_html($current_user->user_login); ?></h6>
		<p class="text-success mb-0">
			<?php 
			$role = $current_user->roles[0];
			$role_name = $role ? wp_roles()->get_names()[ $role ] : '';
			echo esc_html($role_name);
			?>
		</p>
		</div>
		</div>
     
          
          <a href='<?php doccure_Profile_Menu::doccure_profile_menu_link('insights', get_current_user_id()); ?>' class='dropdown-item'><?php esc_html_e('Dashboard', 'doccure'); ?></a>		
		<a class="dropdown-item" href="<?php echo wp_logout_url( home_url() ); ?>"><?php esc_html_e('Logout', 'doccure'); ?></a>
		</div>
</div>
			<?php } ?> 
					 
					</nav>
 			</header>
			<!-- /Header -->

			<div class="col-md-3 col-lg-3 col-xl-3">
				<div class="doctor_clinic_menu">
 			<?php doccure_Profile_Menu::doccure_profile_menu_left_doctor(); ?>
			 </div>
 			</div>
			<div class="col-md-9 col-lg-9 col-xl-9">
			 
       <?php
/**
 * Template part for header layout 10
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package doccure
 */
  $top_header_width_class = (doccure_get_option('adjust-custom-header-top-width') == true && doccure_get_option('header-top-width-style') == 'full-width') ? 'container-fluid' : 'container';
 
 global $doccure_options;
$is_register	= !empty( $doccure_options['registration_form'] ) ? $doccure_options['registration_form'] : '';
 $is_login		= !empty( $doccure_options['login_form'] ) ? $doccure_options['login_form'] : '';
 $user_registration		= !empty( $doccure_options['user_registration'] ) ? $doccure_options['user_registration'] : '';


 $page_id = get_the_ID();
 $post_meta			= doccure_get_post_meta( $page_id );
 if( !empty( $post_meta['am_header_style'] ))
 { 
   $header_class =   $post_meta['am_header_style'];
 }  else {
   $header_class = "";
 }

 // Mobile Header
  ?> 
 
			


 

 

			<div class="doctor_clinic_content <?php  if( $user_type === 'doctors') { } else { echo esc_attr('dc-haslayout', 'doccure'); } ?> dc-dbsectionspace">
			<?php 
				if( !empty($ref) && $_GET['ref'] === 'profile' && $mode === 'settings' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/'.$user_type.'/dashboard', 'profile-settings');
				}elseif ( !empty($ref) && $_GET['ref'] === 'profile' && $mode === 'social' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/dashboard', 'social-profile');
				} elseif( $mode === 'educations') {
					get_template_part('directory/front-end/templates/'.$user_type.'/dashboard', 'profile-settings-educations');
				} elseif( !empty($ref) && $ref === 'prescription' && $mode === 'view' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/'.$user_type.'/dashboard', 'update-prescription');
				} elseif( $mode === 'awards') {
					get_template_part('directory/front-end/templates/'.$user_type.'/dashboard', 'profile-settings-awards');
				} elseif( $mode === 'registrations') {
					get_template_part('directory/front-end/templates/'.$user_type.'/dashboard', 'profile-settings-registrations');
				} elseif( $mode === 'location') {
					get_template_part('directory/front-end/templates/'.$user_type.'/dashboard', 'profile-location');
				} elseif( $mode === 'gallery') {
					get_template_part('directory/front-end/templates/'.$user_type.'/dashboard', 'profile-gallery');
				} elseif( $mode === 'booking' && $user_type ==='doctors' && empty($doctor_booking_option)) {
					get_template_part('directory/front-end/templates/'.$user_type.'/dashboard', 'profile-booking-options');
				} else if( $user_type === 'doctors' && $ref === 'manage-article' && $mode === 'listings' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'manage-article');
				} 
				else if( $user_type === 'doctors' && $ref === 'manage-clinics' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'clinics-manage');
				}
				else if( $user_type === 'doctors' && $ref === 'manage-leave' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'leave-listing');
				}
				else if( $user_type === 'doctors' && $ref === 'manage-selfleave' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'selfleave-listing');
				}
				else if( $user_type === 'doctors' && $ref === 'manage-attendance' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'attendance-listing');
				}

				else if( $user_type === 'doctors' && $ref === 'manage-doctors' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'doctors-manage');
				}else if( $user_type === 'doctors' && $ref === 'manage-staff' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'manage-staff');
				}
				else if( $user_type === 'doctors' && $ref === 'manage-insurance' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'insurance-list');
				}

				else if( $user_type === 'doctors' && $ref === 'manage-schedule' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'schedule-manage');
				}   else if( $user_type === 'doctors' && $ref === 'appointment' && $mode === 'setting' && ($url_identity === $user_identity) ) {
					if( !empty($doctor_location) && $doctor_location !== 'clinic' && apply_filters('doccure_is_appointment_allowed', 'dc_bookings', $url_identity) === true ){
						get_template_part('directory/front-end/templates/doctors/dashboard', 'appointment-setting');
					}
				} else if( $user_type === 'doctors' && $ref === 'appointment' && $mode === 'location-settings' && ($url_identity === $user_identity) ) {
					if( !empty($doctor_location)   ){
						get_template_part('directory/front-end/templates/doctors/dashboard', 'appointment-location-settings');
					}
				} else if( $user_type === 'doctors' && $ref === 'appointment' && $mode === 'details' && ($url_identity === $user_identity) ) {
					if(apply_filters('doccure_is_appointment_allowed', 'dc_bookings', $url_identity) === true ){
						get_template_part('directory/front-end/templates/doctors/dashboard', 'appointment-detials');
					}
				} else if( $user_type === 'doctors' && $ref === 'appointment' && $mode === 'listing' && ($url_identity === $user_identity) ) {
					if(apply_filters('doccure_is_appointment_allowed', 'dc_bookings', $url_identity) === true ){
						get_template_part('directory/front-end/templates/doctors/dashboard', 'appointment-listing');
					}
				} else if( $user_type === 'doctors' && $ref === 'manage-reviews' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'reviews-listing');
				} else if ( $user_type === 'doctors' && !empty($ref) && $_GET['ref'] === 'package' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/dashboard', 'packages');
				} else if ( $user_type === 'doctors' && !empty($ref) && $_GET['ref'] === 'manage-invoices' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/dashboard', 'invoices');
				}else if ( $user_type === 'doctors' && !empty($ref) && $_GET['ref'] === 'payments-info' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'payments-info');
				}
				 else if ( $user_type === 'doctors' && !empty($ref) && $_GET['ref'] === 'payments-info' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/doctors/dashboard', 'payments-info');
				} else if ( $user_type === 'doctors' && !empty($ref) && $_GET['ref'] === 'payouts' && ($url_identity === $user_identity) ) {
					if( !empty($show_payout_settings) ){
						get_template_part('directory/front-end/templates/doctors/dashboard', 'payouts');
					}
				} elseif( $user_type === 'doctors' && !empty( $ref ) && $ref === 'specialities' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/dashboard', 'profile-settings-specialities');
				}  elseif( $user_type === 'hospitals' && !empty( $ref ) && $ref === 'specialities' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/dashboard', 'profile-settings-specialities');
				} else if( $user_type === 'regular_users' && $ref === 'appointment' && $mode === 'listing' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/regular_users/dashboard', 'appointment-listing');
				} else if ( $user_type === 'regular_users' && !empty($ref) && $_GET['ref'] === 'invoices' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/dashboard', 'invoices');
				} else if ( !empty($ref) && $_GET['ref'] === 'account-settings' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/dashboard', 'account-manage');
				}elseif ( !empty($ref) && $_GET['ref'] === 'saved' && ($url_identity === $user_identity) ) {
					get_template_part('directory/front-end/templates/dashboard', 'saved-items');
				}	else if ($user_type === 'doctors' && !empty($ref) && $_GET['ref'] === 'manage-vitals' && ($url_identity === $user_identity)) {
							get_template_part('directory/front-end/templates/doctors/dashboard', 'vitals-listing');
						}
				else if ($user_type === 'doctors' && !empty($ref) && $_GET['ref'] === 'manage-inbox' && ($url_identity === $user_identity)) {
							get_template_part('directory/front-end/templates/doctors/dashboard', 'inbox-listing');
						}

				else if( !empty( $ref ) && $ref === 'chat' && ($url_identity === $user_identity) ) {
					if( ( !empty( $user_type ) 
						 && ( $user_type === 'doctors' && apply_filters('doccure_is_feature_allowed', 'dc_chat', $user_identity) === true ) ) 
						|| $user_type === 'doctors_staff' 
						|| $user_type === 'regular_users'
						|| $user_type === 'staff'
					) {
						get_template_part('directory/front-end/templates/dashboard', 'messaging');
					}
				} else{
					get_template_part('directory/front-end/templates/'.$user_type.'/dashboard', 'insights');
				}	
			?>
	</div>

	
	<div class="doctor_dashboard_footer text-center pt-3 pb-3">
		<?php echo date('Y'); ?> &copy; <?php echo get_bloginfo('name'); ?> 
	</div>
			</div>
			</div>
		</div>
	</div>
	<?php } else {?>
		<div class="container">
		 <div class="dc-haslayout page-data">
			
			<?php  
			 doccure_Prepare_Notification::doccure_warning(esc_html__('Restricted Access', 'doccure'), esc_html__('You have not any privilege to view this page. Please Login as Doctor/Patient.', 'doccure'));?>
		  </div>
		</div>
<?php } ?>