<?php
if (isset($_SESSION['usuario'])){
$user=$_SESSION['usuario'];
}
else{
?>
<script>
location.href="index.php?errorusuario=3";
</script>
<?php }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link href="ucaestilos.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.Estilo1 {font-size: 14px}
-->
</style>
 
</head>

<body >
<div>
  <table width="950" border="0" align="center" bgcolor="#FFFFFF">
    <tr>
      <td><p class="style4">DUPLICAR PAQUETE :. <hr color="#CCCCCC" size="1" noshade="noshade">
        <p>&nbsp;</p>
        <p>
        <?php
			if (isset($_GET['error']))
			{
				$error=$_GET['error'];
				if ($error==1)
				{
					?>
					<script>
                    	alert("El nombre del paquete ya existe, elige otro!");
                    </script>
                    <?php
				}
			}
			?>
        </p>
        <form action="duplicarpaquete2.php" method="POST">
        <table width="53%" border="0" align="center" cellpadding="0" cellspacing="5">
          <tr>
            <td width="35%">
              <span class="style4">Seleccionar paquete:</span>
              <?php
					
					include ("conexion.php");
					$cons="SELECT * FROM paquetes ORDER BY nompaquete ASC";
					$res=mysql_query($cons,$conex) or die ("No se pudo consultar las clinicas");
					  echo "<select name='paquete' class='cuadrotexto'>";
                      While ($campo=mysql_fetch_assoc($res)) 
	    				{
						  echo "<option value=".$campo['idPaquete']." >".$campo['nompaquete']."</option>"; 
 						}
                      echo "</select>";
					  
                    ?></td>
          </tr>
          <tr>
            <td><span class="style4">Nuevo nombre del paquete: 
              <input name="nombre" type="text" class="cuadrotexto" id="nombre" size="40" />
            </span></td>
          </tr>
          <tr>
            <td><input name="Submit2" type="submit" class="boton2" value="Duplicar" /></td>
          </tr>
        </table>
        </form>
 <p>&nbsp;</p>
 <p>&nbsp;</p></td>
    </tr>
  </table>
</div>
</body>
</html>
