Ejemplo n.º 1
0
<?php

/**
 * wizard for creating online store
 *
 * PHP version 5.2
 *
 * @category None
 * @package  None
 * @author   Conor Mac Aoidh <*****@*****.**>
 * @author   Kae Verens <*****@*****.**>
 * @license  GPL 2.0
 * @link     http://kvsites.ie/
 */
$p = Pages::getInstancesByType('online-store');
if (@count($p->pages)) {
    echo '<em>' . __('You already have an online-store checkout page created') . '</em>';
    echo '<p>' . __('Maybe you want to') . ' <a href="./plugin.php?_plugin=products&_page=' . 'products-edit">' . __('add a new product') . '</a> ' . __('instead?') . '</p>';
}
WW_addScript('online-store/admin/wizard.js');
echo '<h1>' . __('Online Store Wizard') . '</h1>
<div id="preview-dialog"></div>
<ul class="sub-nav" id="register-progress" style="list-style-type:none">
  <li>' . __('Store') . '</li>
	<li>' . __('Payment Details') . '</li>
	<li>' . __('Company Details') . '</li>
	<li>' . __('Products') . '</li>
	<li>' . __('Finish') . '</li>
</ul>
</div>
<p id="error"></p>
Ejemplo n.º 2
0
            $url = '/';
        } else {
            $url = $p->getRelativeUrl();
        }
        if (isset($_REQUEST['login_referer'])) {
            $url .= '?login_referer=' . urlencode($_REQUEST['login_referer']);
        }
        $url .= '#Login';
        break;
        // }
    // }
    default:
        // {
        $get = array();
        foreach ($_GET as $k => $v) {
            if ($k != 'type') {
                $get[] = urlencode($k) . '=' . urlencode($v);
            }
        }
        $p = Pages::getInstancesByType($type);
        if (!count($p) || !count($p->pages)) {
            $url = '/';
        } else {
            $url = $p->pages[0]->getRelativeUrl();
        }
        if (count($get)) {
            $url .= '?' . join('&', $get);
        }
        // }
}
redirect($url);