gluon-web-remote

Web remote Administration for big size of gluon routers
git clone git://archive.git.mtrnord.blog/MTRNord/gluon-web-remote.git
Log | Files | Refs | README

changeUserRole.php (1484B)


      1 <div class="container">
      2     <h1>LoginController/changeUserRole</h1>
      3 
      4     <!-- echo out the system feedback (error and success messages) -->
      5     <?php $this->renderFeedbackMessages(); ?>
      6 
      7     <div class="box">
      8         <h2>Change account type</h2>
      9         <p>
     10             This page is a basic implementation of the upgrade-process.
     11             User can click on that button to upgrade their accounts from
     12             "basic account" to "premium account". This script simple offers
     13             a click-able button that will upgrade/downgrade the account instantly.
     14             In a real world application you would implement something like a
     15             pay-process.
     16         </p>
     17 	    <p>
     18 		    Please note: This whole process has been renamed from AccountType (v3.0) to UserRole (v3.1).
     19 	    </p>
     20 
     21         <h2>Currently your account type is: <?php echo Session::get('user_account_type'); ?></h2>
     22         <!-- basic implementation for two account types: type 1 and type 2 -->
     23 	    <form action="<?php echo Config::get('URL'); ?>/login/changeUserRole_action" method="post">
     24             <?php if (Session::get('user_account_type') == 1) { ?>
     25                 <input type="submit" name="user_account_upgrade" value="Upgrade my account (to Premium User)" />
     26 	        <?php } else if (Session::get('user_account_type') == 2) { ?>
     27 	            <input type="submit" name="user_account_downgrade" value="Downgrade my account (to Basic User)" />
     28 	        <?php } ?>
     29 	    </form>
     30     </div>
     31 </div>