Skip to content

Commit

Permalink
admin images
Browse files Browse the repository at this point in the history
  • Loading branch information
johnebri committed Feb 25, 2020
1 parent 1e1cb2a commit c71bd44
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions adminProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

if(isset($_POST["uploadPicture"])) {
$fileName = $adminId. ".jpg";
if (move_uploaded_file($_FILES["image"]["tmp_name"], "adminProfilePics/".$fileName."")) {
if (move_uploaded_file($_FILES["image"]["tmp_name"], "images/uploads/admin/".$fileName."")) {
$admin->imageUPloaded($adminId);
} else {
echo "Sorry, there was an error uploading your file.";
Expand Down Expand Up @@ -247,7 +247,7 @@
echo '<img src="adminProfilePics/default.jpg" />';
} else {
// admin has picture
echo '<img src="adminProfilePics/'.$adminId.'.jpg" class="img-circle img-responsive" style="height: 200px; width: 200px;"/>';
echo '<img src="images/uploads/admin/'.$adminId.'.jpg" class="img-circle img-responsive" style="height: 200px; width: 200px;"/>';
}
?>

Expand Down
4 changes: 2 additions & 2 deletions fragments/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<?php
if($_SESSION["hasPic"] == "no") {
// admin has NO picture, show default
echo '<img src="adminProfilePics/default.jpg" height="90px" width="90px"/>';
echo '<img src="images/uploads/admin/default.jpg" height="90px" width="90px"/>';
} else if($_SESSION["hasPic"] == "yes"){
// admin has picture
echo '<img src="adminProfilePics/'.$_SESSION["admin_id"].'.jpg" class="img-circle img-responsive" height="90px" width="90px" />';
echo '<img src="images/uploads/admin/'.$_SESSION["admin_id"].'.jpg" class="img-circle img-responsive" height="90px" width="90px" />';
}
?>

Expand Down
2 changes: 1 addition & 1 deletion join-intern.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
?>

<?php
if ($status == 0) {
if ($status == 1) {
?>
<form class="form-container" action="" method="post" id="myForm">

Expand Down

0 comments on commit c71bd44

Please sign in to comment.