Changeset 4065 for extensions/Mail_supervisor/include
- Timestamp:
- Oct 20, 2009, 12:57:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Mail_supervisor/include/fonctions.php
r4059 r4065 173 173 $data = mysql_fetch_array(pwg_query($query)); 174 174 //==================================================================================== 175 176 177 $mails_periode="+".str_replace($period_search, $period_match, $data['nb_mails_periode']); 178 $next_day = strtotime( $mails_periode,$data['date_mail']); 179 $data['rest_mail']= ( $next_day )-time() ; 180 175 $mails_periode = "+" . trim( str_replace($period_search, $period_match, $data['nb_mails_periode'])); 176 177 $next_day = $data['date_mail'] + strtotime( $mails_periode,0);; 178 $data['rest_mail']= $next_day - time() ; 179 181 180 182 181 $spams_periode="+".str_replace($period_search, $period_match, $data['nb_spams_periode']); 183 $next_day = strtotime( $spams_periode,$data['date_spam']);184 $data['rest_spam']= ( $next_day )-time() ;182 $next_day = $data['date_spam'] + strtotime( $spams_periode,0); 183 $data['rest_spam']= $next_day -time() ; 185 184 186 185 187 186 $quarantaine_periode="+".str_replace($period_search, $period_match, $data['quarantaine_periode']); 188 $next_day = strtotime( $quarantaine_periode,$data['date_quarantaine']); 187 $next_day = $data['date_quarantaine'] + strtotime( $quarantaine_periode,0); 188 189 189 if ($data['quarantaine']) { 190 190 $data['reste'] = ( $next_day )-time() ; … … 224 224 function int_to_heure($int) 225 225 { 226 $week= (int) ($int/(3600*24*7)); 227 $int=$int-($week*(3600*24*7)); 228 229 $day= (int) ($int/(3600*24)); 230 $int=$int-($day*(3600*24)); 231 232 $heures=(int) ($int/3600); 233 234 $int=$int-($heures*(3600)); 235 236 $minutes=(int) ($int/60); 237 $int= $int - ($minutes*(60)); 226 227 228 229 $delta=(7*24*60*60) ; 230 $week = (int) ($int/$delta); 231 232 $int= $int-($week*$delta) ; 233 234 235 $delta=(24*60*60) ; 236 $day= (int) ($int/$delta); 237 $int=$int-($day*$delta); 238 239 $delta=(60*60) ; 240 $heures=(int) ($int/$delta); 241 $int=$int-($heures*$delta); 242 243 $delta=(60) ; 244 $minutes=(int) ($int/$delta); 245 $int= $int - ($minutes*$delta); 246 238 247 239 248 $secondes=(int) ($int); 240 249 241 $heures= substr ('00'. $heures,-2,2); 242 $day= substr ('00'. $day,-2,2); 243 $minutes=substr ('00'.$minutes,-2,2); 244 $secondes=substr ('00'.$secondes,-2,2); 245 250 $day = substr ('00'. $day,-2,2); 251 $heures = substr ('00'. $heures,-2,2); 252 $minutes = substr ('00'.$minutes,-2,2); 253 $secondes = substr ('00'.$secondes,-2,2); 254 255 246 256 if ($week > 0 ) 247 257 { 248 249 return $week. " " .l10n('Week'). " " . $day . " " .l10n('Day'). "s ". $heures . " ". l10n('Hour'). "s " . $minutes. " " .l10n('minute'). "s ". $secondes." " .l10n('seconde')."s"; 258 return $week. " " .l10n('Week'). " " . $day . " " .l10n('Day'). "s ". $heures . " ". l10n('Hour'). "s " . $minutes. " " .l10n('minute'). "s ". $secondes." " .l10n('seconde')."s"; 250 259 } 251 260 return $day . " " .l10n('Day'). "s ". $heures . " ". l10n('Hour'). "s " . $minutes. " " .l10n('Minute'). "s ". $secondes." " .l10n('Seconde')."s";
Note: See TracChangeset
for help on using the changeset viewer.