<?php require_once('../Connections/oprmConn.php'); 



if(!isset($_SESSION['user_id'])){
	header("location: ../index.php");
}
$msg = ""; if(isset($_REQUEST['msg'])) $msg = $_REQUEST['msg'];  $msg1 = ""; if(isset($_REQUEST['msg1'])) $msg1 = $_REQUEST['msg1']; 

mysql_select_db($database_oprmConn, $oprmConn);
$query_getUsree = "select weby_profiles.*, weby_users.* FROM weby_profiles, weby_users where weby_profiles.user_id = '$_SESSION[user_id]' and weby_profiles.status = 'P' and weby_users.user_id = '$_SESSION[user_id]' and weby_users.status = 'A' ";
$getUsree = mysql_query($query_getUsree, $oprmConn) or die(mysql_error());
$row_getUsree = mysql_fetch_assoc($getUsree);
$totalRows_getUsree = mysql_num_rows($getUsree);
if($totalRows_getUsree==0){ header("location: index.php"); }

mysql_select_db($database_oprmConn, $oprmConn);
$query_getProfile = "SELECT p.*, weby_users.email_address, weby_users.employee_id, weby_users.user_role FROM weby_profiles p, weby_users WHERE p.user_id = '$_SESSION[user_id]' AND weby_users.user_id = p.user_id AND p.status = 'P'";
$getProfile = mysql_query($query_getProfile, $oprmConn) or die(mysql_error());
$row_getProfile = mysql_fetch_assoc($getProfile);
$totalRows_getProfile = mysql_num_rows($getProfile);

