Controller Based WLANs

Sample HTML coding page for Guest-login-username-password

by on ‎04-05-2015 09:46 PM

Environment- Tested with AOS 6.4.2.1

Answer- Note :- Need to replace http://10.17.168.173/cgi-bin/login with the IP address / certificate CN of the controller for the customer
 
</script>
<form name="form6454d1d4_weblogin" id="form6454d1d4_weblogin" method="POST" action="http://10.17.168.173/cgi-bin/login" accept-charset="UTF-8" enctype="application/x-www-form-urlencoded" novalidate="novalidate">
<table class="nwaContent" cellpadding="2" cellspacing="2">
   <thead>
    <tr>
     <th class="nwaTop" colspan="2">Login</th>
    </tr>
   </thead>
 
  <!-- end no_login UI element -->
  <!-- begin user UI element (type: text; hidden: ;) -->
  <tr id="TR_form6454d1d4_weblogin_user">
    <th class="nwaLeft">
      <span class="nwaImportant nwaRequiredField">*</span> <label for="ID_form6454d1d4_weblogin_user">Username:</label>    </th>
    <td class="nwaBody"><a name="A_user"></a>
      <input type="email" style="width: 200px;" name="user" id="ID_form6454d1d4_weblogin_user" value="" autocapitalize="off" autocorrect="off">
    </td>
  </tr>
  <!-- end user UI element -->
  <!-- begin password UI element (type: password; hidden: ;) -->
  <tr id="TR_form6454d1d4_weblogin_password">
    <th class="nwaLeft">
      <span class="nwaImportant nwaRequiredField">*</span> <label for="ID_form6454d1d4_weblogin_password">Password:</label>    </th>
    <td class="nwaBody"><a name="A_password"></a>
      <input type="password" style="width: 200px;" name="password" id="ID_form6454d1d4_weblogin_password" value="">
    </td>
  </tr>
  <!-- end password UI element -->
   <tr id="TR_form6454d1d4_weblogin_submit">
    <th class="nwaBottom" colspan="2">
     <a name="A_submit"></a>
       <input type="submit" id="ID_form6454d1d4_weblogin_submit" value="Log In">
 
<script language="JavaScript" type="text/javascript"><!--
document.getElementById("ID_form6454d1d4_weblogin_submit").onclick = function (ev) {
            ev = ev || window.event;
            r = Nwa_SubmitForm("form6454d1d4_weblogin","ID_form6454d1d4_weblogin_submit");
            ev.returnValue = r;
            return r;
}
//-->
</script>
 
    </th>
   </tr>
</table>
 
 
 
</form>

Comments
greenbergmethew

1.The code implements a simple login form
2.It checks whether the password and usernames are matching or not
3.While you are using replace the predefined username and password that I'v given
that is replace "myuserid" and "mypswrd" with your own userid and password.
4.just copy the file and paste it in the notepad.
5.and save it with an extension of .html or .htm
6.select 'All Files' from the popupmenu shown at the bottom of notepad before saving.
7.Now you will get a document that has the symbol of internet explorer.
8.just open that file and if the computer ask for script activation press ok.
9.Now run your page
10.You can customize the page by applying CSS.

 

While it’s not a good idea to move the entire wp-login.php file, it is possible to display the login/register/password forms anywhere in your theme. For example, putting the forms in your sidebar.php make it super-easy for visitors to register and login from anywhere in your site. 

 

<!-- Custom Login/Register/Password Code @ ->
<!-- Theme Template Code -->

<div id="login-register-password">

