Location: PHPKode > projects > ToplistHost > toplisthost/listpassword.php
<?php

include("funktions.php");
openmysql();
$config=loadconfig();


if(!$mail) {
	$post=gettext2('listadmin_lostpassword1');
	printhtml(gettext2('listadmin_lostpassword2'),$post);
	exit;
}


$result=mysql_query("select liste, pass from ft_all_liste where mail='$mail'");
if(mysql_num_rows($result) == 0) {
	$post.="Diese E-Mailadresse befindet sich nicht in unserer Datenbank!";
} else {
	list($login, $pass)=mysql_fetch_row($result);
	$text=preg_replace("/{login}/", "$login", gettext2('listadmin_lostpassword4'));
	$text=preg_replace("/{pass}/", "$pass", $text);
	mail($mail, gettext2('listadmin_lostpassword2'), "$text","From: $config[8]");
	$post=gettext2('listadmin_lostpassword3');
}
	printhtml(gettext2('listadmin_lostpassword2'),$post);

exit;
function printhtml($titel, $post) {
	$welches=2;
	$toreplace=array("titel" => "$titel",
				"post" => "$post"
	);

	#Interne Funktionen
	$result=mysql_query("SELECT html FROM ft_sys_templates WHERE welches=$welches");
	$zeile=mysql_fetch_row($result);
	while(list($key, $val)=each($toreplace)) {
		$zeile[0]=ereg_replace("\{".$key."\}","$val", $zeile[0]);
	}
	print $zeile[0];
}

?>
Return current item: ToplistHost