本文整理汇总了PHP中Func::makePaging方法的典型用法代码示例。如果您正苦于以下问题:PHP Func::makePaging方法的具体用法?PHP Func::makePaging怎么用?PHP Func::makePaging使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Func
的用法示例。
在下文中一共展示了Func::makePaging方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
define('ROOT', '..');
include ROOT . '/lib/include.php';
$searchFeedId = $accessInfo['action'];
$searchType = 'blogURL';
if(is_numeric($searchFeedId)) {
$searchKeyword = 'http://'.str_replace('http://', '', Feed::get($searchFeedId, 'blogURL'));
$searchExtraValue = $searchFeedId;
} else {
$searchKeyword = 'http://'.str_replace('http://', '', $accessInfo['address']);
$searchExtraValue = Feed::blogURL2Id('http://'.str_replace('http://', '', $searchKeyword));
}
include ROOT . '/lib/begin.php';
$pageCount = $skinConfig->postList; // ÆäÀÌÁö°¹¼ö
list($posts, $totalFeedItems) = FeedItem::getFeedItems($searchType, $searchKeyword, $searchExtraValue, $page, $pageCount);
$paging = Func::makePaging($page, $pageCount, $totalFeedItems);
include ROOT . '/lib/piece/message.php';
include ROOT . '/lib/piece/postlist.php';
include ROOT . '/lib/end.php';
?>
示例2: XMLStruct
// 현재 사용중인 스킨
$n_skinname = Settings::get('metaskin');
$n_skinpath = ROOT . '/skin/meta/'.$n_skinname;
$xmls = new XMLStruct();
if (file_exists($n_skinpath.'/index.xml')) { // 스킨 없음
$xml = file_get_contents($n_skinpath.'/index.xml');
$xmls->open($xml);
}
$pageCount = 15; // 페이지갯수
$page = isset($_GET['page']) ? $_GET['page'] : 1;
if(!isset($page) || empty($page)) $page = 1;
$paging = Func::makePaging($page, $pageCount, count($skinlist));
?>
<link rel="stylesheet" href="<?php echo $service['path'];?>/style/admin_design.css" type="text/css" />
<script type="text/javascript">
function saveSkin(name) {
$.ajax({
type: "POST",
url: _path +'/service/design/skin.php',
data: 'name=' + encodeURIComponent(name) + "&type=meta",
dataType: 'xml',
success: function(msg){
error = $("response error", msg).text();
if(error == "0") {
document.location.reload();
示例3: isset
}
if (!$plugin['status'] = $db->queryCell("SELECT status FROM {$database['prefix']}Plugins WHERE name='{$file}'"))
$plugin['status'] = 'off';
array_push($plugins, $plugin);
unset($plugin);
}
$dir->close();
$pageCount = 15; // 페이지갯수
$page = isset($_GET['page']) ? $_GET['page'] : 1;
if(!isset($page) || empty($page)) $page = 1;
$paging = Func::makePaging($page, $pageCount, count($plugins));
?>
<script type="text/javascript">
var pluginTing = [];
<?php
foreach ($plugins as $plugin) {
echo "\t\tpluginTing['{$plugin['name']}'] = [];\n";
echo "\t\tpluginTing['{$plugin['name']}']['title'] = '".func::escapeJSInAttribute($plugin['title'])."';\n";
echo "\t\tpluginTing['{$plugin['name']}']['config'] = '{$plugin['config']}';\n";
foreach ($plugin['ting'] as $ting) {
echo "\t\tpluginTing['{$plugin['name']}']['{$ting['event']}'] = [];\n";
echo "\t\tpluginTing['{$plugin['name']}']['{$ting['event']}']['type'] = '{$ting['type']}';\n";
echo "\t\tpluginTing['{$plugin['name']}']['{$ting['event']}']['text'] = '".func::escapeJSInAttribute($ting['text'])."';\n";
}
示例4: _t
} else {
$msg = _t('회원정보 수정 성공');
}
}
}
$readUser = User::getAll($read);
}
$pageCount = 15; // 페이지갯수
$page = isset($_GET['page']) ? $_GET['page'] : 1;
if(!isset($page) || empty($page)) $page = 1;
$memberCount = User::getMemberCount();
$members = User::getMembers('',$page, $pageCount);
$paging = Func::makePaging($page, $pageCount, $memberCount);
?>
<script type="text/javascript">
<?php
if(!empty($read)) {
?>
function deleteMember() {
if (!confirm('<?php echo _t('탈퇴처리를 한 회원의 글은 모두 삭제되며, 다시 복구 하실 수 없습니다.\n\n탈퇴처리 하시겠습니까?');?>')) {
return false;
}
var form = $("#memberForm");
$('#is_secede').val('1');
form.submit();
示例5: WHERE
if(isset($accessInfo['action'])) {
$id = $accessInfo['action'];
$post = FeedItem::getFeedItem($id);
FeedItem::edit($post['id'], 'click', $post['click']+1);
$page = FeedItem::getPageFromWritten($post['written']);
if(!isAdmin()) {
$filter = ' WHERE (i.visibility = "y") AND (i.feedVisibility = "y") ';
} else {
$filter = ' WHERE (i.visibility != "d") ';
}
$pageCut = 5;
$pageCount = 1;
$paging = Func::makePaging($page, $pageCount, FeedItem::getFeedItemCount($filter), $pageCut);
$pageCount = $paging['pageEnd'] - $paging['pageStart'] + 1;
$result = FeedItem::getIdListFromPage($paging['pageStart'], $filter ,$pageCount);
$pageDatas = array();
$start = $paging['pageStart']-1;
if($start <= 0) $start = 1;
for($i=0;$i<count($result);$i++) {
$item = $result[$i];
$pageDatas[$start++] = '/read/'.$item['id'];
}
$paging['pageDatas'] = $pageDatas;
}
示例6: getNoticePage
function getNoticePage($input, $config) {
global $database, $db, $event, $service;
if(!isAdmin()) {
?>
<?php
return $input;
}
$blogId = isset($config['blog'])?$config['blog']:0;
$tag = isset($config['tag'])?$config['tag']:'';
$pluginURL = $event->pluginURL;
$params = '';
if(!empty($blogId)) {
$pageCount = 15; // 페이지갯수
$page = isset($_GET['page']) ? $_GET['page'] : 1;
if(!isset($page) || empty($page)) $page = 1;
list($posts, $totalFeedItems) = getNoticeFeedItems($blogId,$page,$pageCount);
$paging = Func::makePaging($page, $pageCount, $totalFeedItems);
ob_start();
?>
<link rel="stylesheet" href="<?php echo $pluginURL;?>/style.css" type="text/css" />
<script type="text/javascript">
var is_checked = false;
function toggleCheckAll(className) {
is_checked = !is_checked;
$("."+className).each( function() {
this.checked = is_checked;
});
}
function deleteItem(id) {
if(confirm("<?php echo _t('이 글을 삭제하시겠습니까?');?>")) {
$.ajax({
type: "POST",
url: '<?php echo $pluginURL;?>/delete.php',
data: 'id=' + id,
dataType: 'xml',
success: function(msg){
error = $("response error", msg).text();
if(error == "0") {
document.location.reload();
} else {
alert($("response message", msg).text());
}
},
error: function(msg) {
alert('unknown error');
}
});
}
}
function deleteAllItem(className) {
var ids = '';
$("."+className).each( function() {
if(this.checked) {
ids += $(this).val() + ',';
}
});
if(ids == '') {
return false;
}
if(confirm("<?php echo _t('선택된 모든 글을 삭제하시겠습니까?');?>")) {
$.ajax({
type: "POST",
url: '<?php echo $pluginURL;?>/delete.php',
data: 'id=' + ids,
dataType: 'xml',
success: function(msg){
error = $("response error", msg).text();
if(error == "0") {
document.location.reload();
} else {
alert($("response message", msg).text());
}
},
error: function(msg) {
alert('unknown error');
}
});
}
}
</script>
<div class="title_wrap">
<h3><?php echo _t('공지사항');?> <span class="cnt">(<?php echo $totalFeedItems;?>)</span></h3>
</div>
<div class="notice_wrap">
<?php
$headers = array(array('title'=>_t('선택'),'class'=>'entrylist_select','width'=>'50px'),
//.........这里部分代码省略.........
示例7: exportFunction_iframe
function exportFunction_iframe($params, $exportConfig) {
global $export, $service, $config, $event;
$page = isset($params['get']['page'])?$params['get']['page']:1;
if($page <= 0) $page = 1;
$thumbnail = isset($exportConfig) && isset($exportConfig['thumbnail']) ? Validator::getBool($exportConfig['thumbnail']) : true;
$pageCount = isset($exportConfig) && isset($exportConfig['count']) ? $exportConfig['count'] : 10;
$newWindow = isset($exportConfig) && isset($exportConfig['popup']) ? Validator::getBool($exportConfig['popup']) : true;
$categoryView = isset($exportConfig) && isset($exportConfig['category_view']) ? Validator::getBool($exportConfig['category_view']) : false;
$focusView = isset($exportConfig) && isset($exportConfig['focus_view']) ? ($exportConfig['focus_view'] == 'focus' ? true : false) : false;
if($focusView) {
list($posts, $totalFeedItems) = FeedItem::getFeedItems('focus', 'y', '', $page, $pageCount);
} else {
if($categoryView) {
$categoryValue = isset($exportConfig) && isset($exportConfig['category']) ? $exportConfig['category'] : '';
list($posts, $totalFeedItems) = FeedItem::getFeedItems('category', $categoryValue, '', $page, $pageCount);
} else {
list($posts, $totalFeedItems) = FeedItem::getFeedItems('', '', '', $page, $pageCount);
}
}
$paging = Func::makePaging($page, $pageCount, $totalFeedItems);
requireComponent('LZ.PHP.Media');
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $config->title;?></title>
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $export->exportURL;?>/style.css" />
<link rel="shortcut icon" href="<?php echo $service['path'];?>/images/favicon.ico" />
</head>
<body>
<div id="export_iframe_wrap">
<ul>
<?php
foreach($posts as $post) {
$post['thumbnail'] = '';
if($media = Media::getMedia($post['thumbnailId'])) {
$post['thumbnail'] = $media['thumbnail'];
}
$thumbnailFile = $event->on('Text.postThumbnail', Media::getMediaFile($post['thumbnail']));
$post['description'] = func::stripHTML($post['description'].'>');
if (substr($post['description'], -1) == '>') $post['description'] = substr($post['description'], 0, strlen($post['description']) - 1);
$post_description = UTF8::lessenAsByte(func::htmltrim($post['description']), 300);
if (strlen($post_description) == 0) $post_description = '<span class="empty">'._t('(글의 앞부분이 이미지 혹은 HTML 태그만으로 되어있습니다)').'</span>';
$post_description = $event->on('Text.postDescription', $post_description);
?>
<li class="<?php echo empty($thumbnailFile)||!$thumbnail?'thumbnail_nonexistence':'';?>">
<?php
if($thumbnail) {
$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$post['id'] : $service['path'].'/go/'.$post['permalink'];
if(!empty($post['thumbnail'])) {
?>
<div class="thumbnail">
<a href="<?php echo $link_url;?>" target="<?php echo $newWindow?'_blank':'_parent';?>"><img src="<?php echo $thumbnailFile;?>" alt="thumnail" /></a>
</div>
<?php
}
}
?>
<div class="data">
<h3><a href="<?php echo $link_url;?>" target="<?php echo $newWindow?'_blank':'_parent';?>"><?php echo UTF8::clear($event->on('Text.postTitle', func::stripHTML($post['title'])));?></a></h3>
<p><?php echo $post_description;?></p>
</div>
<div class="clear"></div>
</li>
<?php
}
?>
</ul>
<div class="paging">
<?php echo func::printPaging($paging);?>
</div>
</div>
</body>
</html>
<?php
$content = ob_get_contents();
ob_end_clean();
return $content;
}