本文整理汇总了PHP中TimeDate::toDisplayDate方法的典型用法代码示例。如果您正苦于以下问题:PHP TimeDate::toDisplayDate方法的具体用法?PHP TimeDate::toDisplayDate怎么用?PHP TimeDate::toDisplayDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeDate
的用法示例。
在下文中一共展示了TimeDate::toDisplayDate方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gmdate
$tpl->date_start_time_minute = jTipsHTML::integerSelectList('00', $end, $step, 'date_start_time_minute', "class='inputbox'", $date_start_time_minute);
if (intval($jTips['Is24Hour']) == 1) {
$tpl->date_start_time_meridiem = '';
} else {
$tpl->date_start_time_meridiem = jTipsHTML::selectList($meridiemOptions, 'date_start_time_meridiem', "class='inputbox'", 'value', 'text', $date_start_time_meridiem);
}
//now prepare the end_time
if (!$focus->end_time) {
$focus->end_time = gmdate('Y-m-d H:i:s');
}
//BUG 263
if (!isJoomla15()) {
$tpl->date_end_date = TimeDate::toDisplayDate($focus->end_time, true);
$tpl->date_end_date = TimeDate::toDatabaseDate($tpl->date_end_date);
} else {
$tpl->date_end_date = TimeDate::toDisplayDate($focus->end_time, true);
}
$date_end_time_hour = TimeDate::format($focus->end_time, '%I', true);
$date_end_time_minute = TimeDate::format($focus->end_time, '%M', true);
$date_end_time_meridiem = strtolower(TimeDate::format($focus->end_time, '%p', true));
// BUG 326 - Optionally allo 24-hour format
if (intval($jTips['Is24Hour']) == 1) {
$hour_end = 23;
if ($date_end_time_meridiem == 'pm') {
$date_end_time_hour += 12;
}
} else {
$hour_end = 12;
}
$tpl->date_end_time_hour = jTipsHTML::integerSelectList(1, $hour_end, 1, 'date_end_time_hour', "class='inputbox'", $date_end_time_hour);
$tpl->date_end_time_minute = jTipsHTML::integerSelectList('00', $end, $step, 'date_end_time_minute', "class='inputbox'", $date_end_time_minute);
示例2: jTipsGetParam
$jGame->tough_score = 0;
}
}
//parse the game time if necessary
if ($jSeason->game_times and jTipsGetParam($_REQUEST['start_time_date'], $i, false)) {
$start_time_date = jTipsGetParam($_REQUEST['start_time_date'], $i, strftime($jTips['DateFormat'])) . " ";
$start_minute = jTipsGetParam($_REQUEST['start_time_minute'], $i, '');
$start_time_time = jTipsGetParam($_REQUEST['start_time_hour'], $i, '') . ":" . str_pad($start_minute, 2, '0', STR_PAD_LEFT) . jTipsGetParam($_REQUEST['start_time_meridiem'], $i, '');
if (!preg_match('/\\d/', $start_time_time)) {
$start_time_time = strftime($jTips['TimeFormat']);
}
$start_time = $start_time_date . " " . $start_time_time;
//jTipsDebug($start_time);
//BUG 263 - set the date fields if we are in J1.0
if (!isJoomla15()) {
$start_time = TimeDate::toDisplayDate($start_time_date) . " " . $start_time_time;
}
//jTipsDebug($start_time);
$jGame->start_time = TimeDate::toDatabaseDateTime($start_time);
//jTipsDebug($jGame->start_time);
} else {
if ($jRound->getStatus() === false) {
$jGame->start_time = null;
}
}
//set the game scores
if ($jRound->getStatus() !== FALSE) {
$jGame->home_score = jTipsGetParam($_REQUEST['home_score'], $i, null);
$jGame->away_score = jTipsGetParam($_REQUEST['away_score'], $i, null);
/*
* Can't put this code here since it will destroy the
示例3: export
function export()
{
global $database;
$query = "SELECT name AS 'Season Name', description AS 'Description', " . "start_time AS 'Season Start', end_time AS 'Season End', " . "rounds AS 'Total Rounds', games_per_round AS 'Games Per Round' " . "FROM " . $this->_tbl;
$database->setQuery($query);
$rows = $database->loadAssocList();
$lines = $headers = array();
while ($row = current($rows)) {
$line = array();
if (empty($headers)) {
foreach ($row as $heading => $val) {
array_push($headers, $heading);
}
}
foreach ($row as $heading => $val) {
if ($heading == 'Season Start' or $heading == 'Season End') {
//$val = getLocalDate($val);
//BUG 277 - call to undefined function
$val = TimeDate::toDisplayDate($val);
}
array_push($line, str_replace('"', "'", addslashes($val)));
}
array_push($lines, '"' . implode('","', $line) . '"');
$row = next($rows);
}
$body = implode("\r\n", $lines);
$export = '"' . implode('","', $headers) . '"' . "\r\n" . $body;
return $export;
}
示例4: jTipsSpoofCheck
*
* Description: Save the season data from the posted form
*/
global $mainframe, $database, $mosConfig_absolute_path;
//Make sure this is not a hack job
jTipsSpoofCheck();
require_once 'components/com_jtips/classes/jseason.class.php';
$jSeason = new jSeason($database);
if ($id = jTipsGetParam($_REQUEST, 'id', FALSE)) {
$jSeason->load($id);
}
$jSeason->bind($_REQUEST);
//BUG 263 - set the date fields if we are in J1.0
if (!isJoomla15()) {
$jSeason->start_time = TimeDate::toDisplayDate($jSeason->start_time);
$jSeason->end_time = TimeDate::toDisplayDate($jSeason->end_time);
}
if ($_FILES['image']['name'] and imageDirCheck()) {
$logofile = 'images/jtips/' . $_FILES['image']['name'];
if (isJoomla15()) {
jimport('joomla.filesystem.file');
jTipsLogger::_log('MOVING ' . $_FILES['image']['tmp_name'] . ' TO ' . $logofile, 'ERROR');
//JFile::move($_FILES['image']['tmp_name'], $mosConfig_absolute_path.'/'.$logofile);
//BUG 270 - to complete upload, use the upload function, not move
JFile::upload($_FILES['image']['tmp_name'], $mosConfig_absolute_path . '/' . $logofile);
} else {
if (!is_dir($mosConfig_absolute_path . '/images/jtips') or !file_exists($mosConfig_absolute_path . '/images/jtips')) {
mkdir($mosConfig_absolute_path . '/images/jtips');
}
move_uploaded_file($_FILES['image']['tmp_name'], $mosConfig_absolute_path . '/' . $logofile);
}
示例5: jTipsGetParam
* Website: www.jtips.com.au
* Created: 09/09/2008
*
* Description:
*
*
*/
global $jLang, $database, $jTips;
//This breaks the shortcuts on the dashboard
//jTipsSpoofCheck();
require_once 'components/com_jtips/classes/jseason.class.php';
$ids = jTipsGetParam($_REQUEST, 'cid', array());
//Do we have an existing Season?
$id = array_shift($ids);
$jSeason = new jSeason($database);
if (is_numeric($id)) {
$jSeason->load($id);
} else {
$jSeason->start_time = $jSeason->end_time = gmdate('Y-m-d H:i:s');
}
$title = $jLang['_ADMIN_SEASON_MANAGER'] . ": " . ($jSeason->exists() ? $jLang['_ADMIN_OTHER_EDIT'] : $jLang['_ADMIN_OTHER_NEW']);
$formData = array('core' => array('legend' => '_ADMIN_SEASON_CORE_FIELDS_FS', 'fields' => array('id' => array('field' => array('type' => 'hidden', 'attributes' => array('type' => 'hidden', 'name' => 'id', 'id' => 'id', 'value' => $jSeason->id))), 'name' => array('label' => '_ADMIN_SEASON_NAME', 'field' => array('type' => 'text', 'attributes' => array('size' => '50', 'type' => 'text', 'class' => 'inputbox', 'name' => 'name', 'id' => 'name', 'value' => $jSeason->name))), 'url' => array('label' => '_ADMIN_SEASON_LINKURL', 'field' => array('type' => 'text', 'attributes' => array('type' => 'text', 'size' => '50', 'class' => 'inputbox', 'name' => 'url', 'id' => 'url', 'value' => $jSeason->url))), 'tip_display' => array('label' => '_ADMIN_SEASON_TIPSDISPLAY', 'field' => array('type' => 'select', 'attributes' => array('class' => 'inputbox', 'name' => 'tip_display', 'id' => 'tip_display'), 'options' => array(jTipsHTML::makeOption(0, $jLang['_ADMIN_SEASON_NAMEONLY']), jTipsHTML::makeOption(1, $jLang['_ADMIN_SEASON_LOGOONLY']), jTipsHTML::makeOption(2, $jLang['_ADMIN_SEASON_NAMELOGO'])), 'selected' => $jSeason->tip_display)), 'tips_layout' => array('label' => '_ADMIN_CONF_TIPS_PANEL_LAYOUT', 'field' => array('type' => 'select', 'attributes' => array('class' => 'inputbox', 'name' => 'tips_layout', 'id' => 'tips_layout'), 'options' => array(jTipsHTML::makeOption('home', $jLang['_ADMIN_CONF_HOME']), jTipsHTML::makeOption('away', $jLang['_ADMIN_CONF_AWAY'])), 'selected' => $jSeason->tips_layout), 'description' => '_ADMIN_CONF_TIPS_PANEL_LAYOUT_DEF'), 'start_time' => array('label' => '_ADMIN_SEASON_START_DATE', 'field' => array('type' => 'date', 'attributes' => array('name' => 'start_time', 'id' => 'start_time', 'value' => TimeDate::toDisplayDate($jSeason->start_time), 'class' => 'inputbox', 'type' => 'text')), 'description' => '_ADMIN_SEASON_START_DATE_DEF'), 'end_time' => array('label' => '_ADMIN_SEASON_END_DATE', 'field' => array('type' => 'date', 'attributes' => array('name' => 'end_time', 'id' => 'end_time', 'value' => TimeDate::toDisplayDate($jSeason->end_time), 'class' => 'inputbox', 'type' => 'text')), 'description' => '_ADMIN_SEASON_END_DATE_DEF'), 'rounds' => array('label' => '_ADMIN_SEASON_ROUNDS', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'rounds', 'id' => 'rounds', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->rounds))), 'disable_tips' => array('label' => '_ADMIN_SEASON_DISABLE_TIPS', 'description' => '_ADMIN_SEASON_DISABLE_TIPS_DEF', 'field' => array('type' => 'bool', 'attributes' => array('class' => 'inputbox', 'name' => 'disable_tips', 'id' => 'disable_tips'), 'selected' => $jSeason->disable_tips)), 'scorer_id' => array('label' => '_ADMIN_SEASON_SCORER', 'description' => '_ADMIN_SEASON_SCORER_DEF', 'field' => array('type' => 'select', 'attributes' => array('id' => 'scorer_id', 'name' => 'scorer_id', 'class' => 'inputbox'), 'selected' => $jSeason->scorer_id, 'options' => jTipsGetAvailableScorers())), 'description' => array('label' => '_ADMIN_SEASON_DESCR', 'field' => array('type' => 'editor', 'attributes' => array('name' => 'description', 'id' => 'description', 'rows' => 10, 'cols' => 50, 'value' => jTipsStripslashes($jSeason->description)))))));
$formData['image'] = array('legend' => '_ADMIN_SEASON_LOGO_PATH', 'fields' => array('imageupload' => array('label' => '_ADMIN_SEASON_LOGO_PATH', 'field' => array('type' => 'file', 'attributes' => array('size' => '50', 'type' => 'file', 'class' => 'inputbox', 'name' => 'image', 'id' => 'image', 'value' => $jSeason->image)))));
if ($jSeason->image) {
$formData['image']['fields']['current_image'] = array('label' => '_ADMIN_TEAM_CURRENT_LOGO', 'field' => array('type' => 'img', 'attributes' => array('alt' => 'Logo', 'id' => 'current_logo', 'src' => $mosConfig_live_site . '/' . $jSeason->image)));
$formData['image']['fields']['remove_image'] = array('label' => '_ADMIN_TEAM_REMOVE_LOGO', 'field' => array('type' => 'checkbox', 'attributes' => array('class' => 'inputbox', 'name' => 'remove_image', 'value' => '1', 'type' => 'checkbox', 'onClick' => 'if (this.checked){$("image").disabled=true;}else{$("image").disabled=false}')), 'description' => '_ADMIN_TEAM_REMOVE_LOGO_DEF');
}
$formData['team_points'] = array('legend' => '_ADMIN_SEASON_TEAM_POINTS_FS', 'fields' => array('team_win' => array('label' => '_ADMIN_SEASON_TWP', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'team_win', 'id' => 'team_win', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->team_win)), 'description' => '_ADMIN_SEASON_TWP_DEF'), 'team_draw' => array('label' => '_ADMIN_SEASON_TDP', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'team_draw', 'id' => 'team_draw', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->team_draw)), 'description' => '_ADMIN_SEASON_TDP_DEF'), 'team_lose' => array('label' => '_ADMIN_SEASON_TLP', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'team_lose', 'id' => 'team_lose', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->team_lose)), 'description' => '_ADMIN_SEASON_TLP_DEF'), 'team_bye' => array('label' => '_ADMIN_SEASON_TBP', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'team_bye', 'id' => 'team_bye', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->team_bye)), 'description' => '_ADMIN_SEASON_TBP_DEF'), 'team_bonus' => array('label' => '_ADMIN_SEASON_BONUS_TEAM', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'team_bonus', 'id' => 'team_bonus', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->team_bonus))), 'team_starts' => array('label' => '_ADMIN_SEASON_ETS', 'description' => '_ADMIN_SEASON_ETS_DEF', 'field' => array('type' => 'bool', 'attributes' => array('class' => 'inputbox', 'name' => 'team_starts', 'id' => 'team_starts'), 'selected' => $jSeason->team_starts))));
$formData['points_configuration'] = array('legend' => '_ADMIN_SEASON_TIPS_CONFIG_FS', 'fields' => array('pick_score' => array('label' => '_ADMIN_SEASON_EPTS', 'description' => '_ADMIN_SEASON_EPTS_DEF', 'field' => array('type' => 'bool', 'attributes' => array('class' => 'inputbox', 'name' => 'pick_score', 'id' => 'pick_score'), 'selected' => $jSeason->pick_score)), 'pick_margin' => array('label' => '_ADMIN_SEASON_EPTM', 'description' => '_ADMIN_SEASON_EPTM_DEF', 'field' => array('type' => 'bool', 'attributes' => array('class' => 'inputbox', 'name' => 'pick_margin', 'id' => 'pick_margin'), 'selected' => $jSeason->pick_margin)), 'pick_draw' => array('label' => '_ADMIN_SEASON_EPTD', 'description' => '_ADMIN_SEASON_EPTD_DEF', 'field' => array('type' => 'bool', 'attributes' => array('class' => 'inputbox', 'name' => 'pick_draw', 'id' => 'pick_draw'), 'selected' => $jSeason->pick_draw)), 'pick_bonus' => array('label' => '_ADMIN_SEASON_EPTB', 'description' => '_ADMIN_SEASON_EPTB_DEF', 'field' => array('type' => 'select', 'attributes' => array('class' => 'inputbox', 'name' => 'pick_bonus', 'id' => 'pick_bonus'), 'selected' => $jSeason->pick_bonus, 'options' => array(jTipsHTML::makeOption(0, $jLang['_ADMIN_SEASON_EPTB_DIS']), jTipsHTML::makeOption(1, $jLang['_ADMIN_SEASON_EPTB_SIN']), jTipsHTML::makeOption(2, $jLang['_ADMIN_SEASON_EPTB_BOT'])))), 'game_times' => array('label' => '_ADMIN_SEASON_GAME_TIMES', 'description' => '_ADMIN_SEASON_GAME_TIMES_DEF', 'field' => array('type' => 'bool', 'attributes' => array('class' => 'inputbox', 'name' => 'game_times', 'id' => 'game_times'), 'selected' => $jSeason->game_times)), 'tough_score' => array('label' => '_ADMIN_SEASON_TOUGH_SCORE', 'description' => '_ADMIN_SEASON_TOUGH_SCORE_DEF', 'field' => array('type' => 'bool', 'attributes' => array('class' => 'inputbox', 'name' => 'tough_score', 'id' => 'tough_score'), 'selected' => $jSeason->tough_score))));
$formData['user_points'] = array('legend' => '_ADMIN_SEASON_USER_POINTS_FS', 'fields' => array('user_correct' => array('label' => '_ADMIN_SEASON_UCORR', 'description' => '_ADMIN_SEASON_UCORR_DEF', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'user_correct', 'id' => 'user_correct', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->user_correct))), 'user_draw' => array('label' => '_ADMIN_SEASON_UDRAW', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'user_draw', 'id' => 'user_draw', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->user_draw))), 'user_none' => array('label' => '_ADMIN_SEASON_UNONE', 'description' => '_ADMIN_SEASON_UNONE_DEF', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'user_none', 'id' => 'user_none', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->user_none))), 'precision_score' => array('label' => '_ADMIN_SEASON_PRECISION', 'description' => '_ADMIN_SEASON_PRECISION_DEF', 'field' => array('type' => 'bool', 'attributes' => array('name' => 'precision_score', 'id' => 'precision_score'), 'selected' => $jSeason->precision_score)), 'user_bonus' => array('label' => '_ADMIN_SEASON_UPERF', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'user_bonus', 'id' => 'user_bonus', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->user_bonus))), 'user_pick_score' => array('label' => '_ADMIN_SEASON_USCOR', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'user_pick_score', 'id' => 'user_pick_score', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->user_pick_score))), 'user_pick_margin' => array('label' => '_ADMIN_SEASON_UMARG', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'user_pick_margin', 'id' => 'user_pick_margin', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->user_pick_margin))), 'user_pick_bonus' => array('label' => '_ADMIN_SEASON_UBONU', 'field' => array('type' => 'text', 'attributes' => array('class' => 'inputbox', 'name' => 'user_pick_bonus', 'id' => 'user_pick_bonus', 'style' => 'text-align:center', 'size' => 10, 'value' => $jSeason->user_pick_bonus))), 'default_points' => array('label' => '_ADMIN_SEASON_DEFAULT_POINTS', 'description' => '_ADMIN_SEASON_DEFAULT_POINTS_DEF', 'field' => array('type' => 'select', 'attributes' => array('name' => 'default_points', 'id' => 'default_points', 'class' => 'inputbox'), 'options' => array(jTipsHTML::makeOption('', $jLang['_ADMIN_CONF_NONE']), jTipsHTML::makeOption('low', $jLang['_ADMIN_SEASON_DEFAULT_POINTS_LOW']), jTipsHTML::makeOption('avg', $jLang['_ADMIN_SEASON_DEFAULT_POINTS_AVG'])), 'selected' => $jSeason->default_points))));
jTipsAdminDisplay::EditView($title, $formData, 'season');
示例6: display
//.........这里部分代码省略.........
echo $jLang['_ADMIN_TEAM_LOCATION'];
?>
</th>
<th><?php
echo $jLang['_COM_SCORE'];
?>
</th>
<th><?php
echo $jLang['_COM_TIPS_RESULT'];
?>
</th>
</tr>
</thead>
<tbody>
<?php
$rowIndex = 0;
$history = $this->jTeam->getHistory();
foreach ($history as $game) {
$other = new jTeam($database);
if ($this->jTeam->id == $game->home_id) {
$other->load($game->away_id);
$location = $jLang['_COM_TEAM_HOME'];
} else {
$other->load($game->home_id);
$location = $jLang['_COM_TEAM_AWAY'];
}
$isBye = false;
if (!$other->id) {
$isBye = true;
}
if ($game->winner_id == $this->jTeam->id) {
$result = 'tick';
$alt = $jLang['_COM_TEAM_WIN'];
} else {
if ($game->winner_id == '-1') {
$result = 'draw';
$alt = $jLang['_COM_TEAM_DRAW'];
} else {
$result = 'cross';
$alt = $jLang['_COM_TEAM_LOSS'];
}
}
$date = TimeDate::toDisplayDate($game->start_time, true, false);
$live_site = $mainframe->getCfg('live_site');
if (strrpos($live_site, '/') == strlen($live_site) - 1) {
$live_site = substr($live_site, 0, -1);
}
$thisRowIndex = $rowIndex++;
?>
<tr class="sectiontableentry<?php
echo $thisRowIndex % 2 + 1;
?>
jtablerow<?php
echo $thisRowIndex % 2 + 1;
?>
">
<td align="center"><?php
echo $game->round;
?>
.</td>
<td align="left"><?php
echo $date;
?>
</td>
<td align="left"><?php
echo $isBye ? '<em>' . $jLang['_COM_BYE'] . '</em>' : $other->getDisplayLogoName();
?>
</td>
<td align="center"><?php
echo $isBye ? ' ' : $location;
?>
</td>
<td align="center"><?php
echo $isBye ? ' ' : $game->home_score . ' - ' . $game->away_score;
?>
</td>
<td align="center"><img src="<?php
echo $mosConfig_live_site;
?>
/components/com_jtips/images/<?php
echo $result;
?>
.png" alt="<?php
echo $alt;
?>
" title="<?php
echo $alt;
?>
" border="0" /></td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
if ($jTips['ShowTipsPadding']) {
echo "</div>";
}
}
示例7: display
//.........这里部分代码省略.........
echo $center;
?>
><?php
echo $jLang['_ADMIN_LICENSE_USER_COUNT'];
?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td <?php
echo $center;
?>
><?php
$validation_date = $jLicence->getValidationDate();
if ($validation_date == -1) {
echo $jLang['_ADMIN_DASH_LIC_EXPIRED'];
} else {
echo $validation_date;
}
?>
</td>
<td <?php
echo $center;
?>
><a href="index2.php?option=com_jtips&task=Validate&module=Dashboard"><?php
echo $jLang['_ADMIN_DASH_REVALIDATE'];
?>
</a></td>
<td <?php
echo $center;
?>
><?php
echo TimeDate::toDisplayDate($jLicence->licence['license_expiry']);
?>
</td>
<td <?php
echo $center;
?>
><?php
echo $jLicence->getActiveUserCount();
?>
/ <?php
echo $jLicence->getLicensedUsers();
?>
</td>
</tr>
</tbody>
<thead>
<tr>
<th <?php
echo $center;
?>
colspan="4"><?php
echo $jLang['_ADMIN_DASH_LOGGING'];
?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td nowrap><?php
echo $jLang['_ADMIN_DASH_FILE_SIZE'];
?>
: <?php
echo size_readable(filesize($mosConfig_absolute_path . '/components/com_jtips/jtips.log'));
示例8: export
function export()
{
global $database;
$query = "SELECT u.name AS 'Full Name', u.username AS 'User Name', " . "s.name AS 'Season Name', r.round AS 'Round', c.comment As 'Comment', " . "c.updated AS 'Last Modified' " . "FROM " . $this->_tbl . " c JOIN jos_jtips_rounds r ON c.round_id = r.id " . "JOIN #__jtips_seasons s ON r.season_id = s.id " . "JOIN #__jtips_users ju ON c.user_id = ju.id " . "JOIN #__users u ON ju.user_id = u.id";
$database->setQuery($query);
$rows = $database->loadAssocList();
$lines = $headers = array();
while ($row = current($rows)) {
$line = array();
if (empty($headers)) {
foreach ($row as $heading => $val) {
array_push($headers, $heading);
}
}
foreach ($row as $heading => $val) {
if ($heading == 'Last Modified') {
//$val = getLocalDate($val);
//BUG 277 - call to undefined function
$val = TimeDate::toDisplayDate($val);
}
array_push($line, str_replace('"', "'", addslashes($val)));
}
array_push($lines, '"' . implode('","', $line) . '"');
$row = next($rows);
}
$body = implode("\r\n", $lines);
$export = '"' . implode('","', $headers) . '"' . "\r\n" . $body;
return $export;
}
示例9:
?>
</th>
</tr>
</thead>
<tbody>
<tr class='sectiontableentry1 jtablerow1'>
<td><?php
echo $this->jRound->round;
?>
</td>
<td><?php
echo $this->jSeason->rounds;
?>
</td>
<!-- td><?php
echo $this->jSeason->games_per_round;
?>
</td -->
<td><?php
echo TimeDate::toDisplayDate($this->jSeason->start_time, true, false);
?>
</td>
<td><?php
echo TimeDate::toDisplayDate($this->jSeason->end_time, true, false);
?>
</td>
</tr>
</tbody>
</table>
<?php
}