Files correlati : Ricompilazione Demo : [ ] Commento : Versione FAD del 11/10/2001 git-svn-id: svn://10.65.10.50/trunk@9917 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
		
			Executable File
		
	
	
	
	
| <?php
 | |
| 
 | |
| include("required.php");
 | |
| include("funzioni.php");
 | |
| 
 | |
| $mess = "";
 | |
| 
 | |
| if (isset ($lezione) && ($lezione != 0))
 | |
| {
 | |
| 	if (controllo_download($lezione,$validato))
 | |
| 	{
 | |
| 		$db = mysql_connect($ip, $user, $password);
 | |
| 		mysql_select_db($dataname,$db);
 | |
| 		
 | |
| 		$oggi = date("Y-m-d");
 | |
| 		$sql = "INSERT INTO $tbl_download (idutente, idlezione, data) VALUES ('"
 | |
| 		.$validato."','"
 | |
| 		.$lezione."','"
 | |
| 		.$oggi."')";
 | |
| 		//echo $sql;
 | |
| 		$ins = mysql_query($sql,$db);
 | |
| 		if ($ins)
 | |
| 		{
 | |
| 			$criteri = "SELECT * FROM $tbl_lezioni WHERE (id = $lezione)";
 | |
| 			//echo $criteri;
 | |
| 			$result = mysql_query($criteri, $db);
 | |
| 			if ($myrow = mysql_fetch_array($result))
 | |
| 				//echo $myrow["percorso"];
 | |
| 				header ("location: $myrow[percorso]");
 | |
| 			else
 | |
| 				//echo "<br><br><p class=error>Nessun record trovato!</p><br><br>";
 | |
| 				$mess = "Nessun record trovato!";
 | |
| 		}
 | |
| 		else
 | |
| 			//echo "<br><br><p class=error>Errore durante il download. Riprovare!</p><br><br>";
 | |
| 			$mess = "Errore durante il download. Riprovare!";
 | |
| 	}
 | |
| 	else
 | |
| 		//echo "<br><br><p class=error>Prima di scaricare questa lezione occorre effettuare il test della lezione precedente!</p><br><br>";
 | |
| 		$mess = "Prima di scaricare la lezione occorre effettuare il test iniziale oppure il test finale della lezione precedente!";
 | |
| }
 | |
| 
 | |
| ?>
 | |
| 
 | |
| <html>
 | |
| <head>
 | |
| 	<title>Corsi</title>
 | |
| 	<LINK rel="stylesheet" type="text/css" href="stile.css">
 | |
| </head>
 | |
| 
 | |
| <body>
 | |
| 
 | |
| <br><br><p class=error><?php echo $mess; ?></p><br><br>
 | |
| 
 | |
| <!-- <p><a href=corsi.php>Torna ai corsi</a></p> -->
 | |
| <p><a href=# onclick=history.back()>Torna</a></p>
 | |
| 
 | |
| </body>
 | |
| 
 | |
| </html>
 | |
| 
 |