当前位置: 首页>>代码示例>>PHP>>正文


PHP Pagination::page方法代码示例

本文整理汇总了PHP中Pagination::page方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::page方法的具体用法?PHP Pagination::page怎么用?PHP Pagination::page使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pagination的用法示例。


在下文中一共展示了Pagination::page方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: calculate

 /**
  * @param int $page
  * @param int $end
  * @param bool $allRecords
  */
 public static function calculate($page, $end = 20, $allRecords = false)
 {
     self::$page = intval($page);
     self::$countPage = ceil($allRecords / $end);
     self::$end = $end;
     self::$allRecords = $allRecords;
     if (self::$page <= 1 or self::$page > self::$countPage) {
         self::$page = 1;
         self::$start = 0;
     } else {
         self::$start = (self::$page - 1) * self::$end;
     }
 }
开发者ID:terrasystems,项目名称:csgobattlecom,代码行数:18,代码来源:Pagination.php

示例2: testMethods

 public function testMethods()
 {
     $this->assertInstanceOf('Pagination', $this->pagination);
     $this->assertEquals(100, $this->pagination->countItems());
     $this->assertEquals(10, $this->pagination->limit());
     $this->assertEquals(10, $this->pagination->countPages());
     $this->assertTrue($this->pagination->hasPages());
     $this->assertEquals(1, $this->pagination->page());
     $this->assertEquals(0, $this->pagination->offset());
     $this->assertEquals(1, $this->pagination->firstPage());
     $this->assertEquals(10, $this->pagination->lastPage());
     $this->assertTrue($this->pagination->isFirstPage());
     $this->assertFalse($this->pagination->isLastPage());
     $this->assertEquals(1, $this->pagination->prevPage());
     $this->assertFalse($this->pagination->hasPrevPage());
     $this->assertEquals(2, $this->pagination->nextPage());
     $this->assertTrue($this->pagination->hasNextPage());
     $this->assertEquals(1, $this->pagination->numStart());
     $this->assertEquals(10, $this->pagination->numEnd());
     $this->assertEquals($this->url, $this->pagination->firstPageURL());
     $this->assertEquals($this->url, $this->pagination->prevPageURL());
     $this->assertEquals($this->url . '/page:3', $this->pagination->pageURL(3));
     $this->assertEquals($this->url . '/page:5', $this->pagination->pageURL(5));
     $this->assertEquals($this->url . '/page:10', $this->pagination->lastPageURL());
     $this->assertEquals($this->url . '/page:2', $this->pagination->nextPageURL());
     $pagination = new Pagination($this->data, 20, array('url' => $this->url, 'variable' => 'seite', 'method' => 'query'));
     $this->assertEquals($this->url . '/?seite=3', $pagination->pageURL(3));
     $this->assertEquals($this->url . '/?seite=5', $pagination->pageURL(5));
     $this->assertEquals($this->url, $pagination->firstPageURL());
     $this->assertEquals($this->url . '/?seite=5', $pagination->lastPageURL());
     $this->assertEquals($this->url, $pagination->prevPageURL());
     $this->assertEquals($this->url . '/?seite=2', $pagination->nextPageURL());
     // test the new page option
     $pagination = new Pagination(200, 20, array('page' => 2));
     $this->assertEquals(2, $pagination->page());
 }
开发者ID:LucasFyl,项目名称:korakia,代码行数:36,代码来源:PaginationTest.php

示例3: getContent


//.........这里部分代码省略.........
                         $sqlLabelSearch = " AND ( {$sqlLabelSearch} ) ";
                     }
                 }
                 // Init Group By
                 if (array_key_exists('gby', $params['GET']) && is_numeric($params['GET']['gby']) && $params['GET']['gby'] < 300) {
                     $per = $params['GET']['gby'];
                     $urlGroupBy = '&gby=' . $per;
                 }
                 // Init count total fields
                 $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery, $nextCondition);
                 // Init categorie
                 $sqlCategorie = '';
                 // Init sort
                 $getDesc = 'ASC';
                 $getSort = '&desc';
                 if (isset($_GET['desc'])) {
                     $getDesc = 'DESC';
                     $getSort = '&asc';
                     $urlSort = '&desc';
                 }
                 // Init filter for order by
                 $outFilterORDER = $tableName . '_traduction.titre  ' . $getDesc;
                 $getFilter = '';
                 if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                     $getFilter = $params['GET']['orderby'];
                     if (in_array($getFilter, $isFieldTraductionArray)) {
                         $outFilterORDER = $tableName . '_traduction.' . $getFilter . '  ' . $getDesc;
                     } else {
                         $outFilterORDER = $tableName . $getFilter . '  ' . $getDesc;
                     }
                     $urlOrderby = '&orderby=' . $getFilter;
                 }
                 // Init page position
                 if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                     $p = $params['GET']['page'];
                     $ini = $p * $per - $per;
                 }
                 $finalPer = $ini + $per;
                 if ($finalPer > $cResultsInt) {
                     $finalPer = $cResultsInt;
                 }
                 // Create sql query for transaction
                 $outSqlGroupe = " WHERE 1=1 " . $sqlLabelSearch;
                 $sqlLimit = " {$outSqlGroupe} AND " . $this->doorGets->Table . ".id = " . $this->doorGets->Table . "_traduction.id_module AND langue = '{$lgActuel}' {$nextCondition} ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $per;
                 // Create url to go for pagination
                 $urlPage = "./?controller=" . $this->doorGets->controllerNameNow() . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                 $urlPagePosition = "./?controller=" . $this->doorGets->controllerNameNow() . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                 // Generate the pagination system
                 $valPage = '';
                 if ($cResultsInt > $per) {
                     $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                 }
                 $tAll = " " . $this->doorGets->Table . ", " . $this->doorGets->Table . "_traduction";
                 // Select all contents / Query SQL
                 $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                 $cAll = count($all);
                 /**********
                  *
                  *  Start block creation for listing fields
                  * 
                  **********/
                 $block = new BlockTable();
                 $imgTop = '<div class="d-top"></div>';
                 $imgBottom = '<div class="d-bottom"></div>';
                 $block->setClassCss('doorgets-listing');
                 $iPos = 0;
开发者ID:doorgets,项目名称:cms,代码行数:67,代码来源:widgetsView.php

