FIX :15373 Reset invalid email script

This commit is contained in:
lmarcouiller 2020-11-13 11:03:49 +01:00
commit a1f26f2b55
2 changed files with 13 additions and 2 deletions

View File

@ -793,7 +793,7 @@ if ($mode == 'standard')
if ($nextmonth > 12) { $nextmonth = 1; $nextyear++; }
// For month
$link = "<a href='".$_SERVER["PHP_SELF"]."?account=".$account.($_GET["option"] != 'all' ? '' : '&option=all')."&year=".$prevyear."&month=".$prevmonth."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Month")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".$nextyear."&month=".$nextmonth."'>".img_next('', 'class="valignbottom"')."</a>";
$link = "<a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".$prevyear."&month=".$prevmonth."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Month")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".$nextyear."&month=".$nextmonth."'>".img_next('', 'class="valignbottom"')."</a>";
print '<div class="right clearboth">'.$link.'</div>';
print '<div class="center clearboth margintoponly">';
@ -807,7 +807,7 @@ if ($mode == 'standard')
// For year
$prevyear = $year - 1; $nextyear = $year + 1;
$link = "<a href='".$_SERVER["PHP_SELF"]."?account=".$account.($_GET["option"] != 'all' ? '' : '&option=all')."&year=".($prevyear)."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Year")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".($nextyear)."'>".img_next('', 'class="valignbottom"')."</a>";
$link = "<a href='".$_SERVER["PHP_SELF"]."?account="."&year=".($prevyear)."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Year")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".($nextyear)."'>".img_next('', 'class="valignbottom"')."</a>";
print '<div class="right clearboth margintoponly">'.$link.'</div>';

View File

@ -68,6 +68,17 @@ if (!empty($login))
$db->begin();
$myfile = fopen($id, "r") or die("Unable to open file\n");
$groupofemails=array();
for ($i=0; $i < MAXEMAILS; $i++)
{
$tmp =fgets($myfile);
if ($tmp == null)
{
break;
}
$groupofemails[$i] = trim($tmp, "\n");
}
$myfile = fopen($fileofinvalidemail, "r");
if (!$myfile)