AAAAhome/academiac/www/administrator/components/com_virtuemart/views/user/view.html.php000060400000022065151372156140025063 0ustar00assignRef('perm',$perm); $model = VmModel::getModel(); $currentUser = JFactory::getUser(); $task = JRequest::getWord('task', 'edit'); if($task == 'editshop'){ if(Vmconfig::get('multix','none') !=='none'){ //Maybe we must check here if the user is vendor and if he has an own id and else map to mainvendor. $userId = 0; } else { if(!class_exists('VirtueMartModelVendor')) require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'vendor.php'); $userId = VirtueMartModelVendor::getUserIdByVendorId(1); } $this->SetViewTitle('STORE' ); } else if ($task == 'add'){ $userId = 0; } else { $userId = JRequest::getVar('virtuemart_user_id',0); if(is_array($userId)){ $userId = $userId[0]; } $this->SetViewTitle('USER'); } $userId = $model->setId($userId); //$layoutName = JRequest::getWord('layout', 'default'); $layoutName = $this->getLayout(); if ($layoutName == 'edit' || $layoutName == 'edit_shipto') { $editor = JFactory::getEditor(); if (!class_exists('VmImage')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php'); $userDetails = $model->getUser(); if($task == 'editshop' && $userDetails->user_is_vendor){ // $model->setCurrent(); if(!empty($userDetails->vendor->vendor_store_name)){ $this->SetViewTitle('STORE',$userDetails->vendor->vendor_store_name, 'shop_mart' ); } else { $this->SetViewTitle('STORE',JText::_('COM_VIRTUEMART_NEW_VENDOR') , 'shop_mart'); } $vendorid = $userDetails->virtuemart_vendor_id; } else { $vendorid = 0 ; $this->SetViewTitle('USER',$userDetails->JUser->get('name')); } $_new = ($userDetails->JUser->get('id') < 1); $this->addStandardEditViewCommands($vendorid); // User details $_contactDetails = $model->getContactDetails(); $_groupList = $model->getGroupList(); if (!is_array($_groupList)) { $this->lists['gid'] = ''. JText::_($_groupList) .''; } else { $this->lists['gid'] = JHTML::_('select.genericlist', $_groupList, 'gid', 'size="10"', 'value', 'text', $userDetails->JUser->get('gid')); } $this->lists['canBlock'] = ($currentUser->authorize('com_users', 'block user') && ($userDetails->JUser->get('id') != $currentUser->get('id'))); // Can't block myself $this->lists['canSetMailopt'] = $currentUser->authorize('workflow', 'email_events'); $this->lists['block'] = JHTML::_('select.booleanlist', 'block', 'class="inputbox"', $userDetails->JUser->get('block'), 'COM_VIRTUEMART_YES', 'COM_VIRTUEMART_NO'); $this->lists['sendEmail'] = JHTML::_('select.booleanlist', 'sendEmail', 'class="inputbox"', $userDetails->JUser->get('sendEmail'), 'COM_VIRTUEMART_YES', 'COM_VIRTUEMART_NO'); $this->lists['params'] = $userDetails->JUser->getParameters(true); // Shopper info $this->lists['shoppergroups'] = ShopFunctions::renderShopperGroupList($userDetails->shopper_groups,true, 'virtuemart_shoppergroup_id'); $this->lists['vendors'] = ShopFunctions::renderVendorList($userDetails->virtuemart_vendor_id); $model->setId($userDetails->JUser->get('id')); $this->lists['custnumber'] = $model->getCustomerNumberById(); // Shipment address(es) $this->lists['shipTo'] = ShopFunctions::generateStAddressList($this,$model,'addST'); $new = false; if(JRequest::getInt('new','0')===1){ $new = true; } $virtuemart_userinfo_id_BT = $model->getBTuserinfo_id($userId); $userFieldsArray = $model->getUserInfoInUserFields($layoutName,'BT',$virtuemart_userinfo_id_BT,false); $userFieldsBT = $userFieldsArray[$virtuemart_userinfo_id_BT]; //$this->lists['perms'] = JHTML::_('select.genericlist', Permissions::getUserGroups(), 'perms', '', 'group_name', 'group_name', $userDetails->perms); // Load the required scripts if (count($userFieldsBT['scripts']) > 0) { foreach ($userFieldsBT['scripts'] as $_script => $_path) { JHTML::script($_script, $_path); } } // Load the required stylesheets if (count($userFieldsBT['links']) > 0) { foreach ($userFieldsBT['links'] as $_link => $_path) { JHTML::stylesheet($_link, $_path); } } $this->assignRef('userFieldsBT', $userFieldsBT); $this->assignRef('userInfoID', $virtuemart_userinfo_id_BT); $addrtype = vRequest::getCmd('addrtype'); if ($layoutName == 'edit_shipto' or $task=='addST' or $addrtype=='ST') { $virtuemart_userinfo_id = JRequest::getString('virtuemart_userinfo_id', '0',''); $userFieldsArray = $model->getUserInfoInUserFields($layoutName,'ST',$virtuemart_userinfo_id,false); if($new ){ $virtuemart_userinfo_id = 0; } else { } $userFieldsST = $userFieldsArray[$virtuemart_userinfo_id]; $this->assignRef('shipToFields', $userFieldsST); } $this->assignRef('shipToId', $virtuemart_userinfo_id); $this->assignRef('new', $new); if (!$_new) { // Check for existing orders for this user $orders = VmModel::getModel('orders'); $orderList = $orders->getOrdersList($userDetails->JUser->get('id'), true); } else { $orderList = null; } if (count($orderList) > 0 || !empty($userDetails->user_is_vendor)) { if (!class_exists('CurrencyDisplay')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'currencydisplay.php'); $currency = CurrencyDisplay::getInstance(); $this->assignRef('currency',$currency); } // vmdebug('user $userDetails ', $userDetails ); if (!empty($userDetails->user_is_vendor)) { $vendorModel = VmModel::getModel('vendor'); $vendorModel->setId($userDetails->virtuemart_vendor_id); $vendorModel->addImages($userDetails->vendor); $this->assignRef('vendor', $userDetails->vendor); $currencyModel = VmModel::getModel('currency'); $_currencies = $currencyModel->getCurrencies(); $this->assignRef('currencies', $_currencies); $configModel = VmModel::getModel('config'); $this->assignRef('pdfFonts', $configModel->getTCPDFFontsList()); } $this->assignRef('userDetails', $userDetails); $this->assignRef('orderlist', $orderList); $this->assignRef('contactDetails', $_contactDetails); $this->assignRef('editor', $editor); } else { JToolBarHelper::divider(); JToolBarHelper::custom('toggle.user_is_vendor.1', 'publish','','COM_VIRTUEMART_USER_ISVENDOR'); JToolBarHelper::custom('toggle.user_is_vendor.0', 'unpublish','','COM_VIRTUEMART_USER_ISNOTVENDOR'); JToolBarHelper::divider(); JToolBarHelper::deleteList(); JToolBarHelper::editListX(); //This is intentionally, creating new user via BE is buggy and can be done by joomla //JToolBarHelper::addNewX(); $this->addStandardDefaultViewLists($model,'ju.id'); $userList = $model->getUserList(); $this->assignRef('userList', $userList); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); $shoppergroupmodel = VmModel::getModel('shopperGroup'); $defaultShopperGroup = $shoppergroupmodel->getDefault(0)->shopper_group_name; $this->assignRef('defaultShopperGroup', $defaultShopperGroup); } if(!empty($this->orderlist)){ VmConfig::loadJLang('com_virtuemart_orders',TRUE); } parent::display($tpl); } /* * What is this doing here? * */ function renderMailLayout ($doVendor=false) { $tpl = ($doVendor) ? 'mail_html_regvendor' : 'mail_html_reguser'; $this->setLayout($tpl); $vendorModel = VmModel::getModel('vendor'); $vendorId = 1; $vendorModel->setId($vendorId); $vendor = $vendorModel->getVendor(); $vendorModel->addImages($vendor); $this->assignRef('subject', ($doVendor) ? JText::sprintf('COM_VIRTUEMART_NEW_USER_MESSAGE_VENDOR_SUBJECT', $this->user->get('email')) : JText::sprintf('COM_VIRTUEMART_NEW_USER_MESSAGE_SUBJECT',$vendor->vendor_store_name)); parent::display(); } } //No Closing Tag home/academiac/www/administrator/components/com_virtuemart/views/virtuemart/view.html.php000060400000006557151372160430026314 0ustar00getTotalCustomers(); $this->assignRef('nbrCustomers', $nbrCustomers); $nbrActiveProducts = $model->getTotalActiveProducts(); $this->assignRef('nbrActiveProducts', $nbrActiveProducts); $nbrInActiveProducts = $model->getTotalInActiveProducts(); $this->assignRef('nbrInActiveProducts', $nbrInActiveProducts); $nbrFeaturedProducts = $model->getTotalFeaturedProducts(); $this->assignRef('nbrFeaturedProducts', $nbrFeaturedProducts); $ordersByStatus = $model->getTotalOrdersByStatus(); $this->assignRef('ordersByStatus', $ordersByStatus); $recentOrders = $model->getRecentOrders(); if(!class_exists('CurrencyDisplay'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'currencydisplay.php'); /* Apply currency This must be done per order since it's vendor specific */ $_currencies = array(); // Save the currency data during this loop for performance reasons foreach ($recentOrders as $virtuemart_order_id => $order) { //This is really interesting for multi-X, but I avoid to support it now already, lets stay it in the code if (!array_key_exists('v'.$order->virtuemart_vendor_id, $_currencies)) { $_currencies['v'.$order->virtuemart_vendor_id] = CurrencyDisplay::getInstance('',$order->virtuemart_vendor_id); } $order->order_total = $_currencies['v'.$order->virtuemart_vendor_id]->priceDisplay($order->order_total); } $this->assignRef('recentOrders', $recentOrders); $recentCustomers = $model->getRecentCustomers(); $this->assignRef('recentCustomers', $recentCustomers); if (!class_exists('ShopFunctions')) require(JPATH_VM_ADMINISTRATOR.'/helpers/shopfunctions.php'); $extensionsFeed = ShopFunctions::getExtensionsRssFeed(); $this->assignRef('extensionsFeed', $extensionsFeed); $virtuemartFeed = ShopFunctions::getVirtueMartRssFeed(); $this->assignRef('virtuemartFeed', $virtuemartFeed); // Options button. // if ( !JVM_VERSION===1) { // if (JFactory::getUser()->authorise('core.admin', 'com_virtuemart')) { // JToolBarHelper::preferences('com_virtuemart'); // } // } parent::display($tpl); } } //pure php no taghome/academiac/www/administrator/components/com_virtuemart/views/orders/view.html.php000060400000020645151372204050025377 0ustar00getOrderStatusList(); $this->SetViewTitle( 'ORDER'); $orderModel = VmModel::getModel(); $curTask = JRequest::getWord('task'); if ($curTask == 'edit') { VmConfig::loadJLang('com_virtuemart_shoppers',TRUE); VmConfig::loadJLang('com_virtuemart_orders', true); // Load addl models $userFieldsModel = VmModel::getModel('userfields'); $productModel = VmModel::getModel('product'); // Get the data $virtuemart_order_id = JRequest::getInt('virtuemart_order_id'); $order = $orderModel->getOrder($virtuemart_order_id); $_orderID = $order['details']['BT']->virtuemart_order_id; $orderbt = $order['details']['BT']; $orderst = (array_key_exists('ST', $order['details'])) ? $order['details']['ST'] : $orderbt; $orderbt ->invoiceNumber = $orderModel->getInvoiceNumber($orderbt->virtuemart_order_id); $currency = CurrencyDisplay::getInstance('',$order['details']['BT']->virtuemart_vendor_id); $this->assignRef('currency', $currency); $_userFields = $userFieldsModel->getUserFields( 'account' , array('captcha' => true, 'delimiters' => true) // Ignore these types , array('delimiter_userinfo','user_is_vendor' ,'username','password', 'password2', 'agreed', 'address_type') // Skips ); $userfields = $userFieldsModel->getUserFieldsFilled( $_userFields ,$orderbt ,'BT_' ); $_userFields = $userFieldsModel->getUserFields( 'shipment' , array() // Default switches , array('delimiter_userinfo', 'username', 'email', 'password', 'password2', 'agreed', 'address_type') // Skips ); $shipmentfields = $userFieldsModel->getUserFieldsFilled( $_userFields ,$orderst ,'ST_' ); // Create an array to allow orderlinestatuses to be translated // We'll probably want to put this somewhere in ShopFunctions... $_orderStatusList = array(); foreach ($orderStates as $orderState) { //$_orderStatusList[$orderState->virtuemart_orderstate_id] = $orderState->order_status_name; //When I use update, I have to use this? $_orderStatusList[$orderState->order_status_code] = JText::_($orderState->order_status_name); } $_itemStatusUpdateFields = array(); $_itemAttributesUpdateFields = array(); foreach($order['items'] as $_item) { $_itemStatusUpdateFields[$_item->virtuemart_order_item_id] = JHTML::_('select.genericlist', $orderStates, "item_id[".$_item->virtuemart_order_item_id."][order_status]", 'class="selectItemStatusCode"', 'order_status_code', 'order_status_name', $_item->order_status, 'order_item_status'.$_item->virtuemart_order_item_id,true); } if(!isset($_orderStatusList[$orderbt->order_status])){ if(empty($orderbt->order_status)){ $orderbt->order_status = 'unknown'; } $_orderStatusList[$orderbt->order_status] = JText::_('COM_VIRTUEMART_UNKNOWN_ORDER_STATUS'); } /* Assign the data */ $this->assignRef('orderdetails', $order); $this->assignRef('orderID', $_orderID); $this->assignRef('userfields', $userfields); $this->assignRef('shipmentfields', $shipmentfields); $this->assignRef('orderstatuslist', $_orderStatusList); $this->assignRef('itemstatusupdatefields', $_itemStatusUpdateFields); $this->assignRef('itemattributesupdatefields', $_itemAttributesUpdateFields); $this->assignRef('orderbt', $orderbt); $this->assignRef('orderst', $orderst); $this->assignRef('virtuemart_shipmentmethod_id', $orderbt->virtuemart_shipmentmethod_id); /* Data for the Edit Status form popup */ $_currentOrderStat = $order['details']['BT']->order_status; // used to update all item status in one time $_orderStatusSelect = JHTML::_('select.genericlist', $orderStates, 'order_status', '', 'order_status_code', 'order_status_name', $_currentOrderStat, 'order_items_status',true); $this->assignRef('orderStatSelect', $_orderStatusSelect); $this->assignRef('currentOrderStat', $_currentOrderStat); /* Toolbar */ JToolBarHelper::custom( 'prevItem', 'back','','COM_VIRTUEMART_ITEM_PREVIOUS',false); JToolBarHelper::custom( 'nextItem', 'forward','','COM_VIRTUEMART_ITEM_NEXT',false); JToolBarHelper::divider(); JToolBarHelper::custom( 'cancel', 'back','back','back',false,false); } else if ($curTask == 'editOrderItem') { if(!class_exists('calculationHelper')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'calculationh.php'); $this->assignRef('orderstatuses', $orderStates); $model = VmModel::getModel(); $orderId = JRequest::getString('orderId', ''); $orderLineItem = JRequest::getVar('orderLineId', ''); $this->assignRef('virtuemart_order_id', $orderId); $this->assignRef('virtuemart_order_item_id', $orderLineItem); $orderItem = $model->getOrderLineDetails($orderId, $orderLineItem); $this->assignRef('orderitem', $orderItem); } else { $this->setLayout('orders'); $model = VmModel::getModel(); $this->addStandardDefaultViewLists($model,'created_on'); $orderStatusModel =VmModel::getModel('orderstatus'); $orderstates = JRequest::getWord('order_status_code',''); $this->lists['state_list'] = $orderStatusModel->renderOSList($orderstates,'order_status_code',FALSE,' onchange="this.form.submit();" '); $orderslist = $model->getOrdersList(); $this->assignRef('orderstatuses', $orderStates); if(!class_exists('CurrencyDisplay'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'currencydisplay.php'); /* Apply currency This must be done per order since it's vendor specific */ $_currencies = array(); // Save the currency data during this loop for performance reasons if ($orderslist) { foreach ($orderslist as $virtuemart_order_id => $order) { if(!empty($order->order_currency)){ $currency = $order->order_currency; } else if($order->virtuemart_vendor_id){ if(!class_exists('VirtueMartModelVendor')) require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'vendor.php'); $currObj = VirtueMartModelVendor::getVendorCurrency($order->virtuemart_vendor_id); $currency = $currObj->virtuemart_currency_id; } //This is really interesting for multi-X, but I avoid to support it now already, lets stay it in the code if (!array_key_exists('curr'.$currency, $_currencies)) { $_currencies['curr'.$currency] = CurrencyDisplay::getInstance($currency,$order->virtuemart_vendor_id); } $order->order_total = $_currencies['curr'.$currency]->priceDisplay($order->order_total); $order->invoiceNumber = $model->getInvoiceNumber($order->virtuemart_order_id); } } /* * UpdateStatus removed from the toolbar; don't understand how this was intented to work but * the order ID's aren't properly passed. Might be readded later; the controller needs to handle * the arguments. */ /* Toolbar */ //JToolBarHelper::customX( 'CreateOrderHead', 'new','new','New',false); JToolBarHelper::save('updatestatus', JText::_('COM_VIRTUEMART_UPDATE_STATUS')); JToolBarHelper::deleteListX(); /* Assign the data */ $this->assignRef('orderslist', $orderslist); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } shopFunctions::checkSafePath(); parent::display($tpl); } } home/academiac/www/administrator/components/com_virtuemart/views/custom/view.html.php000060400000010717151372245170025422 0ustar00SetViewTitle('PRODUCT_CUSTOM_FIELD'); $layoutName = JRequest::getWord('layout', 'default'); if ($layoutName == 'edit') { $this->addStandardEditViewCommands(); $customPlugin = ''; if (!class_exists('vmParameters')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php'); $custom = $model->getCustom(); $customfields = VmModel::getModel('customfields'); // vmdebug('VirtuemartViewCustom',$custom); JPluginHelper::importPlugin('vmcustom'); $dispatcher = JDispatcher::getInstance(); $retValue = $dispatcher->trigger('plgVmOnDisplayEdit',array($custom->virtuemart_custom_id,&$customPlugin)); $this->SetViewTitle('PRODUCT_CUSTOM_FIELD', $custom->custom_title); $selected=0; if(!empty($custom->custom_jplugin_id)) { $selected = $custom->custom_jplugin_id; } $pluginList = self::renderInstalledCustomPlugins($selected); $this->assignRef('customPlugin', $customPlugin); $this->assignRef('pluginList',$pluginList); $this->assignRef('custom', $custom); $this->assignRef('customfields', $customfields); } else { JToolBarHelper::custom('createClone', 'copy', 'copy', JText::_('COM_VIRTUEMART_CLONE'), true); JToolBarHelper::custom('toggle.admin_only.1', 'publish','', JText::_('COM_VIRTUEMART_TOGGLE_ADMIN'), true); JToolBarHelper::custom('toggle.admin_only.0', 'unpublish','', JText::_('COM_VIRTUEMART_TOGGLE_ADMIN'), true); JToolBarHelper::custom('toggle.is_hidden.1', 'publish','', JText::_('COM_VIRTUEMART_TOGGLE_HIDDEN'), true); JToolBarHelper::custom('toggle.is_hidden.0', 'unpublish','', JText::_('COM_VIRTUEMART_TOGGLE_HIDDEN'), true); $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model); $customs = $model->getCustoms(JRequest::getInt('custom_parent_id'),JRequest::getWord('keyword')); $this->assignRef('customs', $customs); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } parent::display($tpl); } function renderInstalledCustomPlugins($selected) { $db = JFactory::getDBO(); if (JVM_VERSION===1) { $table = '#__plugins'; $enable = 'published'; $ext_id = 'id'; } else { $table = '#__extensions'; $enable = 'enabled'; $ext_id = 'extension_id'; } $q = 'SELECT * FROM `'.$table.'` WHERE `folder` = "vmcustom" AND `'.$enable.'`="1" '; $db->setQuery($q); $results = $db->loadAssocList($ext_id); if (!class_exists('vmPlugin')) require(JPATH_VM_ADMINISTRATOR . DS . 'plugins' . DS . 'vmplugin.php'); $lang =JFactory::getLanguage(); foreach ($results as $result) { //$filename = 'plg_vmcustom_' . $this->plugin->element; $filename = 'plg_' .strtolower ( $result['name']).'.sys'; vmPlugin::loadJLang($filename,'vmcustom',$result['name']); } return VmHTML::select( 'custom_jplugin_id', $results, $selected,"",$ext_id, 'name'); //return JHtml::_('select.genericlist', $result, 'custom_jplugin_id', null, $ext_id, 'name', $selected); } } // pure php no closing taghome/academiac/www/administrator/components/com_virtuemart/views/manufacturer/view.html.php000060400000006345151372250540026603 0ustar00SetViewTitle(); $layoutName = JRequest::getWord('layout', 'default'); if ($layoutName == 'edit') { $manufacturer = $model->getManufacturer(); $isNew = ($manufacturer->virtuemart_manufacturer_id < 1); $model->addImages($manufacturer); $this->assignRef('manufacturer', $manufacturer); /* Process the images */ $mediaModel = VmModel::getModel('media'); $mediaModel -> setId($manufacturer->virtuemart_media_id); $image = $mediaModel->getFile('manufacturer','image'); $manufacturerCategories = $categoryModel->getManufacturerCategories(false,true); $this->assignRef('manufacturerCategories', $manufacturerCategories); $this->addStandardEditViewCommands($manufacturer->virtuemart_manufacturer_id); if(!class_exists('VirtueMartModelVendor')) require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'vendor.php'); $virtuemart_vendor_id = VirtueMartModelVendor::getLoggedVendor(); $this->assignRef('virtuemart_vendor_id', $virtuemart_vendor_id); } else { $mainframe = JFactory::getApplication(); $categoryFilter = $categoryModel->getCategoryFilter(); $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model,'mf_name'); $manufacturers = $model->getManufacturers(); $this->assignRef('manufacturers', $manufacturers); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); $virtuemart_manufacturercategories_id = $mainframe->getUserStateFromRequest( 'com_virtuemart.virtuemart_manufacturercategories_id', 'virtuemart_manufacturercategories_id', 0, 'int' ); $this->lists['virtuemart_manufacturercategories_id'] = JHTML::_('select.genericlist', $categoryFilter, 'virtuemart_manufacturercategories_id', 'class="inputbox" onchange="this.form.submit()"', 'value', 'text', $virtuemart_manufacturercategories_id ); } parent::display($tpl); } } // pure php no closing tag home/academiac/www/administrator/components/com_categories/views/categories/view.html.php000064400000013051151372270700026153 0ustar00state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // Preprocess the list of items to find ordering divisions. foreach ($this->items as &$item) { $this->ordering[$item->parent_id][] = $item->id; } // Levels filter. $options = array(); $options[] = JHtml::_('select.option', '1', JText::_('J1')); $options[] = JHtml::_('select.option', '2', JText::_('J2')); $options[] = JHtml::_('select.option', '3', JText::_('J3')); $options[] = JHtml::_('select.option', '4', JText::_('J4')); $options[] = JHtml::_('select.option', '5', JText::_('J5')); $options[] = JHtml::_('select.option', '6', JText::_('J6')); $options[] = JHtml::_('select.option', '7', JText::_('J7')); $options[] = JHtml::_('select.option', '8', JText::_('J8')); $options[] = JHtml::_('select.option', '9', JText::_('J9')); $options[] = JHtml::_('select.option', '10', JText::_('J10')); $this->f_levels = $options; $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { // Initialise variables. $categoryId = $this->state->get('filter.category_id'); $component = $this->state->get('filter.component'); $section = $this->state->get('filter.section'); $canDo = null; $user = JFactory::getUser(); // Avoid nonsense situation. if ($component == 'com_categories') { return; } // Need to load the menu language file as mod_menu hasn't been loaded yet. $lang = JFactory::getLanguage(); $lang->load($component, JPATH_BASE, null, false, true) || $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component, null, false, true); // Load the category helper. require_once JPATH_COMPONENT.'/helpers/categories.php'; // Get the results for each action. $canDo = CategoriesHelper::getActions($component, $categoryId); // If a component categories title string is present, let's use it. if ($lang->hasKey($component_title_key = strtoupper($component.($section?"_$section":'')).'_CATEGORIES_TITLE')) { $title = JText::_($component_title_key); } // Else if the component section string exits, let's use it elseif ($lang->hasKey($component_section_key = strtoupper($component.($section?"_$section":'')))) { $title = JText::sprintf( 'COM_CATEGORIES_CATEGORIES_TITLE', $this->escape(JText::_($component_section_key))); } // Else use the base title else { $title = JText::_('COM_CATEGORIES_CATEGORIES_BASE_TITLE'); } // Load specific css component JHtml::_('stylesheet', $component.'/administrator/categories.css', array(), true); // Prepare the toolbar. JToolBarHelper::title($title, 'categories '.substr($component, 4).($section?"-$section":'').'-categories'); if ($canDo->get('core.create') || (count($user->getAuthorisedCategories($component, 'core.create'))) > 0 ) { JToolBarHelper::addNew('category.add'); } if ($canDo->get('core.edit' ) || $canDo->get('core.edit.own')) { JToolBarHelper::editList('category.edit'); JToolBarHelper::divider(); } if ($canDo->get('core.edit.state')) { JToolBarHelper::publish('categories.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('categories.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('categories.archive'); } if (JFactory::getUser()->authorise('core.admin')) { JToolBarHelper::checkin('categories.checkin'); } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete', $component)) { JToolBarHelper::deleteList('', 'categories.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('categories.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::custom('categories.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false); JToolBarHelper::preferences($component); JToolBarHelper::divider(); } // Compute the ref_key if it does exist in the component if (!$lang->hasKey($ref_key = strtoupper($component.($section?"_$section":'')).'_CATEGORIES_HELP_KEY')) { $ref_key = 'JHELP_COMPONENTS_'.strtoupper(substr($component, 4).($section?"_$section":'')).'_CATEGORIES'; } // Get help for the categories view for the component by // -remotely searching in a language defined dedicated URL: *component*_HELP_URL // -locally searching in a component help file if helpURL param exists in the component and is set to '' // -remotely searching in a component URL if helpURL param exists in the component and is NOT set to '' if ($lang->hasKey($lang_help_url = strtoupper($component).'_HELP_URL')) { $debug = $lang->setDebug(false); $url = JText::_($lang_help_url); $lang->setDebug($debug); } else { $url = null; } JToolBarHelper::help($ref_key, JComponentHelper::getParams( $component )->exists('helpURL'), $url); } } home/academiac/www/administrator/components/com_admin/views/help/view.html.php000064400000002623151372416240023725 0ustar00help_search = $this->get('HelpSearch'); $this->page = $this->get('Page'); $this->toc = $this->get('Toc'); $this->lang_tag = $this->get('LangTag'); $this->latest_version_check = $this->get('LatestVersionCheck'); $this->addToolbar(); parent::display($tpl); } /** * Setup the Toolbar * * @since 1.6 */ protected function addToolbar() { JToolBarHelper::title(JText::_('COM_ADMIN_HELP'), 'help_header.png'); } } home/academiac/www/administrator/components/com_virtuemart/views/updatesmigration/view.html.php000060400000003521151372464530027465 0ustar00assignRef('checkbutton_style', $checkbutton_style); $this->assignRef('downloadbutton_style', $downloadbutton_style); $this->assignRef('latestVersion', $latestVersion); $freshInstall = JRequest::getInt('install',0); if($freshInstall){ $this->setLayout('install'); } parent::display($tpl); } } // pure php no closing tag academiac/www/administrator/components/com_virtuemart/views/manufacturercategories/view.html.php000060400000004055151372473500030571 0ustar00homeSetViewTitle('MANUFACTURER_CATEGORY'); $layoutName = JRequest::getWord('layout', 'default'); if ($layoutName == 'edit') { $manufacturerCategory = $model->getData(); $this->assignRef('manufacturerCategory', $manufacturerCategory); $this->addStandardEditViewCommands($manufacturerCategory->virtuemart_manufacturercategories_id); } else { $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model); $manufacturerCategories = $model->getManufacturerCategories(); $this->assignRef('manufacturerCategories', $manufacturerCategories); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } parent::display($tpl); } } // pure php no closing tag home/academiac/www/administrator/components/com_virtuemart/views/paymentmethod/view.html.php000060400000012311151372473720026762 0ustar00addHelperPath(JPATH_VM_ADMINISTRATOR.DS.'helpers'); if(!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'permissions.php'); if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); if (!class_exists ('vmPlugin')) { require(JPATH_VM_PLUGINS . DS . 'vmplugin.php'); } if (!class_exists('vmPSPlugin')) require(JPATH_VM_PLUGINS . DS . 'vmpsplugin.php'); $this->assignRef('perms', Permissions::getInstance()); $model = VmModel::getModel('paymentmethod'); //@todo should be depended by loggedVendor // $vendorId=1; // $this->assignRef('vendorId', $vendorId); // TODO logo $this->SetViewTitle(); $layoutName = JRequest::getWord('layout', 'default'); $vendorModel = VmModel::getModel('vendor'); $vendorModel->setId(1); $vendor = $vendorModel->getVendor(); $currencyModel = VmModel::getModel('currency'); $currencyModel = $currencyModel->getCurrency($vendor->vendor_currency); $this->assignRef('vendor_currency', $currencyModel->currency_symbol); if ($layoutName == 'edit') { // Load the helper(s) if (!class_exists('VmImage')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php'); if (!class_exists('vmParameters')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php'); $payment = $model->getPayment(); $this->assignRef('payment', $payment); $this->assignRef('vmPPaymentList', self::renderInstalledPaymentPlugins($payment->payment_jplugin_id)); $this->assignRef('shopperGroupList', ShopFunctions::renderShopperGroupList($payment->virtuemart_shoppergroup_ids, true)); if(Vmconfig::get('multix','none')!=='none'){ $vendorList= ShopFunctions::renderVendorList($payment->virtuemart_vendor_id); $this->assignRef('vendorList', $vendorList); } $this->addStandardEditViewCommands( $payment->virtuemart_paymentmethod_id); } else { JToolBarHelper::custom('clonepayment', 'copy', 'copy', JText::_('COM_VIRTUEMART_PAYMENT_CLONE'), true); $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model); $payments = $model->getPayments(); $this->assignRef('payments', $payments); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } parent::display($tpl); } function renderInstalledPaymentPlugins($selected){ if ( JVM_VERSION===1) { $table = '#__plugins'; $ext_id = 'id'; $enable = 'published'; } else { $table = '#__extensions'; $ext_id = 'extension_id'; $enable = 'enabled'; } $db = JFactory::getDBO(); //Todo speed optimize that, on the other hand this function is NOT often used and then only by the vendors // $q = 'SELECT * FROM #__plugins as pl JOIN `#__virtuemart_payment_method` AS pm ON `pl`.`id`=`pm`.`payment_jplugin_id` WHERE `folder` = "vmpayment" AND `published`="1" '; // $q = 'SELECT * FROM #__plugins as pl,#__virtuemart_payment_method as pm WHERE `folder` = "vmpayment" AND `published`="1" AND pl.id=pm.payment_jplugin_id'; $q = 'SELECT * FROM `'.$table.'` WHERE `folder` = "vmpayment" and `state`="0" AND `element`<>"moneybookers" ORDER BY `ordering`,`name` ASC'; $db->setQuery($q); $result = $db->loadAssocList($ext_id); if(empty($result)){ $app = JFactory::getApplication(); $app -> enqueueMessage(JText::_('COM_VIRTUEMART_NO_PAYMENT_PLUGINS_INSTALLED')); } $listHTML=''; return $listHTML; } } // pure php not tag home/academiac/www/administrator/components/com_virtuemart/views/ratings/view.html.php000060400000010031151372511240025536 0ustar00max_rating = VmConfig::get('vm_maximum_rating_scale',5); $this->assignRef('max_rating', $this->max_rating); $model = VmModel::getModel(); $this->SetViewTitle('REVIEW_RATE' ); /* Get the task */ $task = JRequest::getWord('task'); switch ($task) { case 'listreviews': /* Get the data */ $this->addStandardDefaultViewLists($model); $virtuemart_product_id = JRequest::getVar('virtuemart_product_id',array(),'', 'array'); if(is_array($virtuemart_product_id) && count($virtuemart_product_id) > 0){ $virtuemart_product_id = (int)$virtuemart_product_id[0]; } else { $virtuemart_product_id = (int)$virtuemart_product_id; } $reviewslist = $model->getReviews($virtuemart_product_id); $lists = array(); $lists['filter_order'] = $mainframe->getUserStateFromRequest($option.'filter_order', 'filter_order', '', 'cmd'); $lists['filter_order_Dir'] = $mainframe->getUserStateFromRequest($option.'filter_order_Dir', 'filter_order_Dir', '', 'word'); $this->assignRef('reviewslist', $reviewslist); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); $this->addStandardDefaultViewCommands(false,true); break; case 'edit': /* Get the data */ $rating = $model->getRating($cids); $this->addStandardEditViewCommands(); /* Assign the data */ $this->assignRef('rating', $rating); break; case 'edit_review': JToolBarHelper::divider(); /* Get the data */ $rating = $model->getReview($cids); if(!empty($rating)){ $this->SetViewTitle('REVIEW_RATE',$rating->product_name." (". $rating->customer.")" ); JToolBarHelper::customX('saveReview', 'save', 'save', JText::_('COM_VIRTUEMART_SAVE'), false); JToolBarHelper::customX('applyReview', 'apply', 'apply', JText::_('COM_VIRTUEMART_APPLY'), false); } else { $this->SetViewTitle('REVIEW_RATE','ERROR' ); } JToolBarHelper::customX('cancelEditReview', 'cancel', 'cancel', JText::_('COM_VIRTUEMART_CANCEL'), false); /* Assign the data */ $this->assignRef('rating', $rating); break; default: $this->addStandardDefaultViewCommands(false, true); $this->addStandardDefaultViewLists($model); $ratingslist = $model->getRatings(); $this->assignRef('ratingslist', $ratingslist); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); break; } parent::display($tpl); } } // pure php no closing tag