HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/selfanalyse/wp-content/plugins/psychometrics/psy_profile.php
<?php

if (is_user_logged_in()) {


  //error_reporting(E_ALL);
  //ini_set('display_errors', 'ON');

?>


  <!-- PROFILE SECTION -->

  <section class="dashboard-section">
    <div class="container">
      <div class="row dashboard-page-section-box">
        <div class="col-md-12 col-sm-12 col-xs-12">
          <div class="dashboard-bg-img"></div>
        </div>
        <div class="detail-section">
          <div class="col-md-3 col-sm-3 col-xs-12">
            <!-----Include sidebar menus ----->
            <?php include 'psy_profile_sidebar.php'; ?>
          </div>

          <div class="col-md-9 col-sm-9 col-xs-12">
            <!-----Include menus of profile header ----->
            <?php include 'psy_profile_menus.php'; ?>

            <div class="profile-detail-list">
              <h4><i class="far fa-user"></i> Profile Details
                <span><a href="#" data-toggle="modal" data-target="#edit-modal"><i class="far fa-edit"></i></a></span>
                <span><a href="#" data-toggle="modal" data-target="#changepassword-modal"><i class="fa fa-lock"></i> change password</a></span>
              </h4>

              <div class="profile-detail-list-div row m-0">

                <div class="col-md-4 col-sm-4 col-xs-12">
                  <h5>Name : <span><?php echo $name ?></span></h5>
                </div>
                <div class="col-md-4 col-sm-4 col-xs-12">
                  <h5>Gender : <span><?php echo $gender_id ?></span></h5>
                </div>
                <div class="col-md-4 col-sm-4 col-xs-12">
                  <h5>DOB : <span><?php if ($getUserDetails->date_of_birth != '') {
                                    echo $dob_show;
                                  } ?></span></h5>
                </div>
                <div class="col-md-4 col-sm-4 col-xs-12">
                  <h5>Email : <span><?php echo $email ?> <i class="fas fa-check-circle"></i></span></h5>
                </div>
                <div class="col-md-8 col-sm-8 col-xs-12">
                  <h5>Mobile : <span>+91-<?php echo $mobile ?> <i class="fas fa-check-circle"></i></span> </h5>
                </div>
              </div>

              <h4><i class="far fa-id-card"></i> Contact Detail</h4>

              <div class="profile-detail-list-div row m-0">
                <div class="col-md-4 col-sm-4 col-xs-12">
                  <h5>State : <span><?php echo $state_name ?></span></h5>
                </div>
                <div class="col-md-4 col-sm-4 col-xs-12">
                  <h5>City : <span><?php echo $city ?></span></h5>
                </div>
                <div class="col-md-4 col-sm-4 col-xs-12">
                  <h5>Pin Code : <span><?php echo $pincode ?></span></h5>
                </div>
                <div class="col-md-12 col-sm-12 col-xs-12">
                  <h5>Address : <span><?php echo $address ?></span></h5>
                </div>
              </div>

              <h4><i class="fa fa-book"></i> Education Detail</h4>

              <div class="profile-detail-list-div row m-0">
                <div class="col-md-4 col-sm-4 col-xs-12">
                  <h5>Education Level : <span><?php echo $class_name ?></span></h5>
                </div>
                <div class="col-md-8 col-sm-8 col-xs-12">
                  <h5>Stream : <span><?php echo $study_area_name ?></span></h5>
                </div>
              </div>

              <h4><i class="fas fa-briefcase"></i> Work Experience</h4>
              <div class="profile-detail-list-div row m-0">
                <div class="col-md-3 col-sm-3 col-xs-12">
                  <h5>Are you working ? : <span><?php if ($working == 'Y') {
                                                  echo 'Yes';
                                                } else if ($working == 'N') {
                                                  echo 'No';
                                                } else {
                                                  echo 'No';
                                                } ?></span></h5>
                </div>
                <div class="col-md-3 col-sm-3 col-xs-12">
                  <h5>Job Title : <span><?php echo $job_title ?></span></h5>
                </div>
                <div class="col-md-3 col-sm-3 col-xs-12">
                  <h5>Nature of Work : <span><?php echo $nature_of_work ?></span></h5>
                </div>
                <div class="col-md-3 col-sm-3 col-xs-12">
                  <h5>Organization : <span><?php echo $organization_name ?></span></h5>
                </div>

                <div class="col-md-4 col-sm-4 col-xs-12">
                  <h5>Preparing for any Govt. Exam ? : <span><?php if ($given_any_exam == 'Y') {
                                                                echo 'Yes';
                                                              } else if ($given_any_exam == 'N') {
                                                                echo 'No';
                                                              } else {
                                                                echo 'No';
                                                              } ?></span></h5>
                </div>
                <div class="col-md-5 col-sm-5 col-xs-12">
                  <h5>Exam Name : <span><?php echo $exam_name ?></span></h5>
                </div>
                <div class="col-md-3 col-sm-3 col-xs-12">
                  <h5>Year of Preparing : <span><?php echo $prepairing_from ?></span></h5>
                </div>
              </div>

            </div>

          </div>
        </div>
      </div>
    </div>
  </section>

  <!-- END PROFILE SECTION -->


  <!-- SOCIAL LINK OPEN MODAL -->

  <div class="modal fade addsocial-links-modal" id="social-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
    <div class="modal-dialog socialmodal-dialog">
      <div class="loginmodal-container sociallink-box">

        <form class="socialform-link" method="POST">
          <h2>Add Social Link <span class="button" data-dismiss="modal" aria-label="Close"><i class="far fa-times-circle"></i></span> </h2>
          <select id="social_platform" name="social_platform">
            <option value="Facebook/fa-facebook-f"> Facebook</option>
            <option value="Twitter/fa-twitter"> Twitter</option>
            <option value="Instagram/fa-instagram"> Instagram</option>
          </select>
          <input type="text" id="a_social_link" name="a_social_link" placeholder="Add your link" required>
          <button type="submit" name="add-social">Submit</button>
        </form>

        <table class="socialtable-link">
          <h4>List Social Profile Links</h4>
          <tr>
            <th style="width: 10%;">S No.</th>
            <th>Social Name</th>
            <th>Link</th>
            <th>Action</th>
          </tr>
          <?php $i = 1;
          foreach ($getSocialLinks as $sc) { ?>
            <tr>
              <td><?php echo $i; ?></td>
              <td><i class="fab <?php echo $f->icon_class ?>"></i><?php echo $sc->social_name ?></td>
              <td><a href="<?php echo $sc->social_link ?>" target="_blank"> view </a></td>
              <td>
                <form method="POST">
                  <input type="hidden" name="d_social_id" value="<?php echo $sc->id; ?>">
                  <input type="submit" name="delete_social" value="Delete" class="btn btn-primary">
                </form>
              </td>
            </tr>
          <?php $i++;
          } ?>
        </table>
      </div>
    </div>
  </div>

  <!-- END SOCIAL LINK OPEN MODAL -->

  <!-- HOBBIES OPEN MODAL -->

  <div class="modal fade addHobby-links-modal" id="hobby-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
    <div class="modal-dialog socialmodal-dialog">
      <div class="loginmodal-container sociallink-box">
        <form class="socialform-link" method="POST">
          <h2>Hobby <span class="button" data-dismiss="modal" aria-label="Close"><i class="far fa-times-circle"></i></span> </h2>
          <div class="col-md-9 col-sm-9 col-xs-12">
            <input type="text" id="a_hobby" name="a_hobby" placeholder="Enter Your Hobby Name" required>
          </div>
          <div class="col-md-3 col-sm-3 col-xs-12">
            <button type="submit" name="add-hobby">Submit</button>
          </div>
        </form>
        <div class="row m-0">
          <?php foreach ($getHobbies as $hb) { ?>
            <div class="col-md-4 col-sm-4 col-xs-12">
              <div class="hobby-list">
                <img src="https://image.flaticon.com/icons/svg/993/993686.svg" alt="">
                <h2><?php echo $hb->hobby_name; ?></h2>
                <form method="POST">
                  <input type="hidden" name="d_hobby" value="<?php echo $hb->id; ?>">
                  <input type="submit" name="delete_hobby" value="Delete" class="btn btn-sm btn-primary">
                </form>
              </div>
            </div>
          <?php } ?>
        </div>
      </div>
    </div>
  </div>

  <!-- END HOBBIES LINK OPEN MODAL -->


  <!-- EDIT OPEN MODAL -->

  <div class="modal fade edit-profile-modal" id="edit-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
    <div class="modal-dialog edit-dialog">
      <div class="edit-profile-modal-box">

        <form method="POST" class="editform-link row" onsubmit="return validateForm();">

          <span class="button" data-dismiss="modal" aria-label="Close"><i class="far fa-times-circle"></i></span>

          <div class="edit-profile-header-box row m-0">
            <div class="col-md-3 col-sm-3 col-xs-12">
              <div class="editform-img-logo-box">
                <?php if ($profile_image != '') { ?>
                  <img src="https://selfanalyse.s3.ap-south-1.amazonaws.com/<?php echo $user_id ?>/profile-img/<?php echo $profile_image ?>" alt="<?php echo $name ?>">
                <?php } else { ?>
                  <img src="<?php echo ROOT_LINK . 'wp-content/plugins/psychometrics/images/default.svg' ?>" alt="Change Profile Image">
                <?php } ?>
              </div>
            </div>

            <div class="col-md-9 col-sm-9 col-xs-12">
              <h6 class="profile-head-name"><?php echo $name ?></h6>
              <p class="profile-class"><?php echo $class_name ?></p>
            </div>
          </div>

          <h4><i class="far fa-user"></i> Profile Details</h4>
          <div class="about-me-txt-div">
            <label>About Me </label>
            <textarea placeholder="About yourself" rows="4" cols="80" name="e_about"><?php echo $profile_details ?></textarea>
          </div>

          <?php if ($gender_id == '') { ?>
            <div class="col-md-4 col-sm-4 col-xs-12">
              <label>Gender</label>
              <div class="edit-radio">
                <input type="radio" name="e_gender" value="Male" class="mr-10" <?php if ($gender_id == 'Male') {
                                                                                  echo "checked";
                                                                                } ?>> <span class="mr-10"> Male </span>
                <input type="radio" name="e_gender" value="Female" class="mr-10" <?php if ($gender_id == 'Female') {
                                                                                    echo "checked";
                                                                                  } ?>> <span class="mr-10"> Female </span>
              </div>
            </div>
          <?php } ?>

          <?php if ($getUserDetails->date_of_birth == '') { ?>
            <div class="col-md-4 col-sm-4 col-xs-12">
              <label>Date of Birth</label>
              <input type="text" value="<?php echo $dob_show; ?>" id="e_birthday" name="e_birthday" onfocus="(this.type='date')">
            </div>
          <?php } ?>

          <h4><i class="far fa-id-card"></i> Contact Details</h4>
          <div class="col-md-4 col-sm-4 col-xs-12">
            <div class="about-me-txt-div">
              <label>State</label>
              <select id="state_id" name="e_state_id">
                <option value="0">--Select State--</option>
                <?php foreach ($getStates as $s) { ?>
                  <option value="<?php echo $s->state_id ?>" <?php if ($s->state_id == $state_id) {
                                                                echo "selected";
                                                              } ?>>
                    <?php echo $s->state_name ?>
                  </option>
                <?php } ?>
              </select>
            </div>
          </div>

          <div class="col-md-4 col-sm-4 col-xs-12">
            <div class="about-me-txt-div">
              <label>City</label>
              <select id="city_id" name="e_city_id">
                <option value="0">--Select City--</option>
                <?php foreach ($cities as $c) { ?>
                  <option value="<?php echo $c->city_id ?>" <?php if ($c->city_id == $city_id) {
                                                              echo "selected";
                                                            } ?>>
                    <?php echo $c->city_name ?>
                  </option>
                <?php } ?>
              </select>
            </div>
          </div>

          <div class="col-md-4 col-sm-4 col-xs-12">
            <div class="about-me-txt-div">
              <label>Pin Code</label>
              <input type="text" id="e_pin" name="e_pin" placeholder="Enter Your Pin Code" value="<?php echo $pincode ?>">
            </div>
          </div>

          <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="about-me-txt-div">
              <label>Address </label>
              <textarea placeholder="Enter Your Address" rows="4" cols="80" name="e_address"><?php echo $address ?></textarea>
            </div>
          </div>


          <div class="col-md-12 col-sm-12 col-xs-12">
            <h4><i class="fa fa-book"></i> Education Details</h4>
          </div>

          <div class="col-md-6 col-sm-6 col-xs-12">
            <div class="about-me-txt-div">
              <label>Education Level</label>
              <select id="e_edu_level" name="e_edu_level">
                <option value="">--Level--</option>
                <?php foreach ($classes as $cl) { ?>
                  <option value="<?php echo $cl->class_id ?>" <?php if ($cl->class_id == $class_id) {
                                                                echo "selected";
                                                              } ?>>
                    <?php echo $cl->class_name ?>
                  </option>
                <?php } ?>
              </select>
            </div>
          </div>

          <div class="col-md-6 col-sm-6 col-xs-12">
            <div class="about-me-txt-div">
              <label>Your Stream </label>
              <select id="e_study_area" name="e_study_area">
                <option value="">--Streams--</option>
                <?php foreach ($streams as $sr) { ?>
                  <option value="<?php echo $sr->study_area_id ?>" <?php if ($sr->study_area_id == $study_area) {
                                                                      echo "selected";
                                                                    } ?>>
                    <?php echo $sr->study_area_name ?>
                  </option>
                <?php } ?>
              </select>
            </div>
          </div>

          <div class="col-md-12 col-sm-12 col-xs-12">
            <h4><i class="fas fa-briefcase"></i> Work Experience</h4>
          </div>

          <div class="col-md-4 col-sm-4 col-xs-12">
            <div class="about-me-txt-div">
              <label>Are you working ?</label>
              <select id="e_working" name="e_working">
                <option value="Y" <?php if ($working == 'Y') {
                                    echo "selected";
                                  } ?>>Yes</option>
                <option value="N" <?php if ($working == 'N') {
                                    echo "selected";
                                  } ?>>No</option>
              </select>
            </div>
          </div>

          <div class="col-md-4 col-sm-4 col-xs-12">
            <div class="about-me-txt-div">
              <label>Job Title</label>
              <input type="text" id="e_job" name="e_job" placeholder="Enter Your Job Title" value="<?php echo $job_title ?>">
            </div>
          </div>

          <div class="col-md-4 col-sm-4 col-xs-12">
            <div class="about-me-txt-div">
              <label>Nature of Work</label>
              <input type="text" id="e_work_nature" name="e_work_nature" placeholder="Enter Your Work" value="<?php echo $nature_of_work ?>">
            </div>
          </div>

          <div class="col-md-6 col-sm-6 col-xs-12">
            <div class="about-me-txt-div">
              <label>Organization Name</label>
              <input type="text" id="e_org" name="e_org" placeholder="Enter Your Name" value="<?php echo $organization_name ?>">
            </div>
          </div>
          <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="about-me-txt-div">
              
            </div>
          </div>

          <div class="col-md-6 col-sm-6 col-xs-12">
            <div class="about-me-txt-div">
              <label>Preparing for any Govt. Exam ?</label>
              <select id="e_given_exam" name="e_given_exam">
                <option value="Y" <?php if ($given_any_exam == 'Y') {
                                    echo "selected";
                                  } ?>>Yes</option>
                <option value="N" <?php if ($given_any_exam == 'N') {
                                    echo "selected";
                                  } ?>>No</option>
              </select>
            </div>
          </div>

          <div class="col-md-6 col-sm-6 col-xs-12">
            <div class="about-me-txt-div">
              <label>Exam Name</label>
              <input type="text" id="e_exam_name" name="e_exam_name" placeholder="Enter Your Exam Name" value="<?php echo $exam_name ?>">
            </div>
          </div>

          <div class="col-md-6 col-sm-6 col-xs-12">
            <div class="about-me-txt-div">
              <label>Year of Preparing</label>
              <input type="text" id="e_year_pre" name="e_year_pre" placeholder="Enter Your Year of Preparing" value="<?php echo $prepairing_from ?>">
            </div>
          </div>
          <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="about-me-txt-div">
              
            </div>
          </div>

          <div class="col-md-4 col-sm-4 col-xs-12">
            <button type="submit" name="update-details" class="btn btn-primary">Update</button>
          </div>
        </form>
      </div>
    </div>
  </div>

  <!-- END OPEN MODAL -->

  <!-- ADD IMAGE OPEN MODAL -->

  <div class="modal fade edit-profile-modal" id="imglogo-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
    <div class="modal-dialog edit-dialog">
      <div class="edit-profile-modal-box">

        <form class="editform-link row m-0" enctype="multipart/form-data" method="POST">
          <span class="button" data-dismiss="modal" aria-label="Close"><i class="far fa-times-circle"></i></span>
          <div class="col-md-4 col-sm-4 col-xs-12">
            <div class="editform-img-logo-box">
              <?php if ($profile_image != '') { ?>
                <img src="https://selfanalyse.s3.ap-south-1.amazonaws.com/<?php echo $user_id ?>/profile-img/<?php echo $profile_image ?>" alt="<?php echo $name ?>">
              <?php } else { ?>
                <img src="<?php echo ROOT_LINK . 'wp-content/plugins/psychometrics/images/default.svg' ?>" alt="Change Profile Image">
              <?php } ?>
            </div>
          </div>

          <div class="col-md-8 col-sm-8 col-xs-12">
            <label>Select image to upload:</label>
            <input class="file-upload-box" type="file" accept="image/jpeg,image/jpg,image/png" name="fileToUpload" id="fileToUpload">
            <input type="hidden" name="exist_image" value="<?php echo $profile_image; ?>">
            <input class="file-upload-submit" type="submit" value="Upload Image" name="upload-image">
          </div>
        </form>
      </div>
    </div>
  </div>
  <!-- END ADD IMAGE OPEN MODAL -->

  <!-- Chnage Password OPEN MODAL -->

  <div class="modal fade edit-profile-modal" id="changepassword-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
    <div class="modal-dialog edit-dialog">
      <div class="edit-profile-modal-box">

        <form class="editform-link row m-0" method="POST" onsubmit="return checkPassword();">
        <span class="button" data-dismiss="modal" aria-label="Close"><i class="far fa-times-circle"></i></span>
        <h4><i class="fa fa-lock"></i> Change Password</h4>
          <div class="col-md-8 col-sm-8 col-xs-12">
          <label>New Password </label>
            <input class="file-upload-box" type="number" name="c_new_pwd" id="c_new_pwd">
            <label>Confirm Password</label>
            <input class="file-upload-box" type="number" name="c_cnf_pwd" id="c_cnf_pwd">
            <input class="file-upload-submit" type="submit" name="change_password" value="Change Password">
          </div>
          <div class="col-md-4 col-sm-4 col-xs-12">
            <img src="/wp-content/plugins/psychometrics/images/chng-pwd.webp" alt="">
          </div>
        </form>
      </div>
    </div>
  </div>
  <!-- END Change Password OPEN MODAL -->
  <script type="text/javascript">
    //get cities by state
    jQuery(document).on('change', '#state_id', function() {

      var state = jQuery(this).val();
      state = state.replace(/ /g, '%20');
      jQuery("#city_id").load("/wp-content/plugins/psychometrics/api/get_city.php?state=" + state);
    });

    function checkPassword() {
      if (jQuery("#c_new_pwd").val() == '') {
        toastr.error("Please fill new password field")
        jQuery("#c_new_pwd").focus()
        return false
      }
      if (jQuery("#c_cnf_pwd").val() == '') {
        toastr.error("Please fill confirm password field")
        jQuery("#c_cnf_pwd").focus()
        return false
      }
      if (jQuery("#c_cnf_pwd").val() != jQuery("#c_new_pwd").val()) {
        toastr.error("Please fill confirm password same as new password")
        jQuery("#c_cnf_pwd").focus()
        return false
      }
      return true
    }
  </script>

<?php
} else {
?>
  <script>
    window.location.href = '/login'
  </script>
<?php
}
?>