[RELEASE] revCMS VIP-Shop addon [HOT]
Hey! This is a shop for revCMS. This is perfect for hotels that don't want to manually give VIP to users. If you for example have 100 VIP points, you can buy VIP Normal. If not, you will get an error. But anwyay here it is:
Quote:
<form action="" method="post">
<?php
if (isset($_POST['vip_normal']))
{
$vip_points = mysql_result(mysql_query("SELECT `vip_points` FROM `users` WHERE `id`='" . $_SESSION['user']['id'] . "'"), 0);
if ($vip_points < 100)
{
echo "<div style='margin-top: 5px; background: red; color: #fff; border-radius: 5px; padding: 5px; margin-bottom: 5px;'>You don't have enough points.</div>";
}
else
{
mysql_query("UPDATE `users` SET `vip_points`=`vip_points` - 100, credits = credits+1000000, activity_points = activity_points+250000, vip = '1', rank = '2' WHERE `id`='" . $_SESSION['user']['id'] . "' AND `vip_points` > - 100");
echo "<div style='margin-top: 5px; background: green; color: #fff; border-radius: 5px; padding: 5px; margin-bottom: 5px;'>Ditt medlemskap er aktivert.</div>";
echo '<script type="application/javascript">slideDown();</script>';
echo '<script type="text/javascript">$(document).ready(function(){ $("#vpoints").html("Dine VIP-POENG: <strong>'.($vip_points-100).'</strong>"); });</script>';
}
}
?>
<center><b>VIP Normal</b> - costs <b>100</b> VIP-Points<br /></center>
<p><div align="left"><center><input type="submit" name="vip_normal" class="new-button green-button" style="margin: 0;" value="Buy VIP"></div></center>
</form>
<p>
<form action="" method="post">
<?php
if (isset($_POST['coins']))
{
$vip_points = mysql_result(mysql_query("SELECT `vip_points` FROM `users` WHERE `id`='" . $_SESSION['user']['id'] . "'"), 0);
if ($vip_points < 30)
{
echo "<div style='margin-top: 5px; background: red; color: #fff; border-radius: 5px; padding: 5px; margin-bottom: 5px;'>Du har ikke nok VIP-poeng.</div>";
}
else
{
mysql_query("UPDATE `users` SET `vip_points`=`vip_points` - 30, credits = credits+200000 WHERE `id`='" . $_SESSION['user']['id'] . "' AND `vip_points` > - 30");
echo "<div style='margin-top: 5px; background: green; color: #fff; border-radius: 5px; padding: 5px; margin-bottom: 5px;'>Your coins is received</div>";
echo '<script type="application/javascript">slideDown();</script>';
echo '<script type="text/javascript">$(document).ready(function(){ $("#vpoints").html("Dine VIP-POENG: <strong>'.($vip_points-30).'</strong>"); });</script>';
}
}
?>
<center><b>200,000</B> credits - costs <b>30</B> VIP-Points</center>
<p><div align="left"><center><input type="submit" name="coins" value="Buy credits"></div></center>
</form>
<p>
<form action="" method="post">
<?php
if (isset($_POST['duckets']))
{
$vip_points = mysql_result(mysql_query("SELECT `vip_points` FROM `users` WHERE `id`='" . $_SESSION['user']['id'] . "'"), 0);
if ($vip_points < 30)
{
echo "<div style='margin-top: 5px; background: red; color: #fff; border-radius: 5px; padding: 5px; margin-bottom: 5px;'>Du har ikke nok VIP-poeng.</div>";
}
else
{
mysql_query("UPDATE `users` SET `vip_points`=`vip_points` - 30, activity_points = activity_points+50000 WHERE `id`='" . $_SESSION['user']['id'] . "' AND `vip_points` > - 30");
echo "<div style='margin-top: 5px; background: green; color: #fff; border-radius: 5px; padding: 5px; margin-bottom: 5px;'>Your duckets is received</div>";
echo '<script type="application/javascript">slideDown();</script>';
echo '<script type="text/javascript">$(document).ready(function(){ $("#vpoints").html("Your points: <strong>'.($vip_points-30).'</strong>"); });</script>';
}
}
?>
<center><b>50,000</b> duckets - koster <b>30</b> VIP-Points</center>
<p><div align="left"><center><input type="submit" name="duckets" value="Buy duckets"></div></center>
</form>
<p>
<form action="" method="post">
<?php
if (isset($_POST['respekt']))
{
$vip_points = mysql_result(mysql_query("SELECT `vip_points` FROM `users` WHERE `id`='" . $_SESSION['user']['id'] . "'"), 0);
if ($vip_points < 30)
{
echo "<div style='margin-top: 5px; background: red; color: #fff; border-radius: 5px; padding: 5px; margin-bottom: 5px;'>You dont have enough points.</div>";
}
else
{
mysql_query("UPDATE user_stats SET DailyRespectPoints = (DailyRespectPoints+100) WHERE id = '".$_SESSION['user']['id']."';");
mysql_query("UPDATE users SET vip_points = vip_points-30 WHERE id = '".$_SESSION['user']['id']."';");
echo "<div style='margin-top: 5px; background: green; color: #fff; border-radius: 5px; padding: 5px; margin-bottom: 5px;'>Takk for ditt kjøp.</div>";
echo '<script type="application/javascript">slideDown();</script>';
echo '<script type="text/javascript">$(document).ready(function(){ $("#vpoints").html("Dine VIP-POENG: <strong>'.($vip_points-30).'</strong>"); });</script>';
}
}
?>
<center><b>50</b> respect - <b>30</b> VIP-points</center>
<p><div align="left"><center><input type="submit" name="respekt" value="Buy respect"></div></center>
</form>
<hr />
<p>
</form>
</div>
<style type="text/css">
input[type="submit"], input[type="button"] {
background: url('http://i.imgur.com/cPxjRDf.png') top;
font: bold 13px arial,sans-serif;
line-height: 25px;
color: black;
height: 25px;
width: 99px;
border: 0;
}
input[type="submit"]:hover, input[type="button"]:hover {
background-position: bottom;
cursor: pointer;
}
</style>
Screenshot (looks ugly because I don't have CSS):
http://i.imgur.com/qEuIM9E.png
As this is NOT coded by me, I don't know if there are exploits in this. Sooo, If someone find exploits in this, give a sound!
None of the credits goes to me. Enjoy!
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Nice idea but would recode it before used on a live hotel.
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Do you have a command or script so you NEED to have the client closed to buy?
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
This was created about 2 years ago and used on a few hotels, even back then it was horrible so I can't really see why anyone would use this now.
Quote:
Originally Posted by
UartigZone
Do you have a command or script so you NEED to have the client closed to buy?
Just check if online = 0 or 1, if 1 return error.
PHP Code:
$online = mysql_result(mysql_query("SELECT `online` FROM `users` WHERE `id`='" . $_SESSION['user']['id'] . "'"), 0);
if ($online == 1)
.......
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Quote:
Originally Posted by
Exonize
This was created about 2 years ago and used on a few hotels, even back then it was horrible so I can't really see why anyone would use this now.
Just check if online = 0 or 1, if 1 return error.
PHP Code:
$online = mysql_result(mysql_query("SELECT `online` FROM `users` WHERE `id`='" . $_SESSION['user']['id'] . "'"), 0);
if ($online == 1)
.......
Thanks! The only error is the page still show if i am online and offline?
it should show a error and not show the page if the user is online on the client
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Quote:
Originally Posted by
Exonize
This was created about 2 years ago and used on a few hotels, even back then it was horrible so I can't really see why anyone would use this now.
Just check if online = 0 or 1, if 1 return error.
PHP Code:
$online = mysql_result(mysql_query("SELECT `online` FROM `users` WHERE `id`='" . $_SESSION['user']['id'] . "'"), 0);
if ($online == 1)
.......
I know.
- - - Updated - - -
Quote:
Originally Posted by
Johno
Nice idea but would recode it before used on a live hotel.
I think this have a $_POST exploit, not sure.
- - - Updated - - -
Quote:
Originally Posted by
UartigZone
Thanks! The only error is the page still show if i am online and offline?
it should show a error and not show the page if the user is online on the client
Go to class.core.php. Search for " then below that add
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Quote:
Originally Posted by
Zedd
I know.
- - - Updated - - -
I think this have a $_POST exploit, not sure.
- - - Updated - - -
Go to class.core.php. Search for "
then below that add
I have it. Its when a user is logged on the CMS the user should see it, not only log in but the user may not be online on the client, if you get it?
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Quote:
Originally Posted by
UartigZone
I have it. Its when a user is logged on the CMS the user should see it, not only log in but the user may not be online on the client, if you get it?
i don't understand. If you do what I said, nobody that isn't logged in would access the shop-page. If you want them not to be able to buy anything if their logged in to the client;
Quote:
Originally Posted by
Exonize
This was created about 2 years ago and used on a few hotels, even back then it was horrible so I can't really see why anyone would use this now.
Just check if online = 0 or 1, if 1 return error.
PHP Code:
$online = mysql_result(mysql_query("SELECT `online` FROM `users` WHERE `id`='" . $_SESSION['user']['id'] . "'"), 0);
if ($online == 1)
.......
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Quote:
Originally Posted by
Zedd
i don't understand. If you do what I said, nobody that isn't logged in would access the shop-page. If you want them not to be able to buy anything if their logged in to the client;
The page will only be white when I put it in?
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
This is ugly (not going off the screens) the coding is horrible and I don't like the idea of buying VIP with VIP points? makes no sense.
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Quote:
Originally Posted by
Bozzie
This is ugly (not going off the screens) the coding is horrible and I don't like the idea of buying VIP with VIP points? makes no sense.
Then don't use it :)
- - - Updated - - -
Quote:
Originally Posted by
UartigZone
The page will only be white when I put it in?
Then you do it wrong. :/
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Quote:
Originally Posted by
Zedd
Then don't use it :)
- - - Updated - - -
Then you do it wrong. :/
Yeah. Where should it be on the page?
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Quote:
Originally Posted by
UartigZone
Yeah. Where should it be on the page?
What?
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Quote:
Originally Posted by
UartigZone
Yeah. Where should it be on the page?
It should be on a vip page where you can buy vip.
Re: [RELEASE] revCMS VIP-Shop addon [HOT]
Quote:
Originally Posted by
Bozzie
I don't like the idea of buying VIP with VIP points? makes no sense.
How does it not make sense? You purchase vip points for real life money and can then spend your points on either a vip package which would change your rank, or you could use it for buying extra credits, pixels, badges etc.