當前位置: 首頁>>代碼示例>>PHP>>正文


PHP print_paginator函數代碼示例

本文整理匯總了PHP中print_paginator函數的典型用法代碼示例。如果您正苦於以下問題:PHP print_paginator函數的具體用法?PHP print_paginator怎麽用?PHP print_paginator使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了print_paginator函數的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Activity

$count  = (($page-1) * SOCIAL_GROUP_MAX) + 1;
$offset = ($page-1) * SOCIAL_GROUP_MAX;

// Get activities	
$act_obj = new Activity();
$activities = $act_obj->getActivities($id);

// Get social group class
$social_group = new SocialGroups();
$my_groups = $social_group->getMemberGroups($_SESSION['member_id']);	//to get the size
$num_pages = sizeof($my_groups)/SOCIAL_GROUP_MAX;
$my_groups = $social_group->getMemberGroups($_SESSION['member_id'], $offset);

//Display
include(AT_INCLUDE_PATH.'header.inc.php');
$savant->display('social/pubmenu.tmpl.php');

if($num_pages > 1){
?>
<div class="pageinator_box">
<?php
print_paginator($page, $num_pages, '', 1); 
?>
</div>
<?php
}
$savant->assign('my_groups', $my_groups);
$savant->display('social/sgroups.tmpl.php');
include(AT_INCLUDE_PATH.'footer.inc.php');
?>
開發者ID:radiocontrolled,項目名稱:ATutor,代碼行數:30,代碼來源:index.php

示例2: _AT

            <input type="submit" name="filter" value="<?php 
    echo _AT('filter');
    ?>
" />
            <input type="submit" name="reset_filter" value="<?php 
    echo _AT('reset_filter');
    ?>
" />
        </div>
    </div>
    </div> <!-- end #results-display -->
    </div> <!-- end #results-hide-show -->
</form>

<?php 
    print_paginator($this->page, $this->num_results, $this->page_string . SEP . $this->order . '=' . $col, $this->results_per_page);
    ?>

<form name="form" method="get" action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
">
<div class="table-surround">
<table class="data" summary="Course title, instructor, and enrollment." >
<colgroup>
    <?php 
    if ($col == 'title') {
        ?>
        <col />
        <col class="sort" />
        <col span="6" />
開發者ID:genaromendezl,項目名稱:ATutor,代碼行數:31,代碼來源:courses.tmpl.php

示例3: print_paginator

        echo "<div align='left' class='menuitems'>" . $imgs . $prevw . $rss . $doc_file . "</div><br/>";
        echo "</dd>";
    }
    echo "</dl>";
    echo "</div>";
    //paginator
    if ($maxResults1 == 0 && $orderby == 1) {
        print_paginator($start1, $total_num, "q=" . $urlforkey . SEP1 . "b=" . $_GET['b'] . SEP1 . "sf=" . $_GET['sf'], $maxResults);
    } else {
        if ($orderby == 1 && $maxResults1 > 0) {
            print_paginator($start1, $total_num, "q=" . $urlforkey . SEP1 . "b=" . $_GET['b'] . SEP1 . "sf=" . $_GET['sf'] . SEP1 . "max=" . intval($_GET['max']), $maxResults);
        } else {
            if ($maxResults1 == 0 && $orderby > 1) {
                print_paginator($start1, $total_num, "q=" . $urlforkey . SEP1 . "b=" . $_GET['b'] . SEP1 . "sf=" . $_GET['sf'] . SEP1 . "orderby=" . intval($_GET['orderby']), $maxResults);
            } else {
                print_paginator($start1, $total_num, "q=" . $urlforkey . SEP1 . "b=" . $_GET['b'] . SEP1 . "sf=" . $_GET['sf'] . SEP1 . "orderby=" . intval($_GET['orderby']) . SEP1 . "max=" . intval($_GET['max']), $maxResults);
            }
        }
    }
} else {
    echo _AT('ol_no') . "<b>" . $qry . "</b> <br/>";
}
/**
 * Get date from stored datestamp
 * @param string datestamp of unit
 * @return string date
 */
function datestamp($datestamp)
{
    $ind = strpos($datestamp, 'T');
    $date = substr($datestamp, 0, $ind);
開發者ID:herat,項目名稱:OpenLearn-Module-for-ATutor,代碼行數:31,代碼來源:result_gen.php

示例4: _AT

            <p><?php 
    echo _AT('pa_no_photos');
    ?>
</p>
        </div>
        <?php 
}
?>
        <!-- page numbers -->
        <div class="topbar">
            <?php 
if ($this->num_rows > AT_PA_PHOTOS_PER_PAGE) {
    ?>
            <div class="paginator">
                <?php 
    print_paginator($this->page, $this->num_rows, 'id=' . $this->album_info['id'], AT_PA_PHOTOS_PER_PAGE, AT_PA_PAGE_WINDOW);
    ?>
            </div>
            <?php 
}
?>
        </div>
    </div>	

    <!-- comments -->
    <div class="comment_panel">
        <div class="comment_feeds">
            <?php 
