-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
5b41863
commit 74ee644
Showing
74 changed files
with
3,801 additions
and
741 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,3 @@ | ||
# Web-Project | ||
# This a website for Code Quotient (clone) | ||
# It is basically a company management system with different options for Admins, Users, Community builders and others |
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 |
---|---|---|
@@ -1,32 +1,21 @@ | ||
{ | ||
"name": "code-quotient", | ||
"name": "linkedin", | ||
"version": "1.0.0", | ||
"description": "web project website building of code quotient", | ||
"main": "server.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "node server.js" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"ejs": "^2.6.1", | ||
"express": "^4.17.1", | ||
"express-session": "^1.16.1", | ||
"mongoose": "^5.5.12", | ||
"express-session": "^1.16.2", | ||
"multer": "^1.4.1", | ||
"node.js": "^0.0.0", | ||
"nodemailer": "^6.2.1", | ||
"passport": "^0.4.0", | ||
"passport-github": "^1.1.0" | ||
}, | ||
"devDependencies": {}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "node server.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/nitin-1926/CodeQuotient-Project.git" | ||
}, | ||
"author": "Nitin Gupta", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/nitin-1926/CodeQuotient-Project/issues" | ||
}, | ||
"homepage": "https://github.com/nitin-1926/CodeQuotient-Project#readme" | ||
"description": "" | ||
} |
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,89 @@ | ||
|
||
var data; | ||
|
||
function showOwner() | ||
{ | ||
$('.active-link-btn').removeClass('active-link-btn'); | ||
$('#admins-list-btn').addClass('active-link-btn'); | ||
$('.comUsersList').hide() | ||
$('.OwnerDivMain').show() | ||
} | ||
|
||
function showMembers() | ||
{ | ||
$('.active-link-btn').removeClass('active-link-btn'); | ||
$('#users-list-btn').addClass('active-link-btn'); | ||
$('.OwnerDivMain').hide() | ||
$('.comUsersList').show() | ||
} | ||
|
||
window.onload = function() | ||
{ | ||
$('.comUsersList').hide() | ||
var id = $('#id').html(); | ||
var obj = Object(); | ||
obj._id = id; | ||
console.log(id); | ||
var request = new XMLHttpRequest() | ||
request.open('POST','/get') | ||
request.setRequestHeader("Content-Type","application/json"); | ||
request.send(JSON.stringify(obj)); | ||
request.onload = function() | ||
{ | ||
data = JSON.parse(request.responseText); | ||
console.log(data); | ||
addtoDOM1(); | ||
addtoDOM2(); | ||
} | ||
} | ||
|
||
function addtoDOM1() | ||
{ | ||
let div = '<div class="col-sm-12 community-user-div" style="margin-top: 5px">' | ||
+'<div class="col-sm-3" style="padding:5px;">' | ||
+'<a href="/viewprofile/'+data.communityownerid._id+'">' | ||
+'<img src="'+data.communityownerid.photoname+'" class="community-member-pic">' | ||
+'</a>' | ||
+'<span class="label label-primary">Owner</span>' | ||
+'</div>' | ||
+'<div class="col-sm-9 scrollable">' | ||
+'<a class="comusername" href="/viewprofile/'+data.communityownerid._id+'">'+data.communityownerid.name+'</a>' | ||
+'</div>' | ||
+'</div>' | ||
$('.OwnerDivMain').append(div); | ||
for(let i=0;i<data.communitymanager.length;i++) | ||
{ | ||
let div = '<div class="col-sm-12 community-user-div" style="margin-top: 5px">' | ||
+'<div class="col-sm-3" style="padding:5px;">' | ||
+'<a href="/viewprofile/'+data.communitymanager[i]._id+'">' | ||
+'<img src="'+data.communitymanager[i].photoname+'" class="community-member-pic">' | ||
+'</a>' | ||
+'<span class="label label-primary">Admin</span>' | ||
+'</div>' | ||
+'<div class="col-sm-9 scrollable">' | ||
+'<a class="comusername" href="/viewprofile/'+data.communitymanager[i]._id+'">'+data.communitymanager[i].name+'</a>' | ||
+'</div>' | ||
+'</div>' | ||
$('.OwnerDivMain').append(div); | ||
} | ||
} | ||
|
||
function addtoDOM2() | ||
{ | ||
for(let i=0;i<data.communitymember.length;i++) | ||
{ | ||
// console.log("hello"); | ||
let div = '<div class="col-sm-12 community-user-div" style="margin-top: 5px">' | ||
+'<div class="col-sm-3" style="padding:5px;">' | ||
+'<a href="/viewprofile/'+data.communitymember[i]._id+'">' | ||
+'<img src="'+data.communitymember[i].photoname+'" class="community-member-pic">' | ||
+'</a>' | ||
+'</div>' | ||
+'<div class="col-sm-9 scrollable">' | ||
+'<a class="comusername" href="/viewprofile/'+data.communitymember[i]._id+'">'+data.communitymember[i].name+'</a>' | ||
+'</div>' | ||
+'</div>' | ||
|
||
$('.comUsersList').append(div); | ||
} | ||
} |
Oops, something went wrong.