<?php 
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 
/**
* @version $Id: header.php,v 1.15 2005/01/27 19:33:25 soeren_nb Exp $
* @package mambo-phpShop
* @subpackage Core
* @copyright (C) 2004-2005 Soeren Eberhardt
*
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* mambo-phpShop is Free Software.
* mambo-phpShop comes with absolute no warranty.
*
* www.mambo-phpshop.net
*/
mm_showMyFileName( __FILE__ );
/** 
* Header file for the MOS - phpshop component administration.
* shows all modules that are available to the user in a dropdown menu
*/

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
global $error, $page, $ps_product;

    $mod = array();
    $q = "SELECT module_name,module_perms from #__pshop_module WHERE module_publish='Y'";
    $q .= "AND module_name <> 'checkout' ORDER BY list_order ASC";
    $db->query($q);
    while ($db->next_record()) {
        if ($perm->check($db->f("module_perms")))
            $mod[] = $db->f("module_name");
    }
   if (!defined('_PSHOP_ADMIN')) {
      $my_path = "includes/js/ThemeOffice/";
    ?>
    <link rel="stylesheet" href="<?php echo $my_path ?>theme.css" type="text/css" />
    <link rel="stylesheet" href="components/com_phpshop/admin.css" type="text/css" />
    <script language="JavaScript" src="includes/js/JSCookMenu.js" type="text/javascript"></script>
    <script language="JavaScript" src="<?php echo $my_path ?>theme.js" type="text/javascript"></script>
<?php }
    else {
      $my_path = "../includes/js/ThemeOffice/";
    }
    ?>
