| ";
$errmsg.="$l_nopassword | ";
$errors=1;
}
if($password2!=$password)
{
$errmsg.="| ";
$errmsg.="$l_passwordmismatch |
";
$errors=1;
}
if($errors==1)
{
include_once('./includes/head.inc');
?>
|
";
echo "";
echo "$l_back | ";
echo "";
include_once('./includes/footer.inc');
exit;
}
$sql="select * from ".$tableprefix."_poster where entrynr='$posternr'";
if(!$result = mysql_query($sql, $db))
die("| Could not connect to the database.");
if(!$myrow=mysql_fetch_array($result))
die(" |
| Could not connect to the database.");
$rcvmail=$myrow["email"];
$pid=0;
do{
$maximum=9999999999;
if($maximum>mt_getrandmax())
$maximum=mt_getrandmax();
mt_srand((double)microtime()*1000000);
$pid=mt_rand(10000,$maximum);
$sql = "select * from ".$tableprefix."_poster where pid='$pid'";
if(!$result = mysql_query($sql, $db))
die(" |
| Could not connect to the database.");
}while($myrow=mysql_fetch_array($result));
$sql="update ".$tableprefix."_poster set pid='$pid', ";
if($prop_nopwconfirm==1)
$sql.="pwconfirmed=1, ";
else
$sql.="pwconfirmed=0, ";
$sql.="password='".md5($password)."' where entrynr='$posternr'";
if(!$result = mysql_query($sql, $db))
die(" |
Could not connect to the database.");
if($prop_nopwconfirm==0)
{
$confirmurl=$simpnews_fullurl."$basescript?$langvar=$act_lang&mode=confirmpw&poster=$posternr&pid='$pid'";
$mailmsg=str_replace("{sitename}",$sitename,$l_pwconfirmmail);
$mailmsg=str_replace("{confirmurl}",$confirmurl,$mailmsg);
if($defsignature)
$mailmsg.= "\n\n---\n$defsignature\n\n\n";
$mailmsg=str_replace("\n",$crlf,$mailmsg);
$mailmsg_html=str_replace("{sitename}",$sitename,$l_pwconfirmmail_html);
$mailmsg_html=str_replace("{confirmurl}",$confirmurl,$mailmsg_html);
if($defsignature)
$mailmsg_html.= "\n\n \n$defsignature\n\n\n";
$mailmsg_html = str_replace("\n"," ".$crlf,$mailmsg_html);
$subject = $l_pwconfirmsubject;
$subject = str_replace("{sitename}",$sitename,$subject);
$mail = new htmlMimeMail();
$mail->setCrlf($crlf);
$mail->setTextWrap($mailmaxlinelength);
$mail->setHTMLCharset($contentcharset);
$mail->setTextCharset($contentcharset);
$mail->setHTML($mailmsg_html,$mailmsg);
$mail->setSubject($subject);
if($simpnewsmailname)
$fromadr="\"$simpnewsmailname\" <$simpnewsmail>";
else
$fromadr=$simpnewsmail;
$mail->setFrom($fromadr);
$receivers=array();
array_push($receivers,$rcvmail);
if(!$insafemode)
@set_time_limit($msendlimit);
if($use_smtpmail)
{
$mail->setSMTPParams($smtpserver,$smtpport,NULL,$smtpauth,$smtpuser,$smtppasswd);
$sendresult=$mail->send($receivers, "smtp");
}
else
$sendresult=$mail->send($receivers, "mail");
do_emaillog($sendresult,$rcvmail,"proposal passwordrequest");
}
$redirect=1;
include_once('./includes/head.inc');
?>
|
|
";
echo "";
if($prop_nopwconfirm==1)
echo $l_pwset;
else
echo str_replace("{email}",$rcvmail,$l_pwrequested);
echo " | ";
if($redirectdelay>=0)
{
echo "";
echo "| ";
echo "$l_redirected |
";
}
if(isset($backurl))
{
echo "";
echo "| ";
echo "$backmsg |
";
}
echo "";
include_once('./includes/footer.inc');
exit;
?>