本文整理汇总了PHP中isJoomla15函数的典型用法代码示例。如果您正苦于以下问题:PHP isJoomla15函数的具体用法?PHP isJoomla15怎么用?PHP isJoomla15使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isJoomla15函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display()
{
global $jLang;
if (isJoomla15()) {
JToolbarHelper::title($jLang['_ADMIN_EDIT_CUSTOMISATIONS_TITLE'], 'customisations');
} else {
?>
<table class='adminheading'>
<tr><th><?php
echo $jLang['_ADMIN_EDIT_CUSTOMISATIONS_TITLE'];
?>
</th></tr>
</table>
<?php
}
?>
<form action="index2.php?option=com_jtips" method="POST" name="adminForm" enctype="multipart/form-data">
<input type="hidden" name="task" value="" />
<input type="hidden" name="module" value="Customisations" />
<input type="hidden" name="path" value="<?php
echo $this->path;
?>
" />
<input type="hidden" name="<?php
echo jTipsSpoofValue();
?>
" value="1" />
<?php
if (!$this->path) {
$this->displayFileSetup();
}
?>
<fieldset>
<legend><?php
echo $jLang['_ADMIN_CSTM_FILE_EDIT'];
?>
</legend>
<table class='adminform'>
<thead>
<tr>
<th><?php
echo $this->path;
?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td><textarea style="width:100%;height:500px" cols="110" rows="25" name="filecontent" id="filecontent" class="inputbox"><?php
echo $this->content;
?>
</textarea></td>
</tr>
</tbody>
</table>
</fieldset>
</form>
<?php
}
示例2: _log
static function _log($item, $prepend = "")
{
global $jTips, $mosConfig_absolute_path;
$file_path = $mosConfig_absolute_path . "/components/com_jtips/jtips.log";
$level = empty($prepend) ? 'INFO' : strtoupper($prepend);
if (isset($jTips['DebugLevel']) and !in_array($level, $jTips['DebugLevel'])) {
return true;
}
if (isJoomla15()) {
jimport('joomla.filesystem.file');
if (JFile::exists($file_path)) {
$size = filesize($file_path);
$human = round($size / (1024 * 1024), 4);
if ($human >= 10) {
if (JFile::exists($file_path . ".0")) {
JFile::delete($file_path . ".0");
}
JFile::move($file_path, $file_path . ".0");
}
}
} else {
if (file_exists($file_path)) {
$size = filesize($file_path);
$human = round($size / (1024 * 1024), 4);
if ($human >= 10) {
if (file_exists($file_path . ".0")) {
@unlink($file_path . ".0");
}
@rename($file_path, $file_path . ".0");
}
}
}
if (!empty($prepend) and is_string($prepend)) {
$prepend .= " ";
}
$log = "jLOG " . gmdate('Y-m-d H:i:s') . ": " . $prepend . stripslashes(print_r($item, true)) . "\n";
if (isJoomla15()) {
$data = '';
if (JFile::exists($file_path)) {
$data = JFile::read($file_path);
$data .= $log;
}
return JFile::write($file_path, $data);
} else {
if (!($handle = fopen($file_path, 'a'))) {
jTipsLogger::jTipsDebug("FAILED TO OPEN LOG FILE!", false);
} else {
if (fwrite($handle, $log) === false) {
jTipsLogger::jTipsDebug("FAILED TO WRITE TO LOG FILE!", false);
return false;
}
return fclose($handle);
}
}
}
示例3: title
/**
* Display the page title and set the document title based on parameters
* // BUG 349 - support for Page Title menu item parameter option
*
* @since 2.1.10
*/
function title()
{
global $mainframe, $jTips;
$view = jTipsGetParam($_REQUEST, 'view', 'Dashboard');
$default_title = jTipsGetParam($jTips['Menu'], $view, 'jTips');
if (isJoomla15()) {
$document =& JFactory::getDocument();
$params =& $mainframe->getParams();
// Page Title
$menus =& JSite::getMenu();
$menu = $menus->getActive();
if (is_object($menu)) {
$menu_params = new JParameter($menu->params);
if (!$menu_params->get('page_title')) {
$params->set('page_title', JText::_($default_title));
}
} else {
$params->set('page_title', JText::_($default_title));
}
$document->setTitle($params->get('page_title'));
if ($params->def('show_page_title', 0)) {
?>
<div class="componentheading<?php
echo $params->get('pageclass_sfx');
?>
">
<?php
echo html_entity_decode(stripslashes($params->get('page_title')));
?>
</div>
<?php
}
} else {
$mainframe->setPageTitle($default_title);
if (!empty($jTips['Title'])) {
?>
<h1 class='componentheading jmain_heading'><?php
echo $jTips['Title'];
?>
</h1>
<?php
}
}
}
示例4: display
function display()
{
global $Itemid, $database, $mainframe, $jTips, $jLang, $mosConfig_live_site, $jTipsCurrentUser;
$mosConfig_offset = $mainframe->getCfg('offset');
$postURL = jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}");
?>
<script type='text/javascript'>
function getTeamLadder(obj) {
document.getElementById('season_id').value = obj.options[obj.selectedIndex].value;
document.ladderForm.submit();
//window.location.href='index.php?option=com_jtips&Itemid=<?php
echo $Itemid;
?>
&task=teams&season=' + id;
}
</script>
<form action="<?php
echo $postURL;
?>
" method="post" name="ladderForm">
<input type="hidden" name="option" value="com_jtips" />
<input type="hidden" name="task" value="TeamLadder" />
<input type="hidden" name="season" id="season_id" />
<?php
if (jTipsGetParam($_REQUEST, 'menu', 1)) {
//jtips_HTML::seasonsList($jTipsCurrentUser, $this->jSeasons, "onchange='getTeamLadder(this);'", false, $this->jSeason->id);
}
?>
<table width='100%' cellspacing="0">
<thead>
<?php
?>
<tr class='sectiontableheader jtableheader'>
<th class="jtips_team_ladder_header">#</th>
<th class="jtips_team_ladder_header"> </th>
<th class="jtips_team_ladder_header"><?php
echo $jLang['_COM_TLD_TEAM'];
?>
</th>
<?php
if (!empty($jTips['TeamLadderColumns'])) {
foreach ($jTips['TeamLadderColumns'] as $field) {
$lang_key = "_COM_TLD_ABR_" . strtoupper($field);
?>
<th style="text-align:center" width="5" class="jtips_team_ladder_header"><?php
echo $jLang[$lang_key];
?>
</th>
<?php
}
}
?>
</tr>
<?php
?>
</thead>
<tbody>
<?php
$i = 1;
$rowIndex = 0;
$noteams = true;
if (count($this->jTeams) > 0) {
foreach ($this->jTeams as $jTeam) {
$extra = "";
$thisRowIndex = $rowIndex++;
?>
<tr class='sectiontableentry<?php
echo $thisRowIndex % 2 + 1;
?>
jtablerow<?php
echo $thisRowIndex % 2 + 1;
?>
'>
<td style='text-align:center'><?php
echo $i;
?>
</td>
<td style='text-align:center'>
<?php
$img = $jTeam->getLogo();
// if (jTipsFileExists(getJtipsImage($jTeam->logo))) {
// $img .= "<img src='" .$mainframe->getCfg('live_site');
// if (!empty($jTips['SubDirectory'])) {
// $img .= $jTips['SubDirectory'];
// }
// $img .= "/" .getJtipsImage($jTeam->logo). "' alt=' ' border='0' />";
// }
if (empty($img)) {
$img .= " ";
}
echo $img;
?>
</td>
<?php
$popupUrl = "view=TeamLadder&Itemid={$Itemid}&action=ShowTeam&id=" . $jTeam->id;
if (jTipsGetParam($_REQUEST, 'menu', 0) or !jTipsGetParam($_REQUEST, 'tmpl', false)) {
if (isJoomla15()) {
/*$x = $jTips['ShowTipsWidth'];
$y = $jTips['ShowTipsHeight'];
//BUG 274 - team ladder popup results in broken scroll bar
//.........这里部分代码省略.........
示例5: display
function display()
{
global $jLang;
?>
<form action='index2.php' method='post' name='adminForm' enctype='multipart/form-data'>
<input type='hidden' name='task' value='' />
<input type='hidden' name='option' value='<?php
echo jTipsGetParam($_REQUEST, 'options', 'com_jtips');
?>
' />
<input type='hidden' name='hidemainmenu' value='0' />
<input type='hidden' name='module' value='Configuration' />
<input type='hidden' name='<?php
echo jTipsSpoofValue();
?>
' value='1' />
<?php
if (isJoomla15()) {
JToolbarHelper::title($jLang['_ADMIN_CONF_TITLE'] . " - " . getVersionNum(), 'config');
} else {
?>
<table class='adminheading'>
<tr><th><?php
echo $jLang['_ADMIN_CONF_TITLE'] . " - " . getVersionNum();
?>
</th></tr>
</table>
<?php
}
?>
<div style='width: 100%;'>
<?php
$tabs = new jTipsTabs(1);
$tabs->startPane('dashboard');
foreach ($this->configuration as $tab => $items) {
$tabs->startTab(ucwords($tab), $tab);
?>
<table class='adminlist'>
<thead>
<tr>
<th align='left' width='20%'><?php
echo $jLang['_ADMIN_CONF_SETTING'];
?>
</th>
<th align='left' width='20%'><?php
echo $jLang['_ADMIN_CONF_VARIABLE'];
?>
</th>
<th align='left'><?php
echo $jLang['_ADMIN_CONF_DESCRIPTION'];
?>
</th>
</tr>
</thead>
<tbody>
<?php
$i = 0;
foreach ($items as $key => $val) {
if (isset($val['versions']) and !empty($val['versions'])) {
continue;
} else {
if (isset($val['type']) and !empty($val['type'])) {
$label = (isset($val['label']) and !empty($val['label']) and isset($jLang[$val['label']]) and !empty($jLang[$val['label']])) ? $val['label'] : '';
if (isset($val['definition']) and !empty($val['definition']) and isset($jLang[$val['definition']]) and !empty($jLang[$val['definition']])) {
$definition = $jLang[$val['definition']];
} else {
$definition = ' ';
}
?>
<tr class='row<?php
echo $i % 2;
?>
'>
<td><?php
if (isset($jLang[$label]) and !empty($jLang[$label])) {
echo $jLang[$label];
} else {
echo " ";
}
?>
</td>
<td><?php
echo makeConfigItem($key, $val);
?>
</td>
<td><?php
echo $definition;
?>
</td>
</tr>
<?php
}
}
$i++;
}
?>
</tbody>
</table>
<?php
//.........这里部分代码省略.........
示例6: jTipsSpoofCheck
/**
* Website: www.jtips.com.au
* @author Jeremy Roberts
* @copyright Copyright © 2009, jTips
* @license Commercial - See website for details
*
* @since 2.1 - 09/10/2008
* @version 2.1
* @package jTips
*
* Description: Delete the current import file
*/
jTipsSpoofCheck();
global $jLang, $mosConfig_absolute_path;
$file = $mosConfig_absolute_path . '/administrator/components/com_jtips/import.csv';
if (isJoomla15()) {
jimport('joomla.filesystem.file');
if (JFile::exists($file)) {
if (JFile::delete($file)) {
$message = $jLang['_ADMIN_FILE_DELETED'];
} else {
$message = $jLang['_ADMIN_FILE_DELETE_FAILED'];
}
} else {
$message = $jLang['_ADMIN_FILE_DELETE_NOFILE'];
}
} else {
if (file_exists($file)) {
if (unlink($file)) {
$message = $jLang['_ADMIN_FILE_DELETED'];
} else {
示例7: ob_clean
require_once $mosConfig_absolute_path . '/components/com_jtips/custom/views/TeamLadder/ShowTeamRender.ext.php';
} else {
require_once $mosConfig_absolute_path . '/components/com_jtips/views/TeamLadder/ShowTeamRender.php';
}
if (!isJoomla15()) {
//Trash anything we have so far
ob_clean();
ob_start();
}
$render = new jTipsRenderShowTeam();
$id = jTipsGetParam($_REQUEST, 'id', '');
$jTeam = new jTeam($database);
$jTeam->load($id);
$render->assign('jTeam', $jTeam);
$jSeason = new jSeason($database);
$jSeason->load($jTeam->season_id);
$render->assign('jSeason', $jSeason);
$render->display();
if (!isJoomla15()) {
die;
}
/*
$my = $mainframe->getUser();
$jTipsUser = new jTipsUser($database);
$jTipsUserParams = array(
'user_id' => $my->id,
'season_id' => $jTeam->season_id
);
$jTipsUser = $jTipsUser->loadByParams($jTipsUserParams);
*/
//sjtips_HTML::show_team($jTeam, $jSeason, $jTipsUser);
示例8: display
//.........这里部分代码省略.........
//BUG 136 - show closed/closes depending on start time
echo TimeDate::toDisplayDateTime($this->jRound->start_time, false);
?>
</td>
<?php
if ($jTips['ShowJSCountdown'] == 1) {
?>
<td><div id='countdown' style="text-align:center;" class="highlight"><?php
echo $jLang['_COM_CLOSED'];
?>
</div></td>
<?php
}
$jTipParams = array('game_id' => array('type' => 'reference', 'query' => "SELECT DISTINCT id FROM #__jtips_games WHERE round_id = " . $this->jRound->id), 'user_id' => $jTipsCurrentUser->id);
$jTip = new jTip($database);
$jTipss = forceArray($jTip->loadByParams($jTipParams));
?>
<td><?php
if (count($jTipss) > 0) {
echo TimeDate::toDisplayDateTime($jTipss[0]->updated, false);
} else {
echo " ";
}
?>
</td>
</tr>
</tbody>
</table>
<?php
if (jTipsGetParam($jTips, 'TeamLadderPopup', 0)) {
$url = "view=TeamLadder&Itemid={$Itemid}&menu=0";
?>
<p style="text-align:center;font-weight:bold;"><?php
if (isJoomla15()) {
/*?>
<a class="modal" rel="{handler: 'iframe', size: {x: <?php echo $jTips['ShowTipsWidth']; ?>, y: <?php echo $jTips['ShowTipsHeight']; ?>}}" href="<?php echo jTipsRoute("index2.php?option=com_jtips&" .$url); ?>" title='Team Ladder'><?php echo $jLang['_COM_TIPS_SHOWHIDE']; ?></a>
<?php*/
// better popup handling in J1.5
JHTML::_('behavior.modal');
$rel = json_encode(array('size' => array('x' => $jTips['ShowTipsWidth'], 'y' => $jTips['ShowTipsHeight'])));
$url = jTipsRoute("index.php?option=com_jtips&tmpl=component&" . $url);
$attribs = array('class' => 'modal', 'rel' => str_replace('"', "'", $rel), 'title' => $jLang['_COM_TIPS_SHOWHIDE']);
echo JHTML::link($url, $jLang['_COM_TIPS_SHOWHIDE'], $attribs);
} else {
?>
<a href='javascript:void(0);' onClick="openPopup('<?php
echo $url;
?>
', 'Team Ladder');"><?php
echo $jLang['_COM_TIPS_SHOWHIDE'];
?>
</a>
<?php
}
?>
</p><?php
}
//BUG 189 - Which order should the tips panel be shown in
if ($this->jSeason->tips_layout == 'away') {
$left = 'away';
$right = 'home';
} else {
$left = 'home';
$right = 'away';
}
?>
示例9: display
//.........这里部分代码省略.........
<?php
}
?>
</tr>
</thead>
<tbody>
<tr class="sectiontableentry1">
<td style="text-align: center;"><?php
//BUG 136 - show closed/closes depending on start time
echo TimeDate::toDisplayDateTime($this->jRound->start_time, false);
?>
</td>
<?php
if ($jTips['ShowJSCountdown'] == 1) {
?>
<td>
<div id='countdown' style="text-align: center;" class="highlight"><?php
echo $jLang['_COM_CLOSED'];
?>
</div>
</td>
<?php
}
?>
</tr>
</tbody>
</table>
<?php
if (jTipsGetParam($jTips, 'TeamLadderPopup', 0)) {
$url = "view=TeamLadder&Itemid={$Itemid}&menu=0";
?>
<p style="text-align: center; font-weight: bold;">
<?php
if (isJoomla15()) {
// better popup handling in J1.5
JHTML::_('behavior.modal');
$rel = json_encode(array('size' => array('x' => $jTips['ShowTipsWidth'], 'y' => $jTips['ShowTipsHeight'])));
$url = jTipsRoute("index.php?option=com_jtips&tmpl=component&" . $url);
$attribs = array('class' => 'modal', 'rel' => str_replace('"', "'", $rel), 'title' => $jLang['_COM_TIPS_SHOWHIDE']);
echo JHTML::link($url, $jLang['_COM_TIPS_SHOWHIDE'], $attribs);
} else {
?>
<a href='javascript:void(0);'
onClick="openPopup('<?php
echo $url;
?>
', 'Team Ladder');"><?php
echo $jLang['_COM_TIPS_SHOWHIDE'];
?>
</a>
<?php
}
?>
</p><?php
}
//BUG 189 - Which order should the tips panel be shown in
if ($this->jSeason->tips_layout == 'away') {
$left = 'away';
$right = 'home';
} else {
$left = 'home';
$right = 'away';
}
?>
<table align='center' width='100%' class="jdatatable" cellspacing="0">
<tr>
示例10: displayEditRound
//.........这里部分代码省略.........
/administrator/components/com_jtips/images/calendar.png' onclick='return showCalendar("date_end_date", "<?php
echo $jTips['DateFormat'];
?>
");' border='0' alt='...' align='absmiddle' />
<?php
echo $this->date_end_time_hour;
?>
:<?php
echo $this->date_end_time_minute;
?>
<?php
echo $this->date_end_time_meridiem;
?>
</td>
</tr>
<tr>
<td class="key" width="25%"><label for="show_jtips_info"><?php
echo $jLang['_ADMIN_ROUND_SHOW_COMMENTS'];
?>
</label></td>
<td><input type="checkbox" id="show_jtips_info" onClick="if(this.checked){$$('.jtipsinfo').setStyle('display', '');}else{$$('.jtipsinfo').setStyle('display', 'none');}" /></td>
</tr>
</table>
<h2><?php
echo $jLang['_ADMIN_ROUND_GAMES_LEGEND'];
?>
</h2>
<?php
if (!$this->focus->getStatus() or !$this->focus->exists()) {
?>
<p><input type="button" class="button" onClick="addGameRow();" id="addgame" value="Add Game" />
<input type="button" class="button" onClick="removeGameRow();" id="removegame" value="Remove Game(s)" /></p>
<?php
}
?>
<table class="admintable" cellspacing="0" width="100%">
<thead>
<tr class="sectiontableheader">
<!--th align='center' width='1'>#</th-->
<th align="center" width='20'> </th>
<th id="left_team_th"><?php
echo $jLang['_ADMIN_ROUND_' . strtoupper($this->left)];
?>
</th>
<th id="right_team_th"><?php
echo $jLang['_ADMIN_ROUND_' . strtoupper($this->right)];
?>
</th>
<th class="pick">Enable Picks</th>
<th id="left_start_th" class="team_starts"><?php
echo $jLang['_ADMIN_GAME_' . strtoupper($this->left) . '_START'];
?>
</th>
<th id="right_start_th" class="team_starts"><?php
echo $jLang['_ADMIN_GAME_' . strtoupper($this->right) . '_START'];
?>
</th>
<th class="date_time"><?php
echo $jLang['_ADMIN_GAME_TIME'];
?>
</th>
<th class="jtipsinfo" style="display:none;"><?php
echo $jLang['_ADMIN_ROUNDS_INFO'];
?>
</th>
</tr>
</thead>
<tbody id="table">
</tbody>
</table>
<div class="contentheading" style="text-align:center;">
<?php
if (isJoomla15()) {
?>
<input type="submit" value="<?php
echo $jLang['_COM_SAVE'];
?>
" name="submit_round" class="button" />
<input type="button" value="<?php
echo $jLang['_COM_CANCEL'];
?>
" name="cancel_round" onClick="window.parent.document.getElementById('sbox-window').close();" class="button" />
<?php
} else {
?>
<input type="submit" value="<?php
echo $jLang['_COM_SAVE'];
?>
" name="submit_round" class="button" />
<input type="button" value="<?php
echo $jLang['_COM_CANCEL'];
?>
" name="cancel_round" onClick="$('mb_close_link').onclick();" class="button" />
<?php
}
?>
</div>
</form>
<?php
}
示例11: displayPreferencesLink
function displayPreferencesLink()
{
global $jTipsCurrentUser, $jTips, $jLang, $Itemid, $mosConfig_live_site, $mainframe;
?>
<div class="jpreferences">
<?php
if (!empty($jTipsCurrentUser->id)) {
if (isJoomla15()) {
/*?>
<a class="modal" rel="{handler:'iframe', size: {x: <?php echo $jTips['ShowTipsWidth']; ?>, y: <?php echo $jTips['ShowTipsHeight']; ?>}}" href="<?php echo jTipsRoute("index2.php?option=com_jtips&view=UserPreferences&Itemid=$Itemid&return=" .jTipsGetParam($_REQUEST, 'view', ''). "&menu=0"); ?>" title="<?php echo $jLang['_COM_EDIT_PREFERENCES']; ?>"><?php echo $jLang['_COM_EDIT_PREFERENCES']; ?></a>
<?php*/
JHTML::_('behavior.modal');
$rel = json_encode(array('size' => array('x' => $jTips['ShowTipsWidth'], 'y' => $jTips['ShowTipsHeight'])));
$url = jTipsRoute("index.php?option=com_jtips&view=UserPreferences&tmpl=component&Itemid={$Itemid}&return=" . jTipsGetParam($_REQUEST, 'view', '') . "&menu=0");
$attribs = array('class' => 'modal', 'rel' => str_replace('"', "'", $rel), 'title' => $jLang['_COM_EDIT_PREFERENCES']);
echo JHTML::link($url, $jLang['_COM_EDIT_PREFERENCES'], $attribs);
} else {
?>
<a href="javascript:void(0);" onClick="loadPreferencesPopup('<?php
echo jTipsGetParam($_REQUEST, 'view', '');
?>
', '<?php
echo $Itemid;
?>
', '<?php
echo $this->season_link;
?>
', this);" title="<?php
echo $jLang['_COM_EDIT_PREFERENCES'];
?>
"><?php
echo $jLang['_COM_EDIT_PREFERENCES'];
?>
</a>
<?php
}
}
//can this user administer the results for this competition
// BUG 309 - remove the popup admin pages - accessible as normal link
$my =& $mainframe->getUser();
if ($this->jSeason->scorer_id == $my->id and !empty($my->id) and !empty($this->jSeason->scorer_id) and jTipsGetParam($_REQUEST, 'view', 'Dashboard') != 'Administration') {
/*if (isJoomla15()) {
?>
<a href="<?php echo jTipsRoute("index2.php?option=com_jtips&" .$this->adminUrl); ?>" class="modal" rel="{handler: 'iframe', size: {x: 800, y: 450}}" title="<?php echo $jLang['_COM_ADMIN_RESULTS']; ?>"><?php echo $jLang['_COM_ADMIN_RESULTS']; ?></a>
<?php
} else {
?>
<a href="javascript:void(0);" onClick="openPopup('<?php echo $this->adminUrl; ?>', '<?php echo $jLang['_COM_ADMIN_RESULTS']; ?>', 800, 450);" title="<?php echo $jLang['_COM_ADMIN_RESULTS']; ?>"><?php echo $jLang['_COM_ADMIN_RESULTS']; ?></a>
<?php
}*/
?>
<a href="<?php
echo jTipsRoute("index.php?option=com_jtips&" . $this->adminUrl);
?>
" title="<?php
echo $jLang['_COM_ADMIN_RESULTS'];
?>
"><?php
echo $jLang['_COM_ADMIN_RESULTS'];
?>
</a>
<?php
}
?>
</div>
<?php
}
示例12: setLastUpdateCheckDate
function setLastUpdateCheckDate()
{
global $mosConfig_absolute_path;
jTipsLogger::_log('updating update check date');
$auto = $mosConfig_absolute_path . '/administrator/components/com_jtips/auto';
$buffer = gmdate('Y-m-d H:i:s');
if (isJoomla15()) {
jimport('joomla.filesystem.file');
JFile::write($auto, $buffer);
} else {
file_put_contents($auto, $buffer);
}
}
示例13: getOffset
/**
* Get the number of seconds to add to the formatted database time
*
* @param [bool] True if calling from the admin area, false when calling from the front-end
*
* @return int The number of seconds to add
*/
static function getOffset($isAdmin = true)
{
global $mainframe, $jTipsCurrentUser;
$offset = 0;
if ($isAdmin or !isset($jTipsCurrentUser->id) or empty($jTipsCurrentUser->id)) {
if (isJoomla15()) {
$offset = $mainframe->getCfg('offset') * 60 * 60;
} else {
$offset = $mainframe->getCfg('offset_user') * 60 * 60;
}
//TODO: try to add DST if applicable to this timezone
} else {
$tz = $jTipsCurrentUser->getPreference('timezone');
if (is_numeric($tz)) {
//$dateTimeZone = new DateTimeZone($tz);
//$dateTime = new DateTime("now", $dateTimeZone);
//$offset = $dateTimeZone->getOffset($dateTime);
$offset = $tz * 60 * 60;
} else {
return TimeDate::getOffset();
}
}
return $offset;
}
示例14: loadLicenseFile
function loadLicenseFile()
{
if (isJoomla15()) {
$licence = JFile::read($this->licence_file);
} else {
$licence = file_get_contents($this->licence_file);
}
$licence = preg_replace('/[\\r\\n]+/', '', $licence);
$licence = unserialize(base64_decode($licence));
$this->licence = $licence;
return $licence;
}
示例15: display
function display()
{
global $jLang;
if (isJoomla15()) {
JToolBarHelper::title($this->formData['title'], 'round');
} else {
?>
<table class='adminheading'>
<tr>
<th><?php
echo $this->formData['title'];
?>
</th>
</tr>
</table>
<?php
}
?>
<table class="adminform" width="100%">
<tbody>
<tr>
<td><?php
echo $jLang['_ADMIN_ROUND_COPY_INFO'];
?>
</td>
</tr>
</table>
<form action="index2.php" name="adminForm" id="adminForm" method="post">
<input type="hidden" name="task" value="" />
<input type="hidden" name="option" value="com_jtips" />
<input type="hidden" name="module" value="Rounds" />
<input type="hidden" name="id" value="<?php
echo $this->round_id;
?>
" />
<fieldset>
<legend><?php
echo $jLang['_ADMIN_ROUND_COPY_FROM'];
?>
</legend>
<table class="admintable" width="100%">
<tr>
<td class="key" width="25%"><?php
echo $jLang['_ADMIN_ROUND_COPYING'];
?>
</td>
<td><?php
echo $jLang['_ADMIN_ROUND_ROUND'];
?>
<?php
echo $this->round;
?>
- <?php
echo $this->season_name;
?>
</td>
</tr>
<tr>
<td class="key"><?php
echo $jLang['_ADMIN_ROUND_COPY_TO_SEASON'];
?>
</td>
<td><?php
echo $this->season_name;
?>
</td>
</tr>
<tr>
<td class="key"><label for="round"><?php
echo $jLang['_ADMIN_ROUND_COPY_TO_ROUND'];
?>
</label></td>
<td><input type="text" name="round" id="round" class="inputbox" size="5" maxlength="3" /></td>
</tr>
</table>
</fieldset>
</form>
<?php
}