Skip to content

Commit edacdfa

Browse files
Fatimah ZulfiqarFatimah Zulfiqar
authored andcommitted
up
0 parents  commit edacdfa

File tree

454 files changed

+330667
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

454 files changed

+330667
-0
lines changed

XML/projects.xml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE Projects [
3+
<!ELEMENT Projects (Project*)>
4+
<!ELEMENT Project (pname,type,lang,dur,desc,team)>
5+
<!ELEMENT team (member+)>
6+
<!ELEMENT member (fname,uname)>
7+
<!ELEMENT fname (#PCDATA)>
8+
<!ELEMENT uname (#PCDATA)>
9+
<!ELEMENT pname (#PCDATA)>
10+
<!ELEMENT type (#PCDATA)>
11+
<!ELEMENT lang (#PCDATA)>
12+
<!ELEMENT dur (#PCDATA)>
13+
<!ELEMENT desc (#PCDATA)>
14+
<!ELEMENT team (#PCDATA)>
15+
<!ATTLIST team number CDATA #REQUIRED>
16+
]>
17+
<Projects>
18+
<Project>
19+
<pname>Facebook</pname>
20+
<type>Web Application</type>
21+
<lang>Python</lang>
22+
<dur>06/22/2020</dur>
23+
<desc>A Social Networking Website</desc>
24+
<team number="2">
25+
<member>
26+
<fname>Mark</fname>
27+
<uname>@zuck123</uname>
28+
</member>
29+
<member>
30+
<fname>Andrew</fname>
31+
<uname>@collum</uname>
32+
</member>
33+
</team>
34+
</Project>
35+
36+
<Project>
37+
<pname>Maria Kart</pname>
38+
<type>Game</type>
39+
<lang>C++</lang>
40+
<dur>03/18/2020</dur>
41+
<desc>A Racing Video Game</desc>
42+
<team number="3">
43+
<member>
44+
<fname>Shigeru</fname>
45+
<uname>@shiggy03</uname>
46+
</member>
47+
<member>
48+
<fname>Takashi</fname>
49+
<uname>@tezzz</uname>
50+
</member>
51+
<member>
52+
<fname>Iwata</fname>
53+
<uname>@iwatt</uname>
54+
</member>
55+
</team>
56+
</Project>
57+
</Projects>

XML/registeration.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE Registrations [
3+
<!ELEMENT Registrations (Registration*)>
4+
<!ELEMENT Registration (fname,lname,uname,email,psw,repeat-psw)>
5+
<!ELEMENT fname (#PCDATA)>
6+
<!ELEMENT lname (#PCDATA)>
7+
<!ELEMENT uname (#PCDATA)>
8+
<!ELEMENT email (#PCDATA)>
9+
<!ELEMENT psw (#PCDATA)>
10+
<!ELEMENT repeat-psw (#PCDATA)>
11+
<!ATTLIST uname id CDATA #REQUIRED>
12+
]>
13+
<Registrations>
14+
<Registration>
15+
<fname>Edward</fname>
16+
<lname>Snowden</lname>
17+
<uname id="1">@snowden404</uname>
18+
<email>[email protected]</email>
19+
<psw>*******</psw>
20+
<repeat-psw>*******</repeat-psw>
21+
</Registration>
22+
<Registration>
23+
<fname>Steve</fname>
24+
<lname>Jobs</lname>
25+
<uname id="2">@sjobs09</uname>
26+
<email>[email protected]</email>
27+
<psw>********</psw>
28+
<repeat-psw>********</repeat-psw>
29+
</Registration>
30+
</Registrations>

admin.php

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<!------Head----------->
4+
<?php
5+
session_start();
6+
include("config.php");
7+
8+
$result = mysqli_query($mysqli, "SELECT * from users");
9+
10+
?>
11+
<head>
12+
<title>Codether</title>
13+
<link href="css/icon2.png" rel="icon">
14+
<link href="css/style.css" rel="stylesheet" type="text/css">
15+
<meta content="width=device-width, initial-scale=1.0" name="viewport">
16+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
17+
<script>
18+
$(document).ready(function(){
19+
$("#search").on("keyup", function() {
20+
var value = $(this).val().toLowerCase();
21+
$("#data tr").filter(function() {
22+
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
23+
});
24+
});
25+
});
26+
</script>
27+
28+
<!------Style----------->
29+
<style>
30+
31+
32+
@media only screen and (max-width: 780px) {
33+
/* For mob: */
34+
.col-m-1 {width: 8.33%;}
35+
.col-m-2 {width: 16.66%;}
36+
.col-m-3 {width: 25%;}
37+
.col-m-4 {width: 33.33%;}
38+
.col-m-5 {width: 41.66%;}
39+
.col-m-6 {width: 50%;}
40+
.col-m-7 {width: 58.33%;}
41+
.col-m-8 {width: 66.66%;}
42+
.col-m-9 {width: 75%;}
43+
.col-m-10 {width: 83.33%;}
44+
.col-m-11 {width: 91.66%;}
45+
.col-m-12 {width: 100%;}
46+
47+
48+
#nac li{
49+
margin-left: 0;
50+
display: inline;
51+
font-size: 0.55em;
52+
}
53+
54+
}
55+
56+
57+
body{
58+
59+
background: rgb(88,24,69);
60+
background: radial-gradient(circle, rgba(88,24,69,1) 0%, rgba(199,0,57,1) 52%, rgba(88,24,69,1) 100%);
61+
}
62+
63+
input[type=text] {
64+
border-radius: 1em;
65+
width: 40%;
66+
padding: 0.9375em;
67+
margin-top: -2.7em;
68+
margin-right: 2em;
69+
display: inline-block;
70+
border: none;
71+
background: #f1f1f1;
72+
73+
font-family: exo;
74+
}
75+
76+
77+
.sidenav {
78+
height: 50%;
79+
width: 50%;
80+
padding: 0;
81+
position: relative;
82+
float: left;
83+
background: #161816;
84+
margin-bottom: 1em;
85+
border-radius: 10px;
86+
margin-left: 1em;
87+
box-shadow: 10px 10px 16px black;
88+
}
89+
90+
.sidenav a {
91+
92+
text-decoration: none;
93+
font-size: 1.4em;
94+
color: #818181;
95+
96+
}
97+
.sidenav ul {
98+
99+
list-style-type: none;
100+
display: block;
101+
}
102+
103+
.sidenav a:hover {
104+
color: #f1f1f1;
105+
}
106+
107+
img{
108+
border-radius: 10px;
109+
margin-bottom: 2em;
110+
box-shadow: 10px 10px 16px black;
111+
width: 50em;
112+
margin-left: 2em;
113+
}
114+
115+
</style>
116+
<!------Style----------->
117+
118+
</head>
119+
120+
<!------Body----------->
121+
<body>
122+
123+
<!------Header----------->
124+
<header>
125+
<div class="row">
126+
127+
<!------NavBar----------->
128+
<div class="navbar col-m-3 col-12">
129+
<div class="webname col-m-12 col-8">
130+
<h1>Codether</h1>
131+
</div>
132+
<input style="width:10%;font-size: 15px" type="submit" value="Home" onclick="document.location = 'index.php'">
133+
</div>
134+
</div>
135+
</header>
136+
<div id="nac" class="sidenav col-m-2 col-3">
137+
<ul>
138+
<li style="font-size: 24px">Registered Users</li><input style="float: right;" id="search" type="text" placeholder="Search">
139+
140+
141+
</ul>
142+
</div>
143+
<div style="width: 100%" class="sidenav col-m-12 col-12">
144+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
145+
<div ng-app="myApp" ng-controller="myCtrl">
146+
147+
<h1 style="margin-left: 1em; color: #C70039;">{{myHeader}}</h1>
148+
149+
</div>
150+
<table width='100%' border=1>
151+
152+
<tr >
153+
154+
<th>Username</th>
155+
<th>First Name</th>
156+
<th>Last Name</th>
157+
<th>Email</th>
158+
<th>Created At</th>
159+
160+
161+
</tr>
162+
<tbody id="data">
163+
<?php
164+
while($res = mysqli_fetch_array($result)) {
165+
echo "<tr>";
166+
echo "<td>".$res['uname']."</td>";
167+
echo "<td>".$res['fname']."</td>";
168+
echo "<td>".$res['lname']."</td>";
169+
echo "<td>".$res['email']."</td>";
170+
echo "<td>".$res['created_at']."<br>"."</td>";
171+
echo "<td><a href=\"edit.php?id=$res[uname]\">Edit</a> | <a href=\"delete.php?id=$res[uname]\" onClick=\"return confirm('Are you sure you want to delete?')\">Delete</a></td>";
172+
}
173+
$mysqli->close();
174+
?>
175+
</tbody>
176+
</table>
177+
178+
179+
</div>
180+
181+
182+
<script type="text/javascript">
183+
184+
var app = angular.module('myApp', []);
185+
app.controller('myCtrl', function($scope, $timeout) {
186+
$scope.myHeader = "Hello!";
187+
$timeout(function () {
188+
$scope.myHeader = "Welcome to Admin Portal";
189+
}, 2000);
190+
});
191+
</script>
192+
</script>
193+
194+
</body>
195+
</html>

auth.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
// Initialize the session
3+
session_start();
4+
5+
// Unset all of the session variables
6+
$_SESSION = array();
7+
8+
// Destroy the session.
9+
session_destroy();
10+
11+
// Redirect to login page
12+
header("location: signin.php");
13+
exit;
14+
?>

config.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
$databaseHost = 'localhost';
4+
$databaseName = 'codether';
5+
$databaseUsername = 'root';
6+
$databasePassword = '';
7+
$mysqli = mysqli_connect($databaseHost, $databaseUsername, $databasePassword, $databaseName);
8+
9+
?>

0 commit comments

Comments
 (0)