Location: PHPKode > projects > JBB Board > jbb/passwortvergessen.php
<?
include ('mysqlvar.php');
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title></title>
	<link rel=stylesheet type="text/css" href="default.css">
</head>
<?

     include ('color.inc');
	 $siteInfo = "Passwort vergessen";
	include("head.php");
	include ('abstaende.php');

/* start TABELLEN EINSTELLUNGEN */
	$t = new tabelle;
	$t->rows = 3;
	$t->cols = 2;
	$t->einrueck = $STL;
	$t->rowspan = 11;
	$t->colspan=array(3);
	$t->klaraPfad = "bilder/klara.gif";
	$t->ra = $SBR;// reihen abstand
     $t->border=0;
	$t->sb = array("120","120","200");
	$t->doTable("open");
/* end TABELLEN EINSTELLUNGEN */
     if ($abgeschickt=="submit")
       {
          $db=mysql_connect($dbserver,$dbuser,$dbpass);
          mysql_select_db($dbname,$db);
          if ($db)
            {
               $betreff=$tt_Text[504];
               $query = "SELECT pseudonym, email, passwort FROM user WHERE pseudonym=\"".$vergessname."\" ";
               $result = mysql_query($query,$db);
               $row = mysql_fetch_array($result,MYSQL_ASSOC);
               $message = "Hi ".$row["pseudonym"]."\nDu hast also dein Passwort vergessen :)\nHier".
                          "ist es : ".$row["passwort"]." .";
               mail ($row["email"],$betreff,$message,"From: [JBB] hide@address.com");
               echo "<tr>".
                    "<td colspan=2>".$tt_Text[505]."</td></tr>".
                    "</table>";
            }
       }
   else
    {
     echo
		"<tr>".
			"<td colspan=\"3\"><img src=\"bilder/klara.gif\" width=1 height=$SBFA alt=\"\" border=\"0\"></td>".
		"</tr>".
		"<tr>\n".
			"\t<td colspan=2 class=\"forentitle\">".$tt_Text[43]."</td>\n".
			"<td>&nbsp;</td>".
		"</tr>".
		"<form action=\"passwortvergessen.php\" method = \"post\">".
          "<input type=\"hidden\" value=\"submit\" name= \"abgeschickt\">".
          "<tr>\n".
			"\t<td colspan = 2><input type=\"text\" size=\"$inputSize[1]\" name=\"vergessname\" value=\"$user\"></td>\n".
			"<td>&nbsp;</td>".
		"</tr>".
		"<tr>\n".
			"<td colspan=\"3\"><img src=\"bilder/klara.gif\" width=1 height=\"$SBFS\" alt=\"\" border=\"0\"></td>".
		"</tr>".
		"<tr>".
			"<td colspan=\"2\" align=\"left\">".
			//"<input ".$submitWidth[1]." type=\"button\" value=$valText[1] onclick=\"location.href=history.back(-1)\">".
               '<input type="button" value="'.$valText[2].'" onclick="location.href=history.back(-1)">'.

               "<img src=\"bilder/klara.gif\" width=\"$SBSB\" height=\"1\" alt=\"\" border=\"0\">".
			//"<input ".$submitWidth[1]." type=\"submit\" value=\"$valText[2]\">".
			"<input type=\"submit\" value=\"$valText[30]\">".

               "</td>".
			"<td>&nbsp;</td>".
          "</tr>".
		"</table>".
		"</form>";
     }
		htmlEnd(1,"");
	/* mysql_close($db); */

?>
Return current item: JBB Board