<?php
session_start();
include "./var.php";
//$clientesoption = getclientesoption();
//$lnegociooption = getlnegociooption();
$proyectosnombres = getproyectosoption();
$infocc = getccinfo();
//$infopress = getccpres();

$adicionales=<<<sss
<script src="../js/scripttable.js"></script>
<script>
$('#example2').DataTable();
var table = $('#example2').DataTable();

$('#example2 tbody').on( 'click', 'tr', function () {
    if ( $(this).hasClass('selected') ) {
        $(this).removeClass('selected');
    }
    else {
        table.$('tr.selected').removeClass('selected');
        $(this).addClass('selected');
    }
} );

</script>
sss;
echo $varfirst;

echo $var=<<<llll
<div class="right_col" role="main">
                        <div class="col-xs-12">
              <div class="x_panel">
                  <div class="x_title">
                    <h2><strong>Agregar Saldo Histórico</strong> <small></small></h2>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                      </li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                    <br />
                    <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left">
                      
                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Proyecto:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control" id="proyname" required="required">
                            <option value="">Seleccione proyecto</option>
                            $proyectosnombres
                          </select>
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Total Nómina Arquitectos:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="tnomina" class="form-control col-md-7 col-xs-12" type="number" name="tnomina" required="required" placeholder="$">
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Total Especialistas (Proveedores):</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="tespecialista" class="form-control col-md-7 col-xs-12" type="number" name="tespecialista" required="required" placeholder="$">
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Total Otros Directos:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="totros" class="form-control col-md-7 col-xs-12" type="number" name="totros" required="required" placeholder="$">
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Total Indirectos:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="tindirectos" class="form-control col-md-7 col-xs-12" type="number" name="tindirectos" required="required" placeholder="$">
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Ingresos Totales del Proyecto:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="ingresototal" class="form-control col-md-7 col-xs-12" type="number" name="ingresototal" required="required" placeholder="$">
                        </div>
                      </div>

                     <div class="ln_solid"></div>
                      <div class="form-group">
                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                          <button id="limpiargastos" class="btn btn-primary" type="reset">Limpiar</button>
                          <button type="button" class="btn btn-success" onclick="agregainfocc();">Agregar</button>
                        </div>
                      </div>

                    </form>
                  </div>
                </div>
            </div>


  <div class="col-xs-12"><!--aqui-->
      <div class="x_panel">
        <div class="x_title">
          <h2><strong>Centro de Costos:</strong><small>Consultar y modificar</small></h2>
          <ul class="nav navbar-right panel_toolbox">
            <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
            </li>
            
          </ul>
          <div class="clearfix"></div>
        </div>
        <div class="x_content">
          <div class="table-responsive">
            <table class="table table-striped jambo_table bulk_action" id="example" class="table table-striped table-bordered dt-responsive nowrap"cellspacing="0">
              <thead>
                <th>&nbsp;Proyecto</th>
                <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Total &nbsp;&nbsp;&nbsp;Nómina Arquitectos</th>
                <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Total &nbsp;Especialistas (Proveedores)</th>
                <th>&nbsp;&nbsp;Total &nbsp;&nbsp;Otros Directos</th>
                <th>&nbsp;&nbsp;&nbsp;&nbsp;Total Indirectos</th>
                <th>&nbsp;Egresos &nbsp;&nbsp;Totales &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;del Proyecto</th>
                <th>&nbsp;Ingresos &nbsp;&nbsp;Totales &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;del Proyecto</th>
                <th>&nbsp;Saldo al &nbsp;&nbsp;&nbsp;Cierre &nbsp;&nbsp;del Año &nbsp;&nbsp;Anterior</th>
                <th>Fecha</th>
                <th>Eliminar</th>
              </thead>
              <tbody>
                $infocc
              </tbody>
            </table>
          </div>
        <!--<button class="btn btn-danger" type="button" id="button">Borrar</button>
        <small>(Para eliminar un registro debe seleccionarlo y después debe oprimir Borrar).</small>-->
      </div>
    </div>
   </div>


</div>
llll;
echo $varend;
echo $adicionales;
echo $cerrarend;
?>