if (!empty($this->comments)) {
    ?>
            <?php 
開發者ID:genaromendezl,項目名稱:ATutor,代碼行數:31,代碼來源:pa_profile_albums.tmpl.php

示例5: AT_print

" />
<input type="hidden" name="gradebook_test_id" value="<?php 
echo AT_print($_GET[gradebook_test_id], 'input.hidden');
?>
" />
<input type="hidden" name="member_id" value="<?php 
echo AT_print($_GET[member_id], 'input.hidden');
?>
" />
<input type="hidden" name="p" value="<?php 
echo $page;
?>
" />

<?php 
print_paginator($page, $num_students, $sql_students, $results_per_page);
?>

<table summary="" class="data" rules="all">

<?php 
echo $table_head;
?>
<tfoot>
<tr>
    <td colspan="<?php 
echo count($selected_tests) + 2;
?>
">
        <div class="row buttons">
        <input type="submit" name="save" value="<?php 
開發者ID:vicentborja,項目名稱:ATutor,代碼行數:31,代碼來源:edit_marks.php

示例6: _AT

"><?php 
    echo _AT('jb_subscribe');
    ?>
</a>
</div>
<?php 
}
print_paginator($page, sizeof($all_job_posts), $search_string . SEP . $page_string, AT_JB_ROWS_PER_PAGE);
?>
</div>
<?php 
$savant->assign('job_posts', $current_job_posts);
$savant->assign('bookmark_posts', $bookmark_posts);
$savant->assign('job_obj', $job);
$savant->display('jb_index.tmpl.php');
print_paginator($page, sizeof($all_job_posts), $search_string . SEP . $page_string, AT_JB_ROWS_PER_PAGE);
?>
</div>

<script type="text/javascript" >
    function toggleAdvanceSearch(){
        var box_state = jQuery('.jb_advance_search').css('display');
        if (box_state == 'none'){
            jQuery('.jb_advance_search').css('display', 'block');
        } else {
            jQuery('.jb_advance_search').css('display', 'none');
        }
    }
</script>

<?php 
開發者ID:jorge683,項目名稱:job_board,代碼行數:31,代碼來源:index.php

示例7: _AT

        <div class="row buttons">
            <input type="submit" name="filter" value="<?php 
echo _AT('filter');
?>
" />
            <input type="submit" name="reset_filter" value="<?php 
echo _AT('reset_filter');
?>
" />
        </div>
    </fieldset>
    </div>
</form>

<?php 
print_paginator($this->page, $this->tab_counts[$this->current_tab], $this->page_string_w_tab . SEP . $this->order . '=' . $this->col, $this->results_per_page);
?>

<form method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" name="selectform">
<input type="hidden" name="tab" value="<?php 
echo $this->current_tab;
?>
" />
<input type="hidden" name="course_id" value="<?php 
echo $this->course_id;
?>
"/>
開發者ID:genaromendezl,項目名稱:ATutor,代碼行數:30,代碼來源:index.tmpl.php

示例8: Member

        ?>
</div>
            <div>
                <?php 
        $member_obj = new Member($id);
        $profile = $member_obj->getAddress();
        echo printSocialName($id) . '<br/>';
        echo $profile['country'] . ' ' . $profile['province'] . '<br/>';
        ?>
            </div>
            <div style="clear:both;"></div><br/>
        </div>	
    </div>
    <?php 
    }
} else {
    echo _AT('none_found');
}
?>
    </div>
    <!--
    <div style="float:right;">
        [-- TODO: Paginator --]
    </div>
    -->
</div>
</div>
<div style="clear:both;"></div>
<?php 
print_paginator($this->page, $this->num_pages, 'search_friends=' . $this->search_field, 1);
開發者ID:genaromendezl,項目名稱:ATutor,代碼行數:30,代碼來源:index_public.tmpl.php

示例9: _AT

?>
" />
            </p></td>
        </tr>
        </table>
    </fieldset>
</form>
</div>
    
<div id="output_div" class="input-form">
<fieldset class="group_form"><legend class="group_form"><?php 
echo _AT("users");
?>
</legend>
<?php 
print_paginator($this->page, $this->num_results, $this->page_string . htmlspecialchars(SEP) . $this->order . '=' . $this->col, $this->results_per_page);
?>

<form name="form" method="get" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
<input type="hidden" name="status" value="<?php 
echo $_GET['status'];
?>
" />
<input type="hidden" name="search" value="<?php 
echo htmlspecialchars($_GET['search']);
?>
" />
<input type="hidden" name="include" value="<?php 
開發者ID:harriswong,項目名稱:AContent,代碼行數:31,代碼來源:index.tmpl.php

