<? include("../header_subnivel1.php");
include("../comun/conexion3.php");

?>

<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>

<?

	$txtid=$_GET['id'];

include("../comun/conexion3.php");
	$txtid=$_GET['id'];

$result = mysqli_query("SELECT * FROM customerexpint where id='$txtid'"); 

if ($row = mysqli_fetch_array($result)){ 

echo $row["nickname"] . " - TEL: " . $row["tel1"] . " - FAX: " . $row["fax"];





}


?>
<div align="justify" style="line-height:18px;margin-top:-44px; position:absolute;width: 960px; height:100%;background:url(../images/mundo.jpg) ">
<br /><span style="color:#00AF4B">Administrate Customers Contact Details &raquo;</span>
<br><br>

<form name="formcto" method="post" action="guardacambiocustomerctoexpint.php?id=<?=$txtid?>&&tipoc=CUSTOMER">	    
<table width="352"  border="0" align="left" style="line-height:28px">

  <tr bordercolor="#FFFFFF"> 

    <td width="49%" bgcolor="#00E1A9">Name:</td>

    <td width="51%"><input name="txtname" type="text" id="txtname" value="<? echo"$txtname"?>"></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">Function</td>

    <td><input name="txtfunction" type="text" id="txtfunction" value="<? echo"$txtfunction"?>"></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">Tel</td>

    <td><input name="txttelcto" type="text" id="txttelcto" value="<? echo"$txttelcto"?>"></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">Fax</td>

    <td><input name="txtfaxcto" type="text" id="txtfaxcto" value="<? echo"$txtfaxcto"?>"></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">Mobile</td>

    <td><input name="txtmovilcto" type="text" id="txtmovilcto" value="<? echo"$txtmovilcto"?>"></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">Nextel</td>

    <td><input name="txtnextelcto" type="text" id="txtnextelcto" value="<? echo"$txtnextelcto"?>"></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">Email</td>

    <td><input name="txtemailcto" type="text" id="txtemailcto" value="<? echo"$txtemailcto"?>"></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td ><strong></strong></td>

    <td>&nbsp; </td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">Send 

      Info EXPO</td>

    <td><select name="txtsendinfoexpo" id="txtsendinfoexpo" class="aa" >

        <option value="YES">YES</option>

        <option value="NO" selected>NO</option>

      </select></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">Send 

      Tariff EXPO</td>

    <td><select name="txtsendtariffexpo" id="txtsendtariffexpo" class="aa" >

        <option value="YES">YES</option>

        <option value="NO" selected>NO</option>

      </select></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td >&nbsp;</td>

    <td>&nbsp;</td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">Send 

      Info IMPO</td>

    <td><select name="txtsendinfoimpo" id="txtsendinfoimpo" class="aa" >

        <option value="YES">YES</option>

        <option value="NO" selected>NO</option>

      </select></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">Send 

      Arrival Notices IMPO</td>

    <td><select name="txtsendarrivalnoticesimpo" id="txtsendarrivalnoticesimpo" class="aa" >

        <option value="YES">YES</option>

        <option value="NO" selected>NO</option>

      </select></td>

  </tr>

  <tr bordercolor="#FFFFFF"> 

    <td bgcolor="#00E1A9">CC 

      Arrival Notices IMPO</td>

    <td><input name="txtccarrivalnoticesimpo" type="text" id="txtccarrivalnoticesimpo"></td>

  </tr>
  <tr bordercolor="#FFFFFF">
    <td bgcolor="#00E1A9"><input type="submit" name="Submit" value="Create" /></td>
    <td>&nbsp;</td>
  </tr>
  <tr bordercolor="#FFFFFF">
    <td bgcolor="#00E1A9">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>

</table>

  

<p align="center">
</form>

  </p>

<p> 

  <?

  

$result = mysqli_query("SELECT * FROM contact  where id = '$txtid' and section ='CUSTOMER' order by name, function"); 





if ($row = mysqli_fetch_array($result)){ 

?>
</p>
    <table align="left" width="100%"  class="tablas_con_bordes_" style="font-family:Arial, Helvetica, sans-serif; font-size:11px" >
<?

$i=0;

//encabezado

printf("<TR class='yellow'><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Name</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Function</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Tel</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Fax</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Mobile</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Nextel</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Email</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Send Info Expo</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Send Tariff EXPO</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Send Info IMPO</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Send Arrival Notices</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">CC Arrival Notices</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Delete</TD><TD><strong><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">Change</TD></TR>");

do {

	$i=$i+1; 

echo "<tr \n";

echo "          <LABEL \n";

echo "        <TD \n";

echo "      <TR>";



//impresion

printf("<TR class='comun'><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\"><a href=\"mailto:%s\"/a>%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD><TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\">%s</TD>
	   <TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\"><a href=\"javascript:preguntar('borractoexpint.php?id=%s','')\">Delete</a></TD>
	   <TD><font size=\"1\" face=\"Arial, Helvetica, sans-serif\"><a href=\"cambioctoexpint.php?idcto=%s\">Change</a></TD></TR>",$row["name"],$row["function"],$row["tel"],$row["fax"],$row["movil"],$row["nextel"],$row["email"],$row["email"],$row["sendinfoexpo"],$row["sendtariffexpo"],$row["sendinfoimpo"],$row["sendarrivalnoticesimpo"],$row["ccarrivalnoticesimpo"],$row["idcto"],$row["idcto"]);



echo "        </TD \n";

echo "      </TR>\n";



   } while ($row = mysqli_fetch_array($result)); 

   echo  "</table>" ;



}

  

  

  ?>

</p>

<form name="form1" method="post" action="customerexpint.php">

  <div align="center"></div>

</form>
</div>