public function content()
    {
        global $CONFIG, $STRINGS;
        return '
		<section id="user-account" class="well min-table">
		' . MenuHelper::admin_submenu('account', $this->_data->user) . '
		<form action="' . $CONFIG->wwwroot . '/admin/users/' . $this->_data->user->id . '/updateaccount"  method="post">
		<label>' . Lang::get('uuid') . '</label>
		<input type="text" class="span4" name="uuid" placeholder="00000000-0000-0000-0000-000000000000">

		<label>' . $STRINGS['mac'] . '</label>
		<input type="text" class="span4" name="mac" placeholder="00:00:00:00:00:00">
		
		<label></label>
		<input type="submit" class="btn" value="' . Lang::get('update') . '">
		</form>
		<small>' . Lang::get('useraccountnotice') . '</small>
		<hr>
		<form action="' . $CONFIG->wwwroot . '/admin/users/' . $this->_data->user->id . '/delete" method="post">
		<input type="submit" class="btn btn-danger" value="' . $STRINGS['event:delete:account'] . '">
		<span class="help-inline">' . $STRINGS['event:delete:account:warning'] . '</span>
		</form>
		</section>
		';
    }
示例#2
0
 public static function getInstance()
 {
     if (null === self::$instance) {
         self::$instance = new MenuHelper();
     }
     return self::$instance;
 }
    public function content()
    {
        global $CONFIG, $STRINGS;
        $selected_user = $this->_data->user->role == 'user' ? 'SELECTED' : '';
        $selected_admin = $this->_data->user->role == 'admin' ? 'SELECTED' : '';
        return '
		<section id="user-details" class="well">
		' . MenuHelper::admin_submenu('details', $this->_data->user) . '
		<form action="' . $CONFIG->wwwroot . '/admin/users/' . $this->_data->user->id . '/update"  method="post">
		<label>' . $STRINGS['firstname'] . '</label>
		<input type="text" name="firstname" value="' . $this->_data->user->firstname . '">

		<label>' . $STRINGS['lastname'] . '</label>
		<input type="text" name="lastname" value="' . $this->_data->user->lastname . '">

		<label>' . $STRINGS['identifier'] . '</label>
		<input type="text" name="identifier" value="' . $this->_data->user->identifier . '">

		<label>' . $STRINGS['position'] . '</label>
		<input type="text" name="position" value="' . $this->_data->user->position . '">

		<label>' . $STRINGS['role'] . '</label>
		<select name="role">
		<option ' . $selected_user . '>user</option>
		<option ' . $selected_admin . '>admin</option>
		</select>
		<label></label>
		<button type="submit" class="btn">' . $STRINGS['update'] . '</button>
		</form>
		</section>';
    }