示例4: getContent


//.........这里部分代码省略.........
                     }
                     // préparation de la requête mysql
                     if (!empty($sqlLabelSearch)) {
                         $sqlLabelSearch = substr($sqlLabelSearch, 0, -4);
                         $sqlLabelSearch = " AND ( {$sqlLabelSearch} ) ";
                     }
                 }
                 // Init Group By
                 if (array_key_exists('gby', $params['GET']) && is_numeric($params['GET']['gby']) && $params['GET']['gby'] < 300) {
                     $per = $params['GET']['gby'];
                     $urlGroupBy = '&gby=' . $per;
                 }
                 // Init count total fields
                 $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery);
                 // Init categorie
                 $sqlCategorie = '';
                 // Init sort
                 $getDesc = 'DESC';
                 $getSort = '&asc';
                 if (isset($_GET['asc'])) {
                     $getDesc = 'ASC';
                     $getSort = '&desc';
                     $urlSort = '&asc';
                 }
                 // Init filter for order by
                 $outFilterORDER = $tableName . '.date_creation  ' . $getDesc;
                 $getFilter = '';
                 if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                     $getFilter = $params['GET']['orderby'];
                     $outFilterORDER = $tableName . '.' . $getFilter . '  ' . $getDesc;
                     $urlOrderby = '&orderby=' . $getFilter;
                 }
                 // Init page position
                 if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                     $p = $params['GET']['page'];
                     $ini = $p * $per - $per;
                 }
                 $finalPer = $ini + $per;
                 if ($finalPer > $cResultsInt) {
                     $finalPer = $cResultsInt;
                 }
                 // Create sql query for transaction
                 $outSqlGroupe = " WHERE 1=1 " . $sqlLabelSearch;
                 $sqlLimit = " {$outSqlGroupe} ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $finalPer;
                 // Create url to go for pagination
                 $urlPage = "./?controller=emailing" . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                 $urlPagePosition = "./?controller=emailing" . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                 // Generate the pagination system
                 $valPage = '';
                 if ($cResultsInt > $per) {
                     $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                 }
                 // Select all contents / Query SQL
                 $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                 $cAll = count($all);
                 /**********
                  *
                  *  Start block creation for listing fields
                  * 
                  **********/
                 $block = new BlockTable();
                 $imgTop = '<div class="d-top"></div>';
                 $imgBottom = '<div class="d-bottom"></div>';
                 $block->setClassCss('doorgets-listing');
                 $iPos = 0;
                 $dgSelMass = '';
开发者ID:neoartdoo,项目名称:CMS,代码行数:67,代码来源:emailingView.php

示例5: getContent


//.........这里部分代码省略.........
                     }
                     // Init count total fields
                     $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery);
                     // Init categorie
                     $sqlCategorie = '';
                     if (array_key_exists('categorie', $params['GET']) && !empty($params['GET']['categorie']) && array_key_exists($params['GET']['categorie'], $this->doorGets->categorieSimple)) {
                         $getCategorie = $params['GET']['categorie'];
                         $arrForCountSearchQuery[] = array('key' => $this->doorGets->Table . '.categorie', 'type' => 'like', 'value' => '#' . $getCategorie . ',');
                         $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery);
                         $sqlCategorie = " AND " . $this->doorGets->Table . ".categorie LIKE '%#" . $getCategorie . ",%'";
                         $urlCategorie = '&categorie=' . $getCategorie;
                     }
                     // Init sort
                     $getDesc = 'DESC';
                     $getSort = '&asc';
                     if (isset($_GET['asc'])) {
                         $getDesc = 'ASC';
                         $getSort = '&desc';
                         $urlSort = '&asc';
                     }
                     // Init filter for order by
                     $outFilterORDER = $this->doorGets->Table . '_traduction.date_modification  ' . $getDesc;
                     $getFilter = '';
                     if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                         $getFilter = $params['GET']['orderby'];
                         $outFilterORDER = $this->doorGets->Table . '_traduction.' . $getFilter . '  ' . $getDesc;
                         // Execption for field that not in traduction table
                         if (in_array($getFilter, $isInClassicTable)) {
                             $outFilterORDER = $this->doorGets->Table . '.' . $getFilter . '  ' . $getDesc;
                         }
                         $urlOrderby = '&orderby=' . $getFilter;
                     }
                     // Init page position
                     if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                         $p = $params['GET']['page'];
                         $ini = $p * $per - $per;
                     }
                     $finalPer = $ini + $per;
                     if ($finalPer > $cResultsInt) {
                         $finalPer = $cResultsInt;
                     }
                     // Create sql query for transaction
                     $outSqlGroupe = " WHERE " . $this->doorGets->Table . "_traduction.id_content = " . $this->doorGets->Table . ".id\n                        AND " . $this->doorGets->Table . "_traduction.langue = '" . $lgActuel . "' " . $sqlCategorie . " " . $sqlUserOther . " " . $sqlLabelSearch;
                     $sqlLimit = " {$outSqlGroupe} ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $per;
                     // Create url to go for pagination
                     $urlPage = "./?controller=module" . $moduleInfos['type'] . "&uri=" . $this->doorGets->Uri . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                     $urlPagePosition = "./?controller=module" . $moduleInfos['type'] . "&uri=" . $this->doorGets->Uri . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                     // Generate the pagination system
                     $valPage = '';
                     if ($cResultsInt > $per) {
                         $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                     }
                     // Select all contents / Query SQL
                     $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                     $cAll = count($all);
                     /**********
                      *
                      *  Start block creation for listing fields
                      * 
                      **********/
                     $block = new BlockTable();
                     $imgTop = '<div class="d-top"></div>';
                     $imgBottom = '<div class="d-bottom"></div>';
                     $block->setClassCss('doorgets-listing');
                     $iPos = 0;
                     $dgSelMass = '';
开发者ID:doorgets,项目名称:cms,代码行数:67,代码来源:doorGetsUserModuleOrderView.php

示例6: getContent


