[Obliquid-cvs] obliquid/common/pages/user lostpwd.php,1.2,1.3
Status: Beta
Brought to you by:
slocati
|
From: <sl...@sc...> - 2007-04-29 19:07:44
|
Update of /cvsroot/obliquid/obliquid/common/pages/user In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2585/pages/user Modified Files: lostpwd.php Log Message: html format Index: lostpwd.php =================================================================== RCS file: /cvsroot/obliquid/obliquid/common/pages/user/lostpwd.php,v retrieving revision 1.2 retrieving revision 1.3 diff -b -u -d -r1.2 -r1.3 --- lostpwd.php 26 Mar 2005 22:54:53 -0000 1.2 +++ lostpwd.php 29 Apr 2007 19:07:39 -0000 1.3 @@ -1,7 +1,7 @@ <?php /* Obliquid - PHP/XML application framework for groupware websites. - * Copyright (C) 2002,2003 Stefano Locati <in...@ob...> + * Copyright (C) 2002-2006 Stefano Locati <in...@ob...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -77,7 +77,10 @@ .$_obweb->mb->GetBooleanFieldValue(true); $ok=$_obweb->mb->QueryRow($sql, $row); if ($ok) { - for ($i=0; $i<count($field); $i++) $p[ $field[$i] ] = $row[$i]; + for ($i=0; $i<count($field); $i++) { + //$p[ $field[$i] ] = mb_convert_encoding($row[$i], "ISO-8859-15", "UTF-8"); + $p[ $field[$i] ] = htmlentities($row[$i], ENT_QUOTES, "UTF-8"); + } return $p; } else { return false; @@ -111,7 +114,8 @@ $frm["username"]=$dbf->getTextInput("username", array("maxlength" => "32")); $frm["email"]=$dbf->getTextInput("email", array("maxlength" => "128")); $frm["submit"]=$dbf->getSubmit("sendit", _l("Send"), - array("class" => "buttonform", "style" => "width: 120px")).$dbf->getHidden("action", "sendit"); + array("class" => "buttonform", "style" => "width: 120px")) + .$dbf->getHidden("action", "sendit"); return $frm; } @@ -129,14 +133,23 @@ $tpl->assign(array("p" => $p)); //get the generated message, @ suppress Smarty warnings $body = @$tpl->fetch("msg:user_lost_password"); + $body = "<html><head><title>Password dimenticata</title></head><body>" + .$body."</body></html>"; //build the extra headers $headers.="From: ".$_obweb->configparms["sitetitle"] - ." <".$_obweb->configparms["site_email"].">\r\n"; + ." <".$_obweb->configparms["site_email"].">\r\n" + ."MIME-Version: 1.0\r\n" + ."Content-type: text/html; charset=iso-8859-15\r\n"; + /* //queue the emails - $mymsg->setTXTBody($body); + $mymsg->setTxtBody($body); + //$mymsg->setHTMLBody($body); $mymsg->setHeaders($headers); $mymsg->setSendImmediately(true); $mymsg->queue($p["id_person"]); + */ + //if ($p["id_person"]==1) echo("*".$body); + mail($p["email"], $subject, $body, $headers); $_obweb->addErr(_l("Your password has been emailed")."\n","USER_NOTICE"); } header("Location: index.php"); |