<?php
defined('BASEPATH') OR exit('No direct script access allowed');
 
?>

            <div class="content-wrapper">
                <section class="content-header">
                    <?php echo $pagetitle; ?>
                    <?php echo $breadcrumb; ?>
                </section>
                <section class="content">
                    <div class="row">
                        <div class="col-md-12">
                             <div class="box">
                                <div class="box-body">
                                    <table id="tabla_listado" class="table table-striped table-hover">
                                        <thead>
                                            <tr>
											    <th><?php echo lang('in_temp_dpto');?></th>
                                                <th><?php echo lang('in_temp_dpto_desc');?></th>
                                                <th><?php echo lang('in_temp_distrito');?></th>
                                                <th><?php echo lang('in_temp_dist_desc');?></th>
                                                <th><?php echo lang('in_temp_colonia');?></th>
                                                <th><?php echo lang('in_temp_col_desc');?></th>
                                                <th><?php echo lang('in_temp_mz_agr');?></th>
                                                <th><?php echo lang('in_temp_lote_agr');?></th>
                                                <th></th>
                                                <th></th>
                                                <th></th>
                                            </tr>
                                            <tr>
                                            <?php echo form_open(current_url(), array('class' => 'form-horizontal', 'id' => 'form-create_geocolonia')); ?>
                                                <th><input id="dpto" name="dpto" type="text" class="form-control" 
                                                placeholder="<?php echo lang('in_temp_dpto');?>" 
                                                value="<?php if (isset($_SESSION['arraywhere_in_temp']['dpto'])) 
                                                             {  
                                                                echo $_SESSION['arraywhere_in_temp']['dpto'];
                                                             }else{
                                                                echo '';
                                                             } ?>"
                                                enable autofocus></th>

                                                <th><input id="dpto_desc" name="dpto_desc" type="text" class="form-control" 
                                                placeholder="<?php echo lang('in_temp_dpto_desc');?>" 
                                                value="<?php if (isset($_SESSION['arraywhere_in_temp']['dpto_desc'])) 
                                                             {  
                                                                echo $_SESSION['arraywhere_in_temp']['dpto_desc'];
                                                             }else{
                                                                echo '';
                                                             } ?>"
                                                enable></th>

                                                <th><input id="distrito" name="distrito" type="text" class="form-control" 
                                                placeholder="<?php echo lang('in_temp_distrito');?>" 
                                                value="<?php if (isset($_SESSION['arraywhere_in_temp']['distrito'])) 
                                                             {  
                                                                echo $_SESSION['arraywhere_in_temp']['distrito'];
                                                             }else{
                                                                echo '';
                                                             } ?>"
                                                enable></th>

                                                <th><input id="dist_desc" name="dist_desc" type="text" class="form-control" 
                                                placeholder="<?php echo lang('in_temp_dist_desc');?>" 
                                                value="<?php if (isset($_SESSION['arraywhere_in_temp']['dist_desc'])) 
                                                             {  
                                                                echo $_SESSION['arraywhere_in_temp']['dist_desc'];
                                                             }else{
                                                                echo '';
                                                             } ?>"
                                                enable></th>

                                                <th><input id="colonia" name="colonia" type="text" class="form-control" 
                                                placeholder="<?php echo lang('in_temp_colonia');?>" 
                                                value="<?php if (isset($_SESSION['arraywhere_in_temp']['colonia'])) 
                                                             {  
                                                                echo $_SESSION['arraywhere_in_temp']['colonia'];
                                                             }else{
                                                                echo '';
                                                             } ?>"
                                                enable></th>

                                                <th><input id="col_desc" name="col_desc" type="text" class="form-control" 
                                                placeholder="<?php echo lang('in_temp_col_desc');?>" 
                                                value="<?php if (isset($_SESSION['arraywhere_in_temp']['col_desc'])) 
                                                             {  
                                                                echo $_SESSION['arraywhere_in_temp']['col_desc'];
                                                             }else{
                                                                echo '';
                                                             } ?>"
                                                enable></th>

                                                <th><input id="mz_agr" name="mz_agr" type="text" class="form-control" 
                                                placeholder="<?php echo lang('in_temp_mz_agr');?>" 
                                                value="<?php if (isset($_SESSION['arraywhere_in_temp']['mz_agr'])) 
                                                             {  
                                                                echo $_SESSION['arraywhere_in_temp']['mz_agr'];
                                                             }else{
                                                                echo '';
                                                             } ?>"
                                                enable></th>

                                                <th><input id="lote_agr" name="lote_agr" type="text" class="form-control" 
                                                placeholder="<?php echo lang('in_temp_lote_agr');?>" 
                                                value="<?php if (isset($_SESSION['arraywhere_in_temp']['lote_agr'])) 
                                                             {  
                                                                echo $_SESSION['arraywhere_in_temp']['lote_agr'];
                                                             }else{
                                                                echo '';
                                                             } ?>"
                                                enable></th>

                                                <th><?php echo form_button(array('type' => 'submit', 'class' => 'glyphicon glyphicon-search btn btn-primary btn-flat', '' => '', 'id' => 'boton'));
                                                 ?></th>
                                                <th></th>
                                                <th></th>

                                            <?php echo form_close();?>
                                            </tr>
                                        </thead>
                                        <tbody>
