| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?php defined('BX_DOL') or die('hack attempt');
- /**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup UnaStudio UNA Studio
- * @{
- */
- define('BX_DOL_STUDIO_MT_LEFT', 'left');
- define('BX_DOL_STUDIO_MT_CENTER', 'center');
- define('BX_DOL_STUDIO_MT_RIGHT', 'right');
- define('BX_DOL_STUDIO_MTB_CIRCLE', 'circ');
- define('BX_DOL_STUDIO_MTB_RECTANGLE', 'rect');
- class BxDolStudioMenuTop extends BxDol
- {
- protected $aItems;
- protected $aVisible;
- function __construct()
- {
- parent::__construct();
- $this->aVisible = array(
- BX_DOL_STUDIO_MT_LEFT => false,
- BX_DOL_STUDIO_MT_CENTER => false,
- BX_DOL_STUDIO_MT_RIGHT => false
- );
- $this->aItems[BX_DOL_STUDIO_MT_LEFT] = array(
- 'edit' => array(
- 'name' => 'edit',
- 'icon' => 'move',
- 'onclick' => $this->getJsObject() . '.clickEdit(this);',
- 'title' => '_adm_tmi_cpt_edit'
- ),
- 'favorite' => array(
- 'name' => 'favorite',
- 'icon' => 'star',
- 'onclick' => $this->getJsObject() . '.clickFavorite(this);',
- 'title' => '_adm_tmi_cpt_favorite'
- ),
- 'extensions' => array(
- 'name' => 'extensions',
- 'icon' => 'plus',
- 'link' => BX_DOL_URL_STUDIO . 'store.php?page=goodies',
- 'title' => '_adm_tmi_cpt_extensions'
- ),
- );
- $aMatch = array();
- $iResult = preg_match("/^(https?:\/\/)?(.*)\/$/", BX_DOL_URL_ROOT, $aMatch);
- $this->aItems[BX_DOL_STUDIO_MT_CENTER] = $iResult ? $aMatch[2] : '';
- $this->aItems[BX_DOL_STUDIO_MT_RIGHT] = array(
- 'tour' => array(
- 'name' => 'tour',
- 'icon' => 'question',
- 'link' => 'javascript:void(0);',
- 'onclick' => 'glTour.start()',
- 'title' => '_adm_tmi_cpt_tour'
- ),
- 'site' => array(
- 'name' => 'site',
- 'icon' => 'home',
- 'link' => BX_DOL_URL_ROOT,
- 'title' => '_adm_tmi_cpt_site'
- ),
- 'logout' => array(
- 'name' => 'logout',
- 'icon' => 'power-off',
- 'link' => BX_DOL_URL_ROOT . 'logout.php',
- 'onclick' => $this->getJsObject() . ".clickLogout(this);",
- 'title' => '_adm_tmi_cpt_logout'
- )
- );
- }
- function setVisible($sPosition, $bValue)
- {
- $this->aVisible[$sPosition] = $bValue;
- }
- function setVisibleAll()
- {
- $this->aVisible = array(
- BX_DOL_STUDIO_MT_LEFT => true,
- BX_DOL_STUDIO_MT_CENTER => true,
- BX_DOL_STUDIO_MT_RIGHT => true
- );
- }
- }
- /** @} */
|