-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomprar-vip.php
121 lines (99 loc) · 3.29 KB
/
comprar-vip.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
<?php
session_start();
error_reporting(0);
include_once('./css/index.php');
if(isset($_SESSION['User']))
{
$User = $_SESSION['User'];
$stmt = $con->prepare("SELECT Moneda,Online FROM usuarios WHERE Username = :usuario");
$stmt->bindParam(':usuario', $User, PDO::PARAM_STR);
$stmt->execute();
while($row = $stmt->fetch())
{
$oz = $row['Moneda'];
$online = $row['Online'];
}
}
else echo "<script>window.location='ingresar.php';</script>";
?>
<style type="text/css">
::selection{ background-color: #E13300; color: white; }
::moz-selection{ background-color: #E13300; color: white; }
::webkit-selection{ background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
-webkit-box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
<div id="container">
<h1><font color="red"><div align='center'><b>Informacion VIP:</b></div></font></h1>
<?php
if($oz >= 10)
{
if($online == 0)
{
echo
"
<p><div align='center'>Acabas de adquirir <font color='red'><b>VIP</b></font><font color='red'><b>.</b></font></p> </div>
<center><td width='120' align='center' valign='middle' bgcolor='#FFFFFF'><a href='./vip.php'><strong>Volver</strong></a></td>
";
$tiempo = time() + 2592000; //2592000 es un mes en segundos supiel.
$st = $con->prepare("UPDATE usuarios SET VIP='1', TiempoVip=:tiempo, Moneda=Moneda-10 WHERE Username = :usuario");
$st->bindParam(':tiempo', $tiempo, PDO::PARAM_INT);
$st->bindParam(':usuario', $User, PDO::PARAM_STR);
$st->execute();
//header('location: ./vip.php');
echo "<script>window.location='vip.php';</script>";
}
else
{
echo '<center><div class="login" style="padding:5px;top:20px;background-color:#F00; color:#FFFFFF; width:560px; text-align:center;"><strong>Tienes que estar desconectado</strong></div><td width="120" align="center" valign="middle" bgcolor="#FFFFFF"><a href="/vip.php"><strong>Volver</strong></a></center><br>';
}
}
else
{
echo '<center><div class="login" style="padding:5px;top:20px;background-color:#F00; color:#FFFFFF; width:560px; text-align:center;"><strong>No tienes las suficientes monedas.</strong></div><td width="120" align="center" valign="middle" bgcolor="#FFFFFF"><br><a href="/vip.php"><strong>Volver</strong></a></center><bt>';
}
?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-104151474-1', 'auto');
ga('send', 'pageview');
</script>