Guest User

Untitled

a guest
Jan 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. <?php
  2. function index(){
  3.     mvc_loadModel();
  4.     $products = model_product_getProducts();
  5.     $vars = array(
  6.         "products" => $products
  7.     );
  8.     mvc_showView('index',$vars);
  9. }
  10.  
  11. function detail(){
  12.     mvc_loadModel();
  13.     $product = model_product_getProduct();
  14.  
  15.     $vars = array();
  16.  
  17.     if($product){
  18.         $vars["product"] = $product;
  19.         mvc_showView('detail', $vars);
  20.     } else{
  21.         mvc_showView('invalid');
  22.     }
  23. }
  24. ?>
Add Comment
Please, Sign In to add comment