$user, 'pass' => $userpass ); IF ( IN_ARRAY ( NULL, $array ) ) { DIE ( 'Invalid use of login and/or password. Please use a normal method.' ); } ELSE { RETURN $array; } } ?> $value) { if(get_magic_quotes_gpc()) $_COOKIE[$key]=stripslashes($value); $_COOKIE[$key] = mysql_real_escape_string($value); } ?> */ function strip_xss($str,$allowable_tags=false){ //daca sa setat tag care sa nu fie eliminat if(!$allowable_tags){ //facem strip_tags fara a elimina tagul(rile) dorit $rez = strip_tags($str,$allowable_tags); } //altfel else{ //facem strip_tags $rez = strip_tags($str); } //daca se introduce javascript:alert() in input if(stripos($rez, "javascript:") !== false) { //eliminam javascript: $result = str_replace("javascript:","", htmlentities($rez, ENT_QUOTES)); } //altfel else { //tranformama in entitati html, protectia este pusa pentru " onchange="alert(document.cookie); etc $result = htmlentities($rez, ENT_QUOTES); } return $result; } ?> <?=$titlu?>