本文整理汇总了PHP中Pagination::getPagination方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::getPagination方法的具体用法?PHP Pagination::getPagination怎么用?PHP Pagination::getPagination使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pagination
的用法示例。
在下文中一共展示了Pagination::getPagination方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
$sql_add .= ' ORDER BY fav_num DESC';
break;
case 'lg':
$title_o = ' ' . $lang['global.longest'];
$sql_add .= ' ORDER BY duration DESC';
break;
}
$sql = "SELECT count(VID) AS total_videos FROM video" . $sql_add_count;
$rsc = $conn->execute($sql);
$total = $rsc->fields['total_videos'];
$pagination = new Pagination($config['videos_per_page']);
$limit = $pagination->getLimit($total);
$sql = "SELECT * FROM video" . $sql_add . " LIMIT " . $limit;
$rs = $conn->execute($sql);
$videos = $rs->getrows();
$page_link = $pagination->getPagination('videos');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$title = $title_t . $title_o . $title_c . $title_p;
$self_title = $title . $seo['videos_title'];
$self_description = $title . $seo['videos_desc'];
$self_keywords = $title . $seo['videos_keywords'];
$smarty->assign('errors', $errors);
$smarty->assign('messages', $messages);
$smarty->assign('menu', 'videos');
$smarty->assign('categories', $categories);
$smarty->assign('type', $type);
$smarty->assign('videos', $videos);
$smarty->assign('videos_total', $total);
$smarty->assign('start_num', $start_num);
$smarty->assign('end_num', $end_num);
示例2: COUNT
break;
case 'mv':
$sql_add .= " ORDER BY s.profile_viewed DESC";
break;
case 'on':
$sql_add .= " ORDER BY s.logintime DESC";
break;
case 'ma':
$sql_add .= " ORDER BY s.video_viewed+s.profile_viewed+s.watched_video DESC";
break;
}
$sql = "SELECT COUNT(s.UID) AS total_users FROM signup AS s, users_online AS o\n WHERE s.account_status = 'Active' AND s.UID = o.UID" . $sql_add_count;
$rsc = $conn->execute($sql);
$total_users = $rsc->fields['total_users'];
$pagination = new Pagination($config['users_per_page']);
$limit = $pagination->getLimit($total_users);
$sql = "SELECT s.UID, s.username, s.photo, s.gender FROM signup AS s, users_online AS o\n WHERE s.account_status = 'Active' AND s.UID = o.UID" . $sql_add . " LIMIT " . $limit;
$rs = $conn->execute($sql);
$users = $rs->getrows();
$page_link = $pagination->getPagination('search');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$smarty->assign('users', $users);
$smarty->assign('users_total', $total_users);
$smarty->assign('page_link', $page_link);
$smarty->assign('start_num', $start_num);
$smarty->assign('end_num', $end_num);
$smarty->assign('order', $order);
$smarty->assign('gender', $gender);
$smarty->assign('interest', $interest);
$smarty->assign('avatar', $avatar);
示例3: array
require $config['BASE_DIR'] . '/include/dbconn.php';
require_once $config['BASE_DIR'] . '/include/function_thumbs.php';
$data = array('status' => 0, 'msg' => '', 'code' => '', 'debug' => '');
if (isset($_POST['page'])) {
if (isset($_SESSION['uid'])) {
$uid = intval($_SESSION['uid']);
$page = intval(trim($_POST['page']));
$sql = "SELECT count(VID) AS total_videos FROM video WHERE UID = " . $uid;
$rs = $conn->execute($sql);
$total = $rs->fields['total_videos'];
$pagination = new Pagination(8, $page);
$limit = $pagination->getLimit($total);
$sql = "SELECT VID, title FROM video WHERE UID = " . $uid . "\n\t\t\t\t\t\t AND embed_code = ''\n\t\t ORDER BY VID DESC LIMIT " . $limit;
$rs = $conn->execute($sql);
$videos = $rs->getrows();
$page_link = $pagination->getPagination('media_content', 'p_mc_my_videos_');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$code = array();
$code[] = '<div class="m-b-15">';
$code[] = '<a href="#attach_playlist_videos" id="attach_mcp_playlist_videos">' . $lang['user.playlist'] . '</a> <strong>·</strong>';
$code[] = '<a href="#attach_favorite_videos" id="attach_mcp_favorite_videos">' . $lang['user.favorites'] . '</a> <strong>·</strong>';
$code[] = '<span class="text-white">' . $lang['ajax.my_videos'] . '</span>';
$code[] = '<button id="close_attach_mc_mv" type="button" class="close">×</button>';
$code[] = '</div>';
if ($videos) {
$code[] = '<div class="m-b--15">';
$code[] = '<div class="row">';
foreach ($videos as $video) {
$code[] = '<div class="col-xs-6 col-sm-3 m-b-15">';
$code[] = '<a href="#attach_my_video_' . $video['VID'] . '" id="attach_media_video_' . $video['VID'] . '"><img src="' . get_thumb_url($video['VID']) . '/1.jpg" alt="' . htmlspecialchars($video['title'], ENT_QUOTES, 'UTF-8') . '" class="img-responsive" /></a>';
示例4: Pagination
}
$pagination = new Pagination(10, 'p_related_games_' . $game['GID'] . '_');
$limit = $pagination->getLimit($total_related);
$sql = "SELECT GID, title, addtime, rate, total_plays, type FROM game\n WHERE status = '1' AND category = '" . $game['category'] . "' AND GID != " . $gid . "\n AND ( title LIKE '%" . mysql_real_escape_string($game['title']) . "%' " . $sql_add . ")\n ORDER BY addtime DESC LIMIT " . $limit;
$rs = $conn->execute($sql);
$games = $rs->getrows();
$page_link = $pagination->getPagination('game');
$sql = "SELECT COUNT(CID) AS total_comments FROM game_comments WHERE GID = " . $gid . " AND status = '1'";
$rsc = $conn->execute($sql);
$total_comments = $rsc->fields['total_comments'];
$pagination = new Pagination(10);
$limit = $pagination->getLimit($total_comments);
$sql = "SELECT c.CID, c.UID, c.comment, c.addtime, s.username, s.photo, s.gender\n FROM game_comments AS c, signup AS s \n WHERE c.GID = " . $gid . " AND c.status = '1' AND c.UID = s.UID \n ORDER BY c.addtime DESC LIMIT " . $limit;
$rs = $conn->execute($sql);
$comments = $rs->getrows();
$page_link_c = $pagination->getPagination('game', 'p_game_comments_' . $game['GID'] . '_');
$page_link_cb = $pagination->getPagination('game', 'pp_game_comments_' . $game['GID'] . '_');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$self_title = $game['title'] . $seo['game_title'];
$self_description = $game['title'] . $seo['game_desc'];
$self_keywords = implode(', ', $game['tags']) . $seo['game_keywords'];
$smarty->assign('errors', $errors);
$smarty->assign('messages', $messages);
$smarty->assign('menu', 'games');
$smarty->assign('submenu', '');
$smarty->assign('play', true);
$smarty->assign('game', $game);
$smarty->assign('self_title', $self_title);
$smarty->assign('self_description', $self_description);
$smarty->assign('self_keywords', $self_keywords);
示例5: array
require $config['BASE_DIR'] . '/classes/pagination.class.php';
require $config['BASE_DIR'] . '/include/dbconn.php';
$data = array('status' => 0, 'msg' => '', 'code' => '', 'debug' => '');
if (isset($_POST['page'])) {
if (isset($_SESSION['uid'])) {
$uid = intval($_SESSION['uid']);
$page = intval(trim($_POST['page']));
$sql = "SELECT COUNT(PID) AS total_photos FROM photo_favorites\n WHERE UID = " . $uid;
$rs = $conn->execute($sql);
$total = $rs->fields['total_photos'];
$pagination = new Pagination(8, $page);
$limit = $pagination->getLimit($total);
$sql = "SELECT p.PID, p.caption FROM photos AS p, photo_favorites AS f \n WHERE f.UID = " . $uid . " AND p.PID = f.PID ORDER BY p.PID DESC LIMIT " . $limit;
$rs = $conn->execute($sql);
$photos = $rs->getrows();
$page_link = $pagination->getPagination('media_content', 'p_mc_favorite_photos_');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$code = array();
$code[] = '<div class="m-b-15">';
$code[] = '<span class="text-white">' . $lang['user.favorites'] . '</span> <strong>·</strong>';
$code[] = '<a href="#attach_my_photos" id="attach_mcp_my_photos">' . $lang['ajax.my_photos'] . '</a>';
$code[] = '<button id="close_attach_mc_fp" type="button" class="close">×</button>';
$code[] = '</div>';
if ($photos) {
$index = 0;
$code[] = '<div class="m-b--15">';
$code[] = '<div class="row">';
foreach ($photos as $photo) {
if ($index == 4) {
$code[] = '</div><div class="row">';
示例6: array
require $config['BASE_DIR'] . '/include/dbconn.php';
$code = array();
if (isset($_POST['game_id']) && isset($_POST['page'])) {
$filter = new VFilter();
$gid = $filter->get('game_id', 'INTEGER');
$page = $filter->get('page', 'INTEGER');
$uid = isset($_SESSION['uid']) ? intval($_SESSION['uid']) : NULL;
$sql = "SELECT COUNT(CID) AS total_comments FROM game_comments WHERE GID = " . $gid . " AND status = '1'";
$rsc = $conn->execute($sql);
$total = $rsc->fields['total_comments'];
$pagination = new Pagination(10, $page);
$limit = $pagination->getLimit($total);
$sql = "SELECT c.CID, c.UID, c.comment, c.addtime, s.username, s.photo, s.gender\n FROM game_comments AS c, signup AS s\n WHERE c.GID = " . $gid . " AND c.status = '1' AND c.UID = s.UID \n ORDER BY c.addtime DESC LIMIT " . $limit;
$rs = $conn->execute($sql);
$comments = $rs->getrows();
$page_link = $pagination->getPagination('game/' . $gid, 'p_game_comments_' . $gid . '_');
$page_link_b = $pagination->getPagination('game/' . $gid, 'pp_game_comments_' . $gid . '_');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$code[] = '<div class="blinkp">';
$code[] = $lang['global.showing'] . ' <strong>' . $start_num . '</strong> ' . $lang['global.to'] . ' <strong>' . $end_num . '</strong> ' . $lang['global.of'] . ' <strong>' . $total . '</strong> ' . $lang['global.comments'] . '.';
$code[] = '</div>';
if ($comments) {
$code[] = '<div id="comments_delimiter" style="display:none;"></div>';
foreach ($comments as $comment) {
$photo = $comment['photo'] == '' ? 'nopic-' . $comment['gender'] . '.gif' : $comment['photo'];
$username = $comment['username'];
$code[] = '<div id="game_comment_' . $gid . '_' . $comment['CID'] . '" class="col-xs-12 m-t-15">';
$code[] = '<div class="row">';
$code[] = '<div class="pull-left">';
$code[] = '<a href="' . $config['BASE_URL'] . '/user/' . $username . '">';
示例7: COUNT
if ($conn->Affected_Rows() != 1) {
VRedirect::go($config['BASE_URL'] . '/error/invalid_notice');
}
$notice = $rs->getrows();
$notice = $notice['0'];
$sql = "UPDATE notice SET total_views = total_views+1 WHERE NID = " . $NID . " LIMIT 1";
$conn->execute($sql);
$sql = "SELECT COUNT(CID) AS total_comments FROM notice_comments WHERE NID = " . $NID . " AND status = '1'";
$rsc = $conn->execute($sql);
$total = $rsc->fields['total_comments'];
$pagination = new Pagination(10);
$limit = $pagination->getLimit($total);
$sql = "SELECT c.CID, c.UID, c.comment, c.addtime, s.username, s.photo, s.gender\n FROM notice_comments AS c, signup AS s \n WHERE c.NID = " . $NID . " AND c.status = '1' AND c.UID = s.UID\n ORDER BY c.addtime DESC LIMIT " . $limit;
$rs = $conn->execute($sql);
$comments = $rs->getrows();
$page_link = $pagination->getPagination('notice/' . $NID, 'p_notice_comments_' . $NID . '_');
$page_link_b = $pagination->getPagination('notice/' . $NID, 'pp_notice_comments_' . $NID . '_');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$smarty->assign('errors', $errors);
$smarty->assign('messages', $messages);
$smarty->assign('menu', 'home');
$smarty->assign('notice_js', true);
$smarty->assign('notice', $notice);
$smarty->assign('comments', $comments);
$smarty->assign('comments_total', $total);
$smarty->assign('page_link', $page_link);
$smarty->assign('page_link_b', $page_link_b);
$smarty->assign('start_num', $start_num);
$smarty->assign('end_num', $end_num);
$smarty->assign('arhive', get_notice_arhive());
示例8: intval
$auth->check();
$uid = intval($_SESSION['uid']);
$username = $_SESSION['username'];
$sql = "SELECT * FROM signup WHERE UID = " . $uid . " LIMIT 1";
$rs = $conn->execute($sql);
$user = $rs->getrows();
$user = $user['0'];
$sql = "SELECT COUNT(FID) AS total_requests FROM friends WHERE UID = " . $uid . " AND status = 'Pending'";
$rsc = $conn->execute($sql);
$total = $rsc->fields['total_requests'];
$pagination = new Pagination(16);
$limit = $pagination->getLimit($total);
$sql = "SELECT r.FID, r.message, s.username, s.photo, s.gender \n FROM friends AS r, signup AS s\n WHERE r.UID = " . $uid . " AND r.status = 'Pending' AND r.FID = s.UID\n ORDER BY r.invite_date DESC LIMIT " . $limit;
$rs = $conn->execute($sql);
$requests = $rs->getrows();
$page_link = $pagination->getPagination('requests');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$smarty->assign('errors', $errors);
$smarty->assign('messages', $messages);
$smarty->assign('profile', true);
$smarty->assign('menu', 'home');
$smarty->assign('user', $user);
$smarty->assign('username', $username);
$smarty->assign('requests', $requests);
$smarty->assign('requests_total', $total);
$smarty->assign('page_link', $page_link);
$smarty->assign('start_num', $start_num);
$smarty->assign('end_num', $end_num);
$smarty->display('header.tpl');
$smarty->display('errors.tpl');
示例9: intval
if ($table == 'all') {
function compare_time($a, $b)
{
$a_time = intval($a['time']);
$b_time = intval($b['time']);
if ($a_time === $b_time) {
return 0;
}
return $a_time < $b_time ? 1 : -1;
}
usort($feeds, 'compare_time');
}
if ($subscriptions) {
$pagination = new Pagination(40);
$limit = $pagination->getLimit($total_feeds);
$page_link = $pagination->getPagination('feeds');
}
$self_title = $config['site_title'];
$self_meta_description = $config['meta_description'];
$self_meta_keywords = $config['meta_keywords'];
$smarty->assign('subscriptions', $subscriptions);
$smarty->assign('username', $username);
$smarty->assign('table', $table);
$smarty->assign('feeds', $feeds);
$smarty->assign('page_link', $page_link);
$smarty->assign('self_title', $self_title);
$smarty->assign('self_meta_description', $self_meta_description);
$smarty->assign('self_meta_keywords', $self_meta_keywords);
$smarty->display('header.tpl');
$smarty->display('errors.tpl');
$smarty->display('messages.tpl');
示例10: die
<?php
defined('_VALID') or die('Restricted Access!');
require $config['BASE_DIR'] . '/classes/pagination.class.php';
if ($config['game_module'] == '0') {
VRedirect::go($config['BASE_URL'] . '/error/page_invalid');
}
$sql = "SELECT COUNT(GID) AS total_games FROM game WHERE UID = " . $uid . " AND status = '1'";
$rsc = $conn->execute($sql);
$total = $rsc->fields['total_games'];
$pagination = new Pagination(18);
$limit = $pagination->getLimit($total);
$sql = "SELECT GID, title, addtime, rate, likes, dislikes, total_plays, type FROM game\n WHERE UID = " . $uid . " AND status = '1'\n ORDER BY GID DESC LIMIT " . $limit;
$rs = $conn->execute($sql);
$games = $rs->getrows();
$page_link = $pagination->getPagination('user/' . $username . '/games');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$smarty->assign('games', $games);
$smarty->assign('games_total', $total);
$smarty->assign('page_link', $page_link);
$smarty->assign('start_num', $start_num);
$smarty->assign('end_num', $end_num);
示例11: COUNT
$is_friend = false;
}
}
} else {
$is_friend = false;
}
}
$sql = "SELECT COUNT(PID) AS total_photos FROM photos WHERE AID = " . $aid . " AND status = '1'";
$rsc = $conn->execute($sql);
$total = $rsc->fields['total_photos'];
$pagination = new Pagination(12);
$limit = $pagination->getLimit($total);
$sql = "SELECT PID, caption FROM photos WHERE AID = " . $aid . " AND status = '1' ORDER BY PID ASC LIMIT " . $limit;
$rs = $conn->execute($sql);
$photos = $rs->getrows();
$page_link = $pagination->getPagination('album/' . $aid . '/');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$sql = "UPDATE albums SET total_views = total_views+1 WHERE AID = " . $aid . " LIMIT 1";
$conn->execute($sql);
$smarty->assign('photos_total', $total);
$smarty->assign('photos', $photos);
$smarty->assign('page_link', $page_link);
$smarty->assign('start_num', $start_num);
$smarty->assign('end_num', $end_num);
$smarty->assign('is_friend', $is_friend);
}
$self_title = $name . $seo['album_title'];
$self_meta_description = $name;
$self_meta_keywords = str_replace(' ', ', ', $tags);
$smarty->assign('errors', $errors);
示例12: COUNT
$sql_add .= ' ORDER BY a.rate DESC';
break;
case 'tf':
$title_o = ' ' . $lang['global.top_favorites'];
$sql_add .= ' ORDER BY a.total_favorites DESC';
break;
}
$sql = "SELECT COUNT(AID) AS total_albums FROM albums WHERE status = '1'" . $sql_add_count;
$rsc = $conn->execute($sql);
$total = $rsc->fields['total_albums'];
$pagination = new Pagination($config['albums_per_page']);
$limit = $pagination->getLimit($total);
$sql = "SELECT a.*, s.username FROM albums AS a, signup AS s WHERE a.status = '1' AND a.UID = s.UID" . $sql_add . " LIMIT " . $limit;
$rs = $conn->execute($sql);
$albums = $rs->getrows();
$page_link = $pagination->getPagination('albums');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$title = $title_t . $title_o . $title_c . $title_p;
$self_title = $title . $seo['album_title'];
$self_description = $title . ' ' . $lang['global.albums'] . ' - ' . $config['site_name'];
$self_keywords = $title . ' ' . $lang['global.albums'] . ' ' . $config['meta_keywords'];
$smarty->assign('errors', $errors);
$smarty->assign('messages', $messages);
$smarty->assign('menu', 'albums');
$smarty->assign('submenu', '');
$smarty->assign('categories', get_categories());
$smarty->assign('category', $category);
$smarty->assign('timeframe', $timeframe);
$smarty->assign('order', $order);
$smarty->assign('type', $type);
示例13: array
$code = array();
$items_code = NULL;
if (isset($_POST['photo_id']) && isset($_POST['page'])) {
$filter = new VFilter();
$pid = $filter->get('photo_id', 'INTEGER');
$page = $filter->get('page', 'INTEGER');
$uid = isset($_SESSION['uid']) ? intval($_SESSION['uid']) : NULL;
$sql = "SELECT COUNT(CID) AS total_comments FROM photo_comments WHERE PID = " . $pid . " AND status = '1'";
$rsc = $conn->execute($sql);
$total = $rsc->fields['total_comments'];
$pagination = new Pagination(10, $page);
$limit = $pagination->getLimit($total);
$sql = "SELECT c.CID, c.UID, c.comment, c.addtime, s.username, s.photo, s.gender\n FROM photo_comments AS c, signup AS s\n WHERE PID = " . $pid . " AND status = '1' AND c.UID = s.UID \n ORDER BY addtime DESC LIMIT " . $limit;
$rs = $conn->execute($sql);
$comments = $rs->getrows();
$page_link = $pagination->getPagination('photo/' . $pid, 'p_photo_comments_' . $pid . '_');
$page_link_u = $pagination->getPagination('photo/' . $pid, 'pp_photo_comments_' . $pid . '_');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$items_code = $lang['global.showing'] . ' <strong>' . $start_num . '</strong> ' . $lang['global.to'] . ' <strong>' . $end_num . '</strong> ' . $lang['global.of'] . ' <strong>' . $total . '</strong> ' . $lang['global.comments'] . '.';
if ($comments) {
$code[] = '<div class="pagination"><ul>' . $page_link . '</ul></div>';
$code[] = '<div id="comments_delimiter" style="display:none;"></div>';
foreach ($comments as $comment) {
$photo = $comment['photo'] == '' ? 'nopic-' . $comment['gender'] . '.gif' : $comment['photo'];
$username = $comment['username'];
$code[] = '<div id="photo_comment_' . $pid . '_' . $comment['CID'] . '">';
$code[] = '<div id="delete_response_' . $commend['CID'] . '" class="response" style="display: none;"></div>';
$code[] = '<div class="comment">';
$code[] = '<div class="comment_left"><a href="' . $config['BASE_URL'] . '/user/' . $username . '"><img src="' . $config['BASE_URL'] . '/media/users/' . $photo . '" width="60" title="' . $username . '" alt="' . $username . '" /></a></div>';
$code[] = '<div class="comment_right">';
示例14: COUNT
$sql_add .= " ORDER BY u.popularity DESC";
break;
case 'ma':
$title_o = 'Most Active';
$sql_add .= " ORDER BY u.points DESC";
break;
}
$sql = "SELECT COUNT(u.UID) AS total_users FROM signup AS u, users_online AS o\n WHERE u.account_status = 'Active' AND u.UID = o.UID" . $sql_add;
$rsc = $conn->execute($sql);
$total_users = $rsc->fields['total_users'];
$pagination = new Pagination($config['users_per_page']);
$limit = $pagination->getLimit($total_users);
$sql = "SELECT u.UID, u.username, u.photo, u.gender FROM signup AS u, users_online AS o\n WHERE u.account_status = 'Active' AND u.UID = o.UID" . $sql_add . " LIMIT " . $limit;
$rs = $conn->execute($sql);
$users = $rs->getrows();
$page_link = $pagination->getPagination('users');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$title = $title_o . $title_g;
$self_title = $title . $seo['users_title'];
$self_description = $title . $seo['users_desc'];
$self_keywords = $title . $seo['users_keywords'];
$smarty->assign('errors', $errors);
$smarty->assign('messages', $messages);
$smarty->assign('menu', 'community');
$smarty->assign('title', $title);
$smarty->assign('users', $users);
$smarty->assign('users_total', $total_users);
$smarty->assign('page_link', $page_link);
$smarty->assign('start_num', $start_num);
$smarty->assign('end_num', $end_num);
示例15: COUNT
$sql_add .= " ORDER BY b.total_views DESC";
break;
case 'md':
$title_o = ' ' . $lang['global.most_commented'];
$sql_add .= " ORDER BY b.total_comments DESC";
break;
}
$sql = "SELECT COUNT(BID) AS total_blogs FROM blog WHERE status = '1'" . $sql_add_count;
$rsc = $conn->execute($sql);
$total_blogs = $rsc->fields['total_blogs'];
$pagination = new Pagination($config['blogs_per_page']);
$limit = $pagination->getLimit($total_blogs);
$sql = "SELECT b.BID, b.UID, b.title, b.content, b.total_views, b.total_comments, b.addtime,\n s.username, s.photo\n FROM blog AS b, signup AS s\n WHERE b.status = '1' AND b.UID = s.UID" . $sql_add . " LIMIT " . $limit;
$rs = $conn->execute($sql);
$blogs = $rs->getrows();
$page_link = $pagination->getPagination('blogs');
$start_num = $pagination->getStartItem();
$end_num = $pagination->getEndItem();
$title = $title_t . $title_o;
$self_title = $title . $seo['blogs_title'];
$self_description = $title . $seo['blogs_desc'];
$self_keywords = $title . $seo['blogs_keywords'];
$smarty->assign('errors', $errors);
$smarty->assign('messages', $messages);
$smarty->assign('menu', 'blogs');
$smarty->assign('blogs', $blogs);
$smarty->assign('blogs_total', $total_blogs);
$smarty->assign('page_link', $page_link);
$smarty->assign('start_num', $start_num);
$smarty->assign('end_num', $end_num);
$smarty->assign('order', $order);