本文整理汇总了PHP中IEM::enableInfoTipsGet方法的典型用法代码示例。如果您正苦于以下问题:PHP IEM::enableInfoTipsGet方法的具体用法?PHP IEM::enableInfoTipsGet怎么用?PHP IEM::enableInfoTipsGet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEM
的用法示例。
在下文中一共展示了IEM::enableInfoTipsGet方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetLang
/**
* GetLang
* Returns the defined language variable based on the name passed in.
*
* If a default value is NOT specified (or specified to NULL), the function WILL STOP execution
* whenever a language definition is NOT found. If it is specified, the function will
* return the specified default value instead.
*
* @param String $langvar Name of the language variable to retrieve.
* @param String $default Default value to be returned if language definition does not exists
*
* @return String Returns the defined string, if it doesn't exist (and default is not specified) the script execution will be halted.
*/
function GetLang($langvar = false, $default = null)
{
static $array_to_replace_from = false;
static $array_to_replace_to = false;
if (!$langvar) {
return '';
}
if (!defined('LNG_' . $langvar)) {
// Language definition is not found, return a default value if it is defined
if (!is_null($default)) {
return strval($default);
}
// Make note of where the error occured
$message = '';
if (function_exists('debug_backtrace')) {
$btrace = debug_backtrace();
$called_from = $btrace[0];
$message = ' (Called from ' . basename($called_from['file']) . ', line ' . $called_from['line'] . ')';
}
trigger_error("Langvar '{$langvar}' doesn't exist: " . $message, E_USER_NOTICE);
return $langvar;
}
$var = constant('LNG_' . $langvar);
if (!$array_to_replace_from || !$array_to_replace_to) {
$agency_edition_info = get_agency_license_variables();
$array_to_replace_from = array('%%WHITELABEL_INFOTIPS%%', '%%IEM_SYSTEM_LICENSE_TRIALUSER_TRIALDAYS%%', '%%IEM_SYSTEM_LICENSE_TRIALUSER_EMAILLIMIT%%');
defined('LNG_NumberFormat_Thousands') or define('LNG_NumberFormat_Thousands', ',');
defined('LNG_NumberFormat_Dec') or define('LNG_NumberFormat_Dec', '.');
$array_to_replace_to = array(IEM::enableInfoTipsGet(), $agency_edition_info['trial_days'], number_format((double) $agency_edition_info['trial_email_limit'], 0, LNG_NumberFormat_Dec, LNG_NumberFormat_Thousands));
}
return str_replace($array_to_replace_from, $array_to_replace_to, $var);
}
示例2: IEM_DefaultVariables
/**
* Enter description here...
*
* @return Void Does not return anything
* @todo phpdoc
*/
private function IEM_DefaultVariables()
{
static $variables = null;
if (is_null($variables)) {
$IEM = array('User' => GetUser(), 'ApplicationTitle' => GetLang('ApplicationTitle'), 'PageTitle' => GetLang('PageTitle'), 'CurrentPage' => IEM::requestGetGET('Page', IEM::requestGetGET('page', '')), 'ApplicationLogoImage' => APPLICATION_LOGO_IMAGE, 'ApplicationFavicon' => APPLICATION_FAVICON, 'InfoTips' => IEM::enableInfoTipsGet());
list($IEM['LicenseError'], $IEM['LicenseMessage']) = sesion_start();
IEM::sessionSet('LicenseError', $IEM['LicenseError']);
if (!$IEM['LicenseError'] && isset($GLOBALS['ProductEdition'])) {
$IEM['ApplicationTitle'] .= sprintf(GetLang('ApplicationTitleEdition'), $GLOBALS['ProductEdition']);
}
list($IEM['MenuLinks'], $IEM['TextLinks']) = $this->IEM_Menu();
$variables = $IEM;
}
return $variables;
}
示例3: PrintRSS
/**
* PrintInterspireRSS
* Print the latest info from an rss feed.
* This also caches the feed for 24 hours so it's not going to constantly cause a remote hit
* and should also mean subsequent views are a little faster.
* If a url can't be fetched, the box on the front appears empty.
*
* @param String $rss_url The RSS URL to read in and process.
* @param Int $number_to_display The number of entries to display from the rss feed.
*
* @return Void Doesn't return anything, just prints the top 5 entries from the feed.
*/
function PrintRSS($rss_url=false, $number_to_display=5)
{
if (!$rss_url) {
return;
}
// make sure number_to_display is >= 1.
if ((int)$number_to_display < 1) {
$number_to_display = 5;
}
$check_version = false;
$cache_file = TEMP_DIRECTORY . '/' . str_replace(array('/', '\\', '.', ';', '"', "'"), '', base64_encode($rss_url)).'.xml';
if (!is_file($cache_file)) {
$check_version = true;
}
if (is_file($cache_file)) {
$last_hit = filemtime($cache_file);
if ($last_hit === false) {
$check_version = true;
}
if ($last_hit < (time() - 86400)) {
$check_version = true;
}
// if the file is empty..
if (filesize($cache_file) == 0) {
$check_version = true;
}
}
if ($check_version) {
list($content, $error) = $this->GetPageContents($rss_url);
if ($content !== false) {
if (is_writable(TEMP_DIRECTORY)) {
$fp = fopen($cache_file, 'w');
fputs($fp, $content);
fclose($fp);
}
}
} else {
$content = file_get_contents($cache_file);
}
if ($content !== false) {
$items = $this->FetchXMLNode('item',$content,true);
$i = 0;
foreach ($items as $item) {
$url = $this->FetchXMLNode('link',$item);
$title = $this->FetchXMLNode('title',$item);
preg_match('%<\!\[cdata\[(.*?)\]\]>%is', $title, $matches);
if (isset($matches[1])) {
echo '<li><a href="' . $url . '" target="_blank" title="' . htmlspecialchars($matches[1], ENT_QUOTES, SENDSTUDIO_CHARSET) . '">' . $this->TruncateInMiddle($matches[1]) . '</a></li>';
} else {
preg_match('/http:\/\/www\.viewkb\.com\/questions\/(\d*)\//is', $url, $matches);
if (count($matches) == 2) {
echo '<li><a href="#" onClick="LaunchHelp(\''.IEM::enableInfoTipsGet().'\',\'' . $matches[1] . '\');" title="' . htmlspecialchars($title, ENT_QUOTES, SENDSTUDIO_CHARSET) . '">' . $this->TruncateInMiddle($title) . '</a></li>';
} else {
echo '<li><a href="' . $url . '" target="_blank" title="' . htmlspecialchars($title, ENT_QUOTES, SENDSTUDIO_CHARSET) . '">' . $this->TruncateInMiddle($title) . '</a></li>';
}
}
$i++;
if ($i >= $number_to_display) {
break;
}
}
}
}
示例4: GenerateTextMenuLinks
/**
* GenerateTextMenuLinks
* Generates the text links at the top of the page - which include the home, "users" or "my account", logout links.
* This is used by the template system when it prints out the header.
*
* If a license key error occurs, then this only shows the settings, logout and help links at the top.
* It will not trigger an event to occur either (which addons will use to add themselves to the text links).
*
* Link areas are arrays which can be manipulated by addons if they are installed/enabled.
*
* A menu item can either be singular:
* <code>
* $links['area_name'] = array (
* array (
* 'text' => 'This is the link to click',
* 'link' => 'index.php?Page=MyPage',
* 'show' => true,
* 'description' => 'This is the long description. It is used for the title tag and only shows when you hover over the link'
* )
* );
* </code>
*
* or contain a dropdown menu:
* <code>
* $links['area_name'] = array (
* 'menudetails' => array (
* 'width' => 100, // this is the width in pixels for the dropdown menu
* 'title' => 'What the dropdown menu is called',
* 'description' => 'Long description which shows up when you hover over the dropdown link',
* ),
* array (
* 'text' => 'This is the first item in the menu',
* 'link' => 'index.php?Page=MyPage',
* 'show' => true,
* 'description' => 'This is the long description. It is used for the title tag and only shows when you hover over the link'
* ),
* array (
* 'text' => 'This is the second item in the menu',
* 'link' => 'index.php?Page=MyPage',
* 'show' => true,
* 'description' => 'This is the long description. It is used for the title tag and only shows when you hover over the link'
* ),
* );
* </code>
*
* The 'menudetails' are used to create the dropdown menu base.
*
* @see InterspireTemplate::IEM_Menu
*
* @return String Returns the string to display up the top.
*
* @uses EventData_IEM_SENDSTUDIOFUNCTIONS_GENERATETEXTMENULINKS
*/
static function GenerateTextMenuLinks()
{
$user = IEM::getCurrentUser();
$lke = IEM::sessionGet('LicenseError', false);
// if there's an error with the lk, then just show the links to the settings page, logout & help.
if ($lke && (!isset($_GET['Page']) || strtolower($_GET['Page']) == 'settings')) {
$textlinks = '';
if ($user->HasAccess('Settings')) {
$textlinks .= '<a href="index.php?Page=Settings" class="MenuText" title="' . GetLang('Menu_Settings_Description') . '">' . GetLang('Settings') . '</a>|';
}
$textlinks .= '<a href="index.php?Page=Logout" class="MenuText" title="' . GetLang('Menu_Logout_Description') . '">' . GetLang('Logout') . '</a>|';
$textlinks .= '<a href="JavaScript:LaunchHelp(\''.IEM::enableInfoTipsGet().'\');" class="MenuText" title="' . GetLang('Menu_Help_Description') . '">' . GetLang('ShowHelp') . '</a>';
return $textlinks;
}
$links = array();
$links['home'] = array (
array (
'text' => GetLang('Home'),
'link' => 'index.php',
'show' => true,
'description' => GetLang('Menu_Home_Description'),
)
);
$links['templates'] = array (
'menudetails' => array (
'width' => '185',
'title' => GetLang('Menu_Templates'),
'description' => GetLang('Menu_Templates_Description'),
),
array (
'text' => GetLang('Menu_Templates_Manage'),
'link' => 'index.php?Page=Templates&Action=Manage',
'show' => $user->HasAccess('Templates', 'Manage'),
'description' => GetLang('Menu_Templates_Description'),
'image' => 'templates_view.gif'
),
array (
'text' => GetLang('Menu_Templates_Create'),
'link' => 'index.php?Page=Templates&Action=Create',
'show' => $user->HasAccess('Templates', 'Create'),
'description' => GetLang('Menu_Templates_Create_Description'),
'image' => 'templates_add.gif'
//.........这里部分代码省略.........
示例5: handle
/**
* handle
* Perform the appropriate action after the Bounce Test popup has completed.
* For manual bounce processing, this will redirect to the next step.
* For other cases it will either report success and close or display the error.
*
* @param string $type One of 'next_combo', 'error_report' or 'success'.
* @param boolean $in_place Whether the action should take place in the popup (true) or redirect.
*
* @return void Does not return anything. It prints JavaScript (ugh!).
*/
private static function handle($type, $in_place)
{
$bd = self::hold('TestBounceDetails');
$root = 'index.php?Page=Bounce&Action=';
$urls = array(
'next_combo' => array('TestBounceSettings', 'window', 150),
'error_report' => array('BounceStep2Warning', 'self.parent.parent', 0),
'success' => array('BounceStep3', 'self.parent.parent', 0)
);
if (!$in_place || $type == 'next_combo') {
$url = $root . $urls[$type][0];
$url .= $in_place ? '&InPlace=true' : '';
self::setJSRedirect($url, $urls[$type][1], $urls[$type][2]);
exit();
}
// Replace the progress bar with a message.
// TODO: work out some nicer way to do this.
echo "<script src=\"includes/js/jquery.js\"></script>\n";
if ($type == 'error_report') {
// Alert the appropriate error.
$error = self::getRealError(self::hold('ConnectionErrors'));
$tpl = GetTemplateSystem();
$GLOBALS['Error'] = "<strong>" . $error['name'] . "</strong>";
$GLOBALS['Error'] .= "<ul style=\"padding-left:2em;\">";
foreach ($error['advice'] as $title => $article) {
$GLOBALS['Error'] .= "<li><a href=\"javascript:LaunchHelp('".IEM::enableInfoTipsGet()."',{$article});\">{$title}</a></li>\n";
}
$GLOBALS['Error'] .= "</ul>";
$msg = $tpl->ParseTemplate('ErrorMsg', true);
} elseif ($type == 'success') {
// Set the combo in the UI and disappear.
$msg = self::PrintSuccess('BounceLogin_Successful');
}
$msg = str_replace("\n", '\n', addslashes($msg));
echo "<script>
parent.$('#ProgressReportContainer > div').hide();
parent.$('#ProgressReportMessage').html('{$msg}');
parent.$('#ProgressReportTitle').show();
parent.$('#ProgressReportMessage').show();\n";
if ($type == 'success') {
echo "self.parent.parent.$('#bounce_extrasettings').val('{$bd['extra_settings']}');\n";
echo "self.parent.parent.Application.Page.BounceInfo.evaluateCheckboxes();\n";
echo "setTimeout(function() { self.parent.parent.tb_remove(); }, 1500);\n";
} else {
echo "parent.$('#ProgressReportWindow_Close').show();\n";
}
echo "</script>\n";
exit();
}