Пример #1
0
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
//set variables, usually set by shopfunctionsf::getLoginForm in case this layout is differently used
if (!isset($this->show)) {
    $this->show = TRUE;
}
if (!isset($this->from_cart)) {
    $this->from_cart = FALSE;
}
if (!isset($this->order)) {
    $this->order = FALSE;
}
if (!class_exists('shopFunctionsF')) {
    require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
}
$comUserOption = shopFunctionsF::getComUserOption();
if (empty($this->url)) {
    $url = vmURI::getCleanUrl();
} else {
    $url = $this->url;
}
$user = JFactory::getUser();
if ($this->show and $user->id == 0) {
    JHtml::_('behavior.formvalidation');
    JHTML::_('behavior.modal');
    //Extra login stuff, systems like openId and plugins HERE
    if (JPluginHelper::isEnabled('authentication', 'openid')) {
        $lang = JFactory::getLanguage();
        $lang->load('plg_authentication_openid', JPATH_ADMINISTRATOR);
        $langScript = '
//<![CDATA[
Пример #2
0
 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;
     }
 }