Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.24 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <title>Benvenuto nel portale delle lezioni della sezione B</title>
  4.         <style type="text/css">
  5.         body {
  6.         color: #2F2F2F;
  7.         background: lightgrey;
  8.         }
  9.         </style>
  10.     </head>
  11.     <body>
  12.         <center>
  13.             <p>Benvenuto nel portale delle lezioni della sezione B... Tutti i diritti sono riservati.<br /><br />Effettuare l'accesso per postare o vedere le lezioni.<br />Buona copiata! XD<br /></p>
  14.             <form action="login.php" method="post">
  15.                 <table>
  16.                     <tr>
  17.                         <td>Username:</td>
  18.                         <td><input type="text" name="user"></td>
  19.                     </tr>
  20.                     <tr>
  21.                         <td>Password:</td>
  22.                         <td><input type="password" name="pass"></td>
  23.                     </tr>
  24.                 </table>
  25.                 <input type="submit" name="accedi" value="Accedi!">
  26.             </form>
  27.         </center>
  28.     <body>
  29. </html>
  30. <html>
  31.     <head>
  32.         <title>Benvenuto nel portale delle lezioni della sezione B</title>
  33.         <style type="text/css">
  34.         body {
  35.         color: #2F2F2F;
  36.         background: lightgrey;
  37.         }
  38.         </style>
  39.     </head>
  40.     <body>
  41.         <?php
  42.         $user=$_POST['user'];
  43.         $pass=$_POST['pass'];
  44.  
  45.         if ($user == "sezione_b") {
  46.             if ($pass == "password_lezioni") {
  47.                 setcookie("LezioniSezioneB","login",time()+1200);
  48.                 echo"<a href='lezioni.php'>Vedi le lezioni!</a><br /><a href='posta.php'>Posta una lezione!</a>";
  49.             }
  50.             else {
  51.                 echo "<a href='index.html'>Password errata!</a>";
  52.             }
  53.         }
  54.         else {
  55.             echo "<a href='index.html'>Username errato!</a>";
  56.         }
  57.         ?>
  58.     <body>
  59. </html>
  60. <html>
  61.     <head>
  62.         <title>Benvenuto nel portale delle lezioni della sezione B</title>
  63.         <style type="text/css">
  64.         body {
  65.         color: #2F2F2F;
  66.         background: lightgrey;
  67.         }
  68.         </style>
  69.     </head>
  70.     <body>
  71.         <?php
  72.         if($_COOKIE["LezioniSezioneB"]) {
  73.             echo "Inserisci tutti i dati.<br />";
  74.             echo "<table><form action='p_lezione.php' method='post'><tr><td>Autore:</td><td><input type='text' name='autore'></td></tr><tr><td>Data lezione:</td><td><input type='text' name='data'></td></tr><tr><td>Corsa:</td><td><textarea cols='20' rows='3' name='corsa'></textarea></td></tr><tr><td>In diagonale:</td><td><textarea cols='20' rows='3' name='diagonale'></textarea></td></tr><tr><td>Al centro:</td><td><textarea cols='20' rows='3' name='centro'></textarea></td></tr><tr><td>Alla spalliera:</td><td><textarea cols='20' rows='3' name='spalliera'></textarea></td></tr><tr><td>Test valutati:</td><td><textarea cols='20' rows='3' name='test'></textarea></td></tr></table><input type='submit' value='Invia la lezione!'></form>";
  75.         }
  76.         else{
  77.             echo "Sei stato disconnesso (sono passati 20 minuti) o stai tentando di accedere senza i permessi!<br /><a href='index.html'>Ritorna alla home e fai l'accesso</a>";
  78.         }
  79.         ?>
  80.     <body>
  81. </html>
  82. <html>
  83.     <head>
  84.         <title>Benvenuto nel portale delle lezioni della sezione B</title>
  85.         <style type="text/css">
  86.         body {
  87.         color: #2F2F2F;
  88.         background: lightgrey;
  89.         }
  90.         </style>
  91.     </head>
  92.     <body>
  93.     <?php
  94. if($_COOKIE["LezioniSezioneB"]) {
  95.     $autore=$_POST['autore'];
  96.     $data=$_POST['data'];
  97.     $corsa=$_POST['corsa'];
  98.     $diagonale=$_POST['diagonale'];
  99.     $centro=$_POST['centro'];
  100.     $spalliera=$_POST['spalliera'];
  101.     $test=$_POST['test'];
  102.  
  103.     $lezione="<i>Lezione copiata da <u>$autore</u> del <u>$data</u></i><br /><br /><table border='1'><tr><td>Corsa:</td><td>$corsa</td></tr><tr><td>In diagonale:</td><td>$diagonale</td></tr><tr><td>Al centro:</td><td>$centro</td></tr><tr><td>Alla spalliera:</td><td>$spalliera</td></tr><tr><td>Test Valutati:</td><td>$test</td></tr></table><hr />";
  104.  
  105.     $fp = fopen('_lezioni.html', 'w');
  106.     fwrite($fp, $lezione);
  107.     fclose($fp);
  108.     echo "<h4>La lezione &egrave; stata postata con successo! Grazie $autore!</h4>";
  109.     include("_lezioni.html");
  110. }
  111. else{
  112.     echo "Sei stato disconnesso (sono passati 20 minuti) o stai tentando di accedere senza i permessi!<br /><a href='index.html'>Ritorna alla home e fai l'accesso</a>";
  113. }
  114. ?>
  115. </body>
  116. </html>
  117. <html>
  118.     <head>
  119.         <title>Benvenuto nel portale delle lezioni della sezione B</title>
  120.         <style type="text/css">
  121.         body {
  122.         color: #2F2F2F;
  123.         background: lightgrey;
  124.         }
  125.         </style>
  126.     </head>
  127.     <body>
  128.     <?php
  129. if($_COOKIE["LezioniSezioneB"]) { include("_lezioni.html"); }
  130. else{
  131.     echo "Sei stato disconnesso (sono passati 20 minuti) o stai tentando di accedere senza i permessi!<br /><a href='index.html'>Ritorna alla home e fai l'accesso</a>";
  132. }
  133. ?>
  134.     <body>
  135. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement