当前位置: 首页>>代码示例>>PHP>>正文


PHP rcms_format_time函数代码示例

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


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

示例1: __

<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$name_module = __('Enable all') . ' url' . __(' for ') . ' sitemap.dat';
if (is_file(DF_PATH . 'sitemap.dat')) {
    $array_url = explode("\n", file_get_contents(DF_PATH . 'sitemap.dat'));
    if (!empty($array_url)) {
        foreach ($array_url as $url) {
            $url = trim($url);
            if (!empty($url)) {
                $sitemap->addUrl($directory . $url, rcms_format_time('Y-m-d', time()), $chfr, $prio);
            }
        }
    }
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:19,代码来源:_add_sitemap_dat.php

示例2: foreach

<table border="0" celladding="1" cellspacing="1" width="100%">
<?php 
foreach ($tpldata as $id => $comment) {
    ?>
<tr>
    <th width="100%" align="left" valign="middle"><?php 
    echo $lang['articles']['poster'];
    ?>
 <?php 
    echo user_create_link($comment['author_user'], $comment['author_nick']);
    ?>
</td>
    <th align="left" valign="center" nowrap="nowrap"><?php 
    echo rcms_format_time('H:i:s d.m.Y', $comment['time']);
    ?>
</td>
    <?php 
    if ($system->checkForRight('A-MA')) {
        ?>
    <th nowrap="nowrap"><form method="post" action=""><input type="hidden" name="cdelete" value="<?php 
        echo $id;
        ?>
"><input type="submit" name="" value="<?php 
        echo $lang['articles']['delete'];
        ?>
"></form></td>
    <?php 
    }
    ?>
</tr>
<tr>
开发者ID:BackupTheBerlios,项目名称:reloadcms-svn,代码行数:31,代码来源:comment.tpl.php

示例3: __

<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$name_module = __('Forum');
$forum = new forum();
if (!empty($forum->topics)) {
    foreach ($forum->topics as $topic_id => $topic) {
        $sitemap->addUrl($directory . '?module=forum&action=topic&id=' . $topic_id, rcms_format_time('Y-m-d', $topic['last_reply']), $chfr, $prio);
    }
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:14,代码来源:forum.php

示例4: rcms_format_time

<table border="0" cellpadding="1" cellspacing="1" style="width: 100%; text-align: left " >
<tr><td colspan="2"><?php 
echo $tpldata['text'];
?>
</td></tr>
<tr><td><?php 
echo rcms_format_time('d/m/Y H:i', $tpldata['date']);
?>
</td><td><?php 
echo __('Posted by') . ': ' . user_create_link($tpldata['author_name'], $tpldata['author_nick'], '_blank');
?>
</td></tr>
</table>
<br />
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:14,代码来源:pages.tpl.php

示例5: __

        $frm->addrow(__('Add link to file'), $frm->select_tag('files', $files, -1, 'onChange="selChange(this.form)">\\n
	<option value="-1">' . __('Select file') . '</option') . '&nbsp;&nbsp;&nbsp;' . __('You entered filename of file uploaded through upload interface'), 'top');
    }
    //End Insert list uploaded files
    if ($system->checkForRight('GENERAL')) {
        $arr_modes = array('html' => __('HTML'), 'text' => __('Text'), 'htmlbb' => __('bbCodes') . '+' . __('HTML'), 'php' => __('PHP'));
    } else {
        $arr_modes = array('html' => __('HTML'), 'text' => __('Text'), 'htmlbb' => __('bbCodes') . '+' . __('HTML'));
    }
    $frm->addrow(__('Mode'), $frm->select_tag('mode', $arr_modes, $article['mode']), 'top');
    $frm->addrow(__('Date') . ' (yyyy-mm-dd hh:mm:ss)', $frm->text_box('time', gmdate("Y-m-d H:i:s", $article['time'])), 'top');
    $frm->addrow(__('Allow comments'), $frm->radio_button('comments', array('yes' => __('Allow'), 'no' => __('Disallow')), $article['comments']), 'top');
    $frm->show();
} elseif (!empty($b) || $c == '#hidden' || $c == '#root') {
    if ($articles->setWorkContainer($c)) {
        $frm = new InputForm('', 'post', __('Submit'), __('Reset'));
        $frm->addbreak(__('List of articles'));
        $frm->hidden('c', $c);
        $frm->hidden('b', $b);
        if (($list = $articles->getArticles($b, false, false, false)) !== false) {
            foreach (array_reverse($list, true) as $id => $article) {
                $frm->addrow('<a href="' . RCMS_ROOT_PATH . '?module=articles&c=' . $c . '&b=' . $b . '&a=' . $article['id'] . '" target="_blank">' . $article['title'] . '</a>' . ' [' . user_create_link($article['author_name'], $article['author_nick'], '_blank') . '] [' . rcms_format_time('d F Y H:i:s', $article['time']) . ']', $frm->checkbox('delete[' . $article['id'] . ']', '1', __('Delete')) . $frm->radio_button('a', array($article['id'] => __('Edit'))) . $frm->radio_button('move', array($article['id'] => __('Move'))));
            }
        } else {
            rcms_showAdminMessage($articles->last_error);
        }
        $frm->show();
    } else {
        rcms_showAdminMessage($articles->last_error);
    }
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:31,代码来源:articles.php

示例6: pm_get_all_msgs

function pm_get_all_msgs($num = 10, $parse = true, $limited, $file = RCMS_PM_DEFAULT_FILE)
{
    global $_CACHE, $system;
    $data =& $_CACHE['gbook'][$file];
    if (!isset($data)) {
        if (!is_readable($file) || !($data = unserialize(file_get_contents($file)))) {
            $data = array();
        }
    }
    if (!empty($data)) {
        $ndata = $rdata = array();
        foreach ($data as $key => $value) {
            $ndata[$key . ''] = $value;
        }
        $ndata = array_reverse($ndata, true);
        if ($num !== null) {
            $i = 0;
            while ($i < $num && ($el = each($ndata))) {
                $rdata[$el['key']] = $el['value'];
                $i++;
            }
        } else {
            $rdata = $ndata;
        }
        if ($parse) {
            foreach ($rdata as $id => $msg) {
                if (!empty($msg)) {
                    $rdata[$id]['text'] = rcms_parse_text($msg['text'], !$limited, false, !$limited);
                    $rdata[$id]['new'] = $msg['new'];
                    $rdata[$id]['username'] = $msg['username'];
                    $rdata[$id]['nickname'] = $msg['nickname'];
                    $rdata[$id]['time'] = rcms_format_time('H:i:s d.m.Y', $msg['time']);
                }
            }
        }
        return $rdata;
    } else {
        return array();
    }
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:40,代码来源:api.pm.php

示例7: switch

        }
        switch ($lightbox_config['folders']) {
            case 'user':
                $folder .= $user . '/';
                break;
            case 'user_year':
                $folder .= $user . '/' . rcms_format_time('Y', rcms_get_time()) . '/';
                break;
            case 'user_year_month':
                $folder .= $user . '/' . rcms_format_time('Y/m', rcms_get_time()) . '/';
                break;
            case 'year':
                $folder .= rcms_format_time('Y', rcms_get_time()) . '/';
                break;
            case 'year_month':
                $folder .= rcms_format_time('Y/m', rcms_get_time()) . '/';
                break;
            default:
                break;
        }
    }
    if (!is_dir($folder)) {
        rcms_mkdir($folder);
    }
}
//Напоследок вырежем небезопасные символы и заменим русские буквы и пробелы в названии картинки на транслит
$filename = $folder . $u . make_safe_filename($_FILES['uploadfile']['name']);
//Включено управление контроля картинок?
if (!empty($lightbox_config['change_enable'])) {
    //Размер правильный?
    if (!empty($lightbox_config['max_size'])) {
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:31,代码来源:picloader.php

示例8: empty

} else {
    $rating = '';
}
$social = !empty($tpldata['social']) ? $tpldata['social'] : '';
?>
	<td colspan="3" style="width: 100%;padding-left:20px;padding-right:7px;">
        <?php 
echo empty($tpldata['text']) ? $tpldata['desc'] : $tpldata['text'] . $rating . $social;
?>
		</td>
</tr>

<tr style="font-size:small;">
    <td  align="left" style="white-space: nowrap;padding-left:20px;">
        <?php 
echo rcms_format_time('d.m.Y H:i', $tpldata['time']);
?>
    </td>
    <td align="left" style="padding-left:20px;">
        <?php 
echo __('Author/source');
?>
: <?php 
echo rcms_parse_text($tpldata['src'], false, false, false, false, false);
?>
	</td>
	<td align="right"style="padding-right:20px;">
		<?php 
if (!empty($tpldata['linkurl'])) {
    ?>
   	    <a href="<?php 
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:31,代码来源:art-article.tpl.php

示例9: rcms_format_time

<table border="0" cellpadding="1" cellspacing="1" width="100%" class="grayborder">
<tr>
    <th align="left" width="100%">
        [<?php 
echo rcms_format_time('H:i:s d.m.Y', $tpldata['time'], $system->user['tz']);
?>
]
        <?php 
echo __('Posted by');
?>
 <?php 
echo user_create_link($tpldata['author_user'], $tpldata['author_nick']);
?>
        <?php 
if (isset($tpldata['author_ip']) and $system->checkForRight('ARTICLES-MODERATOR')) {
    ?>
 <?php 
    echo $tpldata['author_ip'];
    ?>
   <?php 
}
?>
    </th>
    <th align="right">
        <?php 
if ($system->checkForRight('ARTICLES-MODERATOR')) {
    ?>
           <form method="post" action="">
            <input type="hidden" name="cdelete" value="<?php 
    echo $tpldata['id'];
    ?>
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:comment.tpl.php

示例10: guestbook_write_to_arch

function guestbook_write_to_arch($file, $message)
{
    $fp = fopen($file, 'a+');
    fwrite($fp, $message['author_username'] . '/' . $message['author_nickname'] . ' ' . rcms_format_time('d F Y H:i:s', $message['time'], 0) . ' (GMT)<br />' . $message['text'] . '<hr />');
    fclose($fp);
}
开发者ID:BackupTheBerlios,项目名称:reloadcms-svn,代码行数:6,代码来源:guestbook.php

示例11: __

<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$name_module = __('Pages');
$pages = @rcms_scandir(RCMS_ROOT_PATH . 'content/pages');
if (!empty($pages) && is_array($pages)) {
    foreach ($pages as $page) {
        $sitemap->addUrl($directory . '?module=pages&id=' . $page, rcms_format_time('Y-m-d', filemtime(RCMS_ROOT_PATH . 'content/pages/' . $page)), $chfr, $prio);
    }
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:14,代码来源:pages.php

示例12: articles_parse_list

<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) 2004 ReloadCMS Development Team                            //
//   http://reloadcms.sf.net                                                  //
//                                                                            //
//   This program is distributed in the hope that it will be useful,          //
//   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
//                                                                            //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$articles = articles_parse_list(0, false);
$result = '<table cellspacing="0" cellpadding="0" border="0" width="100%">';
$i = 2;
if (!empty($articles)) {
    foreach ($articles as $article) {
        $result .= '<tr><td class="row' . $i . '"><a href="index.php?module=articles&catid=' . $article['catid'] . '&id=' . $article['id'] . '"><abbr title="' . $lang['articles']['poster'] . ': ' . $article['author_nick'] . ', ' . $lang['articles']['date'] . ': ' . rcms_format_time('d.m.Y H:i:s', $article['time']) . '">' . $article['title'] . ' (' . $article['comcnt'] . ')</abbr></a></td></tr>';
        $i++;
        if ($i > 3) {
            $i = 2;
        }
    }
}
$result .= '</table>';
$system->showMenuWindow($lang['articles']['latestarts'], $result, 'center');
开发者ID:BackupTheBerlios,项目名称:reloadcms-svn,代码行数:26,代码来源:index.php

示例13: str_replace

<tr style="height:10px">
    <td class="row2" rowspan="2" valign="top" align="center">
	<a href="javascript:insert_text(document.forms['form1'].elements['comtext'], ' [b]<?php 
echo str_replace('\'', '\\\'', $tpldata['author_nick']);
?>
[/b]')"><?php 
echo $tpldata['author_nick'];
?>
</a><br/>
	<?php 
echo show_avatar($tpldata['author_user']);
?>
	</td>
    <td class="row2" align="left" width="100%">
        <?php 
echo rcms_format_time('H:i:s d\\&\\n\\b\\s\\p\\;F\\&\\n\\b\\s\\p\\;Y', $tpldata['time'], $system->user['tz']);
?>
        <?php 
if (isset($tpldata['author_ip']) and $system->checkForRight('ARTICLES-MODERATOR')) {
    ?>
IP: <?php 
    echo $tpldata['author_ip'];
    ?>
   <?php 
}
?>
    </td>
    <td class="row2" align="right" nowrap="nowrap">
        <?php 
if ($system->checkForRight('ARTICLES-MODERATOR')) {
    ?>
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:31,代码来源:comment.tpl.php

示例14: articles_get

if (!empty($article) && !empty($category)) {
    $article_data = articles_get($category, $article, false, 2, $work_dir);
    $frm = new InputForm('', 'post', $lang['general']['submit'], '', 'multipart/form-data', 'arted');
    $frm->addbreak($lang['admincp']['articles']['manage']['edit'] . ': ' . $article_data['title']);
    $frm->addrow($lang['articles']['categ'], $frm->select_tag('a_category', $categories_list, $article_data['catid']), 'top');
    $frm->addrow($lang['articles']['subj'], $frm->text_box('a_title', $article_data['title']), 'top');
    $frm->addrow($lang['articles']['author'], $frm->text_box('a_src', $article_data['src']), 'top');
    $frm->addrow('', rcms_show_bbcode_panel('document.arted.a_description'));
    $frm->addrow($lang['articles']['desc'], $frm->textarea('a_description', str_replace('<br />', '', $article_data['desc']), 70, 5), 'top');
    $frm->addrow('', rcms_show_bbcode_panel('document.arted.a_text'));
    $frm->addrow($lang['articles']['text'], $frm->textarea('a_text', str_replace('<br />', '', $article_data['text']), 70, 25), 'top');
    $frm->addrow($lang['articles']['mode'], $frm->radio_button('a_mode', $lang['articles']['modes'], $article_data['mode']), 'top');
    $frm->addrow($lang['articles']['allowcomments'], $frm->radio_button('a_comments', array('yes' => $lang['admincp']['allow'], 'no' => $lang['admincp']['disallow']), $article_data['comments']), 'top');
    $frm->hidden('editflag', '1');
    $frm->hidden('edit', $article);
    $frm->hidden('category', $category);
    $frm->show();
} elseif (!empty($category)) {
    $category_name = $categories_list[$category];
    $articles = articles_get_articles_list($category, false, 0, $work_dir);
    $frm = new InputForm('', 'post', $lang['general']['submit'], '', 'multipart/form-data');
    $frm->resetButton($lang['general']['reset']);
    $frm->addbreak($lang['admincp']['articles']['manage']['full'] . ': ' . $category_name);
    if (!empty($articles)) {
        foreach ($articles as $id => $article) {
            $frm->addrow($article['title'] . ' [' . ($article['author_name'] != 'guest' ? '<a href="../index.php?module=user.list&user=' . $article['author_name'] . '">' . $article['author_nick'] . '</a>' : $article['author_nick']) . '] [' . rcms_format_time('d F Y H:i:s', $article['time']) . ']', $frm->checkbox('delete[' . $article['id'] . ']', '1', $lang['articles']['delete']) . '<br />' . $frm->radio_button('edit', array($article['id'] => $lang['articles']['edit'])));
        }
    }
    $frm->hidden('category', $category);
    $frm->show();
}
开发者ID:BackupTheBerlios,项目名称:reloadcms-svn,代码行数:31,代码来源:articles.man.php

示例15: __

<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$name_module = __('Articles');
$articles = new articles();
$containers = $articles->getContainers();
if (!empty($containers) && is_array($containers)) {
    foreach (array_keys($containers) as $c) {
        if ($c != '#hidden') {
            if ($articles->setWorkContainer($c)) {
                if (is_array($articles->getCategories())) {
                    foreach ($articles->getCategories() as $b) {
                        foreach ($articles->getArticles($b['id'], true) as $article) {
                            $loc = $directory . '?module=articles&c=' . str_replace('#', '%23', $c) . '&b=' . $b['id'] . '&a=' . $article['id'];
                            $sitemap->addUrl($loc, rcms_format_time('Y-m-d', $article['time']), $chfr, $prio);
                        }
                    }
                }
            }
        }
    }
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:26,代码来源:articles.php


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