本文整理汇总了PHP中Timestamp::format5方法的典型用法代码示例。如果您正苦于以下问题:PHP Timestamp::format5方法的具体用法?PHP Timestamp::format5怎么用?PHP Timestamp::format5使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timestamp
的用法示例。
在下文中一共展示了Timestamp::format5方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCommentView
//.........这里部分代码省略.........
foreach ($comments as $commentItem) {
$commentItemView = $isComment ? $skin->commentItem : $skin->guestItem;
$commentSubItemsView = '';
$subComments = getCommentComments($commentItem['id'], $commentItem);
foreach ($subComments as $commentSubItem) {
$commentSubItemView = $isComment ? $skin->commentSubItem : $skin->guestSubItem;
$commentSubItem['name'] = htmlspecialchars($commentSubItem['name']);
$commentSubItem['comment'] = htmlspecialchars($commentSubItem['comment']);
$rp_class = $prefix1 . '_general';
if ($blogid == $commentSubItem['replier']) {
$rp_class = $prefix1 . '_admin';
} else {
if ($commentSubItem['secret'] == 1) {
$rp_class = $prefix1 . '_secret';
if ($authorized) {
$commentSubItem['comment'] = '<span class="hiddenCommentTag_content">' . _text('[비밀댓글]') . '</span> ' . $commentSubItem['comment'];
} else {
$rp_class .= ' hiddenComment';
$commentSubItem['name'] = '<span class="hiddenCommentTag_name">' . _text('비밀방문자') . '</span>' . (doesHaveOpenIDPriv($commentSubItem) ? ' ' . $commentSubItem['name'] : '');
}
}
}
dress($prefix1 . '_rep_class', $rp_class, $commentSubItemView);
if (dress($prefix1 . '_rep_id', ($entry['id'] == 0 ? 'guestbook' : 'comment') . $commentSubItem['id'], $commentSubItemView) == false) {
$commentSubItemView = "<a id=\"comment{$commentSubItem['id']}\"></a>" . $commentSubItemView;
}
if (empty($commentSubItem['homepage']) || $commentSubItem['secret'] == 1 && !doesHaveOwnership()) {
dress($prefix1 . '_rep_name', fireEvent($isComment ? 'ViewCommenter' : 'ViewGuestCommenter', "<span {$fn_nickname}>" . $commentSubItem['name'] . "</span>", $commentSubItem), $commentSubItemView);
} else {
dress($prefix1 . '_rep_name', fireEvent($isComment ? 'ViewCommenter' : 'ViewGuestCommenter', '<a ' . $fn . 'rel="external nofollow" href="' . htmlspecialchars(addProtocolSense($commentSubItem['homepage'])) . '" onclick="return openLinkInNewWindow(this)">' . $commentSubItem['name'] . '</a>', $commentSubItem), $commentSubItemView);
}
$contentContainer["{$prefix1}_{$commentSubItem['id']}"] = fireEvent($isComment ? 'ViewCommentContent' : 'ViewGuestCommentContent', nl2br(addLinkSense($commentSubItem['comment'], ' onclick="return openLinkInNewWindow(this)"')), $commentSubItem);
dress($prefix1 . '_rep_desc', setTempTag("{$prefix1}_{$commentSubItem['id']}"), $commentSubItemView);
dress($prefix1 . '_rep_date', fireEvent($isComment ? 'ViewCommentDate' : 'ViewGuestCommentDate', Timestamp::format5($commentSubItem['written']), $commentSubItem['written']), $commentSubItemView);
dress($prefix1 . '_rep_link', $context->getProperty('uri.blog') . "/" . ($entry['id'] == 0 ? "guestbook/{$commentItem['id']}#guestbook{$commentSubItem['id']}" : ($context->getProperty('blog.useSloganOnPost') ? "entry/" . URL::encode($entry['slogan'], $context->getProperty('service.useEncodedURL')) : $entry['id']) . "#comment{$commentSubItem['id']}"), $commentSubItemView);
dress($prefix1 . '_rep_onclick_delete', "deleteComment({$commentSubItem['id']}); return false;", $commentSubItemView);
$commentSubItemsView .= $commentSubItemView;
}
$commentSubContainer = $isComment ? $skin->commentSubContainer : $skin->guestSubContainer;
dress($isComment ? 'rp2_rep' : 'guest_reply_rep', $commentSubItemsView, $commentSubContainer);
if (count($subComments) > 0) {
dress($isComment ? 'rp2_container' : 'guest_reply_container', $commentSubContainer, $commentItemView);
}
$commentItem['name'] = htmlspecialchars($commentItem['name']);
$commentItem['comment'] = htmlspecialchars($commentItem['comment']);
$rp_class = $prefix1 . '_general';
if ($blogid == $commentItem['replier']) {
$rp_class = $prefix1 . '_admin';
} else {
if ($commentItem['secret'] == 1) {
$rp_class = $prefix1 . '_secret';
if ($authorized) {
$commentItem['comment'] = '<span class="hiddenCommentTag_content">' . _text('[비밀댓글]') . '</span> ' . $commentItem['comment'];
} else {
$rp_class .= ' hiddenComment';
$commentItem['name'] = '<span class="hiddenCommentTag_name">' . _text('비밀방문자') . '</span>' . (doesHaveOpenIDPriv($commentItem) ? ' ' . $commentItem['name'] : '');
}
}
}
dress($prefix1 . '_rep_class', $rp_class, $commentItemView);
if (dress($prefix1 . '_rep_id', ($entry['id'] == 0 ? 'guestbook' : 'comment') . $commentItem['id'], $commentItemView) == false) {
$commentItemView = "<a id=\"comment{$commentItem['id']}\"></a>" . $commentItemView;
}
if (empty($commentItem['homepage']) || $commentItem['secret'] == 1 && !doesHaveOwnership()) {
dress($prefix1 . '_rep_name', fireEvent($isComment ? 'ViewCommenter' : 'ViewGuestCommenter', "<span {$fn_nickname}>" . $commentItem['name'] . "</span>", $commentItem), $commentItemView);
} else {
示例2: htmlspecialchars
<td class="check">
<input type="checkbox" id="check_<?php
echo $count;
?>
" />
</td>
<td class="name"><?php
echo $value['name'];
?>
</td>
<td class="email"><?php
echo htmlspecialchars($value['loginid']);
?>
</td>
<td class="date"><?php
echo Timestamp::format5($value['created']);
?>
</td>
<td class="posting"><?php
echo $value['posting'];
?>
</td>
<td class="status">
<?php
$authtoken = getAuthToken($value['userid']);
if ($value['lastlogin'] == 0) {
?>
<?php
echo _t('미참여');
if ($value['acl'] & BITWISE_ADMINISTRATOR) {
$invitationURL = getInvitationLink(getBlogURLById($blogid), htmlspecialchars($value['loginid']), $value['password'], $authtoken);
示例3: _text
$itemsView .= ' <span class="left">' . ($category == 0 ? _text('모든 카테고리') : ucwords(getCategoryNameById($blogid, $category))) . ' (' . $list['count'] . ')</span>' . CRLF;
$itemsView .= ' <span class="right">Page <span class="now_page">' . $paging['page'] . '</span> / ' . $paging['pages'] . '</span>' . CRLF;
$itemsView .= '</li>' . CRLF;
foreach ($list['items'] as $item) {
$author = User::getName($item['userid']);
if ($imageName = printIphoneAttachmentExtract(printIphoneEntryContent($blogid, $item['userid'], $item['id']))) {
$imageSrc = printIphoneImageResizer($blogid, $imageName, 28);
} else {
$imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png';
}
$itemsView .= '<li class="post_item">' . CRLF;
$itemsView .= ' <span class="image"><img src="' . $imageSrc . '" width="28" height="28" /></span>' . CRLF;
$itemsView .= ' <a href="' . $blogURL . '/entry/' . $item['id'] . '" class="link">' . CRLF;
$itemsView .= ' <div class="post">' . CRLF;
$itemsView .= ' <span class="title">' . fireEvent('ViewListTitle', htmlspecialchars($item['title'])) . '</span>' . CRLF;
$itemsView .= ' <span class="description">' . Timestamp::format5($item['published']) . ', ' . 'Comments(' . ($item['comments'] > 0 ? $item['comments'] : 0) . ')' . '</span>' . CRLF;
$itemsView .= ' </div>' . CRLF;
$itemsView .= ' </a>' . CRLF;
$itemsView .= '</li>' . CRLF;
}
$itemsView .= '<li class="pagination">' . CRLF;
if (isset($paging['prev'])) {
$itemsView .= '<a href="' . $blogURL . '/category/' . $category . '?page=' . $paging['prev'] . '" class="previous">' . _textf('%1 페이지', $paging['prev']) . '</a>' . CRLF;
}
if (isset($paging['next'])) {
$itemsView .= '<a href="' . $blogURL . '/category/' . $category . '?page=' . $paging['next'] . '" class="next">' . _textf('%1 페이지', $paging['next']) . '</a>' . CRLF;
}
if ($suri['page'] > 1 && $suri['page'] != $paging['pages']) {
$itemsView .= '<strong>' . $suri['page'] . '</strong>' . CRLF;
}
$itemsView .= '</li>' . CRLF;
示例4: sitemap_Manage
function sitemap_Manage()
{
global $blog, $service, $database, $pluginURL, $hostURL, $blogURL, $blogid;
$userid = getUserId();
$version = explode('.', trim(file_get_contents(ROOT . '/cache/CHECKUP')));
if ($version[0] < 1 || $version[0] === '1' && (int) $version[1] < 8) {
$_text = _t('Alert ::\\r\\n - This plugin must be Textcube 1.8 or above. \\r\\n Please update your textcube and try again.');
$setupAlert = '<script type="text/javascript">alert("' . $_text . '"); history.go(-1);</script>';
exit;
}
$sitemap = new HC_XMLSitemap();
$indexonTime = Timestamp::format5(filemtime(ROOT . "/cache/sitemap/" . $sitemap->filename));
$gzonTime = Timestamp::format5(filemtime(ROOT . "/cache/sitemap/" . $blogid . "/" . $sitemap->filename . ".gz"));
?>
<style type="text/css">
<!--
th div {
text-align: left;
font-weight: bold;
}
.site div {
text-align: left;
}
.site div blockquote {
margin-left: 2.0em;
}
.site ul li {
line-height: 2.0em;
}
ul.status li {
list-style-type: circle !important;
}
button.rebuild-sitemap {
color: #0066CC;
cursor: pointer;
}
li dfn {
color: #FF0000;
font-style: normal;
}
-->
</style>
<script type="text/javascript">
//<![CDATA[
function toggle_buildonchange() {
try {
var oo = document.getElementById( 'buildonchange' );
if( ! oo ) {
return false;
}
oo = oo.checked ? "1" : "0";
var request = new HTTPRequest("GET", "<?php
echo $blogURL;
?>
/plugin/sitemap/buildonchange?mode=" + oo);
request.onSuccess = function() {
PM.removeRequest(this);
PM.showMessage("<?php
echo _t('Data save success.');
?>
", "center", "bottom");
}
request.onError = function() {
PM.removeRequest(this);
PM.showErrorMessage("<?php
echo _t('Data save error.');
?>
", "center", "bottom");
}
request.send("");
} catch(e) {
}
}
function toggle_notification(target) {
try {
var targetId = 'notify'+target;
var oo = document.getElementById( targetId );
if( ! oo ) {
return false;
}
oo = oo.checked ? "1" : "0";
var request = new HTTPRequest("GET", "<?php
echo $blogURL;
?>
/plugin/sitemap/notification?mode=" + target + "&setup=" + oo);
request.onSuccess = function() {
PM.removeRequest(this);
PM.showMessage("<?php
echo _t('Notification update success.');
?>
", "center", "bottom");
}
request.onError = function() {
PM.removeRequest(this);
PM.showErrorMessage("<?php
echo _t('Notification update error.');
?>
", "center", "bottom");
}
//.........这里部分代码省略.........
示例5: dumpAsFile
function dumpAsFile($data)
{
if (!is_dir(__TEXTCUBE_CACHE_DIR__ . "")) {
@mkdir(__TEXTCUBE_CACHE_DIR__ . "");
@chmod(__TEXTCUBE_CACHE_DIR__ . "", 0777);
}
$dumpFile = __TEXTCUBE_CACHE_DIR__ . '/dump';
if (file_exists($dumpFile)) {
$dumpedLog = @file_get_contents($dumpFile);
} else {
$dumpedLog = '';
}
$dumpedLog = $dumpedLog . Timestamp::format5() . " : " . print_r($data, true) . CRLF;
$fileHandle = fopen($dumpFile, 'w');
fwrite($fileHandle, $dumpedLog);
fclose($fileHandle);
}
示例6: getRemoteResponseLog
function getRemoteResponseLog($blogid, $entry, $type = null)
{
global $database;
if ($type === null) {
$filter = '';
} else {
$filter = " AND responsetype = '" . POD::escapeString($type) . "'";
}
$result = POD::query("SELECT * FROM {$database['prefix']}RemoteResponseLogs WHERE blogid = {$blogid} AND entry = {$entry} {$filter}");
$str = '';
while ($row = POD::fetch($result)) {
$str .= $row['id'] . ',' . $row['url'] . ',' . Timestamp::format5($row['written']) . '*';
}
return $str;
}
示例7: sizeof
$className .= $i == sizeof($rec) - 1 ? ' last-line' : '';
?>
<tr class="<?php
echo $className;
?>
inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')">
<td><?php
echo "{$record['openid']} {$nickname}";
?>
</td>
<td><?php
echo $record['delegatedid'];
?>
</td>
<td><?php
echo $record['logincount'];
?>
</td>
<td><?php
echo Timestamp::format5($record['lastlogin']);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
require ROOT . '/interface/common/owner/footer.php';
示例8: MT_Cover_getRecentEntries
function MT_Cover_getRecentEntries($parameters)
{
global $database, $blog, $service, $serviceURL, $suri, $configVal, $defaultURL, $skin;
requireModel("blog.entry");
requireModel("blog.tag");
$data = Setting::fetchConfigVal($configVal);
$data['coverMode'] = !isset($data['coverMode']) ? 1 : $data['coverMode'];
if (Misc::isMetaBlog() != true) {
$data['coverMode'] = 1;
}
$data['screenshot'] = !isset($data['screenshot']) ? 1 : $data['screenshot'];
$data['screenshotSize'] = !isset($data['screenshotSize']) ? 90 : $data['screenshotSize'];
$data['paging'] = !isset($data['paging']) ? '2' : $data['paging'];
$data['contentLength'] = !isset($data['contentLength']) ? 250 : $data['contentLength'];
if (isset($parameters['preview'])) {
// preview mode
$retval = '표지에 최신 글 목록을 추가합니다.';
return htmlspecialchars($retval);
}
$entryLength = isset($parameters['entryLength']) ? $parameters['entryLength'] : 10;
if (!is_dir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail")) {
@mkdir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail");
@chmod(__TEXTCUBE_CACHE_DIR__ . "/thumbnail", 0777);
}
if (!is_dir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId())) {
@mkdir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId());
@chmod(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId(), 0777);
}
if (!is_dir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId() . "/coverPostThumbnail/")) {
@mkdir(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId() . "/coverPostThumbnail/");
@chmod(__TEXTCUBE_CACHE_DIR__ . "/thumbnail/" . getBlogId() . "/coverPostThumbnail/", 0777);
}
$page = $data['paging'] == '1' && !empty($_GET['page']) ? intval($_GET['page']) : 1;
$cache = new PageCache();
$cache->name = 'MT_Cover_RecentPS';
if ($cache->load()) {
//If successful loads
$cache->contents = unserialize($cache->contents);
// If coverpage is single mode OR coverpage is coverblog and cache is not expired, return cache contents.
if (($data['coverMode'] == 1 || $data['coverMode'] == 2) && array_key_exists($page, $cache->contents) && Timestamp::getUNIXtime() - $cache->dbContents < 300) {
return $cache->contents[$page];
}
}
if (Misc::isMetaBlog() == true && doesHaveOwnership() && $service['type'] != 'single') {
$visibility = 'AND e.visibility > 1 AND (c.visibility > 1 OR e.category = 0)';
} else {
$visibility = doesHaveOwnership() ? '' : 'AND e.visibility > 1 AND (c.visibility > 1 OR e.category = 0)';
}
$multiple = $data['coverMode'] == 2 ? '' : 'e.blogid = ' . getBlogId() . ' AND';
$privateBlogId = POD::queryColumn("SELECT blogid \n\t\tFROM {$database['prefix']}BlogSettings\n\t\tWHERE name = 'visibility'\n\t\tAND value < 2");
if (!empty($privateBlogId)) {
$privateBlogs = ' AND e.blogid NOT IN (' . implode(',', $privateBlogId) . ')';
} else {
$privateBlogs = '';
}
list($entries, $paging) = Paging::fetch("SELECT e.blogid, e.id, e.userid, e.title, e.content, e.slogan, e.category, e.published, e.contentformatter, c.label\n\t\tFROM {$database['prefix']}Entries e\n\t\tLEFT JOIN {$database['prefix']}Categories c ON e.blogid = c.blogid AND e.category = c.id\n\t\tWHERE {$multiple} e.draft = 0 {$visibility} AND e.category >= 0 {$privateBlogs}\n\t\tORDER BY published DESC", $page, $entryLength);
$html = '';
foreach ((array) $entries as $entry) {
$tagLabelView = "";
$blogid = $data['coverMode'] == 2 ? $entry['blogid'] : getBlogId();
$entryTags = getTags($blogid, $entry['id']);
$defaultURL = getDefaultURL($blogid);
if (sizeof($entryTags) > 0) {
$tags = array();
foreach ($entryTags as $entryTag) {
$tags[$entryTag['name']] = "<a href=\"{$defaultURL}/tag/" . (Setting::getBlogSettingGlobal('useSloganOnTag', true) ? URL::encode($entryTag['name'], $service['useEncodedURL']) : $entryTag['id']) . '">' . htmlspecialchars($entryTag['name']) . '</a>';
}
$tagLabelView = "<div class=\"post_tags\"><span>TAG : </span>" . implode(",\r\n", array_values($tags)) . "</div>";
}
if (empty($entry['category'])) {
$entry['label'] = _text('분류없음');
$entry['link'] = "{$defaultURL}/category";
} else {
$entry['link'] = "{$defaultURL}/category/" . (Setting::getBlogSettingGlobal('useSloganOnCategory', true) ? URL::encode($entry['label'], $service['useEncodedURL']) : $entry['category']);
}
$permalink = "{$defaultURL}/" . (Setting::getBlogSettingGlobal('useSloganOnPost', true) ? "entry/" . URL::encode($entry['slogan'], $service['useEncodedURL']) : $entry['id']);
$html .= '<div class="coverpost">' . CRLF;
if ($imageName = MT_Cover_getAttachmentExtract($entry['content'])) {
if (($tempImageSrc = MT_Cover_getImageResizer($blogid, $imageName, $data['screenshotSize'])) && $data['screenshot'] == 1) {
$html .= '<div class="img_preview"><a href="' . $permalink . '"><img src="' . $tempImageSrc . '" alt="" /></a></div>' . CRLF;
}
}
$html .= ' <div class="content_box">';
$html .= ' <h2><a href="' . $permalink . '">' . htmlspecialchars($entry['title']) . '</a></h2>' . CRLF;
$html .= ' <div class="post_info">' . CRLF;
$html .= ' <span class="category"><a href="' . htmlspecialchars($entry['link']) . '">' . htmlspecialchars($entry['label']) . '</a></span>' . CRLF;
$html .= ' <span class="date">' . Timestamp::format5($entry['published']) . '</span>' . CRLF;
$html .= ' <span class="author"><span class="preposition">by </span>' . User::getName($entry['userid']) . '</span>' . CRLF;
$html .= ' </div>' . CRLF;
$html .= ' <div class="post_content">' . htmlspecialchars(Utils_Unicode::lessenAsEm(removeAllTags(stripHTML($entry['content'])), $data['contentLength'])) . '</div>' . CRLF;
$html .= $tagLabelView;
$html .= ' <div class="clear"></div>' . CRLF;
$html .= ' </div>';
$html .= '</div>' . CRLF;
}
if ($data['paging'] == '1') {
$paging['page'] = $page;
$paging['total'] = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries e WHERE {$multiple} e.draft = 0 {$visibility} AND e.category >= 0");
$html .= getPagingView($paging, $skin->paging, $skin->pagingItem) . CRLF;
$html .= '<script type="text/javascript">' . CRLF;
//.........这里部分代码省略.........
示例9: PN_Subscription_Default
function PN_Subscription_Default()
{
global $pluginMenuURL, $pluginSelfParam, $totalSubscribers, $updatedSubscribers;
$blogid = getBlogId();
$temp = getSubscriptionStatistics($blogid);
$aggregatorInfo = organizeAggregatorInfo($temp);
Setting::setBlogSetting('SubscriberCount', $totalSubscribers);
?>
<script type="text/javascript">
//<![CDATA[
window.addEventListener("load", execLoadFunction, false);
function execLoadFunction() {
//removeItselfById('log-pages-submit');
}
//]]>
</script>
<div id="part-statistics-total" class="part">
<h2 class="caption"><span class="main-text"><?php
echo _t("전체 피드 통계");
?>
</span></h2>
<dl class="data-inbox">
<dt class="number"><span class="text"><?php
echo _t("전체 구독자수");
?>
</span></dt>
<dd class="number"><span class="text"><?php
echo _f("%1 명", $totalSubscribers);
?>
</span></dd>
<dt class="aggregator"><span class="text"><?php
echo _t("구독기");
?>
</span></dt>
<dd class="aggregator"><span class="text"><?php
echo _f("%1 종류의 구독기 및 크롤러가 구독중입니다.", sizeof($aggregatorInfo));
?>
</span></dd>
<dt class="lastRSSupdate"><span class="text"><?php
echo _t("최종 RSS 갱신일");
?>
</span></dt>
<dd class="lastRSSupdate"><span class="text"><?php
echo Setting::getBlogSetting('LatestRSSrefresh', null) !== null ? Timestamp::format5(Setting::getBlogSetting('LatestRSSrefresh', null)) : _t('정보가 갱신되지 않았습니다');
?>
</span></dd>
<dt class="updatedAggregators"><span class="text"><?php
echo _t("이후 갱신된 RSS 구독기");
?>
</span></dt>
<dd class="updatedAggregators"><span class="text"><?php
echo $updatedSubscribers;
?>
</span></dd>
</dl>
</div>
<hr class="hidden" />
<div id="part-statistics-rank" class="part">
<h2 class="caption"><span class="main-text"><?php
echo _t("피드 구독 순위");
?>
</span></h2>
<div class="main-explain-box">
<p class="explain">
<?php
echo _t("크롤러에 구독자 수 정보를 넣지 않는 웹 RSS 리더의 경우 정상적인 구독자수를 판별할 수 없습니다.");
?>
<br />
<?php
echo _t("강조 표시된 구독기는 검색 엔진 및 메타 프로그램을 의미합니다.");
?>
</p>
</div>
<table class="data-inbox" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th class="rank"><span class="text"><?php
echo _t("순위");
?>
</span></th>
<th class="aggregator"><span class="text"><?php
echo _t("구독기");
?>
</span></th>
<th class="count"><span class="text"><?php
echo _t("구독자 수");
?>
</span></th>
<th class="subscribed"><span class="text"><?php
echo _t("구독 시작일");
?>
</span></th>
<th class="referred"><span class="text"><?php
echo _t("최근 구독일");
?>
</span></th>
</tr>
//.........这里部分代码省略.........
示例10: printMobileCommentView
function printMobileCommentView($entryId)
{
global $blogURL;
$comments = getComments($entryId);
if (count($comments) == 0) {
?>
<div class="comment">
<?php
echo _text('댓글이 없습니다');
?>
</div>
<hr />
<?php
} else {
foreach ($comments as $commentItem) {
?>
<div class="comment">
<div class="name">
<?php
if (!empty($commentItem['name'])) {
?>
<strong><?php
echo htmlspecialchars($commentItem['name']);
?>
</strong><?php
}
?>
<a href="<?php
echo $blogURL;
?>
/comment/comment/<?php
echo $commentItem['id'];
?>
">RE</a>
<a href="<?php
echo $blogURL;
?>
/comment/delete/<?php
echo $commentItem['id'];
?>
">DEL</a><br />
(<?php
echo Timestamp::format5($commentItem['written']);
?>
)
</div>
<div class="body"><?php
echo ($commentItem['secret'] && doesHaveOwnership() ? '<div class="hiddenComment" style="font-weight: bold; color: #e11">' . _t('비밀 댓글') . ' >></div>' : '') . nl2br(addLinkSense(htmlspecialchars($commentItem['comment'])));
?>
</div>
<?php
foreach (getCommentComments($commentItem['id']) as $commentSubItem) {
?>
<blockquote>
<div class="name">
<?php
if (!empty($commentSubItem['name'])) {
?>
<strong><?php
echo htmlspecialchars($commentSubItem['name']);
?>
</strong><?php
}
?>
<a href="<?php
echo $blogURL;
?>
/comment/delete/<?php
echo $commentSubItem['id'];
?>
">DEL</a><br />
(<?php
echo Timestamp::format5($commentSubItem['written']);
?>
)
</div>
<div class="body"><?php
echo ($commentSubItem['secret'] && doesHaveOwnership() ? '<div class="hiddenComment" style="font-weight: bold; color: #e11">' . _t('비밀 댓글') . ' >></div>' : '') . nl2br(addLinkSense(htmlspecialchars($commentSubItem['comment'])));
?>
</div>
</blockquote>
<?php
}
?>
</div>
<hr />
<?php
}
}
printMobileCommentFormView($entryId);
}
示例11: getFeedItemByLines
function getFeedItemByLines($lines)
{
$context = Model_Context::getInstance();
$channelItems = array();
foreach ($lines as $row) {
$entryURL = $context->getProperty('uri.default') . '/line#' . $row['id'];
$content = $row['content'];
$item = array('id' => $row['id'], 'title' => RSSMessage(Timestamp::format5($row['created'])), 'link' => $entryURL, 'author' => RSSMessage($row['author']), 'categories' => array(), 'description' => RSSMessage($content), 'pubDate' => $row['created'], 'updDate' => $row['created'], 'guid' => $entryURL);
array_push($channelItems, $item);
}
return $channelItems;
}
示例12: dress
dress('article_rep_tb_link', "return false", $entryView);
}
dress('article_rep_tb_cnt_id', "trackbackCount{$entry['id']}", $entryView);
list($tempTag, $trackbackView) = getTrackbackCountPart($entry['trackbacks'], $skin);
dress($tempTag, $trackbackView, $entryView);
$entriesView .= $entryView;
} else {
// Protected entries
$protectedEntryView = $skin->entryProtected;
$author = User::getName($entry['userid']);
dress('article_rep_author', fireEvent('ViewPostAuthor', $author, $entry['id']), $protectedEntryView);
dress('article_rep_author_link', $blogURL . "/author/" . rawurlencode($author), $protectedEntryView);
dress('article_rep_id', $entry['id'], $protectedEntryView);
dress('article_rep_link', $permalink, $protectedEntryView);
dress('article_rep_title', htmlspecialchars(fireEvent('ViewPostTitle', $entry['title'], $entry['id'])), $protectedEntryView);
dress('article_rep_date', fireEvent('ViewPostDate', Timestamp::format5($entry['published'])), $protectedEntryView);
dress('article_password', "entry{$entry['id']}password", $protectedEntryView);
dress('article_dissolve', "reloadEntry({$entry['id']});", $protectedEntryView);
if (isset($_POST['partial'])) {
$entriesView .= $protectedEntryView;
} else {
$entriesView .= "<div id=\"entry{$entry['id']}\">{$protectedEntryView}</div>";
}
}
}
}
}
}
if (count($entries) > 1 || count($entries) == 1 && empty($suri['value'])) {
unset($totalTags);
}
示例13: htmlspecialchars
$itemsView = '<li class="group ui-bar ui-bar-e">' . CRLF;
$itemsView .= ' <span class="left">' . htmlspecialchars($search) . ' ' . _text('검색 결과') . '(' . $list['count'] . ')</span>' . CRLF;
$itemsView .= ' <span class="right ui-li-aside">' . _text('페이지') . '<span class="now_page">' . $paging['page'] . '</span> / ' . $paging['pages'] . '</span>' . CRLF;
$itemsView .= '</li>' . CRLF;
foreach ($list['items'] as $item) {
$author = User::getName($item['userid']);
if ($imageName = printMobileAttachmentExtract(printMobileEntryContent($blogid, $item['userid'], $item['id']))) {
$imageSrc = printMobileImageResizer($blogid, $imageName, 80);
} else {
$imageSrc = $service['path'] . '/resources/style/iphone/image/noPostThumb.png';
}
$itemsView .= '<li class="post_item">' . CRLF;
$itemsView .= ' <a href="' . $context->getProperty('uri.blog') . '/entry/' . $item['id'] . '" class="link">' . CRLF;
$itemsView .= ' <img src="' . $imageSrc . '" />' . CRLF;
$itemsView .= ' <h3>' . fireEvent('ViewListTitle', htmlspecialchars($item['title'])) . '</h3>' . CRLF;
$itemsView .= ' <p>' . Timestamp::format5($item['published']) . '</span><span class="ui-li-count"> ' . _textf('댓글 %1개', $item['comments'] > 0 ? $item['comments'] : 0) . '</p>' . CRLF;
$itemsView .= ' </a>' . CRLF;
$itemsView .= '</li>' . CRLF;
}
$itemsView .= '</ul>' . CRLF;
print $itemsView;
print printMobileListNavigation($paging, 'search/' . $search);
?>
</ul>
<?php
printMobileHTMLFooter();
} else {
?>
<div data-role="page" data-theme="a" id="search">
<form id="searchForm" method="GET" class="dialog snug editorBar" action="<?php
echo $blogURL;
示例14: dumpAsFile
function dumpAsFile($data)
{
if (!is_dir(ROOT . "/cache")) {
@mkdir(ROOT . "/cache");
@chmod(ROOT . "/cache", 0777);
}
$dumpFile = ROOT . '/cache/dump';
if (file_exists($dumpFile)) {
$dumpedLog = @file_get_contents($dumpFile);
} else {
$dumpedLog = '';
}
$dumpedLog = $dumpedLog . Timestamp::format5() . " : " . print_r($data, true) . CRLF;
$fileHandle = fopen($dumpFile, 'w');
fwrite($fileHandle, $dumpedLog);
fclose($fileHandle);
}
示例15: getFeedItemByLines
function getFeedItemByLines($lines)
{
global $database, $serviceURL, $defaultURL, $blog, $service;
$channelItems = array();
foreach ($lines as $row) {
$entryURL = $defaultURL . '/line#' . $row['id'];
$content = $row['content'];
$item = array('id' => $row['id'], 'title' => RSSMessage(Timestamp::format5($row['created'])), 'link' => $entryURL, 'author' => RSSMessage($row['author']), 'categories' => array(), 'description' => RSSMessage($content), 'pubDate' => $row['created'], 'updDate' => $row['created'], 'guid' => $entryURL);
array_push($channelItems, $item);
}
return $channelItems;
}