</td> <!-- segunda columna, noticias xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --> <td width="927" valign="top" style="padding-left:10px; padding-right:10px;"> <?php switch($transaccion){ default: $idusuario=$sql->uncampo("SELECT id_usuario FROM usuario WHERE login='******'"); $tpl->leer_plantilla("html/auth_refund.html"); $tpl->reemplazar("{shift}",$sh); $tpl->reemplazar("{idshift}",shift()); $tpl->reemplazar("{date}",$f->fechadehoy()); $tpl->reemplazar("{idagent}",$idusuario); $tpl->reemplazar("{agent}",$sql->uncampo("SELECT nombre FROM usuario WHERE id_usuario='".$idusuario."'")); $tpl->reemplazar("{url}","authRefund.php?tipo=$tipo&usuario=$usuario&transaccion=save"); $tpl->mostrarplantilla(); break; case "save": if($sql->consulta("INSERT INTO auth_refunds(id,id_agent,fecha,shift,member_id,fullname,email,amount,status,comment) values(Null,'".$_POST["idagent"]."','".$_POST["date"]."','".$_POST["shift"]."','".$_POST["memberid"]."', '".$_POST["fullname"]."','".$_POST["email"]."','".$_POST["amount"]."','0','".$_POST["comment"]."')")){ echo "Datos grabados<br><br>"; include("correo.php"); $email_remitente="";
<?php $tipo = $_GET['tipo']; $usuario = $_GET['usuario']; include_once("perfil_funciones.php"); $f=new funciones(); switch($_GET["accion"]){ case "chats": $plantilla=$f->leer_plantilla("formbuskedachats.html"); $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("{fecha}",$f->fechadehoy(),$plantilla); $plantilla=str_replace("{optionsagent}",$optionsagent,$plantilla); echo $plantilla; break; case "mails": $plantilla=$f->leer_plantilla("formbuskedamails.html"); $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("{fecha}",$f->fechadehoy(),$plantilla); $plantilla=str_replace("{optionsagent}",$optionsagent,$plantilla); echo $plantilla; break; case "calls": $plantilla=$f->leer_plantilla("formbuskedacalls.html"); $optionsagent=$f->qaconsultas("SELECT id_usuario AS id, nombre AS nombre FROM usuario WHERE estado='1' AND id_tipo_usuario='3'","options");
<!-- segunda columna, noticias xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --> <td width="927" valign="top" style="padding-left:10px; padding-right:10px;"> <?php $idagent=$sql->uncampo("SELECT id_usuario FROM usuario WHERE login='******'"); $tpl->leer_plantilla("tablaHorasBreak.html"); //$idusuario=$sql->uncampo("SELECT id_usuario FROM usuario WHERE login='******'"); //$ids=$sql->ids_tabla("SELECT id FROM registro_salidas_break WHERE DATE(horasalida)='".$f->fechadehoy()."'"); if($_POST["f1"]!="" && $_POST["f2"]!=" "){ $date="AND DATE(horasalida) BETWEEN '".$_POST["f1"]."' AND '".$_POST["f2"]."'"; $fecha=$_POST["f1"]." - ".$_POST["f2"]; } else{ $date="AND DATE(horasalida)='".$f->fechadehoy()."'"; $fecha=$f->fechadehoy(); } $consulta=" SELECT nombre, horasalida, TIME( horaentrada ) , hora_inicio , tarde FROM usuario JOIN registro_salidas_break JOIN shift WHERE id_usuario = idagent AND idagent='".$idagent."' $date AND id_shift = shift AND registro_salidas_break.estado='2' $and ";
<?php $tipo = $_GET["tipo"]; $usuario = $_GET["usuario"]; $transaccion = $_GET['transaccion']; include_once("perfil_funciones.php"); $ff=new funciones(); $fecha=$ff->fechadehoy(); $fechainicio=$_POST["fechainicio"]; $fechafin=$_POST["fechafin"]; $xshiftx=$_POST["xshiftx"]; $xagentex=$_POST["xagentex"]; if($_POST["xagentex"]!="" && $_POST["fechainicio"]!="" && $_POST["fechafin"]!="" && $_POST["xagentex"]!=""){ $sql=" SELECT id AS campo FROM qa_calls WHERE DATE(fecha) BETWEEN '$fechainicio' AND '$fechafin' AND shift='$xshiftx' AND idAgent LIKE '%$xagentex%' ORDER BY id DESC "; } elseif($_POST["idcall"]!=""){ $sql="SELECT id AS campo FROM qa_chats WHERE id='".$_POST["idcall"]."'"; } else{ $sql="SELECT id AS campo FROM qa_calls WHERE DATE(fecha)='$fecha' ORDER BY id DESC"; }
$plantilla=str_replace("{url}","agentqa.php?tipo=$tipo&usuario=$usuario&transaccion=ver",$plantilla); echo "<div>".$plantilla."</div><br><center><font size='5'>QAs de hoy</font></center>"; $idagent=consultas("SELECT id_usuario AS campo FROM usuario WHERE login='******' ","uncampo"); if(file_exists("qa/chats/".$id.".txt")){ unlink("qa/chats/".$id.".txt"); } elseif(file_exists("qa/mails/".$id.".txt")){ unlink("qa/mails/".$id.".txt"); } elseif(file_exists("qa/calls/".$id.".txt")){ unlink("qa/calls/".$id.".txt"); } echo mostrarqa($f->fechadehoy(),$idagent); break; case "ver": echo mostrarqa($fecha,$idagent); break; } ?> </td> <!--tercer columna xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --> </tr> </table> </td> </tr> <!-- ===================================================================================================================== --> </table>
<?php echo $sql->selectOptions("SELECT id_usuario,nombre FROM usuario WHERE estado='1' AND id_tipo_usuario='3'"); ?> </select> </form> </td> </tr> <?php if($by=="VerAutorizados"){ ?> <tr><td style="border-bottom:1px dashed #cccccc; padding:10px;"> <form method="post" action="<?php echo "AuthRefAdmin.php?tipo=$tipo&usuario=$usuario&transaccion=xfecha";?>" class="sexyform"> Entre <input type="text" name="fecha" style="width:100px;" value="<?php echo $f->fechadehoy();?>"> Y <input type="text" name="fecha2" style="width:100px;" value="<?php echo $f->fechadehoy();?>"> <input type="submit" value="BUSCAR X FECHA"> </form> </td></tr> <?php } ?> <?php
$db = mysql_connect("atc-nh-natsdb.nationalnet.com", "staffcenter", "XgwofvLY2ayLf") or die("Connection Error: " . mysql_error()); mysql_select_db("staffcenter") or die("Error al conectar a la base de datos."); if($_POST["f1"]!="" && $_POST["f2"]!=" ") { $fecha=$_POST["f1"]." - ".$_POST["f2"]; $consultabreak ="SELECT id_usuario, TIME(hora_salida), TIME (hora_entrada) FROM salir_break WHERE DATE(hora_salida) BETWEEN '".$_POST["f1"]."' AND '".$_POST["f2"]."'"; } elseif(isset($_POST["agent"])) { $fecha = ""; $consultabreak ="SELECT id_usuario, TIME(hora_salida), TIME (hora_entrada) FROM salir_break WHERE id_usuario='".$_POST["agent"]."'"; } else { $fecha=$f->fechadehoy(); $consultabreak ="SELECT id_usuario, TIME(hora_salida), TIME (hora_entrada) FROM salir_break WHERE DATE(hora_salida)='".$f->fechadehoy()."'"; } $options=$sql->selectOptions("SELECT id_usuario,nombre FROM usuario WHERE id_tipo_usuario<>2 AND estado=1"); $rs = mysql_query($consultabreak); while ($row = mysql_fetch_array($rs)) { $td=""; for ($i = 0; $i < 3; $i++) { if($i == 0) { $nameuser = $sql->uncampo("SELECT nombre FROM usuario WHERE id_usuario='".$row[$i]."'"); $td.= "<td width=\"150\" align=\"center\">".$nameuser."</td>\n";