//.........这里部分代码省略.........
                     // préparation de la requête mysql
                     if (!empty($sqlLabelSearch)) {
                         $sqlLabelSearch = substr($sqlLabelSearch, 0, -4);
                         $sqlLabelSearch = " AND ( {$sqlLabelSearch} ) ";
                     }
                 }
                 // Init Group By
                 if (array_key_exists('gby', $params['GET']) && is_numeric($params['GET']['gby']) && $params['GET']['gby'] < 300) {
                     $per = $params['GET']['gby'];
                     $urlGroupBy = '&gby=' . $per;
                 }
                 // Init count total fields
                 $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery, $sqlInboxUser);
                 //if (empty($myActivatedInboxUri)) { $cResultsInt = 0; }
                 // Init categorie
                 $sqlCategorie = '';
                 // Init sort
                 $getDesc = 'DESC';
                 $getSort = '&asc';
                 if (isset($_GET['asc'])) {
                     $getDesc = 'ASC';
                     $getSort = '&desc';
                     $urlSort = '&asc';
                 }
                 // Init filter for order by
                 $outFilterORDER = $tableName . '.date_creation  ' . $getDesc;
                 $getFilter = '';
                 if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                     $getFilter = $params['GET']['orderby'];
                     $outFilterORDER = $tableName . '.' . $getFilter . '  ' . $getDesc;
                     $urlOrderby = '&orderby=' . $getFilter;
                 }
                 // Init page position
                 if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                     $p = $params['GET']['page'];
                     $ini = $p * $per - $per;
                 }
                 $finalPer = $ini + $per;
                 if ($finalPer > $cResultsInt) {
                     $finalPer = $cResultsInt;
                 }
                 // Create sql query for transaction
                 $outSqlGroupe = " WHERE {$tableName}.id_user = " . $User['id'] . " AND {$tableName}.user_delete = 0 " . $sqlInboxUser . " " . $sqlLabelSearch;
                 $sqlLimit = " {$outSqlGroupe} ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $per;
                 // Create url to go for pagination
                 $urlPage = "./?controller=" . $this->doorGets->controllerNameNow() . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                 $urlPagePosition = "./?controller=" . $this->doorGets->controllerNameNow() . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                 // Generate the pagination system
                 $valPage = '';
                 if ($cResultsInt > $per) {
                     $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                 }
                 // Select all contents / Query SQL
                 $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                 $cAll = count($all);
                 /**********
                  *
                  *  Start block creation for listing fields
                  * 
                  **********/
                 $block = new BlockTable();
                 $imgTop = '<div class="d-top"></div>';
                 $imgBottom = '<div class="d-bottom"></div>';
                 $block->setClassCss('doorgets-listing');
                 $iPos = 0;
                 $dgSelMass = '';
开发者ID:neoartdoo,项目名称:CMS,代码行数:67,代码来源:myinboxView.php

示例7: getContent


//.........这里部分代码省略.........
                         }
                     }
                     // préparation de la requête mysql
                     if (!empty($sqlLabelSearch)) {
                         $sqlLabelSearch = substr($sqlLabelSearch, 0, -4);
                         $sqlLabelSearch = " AND ( {$sqlLabelSearch} ) ";
                     }
                 }
                 // Init Group By
                 if (array_key_exists('gby', $params['GET']) && is_numeric($params['GET']['gby']) && $params['GET']['gby'] < 300) {
                     $per = $params['GET']['gby'];
                 }
                 // Init count total fields
                 $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery, '', ' OR ');
                 // Init categorie
                 $sqlCategorie = '';
                 // Init sort
                 $getDesc = 'DESC';
                 $getSort = '&asc';
                 if (isset($_GET['asc'])) {
                     $getDesc = 'ASC';
                     $getSort = '&desc';
                     $urlSort = '&asc';
                 }
                 // Init filter for order by
                 $outFilterORDER = $tableName . '.date_creation  ' . $getDesc;
                 $getFilter = '';
                 if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                     $getFilter = $params['GET']['orderby'];
                     $outFilterORDER = $tableName . '.' . $getFilter . '  ' . $getDesc;
                     $urlOrderby = '&orderby=' . $getFilter;
                 }
                 // Init page position
                 if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                     $p = $params['GET']['page'];
                     $ini = $p * $per - $per;
                 }
                 $finalPer = $ini + $per;
                 if ($finalPer > $cResultsInt) {
                     $finalPer = $cResultsInt;
                 }
                 // Create sql query for transaction
                 $outSqlGroupe = " WHERE {$sqlLabelSearchModo} " . $sqlLabelSearch;
                 $sqlLimit = " {$outSqlGroupe} ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $per;
                 // Create url to go for pagination
                 $urlPage = "./?controller=users" . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                 $urlPagePosition = "./?controller=users" . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                 // Generate the pagination system
                 $valPage = '';
                 if ($cResultsInt > $per) {
                     $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                 }
                 // Select all contents / Query SQL
                 $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                 $cAll = count($all);
                 /**********
                  *
                  *  Start block creation for listing fields
                  * 
                  **********/
                 $block = new BlockTable();
                 $imgTop = '<div class="d-top"></div>';
                 $imgBottom = '<div class="d-bottom"></div>';
                 $block->setClassCss('doorgets-listing');
                 $iPos = 0;
                 $dgSelMass = '';
开发者ID:neoartdoo,项目名称:CMS,代码行数:67,代码来源:usersView.php

示例8: getContent


