3 Attachment(s)
GrapeASE Add voucher page
Well, as I've started using the forums more and more, I've decided to start releasing snippets and layouts or whatever from my site...
Here I bring you the add voucher code, pretty simple, just create two new documents called addvoucher.php and addvoucher2.php then paste these two codes in...
Addvoucher.php
PHP Code:
<link rel="stylesheet" href="{url}/app/tpl/skins/{skin}/hk/styles/global.css" type="text/css">
<div id="main">
<div id="links"></div>
<div id="header"><img src="{url}/app/tpl/skins/{skin}/images/logo.png" align=right style="margin-right: 480px; margin-top: 5px;">
<div id="logo">
<div id="logo_text">
<!-- class="logo_colour", allows you to change the color of the logo text -->
<h1>{hotelname} Housekeeping -- Welcome {username}</h1>
</div>
</div>
</div>
<div id="site_content">
<div id="sidebar_container">
<!-- insert your sidebar items here -->
<div class="sidebar">
<div class="sidebar_top"></div>
<div class="sidebar_item">
<br />
[ <a href='dash'>Return to Dashboard</a> ] [ <a href='logout'>Log out</a> ]<br /> <br />
<p>
<?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5)
{ ?>
Player Management <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='vip'>Give a user Regular VIP</a> <br />
» <a href='edit'>Edit a users account</a> <br />
<br />
Administration <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='news'>Post news article</a><br />
» <a href='delnews'>Delete a news article (By ID)</a><br />
» <a href='cmdlogs'>Command logs</a><br />
» <a href='motd'>Change welcome message</a><br />
» <a href='empty'>Empty a table</a><br />
» <a href='addvoucher'>Add a voucher</a><br />
» <a href='timer'>Change the Credits & Pixels timer</a><br />
<br />
<?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 4) { ?>
Moderation <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='banlist'>Ban List</a> <br />
» <a href='ip'>IP lookup</a> <br />
» <a href='unban'>Unban a User</a> <br />
» <a href='addban'>Ban a user</a><br />
<br />
Badges <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='listbadge'>List badges</a><br />
» <a href='addbadge'>Add a badge</a><br />
» <a href='delbadge'>Delete a badge</a><br />
<?php } ?>
<br />
Statistics<br />
<img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
Server Status:
{status} <br />
{online} user(s) online <br />
</p>
</div>
<div class="sidebar_base"></div>
</div>
</div>
<div id="content_container">
<div id="content">
<!-- insert the page content here -->
<br />
<form method="post" action="addvoucher2">
Voucher Code:<br />
<input type="text" name="code"/> <br /> <br />
Credit Value:<br />
<input type="text" name="credits"/> <br /> <br />
Pixel Value:<br />
<input type="text" name="pixels"/> <br /> <br />
Shell Value:<br />
<input type="text" name="shells"/> <br /> <br />
<input type="submit" value="Add Voucher" name="addvoucher2" />
</form>
<?php
?>
</div>
</div>
</div>
</div>
<font color="black"> <center>Powered by GrapeASE by Grapefruit - Design by Grapefruit</center><br /> <center>Implemented into RevCMS by Kryptos</center><br />
Addvoucher2.php
PHP Code:
<link rel="stylesheet" href="{url}/app/tpl/skins/{skin}/hk/styles/global.css" type="text/css">
<div id="main">
<div id="links"></div>
<div id="header"><img src="{url}/app/tpl/skins/{skin}/images/logo.png" align=right style="margin-right: 480px; margin-top: 5px;">
<div id="logo">
<div id="logo_text">
<!-- class="logo_colour", allows you to change the color of the logo text -->
<h1>{hotelname} Housekeeping -- Welcome {username}</h1>
</div>
</div>
</div>
<div id="site_content">
<div id="sidebar_container">
<!-- insert your sidebar items here -->
<div class="sidebar">
<div class="sidebar_top"></div>
<div class="sidebar_item">
<br />
[ <a href='dash'>Return to Dashboard</a> ] [ <a href='logout'>Log out</a> ]<br /> <br />
<p>
<?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5)
{ ?>
Player Management <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='vip'>Give a user Regular VIP</a> <br />
» <a href='edit'>Edit a users account</a> <br />
<br />
Administration <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='news'>Post news article</a><br />
» <a href='delnews'>Delete a news article (By ID)</a><br />
» <a href='cmdlogs'>Command logs</a><br />
» <a href='motd'>Change welcome message</a><br />
» <a href='empty'>Empty a table</a><br />
» <a href='addvoucher'>Add a voucher</a><br />
» <a href='timer'>Change the Credits & Pixels timer</a><br />
<br />
<?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 4) { ?>
Moderation <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='banlist'>Ban List</a> <br />
» <a href='ip'>IP lookup</a> <br />
» <a href='unban'>Unban a User</a> <br />
» <a href='addban'>Ban a user</a><br />
<br />
Badges <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='listbadge'>List badges</a><br />
» <a href='addbadge'>Add a badge</a><br />
» <a href='delbadge'>Delete a badge</a><br />
<?php } ?>
<br />
Statistics<br />
<img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
Server Status:
{status} <br />
{online} user(s) online <br />
</p>
</div>
<div class="sidebar_base"></div>
</div>
</div>
<div id="content_container">
<div id="content">
<!-- insert the page content here -->
<br /> <?php
include_once('databaseconfig.php');
{
$code = mysql_real_escape_string($_POST['code']);
$credits = mysql_real_escape_string($_POST['credits']);
$pixels = mysql_real_escape_string($_POST['pixels']);
$shells = mysql_real_escape_string($_POST['shells']);
mysql_query("INSERT INTO vouchers (code,credits,pixels,vip_points) VALUES ('$code','$credits','$pixels','$shells')");
echo ("Voucher has been added!");
}
?>
<html>
<body>
<h1>Okay. If you see 'Voucher has been added!' at the top, then it has completed successfully.</h1>
</div>
</div>
</div>
</div>
<font color="black"> <center>Powered by GrapeASE by Grapefruit - Design by Grapefruit</center><br /> <center>Implemented into RevCMS by Kryptos</center><br />
Those are the codes... I don't know if this sort of thing has been released but I couldn't find them so I decided to create my own by modifying another code.
Also; For a future release, I don't know, but I might actually code the 'Empty Table' page for RANK 9 ONLY, and also with only two buttons... one for cmdlogs, the other for chatlogs... There's no way someone can delete your users table, catalog pages etc from there unless they have full database access.
Here's some screenshots of the addvouchers page; (IN ATTATCHMENTS ALSO)
http://vistahotel.org/app/tpl/skins/...addvoucher.png
http://vistahotel.org/app/tpl/skins/...ddvoucher2.png
http://vistahotel.org/app/tpl/skins/.../voucherdb.png
Yet again, thanks and I'm looking forward to feedback.
-VistaH
Below is the obsolete php code, it is for BEFORE the update which allowed vouchers to include pixels and shells.
Addvoucher.php
PHP Code:
<link rel="stylesheet" href="{url}/app/tpl/skins/{skin}/hk/styles/global.css" type="text/css">
<div id="main">
<div id="links"></div>
<div id="header"><img src="{url}/app/tpl/skins/{skin}/images/logo.png" align=right style="margin-right: 480px; margin-top: 5px;">
<div id="logo">
<div id="logo_text">
<!-- class="logo_colour", allows you to change the color of the logo text -->
<h1>{hotelname} Housekeeping -- Welcome {username}</h1>
</div>
</div>
</div>
<div id="site_content">
<div id="sidebar_container">
<!-- insert your sidebar items here -->
<div class="sidebar">
<div class="sidebar_top"></div>
<div class="sidebar_item">
<br />
[ <a href='dash'>Return to Dashboard</a> ] [ <a href='logout'>Log out</a> ]<br /> <br />
<p>
<?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5)
{ ?>
Player Management <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='vip'>Give a user Regular VIP</a> <br />
» <a href='edit'>Edit a users account</a> <br />
<br />
Administration <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='news'>Post news article</a><br />
» <a href='delnews'>Delete a news article (By ID)</a><br />
» <a href='cmdlogs'>Command logs</a><br />
» <a href='motd'>Change welcome message</a><br />
» <a href='empty'>Empty a table</a><br />
» <a href='addvoucher'>Add a voucher</a><br />
» <a href='timer'>Change the Credits & Pixels timer</a><br />
<br />
<?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 4) { ?>
Moderation <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='banlist'>Ban List</a> <br />
» <a href='ip'>IP lookup</a> <br />
» <a href='unban'>Unban a User</a> <br />
» <a href='addban'>Ban a user</a><br />
<br />
Badges <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='listbadge'>List badges</a><br />
» <a href='addbadge'>Add a badge</a><br />
» <a href='delbadge'>Delete a badge</a><br />
<?php } ?>
<br />
Statistics<br />
<img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
Server Status:
{status} <br />
{online} user(s) online <br />
</p>
</div>
<div class="sidebar_base"></div>
</div>
</div>
<div id="content_container">
<div id="content">
<!-- insert the page content here -->
<br />
<form method="post" action="addvoucher2">
Voucher Code:<br />
<input type="text" name="code"/> <br /> <br />
Voucher Value:<br />
<input type="text" name="value"/> <br /> <br />
<p>Please note that this is only for CREDITS & You are using the version for BEFORE the update which allowed pixels and shells to be incuded in vouchers!</p>
<input type="submit" value="Add Voucher" name="addvoucher2" />
</form>
<?php
?>
</div>
</div>
</div>
</div>
<font color="black"> <center>Powered by GrapeASE by Grapefruit - Design by Grapefruit</center><br /> <center>Implemented into RevCMS by Kryptos</center><br />
Addvoucher2.php
PHP Code:
<link rel="stylesheet" href="{url}/app/tpl/skins/{skin}/hk/styles/global.css" type="text/css">
<div id="main">
<div id="links"></div>
<div id="header"><img src="{url}/app/tpl/skins/{skin}/images/logo.png" align=right style="margin-right: 480px; margin-top: 5px;">
<div id="logo">
<div id="logo_text">
<!-- class="logo_colour", allows you to change the color of the logo text -->
<h1>{hotelname} Housekeeping -- Welcome {username}</h1>
</div>
</div>
</div>
<div id="site_content">
<div id="sidebar_container">
<!-- insert your sidebar items here -->
<div class="sidebar">
<div class="sidebar_top"></div>
<div class="sidebar_item">
<br />
[ <a href='dash'>Return to Dashboard</a> ] [ <a href='logout'>Log out</a> ]<br /> <br />
<p>
<?php if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 5)
{ ?>
Player Management <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='vip'>Give a user Regular VIP</a> <br />
» <a href='edit'>Edit a users account</a> <br />
<br />
Administration <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='news'>Post news article</a><br />
» <a href='delnews'>Delete a news article (By ID)</a><br />
» <a href='cmdlogs'>Command logs</a><br />
» <a href='motd'>Change welcome message</a><br />
» <a href='empty'>Empty a table</a><br />
» <a href='addvoucher'>Add a voucher</a><br />
» <a href='timer'>Change the Credits & Pixels timer</a><br />
<br />
<?php } if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 4) { ?>
Moderation <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='banlist'>Ban List</a> <br />
» <a href='ip'>IP lookup</a> <br />
» <a href='unban'>Unban a User</a> <br />
» <a href='addban'>Ban a user</a><br />
<br />
Badges <br /> <img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
» <a href='listbadge'>List badges</a><br />
» <a href='addbadge'>Add a badge</a><br />
» <a href='delbadge'>Delete a badge</a><br />
<?php } ?>
<br />
Statistics<br />
<img src='../app/tpl/skins/<?php echo $_CONFIG['template']['style']; ?>/hk/images/line.png'> <br />
Server Status:
{status} <br />
{online} user(s) online <br />
</p>
</div>
<div class="sidebar_base"></div>
</div>
</div>
<div id="content_container">
<div id="content">
<!-- insert the page content here -->
<br /> <?php
include_once('databaseconfig.php');
{
$code = mysql_real_escape_string($_POST['code']);
$value = mysql_real_escape_string($_POST['value']);
mysql_query("INSERT INTO vouchers (code,value) VALUES ('$code','$value')");
echo ("Voucher has been added!");
}
?>
<html>
<body>
<h1>You are using the version of code from BEFORE the update which allowed pixels and shells to be included!</h1>
</div>
</div>
</div>
</div>
<font color="black"> <center>Powered by GrapeASE by Grapefruit - Design by Grapefruit</center><br /> <center>Implemented into RevCMS by Kryptos</center><br />
Re: GrapeASE Add voucher page
Good Release !
I love this , Gotta try .
Good Job 10/10
Re: GrapeASE Add voucher page
Cheers!
I thought it'd be useful, so I felt like being a good guy.. :P
Re: GrapeASE Add voucher page
Tested :D
Work , Thanks For Shared :)
If got more system or functions code, Please share :P
Re: GrapeASE Add voucher page
Alright, Give me ideas as to what you may want and I'll try to get it done? :)
Re: GrapeASE Add voucher page
I don't know?
:3
Just make anything :3
Re: GrapeASE Add voucher page
This is amazing.
I had this from "Feedback's" Haboa Administration's housekeeping (Which overall is the best)
10/10
Re: GrapeASE Add voucher page
nice, what cms are u using btw? :)!
revcms ? :)
Re: GrapeASE Add voucher page
Yeah, Revolution CMS (RevCMS) on iis, Siem if you check back to my other thread... (http://forum.ragezone.com/f556/revcm...5/#post6998535) I've given you the way to get Rev working on iis.
Cheers, Delirious haha, wasn't expecting such an overall rate for such a simple script. :)
Re: GrapeASE Add voucher page
Good release very helpful and well done on this
Re: GrapeASE Add voucher page
wow very cool. Nice release! 10/10
Re: GrapeASE Add voucher page
Credits:
- Jonty for ZapASE
- Kryptos for RevCMS intergration
Re: GrapeASE Add voucher page
Re: GrapeASE Add voucher page
Quote:
Originally Posted by
Jonteh
Credits:
- Jonty for ZapASE
- Kryptos for RevCMS intergration
This is GrapeASE, Jonteh.
Credits to Grapefruit for making this housekeeping.
Re: GrapeASE Add voucher page