<?php foreach ($in_temp as $values):?>
                                            <tr>
                                                <td><?php echo htmlspecialchars($values->dpto, ENT_QUOTES, 'UTF-8'); ?></td>

                                                <td><?php echo htmlspecialchars($values->dpto_desc, ENT_QUOTES, 'UTF-8'); ?></td>

												<td><?php echo htmlspecialchars($values->distrito, ENT_QUOTES, 'UTF-8'); ?></td>												
                                                <td><?php echo htmlspecialchars($values->dist_desc, ENT_QUOTES, 'UTF-8'); ?></td>

                                                <td><?php echo htmlspecialchars($values->colonia, ENT_QUOTES, 'UTF-8'); ?></td>												
                                                <td><?php echo htmlspecialchars($values->col_desc, ENT_QUOTES, 'UTF-8'); ?></td>

                                                <td><?php echo htmlspecialchars($values->mz_agr, ENT_QUOTES, 'UTF-8'); ?></td>												
                                                <td><?php echo htmlspecialchars($values->lote_agr, ENT_QUOTES, 'UTF-8'); ?></td>																			
                                                <td>
                                                   <?php echo anchor('man_espacial/in_temp/in_temp/edit/'.$values->gid, lang('actions_edit')); ?>
                                                </td>
                                                <td>
                                                   <?php 
                                                    echo anchor('man_espacial/in_temp/in_temp/verparcela/'.$values->objectid, lang('actions_see')); 
                                                    ?>
                                                </td>
                                                <td>
                                                    <?php 
                                                    //echo anchor('man_espacial/in_temp/in_temp/informe_deslinde/', 'DESLINDE', array('target' => '_top')); 
                                                    ?>
                                                    <!--<button type="button" class="modalButton" data-toggle="modal" data-src="http://192.168.1.254:8060/i3geo/ferramentas/imprimir/imprimir_A4_informe_deslinde.php?mapfile=C:/ms4w/Apache/htdocs/i3geo/aplicmap/imprimir_A4_plano_individual.map&interface=googlemaps&objectid=41141&dpto=10&distrito=06&colonia=12&mz_agr=I&lote_agr=2I&usr=1" data-width="800" data-height="800" data-target="#myModal">Google maps</button>-->

                                                    <a href="<?php echo $_SESSION['url_i3geo']?>i3geo/ferramentas/imprimir/imprimir_A4_plano_individual.php?mapfile=C:/ms4w/Apache/htdocs/i3geo/aplicmap/imprimir_A4_plano_individual.map&interface=googlemaps&objectid=<?php echo $values->objectid?>&dpto=<?php echo $values->dpto?>&distrito=<?php echo $values->distrito?>&colonia=<?php echo $values->colonia?>&mz_agr=<?php echo $values->mz_agr?>&lote_agr=<?php echo $values->lote_agr?>" target="_blank">
                                                        <i>Plano</i>
                                                    </a>
                                                </td>
                                                <td>
                                                    <?php 
                                                    //echo anchor('man_espacial/in_temp/in_temp/informe_deslinde/', 'DESLINDE2', array('target' => '_top')); 
                                                    ?>

                                                    <a href="<?php echo $_SESSION['url_i3geo']?>i3geo/ferramentas/imprimir/imprimir_A4_informe_deslinde.php?mapfile=C:/ms4w/Apache/htdocs/i3geo/aplicmap/imprimir_A4_plano_individual.map&interface=googlemaps&objectid=<?php echo $values->objectid?>&dpto=<?php echo $values->dpto?>&distrito=<?php echo $values->distrito?>&colonia=<?php echo $values->colonia?>&mz_agr=<?php echo $values->mz_agr?>&lote_agr=<?php echo $values->lote_agr?>&usr=<?php echo $_SESSION['user_id'] ?>" target="_blank">
                                                        <i>Deslinde</i>
                                                    </a>

                                                    
                                                </td>
                                                <TD>
                                                    <button type="button" class="modalButton" data-toggle="modal" data-src="<?php echo $_SESSION['url_i3geo']?>i3geo/ferramentas/imprimir/imprimir_A4_informe_deslinde.php?mapfile=C:/ms4w/Apache/htdocs/i3geo/aplicmap/imprimir_A4_plano_individual.map&interface=googlemaps&objectid=41141&dpto=10&distrito=06&colonia=12&mz_agr=I&lote_agr=2I&usr=1" data-width="800" data-height="800" data-target="#myModal">Google maps</button>
                                                </TD>
                                            </tr>
<?php endforeach;?>
                                        </tbody>
                                    </table>
                                    

                                        HTML utilizado para el modal
                                    <div class="modal fade" id="myModal">
                                        <div class="modal-dialog">
                                            <div class="modal-content">

                                                <div class="modal-body">
                                          
                                          <div class="close-button">
                                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                          </div>
                                          <div class="embed-responsive embed-responsive-16by9">
                                                                <iframe class="embed-responsive-item" frameborder="0"></iframe>
                                          </div>
                                                </div>

                                            </div>
                                        </div>
                                    </div> 
                                    <?php echo $pagination ?>
                                </div>
                            </div>
                         </div>
                    </div>
                </section>
            </div>
