Beispiel #1
0
 function details()
 {
     $juser =& JFactory::getUser();
     $username = JRequest::getString('user', $juser->username);
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'general.php';
     $profile_id = generalHelpers::getUserId($username);
     if (is_null($profile_id)) {
         $profile_id = $juser->id;
     }
     $id = JRequest::getInt('id');
     $rows = new stdClass();
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'user.php';
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'wedding.php';
     $tmpl = userHelpers::getCurrentTemplate($profile_id);
     $css = weddingHelper::getTemplateFolder('css', $tmpl->code);
     $images = weddingHelper::getTemplateFolder('images', $tmpl->code);
     $rows->images = $images;
     $rows->css = $css;
     $rows->menu = userHelpers::getUserMenu($profile_id);
     $this->_view->addTemplatePath(JPATH_COMPONENT . DS . 'templates' . DS . $tmpl->code . DS);
     $rows->userdata = userHelpers::getUserData($profile_id);
     $rows->photos = $this->_model->getPhotos($id);
     $this->_view->setLayout('index');
     $this->_view->details($rows);
 }
Beispiel #2
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = weddingHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('Users'), 'user.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_wedding', 'core.create')) > 0) {
         JToolBarHelper::addNew('user.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('user.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('users.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('users.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('users.archive');
         JToolBarHelper::checkin('users.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'users.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('users.trash');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_wedding');
     }
 }
    ?>
" value="<?php 
    echo $tpl->id;
    ?>
" />
					<label for="tpl_<?php 
    echo $tpl->id;
    ?>
"><?php 
    echo $tpl->title;
    ?>
</label>
				</div>
				<div class="thumbnail">
					<img src="<?php 
    echo weddingHelper::getTemplateFolder('', $tpl->code) . 'template_thumbnail.png';
    ?>
" />
				</div>
			</div>
			
	<?php 
    $i++;
    if ($i % 2 == 0) {
        echo '<div style="clear:both"><span></span></div>';
    }
}
?>

	<div style="clear:both"><span></span></div>
	</fieldset>