DATE_ADD(CURRENT_DATE, INTERVAL -1 DAY)) "; $qryCheckCookie = mysql_db_query($nomedb, $sql, $id_link) or muori ("cerca session",$sql,1); $nrowsCheckCookie = mysql_num_rows($qryCheckCookie); //Se la session non corrisponde con quella nel db oppure è scaduta annulla il cookie if($nrowsCheckCookie != 1){ $msg_err = "Si è verificato un errore
Siete pregati di effettuare nuovamente il login"; /*header("Location: index.php?msg_err=errore1"); exit;*/ //mettiCookie2($id_cliente,$tabella); return false; } //Preleva ID del utente else { $row = mysql_fetch_array($qryCheckCookie); //$id_session = $row["id_session"]; $id_utente = $row["id_".$tabella_utenti]; return $id_utente; } }else{//Non esiste una session quindi ridireziona alla pagina di login $msg_err = "Si è verificato un errore
Siete pregati di effettuare nuovamente il login"; /*header("Location: index.php?msg=errore2"); exit;*/ //mettiCookie2($id_cliente,$tabella); return false; } } //andare nel cookie /* vedere il num di sessione andare nella tabella sessione vedere se giusto controllare che permesso ha a questo deve vedere se la pagina visitata è visibile da quel utente */ function login($login,$password,$tabella="utente",$tabella_session = "session"){ extract($GLOBALS); $proceed = FALSE; //Verifica variabili passate $login = addslashes(substr(trim($login), 0, 50)); $passwd = addslashes(substr(trim($password), 0, 50)); if(($login != "") && ($passwd != "")) $proceed = TRUE; if($proceed): $sql = "SELECT * FROM $tabella WHERE username = '$login' AND password = '$passwd' AND (status ='on')"; $qryLogin = mysql_db_query($nomedb, $sql, $id_link) or muori ("errore login",$sql,1); $nrowsQryLogin = mysql_num_rows($qryLogin); if($nrowsQryLogin == 0): $proceed = FALSE; $msg_err = "nome utente o password errati"; return false; // exit; else: if($nrowsQryLogin > 0): $row = mysql_fetch_array($qryLogin); if($row['status']=='on'): $id_cliente = $row["id_$tabella"]; $nome = $row["nome"]; $cognome = $row["cognome"]; else: $proceed = FALSE; $msg_err = "utente non abilitato"; return false; endif; endif; $msg_err = "$id_cliente, $nome, $cognome, $proceed"; endif;//query ricerca utente da nome e pwd else: $msg_err = "nome utente o password vuoti"; return false; // exit; endif; if($proceed): if(mettiCookie($id_cliente,$tabella_session,$tabella)): return $id_cliente; else: return false; endif; else: $msg_err = "Si è verificato un errore! ripetere la procedura"; return false; // exit; endif; } function mettiCookie($id_cliente="",$tabella="session",$tabella_utenti = "utenti"){ extract($GLOBALS); $session = md5(uniqid(rand()));//valore casuale //Set il cookie fino alla chiusura del browser //echo"$session"; setcookie("session", "{$session}", time() + 3600); /*if ($tmp != 'off'): $tmp = 'on'; $sql = "INSERT INTO `clienti_tmp` (`data_iscrizione`,`note`,`status`) VALUES (NOW(),'Accesso al sito','on') "; $qryUpdateAccess = mysql_db_query($nomedb, $sql, $id_link) or die ("QUERY ERROR INSERT TMP CLIENTE"); $id_cliente = mysql_insert_id($id_link); //else: endif;*/ /**/ //Elimina eventuali session identiche dal db, quelle scadute e quelle dello stesso cliente $sql = "DELETE FROM $tabella WHERE (id_$tabella = '$session') OR (quando < DATE_ADD(CURRENT_DATE,INTERVAL -1 DAY))OR (id_$tabella_utenti = '$id_cliente')"; $qryDeleteOldSession = mysql_db_query($nomedb, $sql, $id_link) or muori ("clean session",$sql,1); /* SCRIVE NELLA SESSIONE I PERMESSI E IL COOKIE */ $sql = "SELECT id_$tabella FROM $tabella WHERE (id_$tabella = '$id_cliente')"; $qryCheckCookie = mysql_db_query($nomedb, $sql, $id_link) or muori ("get session",$sql,1); $nrowsCheckCookie = mysql_num_rows($qryCheckCookie); if($nrowsCheckCookie == 0){ $sql = "INSERT INTO $tabella (id_$tabella, id_$tabella_utenti) VALUES ('$session','$id_cliente')"; $qryInsertSession = mysql_db_query($nomedb, $sql, $id_link) or muori ("insert session",$sql,1); return true; }else{//Preleva ID del utente //$row = mysql_fetch_array($qryCheckCookie); //$id_cliente = $row["id_utente"]; $msg_err = "Si è verificato un errore (ERR:001) con le sessioni\n Siete pregati di effettuare nuovamente il login"; //header("Location: index.php?msg=msg_err"); //exit; return false; /*$sql = "INSERT INTO clienti_tmp (data_iscrizione,note,status) VALUES ('NOW()','tmp cliente','on')"; $qryUpdateAccess = mysql_db_query($nomedb, $sql, $id_link) or die ("QUERY ERROR INSERT TMP CLIENTE"); $id_cliente = mysql_insert_id($id_link); $sql_insert_session = "INSERT INTO session (id_session, id_cliente) VALUES ('$session','$id_cliente')"; $qry_insert_session = mysql_db_query($nomedb, $sql_insert_session, $id_link) or die ("QUERY ERROR 02"); return true;*/ } } ?>$larghezza)or($h>$altezza))://img > dimensioni massime if ($h > $w)://img verticale $new_w = ($w * $altezza)/$h;//calcolo nuova larghezza $new_h = $altezza;//nuova altezza = altezza massima $new_w = number_format($new_w, 0, '', '');//formatto la nuova larghezza else://img orizzontale o quadrata $new_w = $larghezza;//larghezza=larghezza massima $new_h = ($h * $larghezza)/$w;//calcol nuova altezza $new_h = number_format($new_h, 0, '', ''); //formatto nuova altezza endif; else://..altrimenti che ridimensioni a fare?!?!?!!? :-)) $new_w = $w;//larghezza invariata $new_h = $h;//altezza invariata endif; $dst_img = imagecreatetruecolor($new_w,$new_h);//creo nuova immagine if($estensione=="jpg" or $estensione[count($estensione)-1]=="jpeg")//se immagine jpg $src_img=imagecreatefromjpeg($src_img);//riempio a partire da originale elseif($estensione=="png")//se immagine png $src_img=imagecreatefrompng($src_img);//riempio a partire da originale elseif($estensione=="gif")//se immagine gif $src_img = imagecreatefromgif($src_img);//riempio a partire da originale else//immagine gif o di altro tipo non contemplato $msg_errore = "Tipo di immagine non supportato ".$nome.""; if(!isset($msg_errore)): imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $new_w+1, $new_h+1, imagesx($src_img), imagesy($src_img)); $new_file = $dir_dest.$nome; switch($estensione){ case 'jpg': imagejpeg($dst_img,$new_file, 100); break; case 'png': imagepng($dst_img,$new_file); break; case 'gif': imagegif($dst_img,$new_file); break; } imagedestroy($dst_img); /* ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w+1,$new_h+1,ImageSX($src_img),ImageSY($src_img)); //salvo tutto e distruggo l'originale ImageJpeg($dst_img,$new_file,'100'); ImageDestroy($dst_img);*/ $msg_errore="File ".$nome." correttamente ridimensionato"; endif; return($msg_errore); } ?>

