<h2>CONFIGURAR PAR&Aacute;METROS</h2><br>
<div id="wrapper">
   <div id="steps">
          <form action="app/model/insertar_parametros.php" method="POST"  enctype="multipart/form-data">

           <fieldset class="step">

           <p>
           <label for="ins">Instituci&oacute;n </label>
           <input type='text' id='ins' name='ins' value='<?php echo ($tsArray[0]['institucion']);?>'>
           </p>

           <p>
           <label for="bsd">Bases de Datos</label>
           <input type='text' id='bsd' name='bsd' size='72'  value='<?php echo ($tsArray[0]['basededatos']);?>'>
           </p>

           <p>
           <label for="enc">Encabezado</label>
           <input type='text' id='enc' name='enc' size='72'  value='<?php echo ($tsArray[0]['encabezado']);?>'>
           </p>

           <p>
           <label for="enc1">Encabezado1</label>
           <input type='text' id='enc1' name='enc1' size='72'  value='<?php echo ($tsArray[0]['encabezado1']);?>'>
           </p>

           <p>
           <label for="dcr">Decreto</label>
           <input type='text' id='dcr' name='dcr' size='72'  value='<?php echo ($tsArray[0]['decreto']);?>'>
           </p>

           <p>
           <label for="mcp">Municipio</label>
           <input type='text' id='mcp' name='mcp' size='22'  value='<?php echo ($tsArray[0]['municipio']);?>'>&nbsp;&nbsp;&nbsp;
           </p>

           <p>
           <label for="redu">Registro Educativo</label>
           <input type='text' id='redu' name='redu' size='22'  value='<?php echo ($tsArray[0]['registroeducativo']);?>'>
           </p>

           <p>
           <label for="pla">Numero de Planilla</label>
           <input readonly='readonly' type='text' id='pla' name='pla' size='22'  value='<?php if(!empty ($tsArray[1]['noplanilla']))echo ($tsArray[1]['noplanilla']);?>'>
           </p>

           <p>
           <label for="reg">Numero de Registro</label>
           <input readonly='readonly' type='text' id='reg' name='reg' size='22'  value='<?php  if(!empty ($tsArray[1]['noregistro']))echo ($tsArray[1]['noregistro']);?>'>
           </p>

           </fieldset>


          <fieldset class="step">

           <p>
           <label for="dn">Codigo DANE</label>
           <input type='text' id='dn' name='dn'  size='32'  value='<?php echo $tsArray[0]['codigodane'];?>'>
           </p>

           <p>
           <label for="leyend">Leyenda Certificado Final</label>
           <textarea id='leyen' name='leyen'  rows='6' cols='72'><?php echo ($tsArray[0]['certificadofinal']);?></textarea>
           </p>

           <p>
           <label for="sede">Sede</label>
           <input type='text' id='sede' name='sede' size='72'  value='<?php echo ($tsArray[0]['sede']);?>'>
           </p>

           <p>
                             <?php

                                        if($tsArray[0]['consolidarporareas']=='1')
                                            {

                                           echo'

                                            Consolidado Areas</b>

                                            <input type="radio" name="rd"  value="conare" checked="checked">&nbsp;&nbsp;&nbsp;

                                            Consolidado Asignaturas</b>

                                            <input type="radio" name="rd" value="conasig" >

                                        ';

                                        }else{
                                             echo'

                                            Consolidado Areas</b>

                                            <input type="radio" name="rd"  value="conare" >&nbsp;&nbsp;&nbsp;

                                            Consolidado Asignaturas</b>

                                            <input type="radio" name="rd" value="conasig" checked="checked">

                                        ';
                                        }

                                    ?>
               
              </p>

              <p>
              <label for="defare">Definitiva Area</label>
              <input type='text' id='defare'  name='defare' size='72' value='<?php echo $tsArray[0]['definitiva_area'];?>'>
              </p>

              <p>
              <label for="codalum">Codigo Alumno</label>
              <input type='text' id='codalum' name='codalum' size='72'  value='<?php echo $tsArray[0]['codigalumno'];?>'>
              </p>

             </fieldset>



            <fieldset class="step">

            <p>
              <label for="nom_rec">Nombre Rector</label>
            <input type='text' id='nom_rec' name='nom_rec' value='<?php  if(!empty ($tsArray[1]['rector']))echo ($tsArray[1]['rector']);?>'  >
            </p>

            <p>
            <label for="ced_rec">C&eacute;dula Rector</label>
            <input type='text' id='ced_rec' name='ced_rec' size='72' value='<?php  if(!empty ($tsArray[1]['cedula_rector']))echo ($tsArray[1]['cedula_rector']);?>' >
            </p>

            <p>
            <label for="nom_sec">Nombre Secretario</label>
            <input type='text' id='nom_sec' name='nom_sec' size='72' value='<?php  if(!empty ($tsArray[1]['secretario']))echo ($tsArray[1]['secretario']);?>' >
            </p>

            <p>
            <label for="ced_sec">C&eacute;dula Secretario</label>
            <input type='text' id='ced_sec' name='ced_sec' size='72' value='<?php  if(!empty ($tsArray[1]['cedula_secretario']))echo ($tsArray[1]['cedula_secretario']);?>' >
            </p>

            <p>
            <label for="ncer">N&uacute;mero de Certificado</label>
            <input type='text' id='ncer' name='ncer' size='72' value='<?php  if(!empty ($tsArray[1]['no_certificado']))echo ($tsArray[1]['no_certificado']);?>' >
            </p>

            <p>
            <label for="nf">N&uacute;mero de Folio</label>
            <input type='text' id='nf' name='nf' size='72' value='<?php  if(!empty ($tsArray[1]['no_folio']))echo ($tsArray[1]['no_folio']);?>' >
            </p>

            <p>
            <label for="ncons">N&uacute;mero de Constancia</label>
            <input type='text' id='ncons' name='ncons' size='72' value='<?php  if(!empty ($tsArray[1]['no_constancia']))echo ($tsArray[1]['no_constancia']);?>' >
            </p>
            
            </fieldset>

                
            <fieldset class="step">
                <p>
                <div id="escu">
                        <?php if($tsArray[0]['escudo']=='')
                            {echo"
                                <br><center>
                                <table border='0' cellspacing='4' cellpadding='2' >
                                <tr>
                                    <th>
                                       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Escudo
                                    </th>
                                    <td>
                                   <input type='file' id='imagen' name='imagen' />
                                      </td>
                                </tr>
                                <tr>
                                    <td align='center' colspan='2'>
                                       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;  <output id='list'></output>
                                    </td>
                                </tr>
                                </table>
                                </center>

                                 <script>
                                          function archivo(evt) {
                                              var imagen = evt.target.files; // FileList object

                                              // Obtenemos la imagen del campo \"file\".
                                              for (var i = 0, f; f = imagen[i]; i++) {
                                                //Solo admitimos imágenes.
                                                if (!f.type.match('image.*')) {
                                                    continue;
                                                }

                                                var reader = new FileReader();

                                                reader.onload = (function(theFile) {
                                                    return function(e) {
                                                      // Insertamos la imagen
                                                     document.getElementById(\"list\").innerHTML = ['<img class=\"thumb\" src=\"', e.target.result,'\" title=\"', escape(theFile.name), '\" id=\"imgSalida\" name=\"imgSalida\"  height=\"10\" width=\"380\">'].join('');
                                                    };
                                                })(f);

                                                reader.readAsDataURL(f);
                                              }
                                          }

                                          document.getElementById('imagen').addEventListener('change', archivo, false);
                                  </script>
                          ";}else {
                              echo'
                           <br><center>
                                <table border=\'0\' cellspacing=\'4\' cellpadding=\'2\' >
                                <tr>
                                    <th><output id=\'list\'><img class="thumb" id="imgSalida" name="imgSalida" src="../fotografias/'.$tsArray[0]['escudo'].'"   height="100" width="380"> </output>
                                    </th>
                                </tr>
                                <tr>
                                <td align="center">
                             <div id="botones" ><input type="button" value="Cambiar Imagen" style="margin: 0px 5px 0px 5px" onclick="btncambiarImg()"></div>
                                </td>
                                </tr>
                                </table>
                             <div id="file" style="margin: 0px 0px 0px 0px"> </div>';
                          }

                          ?>
                        </div>
            </p>
          </fieldset>

                
          <fieldset class="step">                                                          

               <p class="submit">
                  <button id="registerButton" type="submit">Grabar</button>
               </p>

         </fieldset>

         <fieldset class="step">  
         </fieldset>



         <input type="hidden" id="infoimg" name="infoimg">

         </form>

        </div>



         <div id="navigation" style="display:none;">
        <ul>

            <li class="selected">
                <a href="#" >Instituci&oacute;n</a>
            </li>
            <li>
                <a href="#">Acad&eacute;mico</a>
            </li>
            <li>
                <a href="#">Personal</a>
            </li>
            <li >
                <a href="#">Escudo</a>
            </li>
            <li>
                <a onclick="comprobar()" href="#">Grabar</a>
            </li>

            <li>
            <a href="" onclick="menueditar()">Retornar</a>
            </li>
        </ul>
    </div>
</div>


