Example #1
0
<?php

/**
 * @author tshirtecommerce - www.tshirtecommerce.com
 * @date: 2015-09-03
 * 
 * @copyright  Copyright (C) 2015 tshirtecommerce.com. All rights reserved.
 * @license	   GNU General Public License version 2 or later; see LICENSE
 *
 */
error_reporting(0);
define('ROOT', dirname(__FILE__));
define('DS', DIRECTORY_SEPARATOR);
include_once ROOT . DS . 'includes' . DS . 'functions.php';
$dg = new dg();
$lang = $dg->lang();
$settings = $dg->getSetting();
$base_url = $dg->url();
$params = explode('sharing.php/', $_SERVER['REQUEST_URI']);
if (count($params) > 1) {
    $design_id = $params[1];
    $url = $base_url . 'tshirtecommerce/sharing.php/' . $design_id;
} else {
    $design_id = '';
    $url = $base_url;
}
if ($design_id != '') {
    $cache = $dg->cache('design');
    $params = explode(':', $design_id);
    $user_id = $cache->get($params[0]);
    if ($user_id != false && count($user_id[$params[1]]) > 0) {
 public function modal($view, $data)
 {
     // call language
     $segments = $this->params;
     // call language
     $dg = new dg();
     $lang = $dg->lang();
     $site_url = $dg->url();
     $GLOBALS['lang'] = $lang;
     $GLOBALS['site_url'] = $site_url . '/tshirtecommerce/admin/';
     // call add-ons
     include ROOT . DS . 'includes' . DS . 'addons.php';
     $addons = new addons();
     if (file_exists(ROOT . DS . 'theme' . DS . $view . '.php')) {
         require_once ROOT . DS . 'theme' . DS . $view . '.php';
     } elseif (file_exists(ROOT . DS . 'views' . DS . $view . '.php')) {
         require_once ROOT . DS . 'views' . DS . $view . '.php';
     } else {
         echo 'View not found';
     }
 }