mysql_select_db($database_oprmConn, $oprmConn);
$query_getDoclist = "SELECT d.*, d.profile_id AS proid, weby_profiles.profile_id, weby_profiles.user_id, weby_users.user_id FROM weby_otherdoc d, weby_profiles, weby_users WHERE d.user_id = '$_SESSION[user_id]' AND weby_profiles.user_id = d.user_id AND d.status = 'A' AND weby_profiles.status = 'P' group by d.doc_id";
$getDoclist = mysql_query($query_getDoclist, $oprmConn) or die(mysql_error());
$row_getDoclist = mysql_fetch_assoc($getDoclist);
$totalRows_getDoclist = mysql_num_rows($getDoclist);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> SS WEB TECHNOLOGIES - Tool Resource Projects</title>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<link rel="stylesheet" href="../css/style.css" type="text/css">
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<style>
.act_index { background: #373938;
  color: #fff;}
</style>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<!-- IE Fix for HTML5 Tags -->
<!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> 
	<![endif]-->
</head>
<body>



<!-- Wrapper Starts -->


<div class="wrapper">

    <?php  require_once('../includes/header.php'); ?>
    
<?php  require_once('../includes/tools-menu.php'); ?>
  

  <!-- Content Goes here -->

  

  <article class="inside_wrapper clear_fix"> 

    

    <!-- Main Content Goes here -->

    

    <section class="main_content">

      <h2>My Pending Profile Preview</h2>

      <?php if(isset($_REQUEST['msg']) ){ ?>

      <div class="msg_cancel"><font color="#FF0000"><?php echo $msg; ?><a href="index.php"><img src="/RM/images/cross.png" width="12" height="12" alt="delete"></a></font></div>

      <?php } ?>

      <?php if(isset($_REQUEST['msg1']) ){ ?>

     <div class="msg_cancel"> <font color="#00FF00"><?php echo $msg1; ?><a href="index.php"><img src="/RM/images/cross.png" width="12" height="12" alt="delete"></a></font></div>

      <?php } ?>

      <!--<div class="welcome_box">



                <div class="timesheet_type"><div class="welcome_txt arrow">Welcome <?php echo $row_getProfile['full_name']; ?>



                <?php $pweek = date('W');



		  $pyear = date('Y'); ?>



            <ul> <li><a href="index.php">Dashboard</a></li>



              <!--<li><a href="profile.php">Profile</a></li> <li><a href="timesheet.php">Timesheet</a></li> <li><a href="manage-leave.php">Manage Leaves</a></li>



            	<li><a href="logout.php">Logout</a></li>



            	</ul>	



                </div>



                </div>	



             </div>-->

      <article class="resource_profile">

        <div class="current_profile"> 

          

          <!-- <h3>Hr Rate: &pound;<?php echo $row_getProfile['hr_rate']; ?></h3> -->

          

          <p><b>Current Profile Pic</b></p>

          <p><img src="/RM/images/<?php if(!empty($row_getProfile['profile_pic'])){ echo $row_getProfile['profile_pic'];?> <?php } else{ echo "black-img.jpg";} ?>" width="68" /></p>
			<p><b>Employee ID:</b> <?php echo 'SDS0'.$row_getProfile['employee_id']; ?></p>
          <p><b>Current CV:</b><br/>

            <?php if($row_getProfile['cv_file'] != NULL) { ?>

            <a href="../documents/<?php echo $row_getProfile['cv_file']; ?>" target="_blank"><?php echo $row_getProfile['cv_file']; ?></a>

            <?php } else {echo "Not uploaded";} ?>

          </p>

          <p><b>Passport Copy:</b><br/>

            <?php if($row_getProfile['passport_file'] != NULL) { ?>

            <a href="../documents/<?php echo $row_getProfile['passport_file']; ?>" target="_blank"><?php echo $row_getProfile['passport_file']; ?></a>

            <?php } else {echo "Not uploaded";} ?>

          </p>

          <p><b>Visa Copy:</b><br/>

            <?php if($row_getProfile['visa_file'] != NULL) { ?>

            <a href="../documents/<?php echo $row_getProfile['visa_file']; ?>" target="_blank"><?php echo $row_getProfile['visa_file']; ?></a>

            <?php } else {echo "Not uploaded";} ?>

          </p>

          <p><b>Holiday Sheet:</b><br/>

            <?php if($row_getProfile['holiday_sheet'] != NULL) { ?>

            <a href="../documents/<?php echo $row_getProfile['holiday_sheet']; ?>" target="_blank"> <?php echo $row_getProfile['holiday_sheet']; ?></a>

            <?php } else {echo "Not uploaded";} ?>

          </p>

          <p><b>Other/Academic Certificates:</b><br/>

          

          <ol>

            <?php if($row_getDoclist['other_docs'] != NULL) { ?>

            <?php do {?>

            <li> <a href="../documents/<?php echo $row_getDoclist['other_docs']; ?>" target="_blank"><?php echo $row_getDoclist['other_docs']; ?></a></li>

            <?php } while ($row_getDoclist = mysql_fetch_assoc($getDoclist)); } else {echo "Not uploaded";} ?>

          </ol>

          </p>

        </div>

        <div class="edit_profile">

          <div class="edit_profile">

            <form name="edit_profile" method="POST" action="<?php echo $editFormAction; ?>" id="edit_profile">

              <div class="field_item">

                <label>Full Name:</label>

                <?php echo $row_getProfile['full_name']; ?>

              </div>

              <div class="field_item">

                <label>Job title:</label>

                <?php echo $row_getProfile['job_title']; ?>

              </div>

              <div class="field_item">

                <label>Email Address:</label>

               <?php echo $row_getProfile['email_address']; ?>

              </div>
			  <div class="field_item">

                <label>Notes:</label>

                <?php echo $row_getProfile['notes_text']; ?>

              </div>

              <div class="field_item">

                <label>Skillset:</label>

                <?php echo $row_getProfile['skill_set']; ?>

              </div>

              

              <div class="field_item">

                <label>Other Info:</label>

               <?php echo $row_getProfile['other_info']; ?>

              </div>
<div class="clear-fix">&nbsp;</div><div class="clear-fix">&nbsp;</div>
              <h3>Bank Details</h3>

              <div class="field_item">

                <label>Account No.:</label>

             <?php echo $row_getProfile['bank_account']; ?>

              </div>

              <div class="field_item">

                <label>Sort Code:</label>

            <?php echo $row_getProfile['bank_sortcode']; ?>

              </div>

              <div class="field_item">

                <label>Bank Name and Address:</label>

             <?php echo $row_getProfile['bank_address']; ?>

              </div>
<div class="clear-fix">&nbsp;</div><div class="clear-fix">&nbsp;</div><div class="clear-fix">&nbsp;</div>
              <h3>Personal Details</h3>
              
              <div class="field_item"><p>(DD-MM-YYYY)</p>

                <label>Date Of Birth</label>

 <?php if($row_getProfile['date_of_birth'] != 0) { echo date('d-m-Y',strtotime($row_getProfile['date_of_birth'])); } else { echo ''; } ?>

              </div>

              <div class="field_item">

                <label>Passport Number</label>

           <?php echo $row_getProfile['passport_number']; ?>

              </div>

              <div class="field_item"><p>(DD-MM-YYYY)</p>

                <label>Passport Expiry Date</label>

 <?php if($row_getProfile['passport_edate'] != 0) { echo date('d-m-Y',strtotime($row_getProfile['passport_edate'])); } else { echo ''; } ?>

              </div>

              <div class="field_item">

                <label>Visa Number</label>

<?php echo $row_getProfile['visa_number']; ?>

              </div>

              <div class="field_item"><p>(DD-MM-YYYY)</p>

                <label>Visa Expiry Date</label>

<?php if($row_getProfile['visa_edate'] != 0) { echo date('d-m-Y',strtotime($row_getProfile['visa_edate'])); } else { echo ''; } ?>

              </div>

              <div class="field_item">

                <label>NI Number:</label>

<?php echo $row_getProfile['ni_number']; ?>

              </div>

              <div class="field_item">

                <label>Citizen of</label>

<?php echo $row_getProfile['citizen_of']; ?>

              </div>

              <div class="field_item">

                <label>Contact Phone</label>

<?php echo $row_getProfile['contact_phone']; ?>

              </div>

              <div class="field_item">

                <label>Contact Address</label>

<?php echo $row_getProfile['contact_address']; ?>

              </div>
<div class="clear-fix">&nbsp;</div><div class="clear-fix">&nbsp;</div>
              <h3>Emergency Contact Details</h3>

               <div class="field_item">

                <label>Contact Person</label>

<?php echo $row_getProfile['kin_name']; ?>

              </div>

               <div class="field_item">

                <label>Contact Phone</label>

  <?php echo $row_getProfile['kin_phone']; ?>

              </div>

               <div class="field_item">

                <label>Contact Email Address</label>

  <?php echo $row_getProfile['kin_email']; ?>

              </div>

              <div class="field_item">

                <label>Contact Address</label>

<?php echo $row_getProfile['kin_address']; ?></div>

            
<div class="action_items" style="margin-left:165px;">
<input type="reset" value="Back Dashboard" class="reset_btn" onclick="window.location.href='/RM/resource/index.php'">
      </div>
            </form>

          </div>

        </div>

        <div class="clear-fix">&nbsp;</div>

      </article>

    </section>

    

    <!-- Sidebar Goes here -->

    

    <aside class="sidebar">

      <div class="featured">

        <h2 class="white_txt">Change Password</h2>

        <form method="post" action="#" id="change_password" onsubmit="return checkP()">

          <div class="field_item">

            <label>Current Password:</label>

            <input type="password" name="current_password" id="current_password" >

          </div>

          <div class="field_item">

            <label>New Password:</label>

            <input type="password" name="new_password" id="new_password" >

          </div>

          <div class="field_item">

            <label>Confirm Password:</label>

            <input type="password" name="confirm_password" id="confirm_password" >

          </div>

          <div class="action_items">

            <input name="submit" type="submit" class="save_btn" onclick="MM_validateForm('current_password','','R','new_password','','R','confirm_password','','R');return document.MM_returnValue" value="Save">

            <input type="reset" value="Cancel" class="reset_btn">

          </div>

        </form>

        <div class="clear-fix">&nbsp;</div>

      </div>

      <!--<h3>Recent Activity</h3>-->

      <?php #include("recent-ac.php"); ?>

    </aside>

    <div class="clear-fix">&nbsp;</div>

  </article>

  <div class="clear-fix">&nbsp;</div>

  

  <!-- Footer Goes here -->

   <?php  require_once('../includes/footer.php'); ?>
</div>

</body>

</html>

