-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
executable file
·141 lines (133 loc) · 6.06 KB
/
home.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Do+Hyeon&display=swap" rel="stylesheet">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<title>Portfolio Creator</title>
<style>
*
{
padding:0px;
margin:0px;
box-sizing: border-box;
}
body
{
background-image:url(image/bghome.jpg);
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
.divider
{
border-color:rgb(226, 52, 52);
border-width: 10px;
margin-left:180px;
margin-right:180px;
}
.style
{
color:red;
font-family: 'Do Hyeon', sans-serif;
font-size: 50px;
align-items: center;
margin-top:150px;
}
.filter
{
background-color:rgba(92, 77, 66, 0.5);
position:absolute;
width:100%;
height:100%;
}
.portfolio
{
margin-bottom:-100px;
color:white;
font-family: 'Do Hyeon', sans-serif;
font-family: 'Hammersmith One', sans-serif;
font-family: 'Russo One', sans-serif;
font-family: 'Sansita Swashed', cursive;
}
.btn
{
background-color: orange;
border: 0px;
margin-left:20px;
}
.btn:hover
{
opacity:0.5;
}
</style>
</head>
<body>
<div class="filter">
<div class="container h-100">
<div class="row h-100 align-items-center justify-content-center text-center">
<div class="col-lg-10 align-self-end portfolio">
<h1 class="text-uppercase font-weight-bold">Portfolio Creator</h1>
<hr class="divider">
</div>
<div class="col-lg-8 align-self-baseline">
<p class="text-white-75 font-weight-light mb-5 style">
Come! Both of us will make your portfolio more smarter.
</p>
<?php
$host="localhost";
$user="root";
$password="";
$db="User";
$check=mysqli_connect($host,$user,$password,$db);
if(!$check)
{
die(mysqli_connect_error());
}
session_start();
if(!isset($_SESSION['login_status']))
{
echo '<a class="btn btn-xl js-scroll-trigger" href="portfoliosignup.php">Sign up</a>';
echo '<a class="btn btn-xl js-scroll-trigger" href="portfoliosignin.php">Sign in</a>';
}else if($_SESSION['email']=="[email protected]"&&$_SESSION['password']=='admin1'&&isset($_SESSION['login_status']))
{
$_SESSION['email'];
$_SESSION['password'];
$id="SELECT * FROM User" ;
$result=mysqli_query($check,$id);
echo " <table border='2px' bordercolor='red' style='font-size:20px;margin-left:-50px;'><tr style='color:green;'><th>Email</th><th>School</th><th>10th %</th><th>12th %</th><th>University</th><th>Graduation Course</th><th>HTML</th><th>CSS</th><th>JAVA</th><th>BOOTSTRAP</th><th>C</th></tr> ";
while($row = $result->fetch_array(MYSQLI_ASSOC))
{
echo "<tr style='color:white;'><td>" . $row["First Name"]. " " . $row["Last Name"]. "</td><td>".$row["Email"]."</td><td>".$row["School"]."</td><td>".$row['10th %']."</td><td>".$row['12th %']."</td><td>".$row['University']."</td><td>".$row['Graduation Course']."</td><td>".$row['html']."</td><td>".$row['css']."</td><td>".$row['java']."</td><td>".$row['bootstrap']."</td><td>".$row['c']."</td></tr>";
}
echo "</table><br>";
echo '<a href="logout.php"><button class="btn my-2 my-sm-0 styling" name="logout">Logout</button></a>';
}else
{
$email=$_SESSION['email'];
$id="SELECT * FROM User WHERE Email='$email'";
$result=mysqli_query($check,$id);
$passans=$result->fetch_array(MYSQLI_ASSOC);
$firstname=$passans['First Name'];
$lastname=$passans['Last Name'];
echo "<p style='color:blue;font-size:40px;'>Welcome ".$firstname." ".$lastname."<br>"."<br>"."</p>";
echo '<a class="btn btn-xl js-scroll-trigger" href="UserPortfolio.php">Profile</a>';
echo '<a href="logout.php"><button class="btn my-2 my-sm-0 styling" name="logout">Logout</button></a>';
echo '<a class="btn btn-xl js-scroll-trigger" href="ModifyPortfolio.php">Modify</a>';
echo '<a class="btn btn-xl js-scroll-trigger" href="Remove.php">Delete</a>';
}
?>
</div>
</div>
</div>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: jQuery and Bootstrap Bundle (includes Popper) -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
</div>
</body>
</html>