PageRenderTime 40ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/recruitment/profile/profile.php

https://bitbucket.org/lecturer34/hrmis
PHP | 164 lines | 138 code | 25 blank | 1 comment | 11 complexity | cd58e2e960dd2f3622809ef7a551e211 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php
  2. if (!isset($_SESSION)) {
  3. session_start();
  4. }
  5. if(!isset($_SESSION['msgDetails'])){
  6. $_SESSION['msgCaption'] = '';
  7. $_SESSION['msgDetails'] = '';
  8. }
  9. if(!isset($_SESSION['user_account_row_id']) || $_SESSION['user_account_row_id'] < 1){
  10. include_once('../access_error.php');
  11. $redirectToURL = '../';
  12. header("location: $redirectToURL");
  13. exit();
  14. }
  15. require_once('../../lib/database.php');
  16. openConnection();
  17. require_once('profile_details.php');
  18. require_once('../adverts/get_running_adverts_table.php');
  19. $ads_count = count_running_adverts();
  20. $ads_responded = count_adverts_responded_to($_SESSION['user_account_row_id']); //defined in helper_functions.php
  21. ?>
  22. <!DOCTYPE html>
  23. <html lang="en">
  24. <head>
  25. <?php require_once("../../partials/cssimports.php") ?>
  26. <title>ABU Zaria | Online Job Vacancies and Recruitment Portal</title>
  27. <meta name="keywords" content="ABU Zaria, job vacancies, recruitment">
  28. <meta name="description" content="The official online job vacancies and recruitment portal of Ahmadu Bello University, Zaria - Nigeria.">
  29. <link href="../recruit_css/style.css" rel="stylesheet" type="text/css" media="screen" />
  30. <style type="text/css">
  31. .hero-unit {
  32. background-color: #fff;
  33. opacity: 0.8;
  34. -webkit-border-radius: 3px;
  35. -moz-border-radius: 3px;
  36. border-radius: 3px;
  37. background-image: url('../../assets/img/banner-recruitment.png');
  38. min-height: 120px;
  39. }
  40. .hero-unit p a.btn {
  41. opacity: 1;
  42. }
  43. </style>
  44. <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
  45. <!--[if lt IE 9]>
  46. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  47. <![endif]-->
  48. </head>
  49. <body>
  50. <?php include_once dirname(__FILE__) . "/../../partials/recruit_navbar.php" ?>
  51. <div id="container" class="container">
  52. <div class="span12">
  53. <div class="page-header">
  54. <h2>Welcome<small> <?php echo $_SESSION['full_names']?>&nbsp;&nbsp;<font size="-1"><a href="../logout.php">[Log Out]</a>&nbsp;&nbsp;<a href="unregister_user.php">[Delete Account]</a>&nbsp;&nbsp;<a href="personal_details.php">[Personal Details]</a>&nbsp;&nbsp;<a href="family_details.php">[Family Details]</a>&nbsp;&nbsp;<a href="my_nok.php">[Next of Kin Details]</a></font></small></h2>
  55. <noscript>
  56. <?php include_once('../no_javascript.php');?>
  57. </noscript>
  58. <?php
  59. if(isset($_SESSION['msgDetails']) && strlen($_SESSION['msgDetails']) > 0 ) {
  60. if($_SESSION['msgDetails'] != 'The contact details information was successfully posted.'){
  61. // echo $_SESSION['msgDetails'];
  62. }
  63. $_SESSION['msgCaption'] = '';
  64. $_SESSION['msgDetails'] = '';
  65. }
  66. ?>
  67. </div>
  68. <div class="dashboard_div" style="width:90%">
  69. <div class="div_caption">
  70. Nice to see you again,&nbsp;&nbsp;<strong><?php echo $_SESSION['full_names']?></strong>
  71. <div class="div_square_link"><a href="print_profile.php" title="click to print your complete profile">[print profile]</a></div>
  72. </div>
  73. <br />
  74. <div class="profile_pic"><?php embed_user_profile_pic($_SESSION['user_account_row_id'], ''); ?></div>
  75. <div id="left_container" style="width:53%; float:left; display:block;">
  76. <div class="dashboard_div">
  77. <div class="div_caption"><strong>Your Profile, In Brief</strong></div>
  78. <?php
  79. get_biodata_details($_SESSION['user_account_row_id']);
  80. ?>
  81. </div>
  82. <div class="dashboard_div" >
  83. <div class="div_caption"><strong>Your Contact Details</strong></div>
  84. <?php
  85. get_contact_details($_SESSION['user_account_row_id']);
  86. ?>
  87. </div>
  88. </div>
  89. <div id="right_container" style="width:43%;float:left; margin-left:20px; display:block;">
  90. <div class="dashboard_div" style="width:95%;">
  91. <div class="div_caption"><strong>Your Qualifications</strong></div>
  92. <?php
  93. get_qualifications_details($_SESSION['user_account_row_id']);
  94. ?>
  95. </div>
  96. <div class="dashboard_div" style="width:95%;">
  97. <div class="div_caption"><strong>Your Work Experience</strong></div>
  98. <?php
  99. get_work_experience_details($_SESSION['user_account_row_id']);
  100. ?>
  101. </div>
  102. <div class="dashboard_div" style="width:95%;">
  103. <div class="div_caption"><strong>Vacancies and Your Job Applications</strong></div>
  104. <?php
  105. $ads_notice = '';
  106. switch ($ads_count) {
  107. case 0:
  108. $ads_notice = '<br /><p>There is currently no vacancy position being advertised. You will be notified here whenever new vacancies are advertised by the University.</p>';
  109. break;
  110. case 1:
  111. $ads_notice = '<br /><p>There is <strong>1</strong> vacancy position currently being advertised. You may be interested in it. Check out our <a href="../adverts/running_adverts.php">current vacancy adverts.</a></p>';
  112. break;
  113. default:
  114. $ads_notice = '<br /><p>There are <a href="../adverts/running_adverts.php"><strong>' . $ads_count . ' vacancy positions</strong></a> currently being advertised. You may be interested in one or two of them. Check out our <a href="../adverts/running_adverts.php">current vacancy adverts.</a></p>';
  115. break;
  116. }
  117. echo $ads_notice;
  118. $ad_resp = '<br /><p>You have so far responded to <strong>';
  119. switch ($ads_responded){
  120. case 0:
  121. $ad_resp .= 'no advertisements on this portal.';
  122. break;
  123. case 1:
  124. $ad_resp .= '<a href="../apply/my_job_applications.php">1 advertisement</a> on this portal.';
  125. break;
  126. default:
  127. $ad_resp .= '<a href="../apply/my_job_applications.php">' . $ads_responded . ' advertisements</strong></a> on this portal.';
  128. break;
  129. }
  130. $ad_resp .= ' You can track all your job applications by clicking <a href="../apply/my_job_applications.php">here.</a></p>';
  131. echo $ad_resp;
  132. ?>
  133. </div>
  134. </div>
  135. </div>
  136. </div><!-- /span12 -->
  137. </div><!-- /container -->
  138. </body>
  139. </html>