<?php global $user_ID, $user_identity; get_currentuserinfo(); if (!$user_ID) { ?>

<ul class="tabs_login">
<li class="active_login"><a href="#tab1_login">Login</a></li>
<li><a href="#tab2_login">Register</a></li>
<li><a href="#tab3_login">Forgot?</a></li>
</ul>
<div class="tab_container_login">
<div id="tab1_login" class="tab_content_login">

<?php $register = $_GET['register']; $reset = $_GET['reset']; if ($register == true) { ?>

<h3>Success!</h3>
<p>Check your email for the password and then return to log in.</p>

<?php } elseif ($reset == true) { ?>

<h3>Success!</h3>
<p>Check your email to reset your password.</p>

<?php } else { ?>

<h3>Have an account?</h3>
<p>Log in or sign up! It&rsquo;s fast &amp; <em>free!</em></p>

<?php } ?>

<form method="post" action="<?php bloginfo('url') ?>/wp-login.php" class="wp-user-form">
<div class="username">
<label for="user_login"><?php _e('Username'); ?>: </label>
<input type="text" name="log" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" id="user_login" tabindex="11" />
</div>
<div class="password">
<label for="user_pass"><?php _e('Password'); ?>: </label>
<input type="password" name="pwd" value="" size="20" id="user_pass" tabindex="12" />
</div>
<div class="login_fields">
<div class="rememberme">
<label for="rememberme">
<input type="checkbox" name="rememberme" value="forever" checked="checked" id="rememberme" tabindex="13" /> Remember me
</label>
</div>
<?php do_action('login_form'); ?>
<input type="submit" name="user-submit" value="<?php _e('Login'); ?>" tabindex="14" class="user-submit" />
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
<input type="hidden" name="user-cookie" value="1" />
</div>
</form>
</div>
<div id="tab2_login" class="tab_content_login" style="display:none;">
<h3>Register for this site!</h3>
<p>Sign up now for the good stuff.</p>
<form method="post" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" class="wp-user-form">
<div class="username">
<label for="user_login"><?php _e('Username'); ?>: </label>
<input type="text" name="user_login" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" id="user_login" tabindex="101" />
</div>
<div class="password">
<label for="user_email"><?php _e('Your Email'); ?>: </label>
<input type="text" name="user_email" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" id="user_email" tabindex="102" />
</div>
<div class="login_fields">
<?php do_action('register_form'); ?>
<input type="submit" name="user-submit" value="<?php _e('Sign up!'); ?>" class="user-submit" tabindex="103" />
<?php $register = $_GET['register']; if($register == true) { echo '<p>Check your email for the password!</p>'; } ?>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>?register=true" />
<input type="hidden" name="user-cookie" value="1" />
</div>
</form>
</div>
<div id="tab3_login" class="tab_content_login" style="display:none;">
<h3>Lose something?</h3>
<p>Enter your username or email to reset your password.</p>
<form method="post" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" class="wp-user-form">
<div class="username">
<label for="user_login" class="hide"><?php _e('Username or Email'); ?>: </label>
<input type="text" name="user_login" value="" size="20" id="user_login" tabindex="1001" />
</div>
<div class="login_fields">
<?php do_action('login_form', 'resetpass'); ?>
<input type="submit" name="user-submit" value="<?php _e('Reset my password'); ?>" class="user-submit" tabindex="1002" />
<?php $reset = $_GET['reset']; if($reset == true) { echo '<p>A message will be sent to your email address.</p>'; } ?>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>?reset=true" />
<input type="hidden" name="user-cookie" value="1" />
</div>
</form>
</div>
</div>

<?php } else { // is logged in ?>

<div class="sidebox">
<h3>Welcome, <?php echo $user_identity; ?></h3>
<div class="usericon">
<?php global $userdata; get_currentuserinfo(); echo get_avatar($userdata->ID, 60); ?>

</div>
<div class="userinfo">
<p>You&rsquo;re logged in as <strong><?php echo $user_identity; ?></strong></p>
<p>
<a href="<?php echo wp_logout_url('index.php'); ?>">Log out</a> |
<?php if (current_user_can('manage_options')) {
echo '<a href="' . admin_url() . '">' . __('Admin') . '</a>'; } else {
echo '<a href="' . admin_url() . 'profile.php">' . __('Profile') . '</a>'; } ?>

</p>
</div>
</div>

<?php } ?>

</div>

<!-- Custom Login/Register/Password Code @ ->

Search Airheads
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.