-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwelcome.php
101 lines (79 loc) · 2.79 KB
/
welcome.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
<?php
session_start();
if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] != true) {
header("location:/cwh/login.php");
exit;
}
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<title>Welcome <?php echo $_SESSION["uname"] ?></title>
<link href="rps\style.css" rel="stylesheet" type="text/css" />
<style>
.card{
background-color: #314a63;
}
.center {
margin: 0 auto;
width: 100%;
}
.mt{
margin-top: 20px;
}
.card-img-top {
width: 100%;
height: 20vw;
object-fit: cover;
}
</style>
</head>
<?php require 'partials\_nav_welcome.php'; ?>
<header>
<h1> Welcome <?php echo $_SESSION["uname"]; echo'' ; ?> </h1>
</header>
<?php
if (isset($_GET["alert"])) {
if ($_GET["alert"] == "success") {
echo '<div class="alert alert-success alert-dismissible fade show" role="alert">
<strong>Success!</strong> Excellent, ' . $_SESSION["uname"] . ' You are now logged in!
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
}
?>
<body>
<?php
// checking if the user has uploaded an image or not.
if($_SESSION['img_status'] == 0 ){
$img_src= "uploads/default.jpg";
}
else{
$img_src= 'uploads/profile'.$_SESSION['sno'].'.jpg';
// .$_SESSION['fileActualExt'].'?'.mt_rand().'>';
}
?>
<div class="card center mt" style="width: 18rem;">
<img src= "<?php echo $img_src; ?>" class="card-img-top center" alt="Profile Image">
<div class="card-body">
<h2 class="card-title" style="text-align: center;"><?php echo $_SESSION["uname"] ?></h2>
<p class="card-text" style="text-align: center;">
<?php echo 'Email id : '. $_SESSION["email"] ?>
<br>
<?php echo 'score : '. $_SESSION["score"] ?>
<br>
<?php echo 'referral code : '. $_SESSION["referral_code"] ?>
<br>
<?php echo 'referral points : '. $_SESSION["referral_points"] ?>
</p>
<a href="profile_img\profile.php" class="btn btn-primary center">Change Profile Image</a>
</div>
</div>
<?php require 'partials\_optionalJS.php'; ?>
</body>
</html>