-
Notifications
You must be signed in to change notification settings - Fork 3
/
settings.php
102 lines (84 loc) · 3.17 KB
/
settings.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
<?php
/*
USD = 1
GBP = 2
EUR = 3
<NIL> = 4
RUB = 5
<NIL> = 6
BRL = 7
JPY = 8
NOK = 9
IDR = 10
MYR = 11
PHP = 12
SGD = 13
THB = 14
<NIL> = 15
<NIL> = 16
TRY = 17
<NIL> = 18
MXN = 19
CAD = 20
<NIL> = 21
NZD = 22*/
if(isset($_POST['currency']) && !empty($_POST['currency'])){
setcookie("currency", $_POST['currency'], time() + (525949 * 60), './', FALSE); // NULL REQUIRED FOR LOCALHOST
if(isset($_POST['manualprice'])){
setcookie("manualprice", "true", time() + (525949 * 60), './', FALSE);
}else{
setcookie("manualprice", "false", time() + (525949 * 60), './', FALSE);
}
}
?>
<!DOCTYPE HTML>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="layout.css" />
<link rel="stylesheet" type="text/css" href="settings.css" />
<link rel="icon" type="image/png" href="/images/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Settings - Trade Assistant</title>
</head>
<body>
<div id="navbar">
<a href="help.html">How To / Info</a>
<a href="settings.php">Settings</a>
<a href="index.php">Home</a>
</div>
<a id="header" href="index.php"><h1>| TRADE ASSISTANT |</h1></a>
<img id="header_image" src="images/csgo_logo.png"/>
<!-- This Credit is a little obnoxious I know, feel free to remove it.
I would appreciate if you could credit me somewhere but it's not required as long as you do not claim my work is your own. -->
<p id="credit">Created by <a href="http://shane-brown.ca/" target="_blank">Shane "SajeOne" Brown</a><br /></p>
<h2>Settings</h2>
<p>This page includes some settings to help personalize your experience on the Trade Assistant. <b>By clicking "Update Settings" you agree to us creating and using a cookie which contains your personal settings.</b></p>
<form id="settingsform" action="" method="POST">
<label for="currency">Currency: </label><br />
<select id="curID" name="currency" form="settingsform">
<option value="USD">USD</option>
<option value="CAD">CAD</option>
<option value="GBP">GBP</option>
<option value="EUR">EUR</option>
<option value="RUB">RUB</option>
<option value="JPY">JPY</option>
</select>
<br />
<label for="manualprice">Manual Price Grabbing: </label>
<input id="manualID" type="checkbox" value="true" name="manualprice" <?php if(isset($_COOKIE['manualprice']) && $_COOKIE['manualprice'] == "true") echo "checked"; ?>/><br />
<input type="submit" value="Update Settings" name="submit"/>
</form>
<h2>Info:</h2>
<p><b>Currency</b> - This allows you to set your preffered currency for prices to be displayed in.</p>
<p><b>Manual Price Grabbing</b> - This setting will manually fetch the remote prices from steam. This process is slow but more accurate to the period in time you are fetching the prices. Because of the processing power needed to do this you will be required to submit a re-captcha.</p>
</body>
</html>
<?php
echo '<script src="js/settings.js"></script>';
if(isset($_POST['currency']) && !empty($_POST['currency'])){
echo '<br/><br/>Submitted New Settings!';
}
?>