Exemplo n.º 1
0
*/
$equal_search = array('category_active_status', 'category_visibility_status');
$default_sort_by = "category_order";
$pgdata = page_init($equal_search, $default_sort_by);
// static/general.php
$page = $pgdata['page'];
$query_per_page = $pgdata['query_per_page'];
$sort_by = $pgdata['sort_by'];
$first_record = $pgdata['first_record'];
$search_parameter = $pgdata['search_parameter'];
$search_value = $pgdata['search_value'];
$search_query = $pgdata['search_query'];
$search = $pgdata['search'];
$parent_id = $_REQUEST['cid'];
$parent = get_parent($parent_id);
$full_order = count_category($parent['relation_level'] + 1, $parent_id, $search_query, $sort_by, $query_per_page);
$total_query = $full_order['total_query'];
$total_page = ceil($full_order['total_query'] / $query_per_page);
// CALL FUNCTION
$listing_order = get_categories($parent['relation_level'] + 1, $parent_id, $search_query, $sort_by, $first_record, $query_per_page);
// HANDLING ARROW SORTING
if ($_REQUEST['srt'] == "category_name DESC") {
    $arr_order_number = "<span class=\"sort-arrow-up\"></span>";
} else {
    if ($_REQUEST['srt'] == "category_name") {
        $arr_order_number = "<span class=\"sort-arrow-down\"></span>";
    } else {
        $arr_order_number = "<span class=\"sort-arrow-down\"></span>";
    }
}
// STORED VALUE
Exemplo n.º 2
0
|      SORTING       |
|--------------------|
*/
$equal_search = array('category_active_status', 'category_visibility_status');
$default_sort_by = "category_order";
$pgdata = page_init($equal_search, $default_sort_by);
// static/general.php
$page = $pgdata['page'];
$query_per_page = $pgdata['query_per_page'];
$sort_by = $pgdata['sort_by'];
$first_record = $pgdata['first_record'];
$search_parameter = $pgdata['search_parameter'];
$search_value = $pgdata['search_value'];
$search_query = $pgdata['search_query'];
$search = $pgdata['search'];
$full_order = count_category($search_query, $sort_by, $query_per_page);
$total_query = $full_order['total_query'];
$total_page = ceil($full_order['total_query'] / $query_per_page);
// CALL FUNCTION
$listing_order = get_categories($search_query, $sort_by, $first_record, $query_per_page);
// HANDLING ARROW SORTING
if ($_REQUEST['srt'] == "category_name DESC") {
    $arr_order_number = "<span class=\"sort-arrow-up\"></span>";
} else {
    if ($_REQUEST['srt'] == "category_name") {
        $arr_order_number = "<span class=\"sort-arrow-down\"></span>";
    } else {
        $arr_order_number = "<span class=\"sort-arrow-down\"></span>";
    }
}
// STORED VALUE