Commit d752f0fc authored by Priyesh's avatar Priyesh

Final commit

parent 1ecc4c59
...@@ -260,12 +260,13 @@ hr{ ...@@ -260,12 +260,13 @@ hr{
} }
#post_body{ #post_body{
font-size: 20px; font-size: 17px;
vertical-align: center; vertical-align: center;
padding-left:20px; padding-left:20px;
padding-right:20px; padding-right:20px;
font-family: Serif;
color:#94908c; font-weight: normal;
color:#555;
} }
......
...@@ -14,7 +14,7 @@ if(isset($_SESSION['loggedin'])) ...@@ -14,7 +14,7 @@ if(isset($_SESSION['loggedin']))
if (mysqli_query($db, $sql)) { if (mysqli_query($db, $sql)) {
header("location: seeyourposts.php"); header("location: profile.php");
} else { } else {
echo "Error deleting record: " . mysqli_error($conn); echo "Error deleting record: " . mysqli_error($conn);
......
...@@ -23,6 +23,7 @@ if(isset($_GET['id'])) { ...@@ -23,6 +23,7 @@ if(isset($_GET['id'])) {
$round = explode(",", $row['roundprovided']); $round = explode(",", $row['roundprovided']);
$roundcleared = explode(",", $row['roundcleared']); $roundcleared = explode(",", $row['roundcleared']);
$row['story'] = str_replace("<br/>", "\n", $row['story']);
} }
......
...@@ -24,6 +24,7 @@ if(isset($_POST['update'])) { ...@@ -24,6 +24,7 @@ if(isset($_POST['update'])) {
// $roundprovided = $_POST['roundprovided']; // $roundprovided = $_POST['roundprovided'];
$roundprovided = implode(",", $_POST['roundprovided']); $roundprovided = implode(",", $_POST['roundprovided']);
$roundcleared = implode(",", $_POST['roundcleared']); $roundcleared = implode(",", $_POST['roundcleared']);
$story = str_replace(array("\n","\n","\\n","\\n"),"<br/>",$story);
// echo $story; // echo $story;
// die; // die;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<?php <?php
foreach ($error as $errors) : ?> foreach ($error as $errors) : ?>
<p><?php echo $errors ?></p> <p><?php echo '<span style="color:red;"><em>'.$errors.'</em></span>' ?></p>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
......
...@@ -42,6 +42,9 @@ if(isset($_POST['submit'])){ ...@@ -42,6 +42,9 @@ if(isset($_POST['submit'])){
$created = date('Y-m-d H:i:s'); $created = date('Y-m-d H:i:s');
$story = str_replace(array("\n","\n","\\n","\\n"),"<br/>",$story);
// echo "$story";
// die;
if(empty($name)){array_push($error, "Name is required");} if(empty($name)){array_push($error, "Name is required");}
if(empty($roll)) {array_push($error, "roll is required");} if(empty($roll)) {array_push($error, "roll is required");}
......
...@@ -86,17 +86,20 @@ ...@@ -86,17 +86,20 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="form-title text-center"> <div class="form-title text-center">
<h4>Login</h4> <h4>Login</h4>
</div> </div>
<div class="d-flex flex-column text-center"> <div class="d-flex flex-column text-center">
<form action="server.php" method="post"> <form action="server.php" method="post">
<?php include('error.php'); ?>
<div class="form-group"> <div class="form-group">
<input type="email" class="form-control" name="email" id="email" placeholder="Email"> <input type="email" class="form-control" name="email" id="email" placeholder="Email" required>
<span id="msg1" style="color: red"></span> <span id="msg1" style="color: red"></span>
</div> </div>
<div class="form-group"> <div class="form-group">
<input type="password" class="form-control" name ="password" id="password" placeholder="Password"> <input type="password" class="form-control" name ="password" id="password" placeholder="Password" required>
<span id="msg2" style="color: red"></span> <span id="msg2" style="color: red"></span>
</div> </div>
<input type="submit" class="btn btn-info btn-block btn-round" name="login_user" value="Login" onsubmit="return logcheck()"> <input type="submit" class="btn btn-info btn-block btn-round" name="login_user" value="Login" onsubmit="return logcheck()">
......
...@@ -87,7 +87,7 @@ if(isset($_SESSION['loggedin'])) ...@@ -87,7 +87,7 @@ if(isset($_SESSION['loggedin']))
<div> <div>
<hr class="line" style="border-color: #e67f11"> <hr class="line" style="border-color: #e67f11">
<p id="para1">A single place where all the on-campus job interview experiences of students exits. Filter out experiences according to year,course,etc. Share your own story with fellow students.</p><br> <p id="para1">A single place where all the on-campus job interview experiences of students exits. Sort out the experiences according to company name. Share your own story with fellow students.</p><br>
<hr class="line" style="border-color: #e67f11"> <hr class="line" style="border-color: #e67f11">
<br><br> <br><br>
......
...@@ -181,13 +181,13 @@ if(isset($_SESSION['loggedin'])) ...@@ -181,13 +181,13 @@ if(isset($_SESSION['loggedin']))
location.href = "logout.php"; location.href = "logout.php";
}; };
function stoppedTyping(){ // function stoppedTyping(){
if(this.value.length > 0) { // if(this.value.length > 0) {
document.getElementById('searchbtn').disabled = false; // document.getElementById('searchbtn').disabled = false;
} else { // } else {
document.getElementById('searchbtn').disabled = true; // document.getElementById('searchbtn').disabled = true;
} // }
} // }
</script> </script>
</body> </body>
......
GIT LINK:
git@git.cse.iitb.ac.in:anurag/PlacementExperience.git
TEAM: Black Hat
Anurag Kumar Karn - 203050006
Kunal Krishna - 203050023
Priyesh Jain - 203050064
Bandapalli Saikumar - 203050095
MOTIVATION:
Juniors may not know about the percentage cut off / avg. percentage for placements. By knowing the seniors cut-off percentages juniors can get some idea about cut-offs. Students can choose courses accordingly in semester.
We faced this kind of issues in our B.Tech placements. To overcome this situation we come up with this website.
Given the online semester it has been difficult for students to interact with seniors and gather their first-hand interview experiences.There should be a single place where all this data be available and a student could query about preparation tips.
A responsive webapp to view the stories and share your own.
Setting up Server:-
Download and Install Xampp server from https://www.apachefriends.org/download.html
Linux Users:
1. Git clone the project. Paste the 'PlacementExperience' folder in 'htdocs' folder ('htdocs' will be present in /opt/lampp/htdocs ).
2. Start the server by writing 'sudo /opt/lampp/lampp start' in the terminal.
Windows Users:
1. Git clone the project. Paste the 'PlacementExperience' folder in 'htdocs' folder ('htdocs' will be present in C:\Program Files\xampp ).
2. Go to the location where you installed Xampp (usually C:\Program Files\xampp) and double click on Xampp Control Panel (xampp-control.exe)
3. Click on Start buttons next to Apache and MySQL for starting them.
Creating Database:-
a. Open http://localhost/phpmyadmin/ in browser.
b. In the Databases tab, under 'Create database' enter Database name 'webpage' and click Create.
c. In the Structure tab, create table 'student' with 7 columns. Enter the following details in table:
Name Type Length Default .... A_I
id int [check]
name varchar 255
roll varchar 255
email varchar 255
branch varchar 255
password varchar 255
created_at datetime CURRENT_TIMESTAMP
d. Create another table 'posts' with 11 columns. Enter the following details in table:
Name Type Length Default .... A_I
id int [check]
student_id int
name varchar 255
roll varchar 255
email varchar 255
coursetaken varchar 255
comapnyname varchar 255
roundprovided varchar 255
roundcleared varchar 255
story varchar 2000
created_at datetime CURRENT_TIMESTAMP
e. The database is created. To view the entires click on the 'Browse' tab.
Accessing the website:-
To access the website open the web browser and go to "http://localhost/PlacementExperience".
Navigating through website:-
1. Register yourself using 'Sign Up' option. Then login with the email and password.
2. Scroll down in the homepage to a card called 'See the posts' to view the posts.In the post page use can use the search bar on top-right to filter out posts using company name.
3. The card called 'Share your Experience' takes you to a form to enter your interview experience and some additional details.
4. The navigation bar on the left (top in case of homepage) lets you move swiftly through different pages.
5. Profile page lets you see your profile and the posts you have submitted. It also provides options to update and delete the posts.
...@@ -86,6 +86,9 @@ if(isset($_POST['login_user'])){ ...@@ -86,6 +86,9 @@ if(isset($_POST['login_user'])){
$password = md5($password); $password = md5($password);
$query = "SELECT * FROM student WHERE email = '$email' AND password = '$password'"; $query = "SELECT * FROM student WHERE email = '$email' AND password = '$password'";
$result = mysqli_query($db, $query); $result = mysqli_query($db, $query);
if(mysqli_num_rows($result) <= 0){
array_push($error, "Email doesn't exits");
}
$row = mysqli_fetch_row($result); $row = mysqli_fetch_row($result);
$id = $row[0]; $id = $row[0];
...@@ -100,17 +103,12 @@ if(isset($_POST['login_user'])){ ...@@ -100,17 +103,12 @@ if(isset($_POST['login_user'])){
$_SESSION['name'] = $name; $_SESSION['name'] = $name;
$_SESSION['roll'] = $roll; $_SESSION['roll'] = $roll;
$_SESSION['loggedin'] = '1'; $_SESSION['loggedin'] = '1';
// $_SESSION['success'] = "You are logged in successfully";
//header("Location: index1.php");
echo "Login successfully".$email.$password; echo "Login successfully".$email.$password;
header("location: mainpage.php"); header("location: mainpage.php");
} }
else{
echo "Login Failed !!"; }else{
} header("location: index.php");
}
else{
echo "Login Failed !!";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment