1 | <?php |
---|
2 | include_once("./includes/ctrlacc.php"); |
---|
3 | include_once("./idiomas/php/".$idioma."/nada_".$idioma.".php"); |
---|
4 | // ########################################################################################################## |
---|
5 | // ############### PARA SABER QUE IP TIENE EL DISPOSITIVO QUE ESTA UTILIZANDO OPENGNSYS ################### |
---|
6 | // ########################################################################################################## |
---|
7 | //Para saber la IP con Proxy o sin el |
---|
8 | |
---|
9 | function getRemoteInfo () { |
---|
10 | $proxy=""; |
---|
11 | $IP = ""; |
---|
12 | if (isSet($_SERVER)) { |
---|
13 | if (isSet($_SERVER["HTTP_X_FORWARDED_FOR"])) { |
---|
14 | $IP = $_SERVER["HTTP_X_FORWARDED_FOR"]; |
---|
15 | $proxy = $_SERVER["REMOTE_ADDR"]; |
---|
16 | } elseif (isSet($_SERVER["HTTP_CLIENT_IP"])) { |
---|
17 | $IP = $_SERVER["HTTP_CLIENT_IP"]; |
---|
18 | } else { |
---|
19 | $IP = $_SERVER["REMOTE_ADDR"]; |
---|
20 | } |
---|
21 | } else { |
---|
22 | if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) { |
---|
23 | $IP = getenv( 'HTTP_X_FORWARDED_FOR' ); |
---|
24 | $proxy = getenv( 'REMOTE_ADDR' ); |
---|
25 | } elseif ( getenv( 'HTTP_CLIENT_IP' ) ) { |
---|
26 | $IP = getenv( 'HTTP_CLIENT_IP' ); |
---|
27 | } else { |
---|
28 | $IP = getenv( 'REMOTE_ADDR' ); |
---|
29 | } |
---|
30 | } |
---|
31 | if (strstr($IP, ',')) { |
---|
32 | $ips = explode(',', $IP); |
---|
33 | $IP = $ips[0]; |
---|
34 | } |
---|
35 | $RemoteInfo[0]=$IP; |
---|
36 | $RemoteInfo[1]=@GetHostByAddr($IP); |
---|
37 | $RemoteInfo[2]=$proxy; |
---|
38 | |
---|
39 | return $RemoteInfo[0]; |
---|
40 | } |
---|
41 | |
---|
42 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
43 | |
---|
44 | // ########################################################################################################## |
---|
45 | // ############### PARA SABER QUE TIPO DISPOSITIVO ESTA UTILIZANDO OPENGNSYS ############################## |
---|
46 | // ########################################################################################################## |
---|
47 | $device=""; |
---|
48 | $device = strtolower($_SERVER['HTTP_USER_AGENT']); |
---|
49 | if(stripos($device,'iphone') == TRUE ){$device="iphone";$tipodevice="Iphone / Ipad";$ipreal=getRemoteInfo();$_SESSION["ipdevice"]=$ipreal;} |
---|
50 | elseif (stripos($device,'ipad') == TRUE) {$device="ipad";$tipodevice="Ipad / Iphone";$ipreal=getRemoteInfo();$_SESSION["ipdevice"]=$ipreal;} |
---|
51 | elseif (stripos($device,'android') == TRUE) {$device="android";$tipodevice="Movil / Tablet";$ipreal=getRemoteInfo();$_SESSION["ipdevice"]=$ipreal;} |
---|
52 | elseif (stripos($device,'linux') == TRUE) {$device="linux";$tipodevice="Linux";$ipreal=getRemoteInfo();$_SESSION["ipdevice"]=$ipreal;} |
---|
53 | elseif (stripos($device,'macintosh') == TRUE) {$device="macintosh";$tipodevice="Macintosh";$ipreal=getRemoteInfo();$_SESSION["ipdevice"]=$ipreal;} |
---|
54 | else{$device="0";$tipodevice="PC";} |
---|
55 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
56 | |
---|
57 | // ########################################################################################################## |
---|
58 | // ################################ PARA SABER QUE SISTEMA DEL DISPOSITIVO ################################ |
---|
59 | // ########################################################################################################## |
---|
60 | $sistem=""; |
---|
61 | $buscasistem=""; |
---|
62 | $buscasistem=strtolower($_SERVER['HTTP_USER_AGENT']); |
---|
63 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
64 | // SISTEMAS WINDOWS // |
---|
65 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
66 | if(stripos($buscasistem,'windows nt 6.2') == TRUE ){$sistem="Windows 8";} |
---|
67 | if(stripos($buscasistem,'windows nt 6.1') == TRUE ){$sistem="Windows 7";} |
---|
68 | if(stripos($buscasistem,'windows nt 6.0') == TRUE ){$sistem="Windows Vista/Server 2008";} |
---|
69 | if(stripos($buscasistem,'windows nt 5.2') == TRUE ){$sistem="Windows Server 2003";} |
---|
70 | if(stripos($buscasistem,'windows nt 5.1') == TRUE ){$sistem="Windows XP";} |
---|
71 | if(stripos($buscasistem,'windows nt 5.0') == TRUE ){$sistem="Windows 2000";} |
---|
72 | |
---|
73 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
74 | // SISTEMAS APPLE // |
---|
75 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
76 | if(stripos($buscasistem,'ipad') == TRUE ){$sistem="iOS";} |
---|
77 | if(stripos($buscasistem,'iphone') == TRUE ){$sistem="iOS";} |
---|
78 | if ($device == "macintosh" ){$sistem="Mac OSX";} |
---|
79 | |
---|
80 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
81 | // SISTEMAS LINUX // |
---|
82 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
83 | if(stripos($buscasistem,'ubuntu') == TRUE ){$sistem="Ubuntu";} |
---|
84 | if(stripos($buscasistem,'red hat') == TRUE ){$sistem="Red Hat";} |
---|
85 | if(stripos($buscasistem,'centos') == TRUE ){$sistem="CentOs";} |
---|
86 | if(stripos($buscasistem,'suse') == TRUE ){$sistem="Open Suse";} |
---|
87 | if(stripos($buscasistem,'mandriva') == TRUE ){$sistem="Mandriva";} |
---|
88 | |
---|
89 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
90 | // SISTEMAS ANDROID // |
---|
91 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
92 | if(stripos($buscasistem,'android') == TRUE ){$sistem="Android";} |
---|
93 | |
---|
94 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
95 | // ########################################################################################################## |
---|
96 | // ########################## PARA SABER QUE VERSION DEL SISTEMA DEL DISPOSITIVO ########################## |
---|
97 | // ########################################################################################################## |
---|
98 | $versistem=""; |
---|
99 | $buscaversistem=""; |
---|
100 | $buscaversistem=strtolower($_SERVER['HTTP_USER_AGENT']); |
---|
101 | |
---|
102 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
103 | // VERSION WINDOWS // |
---|
104 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
105 | if(stripos($buscaversistem,'windows nt 6.2') == TRUE ){$versistem="NT 6.2";} |
---|
106 | if(stripos($buscaversistem,'windows nt 6.1') == TRUE ){$versistem="NT 6.1";} |
---|
107 | if(stripos($buscaversistem,'windows nt 6.0') == TRUE ){$versistem="NT 6.0";} |
---|
108 | if(stripos($buscaversistem,'windows nt 5.2') == TRUE ){$versistem="NT 5.2";} |
---|
109 | if(stripos($buscaversistem,'windows nt 5.1') == TRUE ){$versistem="NT 5.1";} |
---|
110 | if(stripos($buscaversistem,'windows nt 5.0') == TRUE ){$versistem="NT 5.0";} |
---|
111 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
112 | |
---|
113 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
114 | // VERSION APPLE // |
---|
115 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
116 | if(stripos($buscaversistem,'os x') == TRUE ){ |
---|
117 | $buscaversistemapple=""; |
---|
118 | $buscaversistemapple=$_SERVER['HTTP_USER_AGENT']; |
---|
119 | $buscaversistemapple=str_replace("OS","OS:",$buscaversistemapple); |
---|
120 | $buscaversistemapple=str_replace("like",":like",$buscaversistemapple); |
---|
121 | $buscaversistemapple=explode(":",$buscaversistemapple); |
---|
122 | $versistem=$buscaversistemapple[1];} |
---|
123 | |
---|
124 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
125 | |
---|
126 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
127 | // VERSION LINUX // |
---|
128 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
129 | if(stripos($buscaversistem,'linux') == TRUE ){ |
---|
130 | $buscaversistemlinux=""; |
---|
131 | $buscaversistemlinux=str_replace(")",";",$buscaversistem); |
---|
132 | $buscaversistemlinux=explode(";",$buscaversistemlinux); |
---|
133 | $versistem=$buscaversistemlinux[3]; |
---|
134 | } |
---|
135 | |
---|
136 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
137 | // VERSION ANDROID // |
---|
138 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
139 | if(stripos($buscaversistem,'android') == TRUE ){ |
---|
140 | $buscaversistemandroid=""; |
---|
141 | $buscaversistemandroid=str_replace(")",";",$buscaversistem); |
---|
142 | $buscaversistemandroid=explode(";",$buscaversistemandroid); |
---|
143 | $versistem=$buscaversistemandroid[2]; |
---|
144 | } |
---|
145 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
146 | // ########################################################################################################## |
---|
147 | // ########################## PARA SABER QUE NAVEGADOR DEL SISTEMA DEL DISPOSITIVO ######################## |
---|
148 | // ########################################################################################################## |
---|
149 | $buscanav=""; |
---|
150 | $buscanav=strtolower($_SERVER['HTTP_USER_AGENT']); |
---|
151 | if(stripos($buscanav,'firefox') == TRUE ){$nav="Firefox";} |
---|
152 | if(stripos($buscanav,'safari') == TRUE ){$nav="Safari";} |
---|
153 | if(stripos($buscanav,'msie') == TRUE ){$nav="Internet Explorer";} |
---|
154 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
155 | |
---|
156 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
157 | // ########################################################################################################## |
---|
158 | // ########################## PARA SABER VERSION DEL NAVEGADOR DEL DISPOSITIVO ############################ |
---|
159 | // ########################################################################################################## |
---|
160 | $buscavernav=""; |
---|
161 | $buscavernav=strtolower($_SERVER['HTTP_USER_AGENT']); |
---|
162 | $vernav=end(explode("/",$buscavernav)); |
---|
163 | |
---|
164 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
---|
165 | |
---|
166 | |
---|
167 | |
---|
168 | ?> |
---|
169 | |
---|
170 | |
---|
171 | <?php |
---|
172 | if ($device == "ipad" || $device == "iphone" || $device == "android" ) |
---|
173 | { |
---|
174 | ?> |
---|
175 | <HTML> |
---|
176 | <HEAD> |
---|
177 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
178 | <LINK rel="stylesheet" type="text/css" href="./estilos.css"> |
---|
179 | <SCRIPT language="javascript"> |
---|
180 | </SCRIPT> |
---|
181 | </HEAD> |
---|
182 | <BODY> |
---|
183 | |
---|
184 | <table width="100%" border="0"> |
---|
185 | <tr> |
---|
186 | <td colspan="3" align="center"> </td> |
---|
187 | </tr> |
---|
188 | <tr> |
---|
189 | <td colspan="3" align="center"><SPAN align=center class=cabeceras><font size="4"><?php echo $TbMsg[0] ;?></font></SPAN></td> |
---|
190 | </tr> |
---|
191 | <tr> |
---|
192 | <td colspan="3" align="center"><SPAN align=center class=cabeceras><font size="4"><?php $versionfile="../doc/VERSION.txt";if (file_exists ($versionfile)){include ($versionfile);} ;?></font></SPAN></td> |
---|
193 | </tr> |
---|
194 | <tr> |
---|
195 | <td colspan="3" align="center"> </td> |
---|
196 | </tr> |
---|
197 | <tr> |
---|
198 | <td width="23%"> </td> |
---|
199 | <td width="28%"><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[1] ;?></font></SPAN></td> |
---|
200 | <td width="49%"><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $_SESSION['ipdevice']; ?></font></SPAN></td> |
---|
201 | </tr> |
---|
202 | <tr> |
---|
203 | <td> </td> |
---|
204 | <td><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[2] ;?></font></SPAN></td> |
---|
205 | <td><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $tipodevice; ?></font></SPAN></td> |
---|
206 | </tr> |
---|
207 | <tr> |
---|
208 | <td> </td> |
---|
209 | <td><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[3] ;?></font></SPAN></td> |
---|
210 | <td><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $sistem; ?></font></SPAN></td> |
---|
211 | </tr> |
---|
212 | <tr> |
---|
213 | <td> </td> |
---|
214 | <td><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[4] ;?></font></SPAN></td> |
---|
215 | <td><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $versistem; ?></font></SPAN></td> |
---|
216 | </tr> |
---|
217 | <tr> |
---|
218 | <td> </td> |
---|
219 | <td><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[5] ;?></font></SPAN></td> |
---|
220 | <td><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $nav; ?></font></SPAN></td> |
---|
221 | </tr> |
---|
222 | <tr> |
---|
223 | <td> </td> |
---|
224 | <td><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[6] ;?></font></SPAN></td> |
---|
225 | <td><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $vernav; ?></font></SPAN></td> |
---|
226 | </tr> |
---|
227 | <tr> |
---|
228 | <td> </td> |
---|
229 | <td> </td> |
---|
230 | <td> </td> |
---|
231 | </tr> |
---|
232 | </table> |
---|
233 | |
---|
234 | |
---|
235 | </BODY> |
---|
236 | </HTML> |
---|
237 | |
---|
238 | <?php } ?> |
---|