<?
include_once("../fnc.php");
enlinea_c();

$idu=get_session_var("unidad_id");

if($idu){
 $idunidad=$idu;
 $idgrado=get_session_var("grado_id");
 $idcurso=get_session_var("curso_id");
 $qver=mysql_query("select * from contenidos where unidad = '$idunidad' and grado = '$idgrado' and curso='$idcurso'");
 if(mysql_num_rows($qver)==0){
   $tipo="Add";
 }else{
  $info=mysql_fetch_array($qver);
  $tipo="Update";
 }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>e-Ducativo - Bienvenido</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../estilo1.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../jsincludes/overlib.js"></script>
<script language="javascript" type="text/javascript" src="../jsincludes/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
	tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		plugins : "table",
		
		theme_advanced_buttons1_add : "fontselect,fontsizeselect",
		theme_advanced_buttons2_add : "separator,forecolor,backcolor",
		//theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
		//theme_advanced_buttons3_add_before : "tablecontrols,separator",
		theme_advanced_buttons3_add : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		content_css : "example_word.css",
	    plugi2n_insertdate_dateFormat : "%Y-%m-%d",
	    plugi2n_insertdate_timeFormat : "%H:%M:%S",
		external_link_list_url : "example_link_list.js",
		external_image_list_url : "example_image_list.js",
		media_external_list_url : "example_media_list.js",
		file_browser_callback : "fileBrowserCallBack",
		paste_use_dialog : false,
		theme_advanced_resizing : true,
		theme_advanced_resize_horizontal : false,
		//theme_advanced_link_targets : "_something=My somthing;_something2=My somthing2;_something3=My somthing3;",
		paste_auto_cleanup_on_paste : true,
		paste_convert_headers_to_strong : false,
		paste_strip_class_attributes : "all",
		paste_remove_spans : false,
		paste_remove_styles : false		
	});
	
function fileBrowserCallBack(field_name, url, type, win) {
		// This is where you insert your custom filebrowser logic
		alert("Filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);

		// Insert new URL, this would normaly be done in a popup
		win.document.forms[0].elements[field_name].value = "someurl.htm";
	}
</script>
</head>

<body>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><form name="form1" method="post" action="mnt_contenido.php">
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr bgcolor="#FFFFFF">
          <td colspan="2"><div align="right"><a href="inicio.php" class="link_parrafo"><img src="../images/regresar_c.png" width="32" height="32" border="0"><br>
            Regresar</a></div></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td colspan="2" class="lbl_roja">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#CFDFEF" class="titulo_seccion">Objetivo(s) General(es) </td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#ECF2F9"><textarea name="txtcompetencia" cols="80" rows="8" class="textbox" id="txtcompetencia"><?=$info[competencia];?></textarea></td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#FFFFFF">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#CFDFEF" class="titulo_seccion">Contenidos de Aprendizaje </td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#ECF2F9"><textarea name="txtcontenido" cols="80" rows="8" class="textbox" id="txtcontenido"><?=$info[contenido];?></textarea></td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#FFFFFF">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#CFDFEF" class="titulo_seccion">Actividades de aprendizaje </td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#ECF2F9"><textarea name="txtactividad" cols="80" rows="8" class="textbox" id="txtactividad"><?=$info[actividad];?></textarea></td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#FFFFFF">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#CFDFEF" class="titulo_seccion">Actividades de evaluaci&oacute;n </td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#ECF2F9"><textarea name="txtevaluacion" cols="80" rows="8" class="textbox" id="txtevaluacion"><?=$info[evaluacion];?></textarea></td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#CFDFEF"><span class="titulo_seccion">Recurso(s)</span></td>
        </tr>
        <tr bgcolor="#ECF2F9">
          <td colspan="2"><textarea name="txtrecurso" cols="80" rows="8" class="textbox" id="txtrecurso"><?=$info[recurso];?></textarea></td>
        </tr>
        <tr>
          <td width="13%" bgcolor="#CFDFEF"><input name="submit" type="submit" class="boton_guardar" id="submit" value="Guardar"></td>
          <td width="87%" bgcolor="#CFDFEF"><input name="idu" type="hidden" id="idu" value="<?=enc(base64_decode($idu));?>">
                <input name="idg" type="hidden" id="idg" value="<?=enc(base64_decode($idg));?>">
                <input name="tipo_trn" type="hidden" id="tipo_trn" value="<?=$tipo;?>">
                <input name="idc" type="hidden" id="idc" value="<?=$idc;?>"></td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>
</body>
</html>
