/** * Function displays all the currency list from the table * * * @return string */ function showCurrencyList() { $pagesize = 10; if (isset($_GET['page'])) { $start = trim($_GET['page'] - 1) * $pagesize; $end = $pagesize; } else { $start = 0; $end = $pagesize; } $total = 0; $sql = 'SELECT a.id,a.currency_name,a.currency_code,a.currency_tocken,a.status,a.default_currency FROM currency_master_table a '; $obj = new Bin_Query(); if ($obj->executeQuery($sql)) { $total = ceil($obj->totrows / $pagesize); include 'classes/Lib/Paging.php'; $tmp = new Lib_Paging('classic', array('totalpages' => $total, 'length' => 10), 'pagination'); $this->data['paging'] = $tmp->output; $this->data['prev'] = $tmp->prev; $this->data['next'] = $tmp->next; $sql1 = $sql . " LIMIT " . $start . "," . $end; $query = new Bin_Query(); //$sql1="select orders_status_id,orders_status_name from orders_status_table"; $obj1 = new Bin_Query(); $obj1->executeQuery($sql1); } if ($obj1->totrows > 0) { return Display_DCurrencySettings::showCurrencyList($obj1->records, $this->data['paging'], $this->data['prev'], $this->data['next']); } else { return 'No Currencies Found'; } }