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 » Bullet
KLIS265 IP MICROBULLET

KLIS265 IP MICROBULLET
Euklis Microbullet - Sony FullHD - 72dB WDR - Motorized zoom 2,8 - 12 - IR - Plastic - IP66

Details

KLISLITE IP MICROBULLET-3M-VF

KLISLITE IP MICROBULLET-3M-VF
EUKLIS Microbullet - Sony 3 Megapixel - 72dB WDR - Varifocal 2,8-12 - IR - Ruggedized - IP66 - Basic Video Analytics Onboard

Details

KLISLITE IP MICROBULLET-3M-MOT

KLISLITE IP MICROBULLET-3M-MOT
Microbullet - Sony 3 Megapixel - 72dB WDR - Motorized Varifocal 2,8 - 12 - IR - Ruggedized - IP67 - Basic Video Analytics Onboard

Details

KLIS265 IPCAM-4M-IROV

KLIS265 IPCAM-4M-IROV
EUKLIS Bullet - OV 4 Megapixel - 120dB WDR - motorized zoom 2,8-12 - IR - H265 -IP67

Details

KLIS IPCAM - 3M - IRN

KLIS IPCAM-3M-IRN
Bullet - Sony 3 Megapixel - 120dB WDR - Motorized Varifocal 3-9 mm - IR - Ruggedized - IP67

Details

KLIS IPCAM-FHD-IRH

KLIS IPCAM-FHD-IRH
Bullet - Sony FullHD - 120dB WDR - Motorized Varifocal 2,8 - 11 mm - IR - Ruggedized - IP66 - Basic Video Analytics Onboard

Details

KLIS IPCAM-FHD-10X

KLIS IPCAM-FHD-10X
EUKLIS Bullet CAMERA 2MP 50/60 fps Morizzed Zoom 5.1-51mm - 32 IR LED - IP66

Details

KLIS IPCAM-4K-IR

KLIS IPCAM-4K-IR
Bullet - Sony 4k2k - 72dB WDR - Motorized Varifocal 3,5 - 8 mm - IR - Ruggedized - IP67

Details

KLIS IPCAM-4K-IR-VA

KLIS IPCAM-4K-IR-VA
Bullet - Sony 4k2k - 72dB WDR - Motorized Varifocal 3,5 - 8 mm - IR - Ruggedized - IP67 - Video Analytics Onboard

Details

KLIS MICROBULLET-JB

KLIS MICROBULLET-JB
Wall mount junction box for microbullet cameras KLIS IP MICROBULLET-3M-VF (MOT), KLIS IPCAM-FHD-IRH

Details

KLIS BULLET-PMA

KLIS BULLET-PMA
Pole mount adapter for bullet cameras KLIS IPCAM-3M-IRN, KLIS IPCAM-4K-IR

Details

KLIS BULLET-JB

KLIS BULLET-JB
Wall mount junction box for bullet cameras KLIS IPCAM-3M-IRN, KLIS IPCAM-4K-IR

Details

KLIS BULLET-PMA-JB

KLIS BULLET-PMA-JB
Pole mount junction box for bullet cameras KLIS IPCAM-3M-IRN, KLIS IPCAM-4K-IR

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