示例10: max

            foreach ($this->result_list['error'] as $error)
                echo $error."<br />";
        }
        echo "</span>";
    }
    else  // success, display results
    {
        if (is_array($this->result_list))
        {
            $num_results = $this->result_list["summary"]["numOfTotalResults"];
            $num_pages = max(ceil($num_results / $this->results_per_page), 1);
            
            echo '	<div id="search_results">';
            echo "		<h2>". _AT('results')." <small>(".$this->startRecNumber. " - " .$this->result_list["summary"]["lastResultNumber"]." out of ".$num_results.")</small></h2>";
    
            print_paginator($page, $num_results, htmlspecialchars($this-> page_str), $this->results_per_page);
    
            foreach ($this->result_list as $key=>$result)
            {
                if (is_int($key))
                {
    ?>
    
    <dl class="browse-result">
<?php if (isset($this->instructor_role)) { ?>
        <dt class="tr_results_tools">
          <a href="<?php echo AT_TILE_EXPORT_CP_URL.$result['courseID']; ?>">
            <img src="<?php echo AT_BASE_HREF. 'images/download.png'?>" alt="<?php echo _AT('download_content_package'); ?>" title="<?php echo _AT("download_content_package").' '.$result['title']; ?>" border="0">
          </a>&nbsp;
          <a href="mods/_standard/tile_search/import.php?tile_course_id=<?php echo $result['courseID']; ?>&title=<?php echo urlencode($result['title']); ?>">
            <img src="<?php echo AT_BASE_HREF. 'images/archive.gif'?>" alt="<?php echo _AT('import'); ?>" title="<?php echo _AT("import").' '.$result['title']; ?>" border="0">
開發者ID:radiocontrolled,項目名稱:ATutor,代碼行數:31,代碼來源:index.tmpl.php

示例11: _AT

    }
    ?>
        <?php 
} else {
    ?>
        <div class="album">
            <p><?php 
    echo _AT('pa_no_album');
    ?>
</p>
        </div>
        <?php 
}
?>
        <!-- end loop -->
        <!-- page numbers -->
        <?php 
if ($this->num_rows > AT_PA_ALBUMS_PER_PAGE) {
    ?>
        <div class="topbar">
            <div class="paginator">
                <?php 
    print_paginator($this->page, $this->num_rows, 'type=' . $this->type, AT_PA_ALBUMS_PER_PAGE, AT_PA_PAGE_WINDOW);
    ?>
            </div>
        </div>
        <?php 
}
?>
    </div>	
</div>
開發者ID:genaromendezl,項目名稱:ATutor,代碼行數:31,代碼來源:pa_index.tmpl.php

示例12: _AT

        ?>
" title="<?php 
        echo _AT('download_common_cartridge');
        ?>
" border="0" />
          </a>

        <div><?php 
        echo $description;
        ?>
</div>
      </li>				
<?php 
    }
    // end of foreach;
    ?>
    </ol>
<?php 
    print_paginator($this->curr_page_num, $num_results, $url_param, RESULTS_PER_PAGE);
    ?>
  </div>
<?php 
} else {
    //	echo _AT("no_results_for_keywords", $this->search_text);
    echo _AT("none_found");
}
// end of else
?>
</fieldset>
</div>
開發者ID:harriswong,項目名稱:AContent,代碼行數:30,代碼來源:index_course.tmpl.php

示例13: sizeof

    $search_result = $social_groups->search($query);
    $num_pages = sizeof($search_result) / SOCIAL_GROUP_MAX;
    $search_result = $social_groups->search($query, $offset);
}
/*elseif(empty($_POST['search_groups_'.$rand_key])) {
    $msg->addError('CANNOT_BE_EMPTY');
} */
//Generate a random number for the search input name fields, so that the browser will not remember any previous entries.
$rand = md5(rand(0, time()));
if ($rand_key != '') {
    $last_search = $_REQUEST['search_groups_' . $rand_key];
} else {
    $last_search = $_REQUEST['search_groups_' . $rand];
}
//take out double quotes until there is a way to escape XSS from the ajax script.
$last_search = preg_replace('/\\"/', '', $last_search);
//Display
include AT_INCLUDE_PATH . 'header.inc.php';
$savant->display('social/pubmenu.tmpl.php');
?>
<div class="pageinator_box">
<?php 
print_paginator($page, $num_pages, 'search_groups_' . $rand_key . '=' . $query . SEP . 'rand_key=' . $rand_key, 1);
?>
</div>
<?php 
$savant->assign('rand_key', $rand);
$savant->assign('last_search', $last_search);
$savant->assign('search_result', $search_result);
$savant->display('social/sgroup_search.tmpl.php');
include AT_INCLUDE_PATH . 'footer.inc.php';
開發者ID:genaromendezl,項目名稱:ATutor,代碼行數:31,代碼來源:search.php


注:本文中的print_paginator函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。