//.........这里部分代码省略.........
                        }
                        // préparation de la requête mysql
                        if (!empty($sqlLabelSearch)) {
                            $sqlLabelSearch = substr($sqlLabelSearch, 0, -4);
                            $sqlLabelSearch = " AND ( {$sqlLabelSearch} ) ";
                        }
                    }
                    // Init Group By
                    if (array_key_exists('gby', $params['GET']) && is_numeric($params['GET']['gby']) && $params['GET']['gby'] < 300) {
                        $per = $params['GET']['gby'];
                        $urlGroupBy = '&gby=' . $per;
                    }
                    // Init count total fields
                    $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery, 'WHERE ' . $sqlUserOther . ' ' . $sqlInboxUser . ' ' . $sqlLabelSearch, ' OR ');
                    // Init categorie
                    $sqlCategorie = '';
                    // Init sort
                    $getDesc = 'DESC';
                    $getSort = '&asc';
                    if (isset($_GET['asc'])) {
                        $getDesc = 'ASC';
                        $getSort = '&desc';
                        $urlSort = '&asc';
                    }
                    // Init filter for order by
                    $outFilterORDER = $tableName . '.date_creation  ' . $getDesc;
                    $getFilter = '';
                    if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                        $getFilter = $params['GET']['orderby'];
                        $outFilterORDER = $tableName . '.' . $getFilter . '  ' . $getDesc;
                        $urlOrderby = '&orderby=' . $getFilter;
                    }
                    // Init page position
                    if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                        $p = $params['GET']['page'];
                        $ini = $p * $per - $per;
                    }
                    $finalPer = $ini + $per;
                    if ($finalPer > $cResultsInt) {
                        $finalPer = $cResultsInt;
                    }
                    // Create sql query for transaction
                    $outSqlGroupe = " WHERE {$sqlUserOther} " . $sqlInboxUser . " " . $sqlLabelSearch;
                    $sqlLimit = "  {$outSqlGroupe} ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $per;
                    // Create url to go for pagination
                    $urlPage = "./?controller=" . $this->doorGets->controllerNameNow() . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                    $urlPagePosition = "./?controller=" . $this->doorGets->controllerNameNow() . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                    // Generate the pagination system
                    $valPage = '';
                    if ($cResultsInt > $per) {
                        $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                    }
                    // Select all contents / Query SQL
                    $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                    $cAll = count($all);
                    /**********
                     *
                     *  Start block creation for listing fields
                     * 
                     **********/
                    $block = new BlockTable();
                    $imgTop = '<div class="d-top"></div>';
                    $imgBottom = '<div class="d-bottom"></div>';
                    $block->setClassCss('doorgets-listing-tickets');
                    $iPos = 0;
                    $dgSelMass = '';
开发者ID:doorgets,项目名称:cms,代码行数:67,代码来源:supportView.php

示例9: getContent


//.........这里部分代码省略.........
                         $sqlLabelSearch = substr($sqlLabelSearch, 0, -4);
                         $sqlLabelSearch = " AND ( {$sqlLabelSearch} ) ";
                     }
                 }
                 // Init Group By
                 if (array_key_exists('gby', $params['GET']) && is_numeric($params['GET']['gby']) && $params['GET']['gby'] < 300) {
                     $per = $params['GET']['gby'];
                     $urlGroupBy = '&gby=' . $per;
                 }
                 // Init count total fields
                 $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery, $sqlMediaOther);
                 // Init categorie
                 $sqlCategorie = '';
                 // Init sort
                 $getDesc = 'DESC';
                 $getSort = '&asc';
                 if (isset($_GET['asc'])) {
                     $getDesc = 'ASC';
                     $getSort = '&desc';
                     $urlSort = '&asc';
                 }
                 // Init filter for order by
                 $outFilterORDER = $this->doorGets->Table . '.date_creation  ' . $getDesc;
                 $getFilter = '';
                 if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                     $getFilter = $params['GET']['orderby'];
                     if ($getFilter === 'title') {
                         $getFilter = 'date_creation';
                     }
                     $outFilterORDER = $this->doorGets->Table . '.' . $getFilter . '  ' . $getDesc;
                     $urlOrderby = '&orderby=' . $getFilter;
                 }
                 // Init page position
                 if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                     $p = $params['GET']['page'];
                     $ini = $p * $per - $per;
                 }
                 $finalPer = $ini + $per;
                 if ($finalPer > $cResultsInt) {
                     $finalPer = $cResultsInt;
                 }
                 // Create sql query for transaction
                 $outSqlGroupe = " WHERE " . $this->doorGets->Table . ".id = " . $this->doorGets->Table . "_traduction.id_file AND " . $this->doorGets->Table . "_traduction.langue ='{$lgActuel}' " . $sqlMediaOther . $sqlLabelSearch;
                 $sqlLimit = " {$outSqlGroupe} ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $per;
                 // Create url to go for pagination
                 $urlPage = "./?controller=" . $this->doorGets->controllerNameNow() . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                 $urlPagePosition = "./?controller=" . $this->doorGets->controllerNameNow() . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                 // Generate the pagination system
                 $valPage = '';
                 if ($cResultsInt > $per) {
                     $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                 }
                 // Select all contents / Query SQL
                 $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                 $cAll = count($all);
                 /**********
                  *
                  *  Start block creation for listing fields
                  * 
                  **********/
                 $block = new BlockTable();
                 $imgTop = '<div class="d-top"></div>';
                 $imgBottom = '<div class="d-bottom"></div>';
                 $block->setClassCss('doorgets-listing');
                 $iPos = 0;
                 $dgSelMass = '';
开发者ID:doorgets,项目名称:cms,代码行数:67,代码来源:mediaView.php

示例10: getContent


//.........这里部分代码省略.........
                     }
                     // Init count total fields
                     $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery);
                     // Init categorie
                     $sqlCategorie = '';
                     if (array_key_exists('categorie', $params['GET']) && !empty($params['GET']['categorie']) && array_key_exists($params['GET']['categorie'], $this->doorGets->categorieSimple)) {
                         $getCategorie = $params['GET']['categorie'];
                         $arrForCountSearchQuery[] = array('key' => $this->doorGets->Table . '.categorie', 'type' => 'like', 'value' => '#' . $getCategorie . ',');
                         $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery);
                         $sqlCategorie = " AND " . $this->doorGets->Table . ".categorie LIKE '%#" . $getCategorie . ",%'";
                         $urlCategorie = '&categorie=' . $getCategorie;
                     }
                     // Init sort
                     $getDesc = 'DESC';
                     $getSort = '&asc';
                     if (isset($_GET['asc'])) {
                         $getDesc = 'ASC';
                         $getSort = '&desc';
                         $urlSort = '&asc';
                     }
                     // Init filter for order by
                     $outFilterORDER = $this->doorGets->Table . '.date_creation  ' . $getDesc;
                     $getFilter = '';
                     if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                         $getFilter = $params['GET']['orderby'];
                         $outFilterORDER = $this->doorGets->Table . '.' . $getFilter . '  ' . $getDesc;
                         // Execption for field that not in traduction table
                         if (in_array($getFilter, $isInClassicTable)) {
                             $outFilterORDER = $this->doorGets->Table . '.' . $getFilter . '  ' . $getDesc;
                         }
                         $urlOrderby = '&orderby=' . $getFilter;
                     }
                     // Init page position
                     if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                         $p = $params['GET']['page'];
                         $ini = $p * $per - $per;
                     }
                     $finalPer = $ini + $per;
                     if ($finalPer > $cResultsInt) {
                         $finalPer = $cResultsInt;
                     }
                     // Create sql query for transaction
                     $outSqlGroupe = $sqlLabelSearch;
                     $sqlLimit = " {$outSqlGroupe} ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $per;
                     // Create url to go for pagination
                     $urlPage = "./?controller=module" . $moduleInfos['type'] . "&uri=" . $this->doorGets->Uri . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                     $urlPagePosition = "./?controller=module" . $moduleInfos['type'] . "&uri=" . $this->doorGets->Uri . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                     // Generate the pagination system
                     $valPage = '';
                     if ($cResultsInt > $per) {
                         $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                     }
                     // Select all contents / Query SQL
                     $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                     $cAll = count($all);
                     /**********
                      *
                      *  Start block creation for listing fields
                      * 
                      **********/
                     $block = new BlockTable();
                     $imgTop = '<div class="d-top"></div>';
                     $imgBottom = '<div class="d-bottom"></div>';
                     $block->setClassCss('doorgets-listing');
                     $iPos = 0;
                     $dgSelMass = '';
