/**
  * Action для страницы "Управление товарами"
  */
 public function actionIndex()
 {
     // Проверка доступа
     self::checkAdmin();
     // Получаем список товаров
     $productsList = Product::getProductsList();
     // Подключаем вид
     require_once ROOT . '/views/admin_product/index.php';
     return true;
 }
 public function actionIndex($page = 1)
 {
     $page = (int) $page;
     $count = 10;
     $products = Product::getProductsList($count, $page, false);
     if (!$products) {
         $products = array();
     }
     $total = Product::getTotalProducts(false);
     $pagination = FunctionLibrary::buildPagination($total, $count, $page, 'page-');
     require_once ROOT . '/views/admin-product/index.php';
     return true;
 }
Example #3
0
 public function actionIndex()
 {
     $categories = Category::getCategoryList();
     if (!$categories) {
         $categories = array();
     }
     $products = Product::getProductsList(6, 0);
     if (!$products) {
         $products = array();
     }
     $recomendedProducts = Product::getRecomemdedProducts();
     require_once ROOT . '/views/site/index.php';
     return true;
 }
Example #4
0
 public function actionIndex($page = 1)
 {
     $categories = Category::getCategoryList();
     if (!$categories) {
         $categories = array();
     }
     $products = Product::getProductsList(9, $page);
     if (!$products) {
         $products = array();
     }
     $total = Product::getTotalProducts();
     $pagination = FunctionLibrary::buildPagination($page, $total, Product::SHOW_BY_DEFAULT, 'page-');
     require_once ROOT . '/views/catalog/index.php';
     return true;
 }
 public function actionIndex($page = 1)
 {
     $page = (int) $page;
     $count = 9;
     $categories = Category::getCategoriesList();
     if (!$categories) {
         $categories = array();
     }
     $products = Product::getProductsList($count, $page);
     if (!$products) {
         $products = array();
     }
     $total = Product::getTotalProducts();
     $pagination = FunctionLibrary::buildPagination($total, $count, $page, 'page-');
     require_once ROOT . '/views/catalog/index.php';
     return true;
 }
Example #6
0
<?php

require_once "includes/init.inc.php";
$products = Product::getProductsList();
?>

<!DOCTYPE html>
<html>
	<head>
		<meta charset='utf-8'>
		<link rel="stylesheet" href="style.css" />
		<link rel="shortcut icon" type="image/png" href="images/icon.png"/>
		<link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'>
		<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
		<title>Lojinha Gerencianet</title>
		<?php 
echo "<style>";
if ($products != null) {
    foreach ($products as $p) {
        echo ".prod-" . $p->id . "{";
        $tam = count($p->color);
        echo "background-color: " . $p->color[0] . ";";
        if ($tam > 1) {
            $gradient = 'background: linear-gradient(315deg';
            $space = 0;
            echo "background: -webkit-linear-gradient(315deg";
            for ($i = 0; $i < $tam; $i++) {
                echo ", " . $p->color[$i];
                $gradient .= ", " . $p->color[$i];
                if ($i < $tam) {
                    if ($tam == 3 && $i < $tam - 1) {
 /**
  * Action для страницы "Управление товарами"
  */
 public function actionIndex()
 {
     $productsList = Product::getProductsList();
     require_once ROOT . '/views/admin_product/index.php';
     return true;
 }
 /**
  * @return bool
  * Метод для получения списка всех товаров
  */
 public function actionIndex()
 {
     $productsList = Product::getProductsList();
     $args = array('productsList' => $productsList);
     return self::render('index', $args);
 }