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

PHP get_custom_file_if_exists函数代码示例

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

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



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

示例1: displayOptions

 public function displayOptions()
 {
     ob_start();
     global $current_language, $app_list_strings;
     $mod_strings = return_module_language($current_language, 'AOR_Reports');
     $optionsSmarty = new Sugar_Smarty();
     $optionsSmarty->assign('MOD', $mod_strings);
     $optionsSmarty->assign('id', $this->id);
     $optionsSmarty->assign('dashletTitle', $this->title);
     $optionsSmarty->assign('aor_report_id', $this->report->id);
     $optionsSmarty->assign('aor_report_name', $this->report->name);
     $optionsSmarty->assign('onlyCharts', $this->onlyCharts);
     $charts = array();
     if (!empty($this->report->id)) {
         foreach ($this->report->get_linked_beans('aor_charts', 'AOR_Charts') as $chart) {
             $charts[$chart->id] = $chart->name;
         }
     }
     $conditions = getConditionsAsParameters($this->report, $this->params);
     $optionsSmarty->assign('parameters', $conditions);
     $chartOptions = get_select_options_with_id($charts, $this->charts);
     $optionsSmarty->assign('chartOptions', $chartOptions);
     $optionsTemplate = get_custom_file_if_exists('modules/AOR_Reports/Dashlets/AORReportsDashlet/dashletConfigure.tpl');
     ob_clean();
     return $optionsSmarty->fetch($optionsTemplate);
 }
开发者ID:omusico,项目名称:suitecrm-docker,代码行数:26,代码来源:AORReportsDashlet.php


