GrapeASE Add voucher page

Page 1 of 2 12 LastLast
Results 1 to 15 of 29
  1. #1
    Apprentice VistaH is offline
    MemberRank
    Feb 2012 Join Date
    15Posts

    thumbs up 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 />
                &raquo; <a href='vip'>Give a user Regular VIP</a> <br />
                &raquo; <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 />
                &raquo; <a href='news'>Post news article</a><br />
                &raquo; <a href='delnews'>Delete a news article (By ID)</a><br />
                &raquo; <a href='cmdlogs'>Command logs</a><br />
                &raquo; <a href='motd'>Change welcome message</a><br />
                &raquo; <a href='empty'>Empty a table</a><br />
                &raquo; <a href='addvoucher'>Add a voucher</a><br />
                &raquo; <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 />
                &raquo; <a href='banlist'>Ban List</a> <br />
                &raquo; <a href='ip'>IP lookup</a> <br />
                &raquo; <a href='unban'>Unban a User</a> <br />
                &raquo; <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 />
                &raquo; <a href='listbadge'>List badges</a><br />
                &raquo; <a href='addbadge'>Add a badge</a><br />
                &raquo; <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 />
                &raquo; <a href='vip'>Give a user Regular VIP</a> <br />
                &raquo; <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 />
                &raquo; <a href='news'>Post news article</a><br />
                &raquo; <a href='delnews'>Delete a news article (By ID)</a><br />
                &raquo; <a href='cmdlogs'>Command logs</a><br />
                &raquo; <a href='motd'>Change welcome message</a><br />
                &raquo; <a href='empty'>Empty a table</a><br />
                &raquo; <a href='addvoucher'>Add a voucher</a><br />
                &raquo; <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 />
                &raquo; <a href='banlist'>Ban List</a> <br />
                &raquo; <a href='ip'>IP lookup</a> <br />
                &raquo; <a href='unban'>Unban a User</a> <br />
                &raquo; <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 />
                &raquo; <a href='listbadge'>List badges</a><br />
                &raquo; <a href='addbadge'>Add a badge</a><br />
                &raquo; <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 />
                &raquo; <a href='vip'>Give a user Regular VIP</a> <br />
                &raquo; <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 />
                &raquo; <a href='news'>Post news article</a><br />
                &raquo; <a href='delnews'>Delete a news article (By ID)</a><br />
                &raquo; <a href='cmdlogs'>Command logs</a><br />
                &raquo; <a href='motd'>Change welcome message</a><br />
                &raquo; <a href='empty'>Empty a table</a><br />
                &raquo; <a href='addvoucher'>Add a voucher</a><br />
                &raquo; <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 />
                &raquo; <a href='banlist'>Ban List</a> <br />
                &raquo; <a href='ip'>IP lookup</a> <br />
                &raquo; <a href='unban'>Unban a User</a> <br />
                &raquo; <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 />
                &raquo; <a href='listbadge'>List badges</a><br />
                &raquo; <a href='addbadge'>Add a badge</a><br />
                &raquo; <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 />
                &raquo; <a href='vip'>Give a user Regular VIP</a> <br />
                &raquo; <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 />
                &raquo; <a href='news'>Post news article</a><br />
                &raquo; <a href='delnews'>Delete a news article (By ID)</a><br />
                &raquo; <a href='cmdlogs'>Command logs</a><br />
                &raquo; <a href='motd'>Change welcome message</a><br />
                &raquo; <a href='empty'>Empty a table</a><br />
                &raquo; <a href='addvoucher'>Add a voucher</a><br />
                &raquo; <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 />
                &raquo; <a href='banlist'>Ban List</a> <br />
                &raquo; <a href='ip'>IP lookup</a> <br />
                &raquo; <a href='unban'>Unban a User</a> <br />
                &raquo; <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 />
                &raquo; <a href='listbadge'>List badges</a><br />
                &raquo; <a href='addbadge'>Add a badge</a><br />
                &raquo; <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 />
    Attached Thumbnails Attached Thumbnails addvoucher.png   addvoucher2.png   voucherdb.png  
    Last edited by VistaH; 20-08-12 at 07:17 PM.


  2. #2
    Valued Member PrinceOren is offline
    MemberRank
    Jul 2010 Join Date
    115Posts

    Re: GrapeASE Add voucher page

    Good Release !
    I love this , Gotta try .
    Good Job 10/10

  3. #3
    Apprentice VistaH is offline
    MemberRank
    Feb 2012 Join Date
    15Posts

    Re: GrapeASE Add voucher page

    Cheers!

    I thought it'd be useful, so I felt like being a good guy.. :P

  4. #4
    Valued Member PrinceOren is offline
    MemberRank
    Jul 2010 Join Date
    115Posts

    Re: GrapeASE Add voucher page

    Tested :D
    Work , Thanks For Shared :)
    If got more system or functions code, Please share :P

  5. #5
    Apprentice VistaH is offline
    MemberRank
    Feb 2012 Join Date
    15Posts

    Re: GrapeASE Add voucher page

    Alright, Give me ideas as to what you may want and I'll try to get it done? :)

  6. #6
    Valued Member PrinceOren is offline
    MemberRank
    Jul 2010 Join Date
    115Posts

    Re: GrapeASE Add voucher page

    I don't know?
    :3
    Just make anything :3

  7. #7
    Account Upgraded | Title Enabled! DeliriousCoder is offline
    MemberRank
    Nov 2011 Join Date
    United StatesLocation
    977Posts

    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

  8. #8
    Thanks for a great time! siem212212 is offline
    MemberRank
    Jun 2009 Join Date
    NetherlandsLocation
    958Posts

    Re: GrapeASE Add voucher page

    nice, what cms are u using btw? :)!

    revcms ? :)

  9. #9
    Apprentice VistaH is offline
    MemberRank
    Feb 2012 Join Date
    15Posts

    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. :)

  10. #10
    Super Moderator! Shoelace is offline
    Super ModRank
    Mar 2012 Join Date
    6,579Posts

    Re: GrapeASE Add voucher page

    Good release very helpful and well done on this

  11. #11
    Account Upgraded | Title Enabled! ELSD is offline
    MemberRank
    Sep 2011 Join Date
    Chi-TownLocation
    1,213Posts

    Re: GrapeASE Add voucher page

    wow very cool. Nice release! 10/10

  12. #12
    :joy: Jonteh is offline
    MemberRank
    Apr 2007 Join Date
    New York, USALocation
    3,375Posts

    Re: GrapeASE Add voucher page

    Credits:
    - Jonty for ZapASE
    - Kryptos for RevCMS intergration

  13. #13
    Proficient Member bigarre is offline
    MemberRank
    Mar 2012 Join Date
    FranceLocation
    195Posts

    Re: GrapeASE Add voucher page

    thank you !

  14. #14
    Apprentice VistaH is offline
    MemberRank
    Feb 2012 Join Date
    15Posts

    Re: GrapeASE Add voucher page

    Quote Originally Posted by Jonteh View Post
    Credits:
    - Jonty for ZapASE
    - Kryptos for RevCMS intergration
    This is GrapeASE, Jonteh.

    Credits to Grapefruit for making this housekeeping.

  15. #15
    Michael Jackson ♥ Sphinx is offline
    MemberRank
    Aug 2010 Join Date
    In your bed :3Location
    906Posts

    Re: GrapeASE Add voucher page

    Ill use this :D



Page 1 of 2 12 LastLast

Advertisement