<?php
session_start();
$id_session=$_SESSION['id_estrategia'];
include "./var.php";
$fechahoy = date("Y-m-d");

$selectcuentasoption = getcuentas();
$proveedoresoption = getoptionproveedor();
$proyectosnombres = getproyectosoption();


$adicionales=<<<sss
<script src="../vendors/echarts/dist/echarts.min.js"></script>
<script src="../js/scripttable.js"></script>
<link href="https://canvasjs.com/assets/css/jquery-ui.1.11.2.min.css" rel="stylesheet" />
<!--<script src="https://canvasjs.com/assets/script/jquery-1.11.1.min.js"></script>-->
<script src="https://canvasjs.com/assets/script/jquery-ui.1.11.2.min.js"></script>
<script src="https://canvasjs.com/assets/script/jquery.canvasjs.min.js"></script>
<script>

var id_session = "$id_session";
/*$('#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-md-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2><strong>Presupuesto vs Real:</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">
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="fechahoy" class="form-control col-md-7 col-xs-12" type="hidden" name="fechahoy" required="required" value="$fechahoy">
                        </div>
                      </div>


                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">Nombre de proyecto:
                        </label>
                        <!--<input id="centrodeco" type="radio" name="4" value="2">-->
                        
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select class="form-control" id="centrodecostos" required="required">
                            <option value="">Seleccione proyecto</option>
                            $proyectosnombres
                          </select>
                        </div>
                      </div>

                      <br><br>
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">Seleccione Fecha Inicial y Fecha Final:
                        </label>
                        <div class="col-md-3 col-sm-3 col-xs-3">
                          <input id="fechainicio" class="form-control col-md-4" type="date" name="fechahoy" required="required" value="$fechahoy">
                        </div>

                        <div class="col-md-3 col-sm-3 col-xs-3">
                          <input id="fechafin" class="form-control col-md-4" type="date" name="fechahoy" required="required" value="$fechahoy">
                        </div>
                      </div>
                      <div class="ln_solid"></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="generagrafica();">Consultar</button>
                        </div>
                      </div>

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



            <div class="col-md-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2><strong>Reporte:</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 id="respuestatable">
                      <div id="resizable" style="height: 370px;border:1px solid gray;">
                        <div id="chartContainer1" style="height: 100%; width: 100%;"></div>
                      </div>
                    </div>

                    <!--<div class="col-md-6 col-xs-6"><br><br><br>
                          <div id="container" style="height: 450%"><br>
                            <br>
                            <br>
                            <br>
                          </div>
                          <br>
                        </div>-->

                        
                    <div class="col-md-12 col-xs-12">
                      <div class="table-responsive"><br><br>
                        <table class="table table-striped jambo_table bulk_action" id="example3" class="table table-striped table-bordered dt-responsive nowrap"cellspacing="0">
                          <thead>
                            <th></th>
                            <th></th>
                            <th><center>PRESUPUESTO</center></th>
                            <td></td>
                            <!--<th><center>REAL</center></th>
                            <th><center>INFORMACIÓN REAL AÑO ANTERIOR</center></th>-->
                            <th><center>TOTAL REAL</center></th>
                            <th></th>
                            <th>DIFERENCIA</th>
                          </thead>
                          <tbody>
                          <TR>
                            <th>TOTAL MANO DE OBRA</th>
                            <td></td>
                            <td bgcolor="#f19c99"><center><strong><div id="tmanoobra"></div></strong></center></td>
                            <td></td>

                            <!--<td bgcolor="#d0e8e6"><center><strong><div id="tmanoobrainfanoact"></div></strong></center></td>
                            <td bgcolor="#d0e8e6"><center><strong><div id="tmanoobrainfanopas"></div></strong></center></td>-->
                            <td bgcolor="#a3bbce"><center><strong><div id="tmanoobrainftot"></div></strong></center></td>
                            <td></td>
                            <td bgcolor="#d0e8e6"><center><strong><div id="tmanoobradif"></div></strong></center></td>
                            </TR>
                            <TR>
                              <th>TOTAL PROVEEDORES</th>
                              <td></td>
                              <td bgcolor="#f19c99"><center><strong><div id="totprovepres"></div></strong></center></td>
                            <td></td>

                              <!--<td bgcolor="#d0e8e6"><center><strong><div id="totproveinfoanoact"></div></strong></center></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="totproveinfoanopass"></div></strong></center></td>-->
                              <td bgcolor="#a3bbce"><center><strong><div id="totprovetotal"></div></strong></center></td>
                              <td></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="totprovediff"></div></strong></center></td>
                            </TR>
                            <TR>
                              <th>TOTAL OTROS DIRECTOS</th>
                              <td></td>
                              <td bgcolor="#f19c99"><center><strong><div id="otrosdirectpres"></div></strong></center></td>
                            <td></td>

                              <!--<td bgcolor="#d0e8e6"><center><strong><div id="otrosdirectinfoanoact"></div></strong></center></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="otrosdirectinfoanopass"></div></strong></center></td>-->
                              <td bgcolor="#a3bbce"><center><strong><div id="otrosdirecttotal"></div></strong></center></td>
                              <td></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="otrosdirectdiff"></div></strong></center></td>
                            </TR>
                            <TR>
                              <th>TOTAL INDIRECTOS</th>
                              <td></td>
                              <td bgcolor="#f19c99"><center><strong><div id="indirectpress"></div></strong></center></td>
                            <td></td>

                              <!--<td bgcolor="#d0e8e6"><center><strong><div id="indirectinfoanoact"></div></strong></center></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="indirectinfoanopas"></div></strong></center></td>-->
                              <td bgcolor="#a3bbce"><center><strong><div id="indirecttotal"></div></strong></center></td>
                              <td></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="indirectdiff"></div></strong></center></td>
                            </TR>
                            <TR>
                              <th>COSTO TOTAL</th>
                              <td></td>
                              <td bgcolor="#f19c99"><center><strong><div id="costototpress"></div></strong></center></td>
                            <td></td>

                              <!--<td bgcolor="#d0e8e6"><center><strong><div id="costototinfoanoact"></div></strong></center></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="costototinfoanopass"></div></strong></center></td>-->
                              <td bgcolor="#a3bbce"><center><strong><div id="costotottotal"></div></strong></center></td>
                              <td></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="costototdiff"></div></strong></center></td>
                            </TR>

                            <TR>
                            <th></th>
                            </TR>

                            <TR>
                              <th>MARK UP</th>
                              <td></td>
                              <td bgcolor="#f19c99"><center><strong><div id="markuppress"></div></strong></center></td>
                            <td></td>

                              <!--<td></td>
                              <td></td>-->
                              <td bgcolor="#a3bbce"><center><strong><div id="markuptotal"></div></strong></center></td>
                              <td></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="markupdiff"></div></strong></center></td>
                            </TR>

                            <TR>
                              <th>IMPUESTOS</th>
                              <td></td>
                              <td bgcolor="#f19c99"><center><strong><div id="impuestospress"></div></strong></center></td>
                            <td></td>

                             <!-- <td></td>
                              <td></td>-->
                              <td bgcolor="#a3bbce"><center><strong><div id="impuestostotal"></div></strong></center></td>
                              <td></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="impuestosdiff"></div></strong></center></td>
                            </TR>

                            <TR>
                              <th>TOTAL PROYECTO</th>
                              <td></td>
                              <td bgcolor="#f19c99"><center><strong><div id="proyectopress"></div></strong></center></td>
                            <td></td>

                              <!--<td></td>
                              <td></td>-->
                              <td bgcolor="#a3bbce"><center><strong><div id="proyectototal"></div></strong></center></td>
                              <td></td>
                              <td bgcolor="#d0e8e6"><center><strong><div id="proyectodiff"></div></strong></center></td>
                            </TR>
                          </tbody>
                        </table>
                      </div>
                    </div>

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