janisetnies Posted March 2, 2007 Report Share Posted March 2, 2007 īsti nevarēju izdomāt kur likt, bet lai nu iet šajā sadaļā! Kā izveidot dienu skaitītāju. Piemērma norādu 03.20.2007 un man lapā rādas tik dienas un stundas ir palikušas līdz šia dienai! Kādas var kādu piemēru parādīt, vai pateikt kā meklēt google, jo nevaru pat izdomāt atslēgvārdus, vienīgias kas nāca prātā bija day count, bet neko prātīgu nevaru atrast. Gribas latviski! Link to comment Share on other sites More sharing options...
Val Posted March 2, 2007 Report Share Posted March 2, 2007 kautkas uz "countdown" pusi. Link to comment Share on other sites More sharing options...
janisetnies Posted March 2, 2007 Author Report Share Posted March 2, 2007 http://www.dynamicdrive.com/dynamicindex6/dhtmlcount.htm Atradu :) Link to comment Share on other sites More sharing options...
king999 Posted March 2, 2007 Report Share Posted March 2, 2007 <? $month = 7; $day = 28; $year = 2007; $target = mktime(0,0,0,$month,$day,$year); $diff = $target - time(); $days = ($diff - ($diff % 86400)) / 86400; $diff = $diff - ($days * 86400); $hours = ($diff - ($diff % 3600)) / 3600; $diff = $diff - ($hours * 3600); $minutes = ($diff - ($diff % 60)) / 60; $diff = $diff - ($minutes * 60); $seconds = ($diff - ($diff % 1)) / 1; echo("$days palikušas līdz dzimenei"); ?> Link to comment Share on other sites More sharing options...
hackerman Posted March 2, 2007 Report Share Posted March 2, 2007 Ar javascript ir labāk, jo php ir jārefrešo :) Link to comment Share on other sites More sharing options...
Exzo Posted March 2, 2007 Report Share Posted March 2, 2007 Ar javascript ir labāk, jo php ir jārefrešo :) Tu domā, ka lapas apmeklētāji tur karāsies dienām ilgi bez refreša? :) Link to comment Share on other sites More sharing options...
hackerman Posted March 2, 2007 Report Share Posted March 2, 2007 Nē es domāju, ka javascript iet visulaiku :) Viņam mainās sekundes utt, bet php skaitļi izmainīsies tikai pēc refreša... Link to comment Share on other sites More sharing options...
4e4en Posted March 3, 2007 Report Share Posted March 3, 2007 tad labāk kombinētu.. ka PHP padod pamata skaitļus, no kuriem atskaitīt... Link to comment Share on other sites More sharing options...
Recommended Posts