示例#1
0
}
/* -- BUTTON RESET -- */
if (empty($search_parameter)) {
    $reset = "hidden";
} else {
    $reset = "";
}
if (isset($_POST['btn_pop_category'])) {
    $cat_id = $_POST['cat_id'];
    $action = $_POST['option-action'];
    $option = $_POST['option-option'];
    if ($_POST['btn_pop_category'] == "GO") {
        if ($action == "delete") {
            foreach ($cat_id as $post_cat_id) {
                // CALL FUNCTION
                $listing_child = get_inspirations($post_cat_id);
                if ($listing_child['rows'] > 0) {
                    $_SESSION['alert'] = 'error';
                    $_SESSION['msg'] = "Can't delete item(s) because it contains one or more item(s)";
                } else {
                    delete_category($post_cat_id);
                    $_SESSION['alert'] = 'success';
                    $_SESSION['msg'] = "Item(s) has been successfully removed";
                }
            }
        } else {
            if ($action == 'visibility') {
                foreach ($cat_id as $post_cat_id) {
                    if ($option == 'yes') {
                        update_category_visibility(1, $post_cat_id);
                    } else {
示例#2
0
$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'];
$data_record = get_record_inspirations($search_query, $sort_by, $first_record, $query_per_page, $column_name, $opt_name, $record_name);
$total_query = $data_record['total_query'];
$total_page = $data_record['total_page'];
// RESULT
// CALL FUNCTION
$data = get_inspirations($search_query, $sort_by, $first_record, $query_per_page, $column_name, $opt_name, $record_name);
/* ARROW */
if ($_REQUEST['srt'] == "name DESC") {
    $arr_name = "<span class=\"sort-arrow-up\"></span>";
} else {
    if ($_REQUEST['srt'] == "name") {
        $arr_name = "<span class=\"sort-arrow-down\"></span>";
    } else {
        if ($_REQUEST['srt'] == "date_created DESC") {
            $arr_date_created = "<span class=\"sort-arrow-up\"></span>";
        } else {
            if ($_REQUEST['srt'] == "date_created") {
                $arr_odate_created = "<span class=\"sort-arrow-down\"></span>";
            } else {
                if ($_REQUEST['srt'] == "active DESC") {
                    $arr_active = "<span class=\"sort-arrow-up\"></span>";
示例#3
0
    ?>
<tr><td class="no-record" colspan="8">No records found.</td></tr><?php 
}
?>
                        
						<?php 
$row = 0;
foreach ($all_news as $list_category) {
    $row++;
    if ($list_category['visibility'] == 1) {
        $list_category['visibility'] = 'Yes';
    } else {
        $list_category['visibility'] = 'No';
    }
    // CALL FUNCTION
    $child = get_inspirations($list_category['category_id']);
    ?>
                        
                        <tr class="" id="<?php 
    echo "row_" . $row;
    ?>
" onclick="selectRow('<?php 
    echo $row;
    ?>
')">
                          <td><input type="checkbox" name="cat_id[]" id="<?php 
    echo "check_" . $row;
    ?>
" value="<?php 
    echo $list_category['category_id'];
    ?>