-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
782 changed files
with
188,567 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
RewriteEngine On | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteCond %{REQUEST_FILENAME}\.php -f | ||
RewriteRule ^(.*)$ $1.php | ||
|
||
RewriteCond %{REQUEST_FILENAME}\.html -f | ||
RewriteRule ^(.*)$ $1.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"/> | ||
<link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet'> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | ||
<link rel="stylesheet" type="text/css" href="css/header-footer.css"> | ||
<link rel="icon" type="img/png" href="images/hng-favicon.png"> | ||
<title>404:Page Not Found</title> | ||
<style> | ||
/*navbar styles*/ | ||
header{ | ||
background-color:#D1F0F6; | ||
padding-bottom: 2rem; | ||
}; | ||
.navbar-brand img{ | ||
width: 100%; | ||
height: 100; | ||
margin: 0 auto; | ||
} | ||
.error-container{ | ||
margin-top: 100px; | ||
align-items: center; | ||
border: 1px purple; | ||
flex-grow: 1; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
button{ | ||
color: white; | ||
border-radius: 3px; | ||
padding: 0.5rem 1rem; | ||
background-color: #00AEFF; | ||
outline: none; | ||
border: none; | ||
transition: 0.4s ease-out; | ||
font-size: 20px; | ||
text-decoration: none; | ||
} | ||
a{ | ||
color: #fff; | ||
} | ||
h1{ | ||
margin-bottom: 20px; | ||
font-size: 100px; | ||
} | ||
p{ | ||
font-size: 20px; | ||
font-weight: 400px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<section class="container-fluid"> | ||
<?php include "fragments/site_header.php"?> | ||
|
||
<div class="error-container"> | ||
<h1>4😲4 </h1> | ||
<h3> 404 - PAGE NOT FOUND</h3> | ||
<P> <i>The page you are looking for is currently <br> under maintenance. Please come back later.</i> </P> | ||
<button><a href="index.php" id="join-hng" class="def-button">HOME</a></button> | ||
</div> | ||
</section> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Please before you push your codes to the repository make sure you pull from the repository, so the changes that have been made can be reflected on your local machine, for us to avoid merge conflicts | ||
use the git command line | ||
```git | ||
git pull | ||
``` | ||
|
||
# Developers guide. | ||
This process here should be able to guide you on how to contribute effectively to this project, follow the steps below. You should not be new to the git workflow process however if you still are, the guide should still be able to help you through the process. | ||
|
||
- Fork the repository to generate a copy of your own. | ||
- Clone the repository. | ||
```use git command line | ||
git clone https://github.com/hngi/HNG6.0.git | ||
``` | ||
- Make the repository (the forked repo) the remote upstream | ||
```use git command line | ||
git add remote upstream https://github.com/hngi/HNG6.0.git | ||
``` | ||
- Create a branch, the branch name should at least be meaningfull e.g if you're working on the footer, your branch name would be; | ||
```use git command line | ||
git checkout -b footer | ||
``` | ||
- Make your changes, add them and make your commits | ||
```use git command line | ||
git commit -m "your message" | ||
``` | ||
- Push your codes to the remote upstream repository | ||
```use git command line | ||
git push -u origin master | ||
``` | ||
- Or you can also push your code to the current branch which you are in. | ||
- Make your Pull request and wait for it to be merged. | ||
|
||
# Happy hacking! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<?php | ||
session_start(); | ||
if(!isset($_SESSION['hng-admin'])){ | ||
header("location:login.php"); | ||
exit(); | ||
} | ||
require 'classControllers/init.php'; | ||
$admin = new AdminClass(); | ||
|
||
$roles = $admin->getRoles(); | ||
|
||
$my_role = $_SESSION['hng-admin']['role']; | ||
|
||
if($my_role != 1){ | ||
//not a super admin | ||
$_SESSION['err_msg'] = "<div class='alert alert-warning'>This task is only available for a super admin!</div>"; | ||
header("location:test_home.php"); | ||
exit(); | ||
} | ||
|
||
|
||
?> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>HNG i7</title> | ||
<!-- Latest compiled and minified CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"> | ||
|
||
<!-- Optional theme --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous"> | ||
|
||
<!-- Latest compiled and minified JavaScript --> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script> | ||
</head> | ||
<body> | ||
<nav class="navbar navbar-default" role="navigation"> | ||
<!-- Brand and toggle get grouped for better mobile display --> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> | ||
<span class="sr-only">Toggle navigation</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<a class="navbar-brand" href="index.php">HngI7</a> | ||
</div> | ||
|
||
</div><!-- /.navbar-collapse --> | ||
</nav> | ||
|
||
|
||
<section id="login"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-6 col-md-offset-3"> | ||
<div class="panel panel-success"> | ||
<div class="panel-heading">Add New Admin</div> | ||
<div class="panel-body"> | ||
<?php | ||
if(isset($_SESSION['err_msg'])) { | ||
echo $_SESSION['err_msg']; | ||
unset($_SESSION['err_msg']); | ||
} | ||
?> | ||
<form method="post" action="superadmin.php"> | ||
<div class="form-group"> | ||
<label for="">First Name: </label> | ||
<input type="text" name="fname" id="fname" required class="form-control"> | ||
<span class="fname-error"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label for="">Last Name: </label> | ||
<input type="text" name="name" id="name" required class="form-control"> | ||
<span class="name-error"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label for="">Email: </label> | ||
<input type="email" name="email" id="email" required class="form-control"> | ||
<span class="email-error"></span> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="">Password: </label> | ||
<input type="password" name="password" id="password" required class="form-control"> | ||
<span class="email-error"></span> | ||
</div> | ||
<div class="form-group"> | ||
<label for="">Role: </label> | ||
<select name="role" id="role" required class="form-control"> | ||
<?php | ||
foreach ($roles as $role){ | ||
?> | ||
<option value="<?php echo $role['role_id']; ?>"><?php echo $role['role_name'];?><??></option> | ||
<?php | ||
} | ||
?> | ||
</select> | ||
<span class="role-error"></span> | ||
</div> | ||
|
||
<input type="submit" class="btn btn-success" id="submit" value="Add"> | ||
|
||
|
||
</form> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<?php | ||
require 'classControllers/init.php'; | ||
$internExperience = new InternExperience(); | ||
if (isset($_POST['ok'])) { | ||
$names = $database->escape_string($_POST["names"]); | ||
$stack = $database->escape_string($_POST["stack"]); | ||
$experience = $database->escape_string($_POST['experience']); | ||
|
||
if (isset($_FILES['image']['name']) && $_FILES['image']['name'] != "") { | ||
$folder = "./uploads/interns/"; | ||
$ext = strtolower(end(explode(".", $_FILES['image']['name']))); | ||
$allowed = array('jpg', 'jpeg', 'png'); | ||
if (in_array($ext, $allowed)) { | ||
$image_name = uniqid() . $_FILES['image']['name']; | ||
$destination = $folder . "/" . $image_name; | ||
$source = $_FILES['image']['tmp_name']; | ||
|
||
if (move_uploaded_file($source, $destination)) { | ||
$image = $image_name; | ||
} else { | ||
$image = ""; | ||
} | ||
} else { | ||
$image = ""; | ||
} | ||
} else { | ||
$image = ""; | ||
} | ||
|
||
$internExperience->saveExperience("$names", "$stack", "$image", "$experience"); | ||
|
||
$_SESSION['msg'] = "<div class='alert alert-success'>Your experience has been submitted successfully!</div>"; | ||
header("location:intern-experience.php"); | ||
exit(); | ||
} | ||
|
||
$all_experiences = $internExperience->fetch_experiences(); | ||
|
||
?> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"> | ||
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> | ||
<link rel="icon" type="img/png" href="images/hng-favicon.png"> | ||
<link rel="stylesheet" type="text/css" href="css/header-footer.css"> | ||
<link rel="stylesheet" href="css/admin_internexperience.css"> | ||
<title> Admin Intern Experience Page</title> | ||
</head> | ||
|
||
<body> | ||
<section class="container-fluid"> | ||
<section class="jumbo"> | ||
<?php include('fragments/site_header.php'); ?> | ||
<h2>Admin Intern Experience Page</h2> | ||
<p class="para"> </p> | ||
|
||
</section> | ||
|
||
<main> | ||
<section> | ||
<section class="mentors-section"> | ||
<div class="container"> | ||
<?php | ||
if (isset($_SESSION['msg'])) { | ||
echo $_SESSION['msg']; | ||
unset($_SESSION['msg']); | ||
} | ||
?> | ||
</div> | ||
<div class="wrapper"> | ||
<?php | ||
foreach ($all_experiences as $all_experience) { | ||
$image = $all_experience['image']; | ||
$names = $all_experience['names']; | ||
|
||
if ($image == "") { | ||
$img_src = "https://via.placeholder.com/150x150.png?text=$names"; | ||
} else { | ||
$img_src = "uploads/interns/$image"; | ||
} | ||
?> | ||
<div class="wrapper-child"> | ||
<img class="image" src="<?php echo $img_src; ?>"> | ||
<h4><?php echo $all_experience['names']; ?></h4> | ||
<p class="stack"><?php echo $all_experience['stack']; ?></p> | ||
<hr class="hline" /> | ||
<p class="experience"> | ||
<?php echo nl2br($all_experience['experience']); ?> | ||
</p> | ||
<i class="fa fa-plus fa-icon" aria-hidden="true"></i> | ||
<i class="fa fa-edit fa-icon" aria-hidden="true"></i> | ||
<i class="fa fa-trash-o fa-icon" aria-hidden="true"></i> | ||
</div> | ||
<?php | ||
} | ||
?> | ||
|
||
</section> | ||
</section> | ||
<?php include('fragments/site_footer.php'); ?> | ||
|
||
</main> | ||
</section> | ||
</body> | ||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> | ||
<script src="js/intern-experience.js"></script> | ||
|
||
</html> |
Oops, something went wrong.