//func=GetImmagine----> &Id=P001 oppure S00001 (Id Img) Data Id dà Immagine case "GetImmagine": $ric = new CRicercaImmagini(); $IdImmagine = mysql_escape_string($_GET["Id"]); $Risultato = $ric->RicercaImmagine($IdImmagine); echo $Risultato; break; //func=SpotProdWeb PER WEB: Restituisce i prodotti osservati dell' utente Loggato //func=SpotProdWeb PER WEB: Restituisce i prodotti osservati dell' utente Loggato case "SpotProdWeb": $Controllore = new CSpotlight(); echo $Controllore->RicercaProdottiOsservati(); break; case "GetNomeCognome": $Controllore = new CSpotlight(); $Risultato = $Controllore->RicercaProdottiOsservati(); echo $Risultato; break; //func=Reg ----> tramite POST email password nome cognome //func=Reg ----> tramite POST email password nome cognome case "Reg": $nome = mysql_escape_string($_POST['nome']); $cognome = mysql_escape_string($_POST['cognome']); $email = mysql_escape_string($_POST['email']); $passwd = mysql_escape_string($_POST['password']); $Controllore = new CRegistrazione(); echo $Controllore->Registrazione($nome, $cognome, $passwd, $email); break; //func=LogIn -----> tramite POST email e password //func=LogIn -----> tramite POST email e password case "LogIn":
$passwd = mysql_escape_string($_POST['password']); $Controllore = new CLogInOut(); echo $Controllore->LogIn($email, $passwd); break; //Effettua il login //Effettua il login case "checkLoggato": header('Content-Type: text/html'); $Controllore = new CLogInOut(); echo $Controllore->isLoggato(); break; //func=SpotProdWeb PER WEB: Restituisce i prodotti osservati dell' utente Loggato //func=SpotProdWeb PER WEB: Restituisce i prodotti osservati dell' utente Loggato case "SpotProdWeb": $Controllore = new CSpotlight(); echo $Controllore->RicercaProdottiOsservati(); break; //func=LogInAdmin ----> tramite POST username e password // è il LogIn per accedere come amministratore //func=LogInAdmin ----> tramite POST username e password // è il LogIn per accedere come amministratore case "LogInAdmin": $Username = mysql_escape_string($_POST['username']); $password = mysql_escape_string($_POST['password']); $Controllore = new CLogInOut(); $Risultato = $Controllore->LoginAdmin($Username, $password); echo $Risultato; break; //func=LogOut //func=LogOut case "LogOut": $Controllore = new CLogInOut(); $Controllore->LogOut();