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


PHP Audit::get_audit_list方法代码示例

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


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

示例1: process_page

    /**
     *
     */
    function process_page()
    {
        global $theme;
        global $focus;
        global $mod_strings;
        global $app_strings;
        global $app_list_strings;
        global $currentModule;
        global $odd_bg;
        global $even_bg;
        global $audit;
        global $current_language;
        $audit_list = Audit::get_audit_list();
        $xtpl = new XTemplate('modules/Audit/Popup_picker.html');
        $xtpl->assign('MOD', $mod_strings);
        $xtpl->assign('APP', $app_strings);
        insert_popup_header($theme);
        //output header
        echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>";
        $mod_strings = return_module_language($current_language, $focus->module_dir);
        $printImageURL = SugarThemeRegistry::current()->getImageURL('print.gif');
        $titleExtra = <<<EOHTML
<a href="javascript:void window.open('index.php?{$GLOBALS['request_string']}','printwin','menubar=1,status=0,resizable=1,scrollbars=1,toolbar=0,location=1')" class='utilsLink'>
<!--not_in_theme!--><img src="{$printImageURL}" alt="{$GLOBALS['app_strings']['LNK_PRINT']}"></a>
<a href="javascript:void window.open('index.php?{$GLOBALS['request_string']}','printwin','menubar=1,status=0,resizable=1,scrollbars=1,toolbar=0,location=1')" class='utilsLink'>
{$GLOBALS['app_strings']['LNK_PRINT']}
</a>
EOHTML;
        $params = array();
        $params[] = translate('LBL_MODULE_NAME', $focus->module_dir);
        $params[] = $focus->get_summary_text();
        $params[] = translate('LBL_CHANGE_LOG', 'Audit');
        echo str_replace('</div>', "<span class='utils'>{$titleExtra}</span></div>", getClassicModuleTitle($focus->module_dir, $params, false));
        $oddRow = true;
        $audited_fields = $focus->getAuditEnabledFieldDefinitions();
        asort($audited_fields);
        $fields = '';
        $field_count = count($audited_fields);
        $start_tag = "<table><tr><td >";
        $end_tag = "</td></tr></table>";
        if ($field_count > 0) {
            $index = 0;
            foreach ($audited_fields as $key => $value) {
                $index++;
                $vname = '';
                if (isset($value['vname'])) {
                    $vname = $value['vname'];
                } else {
                    if (isset($value['label'])) {
                        $vname = $value['label'];
                    }
                }
                $fields .= str_replace(':', '', translate($vname, $focus->module_dir));
                if ($index < $field_count) {
                    $fields .= ", ";
                }
            }
            echo $start_tag . translate('LBL_AUDITED_FIELDS', 'Audit') . $fields . $end_tag;
        } else {
            echo $start_tag . translate('LBL_AUDITED_FIELDS', 'Audit') . $end_tag;
        }
        foreach ($audit_list as $audit) {
            if (empty($audit['before_value_string']) && empty($audit['after_value_string'])) {
                $before_value = $audit['before_value_text'];
                $after_value = $audit['after_value_text'];
            } else {
                $before_value = $audit['before_value_string'];
                $after_value = $audit['after_value_string'];
            }
            // Let's run the audit data through the sugar field system
            if (isset($audit['data_type'])) {
                require_once 'include/SugarFields/SugarFieldHandler.php';
                $vardef = array('name' => 'audit_field', 'type' => $audit['data_type']);
                $field = SugarFieldHandler::getSugarField($audit['data_type']);
                $before_value = $field->getChangeLogSmarty(array($vardef['name'] => $before_value), $vardef, array(), $vardef['name']);
                $after_value = $field->getChangeLogSmarty(array($vardef['name'] => $after_value), $vardef, array(), $vardef['name']);
            }
            $activity_fields = array('ID' => $audit['id'], 'NAME' => $audit['field_name'], 'BEFORE_VALUE' => $before_value, 'AFTER_VALUE' => $after_value, 'CREATED_BY' => $audit['created_by'], 'DATE_CREATED' => $audit['date_created']);
            $xtpl->assign("ACTIVITY", $activity_fields);
            if ($oddRow) {
                //todo move to themes
                $xtpl->assign("ROW_COLOR", 'oddListRow');
                $xtpl->assign("BG_COLOR", $odd_bg);
            } else {
                //todo move to themes
                $xtpl->assign("ROW_COLOR", 'evenListRow');
                $xtpl->assign("BG_COLOR", $even_bg);
            }
            $oddRow = !$oddRow;
            $xtpl->parse("audit.row");
            // Put the rows in.
        }
        //end foreach
        $xtpl->parse("audit");
        $xtpl->out("audit");
        insert_popup_footer();
    }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:100,代码来源:Popup_picker.php

