-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHiloTickets.php
More file actions
202 lines (163 loc) · 5.99 KB
/
HiloTickets.php
File metadata and controls
202 lines (163 loc) · 5.99 KB
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<?php
require_once("conexion.php");//Manda a llamar el archivo de conexion de la base de datos
$conexion = conectar();//variable a la cual retorna la cadena de conexion de la base de datos
?>
<?php
$VarExport=0;
$VarAsunto=0;
$VarExport1 = $_COOKIE["VarCookieNumero"];
?>
<!DOCTYPE html>
<html>
<div class="MarcoPrincipal">
<!--Este PHP es el que se muestra al inicio de la publicaciòn con la informaciòn màs relevante de los tickets-->
<div class="MarcoEncabezado">
<head>
<link rel="stylesheet" href="style.css"><!--referencia al archivo de estilos de la paginas en cada uno de los archivos php-->
<meta charset="UTF-8">
<script type="text/javascript" src="JavascriptIndex.js"></script>
<title>Hilo de Tickets</title>
</head>
<body>
<center><h2>Ticket # <?php echo $VarExport1;?></h2><center>
<?php
$queryP="SELECT ot.number,ot.created,os.name, concat_ws(' ',osf.firstname,osf.lastname)as nombre,od.dept_name,oli.value,oht.topic,ots.state,otp.priority_desc
FROM ost_ticket ot
left join ost_user os on ot.user_id=os.id
left join ost_staff osf on ot.staff_id=osf.staff_id
left join ost_department od on ot.dept_id=od.dept_id
left join ost_ticket__cdata otd on ot.ticket_id=otd.ticket_id
left join ost_list_items oli on otd.departamento = oli.id
left join ost_help_topic oht on ot.topic_id=oht.topic_id
left join ost_ticket_status ots on ot.status_id= ots.id
left join ost_ticket_priority otp on otd.priority=otp.priority_id
where ot.number='$VarExport1'";
$resultadoP=mysqli_query($conexion, $queryP);
foreach ($resultadoP as $clave => $keyP)
{
?>
<style>
table.tabla {
width: 90%;
max-width:600px;
min-width: 300px;
margin: 0 auto;*/ /* centrado */
background: white;
/* sombra interior */
box-shadow: inset 1px 1px 1px 0px #999999;
/* esquinas redondeadas */
border-radius: 10px;
}
table.tabla > tbody > tr:first-child > td:first-child { /* celda superior izquierda */
border-top-left-radius: 10px;
}
table.tabla > tbody > tr > td:first-child { /* celdas de la primera columna */
border-left: 1px solid #999999;
}
table.tabla > tbody > tr:last-child > td:first-child { /* celda inferior izquierda */
border-bottom-left-radius: 10px;
}
table.tabla > tbody > tr:last-child > td:last-child { /* celda inferior derecha */
border-bottom-right-radius: 10px;
}
table.tabla > tbody > tr:nth-child(even) { /* celdas de los renglones pares */
background: #e7e7e7;
}
</style>
</head>
<body>
<strong><h3>Datos Generales del Ticket</h3></strong>
<?php
$queryt = "SELECT ot.number,otcd.subject FROM ost_ticket ot
left join ost_ticket__cdata otcd on otcd.ticket_id=ot.ticket_id
where ot.number='$VarExport1'";
$resultadot=mysqli_query($conexion, $queryt);
foreach ($resultadot as $clavet => $keyt)
{
$VarAsunto= $keyt['subject'];
}
echo "<strong>Asunto:</strong>";echo $VarAsunto;
?>
<table cellpadding=0 cellspacing=0 class="tabla">
<tr>
<th >Nº Tickets:<?php echo $keyP['number'];?></th></br>
<th >Fecha de Creaciòn:<?php echo $keyP['created'];?></th>
</tr>
<tr>
<td><strong>Remitente:</strong><?php echo $keyP['name'];?></td>
<td> <strong>Asignado a:</strong><?php echo $keyP['nombre'];?></td>
</tr>
<tr>
<td><strong>Departamento Origen:</strong><?php echo $keyP['value'];?></td>
<td> <strong>Departamento Destino:</strong><?php echo $keyP['dept_name'];?></td>
<td></td>
</tr>
<tr>
<td colspan="2"><strong>Tema de Ayuda:</strong><?php echo $keyP['topic'];?> </td>
<td>
</tr>
<tr>
<td><strong>Nivel de Prioridad:</strong><?php echo $keyP['priority_desc'];?> </td>
<td><strong> Estado Actual:</strong><?php echo $keyP['state'];?> </td>
</tr>
</table>
</body>
</html>
<?php } ?>
<strong><h3>Hilo del Ticket</h3></strong>
<?php
$query = "SELECT ot.number, otth.ticket_id,otth.poster,otth.title,otth.body,otth.created FROM ost_ticket ot
left join ost_ticket_thread otth on otth.ticket_id=ot.ticket_id
left join ost_ticket__cdata otcd on otcd.ticket_id=ot.ticket_id
where ot.number='$VarExport1'
order by otth.created asc";
$resultado=mysqli_query($conexion, $query);
foreach ($resultado as $clave => $key)
{
?>
<style>
table.tabla {
width: 80%;
max-width:600px;
min-width: 300px;
margin: 0 auto; /* centrado */
background: white;
/* sombra interior */
box-shadow: inset 1px 1px 1px 0px #999999;
/* esquinas redondeadas */
border-radius: 10px;
}
table.tabla > tbody > tr:first-child > td:first-child { /* celda superior izquierda */
border-top-left-radius: 10px;
}
table.tabla > tbody > tr > td:first-child { /* celdas de la primera columna */
border-left: 1px solid #999999;
}
table.tabla > tbody > tr:last-child > td:first-child { /* celda inferior izquierda */
border-bottom-left-radius: 10px;
}
table.tabla > tbody > tr:last-child > td:last-child { /* celda inferior derecha */
border-bottom-right-radius: 10px;
}
table.tabla > tbody > tr:nth-child(even) { /* celdas de los renglones pares */
background: #e7e7e7;
}
</style>
</head>
<body>
<table cellpadding=0 cellspacing=0 class="tabla">
<tr>
<td><strong> <?php echo $key['created'];?> </strong><strong><?php echo $key['title'];?></td>
<td><strong><?php echo $key['poster'];?></strong></td>
</tr>
<tr>
<td ><?php echo $key['body'];?> </td>
<td></td>
</tr>
<tr>
</br>
</table>
</body>
</html>
<?php } ?>
<?php ?>