agenda
15 gennaio 2020
Elementi di programmazione:

HTML

Contenitore

<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="generator" content="AlterVista - Editor HTML"> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> </head> <body> </body> </html>


Attendere Loading

<style> .bordoloading{ position:fixed; top:0px; top:10%; top:48px; top:18px; left:50%; margin-left:-360px; margin-left:-342px; padding:6px; background-color:black; background-color:transparent; font-size:18px; font-family:monospace; font-variant:small-caps; } .loading-stile{ background-color:black; } .lampeggio { animation: blinker 1.5s linear infinite; } @keyframes blinker { 50% { opacity: 0; } } </style> <body onload="AttendereLoading()"> <div id="AttendereLoading" class="bordoloading"> <div class="" style="background-color:black;"> <span> </span> <span> <svg height="10" width="10" class="lampeggio" > <circle cx="5" cy="5" r="5" fill="orange" /> </svg> </span> <span class="loading-stile"> Loading...  <span id="percento"></span> </span> <span> </span> <span style=""></span> </div> </div> <script> function AttendereLoading() { if(document.all) {document.all["AttendereLoading"].style.visibility="hidden"; } else if (document.getElementById) { node=document.getElementById("AttendereLoading").style.visibility="hidden"; } } </script> <script> var percento=document.getElementById("percento"); var contatore=1; var intervallo=setInterval( function() { percento.innerHTML=contatore+"%"; contatore++; if (contatore===101) {clearInterval(intervallo);} } , 30000) </script>


Drop menu

<style> .bordo111d{ border:solid 0px orange;} .bordo121d{ border:solid 0px orange;} .bordo131d{ border:solid 0px orange;} .dropmenu111{ position:fixed; bottom:0px; top:0px; left:0px; width:100%; height:24px; margin:0px; padding:0px; } .dropmenu121{ position:fixed; bottom:0px; top:0px; left:50%; height:24px; margin-left:-360px; font-size:24px; color:gray; } .dropmenu131{display:none;} .dropmenu111:hover .dropmenu131{ position:fixed; bottom:0px; top:0px; left:50%; margin-left:-336px; margin-top:0px; margin-bottom:0px; padding:0px; width:672px; height:24px; height:24px; display:block; } .dropmenu111:hover .dropmenu121{display:none;} </style> <div class="dropmenu111 bordo111d"> <span class="material-icons dropmenu121 bordo121d" style="background-color:gray; color:black;"> menu </span> <div class="dropmenu131 bordo131d" style="position:relative; background-color:black;"> <span style="position:absolute; bottom:0%; left:0%; left:1%;"> <span style=" background-color:black; font-size:12px; text-transform:uppercase;"> webdesign 2020 </span> <span> <img class="icona" src="http://edoraandiamo.altervista.org/1.0/rinaldo-rasa-avatar.png" alt="" title="Rinaldo Rasa" style="width:16px; height:16px;margin:0px;padding:0px;"> </span> <a href="mailto:rinaldo.rasa@gmail.com" class="material-icons" style=" background-color:black; color:gray; font-size:18px; "> contact_mail </a> </span> <span class="material-icons" style="position:absolute;bottom:0%; left:50%; font-size:18px;" > <a href="#modale" style="font-size:24px; background-color:black; color:green; " > info</a> </span> <span class="material-icons" style="position:absolute;bottom:0%; left:76%; " > <a href="#fine" class="" style="font-size:18px; font-size:22px; background-color:black; color:orange;"> keyboard_arrow_down </a> </span> <span class="material-icons" style="position:absolute;bottom:0%; left:96%;" > <a href="#" class="" style="font-size:18px; font-size:22px; background-color:black; color:orange;" > keyboard_arrow_up </a> </span> </div> </div>


Dialogo modale

