Foros del Web » Programando para Internet » PHP »

[Ayuda] 1 Problemon

Estas en el tema de [Ayuda] 1 Problemon en el foro de PHP en Foros del Web. Hola quisiera ver si alguien me puede ayudar a este problema que tengo. (Agregar codigo de veirificacion para inicio de seccion) Código: http : // ...
  #1 (permalink)  
Antiguo 12/05/2009, 16:57
 
Fecha de Ingreso: marzo-2009
Mensajes: 25
Antigüedad: 15 años
Puntos: 0
[Ayuda] 1 Problemon

Hola quisiera ver si alguien me puede ayudar a este problema que tengo.

(Agregar codigo de veirificacion para inicio de seccion)

Código:
http : // i43 . tinypic . com / fxq7v5 .jpg
Cita:
Para ver imagen quita los espacios ^^
Codigo PHP de la imagen (Panel de Inicio De Usuarios).

Código:
<?php if ((isset($_SESSION['pass'])) && (isset($_SESSION['user'])))
{
echo "<form action=' ' method='post' name='logout_account' id='logout_account'>
               <script src='/template/season4/js/clock.js' type='text/javascript'></script>
                 <table border='0' cellspacing='0' cellpadding='0' style='height: 120px; width: 174px'>
                            <tr>
                              <td height='10' class='style16'><div align='center'><script src='/template/season4/js/date_time.js' type='text/javascript'></script>
                             <span class='style5'><br>$_SESSION[user]</span>.</td></div>

                              </tr>
                            <tr>
                              <td style='height: 20px' class='style16'><div align='center'><script src='/template/season4/js/fecha.js' type='text/javascript'></script></td></div>
                              </tr>
                            <tr>
                              <td  style='height: 20px'><div align='center' class='clock' id='liveclock'></div></td>
                              
                            </tr>
                            <tr>

                              <td width='174' height='35'><div align='center'><input name='logoutaccount' type='hidden' id='logoutaccount' value='logoutaccount'>
                                  <input name='Submit' type='image' src='/template/season4/images/logout_button.gif' border='0' title='SALIR'>
                              </div></td>
                               </tr>
                            <tr>
                              <td width='174' height='20'><div align='center' title='Panel de Control' ><a href='usuario.htm'><font color='#ffffff'>Panel de Control</font></a></div></td>
                            </tr>
                          </table>
                        </form>";

}
else
{
echo "<form action=' ' method='post' name='login_account' id='login_account'>                 
						<table style='width: 100%; height: 132px' cellspacing='0' cellpadding='0'>
							<tr>
								<td style='width:2px; height: 73px'>
								</td>
								<td style='height: 73px'>
								<table style='width: 96%; height: 71px' cellspacing='0' cellpadding='0'>

									<tr>
										<td style='width: 156px'>
										<table style='width: 92%; height: 75px;' cellspacing='0' cellpadding='0'>
											<tr>
												<td class='style16' style='height: 10px'>
												Usuario</td>
											</tr>
											<tr>

												<td>
												<input name='login' type='text' class='input_login' id='login' title='Usuario' size='15' maxlength='10' style='height: 16px; width: 90px;'>
                                                                                            <input name='account_login' type='hidden' id='account_login' value='account_login'></td>
											</tr>
											<tr>
												<td class='style16' style='height: 10px'>
												Contraseña</td>
											</tr>

											<tr>
												<td>
												<input name='pass' type='password' class='input_login' id='pass' title='Contraseña' size='15' maxlength='10' style='height: 16px; width: 90px;'></td>
											</tr>
										</table>
										</td>
										<td>
										<table style='width: 70px; height: 78px' cellspacing='0' cellpadding='0'>
											<tr>

												<td style='height: 24px'></td>
											</tr>
											<tr>
												<td style='height: 35px'>
												<input name='Submit' type='image' src='/template/season4/images/button_login.gif' style='border: 0px solid #000000;' onclick='return check_id2()' title='ENTRAR'></td>
											</tr>
											<tr>
												<td>&nbsp;</td>
											</tr>

										</table>
										</td>
									</tr>
								</table>
								</td>
							</tr>
														<tr>
								<td style='width:2px; height: 15px'></td>
								<td style='height: 15px' class='style16'>Código de verificación</td>

							</tr>
							<tr>
								<td style='width:2px; height: 10px'></td>
								<td style='height: 10px'>
								<table style='width: 100%' cellspacing='0' cellpadding='0'>
									<tr>
										<td style='width: 78px'><input name='verifyinput3' type='text' class='input_login' id='verifyinput3' size='7' maxlength='5' style='height: 16px'></td>
										<td><img alt='' src='image_login_verify.gif'></td>
									</tr>

								</table>
								</td>
							</tr>
							<tr>
								<td style='width:2px; height: 25px'></td>
								<td style='height: 25px' class='style16'><a href='recuperarpassword.htm'><font color='#ffffff'>Olvidaste tu contraseña?</font></a></td>
							</tr>
							</table>

						</form>";

                                         } ?>
