예제 #1
0
<?php

if (!defined('NGCMS')) {
    exit('HAL');
}
include_once dirname(__FILE__) . '/cache.php';
loadPluginLibrary('uprofile', 'lib');
LoadPluginLibrary('gsmg', 'common');
LoadPluginLang('eshop', 'main', '', '', '#');
add_act('core', 'eshop_infovars_show');
add_act('index', 'plugin_eshop_compare');
add_act('index', 'plugin_ebasket_total');
add_act('index', 'plugin_ebasket_notify');
register_htmlvar('js', admin_url . '/plugins/eshop/tpl/js/breeze.min.js');
register_htmlvar('js', admin_url . '/plugins/eshop/tpl/js/eshop.js');
function eshop_infovars_show()
{
    global $CurrentHandler, $SYSTEM_FLAGS, $template, $lang, $mysql, $twig, $userROW, $ngCookieDomain;
    $SYSTEM_FLAGS["eshop"]["description_delivery"] = pluginGetVariable('eshop', 'description_delivery');
    $SYSTEM_FLAGS["eshop"]["description_order"] = pluginGetVariable('eshop', 'description_order');
    $SYSTEM_FLAGS["eshop"]["description_phones"] = pluginGetVariable('eshop', 'description_phones');
    $eshop_dir = get_plugcfg_dir('eshop');
    generate_currency_cache();
    if (file_exists($eshop_dir . '/cache_currency.php')) {
        $currency_tEntry = unserialize(file_get_contents($eshop_dir . '/cache_currency.php'));
    } else {
        $currency_tEntry = array();
    }
    /*
        $currency_link = checkLinkAvailable('eshop', 'currency')?
                generateLink('eshop', 'currency', array()):
예제 #2
0
파일: eshop.php 프로젝트: stdex/ngcms_eshop
<?php

if (!defined('NGCMS')) {
    exit('HAL');
}
LoadPluginLang('eshop', 'main', '', '', '#');
add_act('index', 'eshop_header_show');
register_plugin_page('eshop', '', 'eshop');
register_plugin_page('eshop', 'show', 'show_eshop');
register_plugin_page('eshop', 'search', 'search_eshop');
register_plugin_page('eshop', 'stocks', 'stocks_eshop');
register_plugin_page('eshop', 'compare', 'compare_eshop');
register_plugin_page('eshop', 'currency', 'currency_eshop');
register_plugin_page('eshop', 'yml_export', 'yml_export_eshop');
register_plugin_page('eshop', 'ebasket_list', 'plugin_ebasket_list');
register_plugin_page('eshop', 'ebasket_update', 'plugin_ebasket_update');
register_plugin_page('eshop', 'order', 'order_eshop');
register_plugin_page('eshop', 'payment', 'payment_eshop');
include_once dirname(__FILE__) . '/cache.php';
function eshop_header_show()
{
    global $CurrentHandler, $SYSTEM_FLAGS, $template, $lang;
    /* print '<pre>';
       print_r ($CurrentHandler);
       print '</pre>'; */
    /* print '<pre>';
       print_r ($SYSTEM_FLAGS);
       print '</pre>';  */
    if (empty($_REQUEST['page'])) {
        $page = $CurrentHandler['params']['page'];
    } else {
예제 #3
0
 * your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
if (!defined('NGCMS')) {
    die('Galaxy in danger');
}
add_act('index', 'breadcrumbs');
LoadPluginLang('breadcrumbs', 'main', '', 'bc', ':');
function breadcrumbs()
{
    global $lang, $catz, $catmap, $template, $CurrentHandler, $config, $SYSTEM_FLAGS, $tpl, $systemAccessURL, $twig;
    $tpath = locatePluginTemplates(array('breadcrumbs'), 'breadcrumbs', pluginGetVariable('breadcrumbs', 'template_source'));
    $location = array();
    $location_last = '';
    # processing 404 page
    if ($SYSTEM_FLAGS['info']['title']['group'] == $lang['404.title']) {
        $link = str_replace(array('{home_url}', '{home_title}'), array($config['home_url'], $lang['bc:mainpage']), $lang['bc:page_404']);
        $location[] = array('url' => $config['home_url'], 'title' => $lang['bc:mainpage'], 'link' => $link);
        $location_last = $lang['404.title'];
    } else {
        if ($CurrentHandler) {
            $params = $CurrentHandler['params'];