<script language="JavaScript" type="text/javascript">
var phpShopMenu =
[  <?php for ($i=0;$i < sizeof($mod);$i++) {  // recurse through all modules 

            $label = "\$lbl =  \$PHPSHOP_LANG->_PHPSHOP_".strtoupper($mod[$i])."_MOD;";
            eval($label);
             switch($mod[$i]) {
            
                case "admin": 
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>config.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CONFIG ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=admin.show_cfg&option=com_phpshop") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CONFIG ?>'],
                        _cmSplit,
                        <?php if (defined('_PSHOP_ADMIN')) { ?>
                        ['<img src="<?php echo $my_path ?>users.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_USERS ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=admin.user_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_USERS ?>'],
                        _cmSplit,
                        <?php } ?>
                        ['<img src="<?php echo $my_path ?>sections.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_USER_FORM_COUNTRY ?>',null,null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_USER_FORM_COUNTRY ?>',
                            ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_COUNTRY_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=admin.country_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_COUNTRY_LIST_MNU ?>'],
                            ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_COUNTRY_LIST_ADD ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=admin.country_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_COUNTRY_LIST_ADD ?>']
                        ],
                        ['<img src="<?php echo $my_path ?>sections.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_LIST_CURRENCY ?>',null,null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_LIST_CURRENCY ?>',
                            ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CURRENCY_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=admin.curr_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CURRENCY_LIST_MNU ?>'],
                            ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CURRENCY_LIST_ADD ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=admin.curr_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CURRENCY_LIST_ADD ?>']
                        ],
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>sections.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_MODULES ?>',null,null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_MODULES ?>',
                            ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_MODULE_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=admin.module_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_MODULE_LIST_MNU ?>'],
                            ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_MODULE_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=admin.module_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_MODULE_FORM_MNU ?>']
                        ],
                        <?php if (!empty($_REQUEST['module_id'])) { ?>
                            ['<img src="<?php echo $my_path ?>sections.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_FUNCTIONS ?>',null,null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_FUNCTIONS ?>',
                                ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_FUNCTION_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=admin.function_list&module_id=".$_REQUEST['module_id']) ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_FUNCTION_LIST_MNU ?>'],
                                ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_FUNCTION_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=admin.function_form&module_id=".$_REQUEST['module_id']) ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_FUNCTION_FORM_MNU ?>']
                            ]
                
                        <?php } ?>
                        <?php break;
                        
                case "product":
                    include_class("product");
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>query.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_CSV_UPLOAD ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=product.csv_upload"); ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_CSV_UPLOAD ?>'],
                        _cmSplit,
                        [_cmNoAction,'<td class="ThemeOfficeMenuFolderLeft">&nbsp;</td><td colspan="2" align="center" class="ThemeOfficeMenu"><strong><?php echo $lbl ?></strong></td>'],
                        <?php    
                        if (!empty($_REQUEST['product_id']) && empty($_REQUEST['product_parent_id'])) { 
                              if (!isset($return_args)) $return_args = ""; ?> 
                        
                        ['<img src="<?php echo $my_path ?>sections.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CURRENT_PRODUCT ?>',null,null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CURRENT_PRODUCT ?>',
                            ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ATTRIBUTE_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=product.product_attribute_list&product_id=$product_id&return_args=" . urlencode($return_args)); ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ATTRIBUTE_LIST_MNU ?>'],
                            ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ATTRIBUTE_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=product.product_attribute_form&product_id=$product_id&return_args=" . urlencode($return_args)); ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ATTRIBUTE_FORM_MNU ?>'],
                            ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRICE_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=product.product_price_list&product_id=$product_id&return_args=" . urlencode($return_args)); ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRICE_FORM_MNU ?>']
                            <?php if ($ps_product->product_has_attributes($_REQUEST['product_id'])) { ?>
                            ,['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_FORM_ADD_ITEM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=product.product_form&product_parent_id=$product_id"); ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_FORM_ADD_ITEM_MNU ?>']
                            <?php } ?>
                        ],
                        _cmSplit,
                    <?php    }
                        elseif (!empty($_REQUEST['product_parent_id'])) { ?> 
                    
                            ['<img src="<?php echo $my_path ?>sections.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CURRENT_ITEM ?>',null,null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CURRENT_ITEM ?>',
                                ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRICE_FORM_MNU ?>','<?php @$sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=product.product_price_list&product_id=$product_id&product_parent_id=$product_parent_id&return_args=" . urlencode($return_args)); ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRICE_FORM_MNU ?>'],
                                ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_FORM_ADD_ANOTHER_ITEM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=product.product_form&product_parent_id=" . $product_parent_id); ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_FORM_ADD_ANOTHER_ITEM_MNU ?>'],
                                ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_FORM_RETURN_LBL ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=product.product_form&product_id=" . $product_parent_id); ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_FORM_RETURN_LBL ?>']
                            ],
                        _cmSplit,
                        <?php 
                        } ?>
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=product.product_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=product.product_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_FORM_MNU ?>'],
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>media.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_FILEMANAGER ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=product.filemanager"); ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_FILEMANAGER ?>'],
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>sections.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_OTHER_LISTS ?>',null,null,'Inventory, Featured Products, Product Folders',
                            ['<img src="<?php echo $my_path ?>install.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_INVENTORY_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=product.product_inventory"); ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_INVENTORY_MNU ?>'],
                            ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_SPECIAL_PRODUCTS ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=product.specialprod") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_SPECIAL_PRODUCTS ?>'],
                            ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_FOLDERS ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=product.folders") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_FOLDERS ?>']
                        ],
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>sections.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_DISCOUNT_LBL ?>',null,null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_DISCOUNT_LBL ?>',
                            ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_DISCOUNT_LIST_LBL ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=product.product_discount_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_DISCOUNT_LIST_LBL ?>'],
                            ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_DISCOUNT_ADDEDIT ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=product.product_discount_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PRODUCT_DISCOUNT_ADDEDIT ?>']
                        ],
                        _cmSplit,
                        
                        [_cmNoAction,'<td class="ThemeOfficeMenuFolderLeft">&nbsp;</td><td colspan="2" align="center" class="ThemeOfficeMenu"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_CATEGORIES ?></strong></td>'],
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CATEGORY_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=product.product_category_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CATEGORY_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CATEGORY_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=product.product_category_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CATEGORY_FORM_MNU ?>'],
                        <?php 
                    break;


                case "vendor":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_VENDOR_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=vendor.vendor_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_VENDOR_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_VENDOR_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=vendor.vendor_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_VENDOR_FORM_MNU ?>'],
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_VENDOR_CAT_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=vendor.vendor_category_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_VENDOR_CAT_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_VENDOR_CAT_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=vendor.vendor_category_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_VENDOR_CAT_FORM_MNU ?>']
                        <?php break;
                        
                case "shopper":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_SHOPPER_GROUP_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=shopper.shopper_group_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_SHOPPER_GROUP_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_SHOPPER_GROUP_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=shopper.shopper_group_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_SHOPPER_GROUP_FORM_MNU ?>']
                        <?php break;
                        
                case "tax":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_TAX_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=tax.tax_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_TAX_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_TAX_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=tax.tax_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_TAX_FORM_MNU ?>']
                    
                        <?php break;
                        
                case "store": 
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>sysinfo.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_STATISTIC_SUMMARY ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=store.index") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_STATISTIC_SUMMARY ?>'],
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>config.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_STORE_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=store.store_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_STORE_FORM_MNU ?>'],
                        <?php 
                        if ($_SESSION['auth']['perms'] != "admin" && defined('_PSHOP_ADMIN')) { ?>
                        ['<img src="<?php echo $my_path ?>users.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_USERS ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=store.user_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_USER_LIST_MNU ?>'],
                        <?php } ?>
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PAYMENT_METHOD_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=store.payment_method_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PAYMENT_METHOD_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_PAYMENT_METHOD_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=store.payment_method_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_PAYMENT_METHOD_FORM_MNU ?>'],
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>content.png" />','Shipping Module List','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=store.shipping_modules") ?>',null,'Shipping Method List'],                        
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CREDITCARD_LIST_LBL ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=store.creditcard_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CREDITCARD_LIST_LBL ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CREDITCARD_FORM_LBL ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=store.creditcard_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CREDITCARD_FORM_LBL ?>']
                        
                        <?php break;
                        
                case "zone":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ZONE_ASSIGN_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=zone.assign_zones") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ZONE_ASSIGN_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ZONE_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=zone.zone_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ZONE_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ZONE_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=zone.zone_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ZONE_FORM_MNU ?>']
                    
                        <?php break; 
                        
                case "reportbasic":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=reportbasic.index") ?>',null,'<?php echo $lbl ?>'
                    
                        <?php break; 


                case "order":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ORDER_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=order.order_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ORDER_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>sections.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ORDER_PRINT_PO_STATUS ?>',null,null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ORDER_PRINT_PO_STATUS ?>',
                            ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ORDER_STATUS_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=order.order_status_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ORDER_STATUS_LIST_MNU ?>'],
                            ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ORDER_STATUS_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=order.order_status_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ORDER_STATUS_FORM_MNU ?>']
                        ],
                        <?php break;
                        
                case "shipping":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CARRIER_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=shipping.carrier_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CARRIER_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_CARRIER_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=shipping.carrier_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_CARRIER_FORM_MNU ?>'],
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_RATE_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=shipping.rate_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_RATE_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_RATE_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF'] . "?pshop_mode=admin&page=shipping.rate_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_RATE_FORM_MNU ?>']
                    
                        <?php break; 
                        
                case "isshipping":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ISSHIP_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=isshipping.ISship_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ISSHIP_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ISSHIP_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=isshipping.ISship_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ISSHIP_FORM_ADD_LBL ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_ISSHIP_PING_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=isshipping.ISship_ping") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_ISSHIP_PING_MNU ?>']
                    
                        <?php break; 
                        
                case "help":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>', '<?php echo $mosConfig_live_site."/administrator/components/com_phpshop/help/index.html" ?>' , "_blank",'<?php echo $lbl ?>'
                    
                        <?php break; 

                case "affiliate":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_AFFILIATE_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=affiliate.affiliate_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_AFFILIATE_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_AFFILIATE_EMAIL_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=affiliate.affiliate_email") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_AFFILIATE_EMAIL_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','Add affiliate','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=affiliate.shopper_list") ?>',null,'Add affiliate']
                    
                        <?php break; 
                        

                case "manufacturer":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_MANUFACTURER_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=manufacturer.manufacturer_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_MANUFACTURER_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_MANUFACTURER_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=manufacturer.manufacturer_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_MANUFACTURER_FORM_MNU ?>'],
                        _cmSplit,
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_MANUFACTURER_CAT_LIST_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=manufacturer.manufacturer_category_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_MANUFACTURER_CAT_LIST_MNU ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_MANUFACTURER_CAT_FORM_MNU ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=manufacturer.manufacturer_category_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_MANUFACTURER_CAT_FORM_MNU ?>']
                        <?php break;
                        
                case "coupon":
                    if ($i != 0) {
                    ?> ], _cmSplit, <?php 
                    } ?>
                    [null,'<?php echo $lbl ?>',null,null,'<?php echo $lbl ?>',
                        ['<img src="<?php echo $my_path ?>content.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_COUPON_LIST ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=coupon.coupon_list") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_COUPON_LIST ?>'],
                        ['<img src="<?php echo $my_path ?>edit.png" />','<?php echo $PHPSHOP_LANG->_PHPSHOP_COUPON_NEW_HEADER ?>','<?php $sess->purl($_SERVER['PHP_SELF']."?pshop_mode=admin&page=coupon.coupon_form") ?>',null,'<?php echo $PHPSHOP_LANG->_PHPSHOP_COUPON_NEW_HEADER ?>']
                        <?php break;
          }
        }   ?>
          ]          
];

