-
Notifications
You must be signed in to change notification settings - Fork 0
/
forex.php
136 lines (121 loc) · 5.71 KB
/
forex.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
<?php
session_start();
extract($_POST);
if(isset($_POST["fromCurrency"]) && isset($_POST["toCurrency"])) {
extract($_POST);
if(($fromCurrency !== "" && $toCurrency !== "")) {
$_SESSION["fromCurrency"] = $fromCurrency;
$_SESSION["toCurrency"] = $toCurrency;
$_SESSION["apiKey"] = $apiKey;
header("Location: forexProcess.php");
die();
} else {
echo '<script language="javascript">';
echo 'alert("Please choose currency pair to convert")';
echo '</script>';
}
}
?>
<!DOCTYPE HTML>
<!--
Projection by TEMPLATED
templated.co @templatedco
Released for free under the Creative Commons Attribution 3.0 license (templated.co/license)
-->
<html>
<head>
<title>Forex</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="assets/css/main.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.js"
integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous"></script>
</head>
<body class>
<!-- Header -->
<header id="header">
<div class="inner">
<nav id="nav">
<a href="index.php">Home</a>
<a href="forex.php">Forex</a>
<a href="sp.php">S&P500</a>
<a href="index.php#about">About</a>
</nav>
<a href="#navPanel" class="navPanelToggle"><span class="fa fa-bars"></span></a>
</div>
</header>
<!-- Banner -->
<section id="banner">
<div class="inner">
<header>
<h1>Investa</h1>
</header>
</div>
</section>
<!-- Three -->
<section id="three" class="wrapper">
<div class="inner">
<header class="align-center">
<h2>Forex</h2>
<h4>Real Time Currency Exchange Rates</h4>
</header>
<div class="align-center">
<div class="box">
<form id="currencyExchange" method="post" action="forex.php">
Base Currency
<div class="select-wrapper">
<select id="fromCurrency" name = "fromCurrency">
<option selected value="">Select Currency:</option>
<option value="USD">US Dollar</option>
<option value="CAD">Canada Dollar</option>
<option value="PHP">Philippine Peso</option>
<option value="KRW">Korean Won</option>
<option value="EUR">Euro</option>
<option value="GBP">British Pound Sterling</option>
<option value="JPY">Japanese Yen</option>
<option value="CHF">Swiss Franc</option>
<option value="AUD">Australian Dollar</option>
</select>
</div>
<br/><br/>
Converted Currency
<div class="select-wrapper">
<select id="toCurrency" name="toCurrency">
<option selected value="">Select Currency:</option>
<option value="USD">US Dollar</option>
<option value="CAD">Canada Dollar</option>
<option value="PHP">Philippine Peso</option>
<option value="KRW">Korean Won</option>
<option value="EUR">Euro</option>
<option value="GBP">British Pound Sterling</option>
<option value="JPY">Japanese Yen</option>
<option value="CHF">Swiss Franc</option>
<option value="AUD">Australian Dollar</option>
</select>
</div>
<input type="hidden" value='UFGXKEBNFFHKOICE' name="apiKey"/>
<br/>
<div class="align-center">
<button type = "submit" id ="convert" class="button">Convert</button>
</div>
</form>
</div>
</div>
</div>
</section>
<!-- footer -->
<div class="wrapper align-center">
<p class="copyright text-muted">
Copyright © Lauren Kwa 2017
<br/>
Design: <a href="http://templated.co">Templated</a>
</p>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/skel.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>