<?php
include ("clases/clases.class.php");
include ("clases/doc_curso.class.php");
include ("clases/curso.class.php");
include ("clases/autor.class.php");
include ("clases/matricula.class.php"); $objmat = new matricula();
$objdc = new doc_curso(); $objc = new curso(); $objd = new autor();
$cod=$_REQUEST['dc']; $idc=$_REQUEST['cur'];
if($objdc->BuscarPorCodigo($cod)){
     $idcurso =  $objdc->getIdcurso();
	 if($objc->BuscarPorCodigo($idcurso))
	    {$nombrecurso = $objc->getCurso();
		 $bv = $objc->getBienvenida();
		 $ic = $objc->getCursoinfo();
		}
	 $iddoc =  $objdc->getIddoc();
	 if($objd->BuscarPorCodigo($iddoc))
	    {$nom = $objd->getNombres()." ".$objd->getApellidos();
		 $foto = $objd->getFoto();
		}
   }
?>

<!DOCTYPE html>
<head>
<title>edit curso</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="Shortcut Icon" type="image/x-icon" href="assets/icons/book.ico" />
	
    <script src="js/sweet-alert.min.js"></script>
    <link rel="stylesheet" href="css/sweet-alert.css">
    <link rel="stylesheet" href="css/material-design-iconic-font.min.css">
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/jquery.mCustomScrollbar.css">
    <link rel="stylesheet" href="css/timeline.css">
    <link rel="stylesheet" href="css/style.css">
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="js/jquery-1.11.2.min.js"><\/script>')</script>
    <script src="js/modernizr.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="js/main.js"></script>
	
	<script src="editor/ckeditor/ckeditor.js" type=text/javascript></script>
	<script>
	function editar(f)
	{    		
	   f.action='controladores/procesacurso.php';
	   f.submit();
	   return true;			
	}
	</script>
</head>

<body>
<div class="container">
<form name="form2" method="post" action="">
<div class="panel-heading">
    <h1>     Edicion de informaci&oacute;n del curso de <?=$nombrecurso;?>  
        <a href="datoscargalectiva.php?dc=<?=$cod;?>" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-share" aria-hidden="true"></span></a>
	</h1>	
</div>

          <div class="form-group">
		  Ingrese Presentaci&oacute;n/Bienvenida:
		    <input name="idcurso" id="idcurso" type="hidden" value="<?=$idcurso;?>">		   
		 
        <input class="form-control " type="hidden" name="curso" id="curso" placeholder="Curso" value="<?=$nombrecurso;?>">
		</div>
		<div class="form-group">
		<textarea name="bienvenida" id="bienvenida"  class="form-control" placeholder="Presentacion" ><?=$bv;?>
               
            </textarea><script>
                CKEDITOR.replace( 'bienvenida' );
            </script>
		</div>
		<div class="form-group">
		
		    
		    <input name="text" type="hidden" value="A" id="text">	
			<input name="dc" type="hidden" value="<?=$cod;?>" id="dc" >		
        </div>       
  
          <div class="modal-footer ">
        <button type="button" class="btn btn-success btn-lg" style="width: 100%;" onClick="editar(this.form);"><i class="zmdi zmdi-thumb-up"></i> &nbsp;Actualizar</button>
		
      </div>
</form>
</div>
</body>
</html>
