kenken999/php
0
1<?php2 3class ListPage_DPList extends ListPage_DPInline4{ 5 /**6 * Constructor, set initial params7 * @param array $params8 */9 function __construct(&$params)10 {11 parent::__construct( $params );12 13 $this->formBricks["footer"] = array( "pagination_block" ); 14 }15 16 /**17 * Show the page.18 * It's supposed to be displayed in response on an ajax-like request19 */20 public function showPage() {21 $this->BeforeShowList();22 $this->xt->prepare_template( $this->templatefile );23 24 $this->showPageAjax();25 }26 27 28 /**29 *30 */31 function showPageAjax() {32 $returnJSON = array();33 $proceedLink = $this->getProceedLink();34 35 if( !$this->numRowsFromSQL && 36 !$this->addAvailable() && !$this->inlineAddAvailable() && 37 !$this->recordsDeleted && 38 $proceedLink == '' && 39 $this->getGridTabsCount() == 0 ) 40 {41 $returnJSON['success'] = false;42 echo printJSON($returnJSON);43 return;44 }45 46 $this->addControlsJSAndCSS();47 $this->fillSetCntrlMaps();48 49 global $pagesData;50 $returnJSON["pagesData"] = $pagesData;51 $returnJSON['controlsMap'] = $this->controlsHTMLMap;52 $returnJSON['viewControlsMap'] = $this->viewControlsHTMLMap;53 $returnJSON['settings'] = $this->jsSettings;54 55 $this->xt->assign("header", false);56 $this->xt->assign("footer", false);57 58 $returnJSON['headerCont'] = $proceedLink . $this->xt->fetch_loaded("above-grid_block");59 $returnJSON["footerCont"] = $this->xt->fetch_loaded("below-grid_block");60 61 $this->xt->prepareContainers();62 63 $returnJSON["html"] = $this->xt->fetch_loaded("grid_block");64 if( $this->listGridLayout == gltVERTICAL ) {65 $returnJSON["html"] = $this->xt->fetch_loaded("message_block") . $returnJSON["html"];66 }67 68 $returnJSON['idStartFrom'] = $this->flyId;69 $returnJSON['success'] = true;70 71 $returnJSON["additionalJS"] = $this->grabAllJsFiles();72 $returnJSON["CSSFiles"] = $this->grabAllCSSFiles();73 74 if( $this->deleteMessage != '' )75 $returnJSON["delMess"] = true;76 77 echo printJSON($returnJSON);78 }79 80 /**81 * @return String82 */83 protected function getBSButtonsClass()84 {85 return "btn btn-sm";86 }87 88 89 function showNoRecordsMessage()90 {91 // show nothing92 }93}94?>