<commit_before><?php
  include('constructor.php');
  include('../cn/bdconexion.php');
  session_start();
  if (isset($_SESSION['username'])&&($_SESSION['rank'])) {      
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- CSS-->
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <!-- Font-icon css-->
    <link rel="stylesheet" type="text/css" href="css/font-awesome-4.7.0/css/font-awesome.min.css">
    <title>Admin Panel</title>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries-->
    <!--if lt IE 9
    script(src='https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js')
    script(src='https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js')
    -->
  </head>
  <body class="sidebar-mini fixed">
    <div class="wrapper">
      <!-- Navbar-->
      <header class="main-header hidden-print"><a class="logo" href="index.php">Admin Panel</a>
        <nav class="navbar navbar-static-top">
          <!-- Sidebar toggle button--><a class="sidebar-toggle" href="#" data-toggle="offcanvas"></a>
          <!-- Navbar Right Menu-->
          <div class="navbar-custom-menu">
            <ul class="top-nav">
              <!--Notification Menu-->
              <!--<li class="dropdown notification-menu"><a class="dropdown-toggle" href="#" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-bell-o fa-lg"></i></a>
                <ul class="dropdown-menu">
                  <li class="not-head">You have 4 new notifications.</li>
                  <li><a class="media" href="javascript:;"><span class="media-left media-icon"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x text-primary"></i><i class="fa fa-envelope fa-stack-1x fa-inverse"></i></span></span>
                      <div class="media-body"><span class="block">Lisa sent you a mail</span><span class="text-muted block">2min ago</span></div></a></li>
                  <li><a class="media" href="javascript:;"><span class="media-left media-icon"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x text-danger"></i><i class="fa fa-hdd-o fa-stack-1x fa-inverse"></i></span></span>
                      <div class="media-body"><span class="block">Server Not Working</span><span class="text-muted block">2min ago</span></div></a></li>
                  <li><a class="media" href="javascript:;"><span class="media-left media-icon"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x text-success"></i><i class="fa fa-money fa-stack-1x fa-inverse"></i></span></span>
                      <div class="media-body"><span class="block">Transaction xyz complete</span><span class="text-muted block">2min ago</span></div></a></li>
                  <li class="not-footer"><a href="#">See all notifications.</a></li>
                </ul>
              </li>-->
              <!-- User Menu-->
              <li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user-circle fa-lg"></i></a>
                <ul class="dropdown-menu settings-menu">
                  <!--<li><a href="page-user.php"><i class="fa fa-cog fa-lg"></i> Settings</a></li>-->
                  <li><a href="page-user.php"><i class="fa fa-user fa-lg"></i> Perfil</a></li>
                  <li><a href="#" class="alert" style="margin:0px;"><i class="fa fa-sign-out fa-lg"></i> Cerrar Sesi&oacute;n</a></li>
                </ul>
              </li>
            </ul>
          </div>
        </nav>
      </header>
      <!-- Side-Nav-->
      <?php
        menu();
      ?>
      <div class="content-wrapper">
        <div class="page-title">
          <div>
            <h1><i class="fa fa-minus-square"></i> Eliminar Planilla Existente</h1>
            <p>Eliminar una planilla de pago existente</p>
          </div>
          <div>
            <ul class="breadcrumb">
              <li><i class="fa fa-gears fa-lg"></i></li>
              <li>Planillas Predefinidas</li>
              <li><a href="#">Eliminar Existente</a></li>
            </ul>
          </div>
        </div>
        <div class="row">
          <div class="col-md-12">
            <div class="card">
              <div class="card-title">
                <h3 class="card-title" align="center">Buscar Planilla</h3>
              </div>
              <div class="card-body">
                <form class="form-horizontal">
                  <div class="form-group">
                    <label class="control-label col-md-3">Codigo de planilla</label>
                    <div class="col-md-8">
                      <input class="form-control" type="text" name="codigo_planilla" id="codigo_planilla" placeholder="Ingresar codigo de planilla" required>
                    </div>
                  </div>
                </form>
              </div>
              <div class="card-footer" align="center">
                <button class="btn btn-primary icon-btn" type="button" id="buscar" name="buscar"><i class="fa fa-fw fa-lg fa-check-circle"></i>Buscar</button>
                &nbsp;&nbsp;&nbsp;
                <button class="btn btn-default icon-btn" type="button"><i class="fa fa-fw fa-lg fa-times-circle"></i>Limpiar</button>
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-md-12">
            <!-- Contenido de la pagina -->
            <div class="card">
              <div class="card-title">
                <h3 class="card-title" align="center">Eliminar Planilla</h3>
              </div>
              <div class="card-body">
                <form class="form-horizontal">
                  <div class="form-group">
                    <label class="control-label col-md-3">Descripci&oacute;n</label>
                    <div class="col-md-8">
                      <input class="form-control" type="text" name="descripcion_planilla" id="descripcion_planilla" placeholder="Descripcion" disabled="disabled" required>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3">Tipo</label>
                    <div class="col-md-8">
                      <input class="form-control" type="text" name="tipo_planilla" id="tipo_planilla" placeholder="Tipo" disabled="disabled" required>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3">Sueldo Base</label>
                    <div class="col-md-8">
                      <div class="input-group">
                        <span class="input-group-addon" >L</span>
                        <input class="form-control" type="number" min="0" name="sueldo_base" id="sueldo_base" placeholder="Sueldo Base" disabled="disabled" required>
                      </div>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3">Deduci&oacute;n por IHSS</label>
                    <div class="col-md-8">
                      <div class="input-group">
                        <span class="input-group-addon" >%</span>
                        <input class="form-control" type="number" min="0" name="deduc_IHSS" id="deduc_IHSS" placeholder="Porcentaje de la Deduccion" disabled="disabled" required>
                        <span class="input-group-addon" id="valor_deduc_IHSS">Valor deducido (L)</span>
                      </div>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3">Deducciones Especiales</label>
                    <div class="col-md-8">
                      <div class="input-group">
                        <span class="input-group-addon" >%</span>
                        <input class="form-control" type="number" min="0" name="deduc_Esp" id="deduc_Esp" placeholder="Porcentaje de la Deduccion" disabled="disabled" required>
                        <span class="input-group-addon" id="valor_deduc_esp">Valor deducido (L)</span>
                      </div>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3">Sueldo Neto</label>
                    <div class="col-md-8">
                      <div class="input-group">
                        <span class="input-group-addon" >L</span>
                        <input class="form-control" type="number" min="0" name="sueldo_neto" id="sueldo_neto" placeholder="Sueldo Neto" disabled="disabled" required>
                      </div>
                    </div>
                  </div>

                 </form>
              </div>

              <div class="card-footer" align="center">
                <button class="btn btn-primary icon-btn" type="button" id="buscar" name="buscar"><i class="fa fa-fw fa-lg fa-check-circle"></i>Eliminar</button>
                &nbsp;&nbsp;&nbsp;
                <button class="btn btn-default icon-btn" type="button"><i class="fa fa-fw fa-lg fa-times-circle"></i>Limpiar</button>
              </div>
            </div>
            <!-- Fin del contenido de la pagina -->
          </div>
        </div>
      </div>
    </div>
    <!-- Javascripts-->
    <script src="js/jquery-2.1.4.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/pace.min.js"></script>
    <script src="js/main.js"></script>
    <script type="text/javascript" src="js/plugins/sweetalert.min.js"></script><commit_msg>Agregar funcionalidad para reconocer el codigo y realizar la busqueda y mostrar los datos, Limpiar formularios<commit_after><?php
  include('constructor.php');
  include('../cn/bdconexion.php');
  session_start();
  if (isset($_SESSION['username'])&&($_SESSION['rank'])) {      
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- CSS-->
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <!-- Font-icon css-->
    <link rel="stylesheet" type="text/css" href="css/font-awesome-4.7.0/css/font-awesome.min.css">
    <title>Admin Panel</title>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries-->
    <!--if lt IE 9
    script(src='https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js')
    script(src='https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js')
    -->
  </head>
  <body class="sidebar-mini fixed">
    <div class="wrapper">
      <!-- Navbar-->
      <header class="main-header hidden-print"><a class="logo" href="index.php">Admin Panel</a>
        <nav class="navbar navbar-static-top">
          <!-- Sidebar toggle button--><a class="sidebar-toggle" href="#" data-toggle="offcanvas"></a>
          <!-- Navbar Right Menu-->
          <div class="navbar-custom-menu">
            <ul class="top-nav">
              <!--Notification Menu-->
              <!--<li class="dropdown notification-menu"><a class="dropdown-toggle" href="#" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-bell-o fa-lg"></i></a>
                <ul class="dropdown-menu">
                  <li class="not-head">You have 4 new notifications.</li>
                  <li><a class="media" href="javascript:;"><span class="media-left media-icon"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x text-primary"></i><i class="fa fa-envelope fa-stack-1x fa-inverse"></i></span></span>
                      <div class="media-body"><span class="block">Lisa sent you a mail</span><span class="text-muted block">2min ago</span></div></a></li>
                  <li><a class="media" href="javascript:;"><span class="media-left media-icon"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x text-danger"></i><i class="fa fa-hdd-o fa-stack-1x fa-inverse"></i></span></span>
                      <div class="media-body"><span class="block">Server Not Working</span><span class="text-muted block">2min ago</span></div></a></li>
                  <li><a class="media" href="javascript:;"><span class="media-left media-icon"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x text-success"></i><i class="fa fa-money fa-stack-1x fa-inverse"></i></span></span>
                      <div class="media-body"><span class="block">Transaction xyz complete</span><span class="text-muted block">2min ago</span></div></a></li>
                  <li class="not-footer"><a href="#">See all notifications.</a></li>
                </ul>
              </li>-->
              <!-- User Menu-->
              <li class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user-circle fa-lg"></i></a>
                <ul class="dropdown-menu settings-menu">
                  <!--<li><a href="page-user.php"><i class="fa fa-cog fa-lg"></i> Settings</a></li>-->
                  <li><a href="page-user.php"><i class="fa fa-user fa-lg"></i> Perfil</a></li>
                  <li><a href="#" class="alert" style="margin:0px;"><i class="fa fa-sign-out fa-lg"></i> Cerrar Sesi&oacute;n</a></li>
                </ul>
              </li>
            </ul>
          </div>
        </nav>
      </header>
      <!-- Side-Nav-->
      <?php
        menu();
      ?>
      <div class="content-wrapper">
        <div class="page-title">
          <div>
            <h1><i class="fa fa-minus-square"></i> Eliminar Planilla Existente</h1>
            <p>Eliminar una planilla de pago existente</p>
          </div>
          <div>
            <ul class="breadcrumb">
              <li><i class="fa fa-gears fa-lg"></i></li>
              <li>Planillas Predefinidas</li>
              <li><a href="#">Eliminar Existente</a></li>
            </ul>
          </div>
        </div>
        <?php 
          $codigo_planilla=$_GET['codigo_planilla'];
          if ($codigo_planilla==null) {
            $codigo = '';
            $desc = '';
            $tipo = '';
            $sueldoBase = '';
            $deducIHSS = '';
            $deducEsp = '';
            $sueldoNeto = '';
          } 
          if ($codigo_planilla!=null) {
            $queryObjeto = mysqli_query($db, "SELECT * FROM planillas WHERE Cod_Planilla = '".$codigo_planilla."'") or die(mysqli_error());
            if ($rowObjeto=mysqli_fetch_array($queryObjeto)) {
              $codigo = $rowObjeto['Cod_Planilla'];
              $desc = $rowObjeto['Descripcion'];
                $queryListaCargos=mysqli_query($db, "SELECT * FROM cargos WHERE Cod_Cargo = '".$rowObjeto['Tipo']."'") or die(mysqli_error());
                $rowCargo=mysqli_fetch_array($queryListaCargos);
                $tipo = $rowCargo['Nom_Cargo'];
              $sueldoBase = $rowObjeto['Sueldo_Base'];
              $deducIHSS = $rowObjeto['Ded_IHSS'];
              $deducEsp = $rowObjeto['Ded_Especiales'];
              $sueldoNeto = $rowObjeto['Salario_Neto'];
            } else {
              $codigo = '';
              $desc = '';
              $tipo = '';
              $sueldoBase = '';
              $deducIHSS = '';
              $deducEsp = '';
              $sueldoNeto = '';
            }
          }            
        ?>
        <div class="row">
          <div class="col-md-12">
            <div class="card">
              <div class="card-title">
                <h3 class="card-title" align="center">Buscar Planilla</h3>
              </div>
              <div class="card-body">
                <form class="form-horizontal" method="GET" action="planillas_eliminar.php" id="formBuscar">
                  <div class="form-group">
                    <label class="control-label col-md-3">Codigo de planilla</label>
                    <div class="col-md-8">
                      <input class="form-control" type="text" name="codigo_planilla" id="codigo_planilla" placeholder="Ingresar codigo de planilla" value="<?php echo $codigo; ?>" required>
                    </div>
                  </div>
                </form>
              </div>
              <div class="card-footer" align="center">
                <button class="btn btn-primary icon-btn" type="submit" form="formBuscar" id="buscar" name="buscar"><i class="fa fa-fw fa-lg fa-check-circle"></i>Buscar</button>
                &nbsp;&nbsp;&nbsp;
                <button class="btn btn-default icon-btn" type="button" onclick="limpiarBusqueda()"><i class="fa fa-fw fa-lg fa-times-circle"></i>Limpiar</button>
              </div>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-md-12">
            <!-- Contenido de la pagina -->
            <div class="card">
              <div class="card-title">
                <h3 class="card-title" align="center">Eliminar Planilla</h3>
              </div>
              <div class="card-body">
                <form class="form-horizontal">
                  <div class="form-group">
                    <label class="control-label col-md-3">Descripci&oacute;n</label>
                    <div class="col-md-8">
                      <input class="form-control" type="text" name="descripcion_planilla" id="descripcion_planilla" placeholder="Descripcion" value="<?php echo $desc;?>" disabled="disabled" required>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3">Tipo</label>
                    <div class="col-md-8">
                      <input class="form-control" type="text" name="tipo_planilla" id="tipo_planilla" placeholder="Tipo" disabled="disabled" value="<?php echo $tipo;?>" required>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3">Sueldo Base</label>
                    <div class="col-md-8">
                      <div class="input-group">
                        <span class="input-group-addon" >L</span>
                        <input class="form-control" type="number" min="0" name="sueldo_base" id="sueldo_base" placeholder="Sueldo Base" disabled="disabled" value="<?php echo $sueldoBase;?>" required>
                      </div>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3">Deduci&oacute;n por IHSS</label>
                    <div class="col-md-8">
                      <div class="input-group">
                        <span class="input-group-addon" >%</span>
                        <input class="form-control" type="number" min="0" name="deduc_IHSS" onchange="calculo()" id="deduc_IHSS" placeholder="Porcentaje de la Deduccion" disabled="disabled" value="<?php echo $deducIHSS;?>" required>
                        <span class="input-group-addon" id="valor_deduc_IHSS">Valor deducido (L)</span>
                      </div>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3">Deducciones Especiales</label>
                    <div class="col-md-8">
                      <div class="input-group">
                        <span class="input-group-addon" >%</span>
                        <input class="form-control" type="number" min="0" name="deduc_Esp" id="deduc_Esp" onchange="calculo()" placeholder="Porcentaje de la Deduccion" disabled="disabled" value="<?php echo $deducEsp;?>" required>
                        <span class="input-group-addon" id="valor_deduc_esp">Valor deducido (L)</span>
                      </div>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3">Sueldo Neto</label>
                    <div class="col-md-8">
                      <div class="input-group">
                        <span class="input-group-addon" >L</span>
                        <input class="form-control" type="number" min="0" name="sueldo_neto" id="sueldo_neto" onchange="calculo()" placeholder="Sueldo Neto" disabled="disabled" value="<?php echo $sueldoNeto;?>" required>
                      </div>
                    </div>
                  </div>
                 </form>
              </div>

              <div class="card-footer" align="center">
                <button class="btn btn-primary icon-btn" type="button" id="buscar" name="buscar"><i class="fa fa-fw fa-lg fa-check-circle"></i>Eliminar</button>
                &nbsp;&nbsp;&nbsp;
                <button class="btn btn-default icon-btn" type="button" onclick="limpiarForm()"><i class="fa fa-fw fa-lg fa-times-circle"></i>Limpiar</button>
              </div>
            </div>
            <!-- Fin del contenido de la pagina -->
          </div>
        </div>
      </div>
    </div>
    <!-- Javascripts-->
    <script src="js/jquery-2.1.4.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/pace.min.js"></script>
    <script src="js/main.js"></script>
    <script src="js/tips/calculos_planilla.js"></script>
    <script type="text/javascript" src="js/plugins/sweetalert.min.js"></script>
{'fraction_non_alphanumeric': 0.17785575768769046, 'fraction_numerical': 0.005540677809585373, 'mean_word_length': 1.8936539746158985, 'pattern_counts': {'":': 0, '<': 595, '<?xml version=': 0, '>': 595, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5544196', 'n_tokens_mistral': 6646, 'n_tokens_neox': 6401, 'n_words': 1203}