-
Notifications
You must be signed in to change notification settings - Fork 0
/
ver_by_b.php
79 lines (65 loc) · 1.9 KB
/
ver_by_b.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
//include("check_login.php");
//cargando clase de BD
require 'lib_conf/bd_conf.php';
$database = new medoo();
//fin de uso de BD
//Mis funciones
require 'lib_conf/functions.php';
//
$pParam = FALSE;
if(count($_GET) != 0){
$pParam = $_GET;
}elseif(count($_POST) != 0){
$pParam = $_POST;
}
if($pParam != FALSE){
/*
$sDevice_name = $pParam['device_name'];
$sMac = $pParam['mac'];
$sOwner = $pParam['owner'];
$sDivtype = $pParam['div_type'];
$sDescripcion = $pParam['descripcion'];
$sVr_select = $pParam['vr_select'];
// $sLocal_area = $pParam['local_area'];
$sName_area = $pParam['name_area'];
$sFCaducidad = "2015-03-28";
// $sFCaducidad = $pParam['fcaducidad'];
if(
// ($sDevice_name == '') or
($sIp_selectd == '') or
($sMac == '') or
($sOwner == '') or
($sDivtype == '') or
// ($sDescripcion == '') or
($sVr_select == '') or
// ($sLocal_area == '') or
($sName_area == '')
){
$sMensaje =
'El nombre y la descripción '.
'del nuevo rol no pueden '.
'ser cadenas vacías.';
echo($sMensaje);
}
else{
*/
/*
*
* buscar por ip
*
* */
if ($pParam['b_select']){
$sLocal = $pParam['b_select'];
echo "<h1>"."Resultado de la Busqueda" . "<br/>"."</h1>";
$datas = $database->query("SELECT * FROM `Dispositivo`, `Area`, `IP` WHERE Area.CLibertad_idCLibertad = '$sLocal' and Area.idArea = Dispositivo.Area_idArea and IP.idIP = Dispositivo.IP_idIP")->fetchAll();
$sCont = count($datas);
echo "<h3>"."Se encontraron un total de " . $sCont . " de ordenadores". "<br/>"."</h3>";
foreach($datas as $datas)
{
$sIPconv = long2ip($datas["ipnum"]);
echo "PC: " . $datas["NombDisp"] . "<br/>" . " Direccion MAC: " . $datas["mac"] . "<br/>" . " Duenno/Responsable: " . $datas["responsable"] . "<br/>" . " Descripcion: " . $datas["observacion"] ."<br/>" . "Direccion IP: " . $sIPconv ."<br/>" . "<br/>";
}
}
}
?>