0byt3m1n1-V2
Path:
/
home
/
a
/
c
/
a
/
academiac
/
www
/
[
Home
]
File: view.html.php.tar
home/academiac/www/administrator/components/com_virtuemart/views/user/view.html.php 0000604 00000022065 15137215614 0025063 0 ustar 00 <?php /** * * List/add/edit/remove Users * * @package VirtueMart * @subpackage User * @author Oscar van Eijk * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6477 2012-09-24 14:33:54Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); jimport('joomla.version'); /** * HTML View class for maintaining the list of users * * @package VirtueMart * @subpackage User * @author Oscar van Eijk */ class VirtuemartViewUser extends VmView { function display($tpl = null) { // Load the helper(s) if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); if(!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'permissions.php'); $perm = Permissions::getInstance(); $this->assignRef('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'] = '<input type="hidden" name="gid" value="'. $userDetails->JUser->get('gid') .'" /><strong>'. JText::_($_groupList) .'</strong>'; } 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.php 0000604 00000006557 15137216043 0026314 0 ustar 00 <?php /** * * Description * * @package VirtueMart * @subpackage * @author * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 5820 2012-04-06 19:14:38Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); jimport('joomla.html.pane'); /** * HTML View class for the VirtueMart Component * * @package VirtueMart * @author */ class VirtuemartViewVirtuemart extends VmView { function display($tpl = null) { if (!class_exists('VmImage')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php'); VmConfig::loadJLang('com_virtuemart_orders',TRUE); $model = VmModel::getModel('virtuemart'); $nbrCustomers = $model->getTotalCustomers(); $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 tag home/academiac/www/administrator/components/com_virtuemart/views/orders/view.html.php 0000604 00000020645 15137220405 0025377 0 ustar 00 <?php /** * * Description * * @package VirtueMart * @subpackage * @author * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for the VirtueMart Component * * @package VirtueMart * @author */ class VirtuemartViewOrders extends VmView { function display($tpl = null) { //Load helpers if (!class_exists('CurrencyDisplay')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'); if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); if(!class_exists('vmPSPlugin')) require(JPATH_VM_PLUGINS.DS.'vmpsplugin.php'); $orderStatusModel=VmModel::getModel('orderstatus'); $orderStates = $orderStatusModel->getOrderStatusList(); $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.php 0000604 00000010717 15137224517 0025422 0 ustar 00 <?php /** * * Description * * @package VirtueMart * @subpackage * @author * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 3006 2011-04-08 13:16:08Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for the VirtueMart Component * * @package VirtueMart * @author */ class VirtuemartViewCustom extends VmView { function display($tpl = null) { // Load the helper(s) if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); if(!class_exists('vmCustomPlugin')) require(JPATH_VM_PLUGINS.DS.'vmcustomplugin.php'); $model = VmModel::getModel(); if(!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'permissions.php'); // TODO Make an Icon for custom $this->SetViewTitle('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 tag home/academiac/www/administrator/components/com_virtuemart/views/manufacturer/view.html.php 0000604 00000006345 15137225054 0026603 0 ustar 00 <?php /** * * Manufacturer View * * @package VirtueMart * @subpackage Manufacturer * @author Patrick Kohl * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 5601 2012-03-04 18:22:24Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); jimport('joomla.html.pane'); /** * HTML View class for maintaining the list of manufacturers * * @package VirtueMart * @subpackage Manufacturer * @author Patrick Kohl */ class VirtuemartViewManufacturer extends VmView { function display($tpl = null) { // Load the helper(s) if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); // get necessary models $model = VmModel::getModel('manufacturer'); $categoryModel = VmModel::getModel('manufacturercategories'); $this->SetViewTitle(); $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.php 0000644 00000013051 15137227070 0026153 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Categories view class for the Category package. * * @package Joomla.Administrator * @subpackage com_categories * @since 1.6 */ class CategoriesViewCategories extends JViewLegacy { protected $items; protected $pagination; protected $state; /** * Display the view */ public function display($tpl = null) { $this->state = $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.php 0000644 00000002623 15137241624 0023725 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Admin component * * @package Joomla.Administrator * @subpackage com_admin * @since 1.6 */ class AdminViewHelp extends JViewLegacy { /** * @var string the search string */ protected $help_search=null; /** * @var string the page to be viewed */ protected $page=null; /** * @var string the iso language tag */ protected $lang_tag=null; /** * @var array Table of contents */ protected $toc=null; /** * @var string url for the latest version check */ protected $latest_version_check= 'http://www.joomla.org/download.html'; /** * @var string url for the start here link. */ protected $start_here = null; /** * Display the view */ function display($tpl = null) { // Initialise variables. $this->help_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.php 0000604 00000003521 15137246453 0027465 0 ustar 00 <?php /** * * UpdatesMigration View * * @package VirtueMart * @subpackage UpdatesMigration * @author Max Milbers * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6043 2012-05-21 21:40:56Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for maintaining the Installation. Updating of the files and imports of the database should be done here * * @package VirtueMart * @subpackage UpdatesMigration * @author Max Milbers */ class VirtuemartViewUpdatesMigration extends VmView { function display($tpl = null) { $latestVersion = JRequest::getVar('latestverison', ''); JToolBarHelper::title(JTEXT::_('COM_VIRTUEMART_UPDATE_MIGRATION'), 'head vm_config_48'); if (!class_exists('VmImage')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php'); if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); $this->assignRef('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.php 0000604 00000004055 15137247350 0030571 0 ustar 00 home <?php /** * * Manufacturer Category View * * @package VirtueMart * @subpackage Manufacturer Category * @author Patrick Kohl * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6006 2012-05-07 09:28:42Z electrocity $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for maintaining the list of manufacturer categories * * @package VirtueMart * @subpackage Manufacturer Categories * @author Patrick Kohl */ class VirtuemartViewManufacturercategories extends VmView { function display($tpl = null) { // Load the helper(s) if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); // get necessary model $model = VmModel::getModel(); $this->SetViewTitle('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.php 0000604 00000012311 15137247372 0026762 0 ustar 00 <?php /** * * Calc View * * @package VirtueMart * @subpackage Payment Method * @author Max Milbers * @author valérie isaksen * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 5601 2012-03-04 18:22:24Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * Description * * @package VirtueMart * @author valérie isaksen */ if (!class_exists('VirtueMartModelCurrency')) require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php'); class VirtuemartViewPaymentMethod extends VmView { function display($tpl = null) { // Load the helper(s) $this->addHelperPath(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='<select id="payment_jplugin_id" name="payment_jplugin_id" style= "width: 300px;">'; if(!class_exists('JParameter')) require(JPATH_VM_LIBRARIES.DS.'joomla'.DS.'html'.DS.'parameter.php' ); foreach($result as $paym){ $params = new JParameter($paym['params']); if($paym[$ext_id]==$selected) $checked='selected="selected"'; else $checked=''; // Get plugin info $pType = $params->getValue('pType'); if($pType=='Y' || $pType=='C') $id = 'pam_type_CC_on'; else $id='pam_type_CC_off'; $listHTML .= '<option id="'.$id.'" '.$checked.' value="'.$paym[$ext_id].'">'.JText::_($paym['name']).'</option>'; } $listHTML .= '</select>'; return $listHTML; } } // pure php not tag home/academiac/www/administrator/components/com_virtuemart/views/ratings/view.html.php 0000604 00000010031 15137251124 0025536 0 ustar 00 <?php /** * * Description * * @package VirtueMart * @subpackage ratings * @author * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6219 2012-07-04 16:10:42Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for ratings (and customer reviews) * */ class VirtuemartViewRatings extends VmView { public $max_rating; function display($tpl = null) { $mainframe = Jfactory::getApplication(); $option = JRequest::getWord('option'); //Load helpers if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); /* Get the review IDs to retrieve (input variable may be cid, cid[] or virtuemart_rating_review_id */ $cids = JRequest::getVar('cid', 0); if (empty($cids)) { $cids= JRequest::getVar('virtuemart_rating_review_id',0); } if ($cids && !is_array($cids)) $cids = array($cids); jimport( 'joomla.utilities.arrayhelper' ); JArrayHelper::toInteger($cids); // Figure out maximum rating scale (default is 5 stars) $this->max_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 home/academiac/www/administrator/components/com_virtuemart/views/inventory/view.html.php 0000604 00000005633 15137277044 0026151 0 ustar 00 <?php /** * * Description * * @package VirtueMart * @subpackage * @author * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 5972 2012-04-30 14:44:24Z electrocity $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for the VirtueMart Component * * @package VirtueMart * @author */ class VirtuemartViewInventory extends VmView { function display($tpl = null) { //Load helpers if (!class_exists('CurrencyDisplay')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'); if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); // Get the data $model = VmModel::getModel('product'); // Create filter $this->addStandardDefaultViewLists($model); $inventorylist = $model->getProductListing(false,false); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); // Apply currency $currencydisplay = CurrencyDisplay::getInstance(); foreach ($inventorylist as $virtuemart_product_id => $product) { //TODO oculd be interesting to show the price for each product, and all stored ones $product->product_in_stock $product->product_instock_value = $currencydisplay->priceDisplay($product->product_price,'',$product->product_in_stock,false); $product->product_price_display = $currencydisplay->priceDisplay($product->product_price,'',1,false); $product->weigth_unit_display= ShopFunctions::renderWeightUnit($product->product_weight_uom); } $this->assignRef('inventorylist', $inventorylist); $options = array(); $options[] = JHTML::_('select.option', '', JText::_('COM_VIRTUEMART_DISPLAY_STOCK').':'); $options[] = JHTML::_('select.option', 'stocklow', JText::_('COM_VIRTUEMART_STOCK_LEVEL_LOW')); $options[] = JHTML::_('select.option', 'stockout', JText::_('COM_VIRTUEMART_STOCK_LEVEL_OUT')); $this->lists['stockfilter'] = JHTML::_('select.genericlist', $options, 'search_type', 'onChange="document.adminForm.submit(); return false;"', 'value', 'text', JRequest::getVar('search_type')); $this->lists['filter_product'] = JRequest::getVar('filter_product'); // $this->assignRef('lists', $lists); /* Toolbar */ $this->SetViewTitle('PRODUCT_INVENTORY'); JToolBarHelper::publish(); JToolBarHelper::unpublish(); parent::display($tpl); } } // pure php no closing tag home/academiac/www/administrator/components/com_joomlaupdate/views/update/view.html.php 0000644 00000004010 15137277177 0025657 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_joomlaupdate * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @since 2.5.4 */ defined('_JEXEC') or die; /** * Joomla! Update's Update View * * @package Joomla.Administrator * @subpackage com_installer * @since 2.5.4 */ class JoomlaupdateViewUpdate extends JViewLegacy { /** * Renders the view * * @param string $tpl Template name * * @return void */ public function display($tpl=null) { $password = JFactory::getApplication()->getUserState('com_joomlaupdate.password', null); $filesize = JFactory::getApplication()->getUserState('com_joomlaupdate.filesize', null); $ajaxUrl = JURI::base().'components/com_joomlaupdate/restore.php'; $returnUrl = 'index.php?option=com_joomlaupdate&task=update.finalise'; // Set the toolbar information JToolBarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install'); // Add toolbar buttons if (JFactory::getUser()->authorise('core.admin', 'com_joomlaupdate')) { JToolbarHelper::preferences('com_joomlaupdate'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE'); // Load mooTools JHtml::_('behavior.framework', true); $updateScript = <<<ENDSCRIPT var joomlaupdate_password = '$password'; var joomlaupdate_totalsize = '$filesize'; var joomlaupdate_ajax_url = '$ajaxUrl'; var joomlaupdate_return_url = '$returnUrl'; ENDSCRIPT; // Load our Javascript $document = JFactory::getDocument(); $document->addScript('../media/com_joomlaupdate/json2.js'); $document->addScript('../media/com_joomlaupdate/encryption.js'); $document->addScript('../media/com_joomlaupdate/update.js'); JHtml::_('script', 'system/progressbar.js', true, true); JHtml::_('stylesheet', 'media/mediamanager.css', array(), true); $document->addScriptDeclaration($updateScript); // Render the view parent::display($tpl); } } home/academiac/www/administrator/components/com_sociallogin/views/sociallogin/view.html.php 0000604 00000004462 15137320261 0026505 0 ustar 00 <?php /** * @package SocialLogin * @copyright Copyright 2012 http://www.oneall.com - All rights reserved. * @license GNU/GPL 2 or later * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at 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. * * The "GNU General Public License" (GPL) is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * */ defined ('_JEXEC') or die ('Restricted access'); jimport ('joomla.application.component.view'); /** * SocialLogin View */ class SocialLoginViewSocialLogin extends JView { //Config public $settings; public $providers; /** * SocialLogin - Display administration area * @return void */ public function display ($tpl = null) { //Require settings require_once(JPATH_BASE . '/components/com_sociallogin/assets/cfg.php'); //Build document $document = JFactory::getDocument (); $document->addStyleSheet ('components/com_sociallogin/assets/css/sociallogin.css'); $document->addScript ('components/com_sociallogin/assets/js/jquery.js'); $document->addScript ('components/com_sociallogin/assets/js/sociallogin.js'); //Read settings $model = $this->getModel (); $this->settings = $model->getSettings (); //Read providers $this->providers = $social_login_providers; //Build page $this->form = $this->get ('Form'); $this->addToolbar (); // Display the template parent::display ($tpl); } /** * SocialLogin - Add Toolbar * @return void */ protected function addToolbar () { JRequest::setVar ('hidemainmenu', false); JToolBarHelper::title (JText::_ ('Social Login Configuration'), 'weblinks.png'); JToolBarHelper::apply ('apply'); } } home/academiac/www/administrator/components/com_virtuemart/views/userfields/view.html.php 0000604 00000031643 15137321535 0026254 0 ustar 00 <?php /** * * List/add/edit/remove Userfields * * @package VirtueMart * @subpackage Userfields * @author Oscar van Eijk * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6386 2012-08-29 11:29:26Z alatak $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); jimport('joomla.version'); /** * HTML View class for maintaining the list of order types * * @package VirtueMart * @subpackage Userfields * @author Oscar van Eijk */ class VirtuemartViewUserfields extends VmView { function display($tpl = null) { VmConfig::loadJLang('com_virtuemart_shoppers',TRUE); $option = JRequest::getCmd( 'option'); $mainframe = JFactory::getApplication() ; if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); $layoutName = JRequest::getWord('layout', 'default'); $model = VmModel::getModel(); // The list of fields which can't be toggled //$lists['coreFields']= array( 'name','username', 'email', 'password', 'password2' ); $lists['coreFields'] = $model->getCoreFields(); if ($layoutName == 'edit') { $editor = JFactory::getEditor(); $userField = $model->getUserfield(); $this->SetViewTitle('USERFIELD',$userField->name ); $this->assignRef('viewName',$viewName); $userFieldPlugin = ''; if ($userField->virtuemart_userfield_id < 1) { // Insert new userfield $this->assignRef('ordering', JText::_('COM_VIRTUEMART_NEW_ITEMS_PLACE')); $userFieldValues = array(); $attribs = ''; $lists['type'] = JHTML::_('select.genericlist', $this->_getTypes(), 'type', $attribs, 'type', 'text', $userField->type); } else { // Update existing userfield // Ordering dropdown $qry = 'SELECT ordering AS value, name AS text' . ' FROM #__virtuemart_userfields' . ' ORDER BY ordering'; $ordering = JHTML::_('list.specificordering', $userField, $userField->virtuemart_userfield_id, $qry); $this->assignRef('ordering', $ordering); $userFieldValues = $model->getUserfieldValues(); $lists['type'] = $this->_getTypes($userField->type) . '<input id="type" type="hidden" name="type" value="'.$userField->type.'" />'; if (strpos($userField->type, 'plugin') !==false) $userFieldPlugin = self::renderUserfieldPlugin(substr($userField->type, 6),$userField); } $this->assignRef('userFieldPlugin', $userFieldPlugin); JToolBarHelper::divider(); JToolBarHelper::save(); JToolBarHelper::apply(); JToolBarHelper::cancel(); $notoggle = (in_array($userField->name, $lists['coreFields']) ? 'class="readonly"' : ''); // Vendor selection if(Vmconfig::get('multix','none')!=='none'){ $lists['vendors']= ShopFunctions::renderVendorList($userField->virtuemart_vendor_id); } // Shopper groups for EU VAT Id $shoppergroup_model = VmModel::getModel('shoppergroup'); $shoppergroup_list = $shoppergroup_model->getShopperGroups(true); array_unshift($shoppergroup_list,'0'); $lists['shoppergroups'] = JHTML::_('select.genericlist', $shoppergroup_list, 'virtuemart_shoppergroup_id', '', 'virtuemart_shoppergroup_id', 'shopper_group_name', $model->_params->get('virtuemart_shoppergroup_id')); // Minimum age select $ages = array(); for ($i = 13; $i <= 25; $i++) { $ages[] = array('key' => $i, 'value' => $i.' '.JText::_('COM_VIRTUEMART_YEAR_S')); } $lists['minimum_age'] = JHTML::_('select.genericlist', $ages, 'minimum_age', '', 'key', 'value', $model->_params->get('minimum_age', 18)); // Web address types $webaddress_types = array( array('key' => 0, 'value' => JText::_('COM_VIRTUEMART_USERFIELDS_URL_ONLY')) ,array('key' => 2, 'value' => JText::_('COM_VIRTUEMART_USERFIELDS_HYPERTEXT_URL')) ); $lists['webaddresstypes'] = JHTML::_('select.genericlist', $webaddress_types, 'webaddresstype', '', 'key', 'value', $model->_params->get('webaddresstype')); // Userfield values if (($n = count($userFieldValues)) < 1) { $lists['userfield_values'] = '<tr>' .'<td><input type="text" value="" name="vValues[0]" /></td>' .'<td><input type="text" size="50" value="" name="vNames[0]" /></td>' .'</tr>'; $i = 1; } else { $lists['userfield_values'] = ''; $lang =JFactory::getLanguage(); for ($i = 0; $i < $n; $i++) { $translate= $lang->hasKey($userFieldValues[$i]->fieldtitle) ? " (".JText::_($userFieldValues[$i]->fieldtitle).")" : ""; $lists['userfield_values'] .= '<tr>' .'<td><input type="text" value="'.$userFieldValues[$i]->fieldvalue.'" name="vValues['.$i.']" /></td>' .'<td><input type="text" size="50" value="'.$userFieldValues[$i]->fieldtitle.'" name="vNames['.$i.']" />'.$translate.'<input type="button" class="button deleteRow" value=" - " /></td>' .'</tr>'; } } $this->assignRef('valueCount', --$i); // Toggles $lists['required'] = VmHTML::row('booleanlist','COM_VIRTUEMART_FIELDMANAGER_REQUIRED','required',$userField->required,$notoggle); $lists['published'] = VmHTML::row('booleanlist','COM_VIRTUEMART_PUBLISHED','published',$userField->published,$notoggle); $lists['registration'] = VmHTML::row('booleanlist','COM_VIRTUEMART_FIELDMANAGER_SHOW_ON_REGISTRATION','registration',$userField->registration,$notoggle); $lists['shipment'] = VmHTML::row('booleanlist','COM_VIRTUEMART_FIELDMANAGER_SHOW_ON_SHIPPING','shipment',$userField->shipment,$notoggle); $lists['account'] = VmHTML::row('booleanlist','COM_VIRTUEMART_FIELDMANAGER_SHOW_ON_ACCOUNT','account',$userField->account,$notoggle); $lists['readonly'] = VmHTML::row('booleanlist','COM_VIRTUEMART_USERFIELDS_READONLY','readonly',$userField->readonly,$notoggle); $this->assignRef('lists', $lists); $this->assignRef('userField', $userField); $this->assignRef('userFieldValues', $userFieldValues); $this->assignRef('editor', $editor); } else { JToolBarHelper::title( JText::_('COM_VIRTUEMART_MANAGE_USER_FIELDS'),'vm_user_48 head'); JToolBarHelper::addNewX(); JToolBarHelper::editListX(); JToolBarHelper::divider(); JToolBarHelper::custom('toggle.required.1', 'publish','','COM_VIRTUEMART_FIELDMANAGER_REQUIRE'); JToolBarHelper::custom('toggle.required.0', 'unpublish','','COM_VIRTUEMART_FIELDMANAGER_UNREQUIRE'); JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); JToolBarHelper::divider(); $barText = JText::_('COM_VIRTUEMART_FIELDMANAGER_SHOW_HIDE'); $bar= JToolBar::getInstance( 'toolbar' ); $bar->appendButton( 'Separator', '"><span class="bartext">'.$barText.'</span><hr style="display: none;' ); //$bar->appendButton( 'publish', 'upload', $alt, '', 550, 400 ); JToolBarHelper::custom('toggle.registration.1', 'publish','','COM_VIRTUEMART_FIELDMANAGER_SHOW_REGISTRATION'); JToolBarHelper::custom('toggle.registration.0', 'unpublish','','COM_VIRTUEMART_FIELDMANAGER_HIDE_REGISTRATION'); JToolBarHelper::custom('toggle.shipment.1', 'publish','','COM_VIRTUEMART_FIELDMANAGER_SHOW_SHIPPING'); JToolBarHelper::custom('toggle.shipment.0', 'unpublish','','COM_VIRTUEMART_FIELDMANAGER_HIDE_SHIPPING'); JToolBarHelper::custom('toggle.account.1', 'publish','','COM_VIRTUEMART_FIELDMANAGER_SHOW_ACCOUNT'); JToolBarHelper::custom('toggle.account.0', 'unpublish','','COM_VIRTUEMART_FIELDMANAGER_HIDE_ACCOUNT'); JToolBarHelper::divider(); JToolBarHelper::deleteList(); $this->addStandardDefaultViewLists($model,'ordering','ASC'); $userfieldsList = $model->getUserfieldsList(); $this->assignRef('userfieldsList', $userfieldsList); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); // search filter $search = $mainframe->getUserStateFromRequest( $option.'search', 'search', '', 'string'); $search = JString::strtolower( $search ); $this->lists['search']= $search; } $this->lists['coreFields'] = $lists['coreFields']; parent::display($tpl); } /** * Additional grid function for custom toggles * * @return string HTML code to write the toggle button */ function toggle( $field, $i, $toggle, $untoggleable = false, $imgY = 'tick.png', $imgX = 'publish_x.png', $prefix='' ){ $img = $field ? $imgY : $imgX; if ($toggle == 'published') { // Stay compatible with grid.published $task = $field ? 'unpublish' : 'publish'; $alt = $field ? JText::_('COM_VIRTUEMART_PUBLISHED') : JText::_('COM_VIRTUEMART_UNPUBLISHED'); $action = $field ? JText::_('COM_VIRTUEMART_UNPUBLISH_ITEM') : JText::_('COM_VIRTUEMART_PUBLISH_ITEM'); } else { $task = $field ? $toggle.'.0' : $toggle.'.1'; $alt = $field ? JText::_('COM_VIRTUEMART_ENABLED') : JText::_('COM_VIRTUEMART_DISABLED'); $action = $field ? JText::_('COM_VIRTUEMART_DISABLE_ITEM') : JText::_('COM_VIRTUEMART_ENABLE_ITEM'); } if (JVM_VERSION>1) { $img = 'admin/' . $img; } if ($untoggleable) { $attribs='style="opacity: 0.6;"'; } else { $attribs=''; } $retImgSrc = JHTML::_('image.administrator', $img, '/images/', null, null, $alt, $attribs); if ($untoggleable) { return ($retImgSrc); } else { return ('<a href="javascript:void(0);" onclick="return listItemTask(\'cb'. $i .'\',\''. $task .'\')" title="'. $action .'">' .$retImgSrc. '</a>'); } } /** * Create an array with userfield types and the visible text in the format expected by the Joomla select class * * @param string $value If not null, the type of which the text should be returned * @return mixed array or string */ function _getTypes ($value = null) { $types = array( array('type' => 'text' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_TEXTFIELD')) ,array('type' => 'checkbox' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_CHECKBOX_SINGLE')) ,array('type' => 'multicheckbox' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_CHECKBOX_MULTIPLE')) ,array('type' => 'date' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_DATE')) ,array('type' => 'age_verification' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_AGEVERIFICATION')) ,array('type' => 'select' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_DROPDOWN_SINGLE')) ,array('type' => 'multiselect' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_DROPDOWN_MULTIPLE')) ,array('type' => 'emailaddress' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_EMAIL')) // ,array('type' => 'euvatid' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_EUVATID')) ,array('type' => 'editorta' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_EDITORAREA')) ,array('type' => 'textarea' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_TEXTAREA')) ,array('type' => 'radio' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_RADIOBUTTON')) ,array('type' => 'webaddress' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_WEBADDRESS')) ,array('type' => 'delimiter' , 'text' => JText::_('COM_VIRTUEMART_FIELDS_DELIMITER')) ); $this->renderInstalledUserfieldPlugins($types); if ($value === null) { return $types; } else { foreach ($types as $type) { if ($type['type'] == $value) { return $type['text']; } return $value; } } } function renderUserfieldPlugin($element, $params){ $db = JFactory::getDBO(); if (JVM_VERSION===1) { $table = '#__plugins'; $jelement = 'element'; } else { $table = '#__extensions'; $jelement = 'element'; } $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `' . $jelement . '` = "'.$element.'"'; $db ->setQuery($q); $this->plugin = $db ->loadObject(); if (!class_exists('vmParameters')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php'); $parameters = new vmParameters($params, $this->plugin->element , 'plugin' ,'vmuserfield'); $lang = JFactory::getLanguage(); $filename = 'plg_vmuserfield_' . $this->plugin->element; $lang->load($filename, JPATH_ADMINISTRATOR); return $parameters->render(); } function renderInstalledUserfieldPlugins(&$plugins){ if ( JVM_VERSION===1) { $table = '#__plugins'; $ext_id = 'id'; $enable = 'published'; } else { $table = '#__extensions'; $ext_id = 'extension_id'; $enable = 'enabled'; } $db = JFactory::getDBO(); $q = 'SELECT * FROM `'.$table.'` WHERE `folder` = "vmuserfield" AND `'.$enable.'`="1" '; $db->setQuery($q); $userfieldplugins = $db->loadAssocList($ext_id); if(empty($userfieldplugins)){ return; } foreach($userfieldplugins as $userfieldplugin){ $plugins[] = array('type' => 'plugin'.$userfieldplugin['element'], 'text' => $userfieldplugin['name']); } return; } } //No Closing Tag home/academiac/www/administrator/components/com_unitehcarousel/views/slider/view.html.php 0000604 00000004474 15137326274 0026230 0 ustar 00 <?php /** * @package Unite Horizontal Carousel for Joomla 1.7-2.5 * @author UniteCMS.net * @copyright (C) 2012 Unite CMS, All Rights Reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die( 'Restricted access' ); jimport('joomla.application.component.view'); class UniteHCarouselViewSlider extends JMasterViewHCar { protected $form; protected $item; protected $state; protected $isNew = true; protected $sap_counter = 0; /** * * add toolbars */ protected function addToolbar(){ $title = JText::_('COM_UNITEHCAROUSEL')." - "; if($this->isNew) $title .= '<small>[ ' . JText::_( 'COM_UNITEHCAROUSEL_NEW' ).' ]</small>'; else $title .= $this->item->title." <small>[".JText::_("COM_UNITEHCAROUSEL_EDIT_SETTINGS")."]</small>"; JToolBarHelper::title($title , 'generic.png' ); if ($this->isNew){ // For new records, check the create permission. JToolBarHelper::apply('slider.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('slider.save', 'JTOOLBAR_SAVE'); JToolBarHelper::custom('slider.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); JToolBarHelper::cancel('slider.cancel', 'JTOOLBAR_CANCEL'); } else { JToolBarHelper::apply('slider.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('slider.save', 'JTOOLBAR_SAVE'); //JToolBarHelper::custom('slider.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); JToolBarHelper::cancel('slider.cancel', 'JTOOLBAR_CANCEL'); } } /** * the main disply function */ public function display($tpl = null) { // Initialiase variables. $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->isNew = ($this->item->id == 0); if($this->_layout == "default" || $this->_layout == "edit"){ if($this->isNew == false){ $this->linkEditSlides = HelperUniteHCar::getViewUrl_Items($this->item->id); } } // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } } home/academiac/www/administrator/components/com_unitehcarousel/views/sliders/view.html.php 0000604 00000003240 15137330217 0026371 0 ustar 00 <?php /** * @package Unite Horizontal Carousel for Joomla 1.7-2.5 * @author UniteCMS.net * @copyright (C) 2012 Unite CMS, All Rights Reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die( 'Restricted access' ); jimport('joomla.application.component.view'); class UniteHCarouselViewSliders extends JMasterViewHCar { protected $items; protected $pagination; protected $state; public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } /** * * add toolbar */ protected function addToolbar() { $title = JText::_('COM_UNITEHCAROUSEL'). " - ". JText::_('COM_UNITEHCAROUSEL_SLIDERS'); JToolBarHelper::title($title , 'generic.png'); JToolBarHelper::addNew('slider.add','JTOOLBAR_NEW'); JToolBarHelper::editList('slider.edit','JTOOLBAR_EDIT'); JToolBarHelper::deleteList('COM_UNITEHCAROUSEL_SLIDER_APPROVE_DELETE', 'sliders.delete','JTOOLBAR_DELETE'); JToolBarHelper::divider(); JToolBarHelper::custom('sliders.publish', 'publish.png', 'publish_f2.png','JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('sliders.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); //JToolBarHelper::divider(); //JToolBarHelper::preferences('com_unitehcarousel', 300, 600); } } home/academiac/www/administrator/components/com_virtuemart/views/usergroups/view.html.php 0000604 00000003546 15137331257 0026330 0 ustar 00 <?php /** * * Extensions View * * @package VirtueMart * @subpackage Extensions * @author StephanieS * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 5601 2012-03-04 18:22:24Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for maintaining the list of extensions * * @package VirtueMart * @subpackage Extensions * @author Max Milbers */ class VirtuemartViewUsergroups extends VmView { function display( $tpl = null ){ if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); $model = VmModel::getModel(); // TODO icon for this view $this->SetViewTitle(); $layoutName = JRequest::getWord('layout', 'default'); if ($layoutName == 'edit') { $usergroup = $model->getUsergroup(); $this->assignRef('usergroup', $usergroup); $this->addStandardEditViewCommands(); } else { $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model); $ugroups = $model->getUsergroups(false,true); $this->assignRef('usergroups', $ugroups); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } parent::display($tpl); } } // pure php no closing tag home/academiac/www/administrator/components/com_virtuemart/views/shoppergroup/view.html.php 0000604 00000004773 15137335103 0026644 0 ustar 00 <?php /** * * Shopper group View * * @package VirtueMart * @subpackage ShopperGroup * @author Markus �hler * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6373 2012-08-24 10:41:03Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for maintaining the list of shopper groups * * @package VirtueMart * @subpackage ShopperGroup * @author Markus �hler */ class VirtuemartViewShopperGroup extends VmView { function display($tpl = null) { // Load the helper(s) if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'html.php'); // $this->assignRef('perms', Permissions::getInstance()); $model = VmModel::getModel(); $layoutName = $this->getLayout(); $task = JRequest::getWord('task',$layoutName); $this->assignRef('task', $task); if ($layoutName == 'edit') { //For shoppergroup specific price display VmConfig::loadJLang('com_virtuemart_config'); $shoppergroup = $model->getShopperGroup(); $this->SetViewTitle('SHOPPERGROUP',$shoppergroup->shopper_group_name); $vendors = ShopFunctions::renderVendorList($shoppergroup->virtuemart_vendor_id); $this->assignRef('vendorList', $vendors); $this->assignRef('shoppergroup', $shoppergroup); $this->addStandardEditViewCommands(); } else { $this->SetViewTitle(); JToolBarHelper::makeDefault(); if(!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'permissions.php'); $showVendors = Permissions::getInstance()->check('admin'); $this->assignRef('showVendors',$showVendors); $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model); $shoppergroups = $model->getShopperGroups(false, true); $this->assignRef('shoppergroups', $shoppergroups); $pagination = $model->getPagination(); $this->assignRef('sgrppagination', $pagination); } parent::display($tpl); } } // pure php no closing tag home/academiac/www/administrator/components/com_admirorgallery/views/admirorgallery/view.html.php 0000604 00000002326 15137335516 0027737 0 ustar 00 <?php /*------------------------------------------------------------------------ # com_admirorgallery - Admiror Gallery Component # ------------------------------------------------------------------------ # author Igor Kekeljevic & Nikola Vasiljevski # copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.admiror-design-studio.com/joomla-extensions # Technical Support: Forum - http://www.vasiljevski.com/forum/index.php # Version: 4.5.0 -------------------------------------------------------------------------*/ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class AdmirorgalleryViewAdmirorgallery extends JView { protected $item; protected $form; protected $state; function display($tpl = null) { $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); JToolBarHelper::title( JText::_( 'COM_ADMIRORGALLERY_CONTROL_PANEL'), 'controlpanel' ); $this->form = $this->get('Form'); parent::display($tpl); } } home/academiac/www/administrator/components/com_admirorgallery/views/button/view.html.php 0000604 00000001551 15137341666 0026237 0 ustar 00 <?php /*------------------------------------------------------------------------ # com_admirorgallery - Admiror Gallery Component # ------------------------------------------------------------------------ # author Igor Kekeljevic & Nikola Vasiljevski # copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.admiror-design-studio.com/joomla-extensions # Technical Support: Forum - http://www.vasiljevski.com/forum/index.php # Version: 4.5.0 -------------------------------------------------------------------------*/ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class AdmirorgalleryViewButton extends JView { function display($tpl = null) { parent::display($tpl); } } home/academiac/www/components/com_xmap/views/html/view.html.php 0000604 00000011014 15137343112 0020717 0 ustar 00 <?php /** * @version $Id$ * @copyright Copyright (C) 2005 - 2009 Joomla! Vargas. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Guillermo Vargas (guille@vargas.co.cr) */ // No direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.application.component.view'); # For compatibility with older versions of Joola 2.5 if (!class_exists('JViewLegacy')){ class JViewLegacy extends JView { } } /** * HTML Site map View class for the Xmap component * * @package Xmap * @subpackage com_xmap * @since 2.0 */ class XmapViewHtml extends JViewLegacy { protected $state; protected $print; function display($tpl = null) { // Initialise variables. $this->app = JFactory::getApplication(); $this->user = JFactory::getUser(); $doc = JFactory::getDocument(); // Get view related request variables. $this->print = JRequest::getBool('print'); // Get model data. $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->items = $this->get('Items'); $this->canEdit = JFactory::getUser()->authorise('core.admin', 'com_xmap'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } $this->extensions = $this->get('Extensions'); // Add router helpers. $this->item->slug = $this->item->alias ? ($this->item->id . ':' . $this->item->alias) : $this->item->id; $this->item->rlink = JRoute::_('index.php?option=com_xmap&view=html&id=' . $this->item->slug); // Create a shortcut to the paramemters. $params = &$this->state->params; $offset = $this->state->get('page.offset'); if ($params->get('include_css', 0)){ $doc->addStyleSheet(JURI::root().'components/com_xmap/assets/css/xmap.css'); } // If a guest user, they may be able to log in to view the full article // TODO: Does this satisfy the show not auth setting? if (!$this->item->params->get('access-view')) { if ($user->get('guest')) { // Redirect to login $uri = JFactory::getURI(); $app->redirect( 'index.php?option=com_users&view=login&return=' . base64_encode($uri), JText::_('Xmap_Error_Login_to_view_sitemap') ); return; } else { JError::raiseWarning(403, JText::_('Xmap_Error_Not_auth')); return; } } // Override the layout. if ($layout = $params->get('layout')) { $this->setLayout($layout); } // Load the class used to display the sitemap $this->loadTemplate('class'); $this->displayer = new XmapHtmlDisplayer($params, $this->item); $this->displayer->setJView($this); $this->displayer->canEdit = $this->canEdit; $this->_prepareDocument(); parent::display($tpl); $model = $this->getModel(); $model->hit($this->displayer->getCount()); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $pathway = $app->getPathway(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself if ($menu = $menus->getActive()) { if (isset($menu->query['view']) && isset($menu->query['id'])) { if ($menu->query['view'] == 'html' && $menu->query['id'] == $this->item->id) { $menuParams = new JRegistry($menu->params); $title = $menuParams->get('page_title'); $this->document->setDescription($menuParams->get('menu-meta_description')); $this->document->setMetadata('keywords', $menuParams->get('menu-meta_keywords')); } } } if (empty($title)) { $title = $this->item->title; } $this->document->setTitle($title); if ($app->getCfg('MetaTitle') == '1') { $this->document->setMetaData('title', $this->item->title); } if ($this->print) { $this->document->setMetaData('robots', 'noindex, nofollow'); } } } home/academiac/www/administrator/components/com_admirorgallery/views/imagemanager/view.html.php 0000604 00000004003 15137343523 0027326 0 ustar 00 <?php /*------------------------------------------------------------------------ # com_admirorgallery - Admiror Gallery Component # ------------------------------------------------------------------------ # author Igor Kekeljevic & Nikola Vasiljevski # copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.admiror-design-studio.com/joomla-extensions # Technical Support: Forum - http://www.vasiljevski.com/forum/index.php # Version: 4.5.0 -------------------------------------------------------------------------*/ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class AdmirorgalleryViewImagemanager extends JView { function display($tpl = null) { JToolBarHelper::title( JText::_( 'COM_ADMIRORGALLERY_IMAGE_MANAGER' ), 'imagemanager' ); parent::display($tpl); } function _renderBreadcrumb($ag_itemURL, $ag_rootFolder, $ag_folderName, $ag_fileName) { $ag_breadcrumb=''; $ag_breadcrumb_link=''; if($ag_rootFolder!=$ag_itemURL && !empty($ag_itemURL)){ $ag_breadcrumb.='<a href="'.$ag_rootFolder.'" class="AG_folderLink AG_common_button"><span><span>'.substr($ag_rootFolder,0,-1).'</span></span></a>/'; $ag_breadcrumb_link.=$ag_rootFolder; $ag_breadcrumb_cut=substr($ag_folderName,strlen($ag_rootFolder)); $ag_breadcrumb_cut_array=explode("/",$ag_breadcrumb_cut); if(!empty($ag_breadcrumb_cut_array[0])){ foreach($ag_breadcrumb_cut_array as $cut_key => $cut_value){ $ag_breadcrumb_link.=$cut_value.'/'; $ag_breadcrumb.='<a href="'.$ag_breadcrumb_link.'" class="AG_folderLink AG_common_button"><span><span>'.$cut_value.'</span></span></a>/'; } } $ag_breadcrumb.=$ag_fileName; }else{ $ag_breadcrumb.=$ag_rootFolder; } return $ag_breadcrumb; } } home/academiac/www/administrator/components/com_admirorgallery/views/resourcemanager/view.html.php 0000604 00000002066 15137344000 0030071 0 ustar 00 <?php /*------------------------------------------------------------------------ # com_admirorgallery - Admiror Gallery Component # ------------------------------------------------------------------------ # author Igor Kekeljevic & Nikola Vasiljevski # copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.admiror-design-studio.com/joomla-extensions # Technical Support: Forum - http://www.vasiljevski.com/forum/index.php # Version: 4.5.0 -------------------------------------------------------------------------*/ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class AdmirorgalleryViewResourcemanager extends JView { function display($tpl = null) { $AG_resourceType = JRequest::getVar( 'AG_resourceType' );// Current resource type JToolBarHelper::title( JText::_( 'COM_ADMIRORGALLERY_'.strtoupper($AG_resourceType)), $AG_resourceType); parent::display($tpl); } } home/academiac/www/administrator/components/com_virtuemart/views/product/view.html.php 0000604 00000050710 15137355032 0025562 0 ustar 00 <?php /** * * View class for the product * * @package VirtueMart * @subpackage * @author * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6543 2012-10-16 06:41:27Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); /** * HTML View class for the VirtueMart Component * * @package VirtueMart * @author RolandD,Max Milbers */ if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); class VirtuemartViewProduct extends VmView { function display($tpl = null) { // Get the task $task = JRequest::getWord('task',$this->getLayout()); vmdebug('VirtuemartViewProduct '.$task); $this->assignRef('task', $task); // Load helpers if (!class_exists('CurrencyDisplay')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'); if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); if (!class_exists('VmImage')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php'); $model = VmModel::getModel(); // Handle any publish/unpublish switch ($task) { case 'add': case 'edit': //this was in the controller for the edit tasks, we need this for the access by FE $this->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'views'.DS.'product'.DS.'tmpl'); VmConfig::loadJLang('com_virtuemart_orders',TRUE); VmConfig::loadJLang('com_virtuemart_shoppers',TRUE); $virtuemart_product_id = JRequest::getVar('virtuemart_product_id', 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; } $product = $model->getProductSingle($virtuemart_product_id,false); //$product_parent= $model->getProductParent($product->product_parent_id); $product_parent= $model->getProductSingle($product->product_parent_id,false); $mf_model = VmModel::getModel('manufacturer'); $manufacturers = $mf_model->getManufacturerDropdown($product->virtuemart_manufacturer_id); $this->assignRef('manufacturers', $manufacturers); // Get the category tree if (isset($product->categories)) $category_tree = ShopFunctions::categoryListTree($product->categories); else $category_tree = ShopFunctions::categoryListTree(); $this->assignRef('category_tree', $category_tree); //Fallback for categories inherited by parent to correctly calculate the prices if(empty($product->categories) and !empty($product_parent->categories)){ $product->categories = $product_parent->categories; } //Get the shoppergoup list - Cleanshooter Custom Shopper Visibility if (isset($product->shoppergroups)) $shoppergroupList = ShopFunctions::renderShopperGroupList($product->shoppergroups); $this->assignRef('shoppergroupList', $shoppergroupList); // Load the product price if(!class_exists('calculationHelper')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'calculationh.php'); $product_childIds = $model->getProductChildIds($virtuemart_product_id); $product_childs = array(); foreach($product_childIds as $id){ $product_childs[] = $model->getProductSingle($id,false); } $this->assignRef('product_childs', $product_childs); if(!class_exists('VirtueMartModelConfig')) require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'config.php'); $productLayouts = VirtueMartModelConfig::getLayoutList('productdetails'); $this->assignRef('productLayouts', $productLayouts); // Load Images $model->addImages($product); if(!class_exists('shopFunctionsF'))require(JPATH_VM_SITE.DS.'helpers'.DS.'shopfunctionsf.php'); $vmtemplate = shopFunctionsF::loadVmTemplateStyle(); if(is_Dir(JPATH_ROOT.DS.'templates'.DS.$vmtemplate.DS.'images'.DS.'availability'.DS)){ $imagePath = '/templates/'.$vmtemplate.'/images/availability/'; } else { $imagePath = '/components/com_virtuemart/assets/images/availability/'; } $this->assignRef('imagePath', $imagePath); // Load the vendors $vendor_model = VmModel::getModel('vendor'); if(Vmconfig::get('multix','none')!=='none'){ $lists['vendors'] = Shopfunctions::renderVendorList($product->virtuemart_vendor_id); } // Load the currencies $currency_model = VmModel::getModel('currency'); if(!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'permissions.php'); $vendor_model->setId(Permissions::getInstance()->isSuperVendor()); $vendor = $vendor_model->getVendor(); if(empty($product->product_currency)){ $product->product_currency = $vendor->vendor_currency; } //$currencies = JHTML::_('select.genericlist', $currency_model->getCurrencies(), 'product_currency', '', 'virtuemart_currency_id', 'currency_name', $product->product_currency); $currency = $currency_model->getCurrency($product->product_currency); $this->assignRef('product_currency', $currency->currency_symbol); $currency = $currency_model->getCurrency($vendor->vendor_currency); $this->assignRef('vendor_currency', $currency->currency_symbol); if(count($manufacturers)>0 ){ $lists['manufacturers'] = JHTML::_('select.genericlist', $manufacturers, 'virtuemart_manufacturer_id', 'class="inputbox"', 'value', 'text', $product->virtuemart_manufacturer_id ); } if(!empty($product->product_weight_uom)){ // or !$task=='add' $product_weight_uom = $product->product_weight_uom; $product_unit = $product->product_unit; $product_lwh_uom = $product->product_lwh_uom; } else if(!empty($product_parent)){ $product_weight_uom = $product_parent->product_weight_uom; $product_unit = $product_parent->product_unit; $product_lwh_uom = $product_parent->product_lwh_uom; } else { $product_weight_uom = VmConfig::get('weight_unit_default'); $product_unit = VmConfig::get('weight_unit_default'); $product_lwh_uom= VmConfig::get('lwh_unit_default'); } $lists['product_weight_uom'] = ShopFunctions::renderWeightUnitList('product_weight_uom',$product_weight_uom); $lists['product_iso_uom'] = ShopFunctions::renderUnitIsoList('product_unit',$product_unit); $lists['product_lwh_uom'] = ShopFunctions::renderLWHUnitList('product_lwh_uom', $product_lwh_uom); if( empty( $product->product_available_date )) { $product->product_available_date = date("Y-m-d") ; } $waitinglistmodel = VmModel::getModel('waitinglist'); /* Load waiting list */ if ($product->virtuemart_product_id) { //$waitinglist = $this->get('waitingusers', 'waitinglist'); $waitinglist = $waitinglistmodel->getWaitingusers($product->virtuemart_product_id); $this->assignRef('waitinglist', $waitinglist); } $productShoppers = $model->getProductShoppersByStatus($product->virtuemart_product_id,array('S') ); $this->assignRef('productShoppers', $productShoppers); $orderstatusModel = VmModel::getModel('orderstatus'); $lists['OrderStatus'] = $orderstatusModel->renderOSList(array(),'order_status',TRUE); $field_model = VmModel::getModel('customfields'); $fieldTypes = $field_model->getField_types(); $this->assignRef('fieldTypes', $fieldTypes); // Add the virtuemart_shoppergroup_ids $cid = JFactory::getUser()->id; $this->activeShoppergroups = shopfunctions::renderGuiList('virtuemart_shoppergroup_id','#__virtuemart_vmuser_shoppergroups','virtuemart_user_id',$cid,'shopper_group_name','#__virtuemart_shoppergroups','virtuemart_shoppergroup_id','category', 4, 0); if(!$this->activeShoppergroups or (is_array($this->activeShoppergroups) and count($this->activeShoppergroups)==0)){ //vmdebug('$this->activeShoppergroups',$this->activeShoppergroups); $shoppergroupModel = VmModel::getModel('shoppergroup'); $this->activeShoppergroups = vmText::_($shoppergroupModel->getDefault(0)->shopper_group_name); } /* Load protocustom lists */ $customsList = $field_model->getCustomsList(); $attribs='style= "width: 300px;"'; $customlist = JHTML::_('select.genericlist', $customsList,'customlist', $attribs); $this->assignRef('customsList', $customlist); $ChildCustomRelation = $field_model->getProductChildCustomRelation(); $this->assignRef('ChildCustomRelation',$ChildCustomRelation); if ($product->product_parent_id > 0) { $parentRelation= $field_model->getProductParentRelation($product->virtuemart_product_id); $this->assignRef('parentRelation',$parentRelation); // Set up labels $info_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_ITEM_INFO_LBL'); $status_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_ITEM_STATUS_LBL'); $dim_weight_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_ITEM_DIM_WEIGHT_LBL'); $images_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_ITEM_IMAGES_LBL'); $delete_message = JText::_('COM_VIRTUEMART_PRODUCT_FORM_DELETE_ITEM_MSG'); } else { if ($task == 'add') $action = JText::_('COM_VIRTUEMART_PRODUCT_FORM_NEW_PRODUCT_LBL'); else $action = JText::_('COM_VIRTUEMART_PRODUCT_FORM_UPDATE_ITEM_LBL'); $info_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_PRODUCT_INFO_LBL'); $status_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_PRODUCT_STATUS_LBL'); $dim_weight_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_PRODUCT_DIM_WEIGHT_LBL'); $images_label = JText::_('COM_VIRTUEMART_PRODUCT_FORM_PRODUCT_IMAGES_LBL'); $delete_message = JText::_('COM_VIRTUEMART_PRODUCT_FORM_DELETE_PRODUCT_MSG'); } $this->assignRef('product', $product); $product_empty_price = array( 'virtuemart_product_price_id' => 0 , 'virtuemart_product_id' => $virtuemart_product_id , 'virtuemart_shoppergroup_id' => NULL , 'product_price' => NULL , 'override' => NULL , 'product_override_price' => NULL , 'product_tax_id' => NULL , 'product_discount_id' => NULL , 'product_currency' => $vendor->vendor_currency , 'product_price_publish_up' => NULL , 'product_price_publish_down' => NULL , 'price_quantity_start' => NULL , 'price_quantity_end' => NULL ); $this->assignRef ('product_empty_price', $product_empty_price); $this->assignRef('product_parent', $product_parent); /* Assign label values */ $this->assignRef('action', $action); $this->assignRef('info_label', $info_label); $this->assignRef('status_label', $status_label); $this->assignRef('dim_weight_label', $dim_weight_label); $this->assignRef('images_label', $images_label); $this->assignRef('delete_message', $delete_message); $this->assignRef('lists', $lists); // Toolbar if ($product->product_sku) $sku=' ('.$product->product_sku.')'; else $sku=""; if (!empty($product->canonCatLink)) $canonLink = '&virtuemart_category_id=' . $product->canonCatLink; else $canonLink = ''; if(!empty($product->virtuemart_product_id)){ if (!class_exists ('shopFunctionsF')) require(JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php'); $menuItemID = shopFunctionsF::getMenuItemId(JFactory::getLanguage()->getTag()); $text = '<a href="'.juri::root().'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.$canonLink.'&Itemid='. $menuItemID .'" target="_blank" >'. $product->product_name.$sku.'<span class="vm2-modallink"></span></a>'; } else { $text = $product->product_name.$sku; } $this->SetViewTitle('PRODUCT',$text); $this->addStandardEditViewCommands ($product->virtuemart_product_id); break; case 'massxref_cats': case 'massxref_cats_exe': $this->SetViewTitle('PRODUCT_MASSXREF'); if(!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'permissions.php'); $showVendors = Permissions::getInstance()->check('admin'); $this->assignRef('showVendors',$showVendors); $keyWord =''; $catmodel = VmModel::getModel('category'); $this->assignRef('catmodel', $catmodel); //$this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($catmodel,'category_name'); $categories = $catmodel->getCategoryTree(0,0,false,$this->lists['search']); $this->assignRef('categories', $categories); $catpagination = $catmodel->getPagination(); $this->assignRef('catpagination', $catpagination); //$this->addStandardDefaultViewCommands(); $this->setLayout('massxref'); JToolBarHelper::custom('massxref_cats_exe', 'new', 'new', JText::_('COM_VIRTUEMART_PRODUCT_XREF_CAT_EXE'), false); break; case 'massxref_sgrps': case 'massxref_sgrps_exe': $sgrpmodel = VmModel::getModel('shoppergroup'); $this->addStandardDefaultViewLists($sgrpmodel); $shoppergroups = $sgrpmodel->getShopperGroups(false, true); $this->assignRef('shoppergroups', $shoppergroups); $sgrppagination = $sgrpmodel->getPagination(); $this->assignRef('sgrppagination', $sgrppagination); $this->setLayout('massxref'); JToolBarHelper::custom('massxref_sgrps_exe', 'new', 'new', JText::_('COM_VIRTUEMART_PRODUCT_XREF_SGRPS_EXE'), false); break; default: if ($product_parent_id=JRequest::getInt('product_parent_id',false) ) { $product_parent= $model->getProductSingle($product_parent_id,false); if($product_parent){ $title='PRODUCT_CHILDREN_LIST' ; $link_to_parent = JHTML::_('link', JRoute::_('index.php?view=product&task=edit&virtuemart_product_id='.$product_parent->virtuemart_product_id.'&option=com_virtuemart'), $product_parent->product_name, array('title' => JText::_('COM_VIRTUEMART_EDIT_PARENT').' '.$product_parent->product_name)); $msg= JText::_('COM_VIRTUEMART_PRODUCT_OF'). " ".$link_to_parent; } else { $title='PRODUCT_CHILDREN_LIST' ; $msg= 'Parent with product_parent_id '.$product_parent_id.' not found'; } } else { $title='PRODUCT'; $msg=""; } $this->db = JFactory::getDBO(); $this->SetViewTitle($title, $msg ); $this->addStandardDefaultViewLists($model,'created_on'); /* Get the list of products */ $productlist = $model->getProductListing(false,false,false,false,true); //The pagination must now always set AFTER the model load the listing $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); /* Get the category tree */ $categoryId = $model->virtuemart_category_id; //OSP switched to filter in model, was JRequest::getInt('virtuemart_category_id'); $category_tree = ShopFunctions::categoryListTree(array($categoryId)); $this->assignRef('category_tree', $category_tree); /* Load the product price */ if(!class_exists('calculationHelper')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'calculationh.php'); $vendor_model = VmModel::getModel('vendor'); $productreviews = VmModel::getModel('ratings'); foreach ($productlist as $virtuemart_product_id => $product) { $product->mediaitems = count($product->virtuemart_media_id); $product->reviews = $productreviews->countReviewsForProduct($product->virtuemart_product_id); $vendor_model->setId($product->virtuemart_vendor_id); $vendor = $vendor_model->getVendor(); $currencyDisplay = CurrencyDisplay::getInstance($vendor->vendor_currency,$vendor->virtuemart_vendor_id); if(!empty($product->product_price) && !empty($product->product_currency) ){ $product->product_price_display = $currencyDisplay->priceDisplay($product->product_price,(int)$product->product_currency,1,true); } /* Write the first 5 categories in the list */ $product->categoriesList = shopfunctions::renderGuiList('virtuemart_category_id','#__virtuemart_product_categories','virtuemart_product_id',$product->virtuemart_product_id,'category_name','#__virtuemart_categories','virtuemart_category_id','category'); } $mf_model = VmModel::getModel('manufacturer'); $manufacturers = $mf_model->getManufacturerDropdown(); $this->assignRef('manufacturers', $manufacturers); /* add Search filter in lists*/ /* Search type */ $options = array( '' => JText::_('COM_VIRTUEMART_LIST_EMPTY_OPTION'), 'parent' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_PARENT_PRODUCT'), 'product' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRODUCT'), 'price' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRICE'), 'withoutprice' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_WITHOUTPRICE') ); $this->lists['search_type'] = VmHTML::selectList('search_type', JRequest::getVar('search_type'),$options); /* Search order */ $options = array( 'bf' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_BEFORE'), 'af' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_AFTER') ); $this->lists['search_order'] = VmHTML::selectList('search_order', JRequest::getVar('search_order'),$options); // Toolbar JToolBarHelper::custom('massxref_cats', 'new', 'new', JText::_('COM_VIRTUEMART_PRODUCT_XREF_CAT'), true); JToolBarHelper::custom('massxref_sgrps', 'new', 'new', JText::_('COM_VIRTUEMART_PRODUCT_XREF_SGRPS'), true); JToolBarHelper::custom('createchild', 'new', 'new', JText::_('COM_VIRTUEMART_PRODUCT_CHILD'), true); JToolBarHelper::custom('cloneproduct', 'copy', 'copy', JText::_('COM_VIRTUEMART_PRODUCT_CLONE'), true); JToolBarHelper::custom('addrating', 'default', '', JText::_('COM_VIRTUEMART_ADD_RATING'), true); $this->addStandardDefaultViewCommands(); $this->assignRef('productlist', $productlist); $this->assignRef('virtuemart_category_id', $categoryId); $this->assignRef('model', $model); break; } parent::display($tpl); } /** * This is wrong *@deprecated */ function renderMail() { $this->setLayout('mail_html_waitlist'); $this->subject = JText::sprintf('COM_VIRTUEMART_PRODUCT_WAITING_LIST_EMAIL_SUBJECT', $this->productName); $notice_body = JText::sprintf('COM_VIRTUEMART_PRODUCT_WAITING_LIST_EMAIL_BODY', $this->productName, $this->url); parent::display(); } /** * Renders the list for the discount rules * * @author Max Milbers */ function renderDiscountList($selected,$name='product_discount_id'){ if(!class_exists('VirtueMartModelCalc')) require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'calc.php'); $discounts = VirtueMartModelCalc::getDiscounts(); $discountrates = array(); $discountrates[] = JHTML::_('select.option', '-1', JText::_('COM_VIRTUEMART_PRODUCT_DISCOUNT_NONE'), 'product_discount_id' ); $discountrates[] = JHTML::_('select.option', '0', JText::_('COM_VIRTUEMART_PRODUCT_DISCOUNT_NO_SPECIAL'), 'product_discount_id' ); // $discountrates[] = JHTML::_('select.option', 'override', JText::_('COM_VIRTUEMART_PRODUCT_DISCOUNT_OVERRIDE'), 'product_discount_id'); foreach($discounts as $discount){ $discountrates[] = JHTML::_('select.option', $discount->virtuemart_calc_id, $discount->calc_name, 'product_discount_id'); } $listHTML = JHTML::_('Select.genericlist', $discountrates, $name, '', 'product_discount_id', 'text', $selected ); return $listHTML; } static function displayLinkToChildList($product_id, $product_name) { $db = JFactory::getDBO(); $db->setQuery(' SELECT COUNT( * ) FROM `#__virtuemart_products` WHERE `product_parent_id` ='.$product_id); if ($result = $db->loadResult()){ $result = JText::sprintf('COM_VIRTUEMART_X_CHILD_PRODUCT', $result); echo JHTML::_('link', JRoute::_('index.php?view=product&product_parent_id='.$product_id.'&option=com_virtuemart'), $result, array('title' => JText::sprintf('COM_VIRTUEMART_PRODUCT_LIST_X_CHILDREN',$product_name) )); } } static function displayLinkToParent($product_parent_id) { $db = JFactory::getDBO(); $db->setQuery(' SELECT * FROM `#__virtuemart_products_'.VMLANG.'` as l JOIN `#__virtuemart_products` using (`virtuemart_product_id`) WHERE `virtuemart_product_id` = '.$product_parent_id); if ($parent = $db->loadObject()){ $result = JText::sprintf('COM_VIRTUEMART_LIST_CHILDREN_FROM_PARENT', $parent->product_name); echo JHTML::_('link', JRoute::_('index.php?view=product&product_parent_id='.$product_parent_id.'&option=com_virtuemart'), $parent->product_name, array('title' => $result)); } } } //pure php no closing tag home/academiac/www/administrator/components/com_admirorgallery/views/galleryname/view.html.php 0000604 00000001556 15137364136 0027226 0 ustar 00 <?php /*------------------------------------------------------------------------ # com_admirorgallery - Admiror Gallery Component # ------------------------------------------------------------------------ # author Igor Kekeljevic & Nikola Vasiljevski # copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.admiror-design-studio.com/joomla-extensions # Technical Support: Forum - http://www.vasiljevski.com/forum/index.php # Version: 4.5.0 -------------------------------------------------------------------------*/ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class AdmirorgalleryViewGalleryname extends JView { function display($tpl = null) { parent::display($tpl); } } home/academiac/www/administrator/components/com_joomlaupdate/views/default/view.html.php 0000644 00000003213 15137364357 0026022 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_joomlaupdate * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @since 2.5.4 */ defined('_JEXEC') or die; /** * Joomla! Update's Default View * * @package Joomla.Administrator * @subpackage com_installer * @since 2.5.4 */ class JoomlaupdateViewDefault extends JViewLegacy { /** * Renders the view * * @param string $tpl Template name * * @return void * * @since 2.5.4 */ public function display($tpl=null) { // Get data from the model $this->state = $this->get('State'); // Load useful classes $model = $this->getModel(); $this->loadHelper('select'); // Assign view variables $ftp = $model->getFTPOptions(); $this->assign('updateInfo', $model->getUpdateInformation()); $this->assign('methodSelect', JoomlaupdateHelperSelect::getMethods($ftp['enabled'])); // Set the toolbar information JToolBarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install'); // Add toolbar buttons if (JFactory::getUser()->authorise('core.admin', 'com_joomlaupdate')) { JToolbarHelper::preferences('com_joomlaupdate'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE'); // Load mooTools JHtml::_('behavior.framework', true); // Load our Javascript $document = JFactory::getDocument(); $document->addScript('../media/com_joomlaupdate/default.js'); JHtml::_('stylesheet', 'media/mediamanager.css', array(), true); // Render the view parent::display($tpl); } } home/academiac/www/administrator/components/com_categories/views/category/view.html.php 0000644 00000011633 15137364725 0025660 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Categories component * * @static * @package Joomla.Administrator * @subpackage com_categories */ class CategoriesViewCategory extends JViewLegacy { protected $form; protected $item; protected $state; /** * Display the view */ public function display($tpl = null) { $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->canDo = CategoriesHelper::getActions($this->state->get('category.component')); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } parent::display($tpl); JRequest::setVar('hidemainmenu', true); $this->addToolbar(); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { // Initialise variables. $extension = JRequest::getCmd('extension'); $user = JFactory::getUser(); $userId = $user->get('id'); $isNew = ($this->item->id == 0); $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId); // Avoid nonsense situation. if ($extension == 'com_categories') { return; } // The extension can be in the form com_foo.section $parts = explode('.', $extension); $component = $parts[0]; $section = (count($parts) > 1) ? $parts[1] : null; // 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, $this->item->id); // If a component categories title string is present, let's use it. if ($lang->hasKey($component_title_key = $component.($section?"_$section":'').'_CATEGORY_'.($isNew?'ADD':'EDIT').'_TITLE')) { $title = JText::_($component_title_key); } // Else if the component section string exits, let's use it elseif ($lang->hasKey($component_section_key = $component.($section?"_$section":''))) { $title = JText::sprintf( 'COM_CATEGORIES_CATEGORY_'.($isNew?'ADD':'EDIT').'_TITLE', $this->escape(JText::_($component_section_key))); } // Else use the base title else { $title = JText::_('COM_CATEGORIES_CATEGORY_BASE_'.($isNew?'ADD':'EDIT').'_TITLE'); } // Load specific css component JHtml::_('stylesheet', $component.'/administrator/categories.css', array(), true); // Prepare the toolbar. JToolBarHelper::title($title, 'category-'.($isNew?'add':'edit').' '.substr($component, 4).($section?"-$section":'').'-category-'.($isNew?'add':'edit')); // For new records, check the create permission. if ($isNew && (count($user->getAuthorisedCategories($component, 'core.create')) > 0)) { JToolBarHelper::apply('category.apply'); JToolBarHelper::save('category.save'); JToolBarHelper::save2new('category.save2new'); } // If not checked out, can save the item. elseif (!$checkedOut && ($canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_user_id == $userId))) { JToolBarHelper::apply('category.apply'); JToolBarHelper::save('category.save'); if ($canDo->get('core.create')) { JToolBarHelper::save2new('category.save2new'); } } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::save2copy('category.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('category.cancel'); } else { JToolBarHelper::cancel('category.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); // Compute the ref_key if it does exist in the component if (!$lang->hasKey($ref_key = strtoupper($component.($section?"_$section":'')).'_CATEGORY_'.($isNew?'ADD':'EDIT').'_HELP_KEY')) { $ref_key = 'JHELP_COMPONENTS_'.strtoupper(substr($component, 4).($section?"_$section":'')).'_CATEGORY_'.($isNew?'ADD':'EDIT'); } // Get help for the category/section 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, $component); } } home/academiac/www/administrator/components/com_virtuemart/views/log/view.html.php 0000604 00000003623 15137375544 0024676 0 ustar 00 <?php /** * * List/edit/remove Log Files * * @package VirtueMart * @subpackage Log * @author Valérie Isaksen * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6307 2012-08-07 07:39:45Z alatak $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if (!class_exists('VmView')) { require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'vmview.php'); } /** * HTML View class for log files * * @package VirtueMart * @subpackage Log * @author Valérie isaksen */ class VirtuemartViewLog extends VmView { function display ($tpl = null) { // Load the helper(s) jimport('joomla.filesystem.file'); $config = JFactory::getConfig(); $log_path = $config->get('log_path', JPATH_ROOT . "/log"); $layoutName = JRequest::getWord('layout', 'default'); VmConfig::loadJLang('com_virtuemart_log'); if ($layoutName == 'edit') { $logFile = JRequest::getString('logfile', ''); $this->SetViewTitle('LOG', $logFile); $fileContent = file_get_contents($log_path . DS . $logFile); $fileContentByLine = explode("\n", $fileContent); $this->assignRef('fileContentByLine', $fileContentByLine); JToolBarHelper::cancel(); } else { $logFiles = JFolder::files($log_path, $filter = '.', true, false, array('index.html')); $this->SetViewTitle('LOG'); $this->assignRef('logFiles', $logFiles); $this->assignRef('path', $log_path); } parent::display($tpl); } } //No Closing Tag home/academiac/www/administrator/components/com_languages/views/languages/view.html.php 0000644 00000004432 15137377235 0025631 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML Languages View class for the Languages component * * @package Joomla.Administrator * @subpackage com_languages * @since 1.6 */ class LanguagesViewLanguages extends JViewLegacy { protected $items; protected $pagination; protected $state; /** * Display the view */ function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } parent::display($tpl); $this->addToolbar(); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT.'/helpers/languages.php'; $canDo = LanguagesHelper::getActions(); JToolBarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'langmanager.png'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('language.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('language.edit'); JToolBarHelper::divider(); } if ($canDo->get('core.edit.state')) { if ($this->state->get('filter.published') != 2) { JToolBarHelper::publishList('languages.publish'); JToolBarHelper::unpublishList('languages.unpublish'); } } if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('languages.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { // Add install languages link to the lang installer component $bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Link', 'extension', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages'); JToolBarHelper::divider(); JToolBarHelper::preferences('com_languages'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT'); } } home/academiac/www/administrator/components/com_languages/views/overrides/view.html.php 0000644 00000004065 15137377464 0025673 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_languages * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View for language overrides list * * @package Joomla.Administrator * @subpackage com_languages * @since 2.5 */ class LanguagesViewOverrides extends JViewLegacy { /** * The items to list * * @var array * @since 2.5 */ protected $items; /** * The pagination object * * @var object * @since 2.5 */ protected $pagination; /** * The model state * * @var object * @since 2.5 */ protected $state; /** * Displays the view * * @param string $tpl The name of the template file to parse * * @return void * * @since 2.5 */ function display($tpl = null) { // Get data from the model $this->state = $this->get('State'); $this->items = $this->get('Overrides'); $this->languages = $this->get('Languages'); $this->pagination = $this->get('Pagination'); // Check for errors if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors)); return; } $this->addToolbar(); parent::display($tpl); } /** * Adds the page title and toolbar * * @return void * * @since 2.5 */ protected function addToolbar() { // Get the results for each action $canDo = LanguagesHelper::getActions(); JToolBarHelper::title(JText::_('COM_LANGUAGES_VIEW_OVERRIDES_TITLE'), 'langmanager'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('override.add'); } if ($canDo->get('core.edit') && $this->pagination->total) { JToolbarHelper::editList('override.edit'); } if ($canDo->get('core.delete') && $this->pagination->total) { JToolbarHelper::deleteList('', 'overrides.delete'); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_languages'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES'); } } home/academiac/www/administrator/components/com_languages/views/installed/view.html.php 0000644 00000004234 15137377526 0025645 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Displays a list of the installed languages. * * @package Joomla.Administrator * @subpackage com_languages * @since 1.6 */ class LanguagesViewInstalled extends JViewLegacy { /** * @var object client object */ protected $client = null; /** * @var boolean|JExeption True, if FTP settings should be shown, or an exeption */ protected $ftp = null; /** * @var string option name */ protected $option = null; /** * @var object pagination information */ protected $pagination=null; /** * @var array languages information */ protected $rows=null; /** * @var object user object */ protected $user = null; /** * Display the view */ function display($tpl = null) { // Get data from the model $this->ftp = $this->get('Ftp'); $this->option = $this->get('Option'); $this->pagination = $this->get('Pagination'); $this->rows = $this->get('Data'); $this->state = $this->get('State'); $document = JFactory::getDocument(); $document->setBuffer($this->loadTemplate('navigation'), 'modules', 'submenu'); $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT.'/helpers/languages.php'; $canDo = LanguagesHelper::getActions(); JToolBarHelper::title(JText::_('COM_LANGUAGES_VIEW_INSTALLED_TITLE'), 'langmanager.png'); if ($canDo->get('core.edit.state')) { JToolBarHelper::makeDefault('installed.setDefault'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { // Add install languages link to the lang installer component $bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Link', 'extension', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages'); JToolBarHelper::divider(); JToolBarHelper::preferences('com_languages'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_INSTALLED'); } } home/academiac/www/administrator/components/com_virtuemart/views/shipmentmethod/view.html.php 0000604 00000007634 15137400743 0027141 0 ustar 00 <?php /** * * Shipment View * * @package VirtueMart * @subpackage Shipment * @author RickG * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6326 2012-08-08 14:14:28Z alatak $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for maintaining the list of shipment * * @package VirtueMart * @subpackage Shipment * @author RickG */ class VirtuemartViewShipmentmethod extends VmView { function display($tpl = null) { // Load the helper(s) $this->addHelperPath(JPATH_VM_ADMINISTRATOR.DS.'helpers'); if(!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'permissions.php'); if(!class_exists('vmPSPlugin')) require(JPATH_VM_PLUGINS.DS.'vmpsplugin.php'); if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); $model = VmModel::getModel(); $layoutName = JRequest::getWord('layout', 'default'); $this->SetViewTitle(); $layoutName = JRequest::getWord('layout', 'default'); if ($layoutName == 'edit') { $shipment = $model->getShipment(); 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'); if(!class_exists('VirtueMartModelVendor')) require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'vendor.php'); $vendor_id = 1; $currency=VirtueMartModelVendor::getVendorCurrency ($vendor_id); $this->assignRef('vendor_currency', $currency->currency_symbol); if(Vmconfig::get('multix','none')!=='none'){ $vendorList= ShopFunctions::renderVendorList($shipment->virtuemart_vendor_id); $this->assignRef('vendorList', $vendorList); } $this->assignRef('pluginList', self::renderInstalledShipmentPlugins($shipment->shipment_jplugin_id)); $this->assignRef('shipment', $shipment); $this->assignRef('shopperGroupList', ShopFunctions::renderShopperGroupList($shipment->virtuemart_shoppergroup_ids,true)); $this->addStandardEditViewCommands($shipment->virtuemart_shipmentmethod_id); } else { JToolBarHelper::custom('cloneshipment', 'copy', 'copy', JText::_('COM_VIRTUEMART_SHIPMENT_CLONE'), true); $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model); $shipments = $model->getShipments(); $this->assignRef('shipments', $shipments); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } parent::display($tpl); } function renderInstalledShipmentPlugins($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` = "vmshipment" AND `state`="0" 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_SHIPMENT_PLUGINS_INSTALLED')); } foreach ($result as &$sh) { $sh['name'] = JText::_($sh['name']); } $attribs='style= "width: 300px;"'; return JHtml::_('select.genericlist', $result, 'shipment_jplugin_id', $attribs, $ext_id, 'name', $selected); } } // pure php no closing tag home/academiac/www/administrator/components/com_weblinks/views/weblinks/view.html.php 0000644 00000004345 15137415221 0025340 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View class for a list of weblinks. * * @package Joomla.Administrator * @subpackage com_weblinks * @since 1.5 */ class WeblinksViewWeblinks extends JViewLegacy { protected $items; protected $pagination; protected $state; /** * Display the view */ public function display($tpl = null) { $this->state = $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; } $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT.'/helpers/weblinks.php'; $state = $this->get('State'); $canDo = WeblinksHelper::getActions($state->get('filter.category_id')); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINKS'), 'weblinks.png'); if (count($user->getAuthorisedCategories('com_weblinks', 'core.create')) > 0) { JToolBarHelper::addNew('weblink.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('weblink.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('weblinks.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('weblinks.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('weblinks.archive'); JToolBarHelper::checkin('weblinks.checkin'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'weblinks.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('weblinks.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_weblinks'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_COMPONENTS_WEBLINKS_LINKS'); } } home/academiac/www/administrator/components/com_weblinks/views/weblink/view.html.php 0000644 00000004267 15137415357 0025172 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View to edit a weblink. * * @package Joomla.Administrator * @subpackage com_weblinks * @since 1.5 */ class WeblinksViewWeblink extends JViewLegacy { protected $state; protected $item; protected $form; /** * Display the view */ public function display($tpl = null) { $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->get('id'); $isNew = ($this->item->id == 0); $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); // Since we don't track these assets at the item level, use the category id. $canDo = WeblinksHelper::getActions($this->item->catid, 0); JToolBarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINK'), 'weblinks.png'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit')||(count($user->getAuthorisedCategories('com_weblinks', 'core.create'))))) { JToolBarHelper::apply('weblink.apply'); JToolBarHelper::save('weblink.save'); } if (!$checkedOut && (count($user->getAuthorisedCategories('com_weblinks', 'core.create')))){ JToolBarHelper::save2new('weblink.save2new'); } // If an existing item, can save to a copy. if (!$isNew && (count($user->getAuthorisedCategories('com_weblinks', 'core.create')) > 0)) { JToolBarHelper::save2copy('weblink.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('weblink.cancel'); } else { JToolBarHelper::cancel('weblink.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_COMPONENTS_WEBLINKS_LINKS_EDIT'); } } home/academiac/www/components/com_users/views/remind/view.html.php 0000644 00000005067 15137417525 0021456 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_users * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Registration view class for Users. * * @package Joomla.Site * @subpackage com_users * @since 1.5 */ class UsersViewRemind extends JViewLegacy { protected $form; protected $params; protected $state; /** * Method to display the view. * * @param string $tpl The template file to include * @since 1.5 */ public function display($tpl = null) { // Get the view data. $this->form = $this->get('Form'); $this->state = $this->get('State'); $this->params = $this->state->params; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // Check for layout override $active = JFactory::getApplication()->getMenu()->getActive(); if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx')); $this->prepareDocument(); parent::display($tpl); } /** * Prepares the document. * * @since 1.6 */ protected function prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_USERS_REMIND')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/academiac/www/administrator/components/com_virtuemart/views/orderstatus/view.html.php 0000604 00000006305 15137436701 0026465 0 ustar 00 <?php /** * * List/add/edit/remove Order Status Types * * @package VirtueMart * @subpackage OrderStatus * @author Oscar van Eijk * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6307 2012-08-07 07:39:45Z alatak $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for maintaining the list of order types * * @package VirtueMart * @subpackage OrderStatus * @author Oscar van Eijk */ class VirtuemartViewOrderstatus extends VmView { function display($tpl = null) { // Load the helper(s) if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); $model = VmModel::getModel(); $layoutName = JRequest::getWord('layout', 'default'); // 'A' : sotck Available // 'O' : stock Out // 'R' : stock reserved $stockHandelList = array( 'A' => 'COM_VIRTUEMART_ORDER_STATUS_STOCK_AVAILABLE', 'R' => 'COM_VIRTUEMART_ORDER_STATUS_STOCK_RESERVED', 'O' => 'COM_VIRTUEMART_ORDER_STATUS_STOCK_OUT' ); if ($layoutName == 'edit') { $orderStatus = $model->getData(); $this->SetViewTitle('',JText::_($orderStatus->order_status_name) ); if ($orderStatus->virtuemart_orderstate_id < 1) { $this->assignRef('ordering', JText::_('COM_VIRTUEMART_NEW_ITEMS_PLACE')); } else { // Ordering dropdown $qry = 'SELECT ordering AS value, order_status_name AS text' . ' FROM #__virtuemart_orderstates' . ' ORDER BY ordering'; $ordering = JHTML::_('list.specificordering', $orderStatus, $orderStatus->virtuemart_orderstate_id, $qry); $this->assignRef('ordering', $ordering); } $lists['vmCoreStatusCode'] = $model->getVMCoreStatusCode(); $this->assignRef('stockHandelList', $stockHandelList); // Vendor selection $vendor_model = VmModel::getModel('vendor'); $vendor_list = $vendor_model->getVendors(); $lists['vendors'] = JHTML::_('select.genericlist', $vendor_list, 'virtuemart_vendor_id', '', 'virtuemart_vendor_id', 'vendor_name', $orderStatus->virtuemart_vendor_id); $this->assignRef('orderStatus', $orderStatus); $this->assignRef('lists', $lists); $this->addStandardEditViewCommands(); } else { $this->SetViewTitle(''); $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model); $this->lists['vmCoreStatusCode'] = $model->getVMCoreStatusCode(); $orderStatusList = $model->getOrderStatusList(); $this->assignRef('orderStatusList', $orderStatusList); $this->assignRef('stockHandelList', $stockHandelList); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } parent::display($tpl); } } //No Closing Tag home/academiac/www/administrator/components/com_virtuemart/views/currency/view.html.php 0000604 00000004225 15137452140 0025732 0 ustar 00 <?php /** * * Currency View * * @package VirtueMart * @subpackage Currency * @author RickG * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6043 2012-05-21 21:40:56Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); /** * HTML View class for maintaining the list of currencies * * @package VirtueMart * @subpackage Currency * @author RickG, Max Milbers */ class VirtuemartViewCurrency extends VmView { function display($tpl = null) { // Load the helper(s) if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); $model = VmModel::getModel(); $config = JFactory::getConfig(); $layoutName = JRequest::getWord('layout', 'default'); if ($layoutName == 'edit') { $cid = JRequest::getVar( 'cid' ); $task = JRequest::getWord('task', 'add'); //JArrayHelper::toInteger($cid); if($task!='add' && !empty($cid) && !empty($cid[0])){ $cid = (int)$cid[0]; } else { $cid = 0; } $model->setId($cid); $currency = $model->getCurrency(); $this->SetViewTitle('',$currency->currency_name); $this->assignRef('currency', $currency); $this->addStandardEditViewCommands(); } else { $this->SetViewTitle(); $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model,0,'ASC'); $currencies = $model->getCurrenciesList(JRequest::getWord('search', false)); $this->assignRef('currencies', $currencies); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } parent::display($tpl); } } // pure php no closing tag home/academiac/www/administrator/components/com_virtuemart/views/category/view.html.php 0000604 00000010424 15137461607 0025723 0 ustar 00 <?php /** * * Category View * * @package VirtueMart * @subpackage Category * @author RickG, jseros * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2011 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6475 2012-09-21 11:54:21Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); jimport('joomla.html.pane'); /** * HTML View class for maintaining the list of categories * * @package VirtueMart * @subpackage Category * @author RickG, jseros */ class VirtuemartViewCategory extends VmView { function display($tpl = null) { if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); if (!class_exists ('shopFunctionsF')) require(JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php'); $model = VmModel::getModel(); $layoutName = $this->getLayout(); $task = JRequest::getWord('task',$layoutName); $this->assignRef('task', $task); if(!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'permissions.php'); $perms = Permissions::getInstance(); $this->assignRef('perms', $perms); if ($layoutName == 'edit') { $category = $model->getCategory('',false); // Toolbar $text=''; if (isset($category->category_name)) $name = $category->category_name; else $name =''; if(!empty($category->virtuemart_category_id)){ $text = '<a href="'.juri::root().'index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$category->virtuemart_category_id.'" target="_blank" >'. $name.'<span class="vm2-modallink"></span></a>'; } $this->SetViewTitle('CATEGORY',$text); $model->addImages($category); if ( $category->virtuemart_category_id > 1 ) { $relationInfo = $model->getRelationInfo( $category->virtuemart_category_id ); $this->assignRef('relationInfo', $relationInfo); } $parent = $model->getParentCategory( $category->virtuemart_category_id ); $this->assignRef('parent', $parent); if(!class_exists('ShopFunctions'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'shopfunctions.php'); $templateList = ShopFunctions::renderTemplateList(JText::_('COM_VIRTUEMART_CATEGORY_TEMPLATE_DEFAULT')); $this->assignRef('jTemplateList', $templateList); if(!class_exists('VirtueMartModelConfig'))require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'config.php'); $categoryLayoutList = VirtueMartModelConfig::getLayoutList('category'); $this->assignRef('categoryLayouts', $categoryLayoutList); $productLayouts = VirtueMartModelConfig::getLayoutList('productdetails'); $this->assignRef('productLayouts', $productLayouts); //Nice fix by Joe, the 4. param prevents setting an category itself as child $categorylist = ShopFunctions::categoryListTree(array($parent->virtuemart_category_id), 0, 0, (array) $category->virtuemart_category_id); if(Vmconfig::get('multix','none')!=='none'){ $vendorList= ShopFunctions::renderVendorList($category->virtuemart_vendor_id,false); $this->assignRef('vendorList', $vendorList); } $this->assignRef('category', $category); $this->assignRef('categorylist', $categorylist); $this->addStandardEditViewCommands($category->virtuemart_category_id,$category); } else { $this->SetViewTitle('CATEGORY_S'); $keyWord =''; $this->assignRef('catmodel', $model); $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model,'category_name'); $categories = $model->getCategoryTree(0,0,false,$this->lists['search']); $this->assignRef('categories', $categories); $pagination = $model->getPagination(); $this->assignRef('catpagination', $pagination); //we need a function of the FE shopfunctions helper to cut the category descriptions jimport('joomla.filter.output'); } parent::display($tpl); } } // pure php no closing tag home/academiac/www/administrator/components/com_admin/views/sysinfo/view.html.php 0000644 00000003342 15137464334 0024473 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Sysinfo View class for the Admin component * * @package Joomla.Administrator * @subpackage com_admin * @since 1.6 */ class AdminViewSysinfo extends JViewLegacy { /** * @var array some php settings */ protected $php_settings=null; /** * @var array config values */ protected $config=null; /** * @var array somme system values */ protected $info=null; /** * @var string php info */ protected $php_info=null; /** * @var array informations about writable state of directories */ protected $directory=null; /** * Display the view */ function display($tpl = null) { // Access check. if (!JFactory::getUser()->authorise('core.admin')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } // Initialise variables. $this->php_settings = $this->get('PhpSettings'); $this->config = $this->get('config'); $this->info = $this->get('info'); $this->php_info = $this->get('PhpInfo'); $this->directory = $this->get('directory'); $this->addToolbar(); $this->_setSubMenu(); parent::display($tpl); } /** * Setup the SubMenu * * @since 1.6 */ protected function _setSubMenu() { $contents = $this->loadTemplate('navigation'); $document = JFactory::getDocument(); $document->setBuffer($contents, 'modules', 'submenu'); } /** * Setup the Toolbar * * @since 1.6 */ protected function addToolbar() { JToolBarHelper::title(JText::_('COM_ADMIN_SYSTEM_INFORMATION'), 'systeminfo.png'); JToolBarHelper::help('JHELP_SITE_SYSTEM_INFORMATION'); } } home/academiac/www/administrator/components/com_virtuemart/views/config/view.html.php 0000604 00000013125 15137500375 0025350 0 ustar 00 <?php /** * * Description * * @package VirtueMart * @subpackage Config * @author RickG * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6299 2012-07-25 22:53:11Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmview.php'); jimport('joomla.html.pane'); jimport('joomla.version'); /** * HTML View class for the configuration maintenance * * @package VirtueMart * @subpackage Config * @author RickG */ class VirtuemartViewConfig extends VmView { function display($tpl = null) { if (!class_exists('VmImage')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php'); if (!class_exists('VmHTML')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php'); $model = VmModel::getModel(); $usermodel = VmModel::getModel('user'); JToolBarHelper::title( JText::_('COM_VIRTUEMART_CONFIG') , 'head vm_config_48'); $this->addStandardEditViewCommands(); $config = VmConfig::loadConfig(); if(!empty($config->_params)){ unset ($config->_params['pdf_invoice']); // parameter remove and replaced by inv_os } $this->assignRef('config', $config); $mainframe = JFactory::getApplication(); $this->assignRef('joomlaconfig', $mainframe); $userparams = JComponentHelper::getParams('com_users'); $this->assignRef('userparams', $userparams); $templateList = ShopFunctions::renderTemplateList(JText::_('COM_VIRTUEMART_ADMIN_CFG_JOOMLA_TEMPLATE_DEFAULT')); $this->assignRef('jTemplateList', $templateList); $vmLayoutList = $model->getLayoutList('virtuemart'); $this->assignRef('vmLayoutList', $vmLayoutList); $categoryLayoutList = $model->getLayoutList('category'); $this->assignRef('categoryLayoutList', $categoryLayoutList); $productLayoutList = $model->getLayoutList('productdetails'); $this->assignRef('productLayoutList', $productLayoutList); $noimagelist = $model->getNoImageList(); $this->assignRef('noimagelist', $noimagelist); $orderStatusModel=VmModel::getModel('orderstatus'); $this->assignRef('orderStatusModel', $orderStatusModel); $currConverterList = $model->getCurrencyConverterList(); $this->assignRef('currConverterList', $currConverterList); $moduleList = $model->getModuleList(); $this->assignRef('moduleList', $moduleList); $activeLanguages = $model->getActiveLanguages( VmConfig::get('active_languages') ); $this->assignRef('activeLanguages', $activeLanguages); $orderByFieldsProduct = $model->getProductFilterFields('browse_orderby_fields'); $this->assignRef('orderByFieldsProduct', $orderByFieldsProduct); VmModel::getModel('category'); foreach (VirtueMartModelCategory::$_validOrderingFields as $key => $field ) { if($field=='c.category_shared') continue; $fieldWithoutPrefix = $field; $dotps = strrpos($fieldWithoutPrefix, '.'); if($dotps!==false){ $prefix = substr($field, 0,$dotps+1); $fieldWithoutPrefix = substr($field, $dotps+1); } $text = JText::_('COM_VIRTUEMART_'.strtoupper($fieldWithoutPrefix)) ; $orderByFieldsCat[] = JHTML::_('select.option', $field, $text) ; } //$orderByFieldsCat = $model->get; $this->assignRef('orderByFieldsCat', $orderByFieldsCat); $searchFields = $model->getProductFilterFields( 'browse_search_fields'); $this->assignRef('searchFields', $searchFields); $aclGroups = $usermodel->getAclGroupIndentedTree(); $this->assignRef('aclGroups', $aclGroups); if(!class_exists('shopFunctionsF'))require(JPATH_VM_SITE.DS.'helpers'.DS.'shopfunctionsf.php'); $vmtemplate = shopFunctionsF::loadVmTemplateStyle(); if(is_Dir(JPATH_ROOT.DS.'templates'.DS.$vmtemplate.DS.'images'.DS.'availability'.DS)){ $imagePath = '/templates/'.$vmtemplate.'/images/availability/'; } else { $imagePath = '/components/com_virtuemart/assets/images/availability/'; } $this->assignRef('imagePath', $imagePath); shopFunctions::checkSafePath(); $this -> checkVmUserVendor(); parent::display($tpl); } private function checkVmUserVendor(){ $db = JFactory::getDBO(); $multix = Vmconfig::get('multix','none'); $q = 'select * from #__virtuemart_vmusers where user_is_vendor = 1';// and virtuemart_vendor_id '.$vendorWhere.' limit 1'; $db->setQuery($q); $r = $db->loadAssocList(); if (empty($r)){ vmWarn('Your Virtuemart installation contains an error: No user as marked as vendor. Please fix this in your phpMyAdmin and set #__virtuemart_vmusers.user_is_vendor = 1 and #__virtuemart_vmusers.virtuemart_vendor_id = 1 to one of your administrator users. Please update all users to be associated with virtuemart_vendor_id 1.'); } else { if($multix=='none' and count($r)!=1){ vmWarn('You are using single vendor mode, but it seems more than one user is set as vendor'); } foreach($r as $entry){ if(empty($entry['virtuemart_vendor_id'])){ vmWarn('The user with virtuemart_user_id = '.$entry['virtuemart_user_id'].' is set as vendor, but has no referencing vendorId.'); } } } } } // pure php no closing tag home/academiac/www/administrator/components/com_languages/views/multilangstatus/view.html.php 0000644 00000002020 15137501356 0027103 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Displays the multilang status. * * @package Joomla.Administrator * @subpackage com_languages * @since 1.7.1 */ class LanguagesViewMultilangstatus extends JViewLegacy { /** * Display the view */ function display($tpl = null) { require_once JPATH_COMPONENT . '/helpers/multilangstatus.php'; $this->homes = multilangstatusHelper::getHomes(); $this->language_filter = JLanguageMultilang::isEnabled(); $this->switchers = multilangstatusHelper::getLangswitchers(); $this->listUsersError = multilangstatusHelper::getContacts(); $this->contentlangs = multilangstatusHelper::getContentlangs(); $this->site_langs = multilangstatusHelper::getSitelangs(); $this->statuses = multilangstatusHelper::getStatus(); $this->homepages = multilangstatusHelper::getHomepages(); parent::display($tpl); } } home/academiac/www/components/com_users/views/registration/view.html.php 0000644 00000005174 15137504030 0022675 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_users * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Registration view class for Users. * * @package Joomla.Site * @subpackage com_users * @since 1.6 */ class UsersViewRegistration extends JViewLegacy { protected $data; protected $form; protected $params; protected $state; /** * Method to display the view. * * @param string The template file to include * @since 1.6 */ public function display($tpl = null) { // Get the view data. $this->data = $this->get('Data'); $this->form = $this->get('Form'); $this->state = $this->get('State'); $this->params = $this->state->get('params'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // Check for layout override $active = JFactory::getApplication()->getMenu()->getActive(); if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx')); $this->prepareDocument(); parent::display($tpl); } /** * Prepares the document. * * @since 1.6 */ protected function prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_USERS_REGISTRATION')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/academiac/www/administrator/components/com_unitehcarousel/views/items/view.html.php 0000604 00000004262 15137505117 0026055 0 ustar 00 <?php /** * @package Unite Horizontal Carousel for Joomla 1.7-2.5 * @author UniteCMS.net * @copyright (C) 2012 Unite CMS, All Rights Reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die( 'Restricted access' ); jimport('joomla.application.component.view'); class UniteHCarouselViewItems extends JMasterViewHCar { protected $items; protected $pagination; protected $state; protected $arrSliders; protected $linkSliderSettings; protected $sliderID; public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->arrSliders = $this->get("ArrSliders"); $this->sliderID = $this->get("SliderID"); $this->linkSliderSettings = HelperUniteHCar::getViewUrl_Slider($this->sliderID); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } protected function addToolbar() { //$sliderTitle = $this->arrSliders[$this->sliderID]["title"]; $arrSlider = HelperUniteHCar::getSlider($this->sliderID); $sliderTitle = $arrSlider["title"]; $title = JText::_('COM_UNITEHCAROUSEL'). " - ".$sliderTitle." - "; $title .= "<small>[".JText::_('COM_UNITEHCAROUSEL_SLIDES')."]</small>"; JToolBarHelper::title($title, 'generic.png'); $numSliders = count($this->arrSliders); if($numSliders > 0){ JToolBarHelper::addNew('items.add','JTOOLBAR_NEW'); JToolBarHelper::deleteList('', 'items.delete','JTOOLBAR_DELETE'); JToolBarHelper::divider(); JToolBarHelper::custom('items.publish', 'publish.png', 'publish_f2.png','JTOOLBAR_PUBLISH', true); JToolBarHelper::custom('items.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::cancel('slider.cancel', 'JTOOLBAR_CLOSE'); //JToolBarHelper::divider(); //JToolBarHelper::preferences('com_unitehcarousel', 300, 600); } } } home/academiac/www/administrator/components/com_plugins/views/plugins/view.html.php 0000644 00000003521 15137525574 0025056 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View class for a list of plugins. * * @package Joomla.Administrator * @subpackage com_plugins * @since 1.5 */ class PluginsViewPlugins extends JViewLegacy { protected $items; protected $pagination; protected $state; /** * Display the view */ public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // Check if there are no matching items if(!count($this->items)){ JFactory::getApplication()->enqueueMessage( JText::_('COM_PLUGINS_MSG_MANAGE_NO_PLUGINS') , 'warning' ); } parent::display($tpl); $this->addToolbar(); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = PluginsHelper::getActions(); JToolBarHelper::title(JText::_('COM_PLUGINS_MANAGER_PLUGINS'), 'plugin'); if ($canDo->get('core.edit')) { JToolBarHelper::editList('plugin.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('plugins.publish', 'JTOOLBAR_ENABLE', true); JToolBarHelper::unpublish('plugins.unpublish', 'JTOOLBAR_DISABLE', true); JToolBarHelper::divider(); JToolBarHelper::checkin('plugins.checkin'); } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::preferences('com_plugins'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_EXTENSIONS_PLUGIN_MANAGER'); } } home/academiac/www/administrator/components/com_modules/views/modules/view.html.php 0000644 00000005143 15137525577 0025041 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View class for a list of modules. * * @package Joomla.Administrator * @subpackage com_modules * @since 1.6 */ class ModulesViewModules extends JViewLegacy { protected $items; protected $pagination; protected $state; /** * Display the view */ public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // Check if there are no matching items if(!count($this->items)){ JFactory::getApplication()->enqueueMessage( JText::_('COM_MODULES_MSG_MANAGE_NO_MODULES') , 'warning' ); } $this->addToolbar(); // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { $state = $this->get('State'); $canDo = ModulesHelper::getActions(); JToolBarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES'), 'module.png'); if ($canDo->get('core.create')) { //JToolBarHelper::addNew('module.add'); $bar = JToolBar::getInstance('toolbar'); $bar->appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_modules&view=select&tmpl=component', 850, 400); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('module.edit'); } if ($canDo->get('core.create')) { JToolBarHelper::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::checkin('modules.checkin'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('modules.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_modules'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER'); } } home/academiac/www/administrator/components/com_modules/views/positions/view.html.php 0000644 00000001406 15137526122 0025401 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * @package Joomla.Administrator * @subpackage com_modules * @since 1.6 */ class ModulesViewPositions extends JViewLegacy { protected $items; protected $pagination; protected $state; /** * Display the view */ public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } parent::display($tpl); } } home/academiac/www/administrator/components/com_modules/views/select/view.html.php 0000644 00000001447 15137526463 0024646 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Modules component * * @package Joomla.Administrator * @subpackage com_modules * @since 1.6 */ class ModulesViewSelect extends JViewLegacy { protected $state; protected $items; /** * Display the view */ function display($tpl = null) { $state = $this->get('State'); $items = $this->get('Items'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->assignRef('state', $state); $this->assignRef('items', $items); parent::display($tpl); } } home/academiac/www/administrator/components/com_plugins/views/plugin/view.html.php 0000644 00000003270 15137526771 0024674 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View to edit a plugin. * * @package Joomla.Administrator * @subpackage com_plugins * @since 1.5 */ class PluginsViewPlugin extends JViewLegacy { protected $item; protected $form; protected $state; /** * Display the view */ public function display($tpl = null) { $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $canDo = PluginsHelper::getActions(); JToolBarHelper::title(JText::sprintf('COM_PLUGINS_MANAGER_PLUGIN', JText::_($this->item->name)), 'plugin'); // If not checked out, can save the item. if ($canDo->get('core.edit')) { JToolBarHelper::apply('plugin.apply'); JToolBarHelper::save('plugin.save'); } JToolBarHelper::cancel('plugin.cancel', 'JTOOLBAR_CLOSE'); JToolBarHelper::divider(); // Get the help information for the plugin item. $lang = JFactory::getLanguage(); $help = $this->get('Help'); if ($lang->hasKey($help->url)) { $debug = $lang->setDebug(false); $url = JText::_($help->url); $lang->setDebug($debug); } else { $url = null; } JToolBarHelper::help($help->key, false, $url); } } home/academiac/www/administrator/components/com_modules/views/module/view.html.php 0000644 00000004517 15137526774 0024662 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_modules * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View to edit a module. * * @static * @package Joomla.Administrator * @subpackage com_modules * @since 1.6 */ class ModulesViewModule extends JViewLegacy { protected $form; protected $item; protected $state; /** * Display the view */ public function display($tpl = null) { $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = ($this->item->id == 0); $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); $canDo = ModulesHelper::getActions($this->state->get('filter.category_id'), $this->item->id); $item = $this->get('Item'); JToolBarHelper::title( JText::sprintf('COM_MODULES_MANAGER_MODULE', JText::_($this->item->module)), 'module.png'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create') )) { JToolBarHelper::apply('module.apply'); JToolBarHelper::save('module.save'); } if (!$checkedOut && $canDo->get('core.create')) { JToolBarHelper::save2new('module.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::save2copy('module.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('module.cancel'); } else { JToolBarHelper::cancel('module.cancel', 'JTOOLBAR_CLOSE'); } // Get the help information for the menu item. $lang = JFactory::getLanguage(); $help = $this->get('Help'); if ($lang->hasKey($help->url)) { $debug = $lang->setDebug(false); $url = JText::_($help->url); $lang->setDebug($debug); } else { $url = null; } JToolBarHelper::help($help->key, false, $url); } } home/academiac/www/administrator/components/com_modules/views/preview/view.html.php 0000644 00000001124 15137527323 0025034 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_modules * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Modules component * * @static * @package Joomla.Administrator * @subpackage com_modules * @since 1.6 */ class ModulesViewPreview extends JViewLegacy { function display($tpl = null) { $editor = JFactory::getEditor(); $this->assignRef('editor', $editor); parent::display($tpl); } } home/academiac/www/components/com_content/views/featured/view.html.php 0000644 00000013567 15137544546 0022320 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Frontpage View class * * @package Joomla.Site * @subpackage com_content * @since 1.5 */ class ContentViewFeatured extends JViewLegacy { protected $state = null; protected $item = null; protected $items = null; protected $pagination = null; protected $lead_items = array(); protected $intro_items = array(); protected $link_items = array(); protected $columns = 1; /** * Display the view * * @return mixed False on error, null otherwise. */ function display($tpl = null) { // Initialise variables. $user = JFactory::getUser(); $app = JFactory::getApplication(); $state = $this->get('State'); $items = $this->get('Items'); $pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } $params = &$state->params; // PREPARE THE DATA // Get the metrics for the structural page layout. $numLeading = $params->def('num_leading_articles', 1); $numIntro = $params->def('num_intro_articles', 4); $numLinks = $params->def('num_links', 4); // Compute the article slugs and prepare introtext (runs content plugins). foreach ($items as $i => & $item) { $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; $item->catslug = ($item->category_alias) ? ($item->catid . ':' . $item->category_alias) : $item->catid; $item->parent_slug = ($item->parent_alias) ? ($item->parent_id . ':' . $item->parent_alias) : $item->parent_id; // No link for ROOT category if ($item->parent_alias == 'root') { $item->parent_slug = null; } $item->event = new stdClass(); $dispatcher = JDispatcher::getInstance(); // Old plugins: Ensure that text property is available if (!isset($item->text)) { $item->text = $item->introtext; } JPluginHelper::importPlugin('content'); $results = $dispatcher->trigger('onContentPrepare', array ('com_content.featured', &$item, &$this->params, 0)); // Old plugins: Use processed text as introtext $item->introtext = $item->text; $results = $dispatcher->trigger('onContentAfterTitle', array('com_content.featured', &$item, &$item->params, 0)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.featured', &$item, &$item->params, 0)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_content.featured', &$item, &$item->params, 0)); $item->event->afterDisplayContent = trim(implode("\n", $results)); } // Preprocess the breakdown of leading, intro and linked articles. // This makes it much easier for the designer to just interogate the arrays. $max = count($items); // The first group is the leading articles. $limit = $numLeading; for ($i = 0; $i < $limit && $i < $max; $i++) { $this->lead_items[$i] = &$items[$i]; } // The second group is the intro articles. $limit = $numLeading + $numIntro; // Order articles across, then down (or single column mode) for ($i = $numLeading; $i < $limit && $i < $max; $i++) { $this->intro_items[$i] = &$items[$i]; } $this->columns = max(1, $params->def('num_columns', 1)); $order = $params->def('multi_column_order', 1); if ($order == 0 && $this->columns > 1) { // call order down helper $this->intro_items = ContentHelperQuery::orderDownColumns($this->intro_items, $this->columns); } // The remainder are the links. for ($i = $numLeading + $numIntro; $i < $max; $i++) { $this->link_items[$i] = &$items[$i]; } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->assignRef('params', $params); $this->assignRef('items', $items); $this->assignRef('pagination', $pagination); $this->assignRef('user', $user); $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } // Add feed links if ($this->params->get('show_feed_link', 1)) { $link = '&format=feed&limitstart='; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $this->document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $this->document->addHeadLink(JRoute::_($link . '&type=atom'), 'alternate', 'rel', $attribs); } } } home/academiac/www/components/com_weblinks/views/category/view.html.php 0000644 00000015045 15137553671 0022472 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_weblinks * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the WebLinks component * * @package Joomla.Site * @subpackage com_weblinks * @since 1.5 */ class WeblinksViewCategory extends JViewLegacy { protected $state; protected $items; protected $category; protected $children; protected $pagination; function display($tpl = null) { $app = JFactory::getApplication(); $params = $app->getParams(); // Get some data from the models $state = $this->get('State'); $items = $this->get('Items'); $category = $this->get('Category'); $children = $this->get('Children'); $parent = $this->get('Parent'); $pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } if ($category == false) { return JError::raiseWarning(404, JText::_('JGLOBAL_CATEGORY_NOT_FOUND')); } if ($parent == false) { return JError::raiseWarning(404, JText::_('JGLOBAL_CATEGORY_NOT_FOUND')); } // Check whether category access level allows access. // TODO: SHould already be computed in $category->params->get('access-view') $user = JFactory::getUser(); $groups = $user->getAuthorisedViewLevels(); if (!in_array($category->access, $groups)) { return JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR')); } // Prepare the data. // Compute the weblink slug & link url. for ($i = 0, $n = count($items); $i < $n; $i++) { $item = &$items[$i]; $item->slug = $item->alias ? ($item->id.':'.$item->alias) : $item->id; if ($item->params->get('count_clicks', $params->get('count_clicks')) == 1) { $item->link = JRoute::_('index.php?option=com_weblinks&task=weblink.go&id='. $item->id); } else { $item->link = $item->url; } $temp = new JRegistry(); $temp->loadString($item->params); $item->params = clone($params); $item->params->merge($temp); } // Setup the category parameters. $cparams = $category->getParams(); $category->params = clone($params); $category->params->merge($cparams); $children = array($category->id => $children); $maxLevel = $params->get('maxLevel', -1); $this->assignRef('maxLevel', $maxLevel); $this->assignRef('state', $state); $this->assignRef('items', $items); $this->assignRef('category', $category); $this->assignRef('children', $children); $this->assignRef('params', $params); $this->assignRef('parent', $parent); $this->assignRef('pagination', $pagination); //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); // Check for layout override only if this is not the active menu item // If it is the active menu item, then the view and category id will match $active = $app->getMenu()->getActive(); if ((!$active) || ((strpos($active->link, 'view=category') === false) || (strpos($active->link, '&id=' . (string) $this->category->id) === false))) { if ($layout = $category->params->get('category_layout')) { $this->setLayout($layout); } } elseif (isset($active->query['layout'])) { // We need to set the layout in case this is an alternative menu item (with an alternative layout) $this->setLayout($active->query['layout']); } $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_WEBLINKS_DEFAULT_PAGE_TITLE')); } $id = (int) @$menu->query['id']; if ($menu && ($menu->query['option'] != 'com_weblinks' || $id != $this->category->id)) { $this->params->set('page_subheading', $this->category->title); $path = array(array('title' => $this->category->title, 'link' => '')); $category = $this->category->getParent(); while (($menu->query['option'] != 'com_weblinks' || $id != $category->id) && $category->id > 1) { $path[] = array('title' => $category->title, 'link' => WeblinksHelperRoute::getCategoryRoute($category->id)); $category = $category->getParent(); } $path = array_reverse($path); foreach($path as $item) { $pathway->addItem($item['title'], $item['link']); } } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->category->metadesc) { $this->document->setDescription($this->category->metadesc); } elseif (!$this->category->metadesc && $this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->category->metakey) { $this->document->setMetadata('keywords', $this->category->metakey); } elseif (!$this->category->metakey && $this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } if ($app->getCfg('MetaAuthor') == '1') { $this->document->setMetaData('author', $this->category->getMetadata()->get('author')); } $mdata = $this->category->getMetadata()->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } // Add alternative feed link if ($this->params->get('show_feed_link', 1) == 1) { $link = '&format=feed&limitstart='; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $this->document->addHeadLink(JRoute::_($link.'&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $this->document->addHeadLink(JRoute::_($link.'&type=atom'), 'alternate', 'rel', $attribs); } } } home/academiac/www/components/com_users/views/reset/view.html.php 0000644 00000005305 15137557335 0021321 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_users * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Reset view class for Users. * * @package Joomla.Site * @subpackage com_users * @since 1.5 */ class UsersViewReset extends JViewLegacy { protected $form; protected $params; protected $state; /** * Method to display the view. * * @param string The template file to include * @since 1.5 */ function display($tpl = null) { // This name will be used to get the model $name = $this->getLayout(); // Check that the name is valid - has an associated model. if( ! in_array($name, array('confirm', 'complete'))) { $name = 'default'; } if ('default' == $name) { $formname = 'Form'; } else { $formname = ucfirst($this->_name).ucfirst($name).'Form'; } // Get the view data. $this->form = $this->get($formname); $this->state = $this->get('State'); $this->params = $this->state->params; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx')); $this->prepareDocument(); parent::display($tpl); } /** * Prepares the document. * * @since 1.6 */ protected function prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_USERS_RESET')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/academiac/www/components/com_weblinks/views/form/view.html.php 0000644 00000006017 15137557557 0021626 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML Article View class for the Weblinks component * * @package Joomla.Site * @subpackage com_weblinks * @since 1.5 */ class WeblinksViewForm extends JViewLegacy { protected $form; protected $item; protected $return_page; protected $state; public function display($tpl = null) { // Initialise variables. $app = JFactory::getApplication(); $user = JFactory::getUser(); // Get model data. $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); $this->return_page = $this->get('ReturnPage'); if (empty($this->item->id)) { $authorised = ($user->authorise('core.create', 'com_weblinks') || (count($user->getAuthorisedCategories('com_weblinks', 'core.create')))); } else { $authorised = $user->authorise('core.edit', 'com_weblinks.weblink.'.$this->item->id); } if ($authorised !== true) { JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR')); return false; } if (!empty($this->item)) { $this->form->bind($this->item); } // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Create a shortcut to the parameters. $params = &$this->state->params; //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->params = $params; $this->user = $user; $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if (empty($this->item->id)) { $head = JText::_('COM_WEBLINKS_FORM_SUBMIT_WEBLINK'); } else { $head = JText::_('COM_WEBLINKS_FORM_EDIT_WEBLINK'); } if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', $head); } $title = $this->params->def('page_title', $head); if ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/academiac/www/components/com_weblinks/views/categories/view.html.php 0000644 00000005361 15137560352 0022774 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Content categories view. * * @package Joomla.Site * @subpackage com_weblinks * @since 1.5 */ class WeblinksViewCategories extends JViewLegacy { protected $state = null; protected $item = null; protected $items = null; /** * Display the view * * @return mixed False on error, null otherwise. */ function display($tpl = null) { // Initialise variables $state = $this->get('State'); $items = $this->get('Items'); $parent = $this->get('Parent'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } if($items === false) { return JError::raiseError(404, JText::_('JGLOBAL_CATEGORY_NOT_FOUND')); } if($parent == false) { return JError::raiseError(404, JText::_('JGLOBAL_CATEGORY_NOT_FOUND')); } $params = &$state->params; $items = array($parent->id => $items); //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->maxLevelcat = $params->get('maxLevelcat', -1); $this->assignRef('params', $params); $this->assignRef('parent', $parent); $this->assignRef('items', $items); $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_WEBLINKS_DEFAULT_PAGE_TITLE')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/academiac/www/components/com_admirorgallery/views/imagemanager/view.html.php 0000604 00000005427 15137573476 0024475 0 ustar 00 <?php /*------------------------------------------------------------------------ # com_admirorgallery - Admiror Gallery Component # ------------------------------------------------------------------------ # author Igor Kekeljevic & Nikola Vasiljevski # copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.admiror-design-studio.com/joomla-extensions # Technical Support: Forum - http://www.vasiljevski.com/forum/index.php # Version: 4.5.0 -------------------------------------------------------------------------*/ // no direct access defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.view'); class AdmirorgalleryViewImagemanager extends JView { function display($tpl = null) { // Make sure you are logged in and have the necessary access $validUsers = array(5 /*Publisher*/,6/*Manager*/,7/*Administrator*/,8/*Super Users*/); $user = JFactory::getUser(); $grantAccess = false; $userGroups = $user->getAuthorisedGroups(); foreach ($userGroups as $group) { if(in_array($group, $validUsers)) { $grantAccess = true; break; } } if(!$grantAccess) { JResponse::setHeader('HTTP/1.0 403',true); JError::raiseWarning( 403, JText::_('JERROR_ALERTNOAUTHOR') ); return; } $mainframe = JFactory::getApplication(); $params = $mainframe->getParams(); $this->assign('galleryName', $params->get('galleryName')); parent::display($tpl); } function _renderBreadcrumb($AG_itemURL, $ag_rootFolder, $ag_folderName, $ag_fileName) { $ag_breadcrumb = ''; $ag_breadcrumb_link = ''; if ($ag_rootFolder != $AG_itemURL && !empty($AG_itemURL)) { $ag_breadcrumb.='<a href="' . $ag_rootFolder . '" class="AG_folderLink AG_common_button"><span><span>' . substr($ag_rootFolder, 0, -1) . '</span></span></a>/'; $ag_breadcrumb_link.=$ag_rootFolder; $ag_breadcrumb_cut = substr($ag_folderName, strlen($ag_rootFolder)); $ag_breadcrumb_cut_array = explode("/", $ag_breadcrumb_cut); if (!empty($ag_breadcrumb_cut_array[0])) { foreach ($ag_breadcrumb_cut_array as $cut_key => $cut_value) { $ag_breadcrumb_link.=$cut_value . '/'; $ag_breadcrumb.='<a href="' . $ag_breadcrumb_link . '" class="AG_folderLink AG_common_button"><span><span>' . $cut_value . '</span></span></a>/'; } } $ag_breadcrumb.=$ag_fileName; } else { $ag_breadcrumb.=$ag_rootFolder; } return $ag_breadcrumb; } } home/academiac/www/components/com_admirorgallery/views/layout/view.html.php 0000604 00000004347 15137611754 0023365 0 ustar 00 <?php /*------------------------------------------------------------------------ # com_admirorgallery - Admiror Gallery Component # ------------------------------------------------------------------------ # author Igor Kekeljevic & Nikola Vasiljevski # copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.admiror-design-studio.com/joomla-extensions # Technical Support: Forum - http://www.vasiljevski.com/forum/index.php # Version: 4.5.0 -------------------------------------------------------------------------*/ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class AdmirorgalleryViewLayout extends JView { function display($tpl = null) { $mainframe = JFactory::getApplication('site'); $params = $mainframe->getParams(); $this->assign( 'galleryName', $params->get( 'galleryName' ) ); $this->assign( 'template', $params->get( 'template' ) ); $this->assign( 'thumbWidth', $params->get( 'thumbWidth' ) ); $this->assign( 'thumbHeight', $params->get( 'thumbHeight' ) ); $this->assign( 'thumbAutoSize', $params->get( 'thumbAutoSize' ) ); $this->assign( 'arrange', $params->get( 'arrange' ) ); $this->assign( 'newImageTag', $params->get( 'newImageTag' ) ); $this->assign( 'newImageDays', $params->get( 'newImageTag_days' ) ); $this->assign( 'frameWidth', $params->get( 'frame_width' ) ); $this->assign( 'frameHeight', $params->get( 'frame_height' ) ); $this->assign( 'showSignature', $params->get( 'showSignature' ) ); $this->assign( 'popupEngine', $params->get( 'popupEngine' ) ); $this->assign( 'foregroundColor', $params->get( 'foregroundColor' ) ); $this->assign( 'backgroundColor', $params->get( 'backgroundColor' ) ); $this->assign( 'highliteColor', $params->get( 'highliteColor' ) ); $this->assign( 'plainTextCaptions', $params->get( 'plainTextCaptions' ) ); // Albums Support $this->assign( 'albumUse', $params->get( 'albumUse' ) ); // Paginations Support $this->assign( 'paginUse', $params->get( 'paginUse' ) ); $this->assign( 'paginImagesPerGallery', $params->get( 'paginImagesPerGallery' ) ); parent::display($tpl); } } home/academiac/www/components/com_admirorgallery/views/button/view.html.php 0000604 00000001416 15137620232 0023344 0 ustar 00 <?php /*------------------------------------------------------------------------ # com_admirorgallery - Admiror Gallery Component # ------------------------------------------------------------------------ # author Igor Kekeljevic & Nikola Vasiljevski # copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # Websites: http://www.admiror-design-studio.com/joomla-extensions # Technical Support: Forum - http://www.vasiljevski.com/forum/index.php # Version: 4.5.0 -------------------------------------------------------------------------*/ // no direct access defined('_JEXEC') or die('Restricted access'); require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'views'.DS.'button'.DS.'view.html.php'); home/academiac/www/components/com_users/views/profile/view.html.php 0000644 00000005527 15137663716 0021646 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_users * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Profile view class for Users. * * @package Joomla.Site * @subpackage com_users * @since 1.6 */ class UsersViewProfile extends JViewLegacy { protected $data; protected $form; protected $params; protected $state; /** * Method to display the view. * * @param string $tpl The template file to include * @since 1.6 */ public function display($tpl = null) { // Get the view data. $this->data = $this->get('Data'); $this->form = $this->get('Form'); $this->state = $this->get('State'); $this->params = $this->state->get('params'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // Check if a user was found. if (!$this->data->id) { JError::raiseError(404, JText::_('JERROR_USERS_PROFILE_NOT_FOUND')); return false; } // Check for layout override $active = JFactory::getApplication()->getMenu()->getActive(); if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx')); $this->prepareDocument(); parent::display($tpl); } /** * Prepares the document * * @since 1.6 */ protected function prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $user = JFactory::getUser(); $login = $user->get('guest') ? true : false; $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if($menu) { $this->params->def('page_heading', $this->params->get('page_title', $user->name)); } else { $this->params->def('page_heading', JText::_('COM_USERS_PROFILE')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/academiac/www/components/com_finder/views/search/view.html.php 0000644 00000015157 15137735512 0021553 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die; /** * Search HTML view class for the Finder package. * * @package Joomla.Site * @subpackage com_finder * @since 2.5 */ class FinderViewSearch extends JViewLegacy { protected $query; protected $params; protected $state; protected $user; /** * Method to display the view. * * @param string $tpl A template file to load. [optional] * * @return mixed JError object on failure, void on success. * * @since 2.5 */ public function display($tpl = null) { $app = JFactory::getApplication(); $params = $app->getParams(); // Get view data. $state = $this->get('State'); $query = $this->get('Query'); JDEBUG ? $GLOBALS['_PROFILER']->mark('afterFinderQuery') : null; $results = $this->get('Results'); JDEBUG ? $GLOBALS['_PROFILER']->mark('afterFinderResults') : null; $total = $this->get('Total'); JDEBUG ? $GLOBALS['_PROFILER']->mark('afterFinderTotal') : null; $pagination = $this->get('Pagination'); JDEBUG ? $GLOBALS['_PROFILER']->mark('afterFinderPagination') : null; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // Configure the pathway. if (!empty($query->input)) { $app->getPathWay()->addItem($this->escape($query->input)); } // Push out the view data. $this->assignRef('state', $state); $this->assignRef('params', $params); $this->assignRef('query', $query); $this->assignRef('results', $results); $this->assignRef('total', $total); $this->assignRef('pagination', $pagination); // Check for a double quote in the query string. if (strpos($this->query->input, '"')) { // Get the application router. $router =& $app->getRouter(); // Fix the q variable in the URL. if ($router->getVar('q') !== $this->query->input) { $router->setVar('q', $this->query->input); } } // Push out the query data. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); $this->suggested = JHtml::_('query.suggested', $query); $this->explained = JHtml::_('query.explained', $query); // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); // Check for layout override only if this is not the active menu item // If it is the active menu item, then the view and category id will match $active = $app->getMenu()->getActive(); if (isset($active->query['layout'])) { // We need to set the layout in case this is an alternative menu item (with an alternative layout) $this->setLayout($active->query['layout']); } $this->prepareDocument($query); JDEBUG ? $GLOBALS['_PROFILER']->mark('beforeFinderLayout') : null; parent::display($tpl); JDEBUG ? $GLOBALS['_PROFILER']->mark('afterFinderLayout') : null; } /** * Method to get hidden input fields for a get form so that control variables * are not lost upon form submission * * @return string A string of hidden input form fields * * @since 2.5 */ protected function getFields() { $fields = null; // Get the URI. $uri = JURI::getInstance(JRoute::_($this->query->toURI())); $uri->delVar('q'); $uri->delVar('o'); $uri->delVar('t'); $uri->delVar('d1'); $uri->delVar('d2'); $uri->delVar('w1'); $uri->delVar('w2'); // Create hidden input elements for each part of the URI. foreach ($uri->getQuery(true) as $n => $v) { if (is_scalar($v)) { $fields .= '<input type="hidden" name="' . $n . '" value="' . $v . '" />'; } } return $fields; } /** * Method to get the layout file for a search result object. * * @param string $layout The layout file to check. [optional] * * @return string The layout file to use. * * @since 2.5 */ protected function getLayoutFile($layout = null) { // Create and sanitize the file name. $file = $this->_layout . '_' . preg_replace('/[^A-Z0-9_\.-]/i', '', $layout); // Check if the file exists. jimport('joomla.filesystem.path'); $filetofind = $this->_createFileName('template', array('name' => $file)); $exists = JPath::find($this->_path['template'], $filetofind); return ($exists ? $layout : 'result'); } /** * Prepares the document * * @param FinderIndexerQuery $query The search query * * @return void * * @since 2.5 */ protected function prepareDocument($query) { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_FINDER_DEFAULT_PAGE_TITLE')); } $id = (int) @$menu->query['id']; $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($layout = $this->params->get('article_layout')) { $this->setLayout($layout); } // Configure the document meta-description. if (!empty($this->explained)) { $explained = $this->escape(html_entity_decode(strip_tags($this->explained), ENT_QUOTES, 'UTF-8')); $this->document->setDescription($explained); } // Configure the document meta-keywords. if (!empty($query->highlight)) { $this->document->setMetadata('keywords', implode(', ', $query->highlight)); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } // Add feed link to the document head. if ($this->params->get('show_feed_link', 1) == 1) { // Add the RSS link. $props = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $route = JRoute::_($this->query->toURI() . '&format=feed&type=rss'); $this->document->addHeadLink($route, 'alternate', 'rel', $props); // Add the ATOM link. $props = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $route = JRoute::_($this->query->toURI() . '&format=feed&type=atom'); $this->document->addHeadLink($route, 'alternate', 'rel', $props); } } } home/academiac/www/components/com_search/views/search/view.html.php 0000644 00000013735 15137740410 0021542 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_search * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the search component * * @static * @package Joomla.Site * @subpackage com_search * @since 1.0 */ class SearchViewSearch extends JViewLegacy { function display($tpl = null) { require_once JPATH_COMPONENT_ADMINISTRATOR.'/helpers/search.php'; // Initialise some variables $app = JFactory::getApplication(); $pathway = $app->getPathway(); $uri = JFactory::getURI(); $error = null; $rows = null; $results= null; $total = 0; // Get some data from the model $areas = $this->get('areas'); $state = $this->get('state'); $searchword = $state->get('keyword'); $params = $app->getParams(); $menus = $app->getMenu(); $menu = $menus->getActive(); // because the application sets a default page title, we need to get it // right from the menu item itself if (is_object($menu)) { $menu_params = new JRegistry; $menu_params->loadString($menu->params); if (!$menu_params->get('page_title')) { $params->set('page_title', JText::_('COM_SEARCH_SEARCH')); } } else { $params->set('page_title', JText::_('COM_SEARCH_SEARCH')); } $title = $params->get('page_title'); if ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } // built select lists $orders = array(); $orders[] = JHtml::_('select.option', 'newest', JText::_('COM_SEARCH_NEWEST_FIRST')); $orders[] = JHtml::_('select.option', 'oldest', JText::_('COM_SEARCH_OLDEST_FIRST')); $orders[] = JHtml::_('select.option', 'popular', JText::_('COM_SEARCH_MOST_POPULAR')); $orders[] = JHtml::_('select.option', 'alpha', JText::_('COM_SEARCH_ALPHABETICAL')); $orders[] = JHtml::_('select.option', 'category', JText::_('JCATEGORY')); $lists = array(); $lists['ordering'] = JHtml::_('select.genericlist', $orders, 'ordering', 'class="inputbox"', 'value', 'text', $state->get('ordering')); $searchphrases = array(); $searchphrases[] = JHtml::_('select.option', 'all', JText::_('COM_SEARCH_ALL_WORDS')); $searchphrases[] = JHtml::_('select.option', 'any', JText::_('COM_SEARCH_ANY_WORDS')); $searchphrases[] = JHtml::_('select.option', 'exact', JText::_('COM_SEARCH_EXACT_PHRASE')); $lists['searchphrase' ]= JHtml::_('select.radiolist', $searchphrases, 'searchphrase', '', 'value', 'text', $state->get('match')); // log the search SearchHelper::logSearch($searchword); //limit searchword $lang = JFactory::getLanguage(); $upper_limit = $lang->getUpperLimitSearchWord(); $lower_limit = $lang->getLowerLimitSearchWord(); if (SearchHelper::limitSearchWord($searchword)) { $error = JText::sprintf('COM_SEARCH_ERROR_SEARCH_MESSAGE', $lower_limit, $upper_limit); } //sanatise searchword if (SearchHelper::santiseSearchWord($searchword, $state->get('match'))) { $error = JText::_('COM_SEARCH_ERROR_IGNOREKEYWORD'); } if (!$searchword && count(JRequest::get('post'))) { //$error = JText::_('COM_SEARCH_ERROR_ENTERKEYWORD'); } // put the filtered results back into the model // for next release, the checks should be done in the model perhaps... $state->set('keyword', $searchword); if ($error == null) { $results = $this->get('data'); $total = $this->get('total'); $pagination = $this->get('pagination'); require_once JPATH_SITE . '/components/com_content/helpers/route.php'; for ($i=0, $count = count($results); $i < $count; $i++) { $row = &$results[$i]->text; if ($state->get('match') == 'exact') { $searchwords = array($searchword); $needle = $searchword; } else { $searchworda = preg_replace('#\xE3\x80\x80#s', ' ', $searchword); $searchwords = preg_split("/\s+/u", $searchworda); $needle = $searchwords[0]; } $row = SearchHelper::prepareSearchContent($row, $needle); $searchwords = array_unique($searchwords); $searchRegex = '#('; $x = 0; foreach ($searchwords as $k => $hlword) { $searchRegex .= ($x == 0 ? '' : '|'); $searchRegex .= preg_quote($hlword, '#'); $x++; } $searchRegex .= ')#iu'; $row = preg_replace($searchRegex, '<span class="highlight">\0</span>', $row); $result = &$results[$i]; if ($result->created) { $created = JHtml::_('date', $result->created, JText::_('DATE_FORMAT_LC3')); } else { $created = ''; } $result->text = JHtml::_('content.prepare', $result->text, '', 'com_search.search'); $result->created = $created; $result->count = $i + 1; } } // Check for layout override $active = JFactory::getApplication()->getMenu()->getActive(); if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->assignRef('pagination', $pagination); $this->assignRef('results', $results); $this->assignRef('lists', $lists); $this->assignRef('params', $params); $this->ordering = $state->get('ordering'); $this->searchword = $searchword; $this->origkeyword = $state->get('origkeyword'); $this->searchphrase = $state->get('match'); $this->searchareas = $areas; $this->total = $total; $this->error = $error; $this->action = $uri; parent::display($tpl); } } home/academiac/www/components/com_content/views/category/view.html.php 0000644 00000021757 15137756570 0022340 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_content * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Content component * * @package Joomla.Site * @subpackage com_content * @since 1.5 */ class ContentViewCategory extends JViewLegacy { protected $state; protected $items; protected $category; protected $children; protected $pagination; protected $lead_items = array(); protected $intro_items = array(); protected $link_items = array(); protected $columns = 1; function display($tpl = null) { $app = JFactory::getApplication(); $user = JFactory::getUser(); // Get some data from the models $state = $this->get('State'); $params = $state->params; $items = $this->get('Items'); $category = $this->get('Category'); $children = $this->get('Children'); $parent = $this->get('Parent'); $pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } if ($category == false) { return JError::raiseError(404, JText::_('JGLOBAL_CATEGORY_NOT_FOUND')); } if ($parent == false) { return JError::raiseError(404, JText::_('JGLOBAL_CATEGORY_NOT_FOUND')); } // Setup the category parameters. $cparams = $category->getParams(); $category->params = clone($params); $category->params->merge($cparams); // Check whether category access level allows access. $user = JFactory::getUser(); $groups = $user->getAuthorisedViewLevels(); if (!in_array($category->access, $groups)) { return JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR')); } // PREPARE THE DATA // Get the metrics for the structural page layout. $numLeading = $params->def('num_leading_articles', 1); $numIntro = $params->def('num_intro_articles', 4); $numLinks = $params->def('num_links', 4); // Compute the article slugs and prepare introtext (runs content plugins). for ($i = 0, $n = count($items); $i < $n; $i++) { $item = &$items[$i]; $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; // No link for ROOT category if ($item->parent_alias == 'root') { $item->parent_slug = null; } $item->catslug = $item->category_alias ? ($item->catid.':'.$item->category_alias) : $item->catid; $item->event = new stdClass(); $dispatcher = JDispatcher::getInstance(); // Old plugins: Ensure that text property is available if (!isset($item->text)) { $item->text = $item->introtext; } JPluginHelper::importPlugin('content'); $results = $dispatcher->trigger('onContentPrepare', array ('com_content.category', &$item, &$this->params, 0)); // Old plugins: Use processed text as introtext $item->introtext = $item->text; $results = $dispatcher->trigger('onContentAfterTitle', array('com_content.category', &$item, &$item->params, 0)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.category', &$item, &$item->params, 0)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_content.category', &$item, &$item->params, 0)); $item->event->afterDisplayContent = trim(implode("\n", $results)); } // Check for layout override only if this is not the active menu item // If it is the active menu item, then the view and category id will match $active = $app->getMenu()->getActive(); if ((!$active) || ((strpos($active->link, 'view=category') === false) || (strpos($active->link, '&id=' . (string) $category->id) === false))) { // Get the layout from the merged category params if ($layout = $category->params->get('category_layout')) { $this->setLayout($layout); } } // At this point, we are in a menu item, so we don't override the layout elseif (isset($active->query['layout'])) { // We need to set the layout from the query in case this is an alternative menu item (with an alternative layout) $this->setLayout($active->query['layout']); } // For blog layouts, preprocess the breakdown of leading, intro and linked articles. // This makes it much easier for the designer to just interrogate the arrays. if (($params->get('layout_type') == 'blog') || ($this->getLayout() == 'blog')) { $max = count($items); // The first group is the leading articles. $limit = $numLeading; for ($i = 0; $i < $limit && $i < $max; $i++) { $this->lead_items[$i] = &$items[$i]; } // The second group is the intro articles. $limit = $numLeading + $numIntro; // Order articles across, then down (or single column mode) for ($i = $numLeading; $i < $limit && $i < $max; $i++) { $this->intro_items[$i] = &$items[$i]; } $this->columns = max(1, $params->def('num_columns', 1)); $order = $params->def('multi_column_order', 1); if ($order == 0 && $this->columns > 1) { // call order down helper $this->intro_items = ContentHelperQuery::orderDownColumns($this->intro_items, $this->columns); } $limit = $numLeading + $numIntro + $numLinks; // The remainder are the links. for ($i = $numLeading + $numIntro; $i < $limit && $i < $max;$i++) { $this->link_items[$i] = &$items[$i]; } } $children = array($category->id => $children); //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->maxLevel = $params->get('maxLevel', -1); $this->assignRef('state', $state); $this->assignRef('items', $items); $this->assignRef('category', $category); $this->assignRef('children', $children); $this->assignRef('params', $params); $this->assignRef('parent', $parent); $this->assignRef('pagination', $pagination); $this->assignRef('user', $user); $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES')); } $id = (int) @$menu->query['id']; if ($menu && ($menu->query['option'] != 'com_content' || $menu->query['view'] == 'article' || $id != $this->category->id)) { $path = array(array('title' => $this->category->title, 'link' => '')); $category = $this->category->getParent(); while (($menu->query['option'] != 'com_content' || $menu->query['view'] == 'article' || $id != $category->id) && $category->id > 1) { $path[] = array('title' => $category->title, 'link' => ContentHelperRoute::getCategoryRoute($category->id)); $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->category->metadesc) { $this->document->setDescription($this->category->metadesc); } elseif (!$this->category->metadesc && $this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->category->metakey) { $this->document->setMetadata('keywords', $this->category->metakey); } elseif (!$this->category->metakey && $this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } if ($app->getCfg('MetaAuthor') == '1') { $this->document->setMetaData('author', $this->category->getMetadata()->get('author')); } $mdata = $this->category->getMetadata()->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } // Add feed links if ($this->params->get('show_feed_link', 1)) { $link = '&format=feed&limitstart='; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $this->document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $this->document->addHeadLink(JRoute::_($link . '&type=atom'), 'alternate', 'rel', $attribs); } } } home/academiac/www/components/com_wrapper/views/wrapper/view.html.php 0000644 00000004434 15137770255 0022176 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_wrapper * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * @package Joomla.Site * @subpackage com_wrapper */ class WrapperViewWrapper extends JViewLegacy { public function display($tpl = null) { $app = JFactory::getApplication(); $document = JFactory::getDocument(); $menus = $app->getMenu(); $menu = $menus->getActive(); $params = $app->getParams(); // because the application sets a default page title, we need to get it // right from the menu item itself $title = $params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } $wrapper = new stdClass(); // auto height control if ($params->def('height_auto')) { $wrapper->load = 'onload="iFrameHeight()"'; } else { $wrapper->load = ''; } $url = $params->def('url', ''); if ($params->def('add_scheme', 1)) { // adds 'http://' if none is set if (substr($url, 0, 1) == '/') { // relative url in component. use server http_host. $wrapper->url = 'http://'. $_SERVER['HTTP_HOST'] . $url; } elseif (!strstr($url, 'http') && !strstr($url, 'https')) { $wrapper->url = 'http://'. $url; } else { $wrapper->url = $url; } } else { $wrapper->url = $url; } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->assignRef('params', $params); $this->assignRef('wrapper', $wrapper); parent::display($tpl); } } home/academiac/www/components/com_weblinks/views/weblink/view.html.php 0000644 00000001750 15137772506 0022306 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the WebLinks component * * @package Joomla.Site * @subpackage com_weblinks * @since 1.5 */ class WeblinksViewWeblink extends JViewLegacy { protected $state; protected $item; function display($tpl = null) { $app = JFactory::getApplication(); $params = $app->getParams(); // Get some data from the models $state = $this->get('State'); $item = $this->get('Item'); $category = $this->get('Category'); if ($this->getLayout() == 'edit') { $this->_displayEdit($tpl); return; } if ($item->url) { // redirects to url if matching id found $app->redirect($item->url); } else { //TODO create proper error handling $app->redirect(JRoute::_('index.php'), JText::_('COM_WEBLINKS_ERROR_WEBLINK_NOT_FOUND'), 'notice'); } } } home/academiac/www/components/com_content/views/form/view.html.php 0000644 00000006646 15140035141 0021440 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML Article View class for the Content component * * @package Joomla.Site * @subpackage com_content * @since 1.5 */ class ContentViewForm extends JViewLegacy { protected $form; protected $item; protected $return_page; protected $state; public function display($tpl = null) { // Initialise variables. $app = JFactory::getApplication(); $user = JFactory::getUser(); // Get model data. $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); $this->return_page = $this->get('ReturnPage'); if (empty($this->item->id)) { $authorised = $user->authorise('core.create', 'com_content') || (count($user->getAuthorisedCategories('com_content', 'core.create'))); } else { $authorised = $this->item->params->get('access-edit'); } if ($authorised !== true) { JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR')); return false; } if (!empty($this->item) && isset($this->item->id)) { $this->item->images = json_decode($this->item->images); $this->item->urls = json_decode($this->item->urls); $tmp = new stdClass; $tmp->images = $this->item->images; $tmp->urls = $this->item->urls; $this->form->bind($tmp); } // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Create a shortcut to the parameters. $params = &$this->state->params; //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->params = $params; $this->user = $user; if ($params->get('enable_category') == 1) { $this->form->setFieldAttribute('catid', 'default', $params->get('catid', 1)); $this->form->setFieldAttribute('catid', 'readonly', 'true'); } $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_CONTENT_FORM_EDIT_ARTICLE')); } $title = $this->params->def('page_title', JText::_('COM_CONTENT_FORM_EDIT_ARTICLE')); if ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); $pathway = $app->getPathWay(); $pathway->addItem($title, ''); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/academiac/www/components/com_content/views/article/view.html.php 0000644 00000020437 15140044764 0022125 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML Article View class for the Content component * * @package Joomla.Site * @subpackage com_content * @since 1.5 */ class ContentViewArticle extends JViewLegacy { protected $item; protected $params; protected $print; protected $state; protected $user; function display($tpl = null) { // Initialise variables. $app = JFactory::getApplication(); $user = JFactory::getUser(); $userId = $user->get('id'); $dispatcher = JDispatcher::getInstance(); $this->item = $this->get('Item'); $this->print = JRequest::getBool('print'); $this->state = $this->get('State'); $this->user = $user; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Create a shortcut for $item. $item = &$this->item; // Add router helpers. $item->slug = $item->alias ? ($item->id.':'.$item->alias) : $item->id; $item->catslug = $item->category_alias ? ($item->catid.':'.$item->category_alias) : $item->catid; $item->parent_slug = $item->category_alias ? ($item->parent_id.':'.$item->parent_alias) : $item->parent_id; // TODO: Change based on shownoauth $item->readmore_link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->language)); // Merge article params. If this is single-article view, menu params override article params // Otherwise, article params override menu item params $this->params = $this->state->get('params'); $active = $app->getMenu()->getActive(); $temp = clone ($this->params); // Check to see which parameters should take priority if ($active) { $currentLink = $active->link; // If the current view is the active item and an article view for this article, then the menu item params take priority if (strpos($currentLink, 'view=article') && (strpos($currentLink, '&id='.(string) $item->id))) { // $item->params are the article params, $temp are the menu item params // Merge so that the menu item params take priority $item->params->merge($temp); // Load layout from active query (in case it is an alternative menu item) if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } } else { // Current view is not a single article, so the article params take priority here // Merge the menu item params with the article params so that the article params take priority $temp->merge($item->params); $item->params = $temp; // Check for alternative layouts (since we are not in a single-article menu item) // Single-article menu item layout takes priority over alt layout for an article if ($layout = $item->params->get('article_layout')) { $this->setLayout($layout); } } } else { // Merge so that article params take priority $temp->merge($item->params); $item->params = $temp; // Check for alternative layouts (since we are not in a single-article menu item) // Single-article menu item layout takes priority over alt layout for an article if ($layout = $item->params->get('article_layout')) { $this->setLayout($layout); } } $offset = $this->state->get('list.offset'); // Check the view access to the article (the model has already computed the values). if ($item->params->get('access-view') == false && ($item->params->get('show_noauth', '0') == '0')) { JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR')); return; } if ($item->params->get('show_intro', '1') == '1') { $item->text = $item->introtext . ' ' . $item->fulltext; } elseif ($item->fulltext) { $item->text = $item->fulltext; } else { $item->text = $item->introtext; } // // Process the content plugins. // JPluginHelper::importPlugin('content'); $results = $dispatcher->trigger('onContentPrepare', array ('com_content.article', &$item, &$this->params, $offset)); $item->event = new stdClass(); $results = $dispatcher->trigger('onContentAfterTitle', array('com_content.article', &$item, &$this->params, $offset)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.article', &$item, &$this->params, $offset)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_content.article', &$item, &$this->params, $offset)); $item->event->afterDisplayContent = trim(implode("\n", $results)); // Increment the hit counter of the article. if (!$this->params->get('intro_only') && $offset == 0) { $model = $this->getModel(); $model->hit(); } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->item->params->get('pageclass_sfx')); $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES')); } $title = $this->params->get('page_title', ''); $id = (int) @$menu->query['id']; // if the menu item does not concern this article if ($menu && ($menu->query['option'] != 'com_content' || $menu->query['view'] != 'article' || $id != $this->item->id)) { // If this is not a single article menu item, set the page title to the article title if ($this->item->title) { $title = $this->item->title; } $path = array(array('title' => $this->item->title, 'link' => '')); $category = JCategories::getInstance('Content')->get($this->item->catid); while ($category && ($menu->query['option'] != 'com_content' || $menu->query['view'] == 'article' || $id != $category->id) && $category->id > 1) { $path[] = array('title' => $category->title, 'link' => ContentHelperRoute::getCategoryRoute($category->id)); $category = $category->getParent(); } $path = array_reverse($path); foreach($path as $item) { $pathway->addItem($item['title'], $item['link']); } } // Check for empty title and add site name if param is set if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } if (empty($title)) { $title = $this->item->title; } $this->document->setTitle($title); if ($this->item->metadesc) { $this->document->setDescription($this->item->metadesc); } elseif (!$this->item->metadesc && $this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->item->metakey) { $this->document->setMetadata('keywords', $this->item->metakey); } elseif (!$this->item->metakey && $this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } if ($app->getCfg('MetaAuthor') == '1') { $this->document->setMetaData('author', $this->item->author); } $mdata = $this->item->metadata->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } // If there is a pagebreak heading or title, add it to the page title if (!empty($this->item->page_title)) { $this->item->title = $this->item->title . ' - ' . $this->item->page_title; $this->document->setTitle($this->item->page_title . ' - ' . JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM', $this->state->get('list.offset') + 1)); } if ($this->print) { $this->document->setMetaData('robots', 'noindex, nofollow'); } } } home/academiac/www/components/com_contact/views/category/view.html.php 0000644 00000015034 15140141422 0022262 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Contacts component * * @package Joomla.Site * @subpackage com_contact * @since 1.5 */ class ContactViewCategory extends JViewLegacy { protected $state; protected $items; protected $category; protected $categories; protected $pagination; function display($tpl = null) { $app = JFactory::getApplication(); $params = $app->getParams(); // Get some data from the models $state = $this->get('State'); $items = $this->get('Items'); $category = $this->get('Category'); $children = $this->get('Children'); $parent = $this->get('Parent'); $pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } if ($category == false) { return JError::raiseError(404, JText::_('JGLOBAL_CATEGORY_NOT_FOUND')); } if ($parent == false) { return JError::raiseError(404, JText::_('JGLOBAL_CATEGORY_NOT_FOUND')); } // Check whether category access level allows access. $user = JFactory::getUser(); $groups = $user->getAuthorisedViewLevels(); if (!in_array($category->access, $groups)) { return JError::raiseError(403, JText::_('JERROR_ALERTNOAUTHOR')); } // Prepare the data. // Compute the contact slug. for ($i = 0, $n = count($items); $i < $n; $i++) { $item = &$items[$i]; $item->slug = $item->alias ? ($item->id.':'.$item->alias) : $item->id; $temp = new JRegistry(); $temp->loadString($item->params); $item->params = clone($params); $item->params->merge($temp); if ($item->params->get('show_email', 0) == 1) { $item->email_to = trim($item->email_to); if (!empty($item->email_to) && JMailHelper::isEmailAddress($item->email_to)) { $item->email_to = JHtml::_('email.cloak', $item->email_to); } else { $item->email_to = ''; } } } // Setup the category parameters. $cparams = $category->getParams(); $category->params = clone($params); $category->params->merge($cparams); $children = array($category->id => $children); $maxLevel = $params->get('maxLevel', -1); $this->assignRef('maxLevel', $maxLevel); $this->assignRef('state', $state); $this->assignRef('items', $items); $this->assignRef('category', $category); $this->assignRef('children', $children); $this->assignRef('params', $params); $this->assignRef('parent', $parent); $this->assignRef('pagination', $pagination); //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx')); // Check for layout override only if this is not the active menu item // If it is the active menu item, then the view and category id will match $active = $app->getMenu()->getActive(); if ((!$active) || ((strpos($active->link, 'view=category') === false) || (strpos($active->link, '&id=' . (string) $this->category->id) === false))) { if ($layout = $category->params->get('category_layout')) { $this->setLayout($layout); } } elseif (isset($active->query['layout'])) { // We need to set the layout in case this is an alternative menu item (with an alternative layout) $this->setLayout($active->query['layout']); } $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_CONTACT_DEFAULT_PAGE_TITLE')); } $id = (int) @$menu->query['id']; if ($menu && ($menu->query['option'] != 'com_contact' || $menu->query['view'] == 'contact' || $id != $this->category->id)) { $path = array(array('title' => $this->category->title, 'link' => '')); $category = $this->category->getParent(); while (($menu->query['option'] != 'com_contact' || $menu->query['view'] == 'contact' || $id != $category->id) && $category->id > 1) { $path[] = array('title' => $category->title, 'link' => ContactHelperRoute::getCategoryRoute($category->id)); $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->category->metadesc) { $this->document->setDescription($this->category->metadesc); } elseif (!$this->category->metadesc && $this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->category->metakey) { $this->document->setMetadata('keywords', $this->category->metakey); } elseif (!$this->category->metakey && $this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } if ($app->getCfg('MetaAuthor') == '1') { $this->document->setMetaData('author', $this->category->getMetadata()->get('author')); } $mdata = $this->category->getMetadata()->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } // Add alternative feed link if ($this->params->get('show_feed_link', 1) == 1) { $link = '&format=feed&limitstart='; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $this->document->addHeadLink(JRoute::_($link.'&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $this->document->addHeadLink(JRoute::_($link.'&type=atom'), 'alternate', 'rel', $attribs); } } } home/academiac/www/components/com_content/views/archive/view.html.php 0000644 00000007750 15140150770 0022121 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Content component * * @package Joomla.Site * @subpackage com_content * @since 1.5 */ class ContentViewArchive extends JViewLegacy { protected $state = null; protected $item = null; protected $items = null; protected $pagination = null; function display($tpl = null) { $app = JFactory::getApplication(); $user = JFactory::getUser(); $state = $this->get('State'); $items = $this->get('Items'); $pagination = $this->get('Pagination'); $pathway = $app->getPathway(); $document = JFactory::getDocument(); // Get the page/component configuration $params = &$state->params; foreach ($items as $item) { $item->catslug = ($item->category_alias) ? ($item->catid . ':' . $item->category_alias) : $item->catid; $item->parent_slug = ($item->parent_alias) ? ($item->parent_id . ':' . $item->parent_alias) : $item->parent_id; } $form = new stdClass(); // Month Field $months = array( '' => JText::_('COM_CONTENT_MONTH'), '01' => JText::_('JANUARY_SHORT'), '02' => JText::_('FEBRUARY_SHORT'), '03' => JText::_('MARCH_SHORT'), '04' => JText::_('APRIL_SHORT'), '05' => JText::_('MAY_SHORT'), '06' => JText::_('JUNE_SHORT'), '07' => JText::_('JULY_SHORT'), '08' => JText::_('AUGUST_SHORT'), '09' => JText::_('SEPTEMBER_SHORT'), '10' => JText::_('OCTOBER_SHORT'), '11' => JText::_('NOVEMBER_SHORT'), '12' => JText::_('DECEMBER_SHORT') ); $form->monthField = JHtml::_( 'select.genericlist', $months, 'month', array( 'list.attr' => 'size="1" class="inputbox"', 'list.select' => $state->get('filter.month'), 'option.key' => null ) ); // Year Field $years = array(); $years[] = JHtml::_('select.option', null, JText::_('JYEAR')); for ($i = 2000; $i <= 2020; $i++) { $years[] = JHtml::_('select.option', $i, $i); } $form->yearField = JHtml::_( 'select.genericlist', $years, 'year', array('list.attr' => 'size="1" class="inputbox"', 'list.select' => $state->get('filter.year')) ); $form->limitField = $pagination->getLimitBox(); //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->filter = $state->get('list.filter'); $this->assignRef('form', $form); $this->assignRef('items', $items); $this->assignRef('params', $params); $this->assignRef('user', $user); $this->assignRef('pagination', $pagination); $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } ?> home/academiac/www/components/com_contact/views/contact/view.html.php 0000644 00000021361 15140151041 0022076 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; require_once JPATH_COMPONENT.'/models/category.php'; /** * HTML Contact View class for the Contact component * * @package Joomla.Site * @subpackage com_contact * @since 1.5 */ class ContactViewContact extends JViewLegacy { protected $state; protected $form; protected $item; protected $return_page; function display($tpl = null) { // Initialise variables. $app = JFactory::getApplication(); $user = JFactory::getUser(); $dispatcher = JDispatcher::getInstance(); $state = $this->get('State'); $item = $this->get('Item'); $this->form = $this->get('Form'); // Get the parameters $params = JComponentHelper::getParams('com_contact'); if ($item) { // If we found an item, merge the item parameters $params->merge($item->params); // Get Category Model data $categoryModel = JModelLegacy::getInstance('Category', 'ContactModel', array('ignore_request' => true)); $categoryModel->setState('category.id', $item->catid); $categoryModel->setState('list.ordering', 'a.name'); $categoryModel->setState('list.direction', 'asc'); $categoryModel->setState('filter.published', 1); $contacts = $categoryModel->getItems(); } // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // check if access is not public $groups = $user->getAuthorisedViewLevels(); $return = ''; if ((!in_array($item->access, $groups)) || (!in_array($item->category_access, $groups))) { $uri = JFactory::getURI(); $return = (string)$uri; JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR')); return; } $options['category_id'] = $item->catid; $options['order by'] = 'a.default_con DESC, a.ordering ASC'; // Handle email cloaking if ($item->email_to && $params->get('show_email')) { $item->email_to = JHtml::_('email.cloak', $item->email_to); } if ($params->get('show_street_address') || $params->get('show_suburb') || $params->get('show_state') || $params->get('show_postcode') || $params->get('show_country')) { if (!empty ($item->address) || !empty ($item->suburb) || !empty ($item->state) || !empty ($item->country) || !empty ($item->postcode)) { $params->set('address_check', 1); } } else { $params->set('address_check', 0); } // Manage the display mode for contact detail groups switch ($params->get('contact_icons')) { case 1 : // text $params->set('marker_address', JText::_('COM_CONTACT_ADDRESS').": "); $params->set('marker_email', JText::_('JGLOBAL_EMAIL').": "); $params->set('marker_telephone', JText::_('COM_CONTACT_TELEPHONE').": "); $params->set('marker_fax', JText::_('COM_CONTACT_FAX').": "); $params->set('marker_mobile', JText::_('COM_CONTACT_MOBILE').": "); $params->set('marker_misc', JText::_('COM_CONTACT_OTHER_INFORMATION').": "); $params->set('marker_class', 'jicons-text'); break; case 2 : // none $params->set('marker_address', ''); $params->set('marker_email', ''); $params->set('marker_telephone', ''); $params->set('marker_mobile', ''); $params->set('marker_fax', ''); $params->set('marker_misc', ''); $params->set('marker_class', 'jicons-none'); break; default : // icons $image1 = JHtml::_('image', 'contacts/'.$params->get('icon_address', 'con_address.png'), JText::_('COM_CONTACT_ADDRESS').": ", NULL, true); $image2 = JHtml::_('image', 'contacts/'.$params->get('icon_email', 'emailButton.png'), JText::_('JGLOBAL_EMAIL').": ", NULL, true); $image3 = JHtml::_('image', 'contacts/'.$params->get('icon_telephone', 'con_tel.png'), JText::_('COM_CONTACT_TELEPHONE').": ", NULL, true); $image4 = JHtml::_('image', 'contacts/'.$params->get('icon_fax', 'con_fax.png'), JText::_('COM_CONTACT_FAX').": ", NULL, true); $image5 = JHtml::_('image', 'contacts/'.$params->get('icon_misc', 'con_info.png'), JText::_('COM_CONTACT_OTHER_INFORMATION').": ", NULL, true); $image6 = JHtml::_('image', 'contacts/'.$params->get('icon_mobile', 'con_mobile.png'), JText::_('COM_CONTACT_MOBILE').": ", NULL, true); $params->set('marker_address', $image1); $params->set('marker_email', $image2); $params->set('marker_telephone', $image3); $params->set('marker_fax', $image4); $params->set('marker_misc', $image5); $params->set('marker_mobile', $image6); $params->set('marker_class', 'jicons-icons'); break; } // Add links to contacts if ($params->get('show_contact_list') && count($contacts) > 1) { foreach($contacts as &$contact) { $contact->link = JRoute::_(ContactHelperRoute::getContactRoute($contact->slug, $contact->catid)); } $item->link = JRoute::_(ContactHelperRoute::getContactRoute($item->slug, $item->catid)); } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->assignRef('contact', $item); $this->assignRef('params', $params); $this->assignRef('return', $return); $this->assignRef('state', $state); $this->assignRef('item', $item); $this->assignRef('user', $user); $this->assignRef('contacts', $contacts); // Override the layout only if this is not the active menu item // If it is the active menu item, then the view and item id will match $active = $app->getMenu()->getActive(); if ((!$active) || ((strpos($active->link, 'view=contact') === false) || (strpos($active->link, '&id=' . (string) $this->item->id) === false))) { if ($layout = $params->get('contact_layout')) { $this->setLayout($layout); } } elseif (isset($active->query['layout'])) { // We need to set the layout in case this is an alternative menu item (with an alternative layout) $this->setLayout($active->query['layout']); } $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_CONTACT_DEFAULT_PAGE_TITLE')); } $title = $this->params->get('page_title', ''); $id = (int) @$menu->query['id']; // if the menu item does not concern this contact if ($menu && ($menu->query['option'] != 'com_contact' || $menu->query['view'] != 'contact' || $id != $this->item->id)) { // If this is not a single contact menu item, set the page title to the contact title if ($this->item->name) { $title = $this->item->name; } $path = array(array('title' => $this->contact->name, 'link' => '')); $category = JCategories::getInstance('Contact')->get($this->contact->catid); while ($category && ($menu->query['option'] != 'com_contact' || $menu->query['view'] == 'contact' || $id != $category->id) && $category->id > 1) { $path[] = array('title' => $category->title, 'link' => ContactHelperRoute::getCategoryRoute($this->contact->catid)); $category = $category->getParent(); } $path = array_reverse($path); foreach($path as $item) { $pathway->addItem($item['title'], $item['link']); } } if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } if (empty($title)) { $title = $this->item->name; } $this->document->setTitle($title); if ($this->item->metadesc) { $this->document->setDescription($this->item->metadesc); } elseif (!$this->item->metadesc && $this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->item->metakey) { $this->document->setMetadata('keywords', $this->item->metakey); } elseif (!$this->item->metakey && $this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } $mdata = $this->item->metadata->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } } } home/academiac/www/administrator/components/com_admin/views/profile/view.html.php 0000644 00000002430 15140175233 0024425 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * @package Joomla.Administrator * @subpackage com_admin */ class AdminViewProfile extends JViewLegacy { protected $form; protected $item; protected $state; /** * Display the view */ public function display($tpl = null) { $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->form->setValue('password', null); $this->form->setValue('password2', null); parent::display($tpl); $this->addToolbar(); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', 1); JToolBarHelper::title(JText::_('COM_ADMIN_VIEW_PROFILE_TITLE'), 'user-profile'); JToolBarHelper::apply('profile.apply'); JToolBarHelper::save('profile.save'); JToolBarHelper::cancel('profile.cancel', 'JTOOLBAR_CLOSE'); JToolBarHelper::divider(); JToolBarHelper::help('JHELP_ADMIN_USER_PROFILE_EDIT'); } } home/academiac/www/components/com_virtuemart/views/orders/view.html.php 0000604 00000022207 15140212331 0022504 0 ustar 00 <?php /** * * Handle the orders view * * @package VirtueMart * @subpackage Orders * @author Oscar van Eijk * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6383 2012-08-27 16:53:06Z alatak $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(JPATH_VM_SITE.DS.'helpers'.DS.'vmview.php'); /** * Handle the orders view */ class VirtuemartViewOrders extends VmView { public function display($tpl = null) { $mainframe = JFactory::getApplication(); $pathway = $mainframe->getPathway(); $task = JRequest::getWord('task', 'list'); $layoutName = JRequest::getWord('layout', 'list'); $this->setLayout($layoutName); $_currentUser = JFactory::getUser(); $document = JFactory::getDocument(); if(!empty($tpl)){ $format = $tpl; } else { $format = JRequest::getWord('format', 'html'); } $this->assignRef('format', $format); if($format=='pdf'){ $document->setTitle( JText::_('COM_VIRTUEMART_INVOICE') ); //PDF needs more RAM than usual VmConfig::ensureMemoryLimit(96); } else { if ($layoutName == 'details') { $document->setTitle( JText::_('COM_VIRTUEMART_ACC_ORDER_INFO') ); $pathway->additem(JText::_('COM_VIRTUEMART_ACC_ORDER_INFO')); } else { $document->setTitle( JText::_('COM_VIRTUEMART_ORDERS_VIEW_DEFAULT_TITLE') ); $pathway->additem(JText::_('COM_VIRTUEMART_ORDERS_VIEW_DEFAULT_TITLE')); } } $orderModel = VmModel::getModel('orders'); if ($layoutName == 'details') { $order_list_link = FALSE; $order_list_link = JRoute::_('index.php?option=com_virtuemart&view=orders&layout=list', FALSE); $this->assignRef('order_list_link', $order_list_link); $orderDetails = $orderModel ->getMyOrderDetails(); if(!$orderDetails or empty($orderDetails['details'])){ echo JText::_('COM_VIRTUEMART_ORDER_NOTFOUND'); return; } $userFieldsModel = VmModel::getModel('userfields'); $_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 ); $orderbt = $orderDetails['details']['BT']; $orderst = (array_key_exists('ST', $orderDetails['details'])) ? $orderDetails['details']['ST'] : $orderbt; $userfields = $userFieldsModel->getUserFieldsFilled( $_userFields ,$orderbt ); $_userFields = $userFieldsModel->getUserFields( 'shipment' , array() // Default switches , array('delimiter_userinfo', 'username', 'email', 'password', 'password2', 'agreed', 'address_type') // Skips ); $shipmentfields = $userFieldsModel->getUserFieldsFilled( $_userFields ,$orderst ); $shipment_name=''; if (!class_exists('vmPSPlugin')) require(JPATH_VM_PLUGINS . DS . 'vmpsplugin.php'); JPluginHelper::importPlugin('vmshipment'); $dispatcher = JDispatcher::getInstance(); $returnValues = $dispatcher->trigger('plgVmOnShowOrderFEShipment',array( $orderDetails['details']['BT']->virtuemart_order_id, $orderDetails['details']['BT']->virtuemart_shipmentmethod_id, &$shipment_name)); $payment_name=''; if(!class_exists('vmPSPlugin')) require(JPATH_VM_PLUGINS.DS.'vmpsplugin.php'); JPluginHelper::importPlugin('vmpayment'); $dispatcher = JDispatcher::getInstance(); $returnValues = $dispatcher->trigger('plgVmOnShowOrderFEPayment',array( $orderDetails['details']['BT']->virtuemart_order_id, $orderDetails['details']['BT']->virtuemart_paymentmethod_id, &$payment_name)); if($format=='pdf'){ $invoiceNumberDate = array(); $return = $orderModel->createInvoiceNumber($orderDetails['details']['BT'], $invoiceNumberDate ); if(empty($invoiceNumberDate)){ $invoiceNumberDate[0] = 'no invoice number accessible'; $invoiceNumberDate[1] = 'no invoice date accessible'; } $this->assignRef('invoiceNumber', $invoiceNumberDate[0]); $this->assignRef('invoiceDate', $invoiceNumberDate[1]); } $this->assignRef('userfields', $userfields); $this->assignRef('shipmentfields', $shipmentfields); $this->assignRef('shipment_name', $shipment_name); $this->assignRef('payment_name', $payment_name); $this->assignRef('orderdetails', $orderDetails); if($_currentUser->guest){ $details_url = juri::root().'index.php?option=com_virtuemart&view=orders&layout=details&tmpl=component&order_pass=' . JRequest::getString('order_pass',false) .'&order_number='.JRequest::getString('order_number',false); } else { $details_url = juri::root().'index.php?option=com_virtuemart&view=orders&layout=details&tmpl=component&virtuemart_order_id=' . $this->orderdetails['details']['BT']->virtuemart_order_id; } $this->assignRef('details_url', $details_url); $tmpl = JRequest::getWord('tmpl'); $print = false; if($tmpl){ $print = true; } $this->prepareVendor(); $this->assignRef('print', $print); $vendorId = 1; $emailCurrencyId = $orderDetails['details']['BT']->user_currency_id; $exchangeRate = FALSE; if (!class_exists ('vmPSPlugin')) { require(JPATH_VM_PLUGINS . DS . 'vmpsplugin.php'); } JPluginHelper::importPlugin ('vmpayment'); $dispatcher = JDispatcher::getInstance (); $dispatcher->trigger ('plgVmgetEmailCurrency', array($orderDetails['details']['BT']->virtuemart_paymentmethod_id, $orderDetails['details']['BT']->virtuemart_order_id, &$emailCurrencyId)); if (!class_exists ('CurrencyDisplay')) { require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'); } $currency = CurrencyDisplay::getInstance ($emailCurrencyId, $vendorId); if ($emailCurrencyId) { vmdebug ('exchangerate', $orderDetails['details']['BT']->user_currency_rate); $currency->exchangeRateShopper = $orderDetails['details']['BT']->user_currency_rate; } $this->assignRef ('currency', $currency); // Implement the Joomla panels. If we need a ShipTo tab, make it the active one. // In tmpl/edit.php, this is the 4th tab (0-based, so set to 3 above) // jimport('joomla.html.pane'); // $pane = JPane::getInstance((__VM_ORDER_USE_SLIDERS?'Sliders':'Tabs')); // $this->assignRef('pane', $pane); } else { // 'list' -. default $useSSL = VmConfig::get('useSSL',0); $useXHTML = true; $this->assignRef('useSSL', $useSSL); $this->assignRef('useXHTML', $useXHTML); if ($_currentUser->get('id') == 0) { // getOrdersList() returns all orders when no userID is set (admin function), // so explicetly define an empty array when not logged in. $orderList = array(); } else { $orderList = $orderModel->getOrdersList($_currentUser->get('id'), TRUE); foreach ($orderList as $order) { $vendorId = 1; $emailCurrencyId = $order->user_currency_id; $exchangeRate = FALSE; if (!class_exists ('vmPSPlugin')) { require(JPATH_VM_PLUGINS . DS . 'vmpsplugin.php'); } JPluginHelper::importPlugin ('vmpayment'); $dispatcher = JDispatcher::getInstance (); $dispatcher->trigger ('plgVmgetEmailCurrency', array($order->virtuemart_paymentmethod_id, $order->virtuemart_order_id, &$emailCurrencyId)); if (!class_exists ('CurrencyDisplay')) { require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'); } $currency = CurrencyDisplay::getInstance ($emailCurrencyId, $vendorId); $this->assignRef ('currency', $currency); if ($emailCurrencyId) { vmdebug ('exchangerate', $order->user_currency_rate); $currency->exchangeRateShopper = $order->user_currency_rate; } $order->currency = $currency; } } $this->assignRef('orderlist', $orderList); } /* if (!class_exists('CurrencyDisplay')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'currencydisplay.php'); $currency = CurrencyDisplay::getInstance(); $this->assignRef('currency', $currency); */ $orderStatusModel = VmModel::getModel('orderstatus'); $_orderstatuses = $orderStatusModel->getOrderStatusList(); $orderstatuses = array(); foreach ($_orderstatuses as $_ordstat) { $orderstatuses[$_ordstat->order_status_code] = JText::_($_ordstat->order_status_name); } $this->assignRef('orderstatuses', $orderstatuses); if(!class_exists('ShopFunctions')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'shopfunctions.php'); $document = JFactory::getDocument(); $document->setMetaData('robots','NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET'); // this is no setting in BE to change the layout ! //shopFunctionsF::setVmTemplate($this,0,0,$layoutName); parent::display($tpl); } // add vendor for cart function prepareVendor(){ $vendorModel = VmModel::getModel('vendor'); $vendor = & $vendorModel->getVendor(); $this->assignRef('vendor', $vendor); $vendorModel->addImages($this->vendor,1); } } home/academiac/www/components/com_contact/views/featured/view.html.php 0000644 00000007366 15140234722 0022263 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Frontpage View class * * @package Joomla.Site * @subpackage com_contact * @since 1.6 */ class ContactViewFeatured extends JViewLegacy { protected $state; protected $items; protected $category; protected $categories; protected $pagination; /** * Display the view * * @return mixed False on error, null otherwise. */ function display($tpl = null) { $app = JFactory::getApplication(); $params = $app->getParams(); // Get some data from the models $state = $this->get('State'); $items = $this->get('Items'); $category = $this->get('Category'); $children = $this->get('Children'); $parent = $this->get('Parent'); $pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Check whether category access level allows access. $user = JFactory::getUser(); $groups = $user->getAuthorisedViewLevels(); // Prepare the data. // Compute the contact slug. for ($i = 0, $n = count($items); $i < $n; $i++) { $item = &$items[$i]; $item->slug = $item->alias ? ($item->id.':'.$item->alias) : $item->id; $temp = new JRegistry(); $temp->loadString($item->params); $item->params = clone($params); $item->params->merge($temp); if ($item->params->get('show_email', 0) == 1) { $item->email_to = trim($item->email_to); if (!empty($item->email_to) && JMailHelper::isEmailAddress($item->email_to)) { $item->email_to = JHtml::_('email.cloak', $item->email_to); } else { $item->email_to = ''; } } } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $maxLevel = $params->get('maxLevel', -1); $this->assignRef('maxLevel', $maxLevel); $this->assignRef('state', $state); $this->assignRef('items', $items); $this->assignRef('category', $category); $this->assignRef('children', $children); $this->assignRef('params', $params); $this->assignRef('parent', $parent); $this->assignRef('pagination', $pagination); $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_CONTACT_DEFAULT_PAGE_TITLE')); } $id = (int) @$menu->query['id']; $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/academiac/www/components/com_xmap/views/xml/view.html.php 0000604 00000011211 15140372340 0020551 0 ustar 00 <?php /** * @version $Id$ * @copyright Copyright (C) 2005 - 2009 Joomla! Vargas. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Guillermo Vargas (guille@vargas.co.cr) */ // No direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.application.component.view'); # For compatibility with older versions of Joola 2.5 if (!class_exists('JViewLegacy')){ class JViewLegacy extends JView { } } /** * XML Sitemap View class for the Xmap component * * @package Xmap * @subpackage com_xmap * @since 2.0 */ class XmapViewXml extends JViewLegacy { protected $state; protected $print; protected $_obLevel; function display($tpl = null) { // Initialise variables. $app = JFactory::getApplication(); $this->user = JFactory::getUser(); $isNewsSitemap = JRequest::getInt('news',0); $this->isImages = JRequest::getInt('images',0); $model = $this->getModel('Sitemap'); $this->setModel($model); // force to not display errors on XML sitemap @ini_set('display_errors', 0); # Increase memory and max execution time for XML sitemaps to make it work # with very large sites @ini_set('memory_limit','512M'); @ini_set('max_execution_time',300); $layout = $this->getLayout(); $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->canEdit = JFactory::getUser()->authorise('core.admin', 'com_xmap'); // For now, news sitemaps are not editable $this->canEdit = $this->canEdit && !$isNewsSitemap; if ($layout == 'xsl') { return $this->displayXSL($layout); } // Get model data. $this->items = $this->get('Items'); $this->sitemapItems = $this->get('SitemapItems'); $this->extensions = $this->get('Extensions'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Add router helpers. $this->item->slug = $this->item->alias ? ($this->item->id . ':' . $this->item->alias) : $this->item->id; $this->item->rlink = JRoute::_('index.php?option=com_xmap&view=xml&id=' . $this->item->slug); // Create a shortcut to the paramemters. $params = &$this->state->params; $offset = $this->state->get('page.offset'); if (!$this->item->params->get('access-view')) { if ($this->user->get('guest')) { // Redirect to login $uri = JFactory::getURI(); $app->redirect( 'index.php?option=com_users&view=login&return=' . base64_encode($uri), JText::_('Xmap_Error_Login_to_view_sitemap') ); return; } else { JError::raiseWarning(403, JText::_('Xmap_Error_Not_auth')); return; } } // Override the layout. if ($layout = $params->get('layout')) { $this->setLayout($layout); } // Load the class used to display the sitemap $this->loadTemplate('class'); $this->displayer = new XmapXmlDisplayer($params, $this->item); $this->displayer->setJView($this); $this->displayer->isNews = $isNewsSitemap; $this->displayer->isImages = $this->isImages; $this->displayer->canEdit = $this->canEdit; $doCompression = ($this->item->params->get('compress_xml') && !ini_get('zlib.output_compression') && ini_get('output_handler') != 'ob_gzhandler'); $this->endAllBuffering(); if ($doCompression) { ob_start(); } parent::display($tpl); $model = $this->getModel(); $model->hit($this->displayer->getCount()); if ($doCompression) { $data = ob_get_contents(); JResponse::setBody($data); @ob_end_clean(); echo JResponse::toString(true); } $this->recreateBuffering(); exit; } function displayXSL() { $this->setLayout('default'); $this->endAllBuffering(); parent::display('xsl'); $this->recreateBuffering(); exit; } private function endAllBuffering() { $this->_obLevel = ob_get_level(); while (ob_get_level()) { @ob_end_clean(); } } private function recreateBuffering() { while($this->_obLevel--) { ob_start(); } } } home/academiac/www/components/com_virtuemart/views/user/view.html.php 0000604 00000036532 15140422334 0022200 0 ustar 00 <?php /** * * List/add/edit/remove Users * * @package VirtueMart * @subpackage User * @author Oscar van Eijk * @author Max Milbers * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: view.html.php 6472 2012-09-19 08:46:21Z alatak $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if (!class_exists('VmView')) require(JPATH_VM_SITE . DS . 'helpers' . DS . 'vmview.php'); // Set to '0' to use tabs i.s.o. sliders // Might be a config option later on, now just here for testing. define('__VM_USER_USE_SLIDERS', 0); /** * HTML View class for maintaining the list of users * * @package VirtueMart * @subpackage User * @author Oscar van Eijk * @author Max Milbers */ class VirtuemartViewUser extends VmView { private $_model; private $_currentUser = 0; private $_cuid = 0; private $_userDetails = 0; private $_userFieldsModel = 0; private $_userInfoID = 0; private $_list = 0; private $_orderList = 0; private $_openTab = 0; /** * Displays the view, collects needed data for the different layouts * * Okey I try now a completly new idea. * We make a function for every tab and the display is getting the right tabs by an own function * putting that in an array and after that we call the preparedataforlayoutBlub * * @author Oscar van Eijk * @author Max Milbers */ function display($tpl = null) { $useSSL = VmConfig::get('useSSL', 0); $useXHTML = true; $this->assignRef('useSSL', $useSSL); $this->assignRef('useXHTML', $useXHTML); VmConfig::loadJLang('com_virtuemart_shoppers',TRUE); $mainframe = JFactory::getApplication(); $pathway = $mainframe->getPathway(); $layoutName = $this->getLayout(); // vmdebug('layout by view '.$layoutName); if (empty($layoutName) or $layoutName == 'default') { $layoutName = JRequest::getWord('layout', 'edit'); if ($layoutName == 'default'){ $layoutName = 'edit'; } $this->setLayout($layoutName); } if (empty($this->fTask)) { $ftask = 'saveUser'; $this->assignRef('fTask', $ftask); } if (!class_exists('ShopFunctions')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'shopfunctions.php'); // vmdebug('my layoutname',$layoutName); if ($layoutName == 'login') { parent::display($tpl); return; } if (!class_exists('VirtuemartModelUser')) require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'user.php'); $this->_model = new VirtuemartModelUser(); // $this->_model->setCurrent(); //without this, the administrator can edit users in the FE, permission is handled in the usermodel, but maybe unsecure? $editor = JFactory::getEditor(); //the cuid is the id of the current user $this->_currentUser = JFactory::getUser(); $this->_cuid = $this->_lists['current_id'] = $this->_currentUser->get('id'); $this->assignRef('userId', $this->_cuid); $this->_userDetails = $this->_model->getUser(); $this->assignRef('userDetails', $this->_userDetails); $address_type = JRequest::getWord('addrtype', 'BT'); $this->assignRef('address_type', $address_type); $new = false; if (JRequest::getInt('new', '0') == 1) { $new = true; } if ($new) { $virtuemart_userinfo_id = 0; } else { $virtuemart_userinfo_id = JRequest::getString('virtuemart_userinfo_id', '0', ''); } $this->assignRef('virtuemart_userinfo_id', $virtuemart_userinfo_id); $userFields = null; if ((strpos($this->fTask, 'cart') || strpos($this->fTask, 'checkout')) && empty($virtuemart_userinfo_id)) { //New Address is filled here with the data of the cart (we are in the cart) if (!class_exists('VirtueMartCart')) require(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php'); $cart = VirtueMartCart::getCart(); $fieldtype = $address_type . 'address'; $cart->prepareAddressDataInCart($address_type, $new, $this->_cuid); $userFields = $cart->$fieldtype; $task = JRequest::getWord('task', ''); } else { $userFields = $this->_model->getUserInfoInUserFields($layoutName, $address_type, $virtuemart_userinfo_id); if (!$new && empty($userFields[$virtuemart_userinfo_id])) { $virtuemart_userinfo_id = $this->_model->getBTuserinfo_id(); // vmdebug('Try to get $virtuemart_userinfo_id by type BT', $virtuemart_userinfo_id); } $userFields = $userFields[$virtuemart_userinfo_id]; $task = 'editaddressST'; } $this->assignRef('userFields', $userFields); if ($layoutName == 'edit') { if ($this->_model->getId() == 0 && $this->_cuid == 0) { $button_lbl = JText::_('COM_VIRTUEMART_REGISTER'); } else { $button_lbl = JText::_('COM_VIRTUEMART_SAVE'); } $this->assignRef('button_lbl', $button_lbl); $this->lUser(); $this->shopper($userFields); $this->payment(); $this->lOrderlist(); $this->lVendor(); } $this->_lists['shipTo'] = ShopFunctions::generateStAddressList($this,$this->_model, $task); if ($this->_openTab < 0) { $_paneOffset = array(); } else { if (__VM_USER_USE_SLIDERS) { $_paneOffset = array('startOffset' => $this->_openTab, 'startTransition' => 1, 'allowAllClose' => true); } else { $_paneOffset = array('startOffset' => $this->_openTab); } } $this->assignRef('lists', $this->_lists); $this->assignRef('editor', $editor); $this->assignRef('pane', $pane); if ($layoutName == 'mailregisteruser') { $vendorModel = VmModel::getModel('vendor'); // $vendorModel->setId($this->_userDetails->virtuemart_vendor_id); $vendor = $vendorModel->getVendor(); $this->assignRef('vendor', $vendor); } if ($layoutName == 'editaddress') { $layoutName = 'edit_address'; $this->setLayout($layoutName); } if (!$this->userDetails->JUser->get('id')) { $corefield_title = JText::_('COM_VIRTUEMART_USER_CART_INFO_CREATE_ACCOUNT'); } else { $corefield_title = JText::_('COM_VIRTUEMART_YOUR_ACCOUNT_DETAILS'); } if ((strpos($this->fTask, 'cart') || strpos($this->fTask, 'checkout'))) { $pathway->addItem(JText::_('COM_VIRTUEMART_CART_OVERVIEW'), JRoute::_('index.php?option=com_virtuemart&view=cart', FALSE)); } else { //$pathway->addItem(JText::_('COM_VIRTUEMART_YOUR_ACCOUNT_DETAILS'), JRoute::_('index.php?option=com_virtuemart&view=user&&layout=edit')); } $pathway_text = JText::_('COM_VIRTUEMART_YOUR_ACCOUNT_DETAILS'); if (!$this->userDetails->JUser->get('id')) { if ((strpos($this->fTask, 'cart') || strpos($this->fTask, 'checkout'))) { if ($address_type == 'BT') { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL'); } else { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'); } } else { if ($address_type == 'BT') { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL'); $title = JText::_('COM_VIRTUEMART_REGISTER'); } else { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'); } } } else { if ($address_type == 'BT') { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_BILLTO_LBL'); } else { $vmfield_title = JText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL'); } } $add_product_link=""; if(!class_exists('Permissions')) require(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_virtuemart' . DS . 'helpers' . DS . 'permissions.php'); if(!Permissions::getInstance()->isSuperVendor() or Vmconfig::get('multix','none')!=='none' ){ $add_product_link = JRoute::_( 'index.php?option=com_virtuemart&tmpl=component&view=product&view=product&task=edit&virtuemart_product_id=0' ); $add_product_link = $this->linkIcon($add_product_link, 'COM_VIRTUEMART_PRODUCT_ADD_PRODUCT', 'new', false, false, true, true); } $this->assignRef('add_product_link', $add_product_link); $document = JFactory::getDocument(); $document->setTitle($pathway_text); $pathway->additem($pathway_text); $document->setMetaData('robots','NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET'); $this->assignRef('page_title', $pathway_text); $this->assignRef('corefield_title', $corefield_title); $this->assignRef('vmfield_title', $vmfield_title); shopFunctionsF::setVmTemplate($this, 0, 0, $layoutName); parent::display($tpl); } function payment() { } function lOrderlist() { // Check for existing orders for this user $orders = VmModel::getModel('orders'); if ($this->_model->getId() == 0) { // getOrdersList() returns all orders when no userID is set (admin function), // so explicetly define an empty array when not logged in. $this->_orderList = array(); } else { $this->_orderList = $orders->getOrdersList($this->_model->getId(), true); if (empty($this->currency)) { if (!class_exists('CurrencyDisplay')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'); $currency = CurrencyDisplay::getInstance(); $this->assignRef('currency', $currency); } } if($this->_orderList){ VmConfig::loadJLang('com_virtuemart_orders',TRUE); } $this->assignRef('orderlist', $this->_orderList); } function shopper($userFields) { // Shopper info if (!class_exists('VirtueMartModelShopperGroup')) require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'shoppergroup.php'); $_shoppergroup = VirtueMartModelShopperGroup::getShoppergroupById($this->_model->getId()); if (!class_exists('Permissions')) require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php'); if (Permissions::getInstance()->check('admin,storeadmin')) { $shoppergrps = array(); foreach($_shoppergroup as $group){ $shoppergrps[] = $group['virtuemart_shoppergroup_id']; } $this->_lists['shoppergroups'] = ShopFunctions::renderShopperGroupList($shoppergrps); $this->_lists['vendors'] = ShopFunctions::renderVendorList($this->_userDetails->virtuemart_vendor_id); } else { $this->_lists['shoppergroups'] = ''; foreach($_shoppergroup as $group){ $this->_lists['shoppergroups'] .= $group['shopper_group_name'].', '; } $this->_lists['shoppergroups'] = substr($this->_lists['shoppergroups'],0,-2); if (!empty($this->_userDetails->virtuemart_vendor_id)) { $this->_lists['vendors'] = $this->_userDetails->virtuemart_vendor_id; } if (empty($this->_lists['vendors'])) { $this->_lists['vendors'] = JText::_('COM_VIRTUEMART_USER_NOT_A_VENDOR'); // . $_setVendor; } } // Load the required scripts if (count($userFields['scripts']) > 0) { foreach ($userFields['scripts'] as $_script => $_path) { JHTML::script($_script, $_path); } } // Load the required styresheets if (count($userFields['links']) > 0) { foreach ($userFields['links'] as $_link => $_path) { JHTML::stylesheet($_link, $_path); } } } function lUser() { $_groupList = $this->_model->getGroupList(); if (!is_array($_groupList)) { $this->_lists['gid'] = '<input type="hidden" name="gid" value="' . $this->_userDetails->JUser->get('gid') . '" /><strong>' . JText::_($_groupList) . '</strong>'; } else { $this->_lists['gid'] = JHTML::_('select.genericlist', $_groupList, 'gid', 'size="10"', 'value', 'text', $this->_userDetails->JUser->get('gid')); } if (!class_exists('shopFunctionsF')) require(JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php'); $comUserOption = shopFunctionsF::getComUserOption(); $this->_lists['canBlock'] = ($this->_currentUser->authorize($comUserOption, 'block user') && ($this->_model->getId() != $this->_cuid)); // Can't block myself TODO I broke that, please retest if it is working again $this->_lists['canSetMailopt'] = $this->_currentUser->authorize('workflow', 'email_events'); $this->_lists['block'] = JHTML::_('select.booleanlist', 'block', 'class="inputbox"', $this->_userDetails->JUser->get('block'), 'COM_VIRTUEMART_YES', 'COM_VIRTUEMART_NO'); $this->_lists['sendEmail'] = JHTML::_('select.booleanlist', 'sendEmail', 'class="inputbox"', $this->_userDetails->JUser->get('sendEmail'), 'COM_VIRTUEMART_YES', 'COM_VIRTUEMART_NO'); $this->_lists['params'] = $this->_userDetails->JUser->getParameters(true); $this->_lists['custnumber'] = $this->_model->getCustomerNumberById(); //TODO I do not understand for what we have that by Max. if ($this->_model->getId() < 1) { $this->_lists['register_new'] = 1; } else { $this->_lists['register_new'] = 0; } } function lVendor() { // If the current user is a vendor, load the store data if ($this->_userDetails->user_is_vendor) { $front = JURI::root(true).'/components/com_virtuemart/assets/'; $admin = JURI::root(true).'/administrator/components/com_virtuemart/assets/'; $document = JFactory::getDocument(); $document->addScript($front.'js/fancybox/jquery.mousewheel-3.0.4.pack.js'); $document->addScript($front.'js/fancybox/jquery.easing-1.3.pack.js'); $document->addScript($front.'js/fancybox/jquery.fancybox-1.3.4.pack.js'); vmJsApi::js ('jquery-ui', FALSE, '', TRUE); vmJsApi::js ('jquery.ui.autocomplete.html'); vmJsApi::js( 'jquery.noConflict'); $document->addScript($admin.'js/vm2admin.js'); $currencymodel = VmModel::getModel('currency', 'VirtuemartModel'); $currencies = $currencymodel->getCurrencies(); $this->assignRef('currencies', $currencies); if (!$this->_orderList) { $this->lOrderlist(); } $vendorModel = VmModel::getModel('vendor'); if (Vmconfig::get('multix', 'none') === 'none') { $vendorModel->setId(1); } else { $vendorModel->setId($this->_userDetails->virtuemart_vendor_id); } $vendor = $vendorModel->getVendor(); $vendorModel->addImages($vendor); $this->assignRef('vendor', $vendor); } } /* * renderMailLayout * * @author Max Milbers * @author Valerie Isaksen */ public function renderMailLayout($doVendor, $recipient) { $useSSL = VmConfig::get('useSSL', 0); $useXHTML = true; $this->assignRef('useSSL', $useSSL); $this->assignRef('useXHTML', $useXHTML); $userFieldsModel = VmModel::getModel('UserFields'); $userFields = $userFieldsModel->getUserFields(); $this->userFields = $userFieldsModel->getUserFieldsFilled($userFields, $this->user); if (VmConfig::get('order_mail_html')) { $mailFormat = 'html'; $lineSeparator="<br />"; } else { $mailFormat = 'raw'; $lineSeparator="\n"; } $virtuemart_vendor_id=1; $vendorModel = VmModel::getModel('vendor'); $vendor = $vendorModel->getVendor($virtuemart_vendor_id); $vendorModel->addImages($vendor); $vendor->vendorFields = $vendorModel->getVendorAddressFields(); $this->assignRef('vendor', $vendor); if (!$doVendor) { $this->subject = JText::sprintf('COM_VIRTUEMART_NEW_SHOPPER_SUBJECT', $this->user->username, $this->vendor->vendor_store_name); $tpl = 'mail_' . $mailFormat . '_reguser'; } else { $this->subject = JText::sprintf('COM_VIRTUEMART_VENDOR_NEW_SHOPPER_SUBJECT', $this->user->username, $this->vendor->vendor_store_name); $tpl = 'mail_' . $mailFormat . '_regvendor'; } $this->assignRef('recipient', $recipient); $this->vendorEmail = $vendorModel->getVendorEmail($this->vendor->virtuemart_vendor_id); $this->layoutName = $tpl; $this->setLayout($tpl); parent::display(); } } //No Closing Tag home/academiac/www/components/com_users/views/login/view.html.php 0000644 00000005311 15140434264 0021271 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_users * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Login view class for Users. * * @package Joomla.Site * @subpackage com_users * @since 1.5 */ class UsersViewLogin extends JViewLegacy { protected $form; protected $params; protected $state; protected $user; /** * Method to display the view. * * @param string The template file to include * @since 1.5 */ public function display($tpl = null) { // Get the view data. $this->user = JFactory::getUser(); $this->form = $this->get('Form'); $this->state = $this->get('State'); $this->params = $this->state->get('params'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // Check for layout override $active = JFactory::getApplication()->getMenu()->getActive(); if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } //Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx')); $this->prepareDocument(); parent::display($tpl); } /** * Prepares the document * @since 1.6 */ protected function prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $user = JFactory::getUser(); $login = $user->get('guest') ? true : false; $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', $login ? JText::_('JLOGIN') : JText::_('JLOGOUT')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } }
©
2018.