예제 #1
0
파일: Tiendas.php 프로젝트: keua/DeGuate
function Tiendas()
{
    ?>
    <!-- content-section-starts -->
    <?php 
    $tie = new CL_TIENDA();
    $tiendas = $tie->ObtenerTiendas();
    for ($index = 0; $index < count($tiendas); $index++) {
        ?>
        <div class="special-section">
            <div class="col-md-4 special-section-left">
                <img src="<?php 
        $marc = explode('/', $tiendas[$index]->strImagen);
        echo $marc[0] . '/' . $marc[1] . '/tn_' . $marc[2];
        ?>
" alt="" />
            </div>
            <div class="col-md-8 special-section-right">
                <h3><?php 
        echo $tiendas[$index]->strNombre;
        ?>
</h3>
                <div class="special-section-right-grids">
                    <div class="special-section-right-grid1">
                        <p>DIRECCION</p>
                        <p class="special"><?php 
        echo $tiendas[$index]->strDireccion;
        ?>
</p>
                        <p>TELEFONO</p>
                        <p class="special"><?php 
        echo $tiendas[$index]->intTelefono;
        ?>
</p>
                        <a href="<?php 
        echo $tiendas[$index]->strEnlace;
        ?>
"><?php 
        echo $tiendas[$index]->strEnlace;
        ?>
</a>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    <?php 
    }
    ?>

    <?php 
}
예제 #2
0
파일: Tiendas.php 프로젝트: keua/DeGuate
<?php

include '../CLASES/CL_TIENDA.php';
$actividad = $_GET['act'];
switch ($actividad) {
    case 1:
        $nombre = $_POST['nombre'];
        $direccion = $_POST['direccion'];
        $telefono = $_POST['telefono'];
        $enlace = $_POST['enlace'];
        $imagen = $_POST['Imagen'][0];
        $tie = new CL_TIENDA();
        $tie->CrearTienda($nombre, $direccion, $telefono, $enlace, $imagen);
        header("Location:../TiendasAdmin.php?act=2");
        break;
    case 2:
        $id = $_POST['id'];
        $tie = new CL_TIENDA();
        $tie->EliminarTienda($id);
        header("Location:../TiendasAdmin.php?act=1");
        break;
    default:
        break;
}
예제 #3
0
function Eliminar()
{
    $tie = new CL_TIENDA();
    $tiendas = $tie->ObtenerTiendas();
    ?>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title">Eliminar Tienda</h3>
                    </div><!-- /.box-header -->
                    <div class="box-body">
                        <table id="example2" class="table table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th align="center">Tienda</th>
                                    <th align="center">Nombre</th>
                                    <th align="center">Direccion</th>
                                    <th align="center">Eliminar</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php 
    for ($index = 0; $index < count($tiendas); $index++) {
        ?>
                                    <tr>
                                        <td valign="center" align="center">
                                            <img src="<?php 
        echo $tiendas[$index]->strImagen;
        ?>
" alt="User Image" width="40" height="40"/> </td>
                                        <td align="center"><?php 
        echo $tiendas[$index]->strNombre;
        ?>
</td>
                                        <td align="center"><?php 
        echo $tiendas[$index]->strDireccion;
        ?>
</td>
                                        <td align="center">
                                            <form action="./INCLUDES/Tiendas.php?act=2" method="POST">

                                                <input type="hidden" name="id" value="<?php 
        echo $tiendas[$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 
}