-
Notifications
You must be signed in to change notification settings - Fork 21
/
settings.php
118 lines (112 loc) · 5.14 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
@include_once "langdoc.php";
if(!isset($_COOKIE['lang'])) {
setcookie("lang","en",2147485547);
$lang = "en";
} else $lang = $_COOKIE["lang"];
$sitename = "GGSKINS.CF";
$title = "$sitename - Settings";
@include_once('set.php');
@include_once('steamauth/steamauth.php');
if(!isset($_SESSION["steamid"])) {
Header("Location: index.php");
exit;
}
@include_once('steamauth/userInfo.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php echo $title ?></title>
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="fav.ico" type="image/x-icon">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="js/noty/packaged/jquery.noty.packaged.min.js"></script>
<script src="js/main.js"></script>
</head>
<body>
<header id="header">
<div style=" width: 1100px; margin: auto;">
<strong class="logo"><a href="/"><?php echo $title ?></a></strong>
<div style="float: right;">
<?php
if(!isset($_SESSION["steamid"])) {
steamlogin();
//echo '<div style="display: inline-block; margin: 35px 90px 0 0; color: #474747; font-size: 12pt;"><a href=en.php><img src=img/en.gif></a><a href=ru.php><img src=img/ru.gif></a></div>';
echo "<a class=\"btns\">ВОЙТИ С ПОМОЩЬЮ </a>";
echo "<a class=\"btn\" href=\"?login\">".$msg[$lang]["login2"]."</a>";
} else {
//echo '<div style="display: inline-block; margin: 35px 90px 0 0; color: #474747; font-size: 12pt;"><a href=en.php><img src=img/en.gif></a><a href=ru.php><img src=img/ru.gif></a> '.$msg[$lang]["loggedin"].' sf</div>';
echo '<div style="display: inline-block; margin: 35px 110px 0 0; color: #474747; font-size: 12pt;">'.$msg[$lang]["loggedin"].' '.$steamprofile['personaname'].' </div><div style="display: inline-block; position: absolute; margin-top: 28px; margin-left: -100px "><img src="'.$steamprofile['avatar'].'"></div>';
echo "<a class=\"btn\" href=\"steamauth/logout.php\">".$msg[$lang]["logout"]."</a>";
mysql_query("UPDATE users SET name='".$steamprofile['personaname']."', avatar='".$steamprofile['avatarfull']."' WHERE steamid='".$_SESSION["steamid"]."'");
}
?>
</div>
</div>
</header>
<div id="wrapper">
<div id="main">
<div class="sidebar">
<nav id="nav">
<h2><?php echo $msg[$lang]["menu"]; ?></h2>
<ul>
<li><a href="/"><?php echo $msg[$lang]["mainpage"]; ?></a></li>
<li><a href="/history"><?php echo $msg[$lang]["history"]; ?></a></li>
<li><a href="/top"><?php echo $msg[$lang]["top"]; ?></a></li>
</ul>
</nav>
<?php
if(isset($_SESSION["steamid"])) {
?>
<nav id="nav">
<h2><?php echo $msg[$lang]["pmenu"]; ?></h2>
<ul>
<li><a href="./settings.php"><?php echo $msg[$lang]["settings"]; ?></a></li>
<li><a href="steamauth/logout.php"><?php echo $msg[$lang]["logout"]; ?></a></li>
</ul>
</nav>
<?php } ?>
<h3>Last Winners</h3>
<div class="last-winner">
<?php
$lastgame = fetchinfo("value","info","name","current_game");
$lastwinner = fetchinfo("userid","games","id",$lastgame-1);
$winnercost = fetchinfo("cost","games","id",$lastgame-1);
$winnerpercent = round(fetchinfo("percent","games","id",$lastgame-1),1);
$winneravatar = fetchinfo("avatar","users","steamid",$lastwinner);
$winnername = fetchinfo("name","users","steamid",$lastwinner);
?>
<div class="visual">
<img src="<?php echo $winneravatar ?>" alt="image description" width="109" height="109">
</div>
<h3 style="border-radius: 0px 0px 0px 0px;"><?php echo $winnername ?></h3>
<ul>
<li>
<span class="val"><?php echo $msg[$lang]["win"]; ?>:</span>
<span class="price">$<?php echo round($winnercost,2); ?></span>
</li>
<li>
<span class="val"><?php echo $msg[$lang]["chance"]; ?>:</span>
<span class="price"><?php echo $winnerpercent ?>%</span>
</li>
</ul>
</div>
</div>
<div class="content">
<h2>Settings</h2>
<div class="history_game">
<form method="POST" action="./updatelink.php">
<div style="padding: 30px;">
<label for="link" style="color: #474747; font-size: 17pt;">Trade link: </label>
<input type="text" name="link" style="min-width: 600px; height: 25px; margin-top: -5px;" id="link" value="<?php echo fetchinfo("tlink","users","steamid",$_SESSION["steamid"]); ?>" placeholder="Enter trade link here.">
<p style="color: #474747; font-size: 14pt;">Get your trade link at - <a href="http://steamcommunity.com/id/me/tradeoffers/privacy#trade_offer_access_url" target="_blank" style="color: #474747; font-size: 12pt;">http://steamcommunity.com/id/me/tradeoffers/privacy</a></p>
<p style="color: #474747; font-size: 12pt;">Be sure to have your inventory PUBLIC.</p>
<p style="color: #474747; font-size: 12pt;">If you have provided a incorrect trade offer and a trade has been sent, you will not receive any refund.</p>
<input type="submit" class="btn" href="#" value="Update">
</div>
</form>
</div>
</div>
</body>
</html>