Пример #1
0
function Marcas()
{
    ?>
    <div class="thumb-box7 grid_12">
        <div class="container">
            <h3>MARCAS</h3>
            <div class="row">
                <?php 
    $mar = new CL_MARCA();
    $marcas = $mar->ObtenerMarcas();
    for ($index = 0; $index < count($marcas); $index++) {
        ?>
                    <div class="col-lg-6 col-md-6 col-sm-6">
                        <div class="thumb-pad3">
                            <div class="thumbnail">
                                <figure><img src="<?php 
        $marc = explode('/', $marcas[$index]->strImagen);
        echo $marc[0] . '/' . $marc[1] . '/ma_' . $marc[2];
        ?>
" alt=""></figure>
                                <div class="sale-title">
                                    <a><?php 
        echo $marcas[$index]->strTitulo;
        ?>
</a>
                                    <p><?php 
        echo $marcas[$index]->strDescripcion;
        ?>
</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php 
    }
    ?>
            </div>
        </div>
    </div>
    <?php 
}
Пример #2
0
<?php

include '../CLASES/CL_MARCA.php';
$actividad = $_GET['act'];
switch ($actividad) {
    case 1:
        $marca = $_POST['marca'];
        $desc = $_POST['descripcion'];
        $Imagen = $_POST['Imagen'][0];
        $mar = new CL_MARCA();
        $mar->CrearMarca($marca, $desc, $Imagen);
        header("Location:../MarcasAdmin.php?act=2");
        break;
    case 2:
        $id = $_POST['id'];
        $mar = new CL_MARCA();
        $mar->EliminarMarca($id);
        header("Location:../MarcasAdmin.php?act=1");
        break;
    default:
        break;
}
Пример #3
0
function Eliminar()
{
    $mar = new CL_MARCA();
    $marcas = $mar->ObtenerMarcas();
    ?>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title">Tabla de Marcas</h3>
                    </div><!-- /.box-header -->
                    <div class="box-body">
                        <table id="example2" class="table table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th align="center">Marca</th>
                                    <th align="center">Nombre</th>
                                    <th align="center">Eliminar</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php 
    for ($index = 0; $index < count($marcas); $index++) {
        ?>
                                    <tr>
                                        <td valign="center" align="center">
                                            <img src="<?php 
        echo $marcas[$index]->strImagen;
        ?>
" alt="User Image" width="40" height="40"/> </td>
                                        <td align="center"><?php 
        echo $marcas[$index]->strTitulo;
        ?>
</td>
                                        <td align="center">
                                            <form action="./INCLUDES/Marcas.php?act=2" method="POST">

                                                <input type="hidden" name="id" value="<?php 
        echo $marcas[$index]->intId;
        ?>
 ">

                                                <input type="submit" value="eliminar" name="eliminar" class="btn btn-danger">
                                            </form>
                                        </td>
                                    </tr>
                                <?php 
    }
    ?>
                            </tbody>
                        </table>
                    </div><!-- /.box-body -->
                </div><!-- /.box -->
            </div><!-- /.col -->
        </div><!-- /.row -->
    </section><!-- /.content -->
    <?php 
}