Foros del Web » Programando para Internet » Javascript » Frameworks JS »

Ext - Login

Estas en el tema de Ext - Login en el foro de Frameworks JS en Foros del Web. hola, agradecere mucho su ayuda, ya que tengo un problema desde hace ya un buen tiempo...tengo un login en ext.js que no me permite ingresar ...
  #1 (permalink)  
Antiguo 09/05/2013, 10:39
 
Fecha de Ingreso: febrero-2013
Ubicación: Lima
Mensajes: 301
Antigüedad: 11 años, 2 meses
Puntos: 5
Exclamación Ext - Login

hola, agradecere mucho su ayuda, ya que tengo un problema desde hace ya un buen tiempo...tengo un login en ext.js que no me permite ingresar a la interfaz de la web, modifique una y otra vez pero no doy con la solucion a este problema....les comparto el codigo esperando me puedan ayudar a encontrar el error:
LOGIN.JS
Código Javascript:
Ver original
  1. xt.QuickTips.init();
  2.  
  3. Ext.onReady(function(){
  4.  
  5.     var fp = new Ext.FormPanel({
  6.         id: 'status-form',
  7.         renderTo: Ext.getBody(),
  8.         labelWidth: 75,
  9.         frame: true,
  10.         monitorValid:true,
  11.         width: 350,
  12.         buttonAlign: 'right',
  13.         border: false,
  14.         bodyStyle: 'padding:10px 10px 0;',
  15.         defaults: {
  16.             anchor: '95%',
  17.             allowBlank: false,
  18.             selectOnFocus: true,
  19.             msgTarget: 'side'
  20.         },
  21.         items:[{
  22.             xtype: 'textfield',
  23.             fieldLabel: 'Usuario',
  24.             name: 'login',
  25.             minLength: 2,
  26.             blankText: 'Ingrese su Usuario'
  27.         },{
  28.             xtype: 'textfield',
  29.             fieldLabel: 'Password',
  30.             name: 'password',
  31.             minLength: 2,
  32.             inputType: 'password',
  33.             allowBlank:false,
  34.             blankText: 'Ingrese su Clave'
  35.         }],
  36.         buttons: [{
  37.             text: 'Ingresar',
  38.             visible: false,
  39.             handler: function(){
  40.                 if(fp.getForm().isValid()){
  41.                     var sb = Ext.getCmp('form-statusbar');
  42.                     sb.showBusy('Validando...');
  43.                     fp.getEl().mask();
  44.                     fp.getForm().submit({
  45.                         url: 'fake.php',
  46.                         success: function(){
  47.                             sb.setStatus({
  48.                                 text:'Validacion Completa::::Bienvenido...!',
  49.                                 iconCls:'',
  50.                                 clear: true
  51.                             });
  52.                             fp.getEl().unmask();
  53.                             var redirect = "../../Main2/index.php";
  54.                             window.location = redirect;
  55.                         }
  56.                     });
  57.                 }
  58.             }
  59.         },{
  60.             text: 'Cancelar',
  61.             visible: false
  62.             }]
  63.     });
  64.  
  65.     new Ext.Panel({
  66.         title: 'Ingrese Datos',
  67.         renderTo: Ext.getBody(),
  68.         width: 350,
  69.         autoHeight: true,
  70.         layout: 'fit',
  71.         items: fp,
  72.         bbar: new Ext.ux.StatusBar({
  73.             id: 'form-statusbar',
  74.             defaultText: 'Ingrese Datos',
  75.             plugins: new Ext.ux.ValidationStatus({form:'status-form'})
  76.         })
  77.     });
  78.  
  79. });
Fake.php
Código PHP:
Ver original
  1. <?php
  2. include "../../Conexion/cnx_php.php";
  3. //obtenemos los valores de nuestro login
  4. $user = $_POST['login'];
  5. $pass = $_POST['password'];
  6. $result = mssql_query("select * from SRM_LOGIN where login= '$user' and password = '$pass'");
  7. $row = mssql_fetch_array($result);
  8.  
  9. //Realiza la validacion de Usuarios
  10.  
  11. if($row['login'] == $user && $row['password'] == $pass){
  12.      echo "{success:true}";
  13. }else{
  14.      //echo "{success:false, errors: { reason: 'Password error.' }}";
  15.      echo "{success:false}";
  16.     }
  17. ?>
Login.php
Código PHP:
Ver original
  1. <?php
  2. include "../../Conexion/cnx_php.php";
  3. ?>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  8. <title>::::</title>
  9.  
  10.     <link rel="stylesheet" type="text/css" href="css/ext-all.css" />
  11.     <script type="text/javascript" src="ext-base.js"> </script>
  12.     <script type="text/javascript" src="ext-all.js"> </script>
  13.     <script type="text/javascript" src="StatusBar.js"> </script>
  14.  
  15.     <link rel="stylesheet" type="text/css" href="css/StatusBar.css" />
  16.     <script type="text/javascript" src="ValidationStatus.js"> </script>
  17.     <script type="text/javascript" src="login.js"> </script>
  18.  
  19.     <link rel="stylesheet" type="text/css" href="css/examples.css" />
  20.  
  21.     <style>
  22.         .list {
  23.             list-style-image:none;
  24.             list-style-position:outside;
  25.             list-style-type:square;
  26.             padding-left:16px;
  27.         }
  28.         .list li {
  29.             font-size:11px;
  30.             padding:3px;
  31.         }
  32.     </style>
  33. </head>
  34. <body background="Logo2.jpg">
  35.  
  36.     <table border=0 style="position:absolute;top:40px;left:40px;" width=50%>
  37.         <tr>
  38.             <td><img src="logo.png" /></td>
  39.             <td>
  40.                 <div id="logo">            
  41.                     <h1><font color= white>Login</h1>
  42.                     <p>Bienvenido! Por favor inicie su sesión...</p>
  43.                 </div>
  44.             </td>
  45.         </tr>
  46.     </table>
  47.  
  48. <div id="form-statusbar" ></div>
  49.  
  50. </body>
  51. </html>
Cnx_php.php
Código PHP:
Ver original
  1. <?php
  2. mssql_connect('E-LCCC3-7284\SQL2', 'sa', 'atent0') or die("No fue posible conectar con el servidor");
  3. mssql_select_db('Base_Fija') or die("No fue posible selecionar la base de datos");
  4. ?>
  #2 (permalink)  
Antiguo 09/05/2013, 10:43
 
Fecha de Ingreso: abril-2008
Ubicación: El Salvador
Mensajes: 736
Antigüedad: 16 años
Puntos: 47
Respuesta: Ext - Login

Cual es el problema en si??
Te genera algun error??
  #3 (permalink)  
Antiguo 09/05/2013, 10:46
 
Fecha de Ingreso: febrero-2013
Ubicación: Lima
Mensajes: 301
Antigüedad: 11 años, 2 meses
Puntos: 5
Respuesta: Ext - Login

no, el problema es que se queda pensando....y no autentica el user no el password....ese es el problema en si....

Etiquetas: ext, html, login, php, select, sql, usuarios
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:20.