- jquery dialog box
- <?php
- require_once('../../SfHelper.php');
- $sfHelper = new SfHelper();
- echo $sfHelper->load_css('ui-lightness/login');
- ?>
- <div name="form_Login" class="form_Login">
- <form id="form1" name="form1" method="post" action="<?php echo
- $sfHelper->base_url().'forms/jobseeker/'; ?>process_Login.php" >
- <table width="296" border="0" align="center" cellspacing="5">
- <tr>
- <td colspan="3">LOGIN JOB SEEKER</td>
- </tr>
- <tr>
- <td width="110">Username</td>
- <td width="18">:</td>
- <td width="209"><input type="text" name="txtUsername"
- id="txtUsername" /></td>
- </tr>
- <tr>
- <td>Password</td>
- <td>:</td>
- <td><input type="password" name="txtPassword" id="txtPassword" /></td>
- </tr>
- <tr>
- <td colspan="3">
- </td>
- </tr>
- <tr>
- <td colspan="3"><div align="center">
- <input type="submit" name="Login" id="Login" value="Login" />
- </div></td>
- </tr>
- </table>
- </form>
- </div>
- <?php
- if(isset($_GET['err']))
- {
- if($_GET['err'] == "Sorry, We Cannot found your Username")
- {
- echo '<script type="text/javascript">
- alert("Sorry, We Cannot found your Username"); </script>';
- }
- else if($_GET['err'] == "Invalid Username or Password")
- {
- echo '<script type="text/javascript">
- alert("Invalid Username or Password");</script>';
- }
- }
- ?>
- if(isset($_GET['err']))
- {
- if($_GET['err'] == "Sorry, We Cannot found your Username")
- {
- echo '<script type="application/javascript">
- $("#Login").click(function() {
- $( "#dialog-message" ).dialog({
- modal: true,
- buttons: {
- Ok: function() {
- $( this ).dialog( "close" );
- }
- }
- });
- });
- </script>';
- }
- else if($_GET['err'] == "Invalid Username or Password")
- {
- echo '<script type="application/javascript">
- $("#Login").click(function() {
- "#dialog-message2" ).dialog({
- modal: true,
- buttons: {
- Ok: function() {
- $( this ).dialog( "close" );
- }
- }
- });
- });
- </script>';
- }
- }
- <div id="dialog-message" style="display:none" >
- <p>
- <span class="ui-icon ui-icon-circle-check"
- style="float:left; margin:0 7px 50px 0;"></span>
- Sorry, We Cannot found your Username
- </p>
- </div>
- <div id="dialog-message2" style="display:none" >
- <p>
- <span class="ui-icon ui-icon-circle-check"
- style="float:left; margin:0 7px 50px 0;"></span>
- Invalid Username or Password
- </p>
- </div>
- $(document).ready(function() {
- // Code using $ as usual goes here.
- //The DOM is now loaded and can be manipulated.
- });
- echo '<script type="application/javascript">
- $(document).ready(function() {
- $("#Login").click(function() {
- $( "#dialog-message" ).dialog({
- modal: true,
- buttons: {
- Ok: function() {
- $( this ).dialog( "close" );
- }
- }
- });
- });
- });
- </script>';