<?php
 
session_start();
$com = "E";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
require_once("DFJQUERY.inc");
include("DF30000.inc");
include("DF80000.php");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<?php

if ($_REQUEST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=valeryus70300_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	if(!isset($_REQUEST['tap2'])){
		include('valeryus70300_CL.php');
		$varible_clase = new clase();
		$res=$varible_clase->lista_busqueda($_REQUEST["bot"]);
		$reg=mysqli_fetch_array($res);
		$_REQUEST['tap2']=$reg['pdescrip'];
		$_REQUEST['n_reg']=$reg['n_reg'];
		$_REQUEST['pregunta']=$reg['pregunta'];
		$_REQUEST['respuesta']=$reg['respuesta'];
		$_REQUEST['fecha']=chfecha($reg['fecha'],'Y-m-d','d/m/Y');
		}
?>

<script language="javascript">
function ocultaMuestra(divVent){
	if(divVent.style.display=='none'){
		divVent.style.display='';

	}else{
		divVent.style.display='none';

	}
}	
	</script>
<body>

<form name="frm1" method="post" action="" enctype="multipart/form-data">
  <p>
    <input name="bot" type="hidden" value="<?php
 echo $_REQUEST['bot'];?>"> 
  </p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table width="728" border="0" align="center">
    <tr>
      <th colspan="4"><span class="Estilo20">ELIMINAR QUEJA.</span> </th>
    </tr>
    <tr>
      <td width="100"  ><span class="Estilo20"><strong>CODIGO</strong></span></td>
      <td width="612" colspan="3" style="#66CCFF"><span class="Estilo19">
        <input name="n_reg" type="text" id="n_reg" tabindex="20" size="15" value="<?php
echo $_REQUEST['n_reg'];?>">
        <input name="bot1" type="button" class="form" onClick="openpage('valeryus70300_EC.php','_self')" value="Eliminar"/>
        <input name="bot4" type="button" class="form" onClick="openpage('valeryus70300_PR.php','_self')" value="Regresar"/>
      </span></td>
    </tr>
  </table>
  <div id="divVent" style="display:">
    <table width="728" border="0" align="center"  >
      <tr>
        <td width="100"  ><span class="Estilo24">NOMBRE DEL HUESPED </span></td>
        <td colspan="3" style="#66CCFF"><select name="pregunta" id="pregunta" onChange="javascript: document.getElementById('frm1').submit()" tabindex="10">
          <option value="">--SELECCIONE--</option>
          <?php
 
$sql = mysqli_query($con ,"SELECT * FROM valeryus19 where status = 'huesped'");
while($reg=mysqli_fetch_array($sql)){ 
	if($_REQUEST['pregunta']==$reg['fapellido'] ){
		echo '<option value="' . $reg['fapellido'] . '" selected>' . $reg['fapellido'] . ' ' . $reg['fnombre'] . '</option>';
	}else{
		echo '<option value="' . $reg['fapellido'] . '">' . $reg['fapellido'] . ' ' . $reg['fnombre'] . '</option>';
	}
}
?>
        </select></td>
      </tr>
      <tr>
        <td  ><span class="Estilo24">FECHA</span></td>
        <td colspan="3" style="#66CCFF"><input name="fecha" type="text" id="fecha" size="10" onKeyPress="return validar(event)" value="<?php
echo $_REQUEST['fecha'];?>">
        <input name="reset" id="bot_b" type="image" src="logos/cal4.jpg"/>
        <script type="text/javascript">
		  Calendar.setup(
			{
			  inputField  : "fecha",        // ID of the input field
			  ifFormat    : "%d/%m/%Y",    // the date format
			  button      : "bot_b"      // ID of the button
			}
		  );
        </script></td>
      </tr>
      <tr>
        <td  ><span class="Estilo22">PREGUNTA?</span></td>
        <td width="250" style="#66CCFF"><textarea name="tap2" cols="30" rows="4" id="tap2" tabindex="4"><?php
echo $_REQUEST['tap2'];?>
		</textarea></td>
        <td width="100"  ><span class="Estilo22">RESPUESTA</span></td>
        <td width="250" style="#66CCFF"><textarea name="respuesta" cols="30" rows="4" id="respuesta" tabindex="4"><?php
echo $_REQUEST['respuesta'];?>
		</textarea></td>
      </tr>
    </table>
  </div>
  <div id="divArt" style="display:none">
</form>
 <?php
 
}
?>
</body>
</html>
<?php
 mysqli_close($con);?>

</body>
</html>