示例#4
0
 /**
  * Display the Message templates view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 function display($tpl = null)
 {
     // Get data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Add menu helper file
     require_once JPATH_COMPONENT . '/helpers/menu.php';
     // Add sidebar
     MenuHelper::addSubmenu('messagetemplates');
     // Load message type model
     $model = JModelLegacy::getInstance('messagetype', 'IssnregistryModel');
     // Load message types
     $types = $model->getMessageTypesHash();
     // Pass $types to the layout
     $this->assignRef('types', $types);
     // Set the toolbar
     $this->addToolBar();
     // Render the sidebar
     $this->sidebar = JHtmlSidebar::render();
     // Display the template
     parent::display($tpl);
 }
    /**
     * Returns the html that builds the user menu, and sets the active element,
     * based on the parameters. Contains a "log out" option.
     *
     * @global type $CONFIG  global configuration variable
     * @param string $active  string that defines the active element of the menu
     * @return type  html
     */
    public static function user_base_menu($active)
    {
        global $CONFIG;
        $activity = $report = $profile = null;
        ${$active} = 'class="active"';
        return '<ul class="nav">
			    <li ' . $activity . '><a href="' . $CONFIG->wwwroot . '/user/activity">' . Lang::get('activity') . '</a></li>
				<li ' . $report . '><a href="' . $CONFIG->wwwroot . '/user/report">' . Lang::get('report') . '</a></li>
	            <li ' . $profile . '><a href="' . $CONFIG->wwwroot . '/user/profile">' . Lang::get('profile') . '</a></li>
        	</ul>' . MenuHelper::get_logout_option();
    }
 public function beforeRender()
 {
     $userId = $this->session->read('uid');
     $loggedIn = !empty($userId);
     // ak je prihlaseny iba vtedy ma zmysel kreslit menu a vyber semestra
     if ($loggedIn) {
         $menu = new Menu();
         $periods = new Periods();
         $menuHelper = new MenuHelper();
         $selSemester = $this->session->read('semester');
         $semesterHtml = $menuHelper->renderSemester($periods->getShortAll(), $selSemester, $this->url);
         $menuItems = $menu->getForUser($userId);
         $admin = $this->session->read("admin");
         $adminActing = isset($admin);
         $menuHtml = $menuHelper->render($menuItems, $adminActing);
     } else {
         $menuHtml = $semesterHtml = "";
     }
     $this->addToTemplate("SEMESTER", $semesterHtml);
     $this->addToTemplate("MENU", $menuHtml);
     $helpHtml = "<a target='_BLANK' href='{$this->helpLink}'>Help</a>";
     $this->addToTemplate('HELP', $helpHtml);
 }
    public function content()
    {
        global $CONFIG, $STRINGS;
        $this->_data->week == date('W') ? $next = false : ($next = true);
        if (empty($this->_data->intervals)) {
            return BootstrapHelper::alert('info', Lang::get('event:noactivity'), Lang::get('event:noactivitythisweek:message'));
        }
        $intervals_list = '<table class="table inner-table">';
        foreach ($this->_data->intervals as $interval) {
            $intervals_list .= '<tr>
			<td>' . $interval->d . 'd ' . $interval->h . 'h  ' . $interval->i . 'm  ' . $interval->s . 's</td>
			<td><span class="label label-success">
			' . date('G:i:s D M j Y', $interval->timestart) . '
			</span></td>
			<td><span class="label label-important">
			' . date('G:i:s D M j Y', $interval->timestop) . '
			</span></td>
			</tr>';
        }
        $intervals_list .= '</table>';
        $incidences_list = '<ul>';
        foreach ($this->_data->incidences as $incidence) {
            $incidences_list .= '<li>
			<span class="label label-warning">
			' . date('G:i:s D M j Y', $incidence->timestamp) . '
			</span>
			</li>';
        }
        $incidences_list .= '</ul>';
        $monday = date('d/m/Y', strtotime('Last Monday', mktime(1, 1, 1, 1, 7 * $this->_data->week, date('Y'))));
        $sunday = date('d/m/Y', strtotime('Next Sunday', mktime(1, 1, 1, 1, 7 * $this->_data->week, date('Y'))));
        return '
		<section id="user-activity" class="well">
		<div class="week-header">
		<b>' . Lang::get('period') . '</b> ' . $monday . ' - ' . $sunday . '
		</div>
		<table class="table report-table">
		<tr>
		<td><strong>' . $STRINGS['intervals'] . ' </strong></td>
		<td>' . $intervals_list . '</td>
		</tr>
		<tr>
		<td><strong>' . $STRINGS['incidences'] . '</strong></td>
		<td>' . $incidences_list . '</td>
		</tr>
		</table>
		' . MenuHelper::get_pagination_links($CONFIG->wwwroot . '/user/activity/', $this->_data->week, $next) . '
		<div class="container"></div>
		</section>';
    }
