Example #1
0
    			<td  class="{sorter: 'idoDate'}"><?php 
    echo $row['fecha'];
    ?>
</td>
    			<td title="<?php 
    echo $row['nombre'];
    ?>
" class="may" ><?php 
    echo recortar_texto($row['nombre'], 35, " ", " [+]");
    ?>
</td>
    			<td title="<?php 
    echo $row['titulo'];
    ?>
" class="may" ><?php 
    echo recortar_texto($row['titulo'], 35, " ", " [+]");
    ?>
</td>
    			<td style="text-align: right; padding-right: 10px;">
            		<?php 
    $sqlc = "SELECT precio, cantidad\n\t\t\t\t\tFROM kng_conceptos\n\t\t\t\t\tWHERE proforma = '" . $row['faid'] . "'\n\t\t\t\t\t";
    $resc = mysql_query($sqlc);
    $tutti = 0;
    while ($rowc = mysql_fetch_array($resc)) {
        $tutti += $rowc['precio'] * $rowc['cantidad'];
    }
    echo number_format($tutti, 2, ',', '.') . ' €';
    ?>
            	</td>
            	<td><?php 
    echo ivafecha($row['fecha']) . '%';
Example #2
0
function productList($category = '')
{
    require_once '../../Model/ProductClass.php';
    global $viewLogin;
    if (!$viewLogin) {
        header('Location: ../Front/controller.php?f=index');
    }
    global $navegadorAdmin;
    global $connection;
    $navegador = $navegadorAdmin;
    $titulo = 'Titulo';
    $description = 'description';
    $palabrasClaves = 'palabrasClaves';
    $send = '';
    if (isset($_GET['s'])) {
        $send = $_GET['s'];
    }
    if ($category == '') {
        $sql = 'SELECT * FROM `product` WHERE name LIKE \'%' . $send . '%\'';
        //    }elseif($_GET['s'] == ''){
    } else {
        $sql = 'SELECT * FROM `product` WHERE `idCategory` = \'' . $category . '\' AND name LIKE \'%' . $send . '%\'';
    }
    $requete = $connection->commitSelect($sql);
    foreach ($requete as $key => $value) {
        $product = new ProductClass($connection);
        $product->fetch($value['idRow']);
        if (!isset($product->imgs[0]['name'])) {
            $img = 'not-found.png';
        } else {
            $img = $product->imgs[0]['name'];
        }
        $listProducts[] = array('name' => $product->name, 'description' => recortar_texto($product->description), 'longDescription' => recortar_texto($product->longDescription), 'price' => $product->price, 'category' => $product->category, 'img' => $img, 'id' => $product->id);
    }
    // cargarlo de categorias
    $options = array(array('value' => '1', 'string' => 'Book'), array('value' => '2', 'string' => 'Music'));
    require_once '../../View/Back/productList.php';
}