示例2: preDisplay

 /**
  * @see SugarView::preDisplay()
  */
 public function preDisplay()
 {
     $metadataFile = $this->getMetaDataFile();
     $this->dv = new DetailView2();
     $this->dv->ss =& $this->ss;
     $this->dv->setup($this->module, $this->bean, $metadataFile, get_custom_file_if_exists('include/DetailView/DetailView.tpl'));
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:10,代码来源:view.detail.php


示例3: preDisplay

 /**
  * @see SugarView::preDisplay()
  */
 public function preDisplay()
 {
     $metadataFile = $this->getMetaDataFile();
     $this->ev = $this->getEditView();
     $this->ev->ss =& $this->ss;
     $this->ev->setup($this->module, $this->bean, $metadataFile, get_custom_file_if_exists('include/EditView/EditView.tpl'));
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:10,代码来源:view.edit.php


示例4: authenticateUser

 /**
  * Does the actual authentication of the user and returns an id that will be used
  * to load the current user (loadUserOnSession)
  *
  * @param STRING $name
  * @param STRING $password
  * @return STRING id - used for loading the user
  *
  * Contributions by Erik Mitchell [email protected]
  */
 function authenticateUser($name, $password)
 {
     $GLOBALS['log']->debug('authenticating user.');
     // JMH
     //        uncomment the line below to test on the server. this is a temporary solution - John H. (task 9069)
     //		$_POST['SAMLResponse'] = "PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnhzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgRGVzdGluYXRpb249Imh0dHA6Ly9kZXZzdWdhci5ydHAucmFsZWlnaC5pYm0uY29tL3N1Z2FyLXNhbWwvaW5kZXgucGhwP21vZHVsZT1Vc2VycyZhbXA7YWN0aW9uPUF1dGhlbnRpY2F0ZSIgSUQ9IkZJTVJTUF8xZjUxNjc4Ni0wMTM0LTFmM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
     if (empty($_POST['SAMLResponse'])) {
         return parent::authenticateUser($name, $password);
     }
     $GLOBALS['log']->debug('have saml data.');
     // JMH
     // Look for custom versions of settings.php if it exists
     require get_custom_file_if_exists('modules/Users/authentication/SAMLAuthenticate/settings.php');
     require 'modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml.php';
     $samlresponse = new SamlResponse(get_saml_settings(), $_POST['SAMLResponse']);
     if ($samlresponse->is_valid()) {
         $GLOBALS['log']->debug('response is valid');
         $settings = get_saml_settings();
         $customFields = $this->getAdditionalFieldsToSelect($samlresponse, $settings);
         $GLOBALS['log']->debug('got this many custom fields:' . count($customFields));
         $xmlDoc = new DOMDocument();
         $xmlDoc->loadXML(base64_decode($_POST['SAMLResponse']));
         $xpath = new DOMXpath($xmlDoc);
         $query = $settings->saml_settings['check']['user_name'];
         $entries = $xpath->query($query);
         $nameId = $entries->item(0)->nodeValue;
         $sql = "SELECT id, status {$customFields} FROM users WHERE " . $settings->id . "='" . $nameId . "' AND deleted = 0";
         $dbresult = $GLOBALS['db']->query("SELECT id, status {$customFields} FROM users WHERE " . $settings->id . "='" . $nameId . "' AND deleted = 0");
         $GLOBALS['log']->debug("sql: {$sql}");
         // JMH
         $GLOBALS['log']->debug('queried the db');
         // JMH
         //user already exists use this one
         if ($row = $GLOBALS['db']->fetchByAssoc($dbresult)) {
             $GLOBALS['log']->debug('have db results');
             // JMH
             if ($row['status'] != 'Inactive') {
                 $GLOBALS['log']->debug('have current user');
                 // JMH
                 $this->updateCustomFields($row, $_POST['SAMLResponse'], $settings);
                 return $row['id'];
             } else {
                 $GLOBALS['log']->debug('have inactive user');
                 // JMH
                 return '';
             }
         } else {
             if (isset($settings->customCreateFunction)) {
                 call_user_func($settings->customCreateFunction, $this, $samlresponse->get_nameid(), $xpath, $settings);
             } else {
                 return $this->createUser($samlresponse->get_nameid(), $xpath, $settings);
             }
         }
         //      comment out the following two lines for testing - John H. (task 9069)
     }
     return '';
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:67,代码来源:SAMLAuthenticateUser.php


示例5: preDisplay

 public function preDisplay()
 {
     //fill additionalFields
     $assigned_user = BeanFactory::getBean("Users", $this->bean->assigned_user_id);
     $this->bean->user_title = $assigned_user->title;
     //call parent
     $metadataFile = $this->getMetaDataFile();
     $this->dv = new DetailView2();
     $this->dv->ss =& $this->ss;
     $this->dv->setup($this->module, $this->bean, $metadataFile, get_custom_file_if_exists('include/DetailView/DetailView.tpl'));
 }
开发者ID:jasondavis,项目名称:sugarcrm,代码行数:11,代码来源:view.detail.php


示例6: SearchForm

 /**
  * loads SearchFields MetaData, sets member variables
  *
  * @param string $module moduleDir
  * @param bean $seedBean seed bean to use
  * @param string $tpl template to use, defaults to moduleDir/SearchForm.html
  *
  */
 function SearchForm($module, $seedBean, $tpl = null)
 {
     global $app_strings;
     $this->module = $module;
     $searchFields = SugarAutoLoader::loadSearchFields($module);
     $this->searchFields = $searchFields[$module];
     if (empty($tpl)) {
         if (!empty($GLOBALS['layout_edit_mode'])) {
             $this->tpl = sugar_cached('studio/custom/working/modules/' . $module . '/SearchForm.html');
         } else {
             $this->tpl = get_custom_file_if_exists('modules/' . $module . '/SearchForm.html');
         }
     } else {
         $this->tpl = $tpl;
     }
     $this->bean = $seedBean;
     $this->tabs = array(array('title' => $app_strings['LNK_BASIC_SEARCH'], 'link' => $module . '|basic_search', 'key' => $module . '|basic_search'), array('title' => $app_strings['LNK_ADVANCED_SEARCH'], 'link' => $module . '|advanced_search', 'key' => $module . '|advanced_search'));
     if (SugarAutoLoader::fileExists('modules/' . $this->module . '/index.php')) {
         $this->tabs[] = array('title' => $app_strings['LNK_SAVED_VIEWS'], 'link' => $module . '|saved_views', 'key' => $module . '|saved_views');
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:29,代码来源:SearchForm.php


示例7: fileExists

 /**
  * FUNCTION IS DEPRECATED FOR SUGAR 6.5+
  * @codeCoverageIgnore
  * @param $file
  * @return bool
  */
 public function fileExists($file)
 {
     global $sugar_flavor, $sugar_version;
     $version = explode('.', $sugar_version);
     //$flavor = strpos($sugar_flavor, 'OD');
     //if ($flavor === false) {
     if (!((int) $version[0] == 6 && (int) $version[1] >= 7)) {
         require_once "include/utils.php";
         //if the $check_path exists in custom, $path will be returned as "custom/{$check_path}", otherwise $check_path will be returned
         $path = get_custom_file_if_exists($file);
         if ($file != $path) {
             return true;
         } else {
             return false;
         }
         //            return file_exists($file);
     } else {
         //For Sugar On-Demand
         return SugarAutoloader::fileExists($file);
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:27,代码来源:PMSE.php


示例8: displayDataForm

 /**
  * This method assembles and renders the display of the custom template
  * for the edit and detail actions for the ProcessMaker Module.
  * @param type $module The name of the module to be rendered
  * @param type $id The id of the record to be rendered
  * @param type $viewMode This parameter can be 'bpm' 'detail' or 'edit'
  *                        in order to render the adequate template and
  *                        view definition
  */
 public function displayDataForm($module = '', $id = '', $viewMode = 'bpm', $readonly = false)
 {
     if (!empty($module) && !empty($id)) {
         $this->bean = BeanFactory::getBean($module, $id);
         $altViewMode = array();
         if (is_array($viewMode)) {
             $altViewMode = $viewMode;
             $viewMode = $viewMode['displayMode'];
         } else {
             $this->type = 'detail';
             $viewMode = 'detail';
         }
         $this->module = $module;
         $metadataFile = $this->getMetaDataFile($readonly ? 'detail' : 'edit');
         $viewdefs = '';
         if (isset($GLOBALS['sugar_config']['disable_vcr'])) {
             $this->showVCRControl = !$GLOBALS['sugar_config']['disable_vcr'];
         }
         if (empty($altViewMode)) {
             $mfile = get_custom_file_if_exists($metadataFile);
             if (isset($mfile)) {
                 require $metadataFile;
             }
         } else {
             $dynaformBean = BeanFactory::getBean('pmse_BpmDynaForm');
             //new BpmDynaForm();
             $dynaformBean->retrieve_by_string_fields(array('dyn_uid' => $altViewMode['dyn_uid']));
             $this->dyn_uid = $altViewMode['dyn_uid'];
             $viewdefs = unserialize(base64_decode($dynaformBean->dyn_view_defs));
             //unserialize(base64_decode('YToxOntzOjc6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kVMX0FEVkFOQ0VEIjthOjQ6e2k6MDthOjI6e2k6MDtzOjY6InN0YXR1cyI7aToxO3M6MTE6ImxlYWRfc291cmNlIjt9aToxO2E6Mjp7aTowO2E6MTp7czo0OiJuYW1lIjtzOjE4OiJzdGF0dXNfZGVzY3JpcHRpb24iO31pOjE7YToxOntzOjQ6Im5hbWUiO3M6MjM6ImxlYWRfc291cmNlX2Rlc2NyaXB0aW9uIjt9fWk6MjthOjI6e2k6MDtzOjE4OiJvcHBvcnR1bml0eV9hbW91bnQiO2k6MTtzOjEwOiJyZWZlcmVkX2J5Ijt9aTozO2E6Mjp7aTowO3M6MTM6ImNhbXBhaWduX25hbWUiO2k6MTtzOjExOiJkb19ub3RfY2FsbCI7fX1zOjIwOiJMQkxfUEFORUxfQVNTSUdOTUVOVCI7YToxOntpOjA7YToyOntpOjA7YToyOntzOjQ6Im5hbWUiO3M6MTg6ImFzc2lnbmVkX3VzZXJfbmFtZSI7czo1OiJsYWJlbCI7czoxNToiTEJMX0FTU0lHTkVEX1RPIjt9aToxO2E6Mjp7czo0OiJuYW1lIjtzOjk6InRlYW1fbmFtZSI7czoxMzoiZGlzcGxheVBhcmFtcyI7YToxOntzOjc6ImRpc3BsYXkiO2I6MTt9fX19fX19'));
             if ($readonly) {
                 $this->setHeaderFootersReadOnly($viewdefs);
             }
             $tmpArray = array();
             $tmpArray[$this->bean->module_name] = $viewdefs;
             $viewdefs = $tmpArray;
         }
         $this->view = ucfirst($viewMode) . 'View';
         if (isset($viewdefs[$this->bean->module_name][$this->view])) {
             $this->defs = $viewdefs[$this->bean->module_name][$this->view];
         } else {
             $this->defs = $viewdefs[$this->bean->module_name]['EditView'];
         }
         $this->focus = $this->bean;
         $tpl = get_custom_file_if_exists('modules/pmse_Inbox/tpls/' . $this->view . '.tpl');
         $this->th = new TemplateHandler();
         $this->th->ss =& $this->ss;
         $this->tpl = $tpl;
         if ($this->th->checkTemplate($this->bean->module_name, $this->view)) {
             $this->th->deleteTemplate($this->bean->module_name, $this->view);
         }
         $this->ev = new EditView();
         $this->ev->ss =& $this->ss;
         $this->ev->module = $module;
         $this->ev->th = $this->th;
         $this->ev->focus = $this->bean;
         $this->ev->defs = $this->defs;
         $this->ev->view = $this->view;
         $this->ev->process();
         $this->fieldDefs = $this->ev->fieldDefs;
         $this->sectionPanels = $this->ev->sectionPanels;
         $this->offset = $this->ev->offset;
         $this->returnModule = $this->ev->returnModule;
         $this->returnAction = $this->ev->returnAction;
         $this->returnId = $this->ev->returnId;
         //$this->returnRelationship = $this->ev->returnRelationship;
         //$this->returnName = $this->ev->returnName;
         return $this->setupAll(false, false, $this->bean->module_name, $readonly);
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:79,代码来源:view.showcase.php


示例9: display_shared_html

 /**
  * display html used in shared view
  */
 public function display_shared_html($view)
 {
     global $app_strings, $cal_strings, $action;
     $ss = new Sugar_Smarty();
     $ss->assign("APP", $app_strings);
     $ss->assign("MOD", $cal_strings);
     $ss->assign("view", $view);
     $ss->assign("UP", SugarThemeRegistry::current()->getImage('uparrow_big', 'border="0" style="margin-bottom: 1px;"', null, null, '.gif', $app_strings['LBL_SORT']));
     $ss->assign("DOWN", SugarThemeRegistry::current()->getImage('downarrow_big', 'border="0" style="margin-top: 1px;"', null, null, '.gif', $app_strings['LBL_SORT']));
     //hide by default.
     if (!empty($_REQUEST['edit_shared'])) {
         $ss->assign("edit_shared", true);
     }
     $ss->assign("users_options", get_select_options_with_id(get_user_array(false), $this->cal->shared_ids));
     $tpl = get_custom_file_if_exists("modules/Calendar/tpls/shared_users.tpl");
     echo $ss->fetch($tpl);
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:20,代码来源:CalendarDisplay.php


示例10: create_default_users

    create_default_users();
    echo $mod_strings['LBL_PERFORM_DONE'];
} else {
    echo $line_entry_format . $mod_strings['LBL_PERFORM_ADMIN_PASSWORD'] . $line_exit_format;
    installLog($mod_strings['LBL_PERFORM_ADMIN_PASSWORD']);
    $db->setUserName($setup_db_sugarsales_user);
    $db->setUserPassword($setup_db_sugarsales_password);
    set_admin_password($setup_site_admin_password);
    echo $mod_strings['LBL_PERFORM_DONE'];
}
installerHook('post_createUsers');
if ($new_report) {
    echo $line_entry_format . $mod_strings['LBL_PERFORM_DEFAULT_REPORTS'] . $line_exit_format;
    installLog($mod_strings['LBL_PERFORM_DEFAULT_REPORTS']);
    installerHook('pre_createDefaultReports');
    require_once get_custom_file_if_exists('modules/Reports/SeedReports.php');
    create_default_reports();
    installerHook('post_createDefaultReports');
    echo $mod_strings['LBL_PERFORM_DONE'];
}
// default OOB schedulers
echo $line_entry_format . $mod_strings['LBL_PERFORM_DEFAULT_SCHEDULER'] . $line_exit_format;
installLog($mod_strings['LBL_PERFORM_DEFAULT_SCHEDULER']);
$scheduler = new Scheduler();
installerHook('pre_createDefaultSchedulers');
$scheduler->rebuildDefaultSchedulers();
installerHook('post_createDefaultSchedulers');
///create kb tag data.
installLog("create kb tag default data");
KBTag::default_install_data();
echo $mod_strings['LBL_PERFORM_DONE'];
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:performSetup.php


示例11: display

 public function display()
 {
     global $mod_strings;
     if (isset($_REQUEST['name_basic'])) {
         $file_search = trim($_REQUEST['name_basic']);
     } else {
         $file_search = '';
     }
     if (!isset($_REQUEST['apiName'])) {
         $apiName = 'IBMSmartCloud';
     } else {
         $tmpApi = ExternalAPIFactory::loadAPI($_REQUEST['apiName'], true);
         if ($tmpApi === false) {
             Log::error(string_format($mod_strings['ERR_INVALID_EXTERNAL_API_ACCESS'], [$_REQUEST['apiName']]));
             return;
         }
         $apiName = $_REQUEST['apiName'];
     }
     // See if we are running as a popup window
     if (isset($_REQUEST['isPopup']) && $_REQUEST['isPopup'] == 1 && !empty($_REQUEST['elemBaseName'])) {
         $isPopup = true;
     } else {
         $isPopup = false;
     }
     // bug50952 - must actually make sure we can log in, not just that we've got a EAPM record
     // getLoginInfo only checks to see if user has logged in correctly ONCE to ExternalAPI
     // Need to manually attempt to fetch the EAPM record, we don't want to give them the signup screen when they just have a deactivated account.
     $eapmBean = EAPM::getLoginInfo($apiName, true);
     $api = ExternalAPIFactory::loadAPI($apiName, true);
     $validSession = true;
     if (!empty($eapmBean)) {
         try {
             $api->loadEAPM($eapmBean);
             // $api->checkLogin() does the same thing as quickCheckLogin plus actually makes sure the user CAN log in to the API currently
             $loginCheck = $api->checkLogin($eapmBean);
             if (isset($loginCheck['success']) && !$loginCheck['success']) {
                 $validSession = false;
             }
         } catch (Exception $ex) {
             $validSession = false;
             Log::error(string_format($mod_strings['ERR_INVALID_EXTERNAL_API_LOGIN'], [$apiName]));
         }
     }
     if (!$validSession || empty($eapmBean)) {
         // Bug #49987 : Documents view.extdoc.php doesn't allow custom override
         $tpl_file = get_custom_file_if_exists('include/externalAPI/' . $apiName . '/' . $apiName . 'Signup.' . $GLOBALS['current_language'] . '.tpl');
         if (file_exists($tpl_file)) {
             $smarty = new Sugar_Smarty();
             echo $smarty->fetch($tpl_file);
         } else {
             $output = string_format(translate('LBL_ERR_FAILED_QUICKCHECK', 'EAPM'), [$apiName]);
             $output .= '<form method="POST" target="_EAPM_CHECK" action="index.php">';
             $output .= '<input type="hidden" name="module" value="EAPM">';
             $output .= '<input type="hidden" name="action" value="Save">';
             $output .= '<input type="hidden" name="record" value="' . $eapmBean->id . '">';
             $output .= '<input type="hidden" name="active" value="1">';
             $output .= '<input type="hidden" name="closeWhenDone" value="1">';
             $output .= '<input type="hidden" name="refreshParentWindow" value="1">';
             $output .= '<br><input type="submit" value="' . $GLOBALS['app_strings']['LBL_EMAIL_OK'] . '">&nbsp;';
             $output .= '<input type="button" onclick="lastLoadedMenu=undefined;DCMenu.closeOverlay();return false;" value="' . $GLOBALS['app_strings']['LBL_CANCEL_BUTTON_LABEL'] . '">';
             $output .= '</form>';
             echo $output;
         }
         return;
     }
     $searchDataLower = $api->searchDoc($file_search, true);
     // In order to emulate the list views for the SugarFields, I need to uppercase all of the key names.
     $searchData = [];
     if (is_array($searchDataLower)) {
         foreach ($searchDataLower as $row) {
             $newRow = [];
             foreach ($row as $key => $value) {
                 $newRow[strtoupper($key)] = $value;
             }
             if ($isPopup) {
                 // We are running as a popup window, we need to replace the direct url with some javascript
                 $newRow['DOC_URL'] = "javascript:window.opener.SUGAR.field.file.populateFromPopup('" . addslashes($_REQUEST['elemBaseName']) . "','" . addslashes($newRow['ID']) . "','" . addslashes($newRow['NAME']) . "','" . addslashes($newRow['URL']) . "','" . addslashes($newRow['URL']) . "'); window.close();";
             } else {
                 $newRow['DOC_URL'] = $newRow['URL'];
             }
             $searchData[] = $newRow;
         }
     }
     $displayColumns = ['NAME' => ['label' => 'LBL_LIST_EXT_DOCUMENT_NAME', 'type' => 'varchar', 'link' => true], 'DATE_MODIFIED' => ['label' => 'LBL_DATE', 'type' => 'date']];
     $ss = new Sugar_Smarty();
     $ss->assign('searchFieldLabel', translate('LBL_SEARCH_EXTERNAL_DOCUMENT', 'Documents'));
     $ss->assign('displayedNote', translate('LBL_EXTERNAL_DOCUMENT_NOTE', 'Documents'));
     $ss->assign('APP', $GLOBALS['app_strings']);
     $ss->assign('MOD', $GLOBALS['mod_strings']);
     $ss->assign('data', $searchData);
     $ss->assign('displayColumns', $displayColumns);
     $ss->assign('imgPath', SugarThemeRegistry::current()->getImageURL($apiName . '_image_inline.png'));
     if ($isPopup) {
         $ss->assign('linkTarget', '');
         $ss->assign('isPopup', 1);
         $ss->assign('elemBaseName', $_REQUEST['elemBaseName']);
     } else {
         $ss->assign('linkTarget', '_new');
         $ss->assign('isPopup', 0);
         $ss->assign('elemBaseName', '');
//.........这里部分代码省略.........
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:101,代码来源:view.extdoc.php


示例12: SearchForm

 /**
  * loads SearchFields MetaData, sets member variables
  *
  * @param string $module moduleDir
  * @param bean $seedBean seed bean to use
  * @param string $tpl template to use, defaults to moduleDir/SearchForm.html
  *
  */
 function SearchForm($module, &$seedBean, $tpl = null)
 {
     global $app_strings;
     $GLOBALS['log']->info("include.SearchForm.SearchForm.php.SearchForm");
     $this->module = $module;
     require_once 'modules/' . $module . '/metadata/SearchFields.php';
     if (file_exists('custom/modules/' . $module . '/metadata/SearchFields.php')) {
         require_once 'custom/modules/' . $module . '/metadata/SearchFields.php';
     }
     //require_once('modules/' . $module . '/metadata/SearchFields.php');
     $this->searchFields = $searchFields[$module];
     if (empty($tpl)) {
         $GLOBALS['log']->info("include.SearchForm.SearchForm.php.SearchForm, tpl is empty.");
         if (!empty($GLOBALS['layout_edit_mode'])) {
             $this->tpl = sugar_cached('studio/custom/working/modules/' . $module . '/SearchForm.html');
         } else {
             $this->tpl = get_custom_file_if_exists('modules/' . $module . '/SearchForm.html');
         }
     } else {
         $GLOBALS['log']->info("include.SearchForm.SearchForm.php.SearchForm, tpl is not empty");
         $this->tpl = $tpl;
     }
     $this->bean = $seedBean;
     $this->tabs = array(array('title' => $app_strings['LNK_BASIC_SEARCH'], 'link' => $module . '|basic_search', 'key' => $module . '|basic_search'), array('title' => $app_strings['LNK_ADVANCED_SEARCH'], 'link' => $module . '|advanced_search', 'key' => $module . '|advanced_search'));
     if (file_exists('modules/' . $this->module . '/index.php')) {
         $this->tabs[] = array('title' => $app_strings['LNK_SAVED_VIEWS'], 'link' => $module . '|saved_views', 'key' => $module . '|saved_views');
     }
 }
开发者ID:jeffcao,项目名称:fzglsys_v5,代码行数:36,代码来源:SearchForm.php


示例13: getPostForm

 /**
  *
  * @return the form for users posting custom messages to the feed stream
  */
 function getPostForm()
 {
     global $current_user;
     if (!empty($this->selectedCategories) && !in_array('UserFeed', $this->selectedCategories)) {
         // The user feed system isn't enabled, don't let them post notes
         return '';
     }
     $user_name = ucfirst($GLOBALS['current_user']->user_name);
     $moreimg = SugarThemeRegistry::current()->getImage('advanced_search', 'onclick="toggleDisplay(\'more_' . $this->id . '\'); toggleDisplay(\'more_img_' . $this->id . '\'); toggleDisplay(\'less_img_' . $this->id . '\');"', null, null, '.gif', translate('LBL_SHOW_MORE_OPTIONS', 'SugarFeed'));
     $lessimg = SugarThemeRegistry::current()->getImage('basic_search', 'onclick="toggleDisplay(\'more_' . $this->id . '\'); toggleDisplay(\'more_img_' . $this->id . '\'); toggleDisplay(\'less_img_' . $this->id . '\');"', null, null, '.gif', translate('LBL_HIDE_OPTIONS', 'SugarFeed'));
     $ss = new Sugar_Smarty();
     $ss->assign('LBL_TO', translate('LBL_TO', 'SugarFeed'));
     $ss->assign('LBL_POST', translate('LBL_POST', 'SugarFeed'));
     $ss->assign('LBL_SELECT', translate('LBL_SELECT', 'SugarFeed'));
     $ss->assign('LBL_IS', translate('LBL_IS', 'SugarFeed'));
     $ss->assign('id', $this->id);
     $ss->assign('more_img', $moreimg);
     $ss->assign('less_img', $lessimg);
     include_once "include/social/get_feed_data.php";
     $ss->assign('facebook', $html);
     if ($current_user->getPreference('use_real_names') == 'on') {
         $ss->assign('user_name', $current_user->full_name);
     } else {
         $ss->assign('user_name', $user_name);
     }
     $linkTypesIn = SugarFeed::getLinkTypes();
     $linkTypes = array();
     foreach ($linkTypesIn as $key => $value) {
         $linkTypes[$key] = translate('LBL_LINK_TYPE_' . $value, 'SugarFeed');
     }
     $ss->assign('link_types', $linkTypes);
     $userPostFormTplFile = 'modules/SugarFeed/Dashlets/SugarFeedDashlet/UserPostForm.tpl';
     $fetch = $ss->fetch(get_custom_file_if_exists($userPostFormTplFile));
     return $fetch;
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:39,代码来源:SugarFeedDashlet.php


示例14: testCustomNameId

 /**
  * Test that custom XPath is used when specified in settings
  */
 public function testCustomNameId()
 {
     $node_id = 'Bug49959Test';
     // create response with custom XML
     $mock2 = $this->getResponse();
     $mock2->xml = $this->getResponseXml($node_id);
     // create SAML settings object with custom name id definition
     require get_custom_file_if_exists('modules/Users/authentication/SAMLAuthenticate/settings.php');
     $settings->saml_settings['check']['user_name'] = '//root';
     // expect that user ID is fetched from the document according to settings
     $result = self::$auth->get_user_id($mock2, $settings);
     $this->assertEquals($node_id, $result);
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:16,代码来源:Bug49959Test.php


示例15: redirectToLogin

 /**
  * Redirect to login page
  * 
  * @param SugarApplication $app
  */
 public function redirectToLogin(SugarApplication $app)
 {
     require get_custom_file_if_exists('modules/Users/authentication/SAMLAuthenticate/settings.php');
     $loginVars = $app->createLoginVars();
     // $settings - variable from modules/Users/authentication/SAMLAuthenticate/settings.php
     $settings->assertion_consumer_service_url .= htmlspecialchars($loginVars);
     $authRequest = new SamlAuthRequest($settings);
     $url = $authRequest->create();
     SugarApplication::redirect($url);
 }
开发者ID:switcode,项目名称:SuiteCRM,代码行数:15,代码来源:SAMLAuthenticate.php


示例16: getCustomFilePathIfExists

 /**
  * getCustomFilePathIfExists
  *
  * This function wraps a call to get_custom_file_if_exists from include/utils.php
  *
  * @param $file String of filename to check
  * @return $file String of filename including custom directory if found
  */
 protected function getCustomFilePathIfExists($file)
 {
     return get_custom_file_if_exists($file);
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:12,代码来源:SugarView.php


示例17: displayOptions

 public function displayOptions()
 {
     ob_start();
     global $current_language, $app_list_strings, $datetime;
     $mod_strings = return_module_language($current_language, 'AOR_Reports');
     $optionsSmarty = new Sugar_Smarty();
     $optionsSmarty->assign('MOD', $mod_strings);
     $optionsSmarty->assign('id', $this->id);
     $optionsSmarty->assign('dashletTitle', $this->title);
     $optionsSmarty->assign('aor_report_id', $this->report->id);
     $optionsSmarty->assign('aor_report_name', $this->report->name);
     $optionsSmarty->assign('onlyCharts', $this->onlyCharts);
     $optionsSmarty->assign('aor_date_options', $app_list_strings['aor_date_options']);
     $optionsSmarty->assign('aor_condition_type_list', $app_list_strings['aor_condition_type_list']);
     $optionsSmarty->assign('aor_date_operator', $app_list_strings['aor_date_operator']);
     $optionsSmarty->assign('aor_date_type_list', $app_list_strings['aor_date_type_list']);
     $optionsSmarty->assign('date_time_period_list', $app_list_strings['date_time_period_list']);
     $charts = array();
     if (!empty($this->report->id)) {
         foreach ($this->report->get_linked_beans('aor_charts', 'AOR_Charts') as $chart) {
             $charts[$chart->id] = $chart->name;
         }
     }
     $conditions = getConditionsAsParameters($this->report, $this->params);
     $i = 0;
     foreach ($conditions as $condition) {
         if ($condition["value_type"] == "Date") {
             if ($condition["additionalConditions"][0] == "now") {
                 $conditions[$i]["value"] = date("d/m/Y");
             }
         }
         $i++;
     }
     $optionsSmarty->assign('parameters', $conditions);
     $chartOptions = get_select_options_with_id($charts, $this->charts);
     $optionsSmarty->assign('chartOptions', $chartOptions);
     $optionsTemplate = get_custom_file_if_exists('modules/AOR_Reports/Dashlets/AORReportsDashlet/dashletConfigure.tpl');
     ob_clean();
     return $optionsSmarty->fetch($optionsTemplate);
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:40,代码来源:AORReportsDashlet.php


示例18: getFilenameForSugarWidget


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_custom_header函数代码示例发布时间:2022-05-15
下一篇:
PHP get_custom_file_base函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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