示例#8
0
 public static function initMenu($controller)
 {
     self::$samplesMenu = array(array('label' => 'Detected', 'url' => array('/manage/samples?status=detected'), 'active' => isset($_GET['status']) && $_GET['status'] == 'detected'), array('label' => 'Clean', 'url' => array('/manage/samples?status=clean'), 'active' => isset($_GET['status']) && $_GET['status'] == 'clean'), array('label' => 'URLs', 'url' => array('/manage/urls')));
     self::$subMenuMap['bogus'] = self::$bogusMenu;
     if (in_array(strtolower($controller->action->id), array('samples', 'urls', 'bogus'))) {
         self::$subMenuMap['manage'] = self::$samplesMenu;
     } else {
         self::$subMenuMap['manage'] = self::$administrationMenu;
     }
     self::$subMenuMap['statistics'] = self::$administrationMenu;
     self::$subMenuMap['internaluser'] = array_merge(self::$administrationMenu, self::$subMenuMap['internaluser']);
     self::$subMenuMap['externaluser'] = self::$administrationMenu;
     self::$init = true;
     return true;
 }
    public function content()
    {
        global $CONFIG, $STRINGS;
        $users_table_content = '';
        if (empty($this->_data->users)) {
            return BootstrapHelper::alert('info', $STRINGS['event:nousers'], $STRINGS['event:nouser:message']);
        }
        //check if there is a next page
        $this->_data->page + 1 < UserModel::pages() ? $next = true : ($next = false);
        foreach ($this->_data->users as $user) {
            $users_table_content .= '
			<tr>
			<td>' . $user->id . '</td>
			<td>' . utf8_encode($user->firstname) . '</td>
			<td>' . utf8_encode($user->lastname) . '</td>
			<td>' . $user->role . '</td>
			<td>' . $user->position . '</td>
			<td><a href="' . $CONFIG->wwwroot . '/admin/users/' . $user->id . '/details">' . $user->identifier . '</a></td>
			</tr>
			';
        }
        return '
		<section id="users" class="well">
		<table class="table">
		<thead>
		<tr>
		<th>#</th>
		<th>' . $STRINGS['firstname'] . '</th>
		<th>' . $STRINGS['lastname'] . '</th>
		<th>' . $STRINGS['role'] . '</th>
		<th>' . $STRINGS['position'] . '</th>
		<th>' . $STRINGS['identifier'] . '</th>
		</tr>
		</thead>
		<tbody>
		' . $users_table_content . '
		</tbody>
		</table>
		<form action="' . $CONFIG->wwwroot . '/admin/users/new/add" method="post">
		<button class="btn btn-success ">+ ' . $STRINGS['add:user'] . '</button>
		' . MenuHelper::get_pagination_links($CONFIG->wwwroot . '/admin/users/', $this->_data->page, $next) . '
		</form>

		</section>';
    }
    public function content()
    {
        global $CONFIG;
        if (empty($this->_data->activity)) {
            return BootstrapHelper::alert('info', Lang::get('event:noactivity'), Lang::get('event:noactivity:message'));
        }
        //check if there is a next page (page count starts at 0 thus the +1)
        $this->_data->page + 1 < ActivityModel::pages() ? $next = true : ($next = false);
        $activity_table_content = '';
        foreach ($this->_data->activity as $entry) {
            $activity_table_content .= '<tr>
			<td>' . $entry->id . '</td>
			<td><span class="label ' . BootstrapHelper::get_label_for_action($entry->action) . '">' . BootstrapHelper::get_event_description($entry->action) . '</span></td>
			<td>' . Lang::get('dayofweek' . date('N', $entry->timestamp)) . '</td>
			<td>' . date('d/m/Y', $entry->timestamp) . '</td>
			<td>' . date('G:i:s', $entry->timestamp) . '</td>
			<td>' . utf8_encode($entry->firstname) . '</td>
			<td>' . utf8_encode($entry->lastname) . '</td>
			<td><a href="' . $CONFIG->wwwroot . '/admin/users/' . $entry->userid . '/details">' . $entry->identifier . '</a></td>
			</tr>
			';
        }
        return '
		<section id="activity" class="well">
		<table class="table">
		<thead>
		<tr>
		<th>#</th>
		<th>' . Lang::get('action') . '</th>
		<th>' . Lang::get('day') . '</th>
		<th>' . Lang::get('date') . '</th>
		<th>' . Lang::get('time') . '</th>
		<th>' . Lang::get('firstname') . '</th>
		<th>' . Lang::get('lastname') . '</th>
		<th>' . Lang::get('identifier') . '</th>
		</tr>
		</thead>
		<tbody>' . $activity_table_content . '
		</tbody>
		</table>
		' . MenuHelper::get_pagination_links($CONFIG->wwwroot . '/admin/activity/', $this->_data->page, $next) . '
		<div class="container"></div>
		</section>';
    }
