<?
include ("clases/reunion.class.php"); $objb = new reunion();
 $iddoc_curso=$_REQUEST['iddoc_curso'];
 
 $ide = $_REQUEST['idreunion'];
 if($objb->BuscarPorCodigo($ide))
 {
   $titulo = $objb->getTitulo();
   $url = $objb->getUrl();
   $detalle = $objb->getDetalle();
   $visible = $objb->getVisible();
   $valor = "M";
   $boton = "Modificar";
 }else{
 		$valor = "R";
		$boton = "Guardar";
      }
?>
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/bootstrap-theme.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>

<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/app.js"></script>

<script src="editor/ckeditor/ckeditor.js" type=text/javascript></script>

<script>
function guardar(f)
{
   if(f.titulo.value==""){
      alert("Debe ingresar un titulo");
	  f.titulo.focus();
	  return false;
   }
   if(f.url.value==""){
      alert("No ha ingresado ninguna URL");
	  f.url.focus();
	  return false;
   }
  /* if(f.visible.value==""){
      alert("Seleccione el estado de la entrada");
	  f.visible.focus();
	  return false;
   }*/
   f.action="controladores/procesareunion.php";
   f.submit();
   return true;
}
</script>
</head>

<body>
<div class="container">
<form name="form1" method="post" action="">
 <div class="panel-heading">
    <h4>      Registrar Reunion:    <a href="listareunion.php?id=<?php echo $iddoc_curso;?>" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a></h4>
  </div> 
  
  <div class="form-group">
  Ingrese Titulo
  </div>
  <div class="form-group">
  <input name="titulo" type="text" class="form-control" value="<?=$titulo;?>">
  </div>
  
  <div class="form-group">
  <input name="url" type="text" value="<?php echo $url;?>" placeholder="URL" class="form-control">
  </div>
  <div class="form-group">
  <textarea name="detalle" id="detalle"  class="form-control" placeholder="Detalle" ><?=$detalle;?>
               
            </textarea><script>
                CKEDITOR.replace( 'detalle' );
            </script>
  </div>
  <div class="form-group">
   <table width="100%" border="0">
  <tr>
    <td scope="col" align="right"><input name="" type="button" value="<?=$boton;?>" class="btn btn-success" onClick="guardar(this.form);"></td>
  </tr>
</table>
Visible;
   <select name="visible" class="form-control-static" >
    <option value="<?php if($visible!=""){echo $visible;}else{echo "";}?>"><?php if($visible!=""){echo $visible;}else{echo "Seleccione";}?></option>
	<option value="SI">SI</option>
	<option value="NO">NO</option>
   </select>
   <input type="hidden" name="idreunion" value="<?=$ide;?>">
   <input type="hidden" name="text" value="<?=$valor;?>">
   <input type="hidden" name="iddoc_curso" value="<?php echo $iddoc_curso;?>">
  </div>
   
</form>
</div>
</body>
</html>
