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


PHP paging::getPagingArray方法代碼示例

本文整理匯總了PHP中paging::getPagingArray方法的典型用法代碼示例。如果您正苦於以下問題:PHP paging::getPagingArray方法的具體用法?PHP paging::getPagingArray怎麽用?PHP paging::getPagingArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在paging的用法示例。


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

示例1: range

         // Pass the total number of results to the $pages object
         $media->getMediaDetails();
         // Run the getMediaDetails function to grab all the media file details
         $mediaArray = $media->getMediaArray();
         // Get the array of media
         $thumbMediaDetailsArray = $media->getDetailsFields('thumb');
         // Get thumb details
         $smarty->assign('thumbMediaDetails', $thumbMediaDetailsArray);
         $smarty->assign('mediaRows', $returnRows);
         $smarty->assign('mediaArray', $mediaArray);
     }
     /*
      * Get paging info and pass it to smarty
      */
     //$mediaPages->setTotalResults($returnRows); // Pass the total number of results to the $pages object
     $mediaPagingArray = $mediaPages->getPagingArray();
     $mediaPagingArray['pageNumbers'] = range(0, $mediaPagingArray['totalPages']);
     unset($mediaPagingArray['pageNumbers'][0]);
     // Remove the 0 element from the beginning of the array
     $smarty->assign('mediaPaging', $mediaPagingArray);
     $smarty->assign('resultsArray', $_SESSION['searchForm']['resultsArray']);
     // xxxxxx for testing
     //}
 }
 if (!$_SESSION['searchForm']['inSearch'] or !$returnRows) {
     $tagCloudResult = mysqli_query($db, "SELECT *,COUNT(key_id) AS keycounter FROM {$dbinfo[pre]}keywords GROUP BY keyword ORDER BY keycounter DESC LIMIT 300");
     // xxxxxxxxx Language
     $tagCloudCount = mysqli_num_rows($tagCloudResult);
     while ($tag = mysqli_fetch_assoc($tagCloudResult)) {
         $tagsArray[$tag['key_id']] = $tag;
         $tagsArray[$tag['key_id']]['count'] = $tag['keycounter'];
開發者ID:spencerlambert,項目名稱:willie-php,代碼行數:31,代碼來源:search.bu.php

示例2: range

         $thumbMediaDetailsArray = $media->getDetailsFields('thumb');
         $smarty->assign('thumbMediaDetails', $thumbMediaDetailsArray);
         $smarty->assign('mediaRows', $returnRows);
         $smarty->assign('mediaArray', $mediaArray);
     }
     /*
      * Get paging info and pass it to smarty
      */
     $mediaPagingArray = $mediaPages->getPagingArray();
     //print_r($mediaPagingArray); exit; // Testing
     $mediaPagingArray['pageNumbers'] = range(0, $mediaPagingArray['totalPages']);
     unset($mediaPagingArray['pageNumbers'][0]);
     // Remove the 0 element from the beginning of the array
     $smarty->assign('mediaPaging', $mediaPagingArray);
 }
 $galleryPagingArray = $galleryPages->getPagingArray();
 $galleryPagingArray['pageNumbers'] = range(0, $galleryPagingArray['totalPages']);
 unset($galleryPagingArray['pageNumbers'][0]);
 // Remove the 0 element from the beginning of the array
 $smarty->assign('galleryPaging', $galleryPagingArray);
 if ($_SESSION['currentMode'] == 'lightbox' or $mode == 'lightbox') {
     $smarty->assign('id', $_SESSION['id']);
 } else {
     if ($config['EncryptIDs']) {
         $smarty->assign('id', k_encrypt($_SESSION['id']));
     } else {
         $smarty->assign('id', $_SESSION['id']);
     }
     // Pass a gallery id or a contributor id
 }
 $smarty->assign('startrec', $mediaStartRecord);
開發者ID:spencerlambert,項目名稱:willie-php,代碼行數:31,代碼來源:gallery.php


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