<style> .bordomodale{ border:solid 1px gray;} .bordocontenutomodale{ border:solid 1px olive;} .modale{ position:fixed; top:0;right:0;bottom:0;left:0; background-color:rgba(0,0,0,0.9); z-index:100; pointer-events:none; opacity:0; } .modale:target {pointer-events: auto; opacity:1;} .contenutomodale{ position:fixed; top:10%; left:50%; margin-left:-168px; /* width:2 */ width:336px; height:336px; background-color:rgba(0,0,0,1.0); overflow:auto; } </style> <div id="modale" class="modale bordomodale"> <a href="#" class="material-icons" style="margin:0px;padding:0px;"> cancel</a> <div class="contenutomodale bordocontenutomodale"> <p style="text-align:center;"><a class="material-icons" href="http://edoraandiamo.altervista.org/index.html"> home </a></p> </div> </div>


Fine

<style> body, main { /* background-image:url('http://noteapiedipagina.altervista.org/WWWRoot/immagini/carta01.gif'); */ background-image:url('http://edoraandiamo.altervista.org/img0/carta06.png'); </style> <div id="fine"></div>


PHP

Scrive su text.txt e logs.txt la cronologia di navigazione nel dominio

<?php $actual_link = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; $oggi_est = date("l") . " "; $oggi_est = $oggi_est . date("Y/m/d"); $oggi_est_time = date("h:i:sa"); $fp = fopen('/membri/edoraandiamo/text.txt', 'w'); fwrite($fp, $actual_link. " " .$oggi_est. " ". $oggi_est_time); fclose($fp); $myfile = fopen("/membri/edoraandiamo/logs.txt", "a") or die("Unable to open file!"); // $actual_link = "cronologia"; fwrite($myfile, "\n". $actual_link. " " .$oggi_est. " ". $oggi_est_time); fclose($myfile); ?>

Login area riservata

<!-- login.php --> <?php session_start(); /* inizia la sessione */ /* controllo Login form */ if(isset($_POST['Submit'])){ /* username e password associtea array */ $logins = array('username0' => 'password0','username1' => 'password1','username2' => 'password2'); /* associare username e password alla variabile */ $Username = isset($_POST['Username']) ? $_POST['Username'] : ''; $Password = isset($_POST['Password']) ? $_POST['Password'] : ''; /* controlla Username e Password */ if (isset($logins[$Username]) && $logins[$Username] == $Password){ /* se tutto ok */ $_SESSION['UserData']['Username']=$logins[$Username]; header("location:index2.php"); exit; } else { /* se sbagliato */ $msg="<span style='color:red'>Login non valido</span>"; } } ?> <form action="" method="post" name="Login_Form"> <table width="400" border="0" align="center" cellpadding="5" cellspacing="1" class="Table"> <?php if(isset($msg)){?> <tr> <td colspan="2" align="center" valign="top"><?php echo $msg;?></td> </tr> <?php } ?> <tr> <td colspan="2" align="left" valign="top"><h3>Login</h3></td> </tr> <tr> <td align="right" valign="top">Username</td> <td><input name="Username" type="text" class="Input"></td> </tr> <tr> <td align="right">Password</td> <td><input name="Password" type="password" class="Input"></td> </tr> <tr> <td> </td> <td><input name="Submit" type="submit" value="Login" class="Button3"></td> </tr> </table> </form> <!-- index.php --> <?php session_start(); /* Starts the session */ if(!isset($_SESSION['UserData']['Username'])){ header("location:login2.php"); exit; } ?> Loggato! <a href="logout.php">Click </a> LOGOUT. <!-- logout --> <?php session_start(); /* Starts the session */session_destroy(); /* Destroy started session */header("location:login.php"); /* Redirect to login page */exit; ?>





Modello del documento

suddivisioni

<main>

<section>
  <article>
    <header></header>
  </article>
</section>


<section id="20200115"> capitolo
  <article>
   <div>
    <date></date>
    <mark> titolo id="202001151" </mark> es.HTML
    <mark> sottotitolo id="202001151-1" </mark> es.contenitore
    <p>
    </p>
    <mark> titolo id="202001152" </mark> es.PHP
    <mark> sottotitolo id="202001152-1" </mark>
    <p>
    </p>
   </div>
  </article>
</section>


<section>
  <article>
   <footer></footer>
  <article>
</section>

</main>




cancel home


. .
menu
webdesign 2020 contact_mail info keyboard_arrow_down keyboard_arrow_up
   Loading...