@@ -19,23 +19,29 @@ discard block |
||
| 19 | 19 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationHomeLinkWrapper" aria-hidden="false"> |
| 20 | 20 | <?php if (strpos($url, 'admin') !== false) : ?> |
| 21 | 21 | <a href="/admin/" id="navigationHomeLink">Home</a> |
| 22 | - <?php else : ?> |
|
| 22 | + <?php else { |
|
| 23 | + : ?> |
|
| 23 | 24 | <a href="/" id="navigationHomeLink">Home</a> |
| 24 | - <?php endif; ?> |
|
| 25 | + <?php endif; |
|
| 26 | +} |
|
| 27 | +?> |
|
| 25 | 28 | </div> |
| 26 | 29 | |
| 27 | 30 | <?php /* Checks to see if the page is the admin portal and then displays the admin home link. */ ?> |
| 28 | 31 | <?php $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?> |
| 29 | 32 | <?php if (strpos($url, 'admin') !== false) : ?> |
| 30 | 33 | <?php /* No link for you! */ ?> |
| 31 | - <?php else : ?> |
|
| 34 | + <?php else { |
|
| 35 | + : ?> |
|
| 32 | 36 | <?php /* Browse Jobs */ ?> |
| 33 | 37 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationBrowseLinkWrapper" aria-hidden="false"> |
| 34 | 38 | <a href="#BrowseJobs" id="navigationBrowseLink" onclick="JobPostAPI.showBrowseJobs();TalentCloudAPI.setNav('navigationBrowseLinkWrapper');"> |
| 35 | 39 | Browse Jobs |
| 36 | 40 | </a> |
| 37 | 41 | </div> |
| 38 | - <?php endif; ?> |
|
| 42 | + <?php endif; |
|
| 43 | +} |
|
| 44 | +?> |
|
| 39 | 45 | |
| 40 | 46 | <?php /* Dashboard */ ?> |
| 41 | 47 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationDashboardLinkWrapper" aria-hidden="true"> |
@@ -61,11 +67,14 @@ discard block |
||
| 61 | 67 | <a href="#CreateEditProfile" id="navigationProfileLink" onclick="CreateEditProfileAPI.showCreateEditProfile();TalentCloudAPI.setNav('navigationProfileLinkWrapper');"> |
| 62 | 68 | My Profile |
| 63 | 69 | </a> |
| 64 | - <?php else :?> |
|
| 70 | + <?php else { |
|
| 71 | + :?> |
|
| 65 | 72 | <a href="#MyProfile" id="navigationProfileLink" onclick="JobSeekerAPI.showMyJobSeekerProfile();TalentCloudAPI.setNav('navigationProfileLinkWrapper');"> |
| 66 | 73 | My Profile |
| 67 | 74 | </a> |
| 68 | - <?php endif; ?> |
|
| 75 | + <?php endif; |
|
| 76 | +} |
|
| 77 | +?> |
|
| 69 | 78 | |
| 70 | 79 | </div> |
| 71 | 80 | |
@@ -75,18 +84,24 @@ discard block |
||
| 75 | 84 | <a href="javascript:void(0)" id="navigationPosterLink" onclick="CreateJobPosterAPI.showCreateJobPosterForm(this);TalentCloudAPI.setNav('navigationPosterLinkWrapper');">Job Poster |
| 76 | 85 | </a> |
| 77 | 86 | </div> |
| 78 | - <?php else : ?> |
|
| 87 | + <?php else { |
|
| 88 | + : ?> |
|
| 79 | 89 | <?php /* No link for you! */ ?> |
| 80 | - <?php endif; ?> |
|
| 90 | + <?php endif; |
|
| 91 | +} |
|
| 92 | +?> |
|
| 81 | 93 | |
| 82 | 94 | <?php /* Register */ |
| 83 | 95 | if (strpos($url, 'admin') !== false) : ?> |
| 84 | 96 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationRegisterLinkWrapper" aria-hidden="true"> |
| 85 | 97 | <?php echo("<a href=\"\" id=\"navigationRegisterLink\">Register</a>"); ?> |
| 86 | 98 | </div> |
| 87 | - <?php else : ?> |
|
| 99 | + <?php else { |
|
| 100 | + : ?> |
|
| 88 | 101 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationRegisterLinkWrapper" aria-hidden="false"> |
| 89 | - <?php echo("<a href=\"https://account.gccollab.ca/register?redirect_uri=https%3A%2F%2Ftc.gccollab.ca%2F\" id=\"navigationRegisterLink\">Register</a>"); ?> |
|
| 102 | + <?php echo("<a href=\"https://account.gccollab.ca/register?redirect_uri=https%3A%2F%2Ftc.gccollab.ca%2F\" id=\"navigationRegisterLink\">Register</a>"); |
|
| 103 | +} |
|
| 104 | +?> |
|
| 90 | 105 | </div> |
| 91 | 106 | <?php endif; ?> |
| 92 | 107 | |
@@ -102,9 +117,12 @@ discard block |
||
| 102 | 117 | |
| 103 | 118 | <?php if ($hasUser != null) : ?> |
| 104 | 119 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationLoginLinkWrapper" aria-hidden="true"> |
| 105 | - <?php else :?> |
|
| 120 | + <?php else { |
|
| 121 | + :?> |
|
| 106 | 122 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationLoginLinkWrapper" aria-hidden="false"> |
| 107 | - <?php endif; ?> |
|
| 123 | + <?php endif; |
|
| 124 | +} |
|
| 125 | +?> |
|
| 108 | 126 | <?php |
| 109 | 127 | $loginLink = ""; |
| 110 | 128 | $loginLink .= OPENID_URI . AUTH_URI; |
@@ -119,13 +137,16 @@ discard block |
||
| 119 | 137 | ?> |
| 120 | 138 | </div> |
| 121 | 139 | |
| 122 | - <?php else : ?> |
|
| 140 | + <?php else { |
|
| 141 | + : ?> |
|
| 123 | 142 | |
| 124 | 143 | <?php if ($hasUser != null) : ?> |
| 125 | 144 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationLoginLinkWrapper"> |
| 126 | 145 | <?php else :?> |
| 127 | 146 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationLoginLinkWrapper"> |
| 128 | - <?php endif; ?> |
|
| 147 | + <?php endif; |
|
| 148 | +} |
|
| 149 | +?> |
|
| 129 | 150 | <?php |
| 130 | 151 | $loginLink = ""; |
| 131 | 152 | $loginLink .= OPENID_URI . AUTH_URI; |
@@ -156,9 +177,12 @@ discard block |
||
| 156 | 177 | <div id="h1"> |
| 157 | 178 | <?php if (strpos($url, 'admin') !== false) : ?> |
| 158 | 179 | <h1 class="visuallyHidden">Talent Cloud - Admin Portal</h1> |
| 159 | - <?php else :?> |
|
| 180 | + <?php else { |
|
| 181 | + :?> |
|
| 160 | 182 | <h1 class="visuallyHidden">Talent Cloud - Applicant Portal</h1> |
| 161 | - <?php endif; ?> |
|
| 183 | + <?php endif; |
|
| 184 | +} |
|
| 185 | +?> |
|
| 162 | 186 | </div> |
| 163 | 187 | |
| 164 | 188 | <div class="landing-hero" id="landingHero"> |
@@ -78,12 +78,12 @@ |
||
| 78 | 78 | echo($resultJson); |
| 79 | 79 | |
| 80 | 80 | |
| 81 | - }else{ |
|
| 81 | + } else{ |
|
| 82 | 82 | header('HTTP/1.0 400 Bad Request'); |
| 83 | 83 | echo json_encode(array("failed"=>"No manager profile id provided"),JSON_FORCE_OBJECT); |
| 84 | 84 | exit; |
| 85 | 85 | } |
| 86 | - }else{ |
|
| 86 | + } else{ |
|
| 87 | 87 | header('HTTP/1.0 400 Bad Request'); |
| 88 | 88 | echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
| 89 | 89 | exit; |
@@ -84,12 +84,12 @@ |
||
| 84 | 84 | $resultJson = json_encode($result, JSON_PRETTY_PRINT); |
| 85 | 85 | echo($resultJson); |
| 86 | 86 | |
| 87 | - }else{ |
|
| 87 | + } else{ |
|
| 88 | 88 | header('HTTP/1.0 400 Bad Request'); |
| 89 | 89 | echo json_encode(array("failed"=>"No manager profile id provided"),JSON_FORCE_OBJECT); |
| 90 | 90 | exit; |
| 91 | 91 | } |
| 92 | - }else{ |
|
| 92 | + } else{ |
|
| 93 | 93 | header('HTTP/1.0 400 Bad Request'); |
| 94 | 94 | echo json_encode(array("failed"=>'"No manager profile id provided"'),JSON_FORCE_OBJECT); |
| 95 | 95 | exit; |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | $jobPosterApplicationId = Utils::getParameterFromRequest($requestParams,4); |
| 83 | 83 | $criteriaId = Utils::getParameterFromRequest($requestParams,6); |
| 84 | 84 | |
| 85 | - //This action is available to the owner of the application, the owner of the job poster its for, and admins |
|
| 85 | + //This action is available to the owner of the application, the owner of the job poster its for, and admins |
|
| 86 | 86 | $userId = JobApplicationController::getJobApplicationUserId($jobPosterApplicationId); |
| 87 | 87 | $userPermissions = []; |
| 88 | 88 | $userPermissions[] = new UserPermission(ROLE_ADMIN); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | header("Content-type: " . $result->getType()); |
| 35 | 35 | echo($result->getImage()); |
| 36 | 36 | } |
| 37 | - }else{ |
|
| 37 | + } else{ |
|
| 38 | 38 | header('HTTP/1.0 400 Bad Request'); |
| 39 | 39 | echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
| 40 | 40 | exit; |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $result = ProfilePicController::putProfilePic($profile_pic); |
| 65 | 65 | |
| 66 | 66 | echo($result); |
| 67 | - }else{ |
|
| 67 | + } else{ |
|
| 68 | 68 | header('HTTP/1.0 400 Bad Request'); |
| 69 | 69 | echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
| 70 | 70 | exit; |
@@ -93,12 +93,12 @@ |
||
| 93 | 93 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 94 | 94 | |
| 95 | 95 | echo($json); |
| 96 | - }else{ |
|
| 96 | + } else{ |
|
| 97 | 97 | header('HTTP/1.0 400 Bad Request'); |
| 98 | 98 | echo json_encode(array("failed"=>"No manager profile id provided"),JSON_FORCE_OBJECT); |
| 99 | 99 | exit; |
| 100 | 100 | } |
| 101 | - }else{ |
|
| 101 | + } else{ |
|
| 102 | 102 | header('HTTP/1.0 400 Bad Request'); |
| 103 | 103 | echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
| 104 | 104 | exit; |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | require_once __DIR__ . '/../config/php.config.inc'; |
| 4 | 4 | |
| 5 | - require_once __DIR__ . '/../config/db.config.inc'; |
|
| 5 | + require_once __DIR__ . '/../config/db.config.inc'; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Summary: Database connection manager class |