Ejemplo n.º 1
0
/**
 * fungsi display category khusus menggunakan rekursif
 * @param type $parent
 * @param type $titik_titik
 */
function display_categories($parent = 0, $titik_titik = '')
{
    $sql = sql_display_table_master_categories_by_parent_category($parent);
    $query = db_query($sql);
    while ($row = db_fetch($query)) {
        start_row("class='odd gradeX'");
        text_cell($row['id'], "align='center'");
        text_cell($titik_titik . $row['category_name'], "align='left'");
        text_cell($row['description'], "align='left'");
        edit_delete_link('tb_categories', $row['id'], $_SESSION['key'], "");
        end_row();
        $is_there = is_there_category_by_parent($row['id']);
        if ($is_there) {
            display_categories($row['id'], $titik_titik . "---- ");
        }
    }
}
Ejemplo n.º 2
0
    end_row();
    end_table();
    link_text("?" . $parameter_key . "kd_tabel=tb_stores", '<- kembali');
} else {
    //-------------------------------DISPLAY-----------------------------------------
    submit_button('AddNew', 'Add New');
    $sql = sql_display_table_master_stores();
    $query = db_query($sql);
    $jumlah = db_num_rows($query);
    br();
    echo "Jumlah data : " . $jumlah;
    br(2);
    start_table("border='3px' class='data display datatable' id='example' width='80%'");
    $head = array('Id Store', 'Store Name', 'Description', 'Address', 'Contact', 'Person Name', 'Action');
    head_table($head);
    while ($row = db_fetch($query)) {
        start_row("class='odd gradeX'");
        text_cell($row['id'], "align='center'");
        text_cell($row['store_name'], "align='left'");
        text_cell($row['description'], "align='left'");
        text_cell($row['address'], "align='left'");
        text_cell($row['contact'], "align='left'");
        text_cell($row['nama'], "align='left'");
        edit_delete_link('tb_stores', $row['id'], $_SESSION['key']);
        end_row();
    }
    end_table();
}
end_form();
br();
//------------------------------------------------------------------------------
Ejemplo n.º 3
0
    end_div();
    end_row();
    end_table();
    end_div();
} else {
    //-------------------------------DISPLAY-----------------------------------------
    submit_button('AddNew', '<i class="fa fa-plus"></i> Add New', "class='btn btn-primary'");
    $sql = sql_display_table_master_brands();
    $query = db_query($sql);
    $jumlah = db_num_rows($query);
    br();
    echo "Jumlah data : " . $jumlah;
    br();
    start_table(" class='table table-bordered table-striped table-hover' ");
    $head = array('Id Brand', 'Brand Name', 'Description', 'Action');
    head_table($head);
    while ($row = db_fetch($query)) {
        start_row("class='odd gradeX'");
        text_cell($row['id'], "align='center'");
        text_cell($row['brand_name'], "align='left'");
        text_cell($row['description'], "align='left'");
        edit_delete_link('tb_brands', $row['id'], $_SESSION['key']);
        end_row();
    }
    end_table();
}
end_form();
br();
//end div kotak
end_div();
//------------------------------------------------------------------------------