• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Administration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: zuckerreports_query

 function zuckerreports_query($session, $sql)
 {
     global $current_user;
     $util = new SugarWebServiceUtilv4_1();
     if (!$util->validate_authenticated($session)) {
         return array('result' => 'error', 'message' => 'ZuckerReports Query invalid session');
     }
     $admin = new Administration();
     $admin->retrieveSettings();
     $sugaruser = $admin->settings['zuckerreports2_ondemandsugaruser'];
     if ($current_user->user_name != $sugaruser) {
         return array('result' => 'error', 'message' => 'ZuckerReports Query invalid user (' . $current_user->user_name . ')');
     }
     $db = DBManagerFactory::getInstance();
     $result = $db->query($sql);
     $row_list = array();
     $colnames_list = array();
     while (($row = $db->fetchByAssoc($result)) != null) {
         if (empty($colnames_list)) {
             foreach ($row as $colname => $colval) {
                 $colnames_list[] = $colname;
             }
         }
         $json_row = array();
         foreach ($row as $colname => $colval) {
             $json_row[] = $colval;
         }
         $row_list[] = $json_row;
     }
     return array('result' => 'ok', 'columnnames_list' => $colnames_list, 'rows_list' => $row_list);
 }
开发者ID:aldridged,项目名称:airtap-sugar,代码行数:31,代码来源:SugarWebServiceImpl_v4_custom.php


