-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbcn_slideshows.php
152 lines (132 loc) · 4.91 KB
/
bcn_slideshows.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
$idtabla = "id";
if ($accionBCN!="Mostrar{$modulo}s"){
$idBCN = formData("id{$_modulo}","post",0);
$disabled = false;
if ($idBCN>0){
$form_titulo = "Editar Slideshow";
if ($accionBCN=="Ver{$modulo}"){ $form_titulo = "Ver {$modulo}"; $disabled = true; }
$where = array("id" => $idBCN);
$res = $CONBCN->seleccionar($tabla,"*",$where);
foreach ($res as $rs) {
$image = $rs->image;
$titulo = $rs->titulo;
$subtitulo = $rs->subtitulo;
$fecha = $rs->fecha;
$pix = $rs->pix;
$orden = $rs->orden;
$estado = $rs->estado;
}
} else {
$form_titulo = "Nuevo Slideshows";
$image = "";
$titulo = "";
$subtitulo = "";
$fecha = "";
$pix = "";
$estado = 0;
$orden = 0;
}
?>
<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,false,"s",true);
$CTRL->inputHidden(array("ID"=>"descrip", "VALUE"=>$titulo));
$CTRL->inputHidden(array("ID"=>"imagen_relator_actual", "VALUE"=>$image));
$CTRL->inputHidden(array("ID"=>"imagen_relator_actual2", "VALUE"=>$pix));
?>
<div class="form-group">
<?php $CTRL->inputText(array("ID"=>"titulo", "VALUE"=>$titulo, "LABEL"=>"Nombre", "PLACEHOLDER"=>"Nombre slideshows", "REQUIRED"=>true, "DISABLED"=>$disabled )); ?>
</div>
<div class="form-group">
<?php $CTRL->inputText(array("ID"=>"subtitulo", "VALUE"=>$subtitulo, "LABEL"=>"Contenido", "PLACEHOLDER"=>"Contenido", "REQUIRED"=>true, "DISABLED"=>$disabled )); ?>
</div>
<div class="form-group">
<?php $CTRL->inputFile(array("ID"=>"image", "VALUE"=>$image,"CSS"=>"file", "LABEL"=>"Imagen Principal formatos:PNG o JPG", "PLACEHOLDER"=>"Imagen", "REQUIRED"=>true, "DISABLED"=>$disabled )); ?>
</div>
<?php if ($image!=""){ ?>
<div class="form-group" style="margin-left: 200px;">
<img src="images/img/<?php echo $image; ?>" style="max-width:200px; border: solid 1px #ccc; padding: 5px 5px 5px 5px;">
</div>
<?php } ?>
<div class="form-group">
<?php $CTRL->inputFile(array("ID"=>"pix", "VALUE"=>$pix,"CSS"=>"file", "LABEL"=>"Imagen Principal formatos:PNG o JPG", "PLACEHOLDER"=>"pixn", "REQUIRED"=>true, "DISABLED"=>$disabled )); ?>
</div>
<?php if ($pix!=""){ ?>
<div class="form-group" style="margin-left: 200px;">
<img src="images/img/<?php echo $pix; ?>" style="max-width:200px; border: solid 1px #ccc; padding: 5px 5px 5px 5px;">
</div>
<?php } ?>
<div class="form-group">
<?php $CTRL->select(array("ID"=>"estado", "VALUE"=>$estado, "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 nuevo Tienda 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="25%">Titulo</th>
<th width="25%">Subtitulo</th>
<th width="20%">Imagen Principal</th>
<th width="20%">Fondo</th>
<th width="20%">Visible</th>
<th>Opc.</th>
</tr>
</thead>
<tbody>
<?
$res = $CONBCN->seleccionar($tabla,"*","");
foreach ($res as $rs) {
?>
<tr>
<td id="<?php echo $_modulo."_".$rs->id; ?>"><?php echo $rs->titulo; ?></td>
<td id="<?php echo $_modulo."_".$rs->id; ?>"><?php echo $rs->subtitulo; ?></td>
<td id="<?php echo $_modulo."_".$rs->id; ?>"><img src="images/img/<?php echo $rs->image; ?>" style="max-width:200px; border: solid 1px #ccc; padding: 5px 5px 5px 5px;"></td>
<td id="<?php echo $_modulo."_".$rs->id; ?>"><img src="images/img/<?php echo $rs->pix; ?>" style="max-width:200px; border: solid 1px #ccc; padding: 5px 5px 5px 5px;"></td>
<td>
<?php if ($rs->estado==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->id); ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<?php
}
?>