public function tabel_menu($value = '') { // if(!is_direct()) // { // PAGINATION $tanggal = ''; $offset = 0; $uri = $this->uri->segment(4); if (!empty($uri)) { $offset = $uri; } $limit = 10; $total = $this->mdb->count_menu(); // $total = count($all_data); $data_menu = $this->mdb->get_menu($limit, $offset); $url = base_url() . $this->cname . '/master_menu/tabel_menu'; $data['offset'] = $offset; $data['no'] = (int) $offset + 1; $data['kategori_menu'] = $this->mdb->get_kategori(); $data['pagination'] = paging($url, $total, $limit, 4, 2); //-- END PAGINATION $data['menu'] = $data_menu; $this->load->view('v_master_menu_tabel', $data); // } }
public function lists() { $must = array(); $this->check_param($must); $this->check_sign(); extract($this->params); if (!isset($page_now)) { $page_now = 1; } $where_map = array(); if (isset($district_id) && $district_id != 0) { $where_map = array('district_id' => $district_id); } do { $this->Table_model->init(T_STREET); $limit_arr = array($page_size, $page_now); $res = $this->Table_model->records($where_map, array(), $limit_arr); if ($res['err_num'] == 0) { $this->load->model('Street_model'); foreach ($res['results']['records'] as &$value) { $street_info[] = $this->Street_model->info($value['id']); } $res['results']['records'] = $street_info; $res['results']['pager'] = paging($res['results']['records_num'], $page_now, $this->page_size); unset($res['results']['records_num']); $this->op($res); } else { $this->st(array(), "获取商场列表失败!", API_UNKNOW_ERR); } } while (0); $this->op(); }
public function mall_ad_lists() { $must = array('mall_id'); $this->check_param($must); $this->check_sign(); extract($this->params); if (!isset($page_size)) { $page_size = 20; } if (!isset($page_now)) { $page_now = 1; } do { $limit_arr = array($page_size, $page_now); $where_map = array(); if ($mall_id != 0) { $where_map = array('mall_id' => $mall_id); } $this->Table_model->init(T_MALL_AD); $res = $this->Table_model->records($where_map, array(), $limit_arr); if ($res['err_num'] == 0) { $res['results']['pager'] = paging($res['results']['records_num'], $page_now, $page_size); unset($res['results']['records_num']); $this->op($res); } else { $this->st(0, '该商场下无广告', API_NORMAL_ERR); } } while (0); $this->op(); }
public function lists() { $must = array(); $this->check_param($must); $this->check_sign(); extract($this->params); //district_id 可选参数 $where_map = array(); if (isset($district_id) && $district_id != 0) { $where_map = array('district' => $district_id); } do { $this->Table_model->init(T_MALL); $limit_arr = array($this->page_size, $this->page_now); $res = $this->Table_model->records($where_map, array(), $limit_arr); if ($res['err_num'] == 0) { $results =& $res['results']; $results['pager'] = paging($results['records_num'], $this->page_now, $this->page_size); $this->load->model('Mall_model'); foreach ($results['records'] as &$value) { $value = array_merge($this->Mall_model->info($value['id']), $value); if ($value['mall_photo']) { $value['mall_photo'] = json_decode($value['mall_photo']); } } // unset($results['records_num']); $this->op($res); } else { $this->st(array(), "获取商场列表失败!", API_UNKNOW_ERR); } } while (0); $this->op(); }
function ShowAllUsers() { global $user, $users, $paging; $total_data = $user->GetUserTotal(); $total_data_in_page = LIMIT_USER_PAGE; $paging = paging($total_data, $total_data_in_page); $page = $_REQUEST['page'] - 1; if ($page <= 0) { $users_data = $user->BrowseAllUsers(0, $total_data_in_page); } else { $users_data = $user->BrowseAllUsers($page * $total_data_in_page, $total_data_in_page); } $i = 0; foreach ($users_data as $value) { $users[$i]['user_id'] = $value['user_id']; $users[$i]['username'] = $value['username']; $users[$i]['firstname'] = $value['firstname']; $users[$i]['lastname'] = $value['lastname']; $users[$i]['paid'] = $value['paid']; if ($i % 2 != 0) { $users[$i]['color'] = '#f7f7f7'; } else { $users[$i]['color'] = '#ffffff'; } $i++; } }
public function page_cateAction() { $cr_page = input_get('page'); $all_page = $this->model->action_db->cate_count_list(); $page = paging($all_page, 5, $cr_page, 'admin.php?c=category&a=page_cate&page={page}'); $cate = $this->model->action_db->cate_get_list($page['start'], $page['limit']); $datasend = array($cate, $page); $this->view->load('cate', $datasend); $this->Load_Footer(); }
public function lists() { $must = array(); $this->check_param($must); $this->check_sign(); extract($this->params); do { if (!isset($page_size)) { $page_size = 10; } //设置默认的 city_id 为 1 if (!isset($city_id)) { $city_id = 1; } $this->Table_model->init(T_DISTRICT); $where_map = array('city' => $city_id); //是否只返回已经开发的商圈 if (isset($is_developed)) { $where_map['is_developed'] = $is_developed; } $limit_arr = array($page_size, $this->page_now); $order_map = array('is_developed' => 'desc'); $res = $this->Table_model->records($where_map, array(), $limit_arr, $order_map); if ($res['err_num'] == 0) { $results =& $res['results']; $results['pager'] = paging($results['records_num'], $this->page_now, $page_size); foreach ($results['records'] as &$value) { $value['photo'] = json_decode($value['photo']); //@todo 因为城市暂时只有一个北京,先临时处理下 $value['city_name'] = "北京"; //如果传参数 longtitude , 和 latitude ,则多返回一个 用户距 商圈距离字段 if (isset($Latitude) && isset($Longitude)) { if (!$Latitude) { $value['distance'] = "无法获取您的位置信息"; } if (!$Longitude) { $value['distance'] = "无法获取您的位置信息"; } else { $value['distance'] = getDistance($value['Latitude'], $value['Longitude'], $Latitude, $Longitude); } } else { $value['distance'] = "无法获取您的位置信息"; } } unset($results['records_num']); $this->op($res); } else { $this->st(array(), "获取商圈列表失败!", API_UNKNOW_ERR); } } while (0); $this->op(); }
function ShowAllOrders() { global $tpl, $order, $product, $orders, $success, $paging; $total_data = $order->GetTotalOrders(); $total_data_in_page = LIMIT_ORDER_PAGE; $paging = paging($total_data, $total_data_in_page); $page = $_REQUEST['page'] - 1; if ($page <= 0) { $orders_data = $order->BrowseAllOrders(0, $total_data_in_page); } else { $orders_data = $order->BrowseAllOrders($page * $total_data_in_page, $total_data_in_page); } $i = 0; foreach ($orders_data as $value) { $orders[$i]['no'] = $i + 1; $orders[$i]['order_id'] = $value['order_id']; $orders[$i]['name'] = $value['name']; $orders[$i]['user_id'] = $value['user_id']; $orders[$i]['username'] = $value['username']; $orders[$i]['date_order'] = date("m-d-Y ", $value['date_order']); $orders[$i]['date_expire'] = date("m-d-Y ", $value['date_expire']); if ($i % 2 != 0) { $orders[$i]['color'] = '#f7f7f7'; } else { $orders[$i]['color'] = '#ffffff'; } $expire_in = $value['date_expire'] - time(); if ($expire_in <= 0) { $orders[$i]['expire_in'] = "<font color='#ff0000'>Expire</font>"; } else { if ($expire_in <= CFG_NOTIFY_EXPIRE * 24 * 60 * 60) { $expire_days = round($expire_in / 60 / 60 / 24); if ($expire_days == 0) { $expire_days = $expire_days + 1; } $orders[$i]['expire_in'] = "<font color='#F87217'>Expire in " . $expire_days . " Days</font>"; } else { $orders[$i]['expire_in'] = "<font color='green'>Active</font>"; } } $orders[$i]['description'] = $value['description']; $i++; } }
public function search_lists($search_key, $limit_arr = array(), $order_map = array()) { /* * return 格式 * array( * 'records_num' = >10, //总记录数 * 'records'=>array(), //记录列表 * 'pager'=>array( //记录页码 * ) * ); * */ $return = array(); $sql = "select * from " . T_BRAND . " where name like '%{$search_key}%'"; $return['records'] = $this->ci_query($sql); foreach ($return['records'] as &$v) { $v['logo'] = json_decode($v['logo']); $v['style_id'] = json_decode($v['style_id']); } $sql = "select count(*) as records_num from " . T_BRAND . " where name like '%{$search_key}%'"; $return['records_num'] = $this->ci_query($sql)[0]['records_num']; $return['pager'] = paging($return['records_num'], $limit_arr[1], $limit_arr[0]); return $return; }
public function lists() { $must = array('province', 'page_now'); $this->check_param($must); $this->check_sign(); extract($this->params); do { if (!isset($page_size)) { $page_size = 10; } $this->Table_model->init(T_CITY); $where_map = array('province' => $province); $limit_arr = array($page_size, $page_now); $res = $this->Table_model->records($where_map, array(), $limit_arr); if ($res['err_num'] == 0) { $res['results']['pager'] = paging($res['results']['records_num'], $page_now, $page_size); unset($res['results']['records_num']); $this->op($res); } else { $this->st(array(), "获取城市列表失败!", API_UNKNOW_ERR); } } while (0); $this->op(); }
</div> </div> </div> </li> <?php } ?> </ul> <?php } ?> </div> <?php if (isset($pages_count) and $pages_count > 1 and isset($paging_param)) { ?> <?php print paging("num={$pages_count}&paging_param={$paging_param}"); ?> <?php } ?>
$praiseArray[] = '<a href="">' . $praiseIndex . '</a> '; } echo empty($praiseArray) ? '<div id=praiselist_' . $value['eventId'] . '>' : '<div id=praiselist_' . $value['eventId'] . '><i class="mdi-action-favorite-outline"></i>'; echo implode(' , ', $praiseArray); $hadPraise = $value['hadPraised'] ? 'pink-text mdi-action-favorite' : 'pink-text mdi-action-favorite-outline'; echo '</div>'; if ($value['hadPraised']) { echo '<h5 class="right-align"><a id=event_a_' . $value['eventId'] . ' onclick="unlikeEvent(' . $value['eventId'] . ', ' . "'{$accessToken}'" . ')"><i id=event_' . $value['eventId'] . ' class="' . $hadPraise . '"></i></a></h5>'; } else { echo '<h5 class="right-align"><a id=event_a_' . $value['eventId'] . ' onclick="likeEvent(' . $value['eventId'] . ', ' . "'{$accessToken}'" . ')"><i id=event_' . $value['eventId'] . ' class="' . $hadPraise . '"></i></a></h5>'; } echo '</div> <div class="col s12 divider"></div> </div>'; } echo paging('user/getNoticeList', $_REQUEST, count($noticeInfo), 'atme.php'); ?> </div> </main> <?php require_once 'bottom.php'; ?> <script type="text/javascript"> function likeEvent(eventId, accessToken) { $.post(getAjaxRequestAddress('user/likeEvent'), {eventId:eventId, accessToken:accessToken}, function(result) { if (result.code == 0) { $('#event_' + eventId).attr("class", "pink-text mdi-action-favorite"); $('#event_a_' + eventId).attr("onclick", "unlikeEvent("+eventId+", "+"'"+accessToken+"'"+")"); var appendHeml = '';
$page = $_GET['h']; $offset = $limit * ($page - 1); } else { $offset = 0; $page = 1; } //search $uri = "?p=news"; $search = ""; //get total record $qryTotal = "SELECT count(*) total FROM artikel WHERE 0=0 " . $search . " "; $resTotal = mysql_query($qryTotal); $row = mysql_fetch_array($resTotal, MYSQL_NUM); $totalRec = $row[0]; //pagination $pagination = paging($totalRec, $limit, $page, $uri); //get record selected $resQry = "SELECT * FROM artikel \n\t\tWHERE 0=0 " . $search . " \n\t\tORDER BY id DESC\n\t\tLIMIT " . $offset . "," . $limit; $results = mysql_query($resQry); $countResults = mysql_num_rows($results); ?> <h2>Artikel</h2><hr> <p> <?php if ($countResults > 0) { $i = 1; while ($r = mysql_fetch_array($results)) { ?> <div class="boxNews clr"> <span class="pic"> <img src="<?php
<tr> <td colspan="100" align="center" style="background: #FFFD8C;"><?php _e("No items found"); ?> </td> </tr> <?php } ?> </tbody> </table> <?php if (is_array($data)) { ?> <div class="mw-paging left"> <?php print paging("num={$data_paging}"); ?> </div> <?php if (isset($params['export_to_excel'])) { } if (isset($params['export_to_excel'])) { } } ?> <div id="start-email-campaign"> <a class="mw-ui-btn pull-right" href="javascript:;" onclick="Alert('<?php _e("Coming Soon"); ?> !');" > <?php _e("Start an Email Campaign");
<microweber module="posts/list" file="posts_list_wide" category="<? print $category['id'] ?>" limit="3"> <br /> <? $params= array(); $params['without_custom_fields']=false; $the_posts = get_posts($params); ?> <? $i = 0; foreach($the_posts as $the_post): include(TEMPLATE_DIR.'post_item_wide.php') ;?> <? if($i == 1): ?> <div class="post_list" align="center"> <? include(TEMPLATE_DIR.'banner_wide.php') ; ?></div> <? endif; ?> <? $i++; endforeach; ?> <br /> <br /> <? paging($display = 'divs') ?> <? endif; ?> </div> </div> </div>
$_GET['sort_by'] = ''; } switch ($_GET['sort_by']) { case 'name': $order = '`name`'; break; case 'average_rating': $order = '`rating`'; break; default: $order = '`datetime`'; break; } if (!isset($_GET['order']) || $_GET['order'] == '' || $_GET['order'] == 'desc') { $_GET['order'] = 'desc'; $order .= ' DESC'; } else { $_GET['order'] = 'asc'; $order .= ' ASC'; } $collections = $collectionsClass->getAll(START, LIMIT, " `public` = 'true' ", false, $order); if (is_array($collections)) { require_once ROOT_PATH . '/apps/users/models/users.class.php'; $usersClass = new users(); $users = $usersClass->getAll(0, 0, $collectionsClass->usersWhere); abr('users', $users); } abr('collections', $collections); abr('paging', paging('/' . $languageURL . 'collections/?p=', '&sort_by=' . $_GET['sort_by'] . '&order=' . $_GET['order'], PAGE, $limit, $collectionsClass->foundRows)); #面包屑 abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'collections/" title="">' . $langArray['public_collections'] . '</a>');
function lists() { //$this->output->enable_profiler(false); if (in_array("q", $this->seg_exp)) { $arr_key = array_keys($this->seg_exp, "q"); $arr_val = $arr_key[0] + 1; if (@$this->seg_exp[$arr_val]) { $search_word = $this->seg_exp[$arr_val]; } else { $search_word = '검색어없음/'; } $arr_key1 = array_keys($this->seg_exp, "sfl"); if (@$arr_key1[0]) { $arr_val1 = $arr_key1[0] + 1; } else { $arr_val1 = 10; } if (@$this->seg_exp[$arr_val1]) { $sfl = $this->seg_exp[$arr_val1]; } else { $sfl = 'subject'; } $post = array('method' => $sfl, 's_word' => urldecode($search_word)); } else { $post = ''; } if ($this->session->userdata('auth_code') == 'ADMIN' or $this->session->userdata('auth_code') >= 0 or $this->list_perm == 1) { if (in_array("page", $this->seg_exp)) { $arr_key = array_keys($this->seg_exp, "page"); $arr_val = $arr_key[0] + 1; if (@$this->seg_exp[$arr_val]) { $data['page_account'] = $page = $this->seg_exp[$arr_val]; } else { $data['page_account'] = $page = 1; } } else { $data['page_account'] = $page = 1; } $data['division'] = $post['division'] = urldecode(url_explode($this->seg_exp, 'division')); $data['list_total'] = $total = $this->board_m->load_list_total($post, MENU_ID); $data['page_entry'] = $post['page_entry'] = url_explode($this->seg_exp, 'page_entry'); if ($data['page_entry']) { $rp = $data['page_entry']; } else { $rp = 20; } $limit = 9; if (!is_numeric($page)) { $page = 1; } $start = ($page - 1) * $rp; //print_r($this->seg_exp); $this->url_seg = $this->seg_exp; $arr_s = array_search('page', $this->url_seg); if ($arr_s) { array_splice($this->url_seg, $arr_s, 2); } $urls = implode('/', $this->url_seg); $data['pagination_links'] = pagination($urls . "/page", paging($page, $rp, $total, $limit)); $data['list'] = $this->board_m->load_list($start, $rp, $post, MENU_ID); $this->load->view('board/default/lists_v', $data); } else { if (!$this->session->userdata('userid')) { $rpath = str_replace("index.php/", "", $this->input->server('PHP_SELF')); $data['rpath_encode'] = strtr(base64_encode(addslashes(gzcompress(serialize($rpath), 9))), '+/=', '-_.'); $this->load->view('login_view_v', $data); } else { $data['perm'] = "권한이 없습니다.."; $this->load->view('perm_view_v', $data); } } }
if ($row['num_rows'] > 0) { $num_rows = $row['num_rows']; } else { $num_rows = '0'; } } unset($prep_statement, $result); //prepare to page the results $rows_per_page = 150; $param = ""; $page = $_GET['page']; if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); $offset = $rows_per_page * $page; //get the hunt group list $sql = "select * from v_hunt_groups "; $sql .= "where domain_uuid = '{$domain_uuid}' "; if (strlen($order_by) > 0) { $sql .= "order by {$order_by} {$order} "; } else { $sql .= "order by hunt_group_extension asc "; } $sql .= " limit {$rows_per_page} offset {$offset} "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql);
function ShowFormAllOrders() { global $tpl, $orders, $order, $user, $product, $paging; $total_data = $order->GetTotalOrders(); $total_data_in_page = LIMIT_ORDER_PAGE; $order_totals_data = $order->GetOrdersTotals(); $i = -1; $last_prod = ''; foreach ($order_totals_data as $value) { if ($last_prod != $value['name']) { $i++; $last_prod = $value['name']; $order_totals[$i]['name'] = $value['name']; if ($i % 2 != 0) { $order_totals[$i]['color'] = '#f7f7f7'; } else { $order_totals[$i]['color'] = '#ffffff'; } } $order_totals[$i]['date_arr'][] = array('date' => date('Y-m', $value['date_order']), 'total' => $value['total']); } $paging = paging($total_data, $total_data_in_page); $page = $_REQUEST['page'] - 1; if ($page <= 0) { $orders_data = $order->BrowseAllOrders(0, $total_data_in_page); } else { $orders_data = $order->BrowseAllOrders($page * $total_data_in_page, $total_data_in_page); } $i = 0; foreach ($orders_data as $value) { $orders[$i]['no'] = $i + 1; $orders[$i]['order_id'] = $value['order_id']; $orders[$i]['name'] = $value['name']; $orders[$i]['user_id'] = $value['user_id']; $orders[$i]['username'] = $value['username']; $orders[$i]['date_order'] = date("m-d-Y ", $value['date_order']); $orders[$i]['date_expire'] = date("m-d-Y ", $value['date_expire']); if ($i % 2 != 0) { $orders[$i]['color'] = '#f7f7f7'; } else { $orders[$i]['color'] = '#ffffff'; } $expire_in = $value['date_expire'] - time(); if ($expire_in <= 0) { $orders[$i]['expire_in'] = "<font color='#ff0000'>Expired on " . $orders[$i]['date_expire'] . "</font>"; } else { if ($expire_in <= CFG_NOTIFY_EXPIRE * 24 * 60 * 60) { $expire_days = round($expire_in / 60 / 60 / 24); if ($expire_days == 0) { $expire_days = $expire_days + 1; } $orders[$i]['expire_in'] = "<font color='#F87217'>Expire in " . $expire_days . " Days</font>"; } else { $orders[$i]['expire_in'] = "<font color='green'>Active</font>"; } } $orders[$i]['description'] = $value['description']; $i++; } $total_products = $product->GetProductTotal(); $total_users = $user->GetUserTotal(); $total_orders = $order->GetTotalOrders(); $product_active = $product->GetProductActive(); $product_expired = $total_products - $product_active; $tpl->assign('product_expired', $product_expired); $tpl->assign('product_active', $product_active); $tpl->assign('last_month', date("Y-m", strtotime("-1 month"))); $tpl->assign('this_month', date("Y-m")); $tpl->assign('order_totals', $order_totals); $tpl->assign('total_users', $total_users); $tpl->assign('paging', $paging); $tpl->assign('orders', $orders); $tpl->display('admin/index.html'); }
<?php // +---------------------------------------------------------------------- // | Demila [ Beautiful Digital Content Trading System ] // +---------------------------------------------------------------------- // | Copyright (c) 2015 http://demila.org All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Email author@demila.org // +---------------------------------------------------------------------- _setView(__FILE__); _setTitle($langArray['withdraws']); $cms = new deposit(); $data = $cms->getWithdraws(START, LIMIT); if (is_array($data)) { require_once ROOT_PATH . '/apps/users/models/users.class.php'; $usersClass = new users(); $users = $usersClass->getAll(0, 0, $cms->usersWhere); abr('users', $users); } abr('data', $data); $p = paging("?m=" . $_GET['m'] . "&c=withdraws&p=", "", PAGE, LIMIT, $cms->foundRows); abr('paging', $p); require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
<?php // +---------------------------------------------------------------------- // | Demila [ Beautiful Digital Content Trading System ] // +---------------------------------------------------------------------- // | Copyright (c) 2015 http://demila.org All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Email author@demila.org // +---------------------------------------------------------------------- if (!isset($_GET['type']) || !in_array($_GET['type'], array('other', 'buyers', 'authors', 'referrals', 'system'))) { refresh('?m=' . $_GET['m'] . '&c=badges&type=system', '', 'error'); } _setView(__FILE__); _setTitle($langArray['badges'] . ' › ' . ucfirst($_GET['type'])); $types = array('system', 'other', 'buyers', 'authors', 'referrals'); $tmp = array(); foreach ($types as $type) { $tmp[] = array('name' => ucfirst($type), 'href' => '?m=' . $_GET['m'] . '&c=badges&type=' . $type); } abr('types', $tmp); require_once ROOT_PATH . '/apps/system/models/badges.class.php'; $badges = new badges(); $data = $badges->getAll(START, LIMIT, "`type`='" . $_GET['type'] . "'"); abr('data', $data); $p = paging("?m=" . $_GET['m'] . "&c=badges&type=" . $_GET['type'] . "&p=", "", PAGE, LIMIT, $badges->foundRows); abr('paging', $p); require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
?> " /> </div> <?php break; } ?> <?php } else { ?> <div class="clear"></div> <?php } ?> </div> </div> </div> <?php } ?> <?php } ?> </div> <?php if (isset($pages_count) and $pages_count > 1 and isset($paging_param)) { ?> <?php print paging("num={$pages_count}&paging_param={$paging_param}&class=mw-paging"); }
} // FIELDS ORDER global $sortby_user; if (!$sortby_user) { $sortby_user = $session->data['tlg_user_sort']; } else { if ($session->data['tlg_user_sort'] == $sortby_user) { if (Is_Integer(strpos($sortby_user, ' DESC'))) { $sortby_user = str_replace(' DESC', '', $sortby_user); } else { $sortby_user = $sortby_user . " DESC"; } } $session->data['tlg_user_sort'] = $sortby_user; } if (!$sortby_user) { $sortby_user = "******"; } $out['SORTBY'] = $sortby_user; // SEARCH RESULTS $res = SQLSelect("SELECT * FROM tlg_user ORDER BY " . $sortby_user); if ($res[0]['ID']) { paging($res, 20, $out); // search result paging colorizeArray($res); $total = count($res); for ($i = 0; $i < $total; $i++) { // some action for every record if required } $out['RESULT'] = $res; }
if (strlen($meeting_uuid) > 0) { $conference_center->meeting_uuid = $meeting_uuid; } if (strlen($search) > 0) { $conference_center->search = $search; } $row_count = $conference_center->room_count(); //prepare to page the results $rows_per_page = 150; $param = ""; $page = check_str($_GET['page']); if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } list($paging_controls, $rows_per_page, $var3) = paging($row_count, $param, $rows_per_page); $offset = $rows_per_page * $page; //get the conference rooms $conference_center->rows_per_page = $rows_per_page; $conference_center->offset = $offset; $conference_center->order_by = $order_by; $conference_center->order = $order; if (strlen($meeting_uuid) > 0) { $conference_center->meeting_uuid = $meeting_uuid; } if (strlen($search) > 0) { $conference_center->search = $search; } $result = $conference_center->rooms(); $result_count = $conference_center->count; //prepare to alternate the row styles
$session->data['objects_qry']=$qry; } if (!$qry) $qry="1"; // FIELDS ORDER global $sortby; if (!$sortby) { $sortby=$session->data['objects_sort']; } else { if ($session->data['objects_sort']==$sortby) { if (Is_Integer(strpos($sortby, ' DESC'))) { $sortby=str_replace(' DESC', '', $sortby); } else { $sortby=$sortby." DESC"; } } $session->data['objects_sort']=$sortby; } if (!$sortby) $sortby="TITLE"; $out['SORTBY']=$sortby; // SEARCH RESULTS $res=SQLSelect("SELECT objects.*, classes.TITLE as CLASS_TITLE, locations.TITLE as LOCATION_TITLE FROM objects LEFT JOIN locations ON locations.ID=objects.LOCATION_ID LEFT JOIN classes ON classes.ID=objects.CLASS_ID WHERE $qry ORDER BY $sortby"); if ($res[0]['ID']) { paging($res, 50, $out); // search result paging colorizeArray($res); $total=count($res); for($i=0;$i<$total;$i++) { // some action for every record if required } $out['RESULT']=$res; } ?>
if (strlen($orderby) > 0) { $sql .= "order by {$orderby} {$order} "; } $prepstatement = $db->prepare(check_sql($sql)); $prepstatement->execute(); $result = $prepstatement->fetchAll(); $numrows = count($result); unset($prepstatement, $result, $sql); $rowsperpage = 10; $param = ""; $page = $_GET['page']; if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } list($pagingcontrols, $rowsperpage, $var3) = paging($numrows, $param, $rowsperpage); $offset = $rowsperpage * $page; $sql = ""; $sql .= " select * from v_php_service "; if (strlen($orderby) > 0) { $sql .= "order by {$orderby} {$order} "; } $sql .= " limit {$rowsperpage} offset {$offset} "; $prepstatement = $db->prepare(check_sql($sql)); $prepstatement->execute(); $result = $prepstatement->fetchAll(); $resultcount = count($result); unset($prepstatement, $sql); $c = 0; $rowstyle["0"] = "rowstyle0"; $rowstyle["1"] = "rowstyle1";
echo "</div>"; echo "</form>"; //End Searchbar if (!empty($_POST[sstring])) { $search_string = $_POST[sstring]; } if (!empty($_GET[search])) { $search_string = $_GET[search]; } dbconnect(); if (empty($search_string)) { include 'footer.inc.php'; exit; } $sql = "SELECT * FROM npc WHERE name LIKE '%{$search_string}%' and class LIKE 'LineageNPC%'"; paging(); echo "Search results for \"{$search_string}\":<br/>"; echo "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\">\n"; echo "<tr>"; if ($accesslevel >= 100) { echo "<td class=\"id\">ID</td>"; } //echo "<td class=\"id\">Icon</td>"; echo "<td class=\"name\">Name</td>"; echo "<td class=\"type\">Level</td>"; echo "</tr>"; $result = mysql_query($sql . $paging, $conn) or die(mysql_error()); $i = 1; while ($newArray = mysql_fetch_array($result)) { $npc_id = $newArray['id']; $npc_name = $newArray['name'];
<table> <?php foreach ($this->conteudos as $conteudo) { if ($conteudo) { echo "<tr><td><a href='?action=editaconteudo&id=" . $conteudo->id . "'>" . $conteudo->titulo . "</td><td>" . $conteudo->html . "</td></tr>\n"; } } ?> </table> <br><br> <br><br> <?php // Paging links $todosconteudos = new Conteudo(); $todosconteudos->all(1, 'titulo'); $tr = $todosconteudos->getNumRows(); //tr - total of registers paging($tr, $rpp, $pg); for ($x = 0; $x < $nf; $x++) { if ($sgbd == 'my') { $fn = mysql_field_name($res, $x); } elseif ($sgbd == 'pg') { $fn = pg_field_name($res, $x); } $flds .= "<option value='{$fn}'>" . ucfirst($fn) . "</option>"; } ?>
?> </div> <p> <?php if (!isset($show_fields) or ($show_fields == false or in_array('description', $show_fields))) { ?> <p><?php print $item['description']; ?> </p> <?php } ?> </div> <?php } } ?> <?php if (isset($pages_count) and $pages_count > 1 and isset($paging_param)) { ?> <?php print paging("num={$pages_count}&paging_param={$paging_param}¤t_page={$current_page}"); } ?>
$sortby_security_rules = str_replace(' DESC', '', $sortby_security_rules); } else { $sortby_security_rules = $sortby_security_rules . " DESC"; } } $session->data['security_rules_sort'] = $sortby_security_rules; } if (!$sortby_security_rules) { $sortby_security_rules = "ID DESC"; } $out['SORTBY'] = $sortby_security_rules; // SEARCH RESULTS $res = SQLSelect("SELECT * FROM security_rules WHERE {$qry} ORDER BY " . $sortby_security_rules); if ($this->single_rec) { $total_res = count($res); if (!$total_res && $this->action == 'admin') { $this->redirect("?view_mode=edit_security_rules"); } elseif ($total_res && $this->action == 'admin') { $this->redirect("?view_mode=edit_security_rules&id=" . $res[0]['ID']); } elseif ($total_res && $this->action != 'admin') { } } if ($res[0]['ID']) { paging($res, 50, $out); // search result paging $total = count($res); for ($i = 0; $i < $total; $i++) { // some action for every record if required } $out['RESULT'] = $res; }