-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbcn_tiendas.php
104 lines (99 loc) · 2.8 KB
/
bcn_tiendas.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
$idtabla = "id";
if ($accionBCN!="Mostrar{$menu}"){
$idBCN = formData("id{$_modulo}","post",0);
$disabled = false;
if ($idBCN>0){
$form_titulo = "Editar Planta";
if ($accionBCN=="Ver{$modulo}"){ $form_titulo = "Ver {$modulo}"; $disabled = true; }
$where = array("idplanta" => $idBCN);
$res = $CONBCN->seleccionar($tabla,"*",$where);
foreach ($res as $rs) {
$name = $rs->name;
$visible = $rs->visible;
}
} else {
$form_titulo = "Nueva Planta";
$idcat = 0;
$idzone = 0;
$name = "";
$visible = 1;
}
?>
<div class="page-header">
<h1>
<?php echo $form_titulo; ?>
</h1>
</div><!-- /.page-header -->
<div class="row">
<div class="col-xs-12">
<div class="row">
<div id="div_left" class="col-sm-12">
<?php
$CTRL->initForm($modulo,$idBCN);
$CTRL->inputHidden(array("ID"=>"descrip", "VALUE"=>$name));
?>
<div class="form-group">
<?php $CTRL->inputText(array("ID"=>"name", "VALUE"=>$name, "LABEL"=>"Nombre Planta", "PLACEHOLDER"=>"Planta 1", "REQUIRED"=>true, "DISABLED"=>$disabled )); ?>
</div>
<div class="form-group">
<?php $CTRL->select(array("ID"=>"visible", "VALUE"=>$visible, "LABEL"=>"Visible", "REQUIRED"=>true, "ITEMS"=>array("1"=>"SI", "0"=>"NO"),"DISABLED"=>$disabled )); ?>
</div>
<?php
$CTRL->groupButtons($modulo,$accionBCN);
$CTRL->endForm();
?>
</div>
</div>
</div><!-- /.col -->
</div><!-- /.row -->
<?php } else { ?>
<div class="page-header">
<h1>
<?php echo formatTitle($descriptor); ?>
<small>
<i class="ace-icon fa fa-angle-double-right"></i>
Agregue un nueva Planta o seleccione el que desee editar, eliminar
</small>
<?php $CTRL->newButton($modulo); ?>
</h1>
</div><!-- /.page-header -->
<div class="row">
<div class="col-xs-12">
<?php $CTRL->initForm($modulo,0,true); ?>
<table id="dynamic-table" class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th width="10%">ID</th>
<th width="60%">Planta</th>
<th width="20%">Visible</th>
<th>Opc.</th>
</tr>
</thead>
<tbody>
<?
$res = $CONBCN->seleccionar($tabla,"*","");
foreach ($res as $rs) {
?>
<tr>
<td ><?php echo $rs->idplanta; ?></td>
<td id="<?php echo $_modulo."_".$rs->idplanta; ?>"><?php echo $rs->name; ?></td>
<td>
<?php if ($rs->visible==1){ ?>
<span class="label label-sm label-success">SI</span>
<?php } else { ?>
<span class="label label-sm label-warning">NO</span>
<?php } ?>
</td>
<td><?php $CTRL->panelButtons($modulo,$rs->idplanta); ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<?php
}
?>