Fix: lien invalide

Fix: requete invalide ou obsolete
Add: début ajout possibilité de définir un style css aux mailings (background-image,
 etc...)
This commit is contained in:
Regis Houssin 2009-05-19 02:43:03 +00:00
parent c3904dbb61
commit dcb54f5321
2 changed files with 14 additions and 5 deletions

View File

@ -109,7 +109,7 @@ if (sizeof($import->array_import_code))
} }
print '<tr class="total"><td class="total" colspan="2" align="center"><form action="'.DOL_URL_ROOT.'/admin/import.php?leftmenu=import"><input type="submit" class="button" value="'.$langs->trans("NewImport").'"></form></td></tr>'; print '<tr class="total"><td class="total" colspan="2" align="center"><form action="'.DOL_URL_ROOT.'/imports/import.php?leftmenu=import"><input type="submit" class="button" value="'.$langs->trans("NewImport").'"></form></td></tr>';
} }
else else
{ {
@ -117,7 +117,7 @@ else
} }
print '</table>'; print '</table>';
/*
// Affiche les profils d'exports // Affiche les profils d'exports
$sql = "SELECT rowid, label, public, fk_user, ".$db->pdate("datec"); $sql = "SELECT rowid, label, public, fk_user, ".$db->pdate("datec");
$sql .= " FROM ".MAIN_DB_PREFIX."export as e"; $sql .= " FROM ".MAIN_DB_PREFIX."export as e";
@ -151,7 +151,7 @@ if ($result)
print "</table>"; print "</table>";
} }
*/
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';

View File

@ -695,11 +695,20 @@ class CMailFile
* @param unknown_type $msg * @param unknown_type $msg
* @return unknown * @return unknown
*/ */
function checkIfHTML($msg) function checkIfHTML($msg,$bg='')
{ {
if (!eregi('^[ \t]*<html',$msg)) if (!eregi('^[ \t]*<html',$msg))
{ {
$out = "<html><head><title></title></head><body>"; $out = "<html><head><title></title>";
if (!empty($bg))
{
$out.= '<style type="text/css">'
. 'body {'
. ' background-image: url("cid:'.$bg.'");'
. '}'
. '</style>';
}
$out.= "</head><body>";
$out.= $msg; $out.= $msg;
$out.= "</body></html>"; $out.= "</body></html>";
} }