source: admin/WebConsole/nada.php @ 9815cac

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 9815cac was 0563f44, checked in by ramon <ramongomez@…>, 7 years ago

#804: Recuperar estilo para barra de porcentaje de uso de SF y evitar aviso por cambio en la función end de PHP.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5637 a21b9725-9963-47de-94b9-378ad31fedc9

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