Products

Home » Products » Ptz Dome
KLIS D36X-HD-WDR

KLIS D36X-HD-WDR
PTZ Dome Analogue 36x 700 TVL Outdoor

Details

KLIS MINID20X-IP-MEGA

KLIS MINID20X-IP-MEGA
PTZ Dome - Sony FullHD - 120dB WDR - Motorized AF Zoom 20x - Ruggedized - Surface Mount - 15cm diameter - IP66 - Basic Video Analytics Onboard

Details

KLIS D30X-IP-3MEGA

KLIS D30X-IP-3MEGA
PTZ Dome - Sony 3 Megapixel - 72dB WDR - Motorized AF Zoom 30X - IK10 - IP66 - Wall Mount included

Details

KLIS265 D30X-IP-3MEGA

KLIS265 D30X-IP-3MEGA
PTZ Dome - Sony 3 Megapixel - H265 -72dB WDR - Motorized AF Zoom 30X - IK10 - IP66 - Wall Mount included

Details

KLIS265 D40X-IP-3MEGA

KLIS265 D40X-IP-3MEGA
PTZ Dome - Sony 3 Megapixel - 120 dB WDR - Motorized AF Zoom 40X -H265- IK10 - IP66 - Wall Mount included

Details

KLIS D30X-IP-UDV-IR

KLIS D30X-IP-UDV-IR
IR PTZ Dome - Sony FullHD Ultra Dark Vision - 120dB WDR - Motorized AF Zoom 30X - IR LED up to 400m - Ruggedized - IP66 - Wall Mount included

Details

KLIS D30X-IP-UDV-IR500

KLIS D30X-IP-UDV-IR500
IR PTZ Dome - Sony FullHD Ultra Dark Vision - 120dB WDR - Motorized AF Zoom 30X - IR LED up to 500m - Ruggedized - IP66 - Wall Mount included

Details

KLIS MINID-W

KLIS MINID-W
Wall mount adapter for MINID20x camera

Details

KLIS MINID-CPA

KLIS MINID-CPA
Ceiling mount bracket for MINID20x camera

Details

KLIS MINID-PMA

KLIS MINID-PMA
Pole mount adapter for MINID20x camera - to be added to KLIS MINID-W

Details

KLIS MINID-CMA

KLIS MINID-CMA
Corner mount adapter for MINID20x camera - to be added to KLIS MINID-W

Details

KLIS MEGA-CPA

KLIS MEGA-CPA
Ceiling mount adapter for KLIS MEGA

Details

KLIS MEGA-CMA

KLIS MEGA-CMA
Corner mount adapter for KLIS MEGA

Details

KLIS MEGA-PMA

KLIS MEGA-PMA
Pole mount adapter for KLIS MEGA

Details

KLIS IR-WALL

KLIS IR-WALL
Wall mount adapter for KLIS IR

Details

KLIS IR-CPA

KLIS IR-CPA
Ceiling mount adapter for KLIS IR

Details

KLIS IR-CMA

KLIS IR-CMA
Corner mount adapter for KLIS IR

Details

KLIS IR-PMA

KLIS IR-PMA
Pole mount adapter for KLIS IR

Details

DBA-PWR

DBA-PWR
Outdoor power box

Details


NEWS

New opportunities thanks to EUKLIS KLIS LPC

EUKLIS KLIS LPC is the new "License Plate Capture Camera" ideal for working with OCR software used for automatic plate r ...

Nuovi Corsi Genetec 2018

Iscriviti, non perdere l’occasione !La certificazione Genetec è fondamentale per gestire al meglio un sistema "Security ...

GEN ANALYTICS

GSG InternationAL is pleased to present EUKLIS KLIS GEN ANALYTICS Thanks to KLIS GEN ANALYTICS, all EUKLIS cameras equipped with v ...


EUKLIS S.r.l. Start Up Innovativa - P.IVA: 09967770968