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

$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>Presupuesto:</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 Especialista (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">Total Mark Up:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="markup" class="form-control col-md-7 col-xs-12" type="number" name="markup" 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"> Impuestos:</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="impuestos" class="form-control col-md-7 col-xs-12" type="number" name="impuestos" 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="agregarpress();">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></h2>
          <ul class="nav navbar-right panel_toolbox">
            <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
            </li>
            <!--<li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
              <ul class="dropdown-menu" role="menu">
                <li><a href="#">Settings 1</a>
                </li>
                <li><a href="#">Settings 2</a>
                </li>
              </ul>
            </li>
            <li><a class="close-link"><i class="fa fa-close"></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="example2" 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;&nbsp;&nbsp;Total &nbsp;&nbsp;Especialistas (Preoveedores)</th>
                <th>&nbsp;&nbsp;Total &nbsp;&nbsp;Otros Directos</th>
                <th>&nbsp;&nbsp;&nbsp;Total Indirectos</th>
                <th>Total Mark &nbsp;&nbsp;Up</th>
                <th>Impuestos</th>
                <th>&nbsp;Egresos &nbsp;&nbsp;Totales &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;del Proyecto</th>
                <th>Ingresos &nbsp;Totales &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;de Proyecto</th>
                <th>Saldo al &nbsp;&nbsp;Cierre &nbsp;del Año Anterior</th>
                <th>Detalle</th>
              </thead>
              <tbody>
                $infopress
              </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 class="col-xs-12"><!--aqui-->
      <div class="x_panel">
        <div class="x_title">
          <h2><strong>Detalle:</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>
            <!--<li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
              <ul class="dropdown-menu" role="menu">
                <li><a href="#">Settings 1</a>
                </li>
                <li><a href="#">Settings 2</a>
                </li>
              </ul>
            </li>
            <li><a class="close-link"><i class="fa fa-close"></i></a>
            </li>-->
          </ul>
          <div class="clearfix"></div>
        </div>
        <div class="x_content">
          <div class="table-responsive" id="tablapressdetalle">
            
          </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;
?>