Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Secondi - secondi.php

secondi.php

Caricato da:
Scarica il programma completo

  1. <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
  2. <HTML>
  3. <HEAD>
  4.  <LINK href="stile.css" rel="stylesheet" type="text/css"> <!---collegamento al folgio di stile-->
  5.   <META name="generator" content=\"screem 0.9.3, kwrite and quanta" >
  6.   <META name="author" content="dario 'radio'" >
  7.   <META name="Descriptionr" content="Riusulatato del calcolo di <?echo($to);?> secondi" >
  8.   <META http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" >
  9. <TITLE>1 000 000 000 secondi</TITLE>
  10. </HEAD>
  11. <BODY>
  12. <FORM action="index.php" method="POST" enctype="multipart/form-data">
  13. <?
  14. //QUI CONTROLLO SE LA DATA INSERITA È VALIDA, TUTTI I GIORNI VEGNONO CONSIDARATI ESISTENTI FINO AL 31
  15. $ctl=true;
  16.  
  17. if ($mese>12) {echo("Ma quanti mesi ci sono in un anno secondo te?!?"); echo("<input type=\"hidden\" name=\"ctl1\" value=\"false\">");; $ctl = false;};
  18. if ($mese>12) {echo("Mi dispiace ma il servizio è disponibile solo per date a partire dal 1970, sorry!"); echo("<input type=\"hidden\" name=\"ctl6\" value=\"false\">");; $ctl = false;};
  19. if ($ore>24) {echo("Ma quante ore ci sono in un giorno secondo te?!?"); echo("<input type=\"hidden\" name=\"ctl2\" value=\"false\">");  $ctl = false;};
  20. if ($min>59) {echo("Ma quanti minuti ci sono in un'ora secondo te?!?"); echo("<input type=\"hidden\" name=\"ctl3\" value=\"false\">"); $ctl = false;};
  21. if ($sec>59) {echo("Ma quanti secondi ci sono in un minuto secondo te?!?"); echo("<input type=\"hidden\" name=\"ctl4\" value=\"false\">"); $ctl = false;};
  22. if ($giorno>31) {echo("Ma quanti giorni ci sono in un mese secondo te?!?"); echo("<input type=\"hidden\" name=\"ctl5\" value=\"false\">"); $ctl = false;};
  23.  
  24. if ($ctl) {
  25. echo("<br><H2>A partire dal $giorno/$mese/$anno alle ore $ore:$min:$sec...</H2>");
  26.  
  27. $intnato = mktime($ore, $min, $sec, $mes, $giorno, $anno); /*QUI DATA IN FORMATO UNIX PER CALCOLO SEC*/
  28.  
  29. $int2 = $intnato+$to;/*BEH, QUI SEMPLICEMENTE VENGONO AGGIUNTI 1 MLN DI SECONDI ALLA DATA DI NASCITA*/
  30.  
  31. $int3 = strftime("%d-%m-%Y alle ore %H:%M:%S", $int2);/*QUI FORMATTO IN MODO 'LEGGIBILE' LA DATA PER IL MLD DI SEC*/
  32.  
  33. echo("<br><H2>...saranno passati $to secondi il $int3 </H2>");
  34.  
  35. echo("<input type=\"hidden\" name=\"giorno\" value=\"$giorno\">
  36.         <input type=\"hidden\" name=\"mese\" value=\"$mese\">
  37.         <input type=\"hidden\" name=\"anno\" value=\"$anno\">
  38.         <input type=\"hidden\" name=\"ore\" value=\"$ore\">
  39.         <input type=\"hidden\" name=\"min\" value=\"$min\">
  40.         <input type=\"hidden\" name=\"sec\" value=\"$sec\">");
  41.  
  42. echo("<DIV align=center><input name=\"invia\" value=\"Altro calcolo\" type=\"submit\"></DIV></form>");}
  43.  
  44. else {echo("
  45.  
  46. <DIV align=center><input name=\"invia\" value=\"Correggi l'errore\" type=\"submit\"></DIV></form>");}
  47.  
  48. echo("</FORM></BODY></HTML>");
  49. ?>