示例#1
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();
//------------------------------------------------------------------------------
示例#2
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 . "---- ");
        }
    }
}
 } else {
     //tidak ada parameter get id_item
     $head = array('No.', 'Item Code', 'Item Name', 'Id Category', 'Category', 'Action');
 }
 head_table($head);
 $no = 1;
 while ($row = db_fetch($query)) {
     start_row("class='odd gradeX'");
     text_cell($no, "align='center'");
     if (empty($id_item)) {
         //tidak ada parameter get id_item
         text_cell($row['item_code'], "align='left'");
         text_cell($row['item_name'], "align='left'");
     }
     text_cell($row['id_category'], "align='center'");
     text_cell($row['category_name'], "align='left'");
     //text_cell($row['description'], "align='left'");
     start_column("align='center' ");
     delete_link('tb_maping_item_category', $row['id'], $_SESSION['key'], "", "item=" . $id_item);
     end_column();
     end_row();
     $no++;
 }
 //ini satu item yang akan dikirim ke halaman form butuh item nya biar tidak bisa dirubah
 $item_ = $find_item['item_code'] . " >> " . $find_item['item_name'];
 if (!empty($id_item)) {
     input_hidden("item_name", $item_);
     input_hidden("id_item", $id_item);
     //parameter post id item untuk dikirim ke halaman form
 }
 end_table();
 }
 head_table($head);
 $no = 1;
 while ($row = db_fetch($query)) {
     start_row("class='odd gradeX'");
     text_cell($no, "align='center'");
     if (empty($id_item)) {
         //tidak ada parameter get id_item
         text_cell($row['item_code'], "align='left'");
         text_cell($row['item_name'], "align='left'");
     }
     text_cell($row['size'], "align='center'");
     text_cell($row['description'], "align='left'");
     text_cell(price_format($row['unit_price']), "align='right'");
     text_cell(price_format($row['discount']), "align='right'");
     text_cell(price_format($row['weight']), "align='right'");
     start_column("align='center' ");
     delete_link('tb_maping_item_size', $row['id'], $_SESSION['key'], "", "item=" . $id_item);
     end_column();
     end_row();
     $no++;
 }
 //ini satu item yang akan dikirim ke halaman form butuh item nya biar tidak bisa dirubah
 $item_ = $find_item['item_code'] . " >> " . $find_item['item_name'];
 if (!empty($id_item)) {
     input_hidden("item_name", $item_);
     input_hidden("id_item", $id_item);
     //parameter post id item untuk dikirim ke halaman form
 }
 end_table();
 if (!empty($id_item)) {
示例#5
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();
//------------------------------------------------------------------------------
示例#6
0
    start_table(" class='table table-bordered table-striped table-hover' ");
    $head = array('Id Item', 'Item Code', 'Item Name', 'Brand', 'Unit Price', 'Discount', 'Weight', 'Qty On Hand', 'Qty On PO', 'Qty On SO', 'Category', 'Image', 'Size', 'Action');
    head_table($head);
    while ($row = db_fetch($query)) {
        start_row("class='odd gradeX'");
        text_cell($row['id'], "align='center'");
        text_cell($row['item_code'], "align='left'");
        text_cell($row['item_name'], "align='left'");
        text_cell($row['brand_name'], "align='left'");
        //unit price - discount = harga jual
        text_cell(price_format($row['unit_price']), "align='right'");
        text_cell(price_format($row['discount']), "align='right'");
        text_cell(price_format($row['weight']), "align='right'");
        text_cell($row['qty_on_hand'], "align='center'");
        text_cell($row['qty_on_po'], "align='center'");
        text_cell($row['qty_on_so'], "align='center'");
        colom_link_text("index.php?" . $parameter_key . "kd_tabel=tb_maping_item_category&item=" . $row['id'], "category", $params);
        colom_link_text($link, "image", $params);
        colom_link_text("index.php?" . $parameter_key . "kd_tabel=tb_maping_item_size&item=" . $row['id'], "size", $params);
        start_column("align='center' ");
        edit_link('tb_items', $row['id'], $_SESSION['key']);
        end_column();
        end_row();
    }
    end_table();
}
end_form();
br();
//end div kotak
end_div();
//------------------------------------------------------------------------------