<?php
session_start();
include "./var.php";
$datostablausuarios = getusuarios();
$tablagastos = getgastos($_SESSION['id_estrategia']);
$tablalineadeneg = gelineadenegocio();
$tabaetapaproy = getetapaproy();
$movingresostab = getmovingresostab();

$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');
    }
} );

$('#example3').DataTable();
var table = $('#example3').DataTable();

$('#example3 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-md-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2><strong>Presupuesto agregar indirectos:</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 class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">Seleccione Etapa:
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control" id="cuentaegreso" required="required">
                            <option value="">Seleccione opcion</option>
                          </select>
                        </div>
                      </div>


                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">Nombre de recurso:
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control" id="cuentaegreso" required="required">
                            <option value="">Seleccione opcion</option>
                          </select>
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Puesto:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="ndegasto" class="form-control col-md-7 col-xs-12" type="text" name="ndegasto" required="required">
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Cuota de costo de venta x hora:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="ndegasto" class="form-control col-md-7 col-xs-12" type="text" name="ndegasto" required="required">
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Horas al día:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="ndegasto" class="form-control col-md-7 col-xs-12" type="text" name="ndegasto" required="required">
                        </div>
                      </div>


                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Días a la semana:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="ndegasto" class="form-control col-md-7 col-xs-12" type="text" name="ndegasto" required="required">
                        </div>
                      </div>


                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Markup % General :</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="ndegasto" class="form-control col-md-7 col-xs-12" type="text" name="ndegasto" required="required">
                        </div>
                      </div>

                      

                      
                      
                      <div class="ln_solid"></div>
                      <br>
                      <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="agregargastos();">Agregar</button>
                        </div>
                      </div>
                    </form>
                  </div>
                   <div class="x_content">
                    <div class="table-responsive">
                      
                    </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 class="col-md-6 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2><strong>Presupuesto agregar costos directos:</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 class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">seleccione concepto de gasto:
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control" id="cuentaegreso" required="required">
                            <option value="">Seleccione opcion</option>
                            
                          </select>
                        </div>
                      </div>

                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">¿Es especialista?:
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control" id="cuentaegreso" required="required">
                            <option value="">Seleccione opcion</option>
                            <option value="">si</option>
                            <option value="">no</option>
                          </select>
                        </div>
                      </div>

                      <div class="form-group">
                        <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">Ingrese monto:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="ndegasto" class="form-control col-md-7 col-xs-12" type="text" name="ndegasto" required="required">
                        </div>
                      </div>
                      
                      <div class="ln_solid"></div>
                      <br>
                      <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="agregargastos();">Guardar</button>
                        </div>
                      </div>

                    </form>
                  </div>
                  
                   <div class="x_content">
                    <div class="table-responsive">
                    </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 class="col-md-6 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2><strong>Presupuesto agregar indirectos:</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">Ingrese monto:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="ndegasto" class="form-control col-md-7 col-xs-12" type="text" name="ndegasto" required="required">
                        </div>
                      </div>
                      
                      <div class="ln_solid"></div>
                      <br>
                      <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="agregargastos();">Agregar</button>
                        </div>
                      </div>

                    </form>
                  </div>
                  
                   <div class="x_content">
                    <div class="table-responsive">
                      
                    </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;
?>