示例2: process_page

 /**
  *
  */
 function process_page()
 {
     global $theme;
     global $focus;
     global $mod_strings;
     global $app_strings;
     global $app_list_strings;
     global $currentModule;
     global $odd_bg;
     global $even_bg;
     global $audit;
     global $current_language;
     $audit_list = Audit::get_audit_list();
     $xtpl = new XTemplate('modules/Audit/Popup_picker.html');
     $xtpl->assign('MOD', $mod_strings);
     $xtpl->assign('APP', $app_strings);
     insert_popup_header($theme);
     //output header
     echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>";
     $focus_mod_strings = return_module_language($current_language, $focus->module_dir);
     echo get_module_title($focus->module_dir, translate('LBL_MODULE_NAME', $focus->module_dir) . ": " . $focus->name, false);
     echo "</td><td align='right' class='moduleTitle'>";
     echo "<A href='javascript:print();' class='utilsLink'><img src='" . SugarThemeRegistry::current()->getImageURL("print.gif") . "' width='13' height='13' alt='" . $app_strings['LNK_PRINT'] . "' border='0' align='absmiddle'></a>&nbsp;<A href='javascript:print();' class='utilsLink'>" . $app_strings['LNK_PRINT'] . "</A>\n";
     echo "</td></tr></table>";
     $oddRow = true;
     $audited_fields = $focus->getAuditEnabledFieldDefinitions();
     asort($audited_fields);
     $fields = '';
     $field_count = count($audited_fields);
     $start_tag = "<table><tr><td >";
     $end_tag = "</td></tr></table>";
     if ($field_count > 0) {
         $index = 0;
         foreach ($audited_fields as $key => $value) {
             $index++;
             $vname = '';
             if (isset($value['vname'])) {
                 $vname = $value['vname'];
             } else {
                 if (isset($value['label'])) {
                     $vname = $value['label'];
                 }
             }
             $fields .= str_replace(':', '', translate($vname, $focus->module_dir));
             if ($index < $field_count) {
                 $fields .= ", ";
             }
         }
         echo $start_tag . translate('LBL_AUDITED_FIELDS', 'Audit') . $fields . $end_tag;
     } else {
         echo $start_tag . translate('LBL_AUDITED_FIELDS', 'Audit') . $end_tag;
     }
     foreach ($audit_list as $audit) {
         if (empty($audit['before_value_string']) && empty($audit['after_value_string'])) {
             $before_value = $audit['before_value_text'];
             $after_value = $audit['after_value_text'];
         } else {
             $before_value = $audit['before_value_string'];
             $after_value = $audit['after_value_string'];
         }
         $activity_fields = array('ID' => $audit['id'], 'NAME' => $audit['field_name'], 'BEFORE_VALUE' => $before_value, 'AFTER_VALUE' => $after_value, 'CREATED_BY' => $audit['created_by'], 'DATE_CREATED' => $audit['date_created']);
         $xtpl->assign("ACTIVITY", $activity_fields);
         if ($oddRow) {
             //todo move to themes
             $xtpl->assign("ROW_COLOR", 'oddListRow');
             $xtpl->assign("BG_COLOR", $odd_bg);
         } else {
             //todo move to themes
             $xtpl->assign("ROW_COLOR", 'evenListRow');
             $xtpl->assign("BG_COLOR", $even_bg);
         }
         $oddRow = !$oddRow;
         $xtpl->parse("audit.row");
         // Put the rows in.
     }
     //end foreach
     $xtpl->parse("audit");
     $xtpl->out("audit");
     insert_popup_footer();
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:83,代码来源:Popup_picker.php

示例3: testget_audit_list

 public function testget_audit_list()
 {
     global $focus;
     $focus = new Account();
     //use audit enabbled module object
     $audit = new Audit();
     //execute the method and verify that it returns an array
     $result = $audit->get_audit_list();
     $this->assertTrue(is_array($result));
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:10,代码来源:AuditTest.php

示例4: process_page

 /**
  *
  */
 function process_page()
 {
     global $theme;
     global $focus;
     global $mod_strings;
     global $app_strings;
     global $app_list_strings;
     global $currentModule;
     global $odd_bg;
     global $even_bg;
     global $image_path;
     global $audit;
     global $current_language;
     global $sugar_version;
     $theme_path = "themes/" . $theme . "/";
     $image_path = 'themes/' . $theme . '/images/';
     if (floatval(substr($sugar_version, 0, 3)) < 6.0) {
         require_once $theme_path . 'layout_utils.php';
     } else {
         require_once 'include/utils/layout_utils.php';
     }
     $audit_list = Audit::get_audit_list();
     $xtpl = new XTemplate('modules/Audit/Popup_picker.html');
     $xtpl->assign('THEME', $theme);
     $xtpl->assign('MOD', return_module_language($current_language, 'Audit'));
     $xtpl->assign('APP', $app_strings);
     insert_popup_header($theme);
     //output header
     echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>";
     $focus_mod_strings = return_module_language($current_language, $focus->module_dir);
     echo get_module_title($focus->module_dir, translate('LBL_MODULE_NAME', $focus->module_dir) . ": " . $focus->name, false);
     echo "</td><td align='right' class='moduleTitle'>";
     echo "<A href='javascript:print();' class='utilsLink'><img src='" . $image_path . "print.gif' width='13' height='13' alt='" . $app_strings['LNK_PRINT'] . "' border='0' align='absmiddle'></a>&nbsp;<A href='javascript:print();' class='utilsLink'>" . $app_strings['LNK_PRINT'] . "</A>\n";
     echo "</td></tr></table>";
     $oddRow = true;
     $audited_fields = $focus->getAuditEnabledFieldDefinitions();
     asort($audited_fields);
     $fields = '';
     $field_count = count($audited_fields);
     $start_tag = "<table><tr><td class=\"listViewPaginationLinkS1\">";
     $end_tag = "</td></tr></table>";
     if ($field_count > 0) {
         $index = 0;
         foreach ($audited_fields as $key => $value) {
             $index++;
             $vname = '';
             if (isset($value['vname'])) {
                 $vname = $value['vname'];
             } else {
                 if (isset($value['label'])) {
                     $vname = $value['label'];
                 }
             }
             $fields .= str_replace(':', '', translate($vname, $focus->module_dir));
             if ($index < $field_count) {
                 $fields .= ", ";
             }
         }
         echo $start_tag . translate('LBL_AUDITED_FIELDS', 'Audit') . $fields . $end_tag;
     } else {
         echo $start_tag . translate('LBL_AUDITED_FIELDS', 'Audit') . $end_tag;
     }
     foreach ($audit_list as $audit) {
         if (isset($audit['before_value_string']) || isset($audit['after_value_string'])) {
             $before_value = $audit['before_value_string'];
             $after_value = $audit['after_value_string'];
         } else {
             // show textblocks correctly formatted.
             // TODO: be careful of security implications
             $before_value = from_html($audit['before_value_text']);
             $after_value = from_html($audit['after_value_text']);
         }
         $activity_fields = array('ID' => $audit['id'], 'NAME' => $audit['field_name'], 'BEFORE_VALUE' => $before_value, 'AFTER_VALUE' => $after_value, 'CREATED_BY' => $audit['created_by'], 'DATE_CREATED' => $audit['date_created']);
         $xtpl->assign("ACTIVITY", $activity_fields);
         if ($oddRow) {
             //todo move to themes
             $xtpl->assign("ROW_COLOR", 'oddListRow');
             $xtpl->assign("BG_COLOR", $odd_bg);
         } else {
             //todo move to themes
             $xtpl->assign("ROW_COLOR", 'evenListRow');
             $xtpl->assign("BG_COLOR", $even_bg);
         }
         $oddRow = !$oddRow;
         $xtpl->parse("audit.row");
         // Put the rows in.
     }
     //end foreach
     $xtpl->parse("audit");
     $xtpl->out("audit");
     insert_popup_footer();
 }
开发者ID:santara12,项目名称:OpenQuotesAndContracts,代码行数:95,代码来源:Popup_picker.php


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