Skip to content

Commit 1c6c0a7

Browse files
committed
10th commit Readme and minor changes
1 parent a1a5f9f commit 1c6c0a7

13 files changed

+203
-10
lines changed

README.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
3+
# 3rd Year Web Development Project [NIT Durgapur]
4+
5+
## Overview:
6+
7+
A **Student-Admin portal system** wherein student can request for registration with the portal and administrator can review (accept / reject ) his/her request. On acceptance of a request, a student can modify additional details like hobbies,address,phone number etc, anytime as per his/her wish.Student can upload his favorite image as a profile picture and can modify it anytime.
8+
9+
​ Admin has the right to accept/reject a student's request anytime and can inspect students' profile completely but cannot change any details or see their passwords.
10+
11+
## Its Live:
12+
13+
**You can check the site anytime because it is UP and RUNNING just click the link below:**
14+
15+
**http://sayanpandey.000webhostapp.com/classProject **
16+
17+
*To Register yourself follow the instructions:*
18+
19+
**1. Submit a registration request from the Students' portal.**
20+
21+
**2. Visit Administrators' Portal; Use *'admin'* as USERNAME and *'admin'* as PASSWORD. **
22+
23+
**3.Find your request and click 'Accept'.**
24+
25+
**4.Use Students' portal to update/modify your profile details.**
26+
27+
## Languages Used :
28+
29+
The site is built completely from scratch, with no use of templates or bootstrap.The site uses:
30+
31+
* **HTML5**
32+
* **CSS3**
33+
* **JQuery/JavaScript**
34+
* **PHP**
35+
* **MySQL**
36+
37+
There is extensive implementation of **AJAX** and **PRG** and this site is **impervious** to **SQL Injections and Cross Site Scripting (XSS).**
38+
39+
##Database Structure
40+
41+
The MySQL database *classProject* contains three tables namely:
42+
43+
* **admin** : Consists of details of administrators mainly ***username*** and ***password***.
44+
* **students** : Consists of basic ***Registration Request*** Details like ***registration number,roll number*** etc.
45+
* **extradetail** : Consists of all other details that student wishes to add like ***hobbies,Address,Achievements*** etc.
46+
47+
####A sample database is available in *'extras'* folder namely *'classProject.sql'*.
48+
49+
##Screens:
50+
51+
### Index Page:
52+
53+
![Index Image](/extras/index.PNG)
54+
55+
### Students' Portal:
56+
57+
###### Home
58+
59+
![Students' Portal](/extras/student.png)
60+
61+
######Profile
62+
63+
![Profile](/extras/profile.PNG)
64+
65+
###Administrator's Portal
66+
67+
###### Home
68+
69+
![Administrator's Portal](/extras/admin.PNG)
70+
71+
###### Requests
72+
73+
![requests](/extras/request.PNG)
74+
75+
76+
77+
78+
79+
80+
81+
82+

_config.yml

-1
This file was deleted.

admins.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
position:absolute;
5959
right:10px;" src="img/back2.png">
6060
<h1>&nbsp;&nbsp;&nbsp;&nbsp;Fill up the details:</h1>
61-
<form action="login" method="POST">
61+
<form action="login.php" method="POST">
6262
<input type="hidden" value="admins" name="logger">
6363
<h3 class="heading">Username:&nbsp;<input type="text" name="user" placeholder="Enter Username" required></h3>
6464
<h3 class="heading">Password:&nbsp;<input type="password" name="password" placeholder="Enter password" required></h3>

extras/admin.PNG

1.92 MB
Loading

extras/classproject.sql

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
-- phpMyAdmin SQL Dump
2+
-- version 4.7.4
3+
-- https://www.phpmyadmin.net/
4+
--
5+
-- Host: 127.0.0.1:3306
6+
-- Generation Time: Apr 03, 2018 at 03:00 AM
7+
-- Server version: 5.7.19
8+
-- PHP Version: 5.6.31
9+
10+
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11+
SET AUTOCOMMIT = 0;
12+
START TRANSACTION;
13+
SET time_zone = "+00:00";
14+
15+
16+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
17+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
18+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
19+
/*!40101 SET NAMES utf8mb4 */;
20+
21+
--
22+
-- Database: `classproject`
23+
--
24+
25+
-- --------------------------------------------------------
26+
27+
--
28+
-- Table structure for table `admins`
29+
--
30+
31+
DROP TABLE IF EXISTS `admins`;
32+
CREATE TABLE IF NOT EXISTS `admins` (
33+
`user` varchar(50) NOT NULL,
34+
`pass` varchar(50) NOT NULL
35+
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
36+
37+
--
38+
-- Dumping data for table `admins`
39+
--
40+
41+
INSERT INTO `admins` (`user`, `pass`) VALUES
42+
('admin', 'admin');
43+
44+
-- --------------------------------------------------------
45+
46+
--
47+
-- Table structure for table `extradetail`
48+
--
49+
50+
DROP TABLE IF EXISTS `extradetail`;
51+
CREATE TABLE IF NOT EXISTS `extradetail` (
52+
`regno` int(10) NOT NULL,
53+
`DOB` date NOT NULL,
54+
`fname` varchar(50) NOT NULL,
55+
`mname` varchar(50) NOT NULL,
56+
`gemail` varchar(50) NOT NULL,
57+
`address` varchar(100) NOT NULL,
58+
`m10` int(5) NOT NULL,
59+
`m12` int(5) NOT NULL,
60+
`ECA` varchar(60) DEFAULT NULL,
61+
`Achievement` varchar(60) DEFAULT NULL,
62+
`hobby` varchar(300) NOT NULL,
63+
UNIQUE KEY `regno` (`regno`)
64+
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
65+
66+
--
67+
-- Dumping data for table `extradetail`
68+
--
69+
70+
INSERT INTO `extradetail` (`regno`, `DOB`, `fname`, `mname`, `gemail`, `address`, `m10`, `m12`, `ECA`, `Achievement`, `hobby`) VALUES
71+
(20150213, '1997-12-25', 'Rabin Kumar Pandey', 'Soma Pandey', 'rabinkrpandey@gmail.com', '7/8-Vidyapati Road, B-zone, Durgapur-5,W.B', 90, 94, 'Social Engineering', 'Hmm', 'Painting,Gaming,Playing Guitar,Singing,Collecting items');
72+
73+
-- --------------------------------------------------------
74+
75+
--
76+
-- Table structure for table `students`
77+
--
78+
79+
DROP TABLE IF EXISTS `students`;
80+
CREATE TABLE IF NOT EXISTS `students` (
81+
`regno` int(10) NOT NULL,
82+
`branch` varchar(50) NOT NULL,
83+
`rollno` varchar(10) NOT NULL,
84+
`name` varchar(50) NOT NULL,
85+
`phone` bigint(20) NOT NULL,
86+
`email` varchar(50) NOT NULL,
87+
`pass` varchar(50) NOT NULL,
88+
`request` int(1) NOT NULL,
89+
UNIQUE KEY `regno` (`regno`)
90+
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
91+
92+
--
93+
-- Dumping data for table `students`
94+
--
95+
96+
INSERT INTO `students` (`regno`, `branch`, `rollno`, `name`, `phone`, `email`, `pass`, `request`) VALUES
97+
(20150213, 'IT', '15/IT/21', 'Sayan Pandey', 9564055284, 'sayanpandey@gmail.com', 'sayan', 1),
98+
(20150214, 'ME', '15/ME/56', 'Superman', 1234567890, 'superman@gmail.com', 'sayan', -1),
99+
(20150216, 'CHE', '15/CHE/88', 'Iron Man', 9696969696, 'tonyStark@gmail.com', 'sayan', 1),
100+
(20150217, 'BT', '15/BT/85', 'Batman', 9434133858, 'batman@gmail.com', 'sayan', 1);
101+
COMMIT;
102+
103+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
104+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
105+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

extras/index.PNG

2.41 MB
Loading

extras/profile.PNG

1.72 MB
Loading

extras/request.PNG

289 KB
Loading

extras/student.png

2.14 MB
Loading

login.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
$stmt->bind_param("ss",$user,$pass);
2121
if(!($stmt->execute())){
2222
$_SESSION['alogin']="Execute failed:" . $stmt->error;
23-
header("Location:/classProject/admins",true,303);
23+
header("Location:/classProject/admins.php",true,303);
2424
}
2525
else{
2626
$result=$stmt->get_result();
@@ -39,7 +39,7 @@
3939
$stmt->bind_param("ss",$regno,$pass);
4040
if(!($stmt->execute())){
4141
$_SESSION['login']="Execute failed:" . $stmt->error;
42-
header("Location:/classProject/admins",true,303);
42+
header("Location:/classProject/students.php",true,303);
4343
}
4444
else{
4545
$result=$stmt->get_result();
@@ -60,7 +60,7 @@
6060
}
6161
else
6262
$_SESSION['login']="Credentials not matching !!";
63-
header("Location:/classProject/students",true,303);
63+
header("Location:/classProject/students.php",true,303);
6464
}
6565
}
6666
}

student.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ $("#set_button").click(function(){
207207
});
208208
request.done(function (response, textStatus, jqXHR){
209209
$("#message2").text(response).css({'display':'inline-block'}).hide().slideDown();
210-
$("input,textarea").addAttr("disabled");
211210
});
212211
request.fail(function (jqXHR, textStatus, errorThrown){
213212
alert("Unable to Handle request please try again later !!");
@@ -216,7 +215,8 @@ $("#set_button").click(function(){
216215

217216
//Image Upload
218217
$('#submit_form').on('submit', function(e){
219-
e.preventDefault();
218+
e.preventDefault();
219+
alert("Wait while image is being uploaded");
220220
$.ajax({
221221
url:"upload.php",
222222
method:"POST",
@@ -225,8 +225,16 @@ $('#submit_form').on('submit', function(e){
225225
contentType:false,
226226
processData:false,
227227
success:function(received)
228-
{
228+
{
229229
$("#message2").html(received);
230+
$('.banner,.title2,.profile_back').fadeTo('slow', 0, function(){
231+
$(this).css({'background-image':'url(img/std_img/'+regno+'.jpg'+"?random="+ new Date().getTime()+'),url(img/banner.jpg)',
232+
'background-size':'cover',
233+
'background-position-x':'0px',
234+
'background-position':'center',
235+
'background-attachment':'fixed'
236+
});
237+
}).fadeTo('slow', 1);
230238
}
231239
});
232240
});

students.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@
295295
<img src="img/painting.gif" class="hobby_image painting">
296296
</div>
297297
<div>
298-
<img src="img/hobbies.png" class="hobby_image hobbies">
298+
<img src="img/Hobbies.png" class="hobby_image hobbies">
299299
</div>
300300
</div>
301301
</div>

upload.php

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
{
1616
echo "<script>
1717
alert(\"Image Uploaded Sucessfully\");
18-
location.reload(true);
1918
</script>";
2019
}
2120
}

0 commit comments

Comments
 (0)