本文整理汇总了PHP中make_page函数的典型用法代码示例。如果您正苦于以下问题:PHP make_page函数的具体用法?PHP make_page怎么用?PHP make_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了make_page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
}
if ($task == 'delete') {
he_quiz::delete_quiz($id);
} elseif ($task == 'dodelete') {
$deleted_quizzes = isset($_POST['delete']) ? $_POST['delete'] : array();
foreach ($deleted_quizzes as $quiz_id) {
he_quiz::delete_quiz($quiz_id);
}
}
if ($st == 1) {
he_quiz::approve_quizz($id);
} elseif ($st == 0) {
he_quiz::disapprove_quizz($id);
}
$total_quizzes = he_quiz::count_quizzes();
$quizzes_per_page = 20;
$page_vars = make_page($total_quizzes, $quizzes_per_page, $p);
$page_array = array();
for ($x = 0; $x <= $page_vars[2] - 1; $x++) {
if ($x + 1 == $page_vars[1]) {
$link = "1";
} else {
$link = "0";
}
$page_array[$x] = array('page' => $x + 1, 'link' => $link);
}
$rows = he_quiz::get_quizzes($page_vars[0], $quizzes_per_page);
$smarty->assign('quizzes', $rows);
$smarty->assign('total_quizzes', $total_quizzes);
$smarty->assign('pages', $page_array);
include "admin_footer.php";
示例2: implode
$where_clause[] = "user_level_id='{$f_level}'";
}
if ($f_subnet != "") {
$where_clause[] = "user_subnet_id='{$f_subnet}'";
}
if ($f_enabled != "") {
$where_clause[] = "user_enabled='{$f_enabled}'";
}
if (count($where_clause) != 0) {
$user_query .= " WHERE " . implode(" AND ", $where_clause);
}
// GET TOTAL USERS
$total_users = $database->database_num_rows($database->database_query($user_query));
// MAKE USER PAGES
$users_per_page = 100;
$page_vars = make_page($total_users, $users_per_page, $p);
$page_array = array();
for ($x = 0; $x <= $page_vars[2] - 1; $x++) {
if ($x + 1 == $page_vars[1]) {
$link = "1";
} else {
$link = "0";
}
$page_array[$x] = array('page' => $x + 1, 'link' => $link);
}
$user_query .= " ORDER BY {$sort} LIMIT {$page_vars['0']}, {$users_per_page}";
// DELETE MULTIPLE USERS
if ($task == "dodelete") {
$deleted_users = $_POST['delete'];
for ($d = 0; $d < count($deleted_users); $d++) {
$user = new se_user(array($deleted_users[$d]), array('user_id'));
示例3: CONCAT
$where_clause[] = "se_eventmembers.eventmember_status=1 && se_eventmembers.eventmember_approved=0";
}
if (empty($v) && $v !== "0") {
$where_clause[] = "se_eventmembers.eventmember_status=1 && se_eventmembers.eventmember_approved=1";
}
if (!empty($search)) {
$where_clause[] = "(se_users.user_username LIKE '%{$search}%' OR se_users.user_email LIKE '%{$search}%' OR CONCAT(se_users.user_fname, ' ', se_users.user_lname) LIKE '%{$search}%')";
}
if (!empty($where_clause)) {
$where = implode(" && ", $where_clause);
}
// GET TOTAL MEMBERS
$total_members = $event->event_member_total($where, TRUE);
// MAKE MEMBER PAGES
$members_per_page = 10;
$page_vars = make_page($total_members, $members_per_page, $p);
// GET MEMBER ARRAY
$members = $event->event_member_list($page_vars[0], $members_per_page, $s, $where);
// ASSIGN VARIABLES AND SHOW USER EDIT EVENT MEMBERS PAGE
$smarty->assign_by_ref('event', $event);
$smarty->assign_by_ref('members', $members);
$smarty->assign('total_members', $total_members);
$smarty->assign('search', $search);
$smarty->assign('s', $s);
$smarty->assign('v', $v);
$smarty->assign('p', $page_vars[1]);
$smarty->assign('maxpage', $page_vars[2]);
$smarty->assign('p_start', $page_vars[0] + 1);
$smarty->assign('p_end', $page_vars[0] + count($members));
$smarty->assign('result', $result);
include "footer.php";
示例4: elseif
$smarty->assign('last_day_of_month', $last_day_of_month);
$smarty->assign('total_cells', $total_cells);
$smarty->assign('month', $month_text);
$smarty->assign('year', $month_year);
$smarty->assign('date_last', $date_last);
$smarty->assign('date_current', $date);
$smarty->assign('date_next', $date_next);
$smarty->assign('today_day', $today_day);
$smarty->assign('today_month', $today_month);
} elseif ($view == "list") {
if (!empty($search)) {
$where = "se_events.event_title LIKE '%{$search}%' || se_events.event_desc LIKE '%{$search}%'";
}
// GET TOTAL EVENTS/GET EVENTS ARRAY
$total_events = $event->event_total($where);
$page_vars = make_page($total_events, $events_per_page, $p);
$events = $event->event_list($page_vars[0], $events_per_page, $s, $where, 1);
// ASSIGN
$smarty->assign('s', $s);
$smarty->assign('search', $search);
$smarty->assign('p', $page_vars[1]);
$smarty->assign('maxpage', $page_vars[2]);
$smarty->assign('p_start', $page_vars[0] + 1);
$smarty->assign('p_end', $page_vars[0] + count($blogentries));
}
// ASSIGN VARIABLES AND SHOW VIEW EVENTS PAGE
$smarty->assign('view', $view);
$smarty->assign('total_events', $total_events);
$smarty->assign_by_ref('events', $events);
$smarty->assign('show_notification', $show_notification);
include "footer.php";
示例5: header
// DETERMINE THE USER'S PERMISSIONS FOR THIS FORUM (VIEW, POST, MODERATE, ETC)
$forum_permission = $forum->forum_permission($forum_info[forum_id]);
// SEND USER BACK IF NOT ALLOWED TO VIEW THIS FORUM
if (!$forum_permission[allowed_to_view]) {
header("Location: forum.php");
exit;
}
// IF LOGGED IN, SET COOKIE TO SIGNAL FORUM IS "READ"
if ($user->user_exists) {
setcookie("forum_{$user->user_info[user_id]}_{$forum_info[forum_id]}", time(), time() + 99999999, "/");
}
// GET TOTAL TOPICS
$total_topics = $forum_info[forum_totaltopics];
// MAKE TOPIC PAGES
$topics_per_page = 25;
$page_vars = make_page($total_topics, $topics_per_page, $p);
// SET TOPIC ARRAY
$topic_array = $forum->forum_topic_list($forum_info[forum_id], $page_vars[0], $topics_per_page);
// GET MODERATORS
$mod_array = array();
$mods = $database->database_query("SELECT se_users.user_id, se_users.user_username, se_users.user_fname, se_users.user_lname FROM se_forummoderators LEFT JOIN se_users ON se_forummoderators.forummoderator_user_id=se_users.user_id WHERE se_forummoderators.forummoderator_forum_id='{$forum_info['forum_id']}' AND se_users.user_id IS NOT NULL");
while ($user_info = $database->database_fetch_assoc($mods)) {
$mod_user = new se_user();
$mod_user->user_info[user_id] = $user_info[user_id];
$mod_user->user_info[user_username] = $user_info[user_username];
$mod_user->user_info[user_fname] = $user_info[user_fname];
$mod_user->user_info[user_lname] = $user_info[user_lname];
$mod_user->user_displayname();
$mod_array[] = $mod_user;
}
// ASSIGN SMARTY VARS AND INCLUDE FOOTER
示例6: make_page
if ($f_owner != "") {
$where .= "se_users.user_id LIKE '%{$f_owner}%'";
}
if ($f_owner != "" & $f_title != "") {
$where .= " AND";
}
if ($f_title != "") {
$where .= " se_music.music_title LIKE '%{$f_title}%'";
}
if ($where != "") {
$where = "(" . $where . ")";
}
// GET TOTAL ENTRIES
$total_music = $music->music_list_total(NULL, NULL, $where);
// MAKE ENTRY PAGES
$page_vars = make_page($total_music, $entries_per_page, $p);
$page_array = array();
for ($x = 0; $x <= $page_vars[2] - 1; $x++) {
if ($x + 1 == $page_vars[1]) {
$link = "1";
} else {
$link = "0";
}
$page_array[$x] = array('page' => $x + 1, 'link' => $link);
}
// GET SONG LIST ARRAY
$music_list = $music->music_list($page_vars[0], $entries_per_page, $sort, $where);
// ASSIGN VARIABLES AND SHOW VIEW ENTRIES PAGE
$smarty->assign('total_music', $total_music);
$smarty->assign('pages', $page_array);
$smarty->assign('entries', $music_list);
示例7: implode
$where_clause[] = "se_reports.report_object='{$f_object}'";
}
if ($f_reason != "") {
$where_clause[] = "se_reports.report_reason='{$f_reason}'";
}
if ($f_details != "") {
$where_clause[] = " se_reports.report_details LIKE '%{$f_details}%'";
}
if (count($where_clause) != 0) {
$reports_query .= " WHERE " . implode(" AND ", $where_clause);
}
// GET TOTAL REPORTS
$total_reports = $database->database_num_rows($database->database_query($reports_query));
// MAKE REPORTS PAGES
$reports_per_page = 100;
$page_vars = make_page($total_reports, $reports_per_page, $p);
$page_array = array();
for ($x = 0; $x <= $page_vars[2] - 1; $x++) {
if ($x + 1 == $page_vars[1]) {
$link = "1";
} else {
$link = "0";
}
$page_array[$x] = array('page' => $x + 1, 'link' => $link);
}
$reports_query .= " ORDER BY {$sort} LIMIT {$page_vars['0']}, {$reports_per_page}";
// PULL REPORTS INTO AN ARRAY
$reports = $database->database_query($reports_query);
while ($report_info = $database->database_fetch_assoc($reports)) {
$report_array[] = $report_info;
}
示例8: IN
$total_posts = $database->database_num_rows($database->database_query("SELECT NULL FROM se_forumposts LEFT JOIN se_forumtopics ON se_forumposts.forumpost_forumtopic_id=se_forumtopics.forumtopic_id WHERE se_forumposts.forumpost_authoruser_id='{$owner->user_info[user_id]}' AND se_forumposts.forumpost_deleted='0' AND se_forumtopics.forumtopic_forum_id IN ('" . implode("', '", $forum_ids) . "')"));
}
// ASSIGN TOTAL POSTS IN SMARTY
$smarty->assign('total_posts', $total_posts);
// DISPLAY TAB ONLY IF USER HAS POSTED
if ($total_posts) {
// MAKE POST PAGES
if (isset($_POST['p_forum'])) {
$p_forum = $_POST['p_forum'];
} elseif (isset($_GET['p_forum'])) {
$p_forum = $_GET['p_forum'];
} else {
$p_forum = 1;
}
$posts_per_page = 10;
$page_vars_forum = make_page($total_posts, $posts_per_page, $p_forum);
// GET POST ARRAY
$post_array = array();
$posts = $database->database_query("SELECT se_forumtopics.forumtopic_forum_id, se_forumtopics.forumtopic_subject, se_forumposts.forumpost_id, se_forumposts.forumpost_forumtopic_id, se_forumposts.forumpost_date, se_forumposts.forumpost_excerpt FROM se_forumposts LEFT JOIN se_forumtopics ON se_forumposts.forumpost_forumtopic_id=se_forumtopics.forumtopic_id WHERE se_forumposts.forumpost_authoruser_id='{$owner->user_info[user_id]}' AND se_forumposts.forumpost_deleted='0' AND se_forumtopics.forumtopic_forum_id IN ('" . implode("', '", $forum_ids) . "') ORDER BY se_forumposts.forumpost_id DESC LIMIT {$page_vars_forum['0']}, {$posts_per_page}");
while ($post_info = $database->database_fetch_assoc($posts)) {
if (strlen($post_info[forumpost_excerpt]) > 47) {
$post_info[forumpost_excerpt] = substr($post_info[forumpost_excerpt], 0, 47) . "...";
}
$post_array[] = $post_info;
}
// SET SMARTY VARS
$smarty->assign('forum_posts', $post_array);
$smarty->assign('maxpage_forum', $page_vars_forum[2]);
$smarty->assign('p_start_forum', $page_vars_forum[0] + 1);
$smarty->assign('p_end_forum', $page_vars_forum[0] + count($posts));
$smarty->assign('p_forum', $page_vars_forum[1]);
示例9: se_music
// ENSURE SORT/VIEW ARE VALID
if ($s != "music_date DESC" && $s != "music_track_num ASC") {
$s = "music_date DESC";
}
if ($v != "0" && $v != "1") {
$v = 0;
}
// ONLY MY FRIENDS' MUSIC
if ($v == "1" && $user->user_exists) {
// SET WHERE CLAUSE
$where = "(\r\n SELECT\r\n TRUE\r\n FROM\r\n se_friends\r\n WHERE\r\n friend_user_id1={$user->user_info[user_id]} &&\r\n friend_user_id2=se_music.music_user_id &&\r\n friend_status=1\r\n ) \r\n ";
}
// CREATE ALBUM OBJECT
$music_object = new se_music();
// GET TOTAL ALBUMS
$browse_music_total = $music_object->music_list_total(NULL, NULL, $where);
// MAKE ENTRY PAGES
$music_per_page = 20;
$page_vars = make_page($browse_music_total, $music_per_page, $p);
// GET ALBUM ARRAY
$browse_music_list = $music_object->music_list($page_vars[0], $music_per_page, $s, $where);
// ASSIGN SMARTY VARIABLES AND DISPLAY MUSIC PAGE
$smarty->assign('browse_music_list', $browse_music_list);
$smarty->assign('browse_music_total', $browse_music_total);
$smarty->assign('p', $page_vars[1]);
$smarty->assign('maxpage', $page_vars[2]);
$smarty->assign('p_start', $page_vars[0] + 1);
$smarty->assign('p_end', $page_vars[0] + count($browse_music_list));
$smarty->assign('s', $s);
$smarty->assign('v', $v);
include "footer.php";
示例10: header
<?php
header('Content-Type: text/html; charset=utf8');
include "DBcontent.php";
include "menu.php";
//var_dump($_REQUEST);
if (!isset($_REQUEST["menu_op"])) {
$_REQUEST["menu_op"] = "總覽";
}
//use for test
//var_dump($_REQUEST);
//echo "<br>";
//default DB=full display
$DB_display = array("full", array());
//retrieve column names
$col_names = get_column_name();
//make menu
$menu = new menu();
//retrieve menu operation
if (isset($_GET["ID"])) {
$menu->create_profile($_GET["ID"]);
} else {
$menu->switchform($_REQUEST["menu_op"]);
}
function make_page($menu, $form, $DBcontent, $message)
{
$page = "\n <html>\n <head>\n <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>\n <title>尚肯產品資料庫</title>\n </head>\n <body>\n <div id='wrapper'> \n <div id='menu' style='text-align:center'>\n {$menu}\n </div>\n\n <div id='message' style='text-align:center'>\n {$message}\n </div>\n \n <div id='form' style='text-align:center'>\n {$form}\n </div>\n \n <div id='DB' style='text-align:center'>\n {$DBcontent}\n </div>\n \n </div>\n </body>\n </html>";
return $page;
}
echo make_page($menu->display_menu(), $menu->form, DB_content($DB_display), $menu->message);
示例11: preg_replace
$object_owner = preg_replace('/[^A-Z0-9_\\.-]/i', '', $object_owner);
$classname = "se_" . $object_owner;
if (class_exists($classname)) {
$object_owner_class = new $classname($user->user_info['user_id'], $object_owner_id);
$object_exists = $object_owner_class->{$object_owner . "_exists"};
}
}
if (!$owner->user_exists && !$object_exists) {
exit;
}
// START COMMENT OBJECT
$comment = new se_comment($type, $iden, $value, $tab, $col);
// GET TOTAL COMMENTS
$total_comments = $comment->comment_total();
// MAKE COMMENT PAGES AND GET COMMENT ARRAY
$page_vars = make_page($total_comments, $cpp, $p);
$comments = $comment->comment_list($page_vars[0], $cpp);
// CONSTRUCT JSON RESPONSE
$response_array = array('total_comments' => (int) $total_comments, 'maxpage' => (int) $page_vars[2], 'p_start' => (int) ($page_vars[0] + 1), 'p_end' => (int) ($page_vars[0] + count($comments)), 'p' => (int) $page_vars[1], 'comments' => array());
foreach ($comments as $comment_index => $comment_data) {
// Escape trailing backslash
if (substr($comment_data['comment_body'], -1, 1) == "\\" && substr($comment_data['comment_body'], -2, 2) != "\\\\") {
$comment_data['comment_body'] .= "\\";
}
$response_array['comments'][(int) $comment_data['comment_id']] = array('comment_authoruser_id' => (int) $comment_data['comment_authoruser_id'], 'comment_authoruser_exists' => (bool) $comment_data['comment_author']->user_exists, 'comment_authoruser_private' => (bool) $comment_data['comment_author_private'], 'comment_authoruser_url' => (string) $url->url_create('profile', $comment_data['comment_author']->user_info['user_username']), 'comment_authoruser_photo' => (string) $comment_data['comment_author']->user_photo('./images/nophoto.gif'), 'comment_authoruser_photo_width' => (int) $misc->photo_size($comment_data['comment_author']->user_photo('./images/nophoto.gif'), '75', '75', 'w'), 'comment_authoruser_username' => (string) $comment_data['comment_author']->user_info['user_username'], 'comment_authoruser_displayname' => (string) $comment_data['comment_author']->user_displayname, 'comment_date' => (string) $datetime->cdate("{$setting['setting_dateformat']} {$setting['setting_timeformat']}", $datetime->timezone($comment_data['comment_date'], $global_timezone)), 'comment_body' => (string) $comment_data['comment_body']);
}
// OUTPUT JSON
echo json_encode($response_array);
exit;
} elseif ($task == "comment_post") {
// GET COMMENT TYPE, ETC
示例12: MATCH
if ($c == 0 || !is_numeric($c)) {
$c = '0';
}
$where .= " AND blogentry_blogentrycat_id='{$c}'";
}
// SEARCH
if (!empty($blog_search)) {
$where .= " && MATCH (`blogentry_title`, `blogentry_body`) AGAINST ('{$blog_search}' IN BOOLEAN MODE)";
}
// CREATE blog OBJECT
$blog = new se_blog();
// GET TOTAL blogs
$total_blogentries = $blog->blog_entries_total($where);
// MAKE ENTRY PAGES
$blogentries_per_page = 10;
$page_vars = make_page($total_blogentries, $blogentries_per_page, $p);
// GET blog ARRAY
$blogentry_array = $blog->blog_entries_list($page_vars[0], $blogentries_per_page, $s, $where);
// GET BLOG ENTRY CATEGORIES
$blogentrycats_query = $database->database_query("SELECT * FROM se_blogentrycats WHERE blogentrycat_user_id=0 ORDER BY blogentrycat_id ASC");
$blogentrycats_array = array();
while ($blogentrycat = $database->database_fetch_assoc($blogentrycats_query)) {
$blogentrycats_array[] = array('blogentrycat_id' => $blogentrycat['blogentrycat_id'], 'blogentrycat_title' => $blogentrycat['blogentrycat_title']);
}
// ASSIGN SMARTY VARIABLES AND DISPLAY blogs PAGE
$smarty->assign('total_blogentries', $total_blogentries);
$smarty->assign_by_ref('blogentries', $blogentry_array);
$smarty->assign_by_ref('blogentrycats', $blogentrycats_array);
$smarty->assign('blog_search', $blog_search);
$smarty->assign('p', $page_vars[1]);
$smarty->assign('maxpage', $page_vars[2]);
示例13: implode
}
if ($f_title != "") {
$where_clause[] = " se_videos.video_title LIKE '%{$f_title}%'";
}
if (count($where_clause) != 0) {
$where = "(" . implode(" AND ", $where_clause) . ")";
}
// DELETE NECESSARY VIDEOS
$start = ($p - 1) * $videos_per_page;
if ($task == "delete") {
$video->video_delete_selected($start, $videos_per_page, $sort, $where);
}
// GET TOTAL VIDEOS
$total_videos = $video->video_total($where);
// MAKE VIDEO PAGES
$page_vars = make_page($total_videos, $videos_per_page, $p);
$page_array = array();
for ($x = 0; $x <= $page_vars[2] - 1; $x++) {
if ($x + 1 == $page_vars[1]) {
$link = "1";
} else {
$link = "0";
}
$page_array[$x] = array('page' => $x + 1, 'link' => $link);
}
// GET VIDEO ARRAY
$videos = $video->video_list($page_vars[0], $videos_per_page, $sort, $where);
// ASSIGN VARIABLES AND SHOW VIEW VIDEOS PAGE
$smarty->assign('total_videos', $total_videos);
$smarty->assign('pages', $page_array);
$smarty->assign('videos', $videos);
示例14: header
} else {
$s = "dd";
}
$sort = NULL;
//"se_blogentries.blogentry_date DESC";
$where = NULL;
// ENSURE BLOGS ARE ENABLED FOR THIS USER
if (!$user->level_info['level_blog_view']) {
header("Location: user_home.php");
exit;
}
// CREATE BLOG OBJECT
$subscriptions_per_page = 10;
$blog_object = new se_blog($user->user_info['user_id']);
// GET TOTAL ENTRIES
$blog_subscriptions_total = $blog_object->blog_subscription_total($where);
// MAKE ENTRY PAGES
$page_vars = make_page($blog_subscriptions_total, $subscriptions_per_page, $p);
// GET ENTRY ARRAY
$blog_subscriptions_list = $blog_object->blog_subscription_list($page_vars[0], $subscriptions_per_page, $sort, $where, TRUE);
//echo mysql_get_server_info();
//print_r($blog_subscriptions_list);
// ASSIGN VARIABLES AND SHOW PAGE
$smarty->assign('blog_subscriptions_total', $blog_subscriptions_total);
$smarty->assign_by_ref('blog_subscriptions_list', $blog_subscriptions_list);
$smarty->assign('s', $s);
$smarty->assign('p', $page_vars[1]);
$smarty->assign('maxpage', $page_vars[2]);
$smarty->assign('p_start', $page_vars[0] + 1);
$smarty->assign('p_end', $page_vars[0] + count($blog_subscriptions_list));
include "footer.php";
示例15: se_comment
// CREATE PROFILE COMMENT OBJECT
$comments_per_page = 10;
$comment = new se_comment('article', 'article_id', $article->article_info[article_id]);
// DELETE NECESSARY COMMENTS
$start = ($p - 1) * $comments_per_page;
if($task == "delete") { $comment->comment_delete_selected($start, $comments_per_page); }
// GET TOTAL COMMENTS
$total_comments = $comment->comment_total();
// MAKE COMMENT PAGES
$page_vars = make_page($total_comments, $comments_per_page, $p);
// GET COMMENT ARRAY
$comments = $comment->comment_list($page_vars[0], $comments_per_page);
// ASSIGN VARIABLES AND DISPLAY MODERATE COMMENTS PAGE
$smarty->assign('article', $article);
$smarty->assign('comments', $comments);
$smarty->assign('total_comments', $total_comments);
$smarty->assign('p', $page_vars[1]);