Para hacer seccion requiere de login.class.php
Código:
function login()
{
     if (isset($_POST["account_login"]))
           {
                require("sys_/config.php");
                $accountid = stripslashes($_POST['login']);
                $passwordid = stripslashes($_POST['pass']);
                $accountid = clean_var($accountid);
                $passwordid = clean_var($passwordid);
                if (($accountid == NULL) || ($passwordid == NULL)) {}
                if($muweb['md5'] == 1){
                $login_check = $db->Execute("SELECT * FROM   dbo.MEMB_INFO WHERE  memb___id =? AND   memb__pwd = [dbo].[fn_md5](?,?)",array($accountid,$passwordid,$accountid)); }
                elseif ($muweb['md5'] == 0){
                $login_check = $db->Execute("SELECT * FROM   dbo.MEMB_INFO WHERE  memb___id =? AND   memb__pwd =?",array($accountid,$passwordid)); }
                $login_result = $login_check->numrows();
                    if ($login_result == 0) { echo('<script language="Javascript">alert("Nombre de usuario y/o contraseña no válidos!");</script>');}
                    if ($login_result > 0) 
                         {
                             $_SESSION['user'] = $accountid;
                             $_SESSION['pass'] = $passwordid;
                             jump('index.htm');
                          }



           }
                    
                           if (isset($_POST["logoutaccount"]))
                                  { 
                                        unset($_SESSION['user']);
                                        unset($_SESSION['pass']);
                                        jump('index.htm');
                                   }



            



}
codigo php de image_login_verify.gif

Código:
<?php
session_start();

// generate 5 digit random number
$rand = rand(10000, 99999);

// create the hash for the random number and put it in the session
$_SESSION['image_login_value'] = md5($rand);

// create the image
$image = imagecreate(50, 20);

// use white as the background image
$bgColor = imagecolorallocate ($image, 0, 0, 0);

// the text color is black
$textColor = imagecolorallocate ($image, 255, 255, 255);

// write the random number
imagestring ($image, 4, 5, 2, $rand, $textColor);

// send several headers to make sure the image is not cached
// taken directly from the PHP Manual

// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");


// send the content type header so the image is displayed properly
header('Content-type: image/gif');

// send the image to the browser
imagejpeg($image);

// destroy the image to free up the memory
imagedestroy($image);
?>
Yo necesito saber como hacerle el llamado a image_login_verify.gif para que cuando lo escriban y este incorrecto les de el error.

Yo se que eso se pone en el idex o en login.clas.php

De atemano muchas gracias y esperando sus respuestas


PD: No quiero cambiar este codigo por un captcha con letras.
  #2 (permalink)  
Antiguo 14/05/2009, 20:00
 
Fecha de Ingreso: marzo-2009
Mensajes: 25
Antigüedad: 15 años
Puntos: 0
Respuesta: [Ayuda] 1 Problemon

Reabro- Post para que me ayuden en este problema que tengo por favor.
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 05:55.