Esempio n. 1
0
 public function index()
 {
     $twig = Config::getTwig();
     $productId = Request::_request('productId');
     $productDetail = \model\ProductList::getProduct($productId);
     //die( $productDetail) ;
     /*if (isset($_GET['marketId'])){
                 $marketId = $_GET['marketId'];
     
                 // ##########################################
                 // ##########################################
                 // -- ** --
                 // Burada market sayfası için gerekli diğer sorgular yapılacaktır
                 // - section Listesi
                 // - genel ürün listesi (çok satılan vs)
                 // - (+) diğer istekler
                 // ##########################################
                 // ##########################################
     
                 $sectionList = \model\GuppyFunctions::prepareCategoryMenu();
             }*/
     $result = array('productDetail' => json_decode($productDetail)->content);
     //$result = array('products' => $productList);
     return $twig->render('client/product_detail2.html', $result);
 }
Esempio n. 2
0
 public static function index()
 {
     // -- ** -- GET Twig & city list
     $twig = Config::getTwig();
     $cityList = Address::getCityList();
     //die($_SERVER['REQUEST_URI']);
     // -- ** -- Check $cityList content is exist with isset method
     $result = array('cityList' => json_decode($cityList)->content);
     // -- ** -- Render result with twig
     return $twig->render('index.html', $result);
 }
Esempio n. 3
0
 public function index()
 {
     $twig = Config::getTwig();
     //-- Get Distrubuter  -- //
     $distrName = Request::_get('id');
     $categoryList = Category::getCategoryTree()->content;
     //-- Get Main Categories -- //
     $maincategoryList = $categoryList->childList;
     //-- Define Rendered Result -- //
     $result = array('categoryList' => $maincategoryList, 'distrName' => $distrName);
     //-- Render Result -- //
     return $twig->render('home.html', $result);
 }
Esempio n. 4
0
 public function asama_1()
 {
     //die(substr(dirname(__FILE__),0, strlen(dirname(__FILE__))-11));
     //die(mbstr(dirname(__FILE__)));
     // -- ** -- GET Twig & city list
     $twig = Config::getTwig();
     $cityList = Address::getCityList();
     //die($cityList);
     //die($_SERVER['REQUEST_URI']);
     // -- ** -- Check $cityList content is exist with isset method
     $result = array('cityList' => json_decode($cityList)->content);
     print_r($cityList);
     // -- ** -- Render result with twig
     return $twig->render('index.html', $result);
 }
Esempio n. 5
0
 public function index()
 {
     // -- ** -- GET Twig & city list
     $twig = Config::getTwig();
     $loginResult = ProductList::getAllProducts();
     //die($_SERVER['REQUEST_URI']);
     // -- ** -- Check $cityList content is exist with isset method
     $result = array('products' => $loginResult->content);
     // -- ** -- Render result with twig
     if ($loginResult->isSuccess()) {
         return $twig->render('admin/pages/tables/products.html', $result);
     } else {
         return $twig->render('admin/pages/tables/products.html', $result);
     }
 }
Esempio n. 6
0
 public function index()
 {
     // -- ** -- GET Twig & city list
     $twig = Config::getTwig();
     $loginResult = Order::getOrder(Request::_get("id"));
     //die($_SERVER['REQUEST_URI']);
     // -- ** -- Check $cityList content is exist with isset method
     $result = array('order' => $loginResult->content);
     // -- ** -- Render result with twig
     if ($loginResult->isSuccess()) {
         return $twig->render('admin/pages/examples/invoice.html', $result);
     } else {
         return $twig->render('admin/pages/examples/invoice.html', $result);
     }
 }
Esempio n. 7
0
 public function index()
 {
     // -- ** -- GET Twig & city list
     $twig = Config::getTwig();
     #$loginResult = ProductList::getAllProducts();
     //die($_SERVER['REQUEST_URI']);
     $brands = Brand::getBrands();
     $sections = Section::getSections();
     if (Request::_request_post('product_name')) {
         $array["do"] = "addProduct";
         if (Request::_request_post("product_brand")) {
             $array['brand_id'] = Request::_request_post("product_brand");
         }
         $array['name'] = Request::_request_post("product_name");
         if (Request::_request_post("product_code")) {
             $array['barcode'] = Request::_request_post("product_code");
         }
         if (Request::_request_post("product_desc")) {
             $array['desc'] = Request::_request_post("product_desc");
         }
         if (Request::_request_post("product_section")) {
             $array['section_id'] = Request::_request_post("product_section");
         }
         if ($_FILES["product_image"]) {
         } else {
             echo "lkşkşki";
         }
         $array["admin_id"] = "123459";
         $res = ProductDetail::addProduct($array);
         if ($res->isSuccess()) {
             $result = array('addProductSuccess' => true, 'brands' => json_decode($brands)->content, 'sections' => json_decode($sections)->content);
         } else {
             $result = array('addProductFailure' => true, 'brands' => json_decode($brands)->content, 'sections' => json_decode($sections)->content);
         }
         return $twig->render('admin/pages/forms/general2.html', $result);
     } else {
         $prod = ProductList::getProduct(Request::_get("id"));
         if ($prod->isSuccess()) {
             $result = array('brands' => json_decode($brands)->content, 'sections' => json_decode($sections)->content, 'product' => $prod->content);
         } else {
             $result = array('brands' => json_decode($brands)->content, 'sections' => json_decode($sections)->content);
         }
         return $twig->render('admin/pages/forms/product.html', $result);
     }
 }
Esempio n. 8
0
 public function index()
 {
     // -- ** -- GET Twig & city list
     $twig = Config::getTwig();
     if (isset($_POST["mail"]) && isset($_POST["pass"])) {
         $loginResult = User::login($_POST["mail"], $_POST["pass"]);
         //die($_SERVER['REQUEST_URI']);
         // -- ** -- Check $cityList content is exist with isset method
         $result = array('user' => $loginResult->content);
         // -- ** -- Render result with twig
         if ($loginResult->isSuccess()) {
             header("Location: index.php");
         } else {
             return $twig->render('admin/pages/examples/login.html', $result);
         }
     } else {
         return $twig->render('admin/pages/examples/login.html', array());
     }
 }
Esempio n. 9
0
 public function index()
 {
     // -- ** -- GET Twig & city list
     $twig = Config::getTwig();
     return $twig->render('admin/index.html', array());
 }
Esempio n. 10
0
 public function index()
 {
     $distributerList = DistributerModal::getDistibuterList(Request::_get('dist'));
     return Config::getTwig()->render('client/dummy_place_select.html', array('distributerList' => json_decode($distributerList)->content));
 }
Esempio n. 11
0
File: 404.php Progetto: QRMarket/PHP
<?php

use model\validate\Validate;
use model\Config;
$twig = Config::getTwig();
echo $twig->render('client/404error.html', array());
Esempio n. 12
0
 public function index()
 {
     $twig = Config::getTwig();
     $addressList = RegionModal::searchAddress('Ankara');
     return $twig->render('client/region_select.html', array('addressList' => json_decode($addressList)->content));
 }