<? include ("clases/foro.class.php");
include ("clases/doc_curso.class.php"); $objdc = new doc_curso();
$iddc = $_REQUEST['iddc'];
if($objdc->BuscarPorCodigo($iddc)){
  $cod = $objdc->getIddoc();
}

//$cod=$_REQUEST['id']; ////iddocente ...quienes son los unicos que crean foros
$obja=new foro();



?>
<html>
	<head><title>MI FORO</title>
	
    <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>
	</head>
	
	<script language="javascript">
	function consultar(f){
	  f.action = 'mancurso.php';
	  f.submit();return true;
	}
	
	
	function confirmar()
	{
		if(confirm('Estas seguro de Eliminar el Registro?'))
			return true;
		else
			return false;
	}
	
	function guardar(f)
	{
	  if(f.concepto.value=="")
	  {
	     alert("Falta Concepto");
		 f.concepto.focus();
		 return false;
	  }
	  if(f.detalle.value=="")
	  {
	     alert("Falta Detalle");
		 f.detalle.focus();
		 return false;
	  }
	  if(f.visible.value=="")
	  {
	     alert("Seleccione");
		 f.visible.focus();
		 return false;
	  }
	  
	  f.action='controladores/procesaforo.php';
	  f.submit();
	  return true;
	}
	</script>
	<style>
	  .text_docentes2{ font-size:12px; font-family:Arial, Helvetica, sans-serif;}
	</style>
	<body >
	<div class="container">
	
<form name="f" action="" method="post">

<div class="panel-heading">
    <h4>      FOROS :  
	             
     
    <a href="datoscurso.php?curso=<?=$iddc;?>" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-share" aria-hidden="true"></span></a>
	<input type="hidden" name="text" value="<?=$valor;?>">
    <input type="hidden" name="iddoc" value="<?=$cod;?>" >
	</h4>
</div>  
<div class="container">
  
  </div>
<table width="100%"  border="0"  class="table table-responsive">
  <tr class="text_docentes active">
    <td width="268" height="39" >CONCEPTO</td>
    <td width="507" >DETALLE</td>
    <td width="99" >Fecha Pub. </td>
    <td >&nbsp;</td>
  </tr>
  <? 
			  $obj = new foro();		  
			 
			  $lista = $obj->ListarPorDoc_curso($iddc); //antes estaba por docente
			  
			  for($i = 0; $i<count($lista); $i++)
			  {
			  ?>
  <tr onMouseOver="this.style.backgroundColor='#f5f5f5'" onMouseOut="this.style.backgroundColor='FFFFFF'" class="text_docentes">
    <td height="24"><span class="glyphicon glyphicon-ok"></span> <?=$lista[$i]["concepto"];?></td>
    <td height="24"><?=$lista[$i]["detalle"];?></td>
    <td height="24"><?=$lista[$i]["fechapub"];?></td>
    <td width="17" align="center"><a href="rsptaforo.php?id=<?=$lista[$i]["idforo"];?>"><span class="glyphicon glyphicon-retweet"></span></a></td>
  </tr>
  <?
			  }
			  ?>
</table>
<p>&nbsp;</p>
    </form>
</center>
</div>
	</body>	
</html>