示例2: __construct

 /**
  * BreadCrumbStack
  * Constructor for BreadCrumbStack that builds list of breadcrumbs using tracker table
  *
  * @param $user_id String value of user id to get bread crumb items for
  * @param $modules mixed value of module name(s) to provide extra filtering
  */
 public function __construct($user_id, $modules = '')
 {
     $this->stack = array();
     $this->stackMap = array();
     $admin = new Administration();
     $admin->retrieveSettings('tracker');
     $this->deleteInvisible = !empty($admin->settings['tracker_Tracker']);
     $db = DBManagerFactory::getInstance();
     $module_query = '';
     if (!empty($modules)) {
         $history_max_viewed = 10;
         $module_query = is_array($modules) ? ' AND module_name IN (\'' . implode("','", $modules) . '\')' : ' AND module_name = \'' . $modules . '\'';
     } else {
         $history_max_viewed = !empty($GLOBALS['sugar_config']['history_max_viewed']) ? $GLOBALS['sugar_config']['history_max_viewed'] : 50;
     }
     $query = 'SELECT distinct item_id AS item_id, id, item_summary, module_name, monitor_id, date_modified FROM tracker WHERE user_id = \'' . $user_id . '\' AND deleted = 0 AND visible = 1 ' . $module_query . ' ORDER BY date_modified DESC';
     $result = $db->limitQuery($query, 0, $history_max_viewed);
     $items = array();
     while ($row = $db->fetchByAssoc($result)) {
         $items[] = $row;
     }
     $items = array_reverse($items);
     foreach ($items as $item) {
         $this->push($item);
     }
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:33,代码来源:BreadCrumbStack.php


示例3: display

 /**
  * @see SugarView::display()
  *
  * We are overridding the display method to manipulate the sectionPanels.
  * If portal is not enabled then don't show the Portal Information panel.
  */
 public function display()
 {
     $this->ev->process();
     if (!empty($_REQUEST['contact_name']) && !empty($_REQUEST['contact_id']) && $this->ev->fieldDefs['report_to_name']['value'] == '' && $this->ev->fieldDefs['reports_to_id']['value'] == '') {
         $this->ev->fieldDefs['report_to_name']['value'] = $_REQUEST['contact_name'];
         $this->ev->fieldDefs['reports_to_id']['value'] = $_REQUEST['contact_id'];
     }
     $admin = new Administration();
     $admin->retrieveSettings();
     if (empty($admin->settings['portal_on']) || !$admin->settings['portal_on']) {
         unset($this->ev->sectionPanels[strtoupper('lbl_portal_information')]);
     } else {
         if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
             $this->ev->fieldDefs['portal_name']['value'] = '';
             $this->ev->fieldDefs['portal_active']['value'] = '0';
             $this->ev->fieldDefs['portal_password']['value'] = '';
             $this->ev->fieldDefs['portal_password1']['value'] = '';
             $this->ev->fieldDefs['portal_name_verified'] = '0';
             $this->ev->focus->portal_name = '';
             $this->ev->focus->portal_password = '';
             $this->ev->focus->portal_acitve = 0;
         } else {
             $this->ev->fieldDefs['portal_password']['value'] = '';
             $this->ev->fieldDefs['portal_password1']['value'] = '';
         }
         echo getVersionedScript('modules/Contacts/Contact.js');
         echo '<script language="javascript">';
         echo 'addToValidateComparison(\'EditView\', \'portal_password\', \'varchar\', false, SUGAR.language.get(\'app_strings\', \'ERR_SQS_NO_MATCH_FIELD\') + SUGAR.language.get(\'Contacts\', \'LBL_PORTAL_PASSWORD\'), \'portal_password1\');';
         echo 'addToValidateVerified(\'EditView\', \'portal_name_verified\', \'bool\', false, SUGAR.language.get(\'app_strings\', \'ERR_EXISTING_PORTAL_USERNAME\'));';
         echo 'YAHOO.util.Event.onDOMReady(function() {YAHOO.util.Event.on(\'portal_name\', \'blur\', validatePortalName);YAHOO.util.Event.on(\'portal_name\', \'keydown\', handleKeyDown);});';
         echo '</script>';
     }
     echo $this->ev->display($this->showTitle);
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:40,代码来源:view.edit.php


示例4: process

 /**
  * main method that runs reminding process
  * @return boolean
  */
 public function process()
 {
     $admin = new Administration();
     $admin->retrieveSettings();
     $meetings = $this->getMeetingsForRemind();
     foreach ($meetings as $id) {
         $recipients = $this->getRecipients($id, 'Meetings');
         $bean = new Meeting();
         $bean->retrieve($id);
         if ($this->sendReminders($bean, $admin, $recipients)) {
             $bean->email_reminder_sent = 1;
             $bean->save();
         }
     }
     $calls = $this->getCallsForRemind();
     foreach ($calls as $id) {
         $recipients = $this->getRecipients($id, 'Calls');
         $bean = new Call();
         $bean->retrieve($id);
         if ($this->sendReminders($bean, $admin, $recipients)) {
             $bean->email_reminder_sent = 1;
             $bean->save();
         }
     }
     return true;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:30,代码来源:EmailReminder.php


示例5: display

 public function display()
 {
     echo $this->getModuleTitle();
     $this->ss->assign("RETURN_MODULE", "Administration");
     $this->ss->assign("RETURN_ACTION", "index");
     $zendesk_helper = new ZendeskHelper();
     $admin = new Administration();
     $admin->retrieveSettings('zendesk');
     $this->ss->assign('zendesk_instance', $admin->settings['system_zendesk_instance']);
     $this->ss->assign('zendesk_https', $admin->settings['system_zendesk_https']);
     $this->ss->assign("zendesk_https_checkbox", $admin->settings['system_zendesk_https'] ? "checked='checked'" : "");
     $this->ss->assign('zendesk_login', $admin->settings['system_zendesk_login']);
     $this->ss->assign('use_account_name', $zendesk_helper->getGlobalConfigValue('use_account_name'));
     $this->ss->assign('per_page', $zendesk_helper->getGlobalConfigValue('per_page', '6'));
     $this->ss->assign('sort', $zendesk_helper->getGlobalConfigValue('sort', '1'));
     $this->ss->assign('order_by', $zendesk_helper->getGlobalConfigValue('order_by', 'priority'));
     $this->ss->assign('status_filter', $zendesk_helper->getGlobalConfigValue('status_filter', 'lsolved'));
     $this->ss->assign('priority_filter', $zendesk_helper->getGlobalConfigValue('priority_filter', 'any'));
     $this->ss->assign('type_filter', $zendesk_helper->getGlobalConfigValue('type_filter', 'any'));
     $this->ss->assign('statusoptions', $zendesk_helper->getStatusFilterOptions());
     $this->ss->assign('priorityoptions', $zendesk_helper->getPriorityFilterOptions());
     $this->ss->assign('typeoptions', $zendesk_helper->getTypeFilterOptions());
     $this->ss->assign('columns', $zendesk_helper->getColumnOptions());
     $this->ss->display('modules/zd_Tickets/tpls/config.tpl');
 }
开发者ID:nunoabc,项目名称:Web2,代码行数:25,代码来源:view.config.php


示例6: getPortalEmailSettings

function getPortalEmailSettings()
{
    global $sugar_config;
    $settings = array('from_name' => '', 'from_address' => '');
    if (array_key_exists("aop", $sugar_config)) {
        if (array_key_exists('support_from_address', $sugar_config['aop'])) {
            $settings['from_address'] = $sugar_config['aop']['support_from_address'];
        }
        if (array_key_exists('support_from_name', $sugar_config['aop'])) {
            $settings['from_name'] = $sugar_config['aop']['support_from_name'];
        }
    }
    if ($settings['from_name'] && $settings['from_address']) {
        return $settings;
    }
    //Fallback to sugar settings
    $admin = new Administration();
    $admin->retrieveSettings();
    if (!$settings['from_name']) {
        $settings['from_name'] = $admin->settings['notify_fromname'];
    }
    if (!$settings['from_address']) {
        $settings['from_address'] = $admin->settings['notify_fromaddress'];
    }
    return $settings;
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:26,代码来源:util.php


示例7: getZendeskConnection

function getZendeskConnection()
{
    global $current_user;
    $read_only = true;
    $zendesk_https = false;
    $zendesk_helper = new ZendeskHelper();
    $admin = new Administration();
    $admin->retrieveSettings('system');
    if ($admin->settings['system_zendesk_instance']) {
        $zendesk_instance = $admin->settings['system_zendesk_instance'];
    } else {
        throw new Exception('Zendesk credentials not configured');
    }
    if ($admin->settings['system_zendesk_https']) {
        $zendesk_https = true;
    }
    $personal_login = $zendesk_helper->getPersonalConfigValue('login');
    if ($personal_login && $personal_login != '') {
        $read_only = false;
        $zendesk_login = $personal_login;
        $zendesk_password = $zendesk_helper->getPersonalConfigValue('password');
    } else {
        $zendesk_login = $zendesk_helper->getGlobalConfigValue('login');
        $zendesk_password = $zendesk_helper->getGlobalConfigValue('password');
    }
    $c = new Zendesk($zendesk_instance, $zendesk_login, $zendesk_password, true, $zendesk_https);
    $c->read_only = $read_only;
    return $c;
}
开发者ID:nunoabc,项目名称:Web2,代码行数:29,代码来源:ZendeskConnection.php


示例8: SugarPHPMailer

 /**
  * Sole constructor
  */
 function SugarPHPMailer()
 {
     global $locale;
     global $current_user;
     global $sugar_config;
     $admin = new Administration();
     $admin->retrieveSettings();
     if (isset($admin->settings['disclosure_enable']) && !empty($admin->settings['disclosure_enable'])) {
         $this->disclosureEnabled = true;
         $this->disclosureText = $admin->settings['disclosure_text'];
     }
     $this->oe = new OutboundEmail();
     $this->oe->getUserMailerSettings($current_user);
     $this->SetLanguage('en', 'include/phpmailer/language/');
     $this->PluginDir = 'include/phpmailer/';
     $this->Mailer = 'sendmail';
     // cn: i18n
     $this->CharSet = $locale->getPrecedentPreference('default_email_charset');
     $this->Encoding = 'quoted-printable';
     $this->IsHTML(false);
     // default to plain-text email
     $this->Hostname = $sugar_config['host_name'];
     $this->WordWrap = 996;
     // cn: gmail fix
     $this->protocol = $this->oe->mail_smtpssl == 1 ? "ssl://" : $this->protocol;
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:29,代码来源:SugarPHPMailer.php


示例9: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $current_user, $mod_strings, $app_strings, $app_list_strings, $sugar_config, $locale;
     $configurator = new Configurator();
     $sugarConfig = SugarConfig::getInstance();
     $focus = new Administration();
     $configurator->parseLoggerSettings();
     $focus->retrieveSettings();
     if (!empty($_POST['restore'])) {
         $configurator->restoreConfig();
     }
     $this->ss->assign('MOD', $mod_strings);
     $this->ss->assign('APP', $app_strings);
     $this->ss->assign('APP_LIST', $app_list_strings);
     $this->ss->assign('config', $configurator->config);
     $this->ss->assign('error', $configurator->errors);
     $this->ss->assign("AUTO_REFRESH_INTERVAL_OPTIONS", get_select_options_with_id($app_list_strings['dashlet_auto_refresh_options_admin'], isset($configurator->config['dashlet_auto_refresh_min']) ? $configurator->config['dashlet_auto_refresh_min'] : 30));
     $this->ss->assign('LANGUAGES', get_languages());
     $this->ss->assign("JAVASCRIPT", get_set_focus_js() . get_configsettings_js());
     $this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png'));
     $this->ss->assign("settings", $focus->settings);
     $this->ss->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype']));
     if (!empty($focus->settings['proxy_on'])) {
         $this->ss->assign("PROXY_CONFIG_DISPLAY", 'inline');
     } else {
         $this->ss->assign("PROXY_CONFIG_DISPLAY", 'none');
     }
     if (!empty($focus->settings['proxy_auth'])) {
         $this->ss->assign("PROXY_AUTH_DISPLAY", 'inline');
     } else {
         $this->ss->assign("PROXY_AUTH_DISPLAY", 'none');
     }
     if (!empty($configurator->config['logger']['level'])) {
         $this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), $configurator->config['logger']['level']));
     } else {
         $this->ss->assign('log_levels', get_select_options_with_id(LoggerManager::getLoggerLevels(), ''));
     }
     if (!empty($configurator->config['lead_conv_activity_opt'])) {
         $this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), $configurator->config['lead_conv_activity_opt']));
     } else {
         $this->ss->assign('lead_conv_activities', get_select_options_with_id(Lead::getActivitiesOptions(), ''));
     }
     if (!empty($configurator->config['logger']['file']['suffix'])) {
         $this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, $configurator->config['logger']['file']['suffix']));
     } else {
         $this->ss->assign('filename_suffix', get_select_options_with_id(SugarLogger::$filename_suffix, ''));
     }
     echo $this->getModuleTitle(false);
     $this->ss->display('modules/Configurator/tpls/EditView.tpl');
     $javascript = new javascript();
     $javascript->setFormName("ConfigureSettings");
     $javascript->addFieldGeneric("notify_fromaddress", "email", $mod_strings['LBL_NOTIFY_FROMADDRESS'], TRUE, "");
     $javascript->addFieldGeneric("notify_subject", "varchar", $mod_strings['LBL_NOTIFY_SUBJECT'], TRUE, "");
     $javascript->addFieldGeneric("proxy_host", "varchar", $mod_strings['LBL_PROXY_HOST'], TRUE, "");
     $javascript->addFieldGeneric("proxy_port", "int", $mod_strings['LBL_PROXY_PORT'], TRUE, "");
     $javascript->addFieldGeneric("proxy_password", "varchar", $mod_strings['LBL_PROXY_PASSWORD'], TRUE, "");
     $javascript->addFieldGeneric("proxy_username", "varchar", $mod_strings['LBL_PROXY_USERNAME'], TRUE, "");
     echo $javascript->getScript();
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:62,代码来源:view.edit.php


