source: admin/WebConsole/nada.php @ ba5651bc

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-instalacion
Last change on this file since ba5651bc was 2ed5bb7, checked in by Fredy <aluque@…>, 7 years ago

#858 Starting filling the blank :-)

  • Property mode set to 100644
File size: 11.8 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$data = json_decode(@file_get_contents(__DIR__ . '/../doc/VERSION.json'));
156if (empty($data->project)) {
157    $version = "OpenGnsys";
158} else {
159    $version = @$data->project.' ' . @$data->version.' '
160             . (isset($data->codename) ? '('.$data->codename.') ' : '') . @$data->release;
161}
162?>
163<html>
164<head>
165  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
166  <link rel="stylesheet" type="text/css" href="./estilos.css">
167</head>
168<body>
169
170<table width="100%" border="0">
171  <tr>
172    <td colspan="3" align="center">&nbsp;</td>
173  </tr>
174  <tr>
175    <td colspan="3" align="center"><SPAN align=center class=cabeceras><font size="4"><?php echo $TbMsg[0] ;?></font></SPAN></td>
176  </tr>
177  <tr>
178    <td colspan="3" align="center"><SPAN align=center class=cabeceras><font size="4"><?php echo $version; ?></font></SPAN></td>
179  </tr>
180  <tr>
181    <td colspan="3" align="center">&nbsp;</td>
182  </tr>
183  <tr>
184    <td width="23%">&nbsp;</td>
185    <td width="28%"><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[1] ;?></font></SPAN></td>
186    <td width="49%"><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $_SESSION['ipdevice']; ?></font></SPAN></td>
187  </tr>
188  <tr>
189    <td>&nbsp;</td>
190    <td><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[2] ;?></font></SPAN></td>
191    <td><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $tipodevice; ?></font></SPAN></td>
192  </tr>
193  <tr>
194    <td>&nbsp;</td>
195    <td><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[3] ;?></font></SPAN></td>
196    <td><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $sistem; ?></font></SPAN></td>
197  </tr>
198  <tr>
199    <td>&nbsp;</td>
200    <td><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[4] ;?></font></SPAN></td>
201    <td><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $versistem; ?></font></SPAN></td>
202  </tr>
203  <tr>
204    <td>&nbsp;</td>
205    <td><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[5] ;?></font></SPAN></td>
206    <td><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $nav; ?></font></SPAN></td>
207  </tr>
208  <tr>
209    <td>&nbsp;</td>
210    <td><SPAN align=center class=subcabeceras><font size="3"><?php echo $TbMsg[6] ;?></font></SPAN></td>
211    <td><SPAN align=center class=sobrecabeceras><font size="3"><?php echo $vernav; ?></font></SPAN></td>
212  </tr>
213  <tr>
214    <td>&nbsp;</td>
215    <td>&nbsp;</td>
216    <td>&nbsp;</td>
217  </tr>
218</table>
219
220
221</body>
222</html>
223
224<?php } else { ?>
225
226<html>
227<head>
228  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
229  <link rel="stylesheet" type="text/css" href="./estilos.css">
230</head>
231<body>
232
233"Here we will show our content"
234
235</body>
236</html>
237
238<?php } ?>
239
Note: See TracBrowser for help on using the repository browser.