
<script language="JavaScript" type="text/JavaScript">
function preguntar(inst1,dato){

eliminar=confirm("Do you really want to delete it ? " + dato);

if (eliminar)

window.location.href = inst1; 
}
</script>

<script language="Javascript">

function preguntar(inst1,dato){

eliminar=confirm("Do you really want to delete it ? " + dato);

if (eliminar)

window.location.href = inst1; 
}

</script>

<p align="center"><font size="2" face="Arial, Helvetica, sans-serif"><strong>CUSTOMS 

  AGENT</strong></font></p>

<p> 

  <?

	include("../../../comun/conexion3.php");

   	

	$txtid=$_GET['id'];

	$txtval=$_GET['val'];

//echo "  <form name=\"formcto\" method=\"post\" action=\"guardacambiocustomerctoexpint.php?id=" . $txtid . "&& tipoc=CUSTOMER\">";	    

?>

</p>

<p> 

  <?

$cf=1;

$cad="";  

$cad3="";  



 



if ($txtval=="impo")

{

echo "<P>CONTACTS SEND INFO IMPO</P>";

$result = mysql_query("SELECT * FROM contact  where id like '$txtid' and sendinfoimpo='YES' and section ='CUSTOM' order by name, function"); 

while($row = mysql_fetch_array($result))

{

if ( strlen($cad)>1900)

{

$cad=substr($cad,0,strlen($cad)-2) ;

echo "<A HREF=\"mailto:?,subject=&bcc=$cad\">Send Mail IMPO $cf</A>";

echo "<p></p>";

$cf=$cf+1;

$cad="";

}



$cad=$cad . " " . $row["email"] . ", ";

$cad3=$cad3 . " " . $row["email"] . ", ";

} 

$cad=substr($cad,0,strlen($cad)-2) ;

$cad3=substr($cad3,0,strlen($cad3)-2) ;

//echo $cad;   

echo "<A HREF=\"mailto:?,subject=&bcc=$cad\">Send Mail IMPO $cf</A>";

echo "<p></p>";



echo "<A HREF=\"mailto:?,subject=&bcc=$cad3\">Send Mail IMPO ALL</A>";

echo "<p></p>";



echo $cad3;   

}

else

{

echo "<P>CONTACTS SEND INFO EXPO</P>";

$result = mysql_query("SELECT * FROM contact  where id like '$txtid' and sendinfoexpo='YES' and section ='CUSTOM' order by name, function"); 

while($row = mysql_fetch_array($result))

{

if ( strlen($cad)>1900)

{

$cad=substr($cad,0,strlen($cad)-2) ;

echo "<A HREF=\"mailto:?,subject=&bcc=$cad\">Send Mail EXPO $cf</A>";

echo "<p></p>";

$cf=$cf+1;

$cad="";

}

$cad=$cad . " " . $row["email"] . ", ";

$cad3=$cad3 . " " . $row["email"] . ", ";

} 

$cad=substr($cad,0,strlen($cad)-2) ;

$cad3=substr($cad3,0,strlen($cad3)-2) ;

//

echo "<A HREF=\"mailto:?,subject=&bcc=$cad\">Send Mail EXPO $cf</A>";

echo "<p></p>";



echo "<A HREF=\"mailto:?,subject=&bcc=$cad3\">Send Mail EXPO ALL</A>";

echo "<p></p>";



echo $cad3;   

}
echo "<p></p>";
  ?>

</p>

</body>
