예제 #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);
 }
예제 #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);
 }
예제 #3
0
파일: Home.class.php 프로젝트: QRMarket/PHP
 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);
 }
예제 #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);
 }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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());
     }
 }
예제 #9
0
 public function index()
 {
     // -- ** -- GET Twig & city list
     $twig = Config::getTwig();
     return $twig->render('admin/index.html', array());
 }
예제 #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));
 }
예제 #11
0
파일: 404.php 프로젝트: QRMarket/PHP
<?php

use model\validate\Validate;
use model\Config;
$twig = Config::getTwig();
echo $twig->render('client/404error.html', array());
예제 #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));
 }