示例10: display

 /**
  * @see SugarView::display()
  *
  * We are overridding the display method to manipulate the portal information.
  * If portal is not enabled then don't show the portal fields.
  */
 public function display()
 {
     $admin = new Administration();
     $admin->retrieveSettings();
     if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
         $this->ss->assign("PORTAL_ENABLED", true);
     }
     parent::display();
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:15,代码来源:view.detail.php


示例11: display

 /**
  * @see SugarView::display()
  * 
  * We are overridding the display method to manipulate the sectionPanels.
  * If portal is not enabled then don't show the Portal Information panel.
  */
 public function display()
 {
     $this->ev->process();
     $admin = new Administration();
     $admin->retrieveSettings();
     if (empty($admin->settings['portal_on']) || !$admin->settings['portal_on']) {
         unset($this->ev->sectionPanels[strtoupper('lbl_portal_information')]);
     }
     echo $this->ev->display($this->showTitle);
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:16,代码来源:view.edit.php


示例12: display

 public function display()
 {
     $admin = new Administration();
     $admin->retrieveSettings();
     if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
         $this->ss->assign("PORTAL_ENABLED", true);
     }
     parent::display();
     echo "<script src='custom/include/javascript/ajaxButton.js'></script>";
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:10,代码来源:view.detail.php


示例13: setUp

 public function setUp()
 {
     $startTime = microtime();
     $system_config = new Administration();
     $system_config->retrieveSettings();
     $GLOBALS['system_config'] = $system_config;
     $this->_app = new SugarApplicationMock();
     if (isset($_SESSION['authenticated_user_theme'])) {
         unset($_SESSION['authenticated_user_theme']);
     }
 }
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:11,代码来源:SugarApplicationTest.php


示例14: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $current_user, $mod_strings, $app_list_strings, $sugar_config, $locale, $sugar_version;
     if (!is_admin($current_user)) {
         sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
     }
     $themeObject = SugarThemeRegistry::current();
     $configurator = new Configurator();
     $sugarConfig = SugarConfig::getInstance();
     $focus = new Administration();
     $focus->retrieveSettings();
     $ut = $GLOBALS['current_user']->getPreference('ut');
     if (empty($ut)) {
         $this->ss->assign('SKIP_URL', 'index.php?module=Users&action=Wizard&skipwelcome=1');
     } else {
         $this->ss->assign('SKIP_URL', 'index.php?module=Home&action=index');
     }
     // Always mark that we have got past this point
     $focus->saveSetting('system', 'adminwizard', 1);
     $css = $themeObject->getCSS();
     $favicon = $themeObject->getImageURL('sugar_icon.ico', false);
     $this->ss->assign('FAVICON_URL', getJSPath($favicon));
     $this->ss->assign('SUGAR_CSS', $css);
     $this->ss->assign('MOD_USERS', return_module_language($GLOBALS['current_language'], 'Users'));
     $this->ss->assign('CSS', '<link rel="stylesheet" type="text/css" href="' . SugarThemeRegistry::current()->getCSSURL('wizard.css') . '" />');
     $this->ss->assign('LANGUAGES', get_languages());
     $this->ss->assign('config', $sugar_config);
     $this->ss->assign('SUGAR_VERSION', $sugar_version);
     $this->ss->assign('settings', $focus->settings);
     $this->ss->assign('exportCharsets', get_select_options_with_id($locale->getCharsetSelect(), $sugar_config['default_export_charset']));
     $this->ss->assign('getNameJs', $locale->getNameJs());
     $this->ss->assign('NAMEFORMATS', $locale->getUsableLocaleNameOptions($sugar_config['name_formats']));
     $this->ss->assign('JAVASCRIPT', get_set_focus_js() . get_configsettings_js());
     $this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png'));
     $this->ss->assign('mail_smtptype', $focus->settings['mail_smtptype']);
     $this->ss->assign('mail_smtpserver', $focus->settings['mail_smtpserver']);
     $this->ss->assign('mail_smtpport', $focus->settings['mail_smtpport']);
     $this->ss->assign('mail_smtpuser', $focus->settings['mail_smtpuser']);
     $this->ss->assign('mail_smtppass', $focus->settings['mail_smtppass']);
     $this->ss->assign('mail_smtpauth_req', $focus->settings['mail_smtpauth_req'] ? "checked='checked'" : '');
     $this->ss->assign('MAIL_SSL_OPTIONS', get_select_options_with_id($app_list_strings['email_settings_for_ssl'], $focus->settings['mail_smtpssl']));
     $this->ss->assign('notify_allow_default_outbound_on', !empty($focus->settings['notify_allow_default_outbound']) && $focus->settings['notify_allow_default_outbound'] == 2 ? 'CHECKED' : '');
     $this->ss->assign('THEME', SugarThemeRegistry::current()->__toString());
     // get javascript
     ob_start();
     $this->options['show_javascript'] = true;
     $this->renderJavascript();
     $this->options['show_javascript'] = false;
     $this->ss->assign("SUGAR_JS", ob_get_contents() . $themeObject->getJS());
     ob_end_clean();
     $this->ss->assign('langHeader', get_language_header());
     $this->ss->assign('START_PAGE', !empty($_REQUEST['page']) ? $_REQUEST['page'] : 'welcome');
     $this->ss->display('modules/Configurator/tpls/adminwizard.tpl');
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:57,代码来源:view.adminwizard.php


示例15: action_display

 public function action_display()
 {
     require_once 'modules/Administration/Administration.php';
     $administration = new Administration();
     $administration->retrieveSettings();
     $api_key = $administration->settings['Nexmo_api_key'];
     echo $administration->settings['Nexmo_api_key'] . '<br>';
     echo $administration->settings['Nexmo_api_secret'] . '<br>';
     echo $administration->settings['Nexmo_budget'] . '<br>';
     echo $administration->settings['Nexmo_send_msg'] . '<br>';
 }
开发者ID:neeraj-advaiya,项目名称:SugarCRM-NexmoAlert,代码行数:11,代码来源:controller.php


示例16: display

 /**
  * display
  *
  * We are overridding the display method to manipulate the portal information.
  * If portal is not enabled then don't show the portal fields.
  */
 function display()
 {
     $admin = new Administration();
     $admin->retrieveSettings();
     if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
         $this->ss->assign("PORTAL_ENABLED", true);
     }
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::DVPopupHtml('Contacts');
     parent::display();
 }
