-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcertificate.php
152 lines (109 loc) · 5.7 KB
/
certificate.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
142
143
144
145
146
147
148
149
150
151
152
<?php
session_start();
$networth ="";
$worthlevel="";
$newNetWorth = $_GET['net_session']; //get the incoming netvalue
/**Process data */
$exVal = explode(',',$newNetWorth);
$parts=array_filter($exVal);
$networthValue = implode("",$parts);
$netVal = (int)$networthValue; //convert to int
$_SESSION['net_worth'] = $netVal; //assign to session
// var_dump($netVal); die();
if(isset($_SESSION['net_worth'])) {
switch ($_SESSION['net_worth']) {
case $_SESSION['net_worth'] < 100000:
$_SESSION['worthlevel'] = "Typical Average Nigerian";
break;
case ($_SESSION['net_worth'] > 100000 && $_SESSION['net_worth'] < 200000):
$_SESSION['worthlevel'] = "Shatta Bandle!";
break;
case ($_SESSION['net_worth'] > 200000 && $_SESSION['net_worth'] < 1000000):
$_SESSION['worthlevel'] = "Dangote!";
break;
case ($_SESSION['net_worth'] > 1000000 && $_SESSION['net_worth'] < 5000000):
$_SESSION['worthlevel'] = "Zuckerberg Apprentice!";
break;
case( $_SESSION['net_worth'] > 5000000 && $_SESSION['net_worth'] < 10000000):
$_SESSION['worthlevel'] = "Bill Gate Wonna Be!";
break;
case $_SESSION['net_worth'] > 10000000:
$_SESSION['worthlevel'] = "Jeff Bezos!";
break;
default:
$_SESSION['worthlevel'] = "";
break;
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="">
<meta name="og:title" property="og:title" content="">
<link href="index.php" rel="canonical">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="css/certificate.css">
<link rel="stylesheet" href="css/navbar.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/chomsky" type="text/css" />
<link rel="icon" type="image/x-icon" href="./img/Purple logo Group.png">
<title>Networth Calculator | Certificate</title>
</head>
<body>
<div id="content">
<!------Logo Background-->
<div class="opct">
<!--------------Gradient Overlay-->
<div class="container" id="main">
<div class="justify-content-end align-self-center ml-4" style="float: right;">
<img src="img/medal.svg" alt="awardseal" class="logo img-fluid">
</div>
<h1 id="cert-title">Certificate of Networth</h1> <br>
<h4>This is to certify that you have been rated</h4> <br>
<p class="text">
<?php echo $_SESSION['worthlevel']?>
</p> <br>
<?php unset($_SESSION['worthlevel']); ?>
<h4>with a networth of</h4> <br>
<p class="text">NGN
<?php echo number_format($_SESSION['net_worth'],2); ?>
</p> <br>
<p id="footer"><em>Signed</em></p>
<div class="">
<img src="img/signature.svg" alt="signature" style="width: 5em; margin-top:-15px; margin-bottom: -5px;">
</div>
<p>Deimos Elders</p>
<form action="dashboard.php">
<button type="submit" style="margin-bottom:40px;" class="btn btn-primary">Back to Dashboard</button>
</form>
<form action="investment.php">
<button type="submit" style="margin-bottom:40px;"
class="btn btn-default btn-grad text-white font-weight-bold">Get FREE Investment Advice
</button>
</form>
<div class="share-buttons ">
<a href="# " class="fab fa-facebook" style="color:#6D1AD8;"></a>
<a href="# " class="fab fa-twitter" style="color:#6D1AD8;"></a>
<a href="# " class="fab fa-linkedin" style="color:#6D1AD8;"></a>
<a href="# " class="fab fa-pinterest" style="color:#6D1AD8;"></a>
</div>
</div>
</div>
</div>
<script>
let facebook_link = document.querySelector('.fa-facebook')
facebook_link.href = `https://www.facebook.com/sharer/sharer.php?u=${window.location.href}`
let twitter_link = document.querySelector('.fa-twitter')
let cert_title = document.querySelector('#cert-title').innerHTML
twitter_link.href = `https://twitter.com/intent/tweet?url=${window.location.href}&text=${cert_title}`
let linkedin_link = document.querySelector('.fa-linkedin')
linkedin_link.href = `https://www.linkedin.com/shareArticle?mini=true&url=${window.location.href}&title=${cert_title};summary=&source=`
let pinterest_link = document.querySelector('.fa-pinterest')
pinterest_link.href = `https://pinterest.com/pin/create/button/?url=${window.location.href}&media=&description=`
</script>
</body>
</html>