atikons Posted November 14, 2005 Author Report Share Posted November 14, 2005 Nu tad galu galā: $n = explode("-", $row['e_date']); $year = $n[0]; $month = $n[1]; $day = $n[2]; $now=mktime(); $time=mktime(0,0,0,$month,$day,$year); $agetime=$time-$now; $agetime = ($agetime/60/60/24)+1; $intval = intval($agetime); if ($agetime > 0) { if ($agetime > 0 && $agetime < 1 ) { $dienas = "Licence beidzas šodien!"; } else if ($intval == 11) { $dienas = "Vēl ir palikušas ".$intval." dienas!"; } else if ($agetime%10 ==1) { $dienas = "Vēl ir palikusi ".$intval." diena!"; } else if ($agetime > -1 && $agetime <=0) { $dienas = "Šī licence ir beigusies!"; } else { $dienas = "Vēl ir palikušas ".$intval." dienas!"; } } else { $dienas = "Šī licence ir beigusies!"; } Link to comment Share on other sites More sharing options...
Klez Posted November 14, 2005 Report Share Posted November 14, 2005 pasties te, mok tavu domu sapratu ... http://imo.popular.lv/testi/1.php Link to comment Share on other sites More sharing options...
Recommended Posts