示例#11
0
 /**
  * Display the Message types view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 function display($tpl = null)
 {
     // Get data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Add menu helper file
     require_once JPATH_COMPONENT . '/helpers/menu.php';
     // Add sidebar
     MenuHelper::addSubmenu('messagetypes');
     // Set the toolbar
     $this->addToolBar();
     // Render the sidebar
     $this->sidebar = JHtmlSidebar::render();
     // Display the template
     parent::display($tpl);
 }
示例#12
0
 /**
  * Display the Forms view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 function display($tpl = null)
 {
     // Get data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Get filter status
     $filterStatus = $this->state->get('filter.status');
     // Add menu helper file
     require_once JPATH_COMPONENT . '/helpers/menu.php';
     // Add sidebar
     if ($filterStatus == 2) {
         MenuHelper::addSubmenu('forms_not_notified');
     } else {
         if ($filterStatus == 3) {
             MenuHelper::addSubmenu('forms_completed');
         } else {
             if ($filterStatus == 4) {
                 MenuHelper::addSubmenu('forms_rejected');
             } else {
                 MenuHelper::addSubmenu('forms_not_handled');
             }
         }
     }
     // Set the toolbar
     $this->addToolBar();
     // Render the sidebar
     $this->sidebar = JHtmlSidebar::render();
     // Display the template
     parent::display($tpl);
 }
 public function menu()
 {
     return MenuHelper::user_base_menu('profile');
 }
示例#14
0
<?php

$page = $Core->SelectObj($data, $Core->GetVar($_GET, 'pid', DEFAULT_PAGE));
echo MenuHelper::GetBuilder($data, $page)->getBreadcrumenHTML($page->menu, $params);
示例#15
0
<?php

$page = $Core->SelectObj($data, $Core->GetVar($_GET, 'pid', DEFAULT_PAGE));
$builder = MenuHelper::GetBuilder($data, $page);
?>

<div class="hlist">
<?php 
echo $builder->getHTML($page->menu, $params);
?>
</div>
 public function menu()
 {
     return MenuHelper::admin_base_menu('report');
 }
示例#17
0
 public function init()
 {
     $this->menuItems = MenuHelper::getSubMenuItems($this->controller);
 }
示例#18
0
				<div class="phone indent-top1">
					<img src="images/icons/phone-touch.png" alt="Phone">
					<?php 
echo UtilsHelper::Settings("telephone");
?>
				</div>
			</address>
		</div>
	</div>
</div>
<div class="one-third column alpha omega indent-right2 border-right">
	<div class="five columns">
		<div class="indent-left1 indent-top2">
			<nav>
<?php 
echo MenuHelper::get_menu_by_tag("website_menu_main", array('depth' => 1, 'mainMasterClass' => 'menu-bottom', 'currentAClass' => 'selected', 'splitElements' => 4));
/*
				<ul class="menu-bottom">
					<li><a class="selected" href="/">home</a></li>
					<li><a href="web_services">web services</a></li>
					<li><a href="offline_services">offline services</a></li>
					<li><a href="portfolio.html">portfolio</a></li>
				</ul>
				<ul class="menu-bottom">
					<li><a href="about_us.html">about us</a></li>
					<li><a href="http://blog.donecollective.com">blog</a></li>
					<li><a href="contacts.html">contacts</a></li>
					<li><a class="last" href="get_a_quote">get a quote</a></li>
				</ul>
*/
?>
示例#19
0
    ?>
</a></h5>
            <p class="date">Date: <?php 
    echo UtilsHelper::Date($n->getStartDate(), "M. j, Y");
    ?>
</p>
		</li>
		<?php 
}
?>
    </ul>
</div>
<div class="tree-col-c">
	<h4>Useful Information</h4>
    <?php 
echo MenuHelper::get_menu_by_tag("website_menu_subfooter", array('depth' => 1, 'mainMasterClass' => 'subf-menu'));
?>
</div>
<div class="tree-col-r">
	<h4><?php 
echo UtilsHelper::Localize("website.frontend.Contact-us-subfooter");
?>
</h4>
    <p>Mobile: phone</p>
	<p>E-mail: <a href="#">email</a></p>
	<p><a href="contact-us.html">Write us a message</a></p>
