├── public
├── images
│ ├── qr.jpg
│ ├── bck1.jpeg
│ ├── logo.png
│ ├── main.jpg
│ ├── developer1.jpg
│ ├── developer2.jpg
│ └── developer3.jpg
└── js
│ ├── index.js
│ └── script.js
├── scratch
└── users
├── models
├── RegisterModel.js
├── Registration.js
└── events.js
├── package.json
├── views
├── adminViewRegistrations.ejs
├── updateEvent.ejs
├── adminViewEvents.ejs
├── signup.ejs
├── login.ejs
├── details.ejs
├── events.ejs
├── contact.ejs
├── about.ejs
└── index.ejs
├── .gitignore
├── README.md
├── newevent.html
├── adminDashboard.html
└── index.js
/public/images/qr.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harinadh76/Khel-Sethu/HEAD/public/images/qr.jpg
--------------------------------------------------------------------------------
/public/images/bck1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harinadh76/Khel-Sethu/HEAD/public/images/bck1.jpeg
--------------------------------------------------------------------------------
/public/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harinadh76/Khel-Sethu/HEAD/public/images/logo.png
--------------------------------------------------------------------------------
/public/images/main.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harinadh76/Khel-Sethu/HEAD/public/images/main.jpg
--------------------------------------------------------------------------------
/public/images/developer1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harinadh76/Khel-Sethu/HEAD/public/images/developer1.jpg
--------------------------------------------------------------------------------
/public/images/developer2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harinadh76/Khel-Sethu/HEAD/public/images/developer2.jpg
--------------------------------------------------------------------------------
/public/images/developer3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harinadh76/Khel-Sethu/HEAD/public/images/developer3.jpg
--------------------------------------------------------------------------------
/scratch/users:
--------------------------------------------------------------------------------
1 | {"_id":"641d08058a5bf37ccca211ad","username":"tester","email":"tester@gmail.com","password":"qawsedrf","__v":0}
--------------------------------------------------------------------------------
/models/RegisterModel.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const Schema = mongoose.Schema;
3 |
4 | const RegisterSchema = new Schema({
5 | username:{
6 | type:String,
7 | required:true
8 | },
9 | email:{
10 | type: String,
11 | required: true
12 | },
13 | password:{
14 | type: String,
15 | required: true
16 | }
17 | });
18 |
19 | module.exports = mongoose.model('RegisterModel', RegisterSchema);
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "neweventmanagement",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "body-parser": "^1.20.2",
14 | "dotenv": "^16.0.3",
15 | "ejs": "^3.1.9",
16 | "express": "^4.18.2",
17 | "mongoose": "^6.0.2",
18 | "node-localstorage": "^2.2.1"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/public/js/index.js:
--------------------------------------------------------------------------------
1 | let menu=document.querySelector('.menu-icon');
2 | let navbar=document.querySelector('.navbar');
3 |
4 | menu.onclick =() =>
5 | {
6 | navbar.classList.toggle("open-menu")
7 | menu.classList.toggle("move")
8 | }
9 | window.onscroll=()=>
10 | {
11 | navbar.classList.remove("open-menu");
12 | menu.classList.toggle("move");
13 | }
14 |
15 | let header=document.querySelector("header")
16 |
17 | window.addEventListener("scroll",()=>
18 | {
19 | header.classList.toggle("header-active",window.scrollY>0)
20 | });
21 |
22 | let scrolltop=document.querySelector(".scroll-top")
23 |
24 | window.addEventListener("scroll",()=>
25 | {
26 | scrolltop.classList.toggle("scroll-active",window.scrollY>=500)
27 | });
28 |
29 |
--------------------------------------------------------------------------------
/models/Registration.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose')
2 |
3 | const eventRegistration = new mongoose.Schema({
4 | name:{
5 | type:String,
6 | required:true
7 | },
8 | email:{
9 | type:String,
10 | required:true
11 | },
12 | phnumber:{
13 | type:Number,
14 | required:true
15 | },
16 | year:{
17 | type:String,
18 | required:true
19 | },
20 | event:{
21 | type:String,
22 | required:true
23 | },
24 | amount:{
25 | type:Number,
26 | required:true
27 | },
28 | transactionid:{
29 | type:String,
30 | required:true
31 | }
32 | })
33 |
34 | module.exports = mongoose.model('eventRegistration', eventRegistration);
--------------------------------------------------------------------------------
/models/events.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 | const Schema = mongoose.Schema;
3 |
4 | const eventSchema = new Schema({
5 | name:{
6 | type: String,
7 | required: true
8 | },
9 | description:{
10 | type: String,
11 | required: true
12 | },
13 | photo:{
14 | type: String,
15 | required: true
16 | },
17 | time:{
18 | type: String,
19 | required: true
20 | },
21 | mode:{
22 | type: String,
23 | required: true
24 | },
25 | dateStart:{
26 | type: Date,
27 | required: true
28 | },
29 | dateEnd:{
30 | type: Date,
31 | required: true
32 | },
33 | venue:{
34 | type: String,
35 | required: true
36 | },
37 | category:{
38 | type: String,
39 | required: true
40 | },
41 | registerationFee:{
42 | type: String,
43 | required: true
44 | },
45 | cashPrice:{
46 | type: Number,
47 | required: true
48 | },
49 | contact:{
50 | type: String,
51 | required: true
52 | }
53 |
54 | });
55 |
56 | module.exports = mongoose.model('Event', eventSchema);
--------------------------------------------------------------------------------
/public/js/script.js:
--------------------------------------------------------------------------------
1 | function validate()
2 | {
3 | let name=document.querySelector(".name");
4 | let email=document.querySelector(".email");
5 | let message=document.querySelector(".message");
6 | let sendbtn=document.querySelector(".send-btn");
7 |
8 | sendbtn.addEventListener("click",(e)=>
9 | {
10 | e.preventDefault();
11 | if (name.value == "" || email.value == "" || message.value == "")
12 | {
13 | emptyerror();
14 | }
15 | else
16 | {
17 | sendmail (name.value,email.value,message.value);
18 | success();
19 | document.querySelector(".contact-form").reset();
20 | }
21 | });
22 | }
23 | validate();
24 |
25 | function sendmail(name,email,message)
26 | {
27 | emailjs.send("service_x7jrshc","template_5kttzqp",{
28 | from_name: name,
29 | email_id: email,
30 | message: message,
31 | });
32 | }
33 |
34 | function emptyerror()
35 | {
36 | swal({
37 | title: "oh no....",
38 | text: "Fields cannot be empty",
39 | icon: "error",
40 | });
41 | }
42 |
43 | function success()
44 | {
45 | swal({
46 | title: "Email sent successfully",
47 | text: "We try to reply in 24 hours",
48 | icon: "success",
49 | });
50 | }
--------------------------------------------------------------------------------
/views/adminViewRegistrations.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
9 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | | Name |
42 | Email |
43 | Phone Number |
44 | Year |
45 | Event |
46 | Amount |
47 | Transaction ID |
48 |
49 | <% for(var i=0;i
50 |
51 | | <%= event[i].name%> |
52 | <%= event[i].email%> |
53 | <%= event[i].phnumber%> |
54 | <%= event[i].year%> |
55 | <%= event[i].event%> |
56 | <%= event[i].amount%> |
57 | <%= event[i].transactionid%> |
58 |
59 | <% } %>
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 | .pnpm-debug.log*
9 |
10 | # Diagnostic reports (https://nodejs.org/api/report.html)
11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12 |
13 | # Runtime data
14 | pids
15 | *.pid
16 | *.seed
17 | *.pid.lock
18 |
19 | # Directory for instrumented libs generated by jscoverage/JSCover
20 | lib-cov
21 |
22 | # Coverage directory used by tools like istanbul
23 | coverage
24 | *.lcov
25 |
26 | # nyc test coverage
27 | .nyc_output
28 |
29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30 | .grunt
31 |
32 | # Bower dependency directory (https://bower.io/)
33 | bower_components
34 |
35 | # node-waf configuration
36 | .lock-wscript
37 |
38 | # Compiled binary addons (https://nodejs.org/api/addons.html)
39 | build/Release
40 |
41 | # Dependency directories
42 | node_modules/
43 | jspm_packages/
44 |
45 | # Snowpack dependency directory (https://snowpack.dev/)
46 | web_modules/
47 |
48 | # TypeScript cache
49 | *.tsbuildinfo
50 |
51 | # Optional npm cache directory
52 | .npm
53 |
54 | # Optional eslint cache
55 | .eslintcache
56 |
57 | # Optional stylelint cache
58 | .stylelintcache
59 |
60 | # Microbundle cache
61 | .rpt2_cache/
62 | .rts2_cache_cjs/
63 | .rts2_cache_es/
64 | .rts2_cache_umd/
65 |
66 | # Optional REPL history
67 | .node_repl_history
68 |
69 | # Output of 'npm pack'
70 | *.tgz
71 |
72 | # Yarn Integrity file
73 | .yarn-integrity
74 |
75 | # dotenv environment variable files
76 | .env
77 | .env.development.local
78 | .env.test.local
79 | .env.production.local
80 | .env.local
81 |
82 | # parcel-bundler cache (https://parceljs.org/)
83 | .cache
84 | .parcel-cache
85 |
86 | # Next.js build output
87 | .next
88 | out
89 |
90 | # Nuxt.js build / generate output
91 | .nuxt
92 | dist
93 |
94 | # Gatsby files
95 | .cache/
96 | # Comment in the public line in if your project uses Gatsby and not Next.js
97 | # https://nextjs.org/blog/next-9-1#public-directory-support
98 | # public
99 |
100 | # vuepress build output
101 | .vuepress/dist
102 |
103 | # vuepress v2.x temp and cache directory
104 | .temp
105 | .cache
106 |
107 | # Docusaurus cache and generated files
108 | .docusaurus
109 |
110 | # Serverless directories
111 | .serverless/
112 |
113 | # FuseBox cache
114 | .fusebox/
115 |
116 | # DynamoDB Local files
117 | .dynamodb/
118 |
119 | # TernJS port file
120 | .tern-port
121 |
122 | # Stores VSCode versions used for testing VSCode extensions
123 | .vscode-test
124 |
125 | # yarn v2
126 | .yarn/cache
127 | .yarn/unplugged
128 | .yarn/build-state.yml
129 | .yarn/install-state.gz
130 | .pnp.*
--------------------------------------------------------------------------------
/views/updateEvent.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Document
8 |
13 |
19 |
20 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
Update Events
58 |
59 |
60 |
61 |
62 |
63 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # KHEL SETHU
3 |
4 | Khel Sethu project is designed to help organize and manage sports events smoothly. It provides a platform for event organizers to handle various tasks involved in planning and executing a sports event.
5 |
6 | With this project, event organizers can easily create event schedules, manage participant registrations and payment processes. The application allows them to keep track of all the important information related to the event, such as venue details, event rules, and participant data.
7 |
8 | Participants and spectators can also benefit from the project. Participants can register for the event online,and receive updates about the event.
9 |
10 | The project simplifies the management of sports events by providing a centralized platform where all the necessary information and operations can be handled. It reduces manual work, streamlines processes, and improves efficiency. Whether it's a small local tournament or a large-scale sporting event, the sports event management project aims to make the entire experience smoother and more enjoyable for everyone involved.
11 |
12 |
13 | ## Deployment Link
14 |
15 | [View Deployment](https://khelsethu1.onrender.com)
16 |
17 |
18 |
19 |
20 |
21 |
22 | ## Installation
23 |
24 | Run Project
25 |
26 | ```bash
27 | git clone https://github.com/harinadh76/Khel-Sethu.git
28 | ```
29 | ```bash
30 | npm install
31 | ```
32 | ```bash
33 | nodemon index
34 | ```
35 |
36 | ## Our Team
37 |
38 | - [Harinadh](https://www.github.com/harinadh76)
39 | - [Prem Kumar](https://github.com/Prempk29)
40 | - [Vani](https://github.com/R-Sree-Vani)
41 |
42 |
43 | ## Project Images
44 |
45 | Home Page
46 |
47 | 
48 |
49 | Events Dashboard
50 |
51 | 
52 |
53 | User Registering for an Event
54 |
55 | 
56 |
57 | Admin Panel (All CRUD Operations)
58 | 
59 |
60 |
61 |
62 |
63 | ## To Access Admin Panel
64 |
65 | - Admin Mail Id
66 | ```bash
67 | admin@gmail.com
68 | ```
69 | - Admin Password
70 | ```bash
71 | admin
72 | ```
73 |
74 |
75 |
76 | ## 💻 Tech Stack:
77 |        
78 |
79 | ## 🔗 Our Profiles
80 |
81 | Harinadh
82 |
83 | [](https://www.linkedin.com/in/harinadh-tanna-45b392211/)
84 |
85 | Prem Kumar
86 |
87 | [](https://www.linkedin.com/in/prem-kumar-naidu-tadi-b47179237)
88 |
89 | Vani
90 |
91 | [](https://www.linkedin.com/in/sree-vani-ramisetti-7b0579208)
92 |
93 | ## License
94 |
95 | [MIT](https://choosealicense.com/licenses/mit/)
96 |
97 |
98 | ## Contributing
99 |
100 | Contributions are always welcome!
101 |
102 | See `contributing.md` for ways to get started.
103 |
104 | Please adhere to this project's `code of conduct`.
105 |
106 |
--------------------------------------------------------------------------------
/views/adminViewEvents.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Updated events
9 |
11 |
14 |
15 |
96 |
97 |
98 |
99 |
100 |
101 |
102 | <% for(var i=0;i
103 |
104 |

105 |
106 |
107 |
Name:<%= event[i].name %>
108 |
Description:<%= event[i].description %>
109 |
Time:<%= event[i].time %>
110 |
Mode:<%= event[i].mode %>
111 |
DateStarted:<%= event[i].dateStart %>
112 |
DateEnd:<%= event[i].dateEnd %>
113 |
Category:<%= event[i].category %>
114 |
RegisterationFee:<%= event[i].registerationFee %>
115 |
Cashprize:<%= event[i].cashPrice %>
116 |
Contact No:<%= event[i].contact %>
117 |
118 |
119 |
120 |
121 |
124 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 | <% } %>
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/newevent.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Create-Event
8 |
11 |
13 |
14 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
44 |
45 |
ADD AN EVENT
46 |
47 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/adminDashboard.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | AdminBoard
10 |
154 |
155 |
156 |
157 |
158 |
Welcome To Admin Board
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | const express = require("express");
2 | require('dotenv').config({path: __dirname + '/.env'})
3 | const mongoose = require("mongoose");
4 | const bodyParser = require("body-parser");
5 | const eventModule = require("./models/events");
6 | const RegisterModule = require("./models/RegisterModel");
7 | const LocalStorage = require('node-localstorage').LocalStorage
8 | localStorage = new LocalStorage('./scratch')
9 | const { json } = require('body-parser')
10 | const eventRegistration = require('./models/Registration')
11 |
12 |
13 | const app = express();
14 | app.use(bodyParser.json());
15 | app.use(bodyParser.urlencoded({ extended: true }));
16 | app.set("view engine", "ejs");
17 | app.use(express.static("public"));
18 |
19 | mongoose.set("strictQuery", false);
20 | mongoose
21 | .connect(
22 | process.env.MONGODB,
23 | { useNewUrlParser: true, useUnifiedTopology: true }
24 | )
25 | .then(console.log("MongoDB Connected..."))
26 | .catch((err) => console.log(err));
27 |
28 | app.use(express.json());
29 |
30 |
31 |
32 | // 1. Rendering Files
33 | app.get("/details", (req, res) => {
34 | res.render('details')
35 | });
36 |
37 |
38 |
39 |
40 |
41 | app.get("/", (req, res) => {
42 | eventModule.find({}).then((data) => {
43 | res.render("index", { event: data });
44 | })
45 | });
46 | app.get("/loginUser", (req, res) => {
47 | res.render('login')
48 | });
49 | app.get("/registerUser", (req, res) => {
50 | res.render('signup')
51 | });
52 | app.get("/contactUs", (req, res) => {
53 | res.render('contact')
54 | })
55 | app.get("/about", (req, res) => {
56 | res.render('about')
57 | })
58 | app.get("/checkevents", (req, res) => {
59 | eventModule.find({}).then((data) => {
60 | res.render("events", { event: data });
61 | })
62 |
63 | })
64 | app.get("/logout", (req, res) => {
65 | localStorage.clear()
66 | res.redirect('/')
67 | })
68 |
69 |
70 |
71 |
72 | //admindashboard
73 | app.get("/admindashboard", (req, res) => {
74 | res.sendFile(__dirname + "/adminDashboard.html");
75 | })
76 | //admin module files
77 | app.get("/addEvent", async (req, res) => {
78 | res.sendFile(__dirname + "/newevent.html");
79 | })
80 | // admin updating part
81 | app.post("/updateEvent/:id", async (req, res) => {
82 |
83 | try {
84 | eventModule.findById(req.params.id).then((data) => {
85 | console.log(data);
86 | res.render('updateEvent', { data: data })
87 | })
88 | } catch (err) {
89 | res.json({ message: err });
90 | }
91 | })
92 | app.get("/viewevents", (req, res) => {
93 | eventModule.find({}).then((data) => {
94 | res.render("adminViewEvents", { event: data });
95 | })
96 | })
97 |
98 | //2. CRUD OPERATIONS
99 |
100 | //create
101 | app.post("/create", async (req, res) => {
102 | console.log(req.body);
103 | const event = new eventModule({
104 | name: req.body.name,
105 | description: req.body.description,
106 | photo: req.body.photo,
107 | time: req.body.time,
108 | mode: req.body.mode,
109 | dateStart: req.body.dateStart,
110 | dateEnd: req.body.dateEnd,
111 | venue: req.body.venue,
112 | category: req.body.category,
113 | registerationFee: req.body.registerationFee,
114 | cashPrice: req.body.cashPrice,
115 | contact: req.body.contact
116 | });
117 |
118 | try {
119 | await event.save();
120 | res.redirect("/viewevents");
121 | } catch (err) {
122 | res.json({ message: err });
123 | }
124 | });
125 |
126 | //show all events for clients
127 |
128 | app.get("/showAllEvents", async (req, res) => {
129 | try {
130 | const events = await eventModule.find();
131 | // res.json({ events });
132 |
133 |
134 | eventModule.find({}).then((data) => {
135 | res.render("showevent", { event: data });
136 | })
137 | } catch (err) {
138 | res.json({ message: err });
139 | }
140 | });
141 |
142 |
143 | app.get("/fetchdetails/:id",function(req,res){
144 | try{
145 | eventModule.findById(req.params.id).then((data)=>{
146 | res.render("details",{event:data})
147 | })
148 | }
149 | catch(err){
150 | res.json({ message: err });
151 | }
152 |
153 |
154 | });
155 |
156 | //read
157 | app.get("/events/:eventId", async (req, res) => {
158 | try {
159 | const event = await eventModule.findById(req.params.eventId);
160 | // res.json({ event });
161 | res.render("details")
162 | } catch (err) {
163 | res.json({ message: err });
164 | }
165 | });
166 |
167 | //update
168 | app.post("/events/:eventId", async (req, res) => {
169 | const {
170 | name,
171 | description,
172 | photo,
173 | time,
174 | mode,
175 | dateStart,
176 | dateEnd,
177 | venue,
178 | category,
179 | registerationFee,
180 | cashPrice,
181 | contact
182 | } = req.body;
183 | try {
184 | const updatedEvent = await eventModule.findByIdAndUpdate(
185 | req.params.eventId,
186 | {
187 | name,
188 | description,
189 | photo,
190 | time,
191 | mode,
192 | dateStart,
193 | dateEnd,
194 | venue,
195 | category,
196 | registerationFee,
197 | cashPrice,
198 | contact
199 | }
200 | );
201 |
202 | if (!updatedEvent) {
203 | res.json({ message: "Event not found" });
204 | }
205 |
206 | updatedEvent = await updatedEvent.save();
207 | res.redirect("/viewevents");
208 | } catch (err) {
209 | res.redirect("/viewevents");
210 | }
211 | });
212 |
213 | //delete
214 | app.post("/deleteEvents/:eventId", async (req, res) => {
215 | try {
216 | const removedEvent = await eventModule.findByIdAndRemove(
217 | req.params.eventId
218 | );
219 | res.redirect("/viewevents")
220 | } catch (err) {
221 | res.json({ message: err });
222 | }
223 | });
224 |
225 | // User Registering for an event + Payments
226 |
227 | app.post("/testing", async(req,res)=>{
228 | const register = new eventRegistration({
229 | name:req.body.name,
230 | email:req.body.email,
231 | phnumber:req.body.mobile,
232 | year:req.body.yos,
233 | event:req.body.events,
234 | amount:req.body.amount,
235 | transactionid:req.body.transactionid
236 | })
237 |
238 | try{
239 | await register.save();
240 | res.redirect("/checkevents")
241 |
242 | }
243 | catch(err){
244 | console.log(err);
245 | }
246 | })
247 |
248 | // admin view for viewing student Registrations...
249 | app.get("/viewRegistrations", async(req,res)=>{
250 | try{
251 | eventRegistration.find({}).then((data) =>{
252 | console.log(data);
253 | res.render("adminViewRegistrations", {event: data});
254 | })
255 | }catch(err){
256 | console.log(err);
257 | }
258 | })
259 |
260 |
261 | // 3.Logins and Register
262 |
263 | //Login route started
264 |
265 | app.post("/login", function (req, res) {
266 | const email = req.body.email;
267 | const password = req.body.password;
268 | if (email == process.env.ADMINUSER && password == process.env.ADMINPASSWORD) {
269 |
270 | res.redirect("/admindashboard")
271 | }
272 | else{
273 | RegisterModule.findOne({ email: email })
274 | .then((data) => {
275 | if (data == null) {
276 | res.redirect("/registerUser")
277 | }
278 | else if (data.password != password) {
279 | res.write("")
280 | }
281 | else {
282 | localStorage.setItem("users", JSON.stringify(data))
283 | res.redirect("/");
284 | }
285 | })
286 | .catch((err) => {
287 | console.log(err);
288 | });
289 | }
290 |
291 | });
292 | //login route completed
293 |
294 | //Register route
295 | app.post("/register", function (req, res) {
296 | const username = req.body.username;
297 | const email = req.body.email;
298 | const password = req.body.password;
299 | const user = new RegisterModule({
300 | username: username,
301 | email: email,
302 | password: password
303 | })
304 | RegisterModule.findOne({ email: email }, function (err, data) {
305 | if (err) {
306 | console.log(err)
307 | }
308 | else if (data) {
309 | res.redirect("/loginUser")
310 | }
311 | else {
312 | user.save()
313 | res.redirect("/loginUser")
314 | }
315 | })
316 |
317 | })
318 | //register route completed
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 | //server starting
331 | app.listen(3000, () => {
332 | console.log("Server is running");
333 | });
334 |
--------------------------------------------------------------------------------
/views/signup.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Khel Sethu
8 |
9 |
10 |
11 |
264 |
265 |
266 |
267 |
268 |
287 |
288 |
289 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
--------------------------------------------------------------------------------
/views/login.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Khel sethu-Login
8 |
9 |
10 |
11 |
264 |
265 |
266 |
267 |
268 |
290 |
291 |
292 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
--------------------------------------------------------------------------------
/views/details.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Khel Sethu-Events
8 |
9 |
10 |
13 |
15 |
16 |
349 |
350 |
351 |
352 |
353 |
354 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |

398 |
399 |
400 | Date: <%=event.dateStart.toLocaleDateString()%>
401 | Name: <%=event.name%>
402 | Time: <%=event.time%>
403 | Mode: <%=event.mode%>
404 | Venue: <%=event.venue%>
405 | Registration Fee: <%=event.registerationFee%>
406 | Cash Prize: <%=event.cashPrice%>
407 | Cash Prize: <%=event.contact%>
408 |
409 |
410 |
411 |
412 |
442 |
443 |
444 |
445 |
446 |
447 |
--------------------------------------------------------------------------------
/views/events.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Khel Sethu-Events
8 |
9 |
10 |
12 |
18 |
19 |
393 |
394 |
395 |
396 |
397 |
398 |
434 |
435 |
436 |
437 |
438 |
439 |
440 | Come and grab the opportunity to prove yourselves. Check out all the ongoing and upcomming events here.
441 |
442 | <% for(var i=0;i
443 |
444 |

445 |
446 | Name: <%= event[i].name %>
447 |
448 |
Date:<%= event[i].dateStart.toLocaleDateString() %>
449 | <% if(Currentuser!=null) { %>
450 |
451 |
454 |
455 | <% } %> <% if(Currentuser==null) { %>
456 |
457 |
460 |
461 | <% } %>
462 |
463 |
464 |
465 |
466 |
Rs. <%= event[i].registerationFee %>
467 |
468 |
469 | <% } %>
470 |
471 |
472 |
473 |
474 |
475 |
476 |
490 |
491 |
494 |
495 |
496 |
497 |
498 |
--------------------------------------------------------------------------------
/views/contact.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Khel Sethu-Contact
8 |
9 |
10 |
11 |
12 |
15 |
16 |
321 |
322 |
323 |
324 |
408 |
409 |
410 |
--------------------------------------------------------------------------------
/views/about.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Khel sethu
7 |
13 |
14 |
15 |
16 |
17 |
23 |
391 |
392 |
393 |
394 |
395 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
Meet Our Individuals
439 |
440 |
441 |
442 |
443 |
444 |
445 |

446 |
447 |
454 |
455 |
Prem Kumar Naidu Tadi
456 | Full Stack Developer
457 |
458 |
459 |
460 |
461 |
462 |
463 |

464 |
465 |
472 |
473 |
Harinadh Tanna
474 | Full Stack Developer
475 |
476 |
477 |
478 |
479 |
480 |
481 |

482 |
483 |
490 |
491 |
Sree Vani Ramisetti
492 | Full Stack Developer
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
514 |
515 |
516 |
521 |
522 |
523 |
--------------------------------------------------------------------------------
/views/index.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Khel Sethu
8 |
9 |
13 |
19 |
24 |
30 |
31 |
546 |
547 |
548 |
549 |
550 |
551 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
Come. Challenge. Win.
595 | <% if(Currentuser==null) { %>
596 |
597 | Login to continue. Don't have an
598 | account? Signup.
599 |
600 | <% } %>
601 |
602 | <% if(Currentuser!=null) { %>
603 |
Be Better Than Yourself
604 | <%}%>
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 | Khel Sethu bridges the gap between the players and the actual ground.
614 |
615 |
616 |
617 |
618 |
It provides all the ongoing and upcomming sports events.
619 |
620 |
621 |
622 |
623 |
It is dynamic and provides time-to-time update about the events.
624 |
625 |
626 |
627 |
628 |
Players can find it useful and can directly register here.
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 | Come and grab the opportunity to prove yourselves. Check out all the
637 | ongoing and upcomming events here.
638 |
639 |
640 | <% for(var i=0;i<3;i++) {%>
641 |
642 |

643 |
644 | Date: <%=event[i].dateStart.toLocaleDateString()%>
645 |
<%=event[i].name%>
646 | <% if(Currentuser!=null) { %>
647 |
648 |
651 |
652 | <% } %> <% if(Currentuser==null) { %>
653 |
654 |
657 |
658 | <% } %>
659 |
660 |
Rs. <%=event[i].registerationFee %>
661 |
662 | <%} %>
663 |
664 |
665 |
666 |
671 |
672 |
673 |
674 |
675 |
676 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
--------------------------------------------------------------------------------