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


PHP TabController::get_user_tabs方法代码示例

本文整理汇总了PHP中TabController::get_user_tabs方法的典型用法代码示例。如果您正苦于以下问题:PHP TabController::get_user_tabs方法的具体用法?PHP TabController::get_user_tabs怎么用?PHP TabController::get_user_tabs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TabController的用法示例。


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

示例1: template_reports_saved

function template_reports_saved(&$args)
{
    global $current_user, $modules_report, $mod_strings, $modListHeader, $my_report_titles, $published_report_titles, $app_list_strings;
    $module_value = '';
    // grab information for tab access to show only reports relative to modules a user has access to
    if (isset($current_user)) {
        require_once 'modules/MySettings/TabController.php';
        $tabs = new TabController();
        $tabArray = $tabs->get_user_tabs($current_user);
    }
    if ($args['type'] == 'my') {
        $title = $mod_strings['LBL_MY_SAVED_REPORTS'];
        $query_arr = array('assigned_user_id' => $current_user->id, 'is_published' => 'no');
        $order_by = 'module,report_type,name';
        if (isset($args['module']) && $args['module'] != 'All') {
            $module_value = 'value="' . $modules_report[$args['module']] . '"';
            $title = $my_report_titles[$args['module']];
            $query_arr['module'] = $args['module'];
        }
    } else {
        $title = $mod_strings['LBL_ALL_PUBLISHED_REPORTS'];
        $query_arr = array('is_published' => 'yes');
        $order_by = '';
        if (isset($args['module']) && $args['module'] != 'All') {
            $module_value = 'value="' . $modules_report[$args['module']] . '"';
            $title = $published_report_titles[$args['module']];
            $query_arr['module'] = $args['module'];
        }
    }
    if (isset($args['show_button']) && $args['show_button']) {
        $button_form = '<form action="index.php"><input type=hidden name="module" value="Reports"/><input type=hidden name="report_module" ' . $module_value . '/><input type=hidden name="action" value="index"/><input type=hidden name="page" value="report"/><input type=submit class=button name=\'Create Custom Report\' value=\'' . $mod_strings['LBL_CREATE_CUSTOM_REPORT'] . '\'></form>';
    } else {
        $button_form = '';
    }
    echo get_form_header($title, $button_form, false);
    ?>

<script>
function schedulePOPUP(id){
			window.open("index.php?module=Reports&action=add_schedule&to_pdf=true&id=" + id ,"test","width=400,height=120,resizable=1,scrollbars=1")
}
</script>
<p>
<table width="100%" border="0" cellspacing=0 cellpadding="0" class="list view">
<tr height="20">
	<td width="40%"  NOWRAP><?php 
    echo $mod_strings['LBL_REPORT_NAME'];
    ?>
</td>
	<td width="20%"  NOWRAP><?php 
    echo $mod_strings['LBL_MODULE_NAME_SAVED'];
    ?>
</td>
	<td width="20%"  NOWRAP><?php 
    echo $mod_strings['LBL_REPORT_TYPE'];
    ?>
</td>
	<td width="5%"  NOWRAP><?php 
    echo $mod_strings['LBL_SCHEDULE_REPORT'];
    ?>
</td>
	<td width="5%"  NOWRAP>&nbsp;</td>
	<td width="5%"  NOWRAP>&nbsp;</td>
	<td width="5%"  NOWRAP>&nbsp;</td>
</tr>

<?php 
    $saved_reports_seed = BeanFactory::getBean('Reports');
    $custom_reports_arr = $saved_reports_seed->retrieve_all_by_string_fields($query_arr, $order_by);
    $shownRows = false;
    $displayedNone = true;
    if (count($custom_reports_arr)) {
        $oddRow = true;
        foreach ($custom_reports_arr as $report) {
            $report->content;
            if ($report->deleted == 1) {
                continue;
            }
            if ($oddRow) {
                $row_class = 'oddListRowS1';
            } else {
                $row_class = 'evenListRowS1';
            }
            if (!isset($app_list_strings['dom_report_types'][$report->report_type])) {
                $report_type = '';
            } else {
                $report_type = $app_list_strings['dom_report_types'][$report->report_type];
            }
            $rs = new ReportSchedule();
            $schedule = $rs->get_users_schedule();
            global $timedate;
            $subModuleCheck = 0;
            $subModuleCheckArray = array("Tasks", "Calls", "Meetings", "Notes");
            $subModuleProjectArray = array("ProjectTask");
            if (in_array($report->module, $subModuleCheckArray) && (array_key_exists("Calendar", $tabArray) || array_key_exists("Activities", $tabArray))) {
                $subModuleCheck = 1;
            }
            if (in_array($report->module, $subModuleProjectArray) && array_key_exists("Project", $tabArray)) {
                $subModuleCheck = 1;
            }
//.........这里部分代码省略.........
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:101,代码来源:templates_reports_index.php

示例2: getClassicModuleTitle

    $context = array();
}
if (!SugarACL::checkAccess('Reports', 'edit', $context)) {
    ACLController::displayNoAccess(true);
    sugar_cleanup(true);
}
global $current_user, $mod_strings, $ACLAllowedModules, $current_language, $app_list_strings, $app_strings, $sugar_config, $sugar_version;
$params = array();
$params[] = $mod_strings['LBL_CREATE_CUSTOM_REPORT'];
echo getClassicModuleTitle("Reports", $params, false);
$ACLAllowedModules = getACLAllowedModules();
uksort($ACLAllowedModules, "juliansort");
$buttons = array();
require_once "modules/MySettings/TabController.php";
$controller = new TabController();
$tabs = $controller->get_user_tabs($current_user, $type = 'display');
//$ACLAllowedModulesAdded = array();
require_once 'include/SugarSmarty/plugins/function.sugar_help.php';
$sugar_smarty = new Sugar_Smarty();
$help_img = smarty_function_sugar_help(array("text" => $mod_strings['LBL_OPTIONAL_HELP']), $sugar_smarty);
$chart_data_help = smarty_function_sugar_help(array("text" => $mod_strings['LBL_CHART_DATA_HELP']), $sugar_smarty);
$do_round_help = smarty_function_sugar_help(array("text" => $mod_strings['LBL_DO_ROUND_HELP']), $sugar_smarty);
// Add the modules in the order of the user-defined tabs.
/*
foreach ($tabs as $tabModuleKey=>$tabModuleKeyValue)
{
	if (isset($ACLAllowedModules[$tabModuleKey])) {
		if (file_exists($image_path1."icon_".$tabModuleKey."_32.gif"))
			array_push($buttons, array('name'=>$app_list_strings['moduleList'][$tabModuleKey], 'img'=> SugarThemeRegistry::current()->getImageURL("icon_".$tabModuleKey."_32.gif"), 'key'=>$tabModuleKey));
		else
			array_push($buttons, array('name'=>$app_list_strings['moduleList'][$tabModuleKey], 'img'=> SugarThemeRegistry::current()->getImageURL("icon_A1_newmod.gif"),'alt'=> $mod_strings['LBL_NO_IMAGE'], 'key'=>$tabModuleKey));
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:ReportsWizard.php

示例3: TabController

?>
<!--end body panes-->
	</td>
	</tr>
	</table>
</td>
</tr>
<tr>
    <td colspan="3" align="center" class="footer">
	<hr width="80%" size="1" class="footerHR">
	<?php 
$modList = $moduleList;
if (isset($current_user)) {
    require_once 'modules/MySettings/TabController.php';
    $tabs = new TabController();
    $modList = $tabs->get_user_tabs($current_user);
}
$numTabs = count($modListHeader);
$i = 1;
foreach ($modListHeader as $module_name) {
    ?>
	<A href="index.php?module=<?php 
    echo $module_name;
    ?>
&action=index" class="footerLink"><?php 
    echo $app_list_strings['moduleList'][$module_name];
    ?>
</A><?php 
    if ($i > $numTabs - 1 or $i == $max_tabs) {
        echo "";
    } else {
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:footer.php

示例4: TabController

 function _check_user_permissions()
 {
     global $current_user;
     if (isset($current_user)) {
         require_once 'modules/MySettings/TabController.php';
         $tabs = new TabController();
         $tabArray = $tabs->get_user_tabs($current_user);
         $moduleMap = array();
         foreach ($tabArray as $user_module) {
             $moduleMap[$user_module] = 1;
         }
         if (isset($moduleMap["Calendar"]) || isset($moduleMap["Activities"])) {
             //also include reports that are in the following modules
             $moduleMap['Tasks'] = 1;
             $moduleMap['Calls'] = 1;
             $moduleMap['Meetings'] = 1;
             $moduleMap['Notes'] = 1;
         }
         if (isset($moduleMap["Project"])) {
             $moduleMap['ProjectTask'] = 1;
         }
         if (empty($moduleMap[$this->module_dir])) {
             die("you do not have access to report this module");
         }
     } else {
         die("you shouldn't be here");
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:28,代码来源:Report.php


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