<?php
include '../../conexion/session.php';
include '../../conexion/conn.php';
$folio_planilla = $_REQUEST['folio_planilla'];
$folio_pallet = $_REQUEST['folio_pallet'];

$rs = mysql_query("SELECT * FROM contenedor_estiba WHERE folio_planilla='$folio_planilla' AND folio_pallet='$folio_pallet'");

if ($row = mysql_fetch_array($rs)) {
    $sentido_pallet = $row['sentido_pallet'];
}

if ($sentido_pallet == "P") {
?>
    <div class="o-switch btn-group" data-toggle="buttons" role="group">
        <label class="btn btn-secondary active">
            <input type="radio" name="check_sentido" id="check_sentidop" value="P" autocomplete="off" checked> P
        </label>
        <label class="btn btn-secondary">
            <input type="radio" name="check_sentido" id="check_sentidoe" value="E" autocomplete="off"> E
        </label>
    </div>
<?php
} else if ($sentido_pallet == "E") {
    ?>
    <div class="o-switch btn-group" data-toggle="buttons" role="group">
        <label class="btn btn-secondary">
            <input type="radio" name="check_sentido" id="check_sentidop" value="P" autocomplete="off"> P
        </label>
        <label class="btn btn-secondary active">
            <input type="radio" name="check_sentido" id="check_sentidoe" value="E" autocomplete="off" checked> E
        </label>
    </div>
<?php
}
?>