</script>

<table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tr>
        <td <?php if ( defined('_PSHOP_ADMIN') &&  SHOWVERSION != '1') { ?> colspan="2" <?php } ?>>
            <img src="<?php echo IMAGEURL ?>ps_image/toplogo.gif" alt="toplogo" />
        </td><?php if (defined('_PSHOP_ADMIN') && SHOWVERSION == '1') { ?>
        <td align="right">
            <?php include(PAGEPATH."VERSION.txt") ?>
        </td>
        <?php } ?>
    </tr>
    <tr>
        <td colspan="2" width="100%" align="center">
            <table class="menubar" width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr valign="top">
                  <td <?php if(!defined('_PHSHOP_ADMIN')) echo "bgcolor=\"".SEARCH_COLOR_2."\"" ?> class="menubackgr" height="20" valign="middle">
                    <div id="phpShopMenuID"></div>
                      <script language="JavaScript" type="text/javascript">
                      cmDraw ('phpShopMenuID', phpShopMenu, 'hbr', cmThemeOffice, 'ThemeOffice');
                      </script>
                  </td>
                </tr>
            </table>
        </td>

    </tr>
    <tr valign="top"  class="adminform" >
        <td colspan="2">
          <table width="100%" align="center" class="adminform" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td><?php 
                  if (!empty($error) && ($page != ERRORPAGE)) { ?>
                    <table width="100%"><tr><td><br /><span class="message"><?php echo $error; ?></span><br /></td></tr></table>
            <?php } 
                  // we must have this because of the frontend administration
                  // also using this file
                  if (!defined('_PSHOP_ADMIN')) { ?>
                </td>
            </tr>
          </table>
        </td>
    </tr>
</table>
   <?php } ?>
