コード例 #1
0
<?php
$tipo = $_GET['tipo'];
$usuario = $_GET['usuario'];
include ("validar.php");
include ("header.php");
$transaccion = $_GET['transaccion'];
include_once("perfil_funciones.php");
$f=new funciones();

$idshift=$_POST["shift"];
$fecha=$_POST["year"]."-".$_POST["mes"]."-".$_POST["dia"];

$agent=$f->qaconsultas("SELECT nombre AS campo FROM usuario WHERE login='******'","uncampo");
$agent.=" ".$f->qaconsultas("SELECT 1erApellido AS campo FROM usuario WHERE login='******'","uncampo");
$idagent=$f->id_usuario($usuario);
$shift=$f->qaconsultas("SELECT hora_inicio AS campo FROM shift WHERE id_shift='".$idshift."'","uncampo");


function return_chats($id){
	global $f;
	
	$consulta="AS campo FROM qa_chats WHERE id='$id'";
	
	$chatcustomer=$f->qaconsultas("SELECT customerName $consulta","uncampo");
	$email=$f->qaconsultas("SELECT emailAddress $consulta","uncampo");
	$wait=$f->qaconsultas("SELECT waitTime $consulta","uncampo");
	$duration=$f->qaconsultas("SELECT duration $consulta","uncampo");
	$chatcomments=$f->qaconsultas("SELECT comments $consulta","uncampo");
	$chatby=$f->qaconsultas("SELECT idAdmin $consulta","uncampo");
	$chatby=$f->qaconsultas("SELECT nombre AS campo FROM usuario WHERE id_usuario='$chatby'","uncampo");
	
コード例 #2
0
							?>
                        </td>
                        
                        <!-- segunda columna, noticias xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
                        <td width="927" valign="top" style="padding-left:10px; padding-right:10px;">
                        	<?php
                            
							
							
							switch($transaccion){
								case "chats":
								
									$plantilla=$f->leer_plantilla("qachats.html");

									
									$idadmin=$f->id_usuario($usuario);
									$optionsteam=$f->qaconsultas("SELECT id_team AS id, team AS nombre FROM teams","options");
									$optionsagent=$f->qaconsultas("SELECT id_usuario AS id, nombre AS nombre FROM usuario WHERE estado='1' AND id_tipo_usuario='3'","options");
									$plantilla=str_replace("{url}","_qa.php?tipo=$tipo&usuario=$usuario&transaccion=grabarchats",$plantilla);
									$plantilla=str_replace("{fecha}",$f->fechadehoy(),$plantilla);
									$plantilla=str_replace("{optionsteam}",$optionsteam,$plantilla);
									$plantilla=str_replace("{optionsagent}",$optionsagent,$plantilla);
									$plantilla=str_replace("{idadmin}",$idadmin,$plantilla);
									$plantilla=str_replace("{tipo}",$tipo,$plantilla);
									$plantilla=str_replace("{user}",$usuario,$plantilla);
									
									echo $plantilla;
									echo "<div id=\"resultado\">";
									include_once("verchats.php");
									echo"</div>";