当前位置: 首页>>代码示例>>PHP>>正文


PHP displayStudioForCurrentUser函数代码示例

本文整理汇总了PHP中displayStudioForCurrentUser函数的典型用法代码示例。如果您正苦于以下问题:PHP displayStudioForCurrentUser函数的具体用法?PHP displayStudioForCurrentUser怎么用?PHP displayStudioForCurrentUser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了displayStudioForCurrentUser函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 function display()
 {
     global $app_strings, $current_user, $mod_strings, $theme;
     if (is_dir("themes/{$theme}/ext/resources/css")) {
         $cssDir = opendir("themes/{$theme}/ext/resources/css");
     }
     $smarty = new Sugar_Smarty();
     $type = !empty($_REQUEST['type']) ? $_REQUEST['type'] : 'main';
     $mbt = false;
     $admin = false;
     $mb = strtolower($type);
     $smarty->assign('TYPE', $type);
     $smarty->assign('app_strings', $app_strings);
     $smarty->assign('mod', $mod_strings);
     //Replaced by javascript function "setMode"
     switch ($type) {
         case 'studio':
             //$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
             require_once 'modules/ModuleBuilder/Module/StudioTree.php';
             $mbt = new StudioTree();
             break;
         case 'mb':
             //$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=")');
             require_once 'modules/ModuleBuilder/MB/MBPackageTree.php';
             $mbt = new MBPackageTree();
             break;
         case 'dropdowns':
             // $admin = is_admin($current_user);
             require_once 'modules/ModuleBuilder/Module/DropDownTree.php';
             $mbt = new DropDownTree();
             break;
         default:
             //$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=home")');
             require_once 'modules/ModuleBuilder/Module/MainTree.php';
             $mbt = new MainTree();
     }
     $smarty->assign('TEST_STUDIO', displayStudioForCurrentUser());
     $smarty->assign('ADMIN', is_admin($current_user));
     $smarty->display('modules/ModuleBuilder/tpls/includes.tpl');
     if ($mbt) {
         $smarty->assign('TREE', $mbt->fetch());
         $smarty->assign('TREElabel', $mbt->getName());
     }
     $userPref = $current_user->getPreference('mb_assist', 'Assistant');
     if (!$userPref) {
         $userPref = "na";
     }
     $smarty->assign('userPref', $userPref);
     ///////////////////////////////////
     require_once 'include/SugarTinyMCE.php';
     $tiny = new SugarTinyMCE();
     $tiny->defaultConfig['width'] = 300;
     $tiny->defaultConfig['height'] = 300;
     $tiny->buttonConfig = "code,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,\n\t                         justifyfull,separator,forecolor,backcolor,\n\t                         ";
     $tiny->buttonConfig2 = "pastetext,pasteword,fontselect,fontsizeselect,";
     $tiny->buttonConfig3 = "";
     $ed = $tiny->getInstance();
     $smarty->assign("tiny", $ed);
     $smarty->display('modules/ModuleBuilder/tpls/index.tpl');
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:60,代码来源:view.main.php

示例2: display

 function display()
 {
     global $app_strings, $current_user, $mod_strings, $theme;
     if (is_dir("themes/{$theme}/ext/resources/css")) {
         $cssDir = opendir("themes/{$theme}/ext/resources/css");
     }
     $smarty = new Sugar_Smarty();
     $type = !empty($_REQUEST['type']) ? $_REQUEST['type'] : 'main';
     $mbt = false;
     $admin = false;
     $mb = strtolower($type);
     $smarty->assign('TYPE', $type);
     $smarty->assign('app_strings', $app_strings);
     $smarty->assign('mod', $mod_strings);
     //Replaced by javascript function "setMode"
     switch ($type) {
         case 'studio':
             //$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
             require_once 'modules/ModuleBuilder/Module/StudioTree.php';
             $mbt = new StudioTree();
             break;
         case 'mb':
             //$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=")');
             require_once 'modules/ModuleBuilder/MB/MBPackageTree.php';
             $mbt = new MBPackageTree();
             break;
         case 'sugarportal':
             require_once 'modules/ModuleBuilder/Module/SugarPortalTree.php';
             $mbt = new SugarPortalTree();
             break;
         case 'dropdowns':
             // $admin = is_admin($current_user);
             require_once 'modules/ModuleBuilder/Module/DropDownTree.php';
             $mbt = new DropDownTree();
             break;
         default:
             //$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=home")');
             require_once 'modules/ModuleBuilder/Module/MainTree.php';
             $mbt = new MainTree();
     }
     $smarty->assign('TEST_STUDIO', displayStudioForCurrentUser());
     $smarty->assign('ADMIN', is_admin($current_user));
     $smarty->display('modules/ModuleBuilder/tpls/includes.tpl');
     if ($mbt) {
         $smarty->assign('TREE', $mbt->fetch());
         $smarty->assign('TREElabel', $mbt->getName());
     }
     $userPref = $current_user->getPreference('mb_assist', 'Assistant');
     if (!$userPref) {
         $userPref = "na";
     }
     $smarty->assign('userPref', $userPref);
     $smarty->display('modules/ModuleBuilder/tpls/index.tpl');
 }
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:54,代码来源:view.main.php

示例3: process

 function process()
 {
     $GLOBALS['log']->info(get_class($this) . ":");
     global $current_user;
     $access = get_admin_modules_for_user($current_user);
     if (is_admin($current_user) || is_admin_for_any_module($current_user) && !isset($_REQUEST['view_module']) && (isset($_REQUEST['action']) && $_REQUEST['action'] != 'package') || isset($_REQUEST['view_module']) && (in_array($_REQUEST['view_module'], $access) || empty($_REQUEST['view_module'])) || isset($_REQUEST['type']) && ($_REQUEST['type'] == 'dropdowns' && is_admin_for_any_module($current_user) || $_REQUEST['type'] == 'studio' && displayStudioForCurrentUser() == true)) {
         $this->hasAccess = true;
     } else {
         $this->hasAccess = false;
     }
     parent::process();
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:12,代码来源:controller.php

示例4: process

 function process()
 {
     $GLOBALS['log']->info(get_class($this) . ":");
     global $current_user;
     $access = $current_user->getDeveloperModules();
     if ($current_user->isAdmin() || $current_user->isDeveloperForAnyModule() && !isset($_REQUEST['view_module']) && (isset($_REQUEST['action']) && $_REQUEST['action'] != 'package') || isset($_REQUEST['view_module']) && (in_array($_REQUEST['view_module'], $access) || empty($_REQUEST['view_module'])) || isset($_REQUEST['type']) && ($_REQUEST['type'] == 'dropdowns' && $current_user->isDeveloperForAnyModule() || $_REQUEST['type'] == 'studio' && displayStudioForCurrentUser() == true)) {
         $this->hasAccess = true;
     } else {
         $this->hasAccess = false;
     }
     parent::process();
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:12,代码来源:controller.php

示例5: generateHomeButtons

 function generateHomeButtons()
 {
     global $current_user;
     if (displayStudioForCurrentUser() == true) {
         //$this->buttons['Application'] = array ('action' => '', 'imageTitle' => 'Application', 'size' => '128', 'help'=>'appBtn');
         $this->buttons[$GLOBALS['mod_strings']['LBL_STUDIO']] = array('action' => 'javascript:ModuleBuilder.main("studio")', 'imageTitle' => 'Studio', 'size' => '128', 'help' => 'studioBtn');
     }
     if (is_admin($current_user)) {
         $this->buttons[$GLOBALS['mod_strings']['LBL_MODULEBUILDER']] = array('action' => 'javascript:ModuleBuilder.main("mb")', 'imageTitle' => 'ModuleBuilder', 'size' => '128', 'help' => 'mbBtn');
     }
     $this->buttons[$GLOBALS['mod_strings']['LBL_DROPDOWNEDITOR']] = array('action' => 'javascript:ModuleBuilder.main("dropdowns")', 'imageTitle' => $GLOBALS['mod_strings']['LBL_HOME_EDIT_DROPDOWNS'], 'imageName' => 'DropDownEditor', 'size' => '128', 'help' => 'dropDownEditorBtn');
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:12,代码来源:view.home.php

示例6: array

$admin_group_header[] = array('LBL_BUG_TITLE', '', false, $admin_option_defs, 'LBL_BUG_DESC');
if (file_exists('custom/modules/Administration/Ext/Administration/administration.ext.php')) {
    include 'custom/modules/Administration/Ext/Administration/administration.ext.php';
}
//For users with MLA access we need to find which entries need to be shown.
//lets process the $admin_group_header and apply all the access control rules.
$access = $current_user->getDeveloperModules();
foreach ($admin_group_header as $key => $values) {
    $module_index = array_keys($values[3]);
    //get the actual links..
    foreach ($module_index as $mod_key => $mod_val) {
        if (is_admin($current_user) || in_array($mod_val, $access) || $mod_val == 'studio' || $mod_val == 'Forecasts' && in_array('ForecastSchedule', $access) || $mod_val == 'any') {
            if (!is_admin($current_user) && isset($values[3]['Administration'])) {
                unset($values[3]['Administration']);
            }
            if (displayStudioForCurrentUser() == false) {
                unset($values[3]['studio']);
            }
            if (displayWorkflowForCurrentUser() == false) {
                unset($values[3]['any']['workflow_management']);
            }
            // Need this check because Quotes and Products share the header group
            if (!in_array('Quotes', $access) && isset($values[3]['Quotes'])) {
                unset($values[3]['Quotes']);
            }
            if (!in_array('Products', $access) && isset($values[3]['Products'])) {
                unset($values[3]['Products']);
            }
            // Need this check because Emails and Campaigns share the header group
            if (!in_array('Campaigns', $access) && isset($values[3]['Campaigns'])) {
                unset($values[3]['Campaigns']);
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:31,代码来源:adminpaneldefs.php


注:本文中的displayStudioForCurrentUser函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。