data_seek($row); $datarow = $res->fetch_array(); return $datarow[$field]; } function ip() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) $ip=$_SERVER['HTTP_CLIENT_IP']; elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; else $ip=$_SERVER['REMOTE_ADDR']; return $ip; } function so(){ $userAgent = $_SERVER['HTTP_USER_AGENT']; $userAgent = strtolower ($userAgent); if(strpos($userAgent, "windows") !== false) return 'Windows'; if(strpos($userAgent, "linux") !== false) return 'Linux'; } function ew() { $user_agent = $_SERVER['HTTP_USER_AGENT']; $navegadores = array( 'Opera' => 'Opera', 'Chrome' => 'Chrome', 'Mozilla Firefox'=> '(Firebird)|(Firefox)', 'Galeon' => 'Galeon', 'Mozilla'=>'Gecko', 'MyIE'=>'MyIE', 'Lynx' => 'Lynx', 'Netscape' => '(Mozilla/4\.75)|(Netscape6)|(Mozilla/4\.08)|(Mozilla/4\.5)|(Mozilla/4\.6)|(Mozilla/4\.79)', 'Konqueror'=>'Konqueror', 'Internet Explorer 7' => '(MSIE 7\.[0-9]+)', 'Internet Explorer 6' => '(MSIE 6\.[0-9]+)', 'Internet Explorer 5' => '(MSIE 5\.[0-9]+)', 'Internet Explorer 4' => '(MSIE 4\.[0-9]+)', ); foreach($navegadores as $navegador=>$pattern){ if (eregi($pattern, $user_agent)) return $navegador; } return 'Desconocido'; } function unlogin(){ session_destroy(); setcookie("user", "", time()+86400, "/", "www.opticasiris.com.mx", 0); } function isUser($x){ if ($_SESSION['user'] == ""){ if ($x) unlogin(); return false; }else return true; } function val($u, $wun){ switch($wun){ case 1: $p = "1234567890"; break; case 9: $p = "1234567890."; break; case 2: $p = "abcdefghijklmnñopqrstuvwxyzáéíóú. "; break; case 3: $p = "abcdefghijklmnñopqrstuvwxyzáéíóú1234567890 "; break; case 4: $p = "abcdefghijklmnñopqrstuvwxyzáéíóú1234567890=+/ "; break; case 5: $p = "abcdefghijklmnñopqrstuvwxyzáéíóú1234567890=+/_-:.;, "; break; case 6: $p = "1234567890,:"; break; case 7: $p = "1234567890/"; break; case 8: $p = "abcdefghijklmnñopqrstuvwxyzáéíóú1234567890@;,:.-_+"; break; } $u = @strtolower($u); $n = false; for ($i=0; $i<@strlen($u); $i++){ if (@strpos($p, @substr($u,$i,1))===false) {$n = true; break;} } return $n; } function sMail($title, $subtitle){ return '
Centro de verificación de cuentas

Armesis BlurHouse Seguridad

'.$title.'
 

'.$subtitle.'

Ir a ópticas iris
Armesis Software AG Orizaba, México
'; } ?>