开发者ID:santara12,项目名称:advanced-opensales,代码行数:17,代码来源:view.detail.php


示例17: run

 public function run()
 {
     if (!($this->from_flavor == 'ce' && $this->toFlavor('pro'))) {
         return;
     }
     $admin = new Administration();
     $category = 'license';
     $admin->saveSetting($category, 'users', 0);
     foreach (array('num_lic_oc', 'key', 'expire_date') as $k) {
         $admin->saveSetting($category, $k, '');
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:12,代码来源:4_SetLicense.php


示例18: testactivateAndDisableModuleFeed

 public function testactivateAndDisableModuleFeed()
 {
     $admin = new Administration();
     //test activateModuleFeed method
     SugarFeed::activateModuleFeed('Accounts');
     $admin->retrieveSettings('sugarfeed');
     $this->assertEquals(1, $admin->settings['sugarfeed_module_Accounts']);
     //test disableModuleFeed method
     SugarFeed::disableModuleFeed('Accounts');
     $admin->retrieveSettings('sugarfeed');
     $this->assertEquals(0, $admin->settings['sugarfeed_module_Accounts']);
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:12,代码来源:SugarFeedTest.php


示例19: display

 /**
  * @see SugarView::display()
  *
  * We are overridding the display method to manipulate the portal information.
  * If portal is not enabled then don't show the portal fields.
  */
 public function display()
 {
     $admin = new Administration();
     $admin->retrieveSettings();
     if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
         $this->ss->assign("PORTAL_ENABLED", true);
     }
     echo "<script src='custom/include/javascript/ajaxButton.js'></script>";
     parent::display();
     echo "<input title='Отправить презентацию' class='button' onclick='window.open(\"index.php?module=Contacts&action=send_presentation&id={$_REQUEST['record']}\")' value='Отправить презентацию' type='button'>";
     echo "\n\t\t<style>\n\t\t\t._realty_interests_{\n\t\t\t\tbackground-color:#fff;\n\t\t\t\tborder:1px solid #222;\n\t\t\t\twidth:250px;\n\t\t\t\tpadding:1px;\n\t\t\t\tmargin:0px;\n\t\t\t}\n\t\t\t._realty_interests_ li{\n\t\t\t\tpadding:2px;\n\t\t\t\tmargin:0px;\n\t\t\t}\n\t\t\t._realty_interests_ li:hover{\n\t\t\t\tbackground-color:#24D;\n\t\t\t\tcolor:#fff;\n\t\t\t}\n\t\t</style>";
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:18,代码来源:view.detail.php


示例20: testget_config_prefix

 public function testget_config_prefix()
 {
     $admin = new Administration();
     //test with empty string
     $expected = array(false, false);
     $actual = $admin->get_config_prefix('');
     $this->assertSame($expected, $actual);
     //test with a valid string
     $expected = array('category', 'test');
     $actual = $admin->get_config_prefix('category_test');
     $this->assertSame($expected, $actual);
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:12,代码来源:AdministrationTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP AdministrationPage类代码示例发布时间:2022-05-23
下一篇:
PHP AdminbaseAction类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap