File: /home/asjudine/www/listado_veedor_reasignar.php
<?php
require_once("mainfile.php");
include ("config.php");
global $dbi;
function Conectarse()
{
if (!($link=@mysql_connect("localhost","asjudine","as2006")))
{
echo "Error conectando con el servidor.";
exit();
}
$dbname = "asjudinet";
if (!@mysql_select_db($dbname,$link))
{
echo "Error seleccionando la base de datos.";
exit();
}
return $link;
}
Conectarse();
$sql = mysql_query('SELECT * FROM vendedores WHERE tipo= "AE" and estado = "1" order by vendedor ');
if (!$sql) {
die('Invalid query 12: ' . mysql_error());
}
$row_sql = mysql_fetch_assoc($sql);
$totalRows_sql = mysql_num_rows($sql);
$sql2 = mysql_query('SELECT * FROM veedores_ciudadanos order by codigo ');
if (!$sql2) {
die('Invalid query 12: ' . mysql_error());
}
$row_sql2 = mysql_fetch_assoc($sql2);
$totalRows_sql2 = mysql_num_rows($sql2);
?>
.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Listado Reasignar Citas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.titulos {font: 16px; color: red; font-family:Arial; font-weight:bold}
.boton {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.texto {background-color: #CCFFCC; font-size: 10px; font-family: Arial; color:#0000CC; display: block;}
.fecha {font-size: 12px; font-family: Arial; color:#990000; display: block; }
.campo {background-color:#FFFFAA; width: 100px; border:2px solid #990000;}
.lista {font-family: Arial; font-size: 12px; color: #003333;}
.lista2 {font-family: Arial; font-size: 16px; color: #FF6600;}
.boton2 {
font-family: Verdana;
font-size: 8 pt;
color: #000080;
background-color: #C0C0C0;
border-style: solid;
width:90px;
height:22px;
}
body {
background-image: url();
}
.Estilo50 {color: #CC3333;
font-family: "Arial Narrow";
font-weight: bold;
}
.Estilo51 {
color: #3366FF;
font-weight: bold;
}
.boton1 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
.boton11 {background-color: #FFCCCC; color:#FFFFFF; width:90px; height:25; border: 3px solid #0000CC; font-family:Arial; color:#990000;}
-->
</style>
<script languaje="JavaScript">
function Mostrar_Fecha()
{
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
document.write("<b><font face='Arial, Helvetica, sans-serif'>"+dayarray[day]+" "+daym+" de "+montharray[month]+" de "+year+"</font></b>")
}
</script>
<script language="javascript">
function AbreGral()
{
var menu;
menu=window.open("mostrar_ingreso.php","","toolbar=no,scrollbars=no,width=800,height=500,status=yes");
menu.focus();
var ventana = window.self;
ventana.opener = window.self;
ventana.close();
}
</script>
</head>
<body onLoad="document.formulario.cedula.focus()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="formulario" action="" method="post">
<table width="463" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="523"><fieldset><table width="461" border="0" align="center" cellpadding="2" cellspacing="2">
<tr bgcolor="#FFFFCC">
<td colspan="2" class="titulos"><div align="center">REASIGNAR CITAS </div></td>
</tr>
<tr bgcolor="#ECE9D8">
<td height="22" colspan="2" class="fecha"><div align="center">
<script languaje="JavaScript">Mostrar_Fecha()</script>
</div></td>
</tr>
<tr bgcolor="#FFCC99">
<td colspan="2"><div align="center" class="Estilo51">
<input name="menu2" type="button" class="Estilo50" id="menu2" onClick="window.location.href='menu_telemercadeo.php'" value="IR AL MENU">
</div></td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
</form>
</body>
</html>
<?php
echo "<form name='form' action='' method='post'>";
require_once("mainfile.php");
include ("config.php");
global $dbi;
$mssql = mysql_query('SELECT cedula, razon, direccion, representante, fecha_cita, hora_cita, gestion FROM telemaprueba WHERE estado = "14"');
if (!$mssql) {
die('Invalid query: ' . mysql_error());
}
if($mssql)
{
$filas = mysql_num_rows($mssql);
if ($filas > 0)
{
$contro2 = mysql_query('SELECT cedula, razon, direccion, representante, fecha_cita_asesor , hora_cita_asesor , gestion FROM telemaprueba WHERE estado = "14" order by fecha_cita');
if (!$contro2) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($contro2)!=0))
{
echo "<TABLE width='900' border='' align='center' cellpadding='' cellspacing=''>
<TR>
<TD bgcolor='#000066'><div align='center'><span class='texto'>CEDULA</span></div></TD>
<TD bgcolor='#000066'><div align='center'><span class='texto'>RAZON</span></div></TD>
<TD bgcolor='#000066'><div align='center'><span class='texto'>DIRRECCION</span></div></TD>
<TD bgcolor='#000066'><div align='center'><span class='texto'>REPRESENTANTE</span></div></TD>
<TD bgcolor='#000066'><div align='center'><span class='texto'>FECHA</span></div></TD>
<TD bgcolor='#000066'><div align='center'><span class='texto'>HORA</span></div></TD> ";
while(list($cedula, $razon, $dir, $repre, $fech, $hora, $acuer) = mysql_fetch_row($contro2))
{
$mssql = mysql_query('SELECT vendedor FROM vendedores WHERE codigo = "' . "$asesor". '" ');
if (!$mssql) {
die('Invalid query: ' . mysql_error());
}
list($ase) = mysql_fetch_row($mssql);
$total = $total + 1;
printf("<tr>
<TD bgcolor='#ECE9D8'><div align='center' class='lista'><input type='button' value=$cedula name='cedu' class=est_cont1 onClick =window.location.href='informe_veedor_reasginar.php?ced=$cedula'></a></span></div></TD>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$razon."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$dir."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$repre."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$fech."</span></div></td>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$hora."</span></div></td>");
}
echo "</table>";
echo "<TABLE width='200' border='' align='center' cellpadding='' cellspacing=''>
<TR>
<TD bgcolor='#000066'><div align='center'><span class='texto'>TOTAL</span></div></TD>";
printf("<tr>
<td bgcolor='#FFFFCC'><div align='center' class='lista'>".$total."</span></div></td>");
}
}
}
?>