<?php $product = SlideData::getById($_GET["slide_id"]); $url = "storage/slides/{$product->image}"; ?> <!-- Main Content --> <div class="row"> <div class="col-md-12"> <!-- Button trigger modal --> <h2><?php echo $product->title; ?> <small>Editar</small></h2> <?php // print_r($_SESSION); if (isset($_SESSION["product_updated"])) { ?> <p class="alert alert-info"><i class="fa fa-check"></i> Slide Actualizado Exitosamente</p> <?php unset($_SESSION["product_updated"]); } ?> </div> </div> <div class="row"> <div class="col-md-12"> <div class="widget"> <div class="widget-title"> <i class="fa fa-pencil"></i> Editar Slide </div>
<?php // print_r($_POST); $product = new SlideData(); foreach ($_POST as $k => $v) { $product->{$k} = $v; # code... } ////////////////////////////////////// / / / / / / / / / / / / / / / / / / / / / / / / / $handle = new Upload($_FILES['image']); if ($handle->uploaded) { $url = "storage/slides/"; $handle->Process($url); $product->image = $handle->file_dst_name; $product->update_image(); } ////////////////////////////////////// / / / / / / / / / / / / / / / / / / / / / / / / / if (isset($_POST["is_public"])) { $product->is_public = 1; } else { $product->is_public = 0; } // $product->name = $_POST["name"]; $product->update(); $_SESSION["product_updated"] = 1; Core::redir("index.php?view=editslide&slide_id=" . $_POST["id"]);
<?php $coin_symbol = ConfigurationData::getByPreffix("general_coin")->val; $img_default = ConfigurationData::getByPreffix("general_img_default")->val; $cnt = 0; $slides = SlideData::getPublics(); $featureds = ProductData::getFeatureds(); ?> <section> <div class="container"> <div class="row"> <div class="col-md-12"> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <?php if (count($slides) > 0) { ?> <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Indicators --> <ol class="carousel-indicators"> <?php foreach ($slides as $s) { ?> <li data-target="#carousel-example-generic" data-slide-to="<?php echo $cnt; ?> " class="<?php if ($cnt == 0) { echo "active";
<?php // print_r($_POST); $product = new SlideData(); foreach ($_POST as $k => $v) { $product->{$k} = $v; # code... } $handle = new Upload($_FILES['image']); if ($handle->uploaded) { $url = "storage/slides/"; $handle->Process($url); $product->image = $handle->file_dst_name; } if (isset($_POST["is_public"])) { $product->is_public = 1; } else { $product->is_public = 0; } // $product->name = $_POST["name"]; $product->add(); Core::redir("index.php?view=slider");
<?php $s = SlideData::getById($_GET["slide_id"]); $s->del(); Core::redir("index.php?view=slider");
<h2>SLIDER</h2> </div> </div> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <i class="fa fa-th-list"></i> Slides </div> <div class="widget-body medium no-padding"> <div class="table-responsive"> <?php $categories = SlideData::getAll(); if (count($categories) > 0) { ?> <table class="table table-bordered"> <tbody> <thead> <th>Nombre</th> <th>Visible</th> <th></th> </thead> <?php foreach ($categories as $cat) { ?> <tr> <td><?php echo $cat->title;