<p><a href="#" style="margin-right:5px;"><img src="/images//facebook.png"/></a></p>
</div>
<div class="clear"></div>
<script type="text/javascript">
$(document).ready(function () {
 public function menu()
 {
     return MenuHelper::admin_base_menu('users');
 }
示例#21
0
 function __construct()
 {
     parent::__construct();
 }
 public function getRadioMenuType($none = true)
 {
     return array('type' => 'radio', 'container_class' => 'item_type', 'class' => 't menu-list', 'label' => $this->l('Item type'), 'name' => 'type', 'values' => MenuHelper::getMenuTypeRadio($none), 'desc' => $this->l('Choose type of item'));
 }
 private function render($viewData)
 {
     //if this is an AJAX request, don't use the template
     if (@$_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
         echo $viewData;
     } else {
         $t = new XTemplate("index.tpl");
         $flash_class = $this->session->read('flash_class');
         switch ($flash_class) {
             case "error":
                 $flash_class = "ui-state-error";
                 $icon_class = "ui-icon-alert";
                 break;
             default:
                 $flash_class = "ui-state-highlight";
                 $icon_class = "ui-icon-info";
                 // warning
         }
         $flash_class .= " ui-corner-all";
         $icon_class .= " ui-icon";
         $flash = $this->session->read('flash');
         $flashHTML = "<div class='ui-widget' style='padding-bottom: 5px;'>" . "   <div class='{$flash_class}' style='padding: 5px 5px 5px 5px;'>" . "   <p><span class='{$icon_class}' style='float: left; margin-right: .3em;'></span>" . "   {$flash}" . "   </p>" . "   </div>" . "</div>";
         $default = array('TOP_MENU' => '', 'CONTENT' => $viewData, 'FLASH' => $flash ? $flashHTML : '', 'SVN_VERSION' => SVN_VERSION);
         if ($this->legacy) {
             $menu = new Menu();
             $menuHelper = new MenuHelper();
             $userId = $this->session->read('uid');
             if (!empty($userId)) {
                 $menuItems = $menu->getForUser($userId);
                 $menuHtml = $menuHelper->render($menuItems, true);
                 $default["MENU"] = $menuHtml;
             }
         }
         if (method_exists($this->controller, 'getTemplateParts')) {
             $t->assign(array_merge($default, $this->controller->getTemplateParts()));
         } else {
             $t->assign($default);
         }
         $t->parse('PAGE');
         echo $t->text('PAGE');
         $this->session->clear('flash');
         $this->session->clear('flash_class');
         if (DEBUG) {
             $this->dumpDebugInfo();
         }
     }
 }
示例#24
0
<!--<ul id="menu">
	<li class="current"><a href="index.html">ЗА НАС</a></li>
	<li><a href="blog-1.html">BLOG</a>
		<ul>
			<li><a href="blog-1.html">BLOG STYLE #1</a></li>
			<li><a href="blog-2.html">BLOG STYLE #2</a></li>
		</ul>
	</li>
	<li><a href="portfolio-3c.html">PORTFOLIO</a>
		<ul>
			<li><a href="portfolio-3c.html">PORTFOLIO &#8211; 3 COLUMNS</a></li>
			<li><a href="portfolio-2c.html">PORTFOLIO &#8211; 2 COLUMNS</a></li>							
		</ul>
	</li>
	<li><a href="gallery.html">GALLERY</a></li>
	<li><a href="#">STYLINGS</a>
		<ul>
			<li><a href="stylings-texts.html">TEXTS</a></li>
			<li><a href="stylings-table_columns.html">TABLE &#038; COLUMNS</a></li>
			<li><a href="stylings-tabs_toggles.html">TABS, TOGGLES &#038; CAROUSEL</a></li>
				<li><a href="stylings-images_videos.html">IMAGES &#038; VIDEOS</a></li>
			<li><a href="stylings-contact_buttons.html">CONTACT FORM &#038; BUTTONS</a></li>
		</ul>
	</li>
</ul>-->


<?php 
echo MenuHelper::get_menu_by_tag("website_menu_main", array('depth' => 2, 'mainMasterId' => 'menu', 'currentItemClass' => 'current', 'inPath' => true));
示例#25
0
            if (!empty(Yii::app()->session['confirm_site_and_firm'])) {
                ?>
				<script type="text/javascript">
					$(document).ready(function(){
						$('.change-firm a').trigger('click');
					});
				</script>
				<?php 
            }
        }
    }
    if (empty(Yii::app()->session['user'])) {
        Yii::app()->session['user'] = User::model()->findByPk(Yii::app()->user->id);
    }
    $user = Yii::app()->session['user'];
    $menuHelper = new MenuHelper(Yii::app()->params['menu_bar_items'], Yii::app()->user, $uri);
    ?>

	<div class="panel user">
		<?php 
    echo $menuHelper->render();
    ?>
		<div class="row">
			<div class="large-3 column">
				<div class="user-id">
					You are logged in as:
					<div class="user-name">
						<?php 
    if (Yii::app()->params['profile_user_can_edit']) {
        ?>
							<a href="<?php 
示例#26
0
 function partialView($filename)
 {
     $this->page_active = strtolower(get_class($this));
     $this->menuHelper = MenuHelper::getInstance();
     $pages = $this->menuHelper->getNavBar($this->page_active, $this->sub_menu_active);
     $addmarging = strcmp(get_class($this), "Accueil") === 0 ? "margin-0" : "margin_bottom40";
     if (!empty($this->vars)) {
         foreach ($this->vars as $key => $value) {
             $this->tpl->assign($key, $value);
         }
     }
     $uri = Uri::getInstance()->getFragment();
     $home = "";
     if (isset($uri[0])) {
         $home = $uri[0];
         unset($uri[0]);
     }
     $this->displayTpl($filename);
 }
示例#27
0
<?php

echo MenuHelper::get_menu_by_tag("website_menu_main", array('depth' => 1, 'mainMasterClass' => 'menu-top', 'currentAClass' => 'selected', 'lastItemClass' => 'last'));