source: admin/WebConsole/nada.php @ fe6843b

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 fe6843b was c4252df, checked in by albertogp <albertogp@…>, 11 years ago

branches-version1.0-tickets
#614

  • Integración del ticket en la versión 1.0

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

  • 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   $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']);
49if(stripos($device,'iphone') == TRUE ){$device="iphone";$tipodevice="Iphone / Ipad";$ipreal=getRemoteInfo();$_SESSION["ipdevice"]=$ipreal;}
50elseif  (stripos($device,'ipad') == TRUE) {$device="ipad";$tipodevice="Ipad / Iphone";$ipreal=getRemoteInfo();$_SESSION["ipdevice"]=$ipreal;}
51elseif (stripos($device,'android') == TRUE) {$device="android";$tipodevice="Movil / Tablet";$ipreal=getRemoteInfo();$_SESSION["ipdevice"]=$ipreal;}
52elseif (stripos($device,'linux') == TRUE) {$device="linux";$tipodevice="Linux";$ipreal=getRemoteInfo();$_SESSION["ipdevice"]=$ipreal;}
53elseif (stripos($device,'macintosh') == TRUE) {$device="macintosh";$tipodevice="Macintosh";$ipreal=getRemoteInfo();$_SESSION["ipdevice"]=$ipreal;}
54else{$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//////////////////////////////////////////////////////////////////////////////////////////////////////////////
66if(stripos($buscasistem,'windows nt 6.2') == TRUE ){$sistem="Windows 8";}
67if(stripos($buscasistem,'windows nt 6.1') == TRUE ){$sistem="Windows 7";}
68if(stripos($buscasistem,'windows nt 6.0') == TRUE ){$sistem="Windows Vista/Server 2008";}
69if(stripos($buscasistem,'windows nt 5.2') == TRUE ){$sistem="Windows Server 2003";}
70if(stripos($buscasistem,'windows nt 5.1') == TRUE ){$sistem="Windows XP";}
71if(stripos($buscasistem,'windows nt 5.0') == TRUE ){$sistem="Windows 2000";}
72
73//////////////////////////////////////////////////////////////////////////////////////////////////////////////
74//      SISTEMAS APPLE //
75//////////////////////////////////////////////////////////////////////////////////////////////////////////////
76if(stripos($buscasistem,'ipad') == TRUE ){$sistem="iOS";}
77if(stripos($buscasistem,'iphone') == TRUE ){$sistem="iOS";}
78if ($device == "macintosh" ){$sistem="Mac OSX";}
79
80//////////////////////////////////////////////////////////////////////////////////////////////////////////////
81//      SISTEMAS LINUX //
82//////////////////////////////////////////////////////////////////////////////////////////////////////////////
83if(stripos($buscasistem,'ubuntu') == TRUE ){$sistem="Ubuntu";}
84if(stripos($buscasistem,'red hat') == TRUE ){$sistem="Red Hat";}
85if(stripos($buscasistem,'centos') == TRUE ){$sistem="CentOs";}
86if(stripos($buscasistem,'suse') == TRUE ){$sistem="Open Suse";}
87if(stripos($buscasistem,'mandriva') == TRUE ){$sistem="Mandriva";}
88
89//////////////////////////////////////////////////////////////////////////////////////////////////////////////
90//      SISTEMAS ANDROID //
91//////////////////////////////////////////////////////////////////////////////////////////////////////////////
92if(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//////////////////////////////////////////////////////////////////////////////////////////////////////////////
105if(stripos($buscaversistem,'windows nt 6.2') == TRUE ){$versistem="NT 6.2";}
106if(stripos($buscaversistem,'windows nt 6.1') == TRUE ){$versistem="NT 6.1";}
107if(stripos($buscaversistem,'windows nt 6.0') == TRUE ){$versistem="NT 6.0";}
108if(stripos($buscaversistem,'windows nt 5.2') == TRUE ){$versistem="NT 5.2";}
109if(stripos($buscaversistem,'windows nt 5.1') == TRUE ){$versistem="NT 5.1";}
110if(stripos($buscaversistem,'windows nt 5.0') == TRUE ){$versistem="NT 5.0";}
111//////////////////////////////////////////////////////////////////////////////////////////////////////////////
112
113//////////////////////////////////////////////////////////////////////////////////////////////////////////////
114//      VERSION APPLE //
115//////////////////////////////////////////////////////////////////////////////////////////////////////////////
116if(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=split(":",$buscaversistemapple);
122$versistem=$buscaversistemapple[1];}
123
124/////////////////////////////////////////////////////////////////////////////////////////////////////////////
125
126//////////////////////////////////////////////////////////////////////////////////////////////////////////////
127//      VERSION LINUX //
128//////////////////////////////////////////////////////////////////////////////////////////////////////////////
129if(stripos($buscaversistem,'linux') == TRUE ){
130$buscaversistemlinux="";
131$buscaversistemlinux=str_replace(")",";",$buscaversistem);
132$buscaversistemlinux=split(";",$buscaversistemlinux);
133$versistem=$buscaversistemlinux[3];
134}
135
136//////////////////////////////////////////////////////////////////////////////////////////////////////////////
137//      VERSION ANDROID //
138//////////////////////////////////////////////////////////////////////////////////////////////////////////////
139if(stripos($buscaversistem,'android') == TRUE ){
140$buscaversistemandroid="";
141$buscaversistemandroid=str_replace(")",";",$buscaversistem);
142$buscaversistemandroid=split(";",$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']);
151if(stripos($buscanav,'firefox') == TRUE ){$nav="Firefox";}
152if(stripos($buscanav,'safari') == TRUE ){$nav="Safari";}
153if(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
172if ($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">&nbsp;</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">&nbsp;</td>
196  </tr>
197  <tr>
198    <td width="23%">&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</td>
229    <td>&nbsp;</td>
230    <td>&nbsp;</td>
231  </tr>
232</table>
233
234
235</BODY>
236</HTML>
237
238<?php } ?>
Note: See TracBrowser for help on using the repository browser.