Esempio n. 1
0
    @define('_VM_IS_BACKEND', '1');
}
defined('_VM_TOOLBAR_LOADED') or define('_VM_TOOLBAR_LOADED', 1);
include dirname(__FILE__) . '/compat.joomla1.5.php';
global $page, $sess;
if (!file_exists($mosConfig_absolute_path . '/administrator/components/com_virtuemart/install.php')) {
    // We parse the phpShop main code before loading the toolbar,
    // for we can catch errors and adjust the toolbar when
    // the admin has to stay on a site or is redirected back on error
    require_once $mosConfig_absolute_path . '/components/com_virtuemart/virtuemart_parser.php';
    if (file_exists($mosConfig_absolute_path . '/editor/editor.php')) {
        require_once $mosConfig_absolute_path . '/editor/editor.php';
    }
    require_once ADMINPATH . 'toolbar.html.php';
    require_once CLASSPATH . 'menuBar.class.php';
    $bar = vmToolBar::getInstance('virtuemart');
    // We have to do some page declarations here
    // Used for pages that allow (un)publishing items
    $allowsListPublish = array('product.product_list', 'product.product_category_list', 'admin.user_field_list', 'store.payment_method_list', 'store.export_list');
    // The list of pages with their functions that allow batch deletion
    $allowsListDeletion = array('admin.country_list' => 'countryDelete', 'admin.country_state_list' => 'stateDelete', 'admin.curr_list' => 'currencyDelete', 'admin.function_list' => 'functionDelete', 'admin.module_list' => 'moduleDelete', 'admin.user_list' => 'userDelete', 'admin.user_field_list' => 'userfieldDelete', 'admin.usergroup_list' => 'usergroupDelete', 'affiliate.affiliate_list' => 'affiliateDelete', 'coupon.coupon_list' => 'couponDelete', 'store.creditcard_list' => 'creditcardDelete', 'product.file_list' => 'deleteProductFile', 'tax.tax_list' => 'deleteTaxRate', 'manufacturer.manufacturer_category_list' => 'manufacturercategoryDelete', 'manufacturer.manufacturer_list' => 'manufacturerDelete', 'order.order_list' => 'orderDelete', 'order.order_status_list' => 'orderStatusDelete', 'store.export_list' => 'ExportDelete', 'store.payment_method_list' => 'paymentMethodDelete', 'product.product_attribute_list' => 'productAttributeDelete', 'product.product_category_list' => 'productCategoryDelete', 'product.product_discount_list' => 'discountDelete', 'product.product_list' => 'productDelete', 'product.product_price_list' => 'productPriceDelete', 'product.product_produt_type_list' => 'productProductTypeDelete', 'product.review_list' => 'productReviewDelete', 'product.product_type_list' => 'ProductTypeDelete', 'product.product_type_parameter_list' => 'ProductTypeDeleteParam', 'shipping.rate_list' => 'rateDelete', 'shipping.carrier_list' => 'carrierDelete', 'shopper.shopper_group_list' => 'shopperGroupDelete', 'zone.zone_list' => 'deletezone');
    // Can be used for lists that allow NO batch delete
    $noListDelete = array();
    // Pages which don't allow new items to be created
    $noNewItem = array('order.order_list', 'store.shipping_module_list');
    //  Forms Toolbar
    if (stristr($page, 'form') || $page == 'admin.show_cfg' || $page == 'affiliate.affiliate_add') {
        TOOLBAR_virtuemart::FORMS_MENU_SAVE_CANCEL();
    } elseif (stristr($page, 'list') && $page != 'affiliate.shopper_list') {
        // Some lists allow special tasks like 'Add price' or 'Add State'
        TOOLBAR_virtuemart::LISTS_SPECIAL_TASKS($page);
Esempio n. 2
0
 function _DEFAULT_USERS()
 {
     $bar =& vmToolBar::getInstance('virtuemart');
     $bar->addNew();
     $bar->editList();
     $bar->deleteList();
     $bar->custom('remove_as_customer', 'admin.user_list', 'remove', 'Remove as Customer');
 }