开发者ID:doorgets,项目名称:cms,代码行数:67,代码来源:modulegenformView.php

示例11: getContent

 public function getContent()
 {
     $out = '';
     $tableName = '_moderation';
     $lgActuel = $this->doorGets->getLangueTradution();
     $controllerName = $this->doorGets->controllerNameNow();
     $User = $this->doorGets->user;
     $Rubriques = array('index' => $this->doorGets->__('Index de la page'));
     $lgActuel = $this->doorGets->getLangueTradution();
     $params = $this->doorGets->Params();
     if (array_key_exists($this->Action, $Rubriques)) {
         switch ($this->Action) {
             case 'index':
                 $q = '';
                 $urlSearchQuery = '';
                 $p = 1;
                 $ini = 0;
                 $per = 50;
                 $params = $this->doorGets->Params();
                 $lgActuel = $this->doorGets->getLangueTradution();
                 $isFieldArray = array("id" => $this->doorGets->__('id'), "pseudo" => $this->doorGets->__('Pseudo'), "type_module" => $this->doorGets->__('Module'), "action" => $this->doorGets->__('Action'), "date_creation" => $this->doorGets->__('Date'));
                 $isFieldArraySort = array('id', 'pseudo', 'type_module', 'action', 'date_creation');
                 $isFieldArraySearchInput = array('id', 'pseudo', 'type_module', 'action', 'date_creation');
                 $isFieldArraySearch = array('id', 'pseudo', 'type_module', 'action', 'date_creation_start', 'date_creation_end');
                 $isFieldArrayDate = array('date_creation');
                 $urlOrderby = '&orderby=' . $isFieldArraySort[4];
                 $urlSearchQuery = '';
                 $urlSort = '&desc';
                 $urlLg = '&lg=' . $lgActuel;
                 $urlCategorie = '';
                 $urlGroupBy = '&gby=' . $per;
                 // Init table query
                 $tAll = " _moderation ";
                 // Create query search for mysql
                 $sqlLabelSearch = '';
                 $arrForCountSearchQuery = array();
                 $filters = array();
                 $sqlLabelSearchModo = '  (';
                 foreach ($this->doorGets->user['liste_enfant_modo'] as $idGroup) {
                     //$arrForCountSearchQuery[] = array('key'=>'network','type'=>'=','value'=> $idGroup);
                     $sqlLabelSearchModo .= "  id_groupe = {$idGroup} OR ";
                 }
                 $sqlLabelSearchModo = substr($sqlLabelSearchModo, 0, -3);
                 $sqlLabelSearchModo .= ')';
                 // Init Query Search
                 $aGroupeFilter = array();
                 if (!empty($isFieldArraySearch)) {
                     // Récupére les paramêtres du get et post pour la recherche par filtre
                     foreach ($isFieldArraySearch as $v) {
                         $valueQP = '';
                         if (array_key_exists('doorGets_search_filter_q_' . $v, $params['GET']) && !empty($params['GET']['doorGets_search_filter_q_' . $v])) {
                             $valueQP = trim($params['GET']['doorGets_search_filter_q_' . $v]);
                             $aGroupeFilter['doorGets_search_filter_q_' . $v] = $valueQP;
                         }
                         if (array_key_exists('doorGets_search_filter_q_' . $v, $params['POST']) && !array_key_exists('doorGets_search_filter_q_' . $v, $params['GET']) && !empty($params['POST']['doorGets_search_filter_q_' . $v])) {
                             $valueQP = trim($params['POST']['doorGets_search_filter_q_' . $v]);
                             $aGroupeFilter['doorGets_search_filter_q_' . $v] = $valueQP;
                         }
                         if (array_key_exists('doorGets_search_filter_q_' . $v, $params['GET']) && !empty($params['GET']['doorGets_search_filter_q_' . $v]) || array_key_exists('doorGets_search_filter_q_' . $v, $params['POST']) && !array_key_exists('doorGets_search_filter_q_' . $v, $params['GET']) && !empty($params['POST']['doorGets_search_filter_q_' . $v])) {
                             if (!empty($valueQP)) {
                                 $valEnd = str_replace('_start', '', $v);
                                 $valEnd = str_replace('_end', '', $v);
                                 if (in_array($valEnd, $isFieldArrayDate)) {
                                     if (array_key_exists('doorGets_search_filter_q_' . $v, $params['GET']) && !empty($params['GET']['doorGets_search_filter_q_' . $v])) {
                                         $fromFormat = trim($params['GET']['doorGets_search_filter_q_' . $valEnd . '_start']);
                                         $toFormat = trim($params['GET']['doorGets_search_filter_q_' . $valEnd . '_end']);
                                     } else {
                                         $fromFormat = trim($params['POST']['doorGets_search_filter_q_' . $valEnd . '_start']);
                                         $toFormat = trim($params['POST']['doorGets_search_filter_q_' . $valEnd . '_end']);
                                     }
                                     if (!empty($fromFormat)) {
                                         $from = strtotime($fromFormat);
                                     }
                                     if (!empty($toFormat)) {
                                         $to = strtotime($toFormat);
                                         $to = $to + 60 * 60 * 24;
                                     }
                                     if (strlen(str_replace('_end', '', $v)) !== strlen($v)) {
                                         $nameTable = $valEnd;
                                         $sqlLabelSearch .= $nameTable . " >= {$from} AND ";
                                         $sqlLabelSearch .= $nameTable . " <= {$to} AND ";
                                         // $arrForCountSearchQuery[] = array('key'=>$nameTable,'type'=>'>','value'=>$from);
                                         // $arrForCountSearchQuery[] = array('key'=>$nameTable,'type'=>'<','value'=>$to);
                                         $urlSearchQuery .= '&doorGets_search_filter_q_' . $valEnd . '_end=' . $toFormat;
                                     }
                                 } else {
                                     if (in_array($v, $isFieldArraySort)) {
                                         if ($v === 'active' || $v === 'network') {
                                             $sqlLabelSearch .= $v . " = " . $valueQP . " AND ";
                                             //$arrForCountSearchQuery[] = array('key'=>$tableName.".".$v,'type'=>'!=!','value'=>$valueQP,'',' AND ');
                                         } else {
                                             $sqlLabelSearch .= $v . " LIKE '%" . $valueQP . "%' AND ";
                                             //$arrForCountSearchQuery[] = array('key'=>$tableName.".".$v,'type'=>'like','value'=>$valueQP,'',' AND ');
                                         }
                                     }
                                     $urlSearchQuery .= '&doorGets_search_filter_q_' . $valEnd . '=' . $valueQP;
                                 }
                             }
                         }
                     }
//.........这里部分代码省略.........
开发者ID:doorgets,项目名称:cms,代码行数:101,代码来源:moderationView.php

示例12: getContent

 public function getContent()
 {
     $out = '';
     $tableName = '_moderation';
     $lgActuel = $this->doorGets->getLangueTradution();
     $controllerName = $this->doorGets->controllerNameNow();
     $User = $this->doorGets->user;
     $Rubriques = array('index' => $this->doorGets->__('Index de la page'));
     $lgActuel = $this->doorGets->getLangueTradution();
     $params = $this->doorGets->Params();
     if (array_key_exists($this->Action, $Rubriques)) {
         switch ($this->Action) {
             case 'index':
                 $p = 1;
                 $ini = 0;
                 $per = 25;
                 $iPos = 0;
                 $urlToGo = "./?controller={$controllerName}";
                 $urlPage = "./?controller={$controllerName}&page=";
                 $isFieldArray = array("id" => array('label' => $this->doorGets->__('Id'), 'type' => 'text', 'options' => null, 'name' => 'Id', 'sort' => true, 'search' => true), "id_user" => array('label' => $this->doorGets->__('Id') . ' ' . $this->doorGets->__('User'), 'type' => 'text', 'options' => null, 'name' => 'IdUser', 'sort' => true, 'search' => true), "pseudo" => array('label' => $this->doorGets->__('Pseudo'), 'type' => 'text', 'options' => null, 'name' => 'Pseudo', 'sort' => true, 'search' => true), "id_groupe" => array('label' => $this->doorGets->__('Id') . ' ' . $this->doorGets->__('Module'), 'type' => 'text', 'options' => null, 'name' => 'IdGroupe', 'sort' => true, 'search' => true), "type_module" => array('label' => $this->doorGets->__('Type') . ' ' . $this->doorGets->__('Module'), 'type' => 'select', 'options' => array('blog' => $this->doorGets->__('Blog'), 'news' => $this->doorGets->__("Fil d'actualités"), 'video' => $this->doorGets->__('Galerie vidéos'), 'image' => $this->doorGets->__("Galerie d'image")), 'name' => 'TypeModule', 'sort' => true, 'search' => true), "action" => array('label' => $this->doorGets->__('Action'), 'type' => 'select', 'options' => array('add' => $this->doorGets->__('Ajout'), 'edit' => $this->doorGets->__("Modification")), 'name' => 'TypeModule', 'sort' => true, 'search' => true), "date_creation" => array('label' => $this->doorGets->__('Date'), 'type' => 'date', 'options' => null, 'name' => 'DateCreation', 'sort' => true, 'search' => true));
                 $iniUrlSortBy = 'id';
                 $isFieldArraySort = array('id', 'id_user', 'id_groupe', 'type_module', 'pseudo', 'action', 'date_creation');
                 $isFieldArraySearch = array('id', 'id_user', 'id_groupe', 'id_content', 'type_module', 'pseudo', 'action', 'date_creation', 'date_creation_start', 'date_creation_end');
                 $isFieldArrayDate = array('date_creation');
                 $urlOrderby = '&orderby=' . $iniUrlSortBy;
                 $urlSearchQuery = '';
                 $urlSort = '&desc';
                 $urlLg = '&lg=' . $lgActuel;
                 $urlCategorie = '';
                 $urlGroupBy = '&gby=' . $per;
                 if (array_key_exists('gby', $_GET) && is_numeric($_GET['gby']) && $_GET['gby'] < 300) {
                     $per = $_GET['gby'];
                 }
                 if (array_key_exists('page', $_GET) && is_numeric($_GET['page']) && $_GET['page'] > 0) {
                     $p = $_GET['page'];
                     $ini = $p * $per - $per;
                 }
                 $backUrl = urlencode('?controller=moderation&page=' . $p);
                 // Init sort
                 $getDesc = 'DESC';
                 $getSort = '&asc';
                 if (isset($_GET['asc'])) {
                     $getDesc = 'ASC';
                     $getSort = '&desc';
                     $urlSort = '&asc';
                 }
                 // Init Query
                 $moderationQuery = new ModerationQuery($this->doorGets);
                 if (!empty($User['liste_enfant'])) {
                     foreach ($User['liste_enfant'] as $id_groupe) {
                         $moderationQuery->filterByIdGroupe($id_groupe, 'OR');
                     }
                 }
                 $moderationCollection = $moderationQuery->paginate($p, $per);
                 // Init Filters
                 $getFilter = '';
                 if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                     $getFilter = $params['GET']['orderby'];
                     $getFilterOrderBy = 'orderBy' . $isFieldArray[$getFilter]['name'];
                     $urlOrderby = '&orderby=' . $getFilter;
                     $moderationCollection->{$getFilterOrderBy}($getDesc);
                 } else {
                     $moderationCollection->orderById($getDesc);
                 }
                 $aGroupeFilter = array();
                 if (!empty($isFieldArraySearch)) {
                     // Récupére les paramêtres du get et post pour la recherche par filtre
                     foreach ($isFieldArraySearch as $fieldName) {
                         $valueQP = '';
                         if (array_key_exists('doorGets_search_filter_q_' . $fieldName, $params['GET']) && !empty($params['GET']['doorGets_search_filter_q_' . $fieldName])) {
                             $valueQP = trim($params['GET']['doorGets_search_filter_q_' . $fieldName]);
                             $aGroupeFilter['doorGets_search_filter_q_' . $fieldName] = $valueQP;
                         }
                         if (array_key_exists('doorGets_search_filter_q_' . $fieldName, $params['POST']) && !array_key_exists('doorGets_search_filter_q_' . $fieldName, $params['GET']) && !empty($params['POST']['doorGets_search_filter_q_' . $fieldName])) {
                             $valueQP = trim($params['POST']['doorGets_search_filter_q_' . $fieldName]);
                             $aGroupeFilter['doorGets_search_filter_q_' . $fieldName] = $valueQP;
                         }
                         if (array_key_exists('doorGets_search_filter_q_' . $fieldName, $params['GET']) && !empty($params['GET']['doorGets_search_filter_q_' . $fieldName]) || array_key_exists('doorGets_search_filter_q_' . $fieldName, $params['POST']) && !array_key_exists('doorGets_search_filter_q_' . $fieldName, $params['GET']) && !empty($params['POST']['doorGets_search_filter_q_' . $fieldName])) {
                             if (!empty($valueQP)) {
                                 $valEnd = str_replace('_start', '', $fieldName);
                                 $valEnd = str_replace('_end', '', $fieldName);
                                 if (in_array($valEnd, $isFieldArrayDate)) {
                                     if (array_key_exists('doorGets_search_filter_q_' . $fieldName, $params['GET']) && !empty($params['GET']['doorGets_search_filter_q_' . $fieldName])) {
                                         $fromFormat = trim($params['GET']['doorGets_search_filter_q_' . $valEnd . '_start']);
                                         $toFormat = trim($params['GET']['doorGets_search_filter_q_' . $valEnd . '_end']);
                                     } else {
                                         $fromFormat = trim($params['POST']['doorGets_search_filter_q_' . $valEnd . '_start']);
                                         $toFormat = trim($params['POST']['doorGets_search_filter_q_' . $valEnd . '_end']);
                                     }
                                     if (!empty($fromFormat)) {
                                         $from = strtotime($fromFormat);
                                     }
                                     if (!empty($toFormat)) {
                                         $to = strtotime($toFormat);
                                         $to = $to + 60 * 60 * 24;
                                     }
                                     if (strlen(str_replace('_end', '', $fieldName)) !== strlen($fieldName)) {
                                         $filterRangeByFieldTable = 'filterRangeBy' . $isFieldArray[$valEnd]['name'];
                                         $moderationCollection->{$filterRangeByFieldTable}($from, $to);
                                         $urlSearchQuery .= '&doorGets_search_filter_q_' . $valEnd . '_start=' . $fromFormat;
//.........这里部分代码省略.........
开发者ID:neoartdoo,项目名称:CMS,代码行数:101,代码来源:moderationView.php

示例13: getContent


//.........这里部分代码省略.........
                         $sqlLabelSearch = " AND ( {$sqlLabelSearch} ) ";
                     }
                 }
                 // Init Group By
                 if (array_key_exists('gby', $params['GET']) && is_numeric($params['GET']['gby']) && $params['GET']['gby'] < 300) {
                     $per = $params['GET']['gby'];
                     $urlGroupBy = '&gby=' . $per;
                 }
                 // Init count total fields
                 $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery);
                 // Init categorie
                 $sqlCategorie = '';
                 // Init sort
                 $getDesc = 'DESC';
                 $getSort = '&asc';
                 if (isset($_GET['asc'])) {
                     $getDesc = 'ASC';
                     $getSort = '&desc';
                     $urlSort = '&asc';
                 }
                 // Init filter for order by
                 $outFilterORDER = $tableName . '_traduction.title  ' . $getDesc;
                 $getFilter = '';
                 if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                     $getFilter = $params['GET']['orderby'];
                     if (in_array($getFilter, $isFieldTraductionArray)) {
                         $outFilterORDER = $tableName . '_traduction.' . $getFilter . '  ' . $getDesc;
                     } else {
                         $outFilterORDER = $tableName . '.' . $getFilter . '  ' . $getDesc;
                     }
                     $urlOrderby = '&orderby=' . $getFilter;
                 }
                 // Init page position
                 if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                     $p = $params['GET']['page'];
                     $ini = $p * $per - $per;
                 }
                 $finalPer = $ini + $per;
                 if ($finalPer > $cResultsInt) {
                     $finalPer = $cResultsInt;
                 }
                 // Create sql query for transaction
                 $outSqlGroupe = " WHERE 1=1 " . $sqlLabelSearch;
                 $sqlLimit = " {$outSqlGroupe} AND " . $this->doorGets->Table . ".id = " . $this->doorGets->Table . "_traduction.id_content AND langue = '{$lgActuel}' ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $per;
                 // Create url to go for pagination
                 $urlPage = "./?controller=" . $this->doorGets->controllerNameNow() . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                 $urlPagePosition = "./?controller=" . $this->doorGets->controllerNameNow() . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                 // Generate the pagination system
                 $valPage = '';
                 if ($cResultsInt > $per) {
                     $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                 }
                 $tAll = " " . $this->doorGets->Table . ", " . $this->doorGets->Table . "_traduction";
                 // Select all contents / Query SQL
                 $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                 $cAll = count($all);
                 /**********
                  *
                  *  Start block creation for listing fields
                  * 
                  **********/
                 $block = new BlockTable();
                 $imgTop = '<div class="d-top"></div>';
                 $imgBottom = '<div class="d-bottom"></div>';
                 $block->setClassCss('doorgets-listing');
                 $iPos = 0;
开发者ID:doorgets,项目名称:cms,代码行数:67,代码来源:orderstatusView.php

示例14: getContent


//.........这里部分代码省略.........
                     }
                     // préparation de la requête mysql
                     if (!empty($sqlLabelSearch)) {
                         $sqlLabelSearch = substr($sqlLabelSearch, 0, -4);
                         $sqlLabelSearch = " AND ( {$sqlLabelSearch} ) ";
                     }
                 }
                 // Init Group By
                 if (array_key_exists('gby', $params['GET']) && is_numeric($params['GET']['gby']) && $params['GET']['gby'] < 300) {
                     $per = $params['GET']['gby'];
                     $urlGroupBy = '&gby=' . $per;
                 }
                 // Init count total fields
                 $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery, 'WHERE ' . $sqlLabelSearchModo . ' ' . $sqlLabelSearch, ' OR ');
                 // Init categorie
                 $sqlCategorie = '';
                 // Init sort
                 $getDesc = 'DESC';
                 $getSort = '&asc';
                 if (isset($_GET['asc'])) {
                     $getDesc = 'ASC';
                     $getSort = '&desc';
                     $urlSort = '&asc';
                 }
                 // Init filter for order by
                 $outFilterORDER = $tableName . '.date_creation  ' . $getDesc;
                 $getFilter = '';
                 if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                     $getFilter = $params['GET']['orderby'];
                     $outFilterORDER = $tableName . '.' . $getFilter . '  ' . $getDesc;
                     $urlOrderby = '&orderby=' . $getFilter;
                 }
                 // Init page position
                 if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                     $p = $params['GET']['page'];
                     $ini = $p * $per - $per;
                 }
                 $finalPer = $ini + $per;
                 if ($finalPer > $cResultsInt) {
                     $finalPer = $cResultsInt;
                 }
                 // Create sql query for transaction
                 $outSqlGroupe = " WHERE {$sqlLabelSearchModo} " . $sqlLabelSearch;
                 $sqlLimit = " {$outSqlGroupe} ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $per;
                 // Create url to go for pagination
                 $urlPage = "./?controller=saas" . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                 $urlPagePosition = "./?controller=saas" . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                 // Generate the pagination system
                 $valPage = '';
                 if ($cResultsInt > $per) {
                     $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                 }
                 // Select all contents / Query SQL
                 $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                 $cAll = count($all);
                 /**********
                  *
                  *  Start block creation for listing fields
                  * 
                  **********/
                 $block = new BlockTable();
                 $imgTop = '<div class="d-top"></div>';
                 $imgBottom = '<div class="d-bottom"></div>';
                 $block->setClassCss('doorgets-listing');
                 $iPos = 0;
                 $dgSelMass = '';
开发者ID:doorgets,项目名称:cms,代码行数:67,代码来源:saasView.php

示例15: getContent


//.........这里部分代码省略.........
                     }
                     // préparation de la requête mysql
                     if (!empty($sqlLabelSearch)) {
                         $sqlLabelSearch = substr($sqlLabelSearch, 0, -4);
                         $sqlLabelSearch = " AND ( {$sqlLabelSearch} ) ";
                     }
                 }
                 // Init Group By
                 if (array_key_exists('gby', $params['GET']) && is_numeric($params['GET']['gby']) && $params['GET']['gby'] < 300) {
                     $per = $params['GET']['gby'];
                     $urlGroupBy = '&gby=' . $per;
                 }
                 // Init count total fields
                 $cResultsInt = $this->doorGets->getCountTable($tAll, $arrForCountSearchQuery);
                 // Init categorie
                 $sqlCategorie = '';
                 // Init sort
                 $getDesc = 'DESC';
                 $getSort = '&asc';
                 if (isset($_GET['asc'])) {
                     $getDesc = 'ASC';
                     $getSort = '&desc';
                     $urlSort = '&asc';
                 }
                 // Init filter for order by
                 $outFilterORDER = $tableName . '.date_creation  ' . $getDesc;
                 $getFilter = '';
                 if (array_key_exists('orderby', $params['GET']) && !empty($params['GET']['orderby']) && in_array($params['GET']['orderby'], $isFieldArraySort)) {
                     $getFilter = $params['GET']['orderby'];
                     $outFilterORDER = $tableName . '.' . $getFilter . '  ' . $getDesc;
                     $urlOrderby = '&orderby=' . $getFilter;
                 }
                 // Init page position
                 if (array_key_exists('page', $params['GET']) && is_numeric($params['GET']['page']) && $params['GET']['page'] <= ceil($cResultsInt / $per)) {
                     $p = $params['GET']['page'];
                     $ini = $p * $per - $per;
                 }
                 $finalPer = $ini + $per;
                 if ($finalPer > $cResultsInt) {
                     $finalPer = $cResultsInt;
                 }
                 // Create sql query for transaction
                 $outSqlGroupe = " WHERE 1=1 " . $sqlLabelSearch;
                 $sqlLimit = " {$outSqlGroupe} AND _users_groupes_attributes.id = _users_groupes_attributes_traduction.id_attribute AND langue = '{$lgActuel}' ORDER BY {$outFilterORDER}  LIMIT " . $ini . "," . $per;
                 // Create url to go for pagination
                 $urlPage = "./?controller=attributes" . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlGroupBy . $urlLg . '&page=';
                 $urlPagePosition = "./?controller=attributes" . $urlCategorie . $urlOrderby . $urlSearchQuery . $urlSort . $urlLg . '&page=' . $p;
                 // Generate the pagination system
                 $valPage = '';
                 if ($cResultsInt > $per) {
                     $valPage = Pagination::page($cResultsInt, $p, $per, $urlPage);
                 }
                 $tAll = " _users_groupes_attributes, _users_groupes_attributes_traduction";
                 // Select all contents / Query SQL
                 $all = $this->doorGets->dbQA($tAll, $sqlLimit);
                 $cAll = count($all);
                 /**********
                  *
                  *  Start block creation for listing fields
                  * 
                  **********/
                 $block = new BlockTable();
                 $imgTop = '<div class="d-top"></div>';
                 $imgBottom = '<div class="d-bottom"></div>';
                 $block->setClassCss('doorgets-listing');
                 $iPos = 0;
开发者ID:doorgets,项目名称:cms,代码行数:67,代码来源:attributesView.php


注:本文中的Pagination::page方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。