Skripsi
Sarjana Komputer
104091002815
JAKARTA
2010 M / 1432 H
SISTEM INFORMASI MONITORING KOROSI
PIPA MINYAK BERBASIS WEB
(Studi Kasus : Stasiun Rawa – PT. ConocoPhillips Indonesia Inc. Ltd)
Skripsi
Sebagai Salah Satu Syarat Untuk Memperoleh Gelar
Sarjana Komputer
Fakultas Sains dan Teknologi
Universitas Islam Negeri (UIN) Syarif Hidayatullah Jakarta
Oleh
Tommy Akbar Nugraha
104091002815
i
SISTEM INFORMASI MONITORING KOROSI
PIPA MINYAK BERBASIS WEB
(Studi Kasus : Stasiun Rawa – PT. ConocoPhillips Indonesia Inc. Ltd)
Skripsi
Sebagai Salah Satu Syarat Untuk Memperoleh
Gelar Sarjana Komputer
Pada Fakultas Sains dan Teknologi
Universitas Islam Negeri Syarif Hidayatullah Jakarta
Oleh
Tommy Akbar Nugraha
104091002815
Menyetujui,
Pembimbing I Pembimbing II
Mengetahui,
Ketua Program Studi Teknik Informatika
ii
PENGESAHAN UJIAN
Skripsi berjudul ”Sistem Informasi Monitoring Korosi Pipa Minyak Berbasis Web
(Studi Kasus : Stasiun Rawa – PT. ConocoPhillips Inc. Ltd)” yang ditulis oleh Tommy
Akbar Nugraha, NIM 104091002815 telah diuji dan dinyatakan lulus dalam sidang
Munaqosyah Fakultas Sains dan Teknologi Universitas Islam Negeri (UIN) Syarif
Hidayatullah Jakarta pada Hari Senin, Tanggal 31 Maret 2010. Skripsi telah diterima
sebagai salah satu syarat untuk memperoleh gelar sarjana strata satu (S1) Program Studi
Teknik Informatika.
Jakarta, Oktober 2010
Menyetujui,
Penguji I Penguji II
Pembimbing I Pembimbing II
Dekan Fakultas Sains dan Teknologi, Ketua Program Studi Teknik Informatika
UIN Syarif Hidayatullah Jakarta
iii
PERNYATAAN
LEMBAGA MANAPUN
iv
ABSTRAK
Oleh karena itu, penulis membuat sistem informasi yang ditujukan sebagai
media penyimpanan informasi, pengolahan informasi dan menganalisis informasi
sehingga didapat suatu rekomendasi tentang tindakan pencegahan atau perbaikan
yang perlu dilakukan. Penulis memilih sistem informasi berbasis web base, agar
sistem yang akan dibangun dapat diakses dimana saja baik pengguna yang ada di
kantor pusat ataupun pengguna di daerah penambangan.
v
KATA PENGANTAR
ConocoPhillips Inc. Ltd)” dengan baik. Shalawat serta salam selalu tercurah
sekarang ini.
Penulisan skripsi ini merupakan salah satu tugas wajib mahasiswa sebagai
persyaratan untuk menempuh gelar Strata 1 (S1) pada Program Studi Teknik
Penulis ingin menyampaikan rasa terima kasih kepada seluruh pihak yang
telah membantu sehingga penulisan skripsi ini dapat diselesaikan. Ucapan terima
1. Bapak Dr. Sopiyansyah Jaya Putra, M.SIS, selaku Dekan Fakultas Sains dan
2. Bapak Yusuf Durrachman, M.Sc, MIT, selaku Ketua Program Studi Teknik
Informatika, Ibu Viva Arifin, MMSI, selaku Sekretaris Program Studi Teknik
Informatika dan seluruh pihak akademik, baik tingkat program studi maupun
tingkat fakultas.
3. Bapak Bakri La Katjong, MT, M.Kom dan Bapak Zainul Arham M.Si, selaku
4. Ibu, Ayah dan Adik tercinta yang telah memberikan doa, dorongan baik moril
melakukan penelitian.
6. Seluruh staff PT. Wilson Walton Indonesia yang telah membantu penulis
skripsi ini.
8. Serta Semua pihak yang tidak dapat disebutkan satu persatu, yang telah
Penulis menyadari bahwa penulisan skripsi ini masih jauh dari sempurna,
oleh karena itu penulis mengharapkan kritik dan saran yang bersifat membangun
demi kesempurnaan penulisan di masa mendatang. Akhir kata semoga skripsi ini
vii
DAFTAR ISI
BAB 1 PENDAHULUAN
1.1 Latar Belakang ....................................................................................... 1
1.2 Perumusan Masalah ............................................................................... 4
1.3 Batasan Masalah .................................................................................... 4
1.4 Tujuan dan Manfaat Penelitian .............................................................. 5
1.4.1 Tujuan Penelitian ........................................................................... 5
1.4.2 Manfaat Penelitian ........................................................................ 5
1.5 Metode Penelitian .................................................................................. 6
1.5.1 Metode Pegumpulan Data ............................................................. 6
1.5.2 Metode Pengembangan Sistem ..................................................... 7
1.6 Kerangka Berfikir .................................................................................. 7
1.6.1 Corrosion Risk Assesment (CRA) ................................................. 8
1.7 Sistematika Penulisan ............................................................................ 9
viii
2.1.2 Penyebab Korosi ........................................................................... 11
2.1.3 Akibat Korosi ................................................................................ 13
2.1.4 Penanggulangan Korosi ................................................................ 14
2.1.5 Corrosion Risk Assesment (CRA) ................................................ 17
2.2 Konsep Dasar Sistem Informasi ............................................................. 21
2.2.1 Pengertian Sistem .......................................................................... 21
2.2.2 Pengertian Informasi ..................................................................... 23
2.2.3 Pengertian Sistem Informasi .......................................................... 25
2.3 Metode Pengembangan Sistem .............................................................. 27
2.4 Tools Analisis dan Desain Sistem Informasi ......................................... 29
2.4.1 Flowchart ...................................................................................... 29
2.4.2 Data Flow Diagram (DFD) ........................................................... 29
2.4.3 Entity Relationalship Diagram (ERD) .......................................... 31
2.4.4 Basis Data ..................................................................................... 33
2.5 Perangkat Lunak dalam Perancangan Sistem ........................................ 34
2.5.1 MySQL .......................................................................................... 34
2.5.1.1 Database, tabel, baris, kolom ............................................ 34
2.5.1.2 Perintah-perintah SQL ...................................................... 34
2.5.2 PHP ................................................................................................ 39
2.5.2.1 Nama File .......................................................................... 40
2.5.2.2 Tag Awal dan Tag Akhir .................................................. 41
2.5.2.3 Komentar .......................................................................... 42
2.5.2.4 Skrip PHP ......................................................................... 42
2.5.2.5 Case Sensitive ................................................................... 43
ix
3.3.2 Visi, Misi, Kebijakan dan Sasaran Mutu ....................................... 48
3.3.3 Struktur Organisasi ........................................................................ 49
3.4 Tahapan Penelitian .................................................................................. 51
3.5 Metode Pengumpulan Data ..................................................................... 51
3.5.1 Studi Pustaka.................................................................................. 51
3.5.2 Wawancara .................................................................................... 52
3.6 Metode Pengembangan Sistem ............................................................... 53
3.6.1 Perencanaan.................................................................................... 53
3.6.2 Analisis........................................................................................... 54
3.6.3 Perancangan ................................................................................... 55
3.6.4 Implementasi .................................................................................. 57
3.6.5 Pemeliharaan .................................................................................. 57
x
4.4.1 Sarana Pendukung Aplikasi ....................................................................... 105
4.4.2 Pengujian Sistem ....................................................................................... 106
4.4.2 Implementasi Sistem ................................................................................. 106
4.5 Pemeliharaan Sistem .......................................................................................... 106
BAB 5 PENUTUP
5.1 Kesimpulan ......................................................................................................... 108
5.2 Saran.................................................................................................................... 108
xi
DAFTAR GAMBAR
xii
DAFTAR TABEL
xiii
DAFTAR LAMPIRAN
xiv
DAFTAR SIMBOL
Flowchart Diagram
(Munawar, 2005)
xv
Menyatakan permulaan atau akhir
suatu program.
6 Terminal
xvi
DAFTAR ISTILAH
No Istilah Penjelasan
1. Database Kumpulan dari data atau fakta suatu
organisasi secara terstruktur dalam domain
tertentu untuk mendukung aplikasi pada
sistem tertentu
2. Hardware Perangkat lunak dapat juga dikatakan
sebagai 'penterjemah' perintah-perintah yang
dijalankan pengguna komputer untuk
diteruskan ke atau diproses oleh perangkat
keras.
3. Input Adalah segala sesuatu yang dibutuhkan agar
pelaksanaan kegiatan dan program dapat
berjalan atau dalam rangka menghasilkan
output, misalnya : sumber daya manusia,
dana, material, waktu, teknologi, dan
sebagainya.
xvii
12. User Pengguna sistem/individu yang berhubungan
dengan sistem, baik admin ataupun end user.
xviii
BAB I
PENDAHULUAN
bagian penting dari industri tersebut. Pada jaringan pipa terdapat berbagai
permasalahan yang dapat terjadi, salah satunya adalah korosi pada pipa. Jika
pada suatu pipa telah mengalami korosi, maka dapat dipastikan pipa tersebut
oleh sumur minyak untuk proses produksi. Dapat dilihat pada Tabel 1.1 dan
Gambar 1.1 bahwa korosi merupakan salah satu hal yang sangat penting
pada proses produksi minyak. Dari gambar tersebut dapat dilihat bahwa
untuk perawatan pipa dibutuhkan biaya yang tidak sedikit, sebab dari tahun
menurun dari tahun ke tahun. Dan salah satu penyebabnya adalah korosi.
1
2
6,000,000
5,760,000
5,520,000
5,296,900 5,280,000
5,172,650
5,000,000 5,014,100 5,040,000
4,935,000
4,837,700 4,800,000
4,560,000 4,643,800 4,614,400
4,439,400 4,374,510
4,320,000
4,080,000 4,138,680
4,000,000
(dalam US$)
3,840,000
3,600,000
3,000,000
2,000,000
1,000,000
0
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
Tahun
Produksi Minyak (dalam US$ / hari) Biaya Perawatan (dalam US$ / tahun)
korosi pada pipa. Jadi kita dapat mengetahui pipa yang memerlukan tindakan
industri minyak dan gas dokumentasi mengenai aset pipa masih kurang
informasi yang dibuat dapat menganalisa aktivitas atau tingkatan korosi dari
data yang ada beserta rekomendasi tentang tindakan pencegahan yang perlu
dilakukan dan juga dapat menyimpan dokumentasi aset pipa yang ada.
Tujuan dari dibuatnya sistem informasi berbasis web adalah agar hasil
analisa tersebut dapat dilihat dari mana saja, baik yang berada di jaringan
pipa ataupun diluar jaringan pipa dengan catatan memiliki koneksi internet.
Maksud dari dapat diakses dari luar jaringan pipa adalah agar kantor pusat
4
dapat melihat dan menentukan tindakan yang perlu dilakukan terhadap suatu
jaringan pipa.
adalah :
2. Menghasilkan sistem informasi yang dapat diakses dari mana saja oleh
jaringan pipa.
3. Sistem informasi yang dihasilkan dapat diakses dari mana saja, tidak
1. Bagi Penulis
perkuliahan
ada sebenarnya.
Jakarta.
2. Bagi Universitas
Teknologi Informasi.
c. Dapat dijadikan sebagai bahan bacaan atau acuan bagi peneliti lain
dapat ditekan.
a. Studi Pustaka
b. Wawancara
10 Komponen
Korosi
(Lampiran 2)
Decision
3. Dari hasil CRA tersebut didapat suatu kesimpulan tentang keadaan pipa,
pipa. CRA adalah proses yang dapat membantu dalam mengenali akan
CRR adalah tingkatan keadaan korosi pada suatu pipa, CRR ini dapat
Inspeksi
Atau
Survey
Data
Korosi
BAB I PENDAHULUAN
BAB V PENUTUP
LANDASAN TEORI
2.1. Korosi
serangan yang merusak logam karena logam bereaksi secara kimia atau
Korosi atau karat adalah suatu zat yang berwarna merah kecoklatan
yang berbentuk pada permukaan basi atau baja sebagai akibat adanya
itu sendiri mudah sekali mengalami karat yang menyebabkan korosi pada
11
12
Katoda: 2 H+ + 2 e- ® H2
berikut:
1. Kelembaban udara
2. Elektrolit
4. Adanya O2
1. Korosi Internal
Yaitu korosi yang terjadi akibat adanya kandungan CO2 dan H2S pada
minyak bumi, sehingga apabila terjadi kontak dengan air akan membentuk
2. Korosi Eksternal
Yaitu korosi yang terjadi pada bagian permukaan dari sistem perpipaan
dan peralatan, baik yang kontak dengan udara bebas dan permukaan
tanah, akibat adanya kandungan zat asam pada udara dari tanah.
tertentu akan menimbulkan karat (rust scale) dan lubang karat (rust hole).
Keadaan ini akan menyebabkan kondisi logam menjadi lemah dan tidak
berguna. Banyak installasi besi baja yang rusak karena peristiwa korosi
4. dan lain-lain
1. Protective Coating
korosi secara tuntas dan kerugian demi kerugian tetap saja terjadi, maka
Organic Coating.
teknik tersebut. Hal ini ternyata memberikan dampak baru dalam upaya
mencegah korosi.
Sejak itu telah banyak pula sistim dan produk baru yang
sebuah kompresor, sehingga besi atau baja itu bersih dari karat dan
atau baja tersebut bebas dari serangan korosi untuk masa waktu tertentu.
bukti yang dapat dipercaya dalam melindungi atau mencegah logam dari
2. Cathodic Protection
arus proteksi dari luar yang akan menekan atau menahan arus yang akan
Arus proteksi dari luar ini terus menerus mengalir melalui elektrolit
menuju permukaan logam yang hendak dilindungi. Arus dari luar ini
tersebut (polarisasi).
16
cara :
a. Sacrificial Anode
logam lain, dipasang pada permukaan besi yang akan dilindungi dan
b. Impressed Current
berikut :
dan besi yang akan dilindungi harus berada pada satu elektrolit yang
sama.
sebesar kurang lebih -0,6 V terhadap sel pembanding Cu/CuSO4. Angka ini
mungkin lebih rendah (-0,5 V) bila baja terkorosi, atau lebih besar (-0,6 V)
bila baja tersebut bersih dan diblasting. Korosi dapat dicegah dengan
17
jaringan pipa. Hasil dari CRA adalah suatu tingkatan resiko pada suatu
jaringan pipa, baik itu akan berdampak pada pekerja maupun jaringan pipa
tersebut akibat korosi. Hasil dari CRA juga dapat digunakan sebagai
berhubungan dengan pipa. Data yang dibutuhkan tidak hanya data yang
proses data, data produksi, data korosi, data leak, data pigging, dan data
keamanan pada pipa. Alur kerja CRA dari yang sederhana sampai dengan
Tingkatan Resiko Karat Æ Tingkatan Resiko karat Pipa Æ Tingkatan Korosi Pipa
Data Aset
(Lapangan & Kantor)
- Teknik Probability of Failure (PoF)
- Produksi Perhitungan
- Korosi Matrik Resiko Tingkatan Resiko Tingkatan Resiko
- Pigging
- Keamanan
- Leak Consequency of Failure (CoF)
- Dan lain-lain
Dari Gambar 2.3.b diatas kita dapat melihat alur kerja CRA lebih
rinci, proses awalnya yaitu dari proses pengumpulan data asset lapangan
dan kantor. Data yang dikumpulkan berupa data dari segi teknik, produksi,
kategori tersebut dibentuk menjadi suatu matrik, CoF sebagai sumbu x dan
PoF sebagai sumbu y dapat dilihat pada Gambar 2.4.a dan Gambar 2.4.b.
resiko korosi pada suatu jaringan pipa. Hasil akhir dari proses CRA atau
perhitungan tingkatan resiko adalah tingkatan resiko pipa untuk pipa yang
terkorosi.
komponen PoF dan CoF dari produksi (hidrokarbon) cluster line, yaitu
sebagai berikut:
PoF
CoF
A B C D E
Dari Gambar 2.5. diatas dapat dilihat pembagian data korosi berdasarkan
kategori PoF dan CoF berikut persentase komponennya dan besar bobot
Gambar 2.6. diatas adalah sebagai hasil yang akan didapat dari PoF dan
konsep dasar yang lebih tepat untuk bidang sistem informasi. Dimana
2006:45). Elemen tersebut bisa berupa organisasi, orang atau benda yang
Lingkungan luar dari suatu sistem adalah apapun diluar batas dari
4. Penghubung (Interface)
5. Masukan (Input)
6. Keluaran (Output)
7. Pengolahan (Process)
8. Sasaran (Objective)
1. Informasi Strategis
2. Informasi Taktis
3. Informasi Teknis
keputusan sehari-hari
(Jogiyanto, 2005:10) :
1. Akurat
Akurat berarti informasi harus bebas dari suatu kesalahan dan tidak
informasi tersebut.
3. Relevan
lainnya berbeda.
(Jogiyanto, 2005:10)
2004:12).
26
(Whitten, 2004:12)
2004:12)
perencanaan sampai penerapan. Disebut sebagai Life Cycle atau siklus hidup
(feasibility study).
tempat penelitian.
Design Specification), yaitu blue print dari sistem yang baru yang
terdiri dari :
DFD Level 1.
kamus data.
lingkungan.
2.4.1. Flowchart
Alir. Dari dua kata ini, maka dapat kita bayangkan bahwa flowchart itu
sederhana sampai yang kompleks. Masalah yang kita pelajari tentu saja
sehari-hari kita.
30
Dittman (2006) DFD adalah alat yang menggambarkan aliran data melalui
sistem dan kerja atau pengolahan yang dilakukan oleh sistem tersebut.
Merupakan diagram paling atas yang terdiri dari suatu proses dan
2. Proses ;
Kerja yang dilakukan pada atau sebagai respon terhadap aliran data
formulir/informasi.
4. Data store ;
nama dengan kata benda bersifat jamak. Data store dapat berupa
hubungan ;
5. Cardinality
pula sebaliknya.
1 1
anggota entitas A.
1 M
M N
Menurut McLeod (2001, 258), “Basis data adalah suatu koleksi data
menempatkan spesifikasi data dalam tabel dan kamus yang terpisah secara
fisik dari program. Program mengacu pada table untuk mengakses data.
2.5.1. MySQL
library yang berjalan disisi client. MySQL mampu untuk menangani data
server database. bahasa ini pada awalnya dikembangkan oleh IBM, namun
dua dimensi yang terdiri atas baris-baris data yang berada dalam
satu atau lebih kolom. Baris pada tabel sering disebut sebagai
a. Membuat Database
Perintah :
b. Membuat Tabel
Perintah:
adalah tipe data dan jumlah digit (jika ada) untuk field yang
c. Menghapus Tabel
Perintah:
d. Menghapus Database
Perintah:
a. Insert
Perintah:
b. Update
Perintah:
field1, field2 dan nilai2 adalah nama field dan datanya, dan
akan diperbaiki.
c. Delete
Perintah:
dihapus.
39
d. Select
Perintah:
[ WHERE kondisi]
2.5.2. PHP
script yang membuat dokumen HTML secara on the fly, dokumen HTML
yang dihasilkan dari suatu aplikasi bukan dokumen HTML yang dibuat
web menjadi lebih mudah. Proses update data dapat dilakukan dengan
Page, FI adalah Form Interface. Dibuat pertama kali oleh Rasmus Lerdoff.
1. Cara I
2. Cara II
3. Cara III
4. Cara IV
mengasumsikan bahwa <? adalah awal dari script PHP. Pada cara
2.5.2.3. Komentar
pemrograman C
pemrograman C++
1. <?
?>
2. <?php
?>
</script>
METODOLOGI PENELITIAN
3.1.1. Alat
dan untuk membangun aplikasi ini adalah perangkat keras dan lunak.
1. Perangkat Keras
o Harddisk 80 GB
o Memory DDR2 2 GB
o LAN Card
o DVD – RW
b. Printer Kyocera
2. Perangkat Lunak
b. Macromedia Dreamweaver
c. XAMPP
44
45
3.1.2. Bahan
No Bahan Sumber
1. Drawing PDF as-built. PT. Conoco Phillips Indonesia (COPI)
Indonesia (COPI), yaitu PT. Wilson Walton Indonesia yang berkaitan untuk
Jalan Raya Tanjung Barat No. 155 Jakarta Selatan 12350 Indonesia.
bidang, diantaranya:
dari desain sampai realisasi jasa berjalan sesuai prosedur. Pelayanan ini
jangkauan produk dan jasa yang luas, dimana semuanya ini terarah pada
mengutamakan mutu produk dan jasa, disiplin kerja dan dokumentasi hasil
Visi, Misi dan menetapkan Kebijakan Mutu sebagai kerangka kerja untuk
a. Visi
pelanggan
49
b. Misi
suatu perusahaan, karena didalam organisasi itu terdapat dengan jelas fungsi
dan tanggung jawab dari setiap bagian. Jika setiap bagian tersebut berfungsi
harus dikerjakan oleh para pegawai agar dapat merealisakan apa yang
tugas kecil agar dikerjakan oleh penerima tugas, dan tugas ini harus
ditetapkan dengan jelas kepada siapa tugas ini diserahkan apa yang menjadi
kewajibannya dan kepada siapa sipenerima tugas ini bertanggung jawab atas
melainkan agar jelas yang harus dikerjakan dengan wewenang yang mereka
President Director
Marketing &
Commercial Director Operation Director Chief Financial
Officer
Assistant
Balikpapan
Operation Manager
Cost Control
Corrosion / CP Engineer Engineer Engineer Engineer IT
Engineer
Mulai 2
1 3 4
Identifikasi
Analisa Sistem
Kebutuhan (User Data Flow Sarana
yang Sedang Pemeliharaan
Need Assisment) Diagram (DFD) Pendukung
Berjalan Sistem
Aplikasi
Bagan Alir
Identifikasi Desain Kamus
Sistem yang Selesai
Masalah Data Implementasi
Sedang
Sistem
Berjalan
Tujuan Analisa
Pengembangan Kebutuhan Normalisasi 4
Sistem Sistem yang
Sedang Berjalan
1
Alternatif Desain Basis
Pemecahan Data
Masalah
2 ERD (Entity
Relationalshi
p Diagram)
Desain Struktur
Menu Sistem
Informasi
3.5.2. Wawancara
apa yang menjadi kebutuhan user untuk aplikasi yang akan dibangun
dan Pemeliharaan.
Perencanaan
Analisis
Perancangan
Implementasi
Pemeliharaan
3.6.1. Perencanaan
dibuat.
3.6.2. Analisis
3.6.3. Perancangan
dua tahap yang lebih rinci, desain utama dan detail desain. Bagian-
a. Perancangan Proses
normalisasi.
akan dikembangkan.
3.6.4. Implementasi
jaringan pipa.
3.6.5. Pemeliharaan
dapat juga diartikan sebagai suatu keinginan atau suatu hal. Untuk
aset pipa dan keadaan resiko pipa. Dari hasil penelitian dan
antara lain:
monitoring korosi.
59
60
berikut :
dengan baik dan proses penganalisaan data belum ada bentuk baku. Masih
belum terorganisir dengan baik, itu dikarenakan data tersebut belum tersusun
dengan rapih dan data tersebut hanya ada dalam bentuk lembaran-lembaran
kertas. Proses penganalisaan data belum ada bentuk baku, itu dikarenakan
Dapat dilihat pada Gambar 4.1 bahwa sistem monitoring korosi pipa
masing Field Engineer yang bertanggung jawab atas suatu jaringan pipa
kantor pusat.
Sistem yang Sedang Berjalan
Kantor Pusat /
Operator Field Engineer
General Manager
Start
Pengumpulan
Data
Korosi Pipa
End
pengumpulan data dan pemrosesan data hasil monitoring korosi pada pipa,
penyimpanan data, bisa saja catatan kertas tersebut hilang atau rusak.
a. Dibuat suatu program yang berfungsi untuk menyimpan data aset pipa
monitoring korosi.
General Manager
(Kantor Pusat)
Approval
CRR
CRR
Komponen Korosi
Sistem Informasi
Field Engineer Monitoring Korosi
Pipa Minyak
Decision
1.
Gathering Line
General
Water Sampling
Chemical Treatment
Scaling Tendency
Pigging Facility
Pipe Condition
CoF.
memiliki
...
pipeline_number
gl_chemical_ treatment
gl_ water_ sampling condition _ct
pipeline_number
line_type
... line_type chemical_ treatment_ type
gl_ general
nos condition_ws
pipeline_number ...
gl_int_corr_mon_dev gl_pipe_ condition
line_type pipe_ grade
pipeline_number ... pipeline_number ...
pipe_size
line_type condition line_type original_gl
fitting_size location
4.3.2.2 Normalisasi
a. Unnormalized
berulang.
gl_water_sampling gl_pigging_facility
pipeline_number pipeline_number
line_type line_type
water_sampling_facility facility_avaibiality
location barrel_length_launcher
nos nominal_length_launcher
condition reducer_length_launcher
temperature bridle_door_launcher
ph valve_body_width_launcher
sand access_length_launcher
h2s access_width_launcher
co2_dissolved barrel_od_launcher
srb barrel_id_launcher
mn barrel_t_launcher
residual_amine nominal_t_launcher
residual_phosphate barrel_length_receiver
residual_sulfit nominal_length_receiver
alkalinity reducer_length_receiver
cl bridle_door_receiver
sulfate valve_body_width_receiver
o2_dissolved access_length_receiver
iron_count access_width_receiver
barrel_od_receiver
barrel_id_receiver
barrel_t_receiver
nominal_t_receiver
pigging_type
clean_pig_recomendation
clean_pig_activity
out_come
72
gl_general gl_int_corr_mon_dev
pipeline_number pipeline_number
line_type line_type
description facility_access_fitting
service location_device
status fitting_size
equipment access_fitting_type
pipe_size nos_af
schedule fitting_manufacture
nominal_wt condition
year_built plug_manufacture
flange_rating coupon_type
design_temp holder_length
pipe_grade installation_date
smys retrieving_date
length coupon_surface_area
year_service density
psv_setting probe_type
fluid_from probe_element
design_factor probe_length
design_press probe_span
design_life probe_id
current_service installation_date
bopd corr_rate
bwpd coupon_id_a
bfpd initial_weight_a
mscfd final_weight_a
remaining_life color_coupon_a
op_temp body_attack_a
op_press washer_attack_a
calculated_actual_maop edge_attack_a
actual_maop erosion_attack_a
scale_a
pitting_a
debris_a
coupon_id_b
initial_weight_b
final_weight_b
color_coupon_b
body_attack_b
washer_attack_b
edge_attack_b
erosion_attack_b
scale_b
pitting_b
debris_b
73
b. 1NF
Fathansyah Ir (1999:65)
gl gl_pipe_condition gl_corr_risk_data
gl_corr_rate gl_ext_corr_protection
retrieving_corr_rate_coupon type_cp
corr_rate_coupon anode_weight
interrogated_corr_rate_probe anode_type
corr_rate_probe nos_anode
date_previous_wall_thickness year_installed
date_current_wall_thickness design_life
wt_remaining_previous_wall_thickness current_output
wt_remaining_current_wall_thickness test_point_nos
defect_length_max insulation_flange
corr_rate highest_pipe_soil_potential
total_wt_lost lowest_pipe_soil_potential
soil_resistivity_location
soil_resistivity_lowest
soil_corrosiveness_category
highest_soil_resistivity
74
gl_pigging_facility
facility_avaibiality
barrel_length_launcher
nominal_length_launcher
reducer_length_launcher
bridle_door_launcher
valve_body_width_launcher
access_length_launcher
access_width_launcher
barrel_od_launcher
barrel_id_launcher
barrel_t_launcher
nominal_t_launcher
barrel_length_receiver
nominal_length_receiver
reducer_length_receiver
bridle_door_receiver
valve_body_width_receiver
access_length_receiver
access_width_receiver
barrel_od_receiver
barrel_id_receiver
barrel_t_receiver
nominal_t_receiver
pigging_type
clean_pig_recomendation
clean_pig_activity
out_come
75
gl_general gl_int_corr_mon_dev
description facility_access_fitting
service location_device
status fitting_size
equipment access_fitting_type
pipe_size nos_af
schedule fitting_manufacture
nominal_wt condition
year_built plug_manufacture
flange_rating coupon_type
design_temp holder_length
pipe_grade installation_date
smys retrieving_date
length coupon_surface_area
year_service density
psv_setting probe_type
fluid_from probe_element
design_factor probe_length
design_press probe_span
design_life probe_id
current_service installation_date
bopd corr_rate
bwpd coupon_id_a
bfpd initial_weight_a
mscfd final_weight_a
remaining_life color_coupon_a
op_temp body_attack_a
op_press washer_attack_a
calculated_actual_maop edge_attack_a
actual_maop erosion_attack_a
scale_a
pitting_a
debris_a
coupon_id_b
initial_weight_b
final_weight_b
color_coupon_b
body_attack_b
washer_attack_b
edge_attack_b
erosion_attack_b
scale_b
pitting_b
debris_b
76
c. 2NF
gl_ext_corr_protection gl_pipe_condition
gl_int_corr_mon_dev
id_ext* id_pipe_condition*
id_int_corr_mon_dev*
id_type_cp original_gl
facility_access_fitting
anode_weight location
location_device
anode_type km
fitting_size
nos_anode anomaly_length
access_fitting_type
year_installed pipe_anomaly
nos_af
design_life type_coating
fitting_manufacture
current_output condition_coating
condition
plug_manufacture test_point_nos
coupon_type insulation_flange
holder_length highest_pipe_soil_potential
installation_date lowest_pipe_soil_potential
retrieving_date soil_resistivity_location
coupon_surface_area soil_resistivity_lowest
density id_soil_corrosiveness**
probe_type highest_soil_resistivity
probe_element
probe_length
probe_span
corr_rate
gl_pigging_facility
scale_coupon
id_pig*
corr_rate
facility_avaibiality
coupon_id_a
barrel_length_launcher
initial_weight_a
nominal_length_launcher
final_weight_a
reducer_length_launcher
color_coupon_a
bridle_door_launcher
body_attack_a
valve_body_width_launcher
washer_attack_a
access_length_launcher
edge_attack_a
access_width_launcher
erosion_attack_a
barrel_od_launcher
scale_a
barrel_id_launcher
pitting_a
barrel_t_launcher
debris_a
nominal_t_launcher
coupon_id_b
barrel_length_receiver
initial_weight_b
nominal_length_receiver
final_weight_b
reducer_length_receiver
color_coupon_b
bridle_door_receiver
body_attack_b
valve_body_width_receiver
washer_attack_b
access_length_receiver
edge_attack_b
access_width_receiver
erosion_attack_b
barrel_od_receiver
scale_b
barrel_id_receiver
pitting_b
barrel_t_receiver
debris_b
nominal_t_receiver
pigging_type
clean_pig_recomendation
clean_pig_activity
out_come
78
d. 3NF
disederhanakan lagi.
gl_water_sampling gl_chemical_treatment
gl
id_water* id_chemical*
id_gl*
id_gl** id_gl**
pipeline_number
water_sampling_facility chemical_treatment_facility
line_type
location chemical_treatment_type
description
nos location
service
condition condition
status
temperature nos
ph access_fitting_system
sand device_manufacture
gl_general
h2s injection_tube
id_general*
co2_dissolved operation_condition
id_gl**
srb treatment_method
equipment
mn brand
pipe_size
residual_amine injection_rate
schedule
residual_phosphate recomendation_injection_rate
nominal_wt
residual_sulfit
year_built
alkalinity
flange_rating
cl
design_temp gl_scaling_tendency
sulfate
pipe_grade id_scaling_tendency*
o2_dissolved
smys id_gl**
iron_count
length sampling_facility
year_service fitting_size
psv_setting access_fitting_type
gl_corr_risk_data
fluid_from nos_af
id_corr_risk*
design_factor fitting_manufacture
id_gl**
design_press condition
contingency_line
design_life plug_manufacture
community
current_service coupon_type
population_density
bopd holder_length
no_leak
bwpd installation_date
date_leak
bfpd retrieving_date
remedial_action
mscfd scale_index
location
remaining_life tendency
op_temp scale_growth
op_press
calculated_actual_maop
actual_maop
79
gl_ext_corr_protection gl_pipe_condition
gl_int_corr_mon_dev
id_ext* id_pipe_condition*
id_int_corr_mon_dev*
id_gl** id_gl**
id_gl**
id_type_cp original_gl
facility_access_fitting
anode_weight location
location_device
anode_type km
fitting_size
nos_anode anomaly_length
access_fitting_type
year_installed pipe_anomaly
nos_af
design_life type_coating
fitting_manufacture
current_output condition_coating
condition
plug_manufacture test_point_nos
coupon_type insulation_flange
holder_length highest_pipe_soil_potential gl_corr_rate
installation_date lowest_pipe_soil_potential id_corr_rate*
retrieving_date soil_resistivity_location id_gl**
coupon_surface_area soil_resistivity_lowest retrieving_corr_rate_coupon
density id_soil_corrosiveness** corr_rate_coupon
probe_type highest_soil_resistivity interrogated_corr_rate_probe
probe_element corr_rate_probe
probe_length date_previous_wall_thickness
probe_span date_current_wall_thickness
gl_pigging_facility wt_remaining_previous_wall_thickness
corr_rate
id_pig* wt_remaining_current_wall_thickness
scale_coupon
id_gl** defect_length_max
corr_rate
facility_avaibiality corr_rate
coupon_id_a
barrel_length_launcher total_wt_lost
initial_weight_a
nominal_length_launcher
final_weight_a
reducer_length_launcher
color_coupon_a
bridle_door_launcher
body_attack_a
valve_body_width_launcher
washer_attack_a
access_length_launcher
edge_attack_a
access_width_launcher
erosion_attack_a
barrel_od_launcher
scale_a
barrel_id_launcher
pitting_a
barrel_t_launcher
debris_a
nominal_t_launcher
coupon_id_b
barrel_length_receiver
initial_weight_b
nominal_length_receiver
final_weight_b
reducer_length_receiver
color_coupon_b
bridle_door_receiver
body_attack_b
valve_body_width_receiver
washer_attack_b
access_length_receiver
edge_attack_b
access_width_receiver
erosion_attack_b
barrel_od_receiver
scale_b
barrel_id_receiver
pitting_b
barrel_t_receiver
debris_b
nominal_t_receiver
pigging_type
clean_pig_recomendation
clean_pig_activity
out_come
80
gl_water_sampling gl_int_corr_mon_dev
id_water* id_int_corr_mon_dev*
id_gl** id_gl**
water_sampling_facility facility_access_fitting
location location_device
… …
gl_general gl_ext_corr_protection
id_general* id_ext*
id_gl** id_gl**
equipment id_type_cp
pipe_size anode_weight
… …
gl
id_gl*
gl_corr_risk_data gl_pigging_facility
pipeline_number
id_corr_risk* id_pig*
line_type
id_gl** id_gl**
description
contingency_line facility_avaibiality
service
community barrel_length_launcher
status
… …
gl_pipe_condition
gl_chemical_treatment id_pipe_condition*
id_chemical* id_gl**
id_gl** original_gl
chemical_treatment_facility location
chemical_treatment_type …
…
gl_corr_rate
gl_scaling_tendency id_corr_rate*
id_scaling_tendency* id_gl**
id_gl** retrieving_corr_rate_coupon
fitting_size corr_rate_coupon
access_fitting_type …
…
1. Nama Tabel : gl
PrimaryKey : id_gl
ForeignKey :-
Line','Water
Injection
Line','Gas Lift
Line'
description TEXT
service VARCHAR 30
running'
PrimaryKey : id_chemical
84
ForeignKey : id_gl
id_chemical INT 50
nt_type Inhibitor','Biocide','De
mulsifier','Oxygen
Scavanger','N/A'
able'
Nos INT 30
Fitting','Threadolet
Nipple','N/A'
re hers'
s'
on Running'
85
Continous'
Brand VARCHA 30
injection_rate INT 20
recommendation_ INT 20
injection_rate
PrimaryKey : id_corr_rate
ForeignKey : id_gl
id_corr_rate INT 50
retrieving_date_coup DATE
on
corr_rate_coupon DOUBLE
interrogated_date_pro DATE
86
be
corr_rate_probe DOUBLE
date_previous_inspec DATE
tion
date_current_inspecti DATE
on
wt_remaining_previo DOUBLE
us
wt_remaining_curren DOUBLE
total_wt_lost DOUBLE
defect_length_max DOUBLE
corr_rate_wt INT 15
PrimaryKey : id_corr_risk
ForeignKey : id_gl
id_corr_risk INT 50
Install','No Contingency
Line','No Data'
Compensation','Get Impact
No Compensation','No
Data'
Data'
date_leak DATE
Clamp','Permanent
Sleeve/patching','Cut and
Replace','None'
Location VARCHAR 50
protection
PrimaryKey : id_ext
ForeignKey : id_gl
88
id_ext INT 50
ICCP','None'
anode_weight INT 10
anode_type INT 10
nos_anode INT 10
year_installed INT 10
design_life_cp INT 10
current_output INT 10
test_point_nos INT 10
insulation_flange INT 10
tr_output_v INT 10
tr_output_a INT 10
highest_pipe_soil INT 10
lowest_pipe_soil INT 10
location_soil VARCHAR 10
lowest_soil INT 50
Corrosive','Corrosive','Very
89
Corrosive'
highest_soil INT 50
PrimaryKey : id_general
ForeignKey : id_gl
id_general INT 50
date_update DATE
design_factor FLOAT
smys INT 10
design_press INT 10
nominal_wt FLOAT
length INT 10
design_life INT 10
90
year_built INT 10
year_service INT 10
current_service VARCHAR 50
fange INT 10
psv_setting INT 10
design_temp INT 10
fluid_from TEXT
bopd FLOAT
bwpd FLOAT
bfpd FLOAT
mscfd FLOAT
remaining_life INT 20
op_temp INT 20
op_press INT 20
calculated_maop FLOAT
actual_maop INT 20
monitoring device
PrimaryKey : id_int_corr
ForeignKey : id_gl
91
id_int_corr INT 50
Fitting','N/A'
re hers'
e Weld','Flange','Threado
llet Nipple'
eable'
nos_af INT 10
plug_manufacture VARCHAR 20
Inch','Strip Coupon 2
Inch','Flush Disc
Coupon','N/A'
holder_length VARCHAR 50
installation_date_ DATE
92
coupon
retrieving_date DATE
coupon_surface INT 50
density INT 50
/A'
Loop','Flush'
probe_length INT 10
probe_span INT 10
probe_id INT 10
installation_date_ DATE
probe
corr_rate INT 10
coupon_id_a INT 10
initial_weight_a INT 10
final_weight_a INT 10
color_coupon_a VARCHAR 20
coupon_id_b INT 10
initial_weight_b INT 10
final_weight_b INT 10
color_coupon_b VARCHAR 20
PrimaryKey : id_pig
ForeignKey : id_gl
id_pig INT 50
94
barrel_length_launch INT 30
er
nominal_length_laun INT 30
cher
reducer_length_launc INT 30
her
bridle_door_launcher INT 30
valve_body_width_la INT 30
uncher
access_length_launch INT 30
er
access_width_launch INT 30
er
barrel_od_launcher INT 30
barrel_id_launcher INT 30
barrel_t_launcher INT 30
nominal_t_launcher INT 30
trap_height_launcher INT 30
kicker_launcher INT 30
balance_pipe_launch INT 30
er
reducer_type_launche INT 30
95
angle_launcher INT 30
barrel_length_receive INT 30
nominal_length_ INT 30
receiver
reducer_length_ INT 30
receiver
valve_body_width_ INT 30
receiver
access_length_ INT 30
receiver
access_width_ INT 30
receiver
balance_pipe_ INT 30
receiver
96
reducer_type_ INT 30
receiver
,'Inspection'
cleaning_pigging_rec INT 30
omendation
cleaning_pigging_act INT 30
ivity
date_pigging DATE
'Metal Loss'
PrimaryKey : id_pipe_condition
ForeignKey : id_gl
id_pipe_condi INT 50
tion
Support','Under
Ground','None'
Location','3rd Location','4th
Location','5th Location','6th
Location','7th Location','8th
Location','9th Location','10th
Location'
km INT 50
anomaly_leng INT 50
th
Support','Lay Down on
Soil','Hanging','None'
Coating','FBE','3LPE','3LPP','
Protective Coating','Bare'
ting Data'
PrimaryKey : id_scaling
ForeignKey : id_gl
id_scaling INT 50
Weld','Flange','Threadolle
t Nipple'
nos_af INT 20
rs'
le'
plug_manufacture VARCHAR 20
Inch','Scale Coupon 2
Inch','Flush Disc
Coupon','N/A'
holder_length INT 20
99
installation_date DATE
retrieving_date DATE
scale_index INT 10
Tendency'
scale_growth INT 20
PrimaryKey : id_water
ForeignKey : id_gl
id_water INT 50
id_gl INT 30
nos INT 30
able'
temperature INT 10
ph INT 10
sand INT 10
h2s INT 10
100
co2_dissolved INT 10
10000','SRB >=
10000','No Data'
mn INT 10
residual_amine INT 10
residual_phosph INT 10
ate
residual_sulfit INT 10
alkalinity INT 10
cl INT 10
sulfate INT 10
o2_dissolved INT 10
iron_count INT 10
PrimaryKey : username
ForeignKey :-
101
username VARCHAR 30
password VARCHAR 40
Sistem Informasi
Monitoring Korosi Pipa Minyak
Add Gathering
New Edit Delete SQL Excel
Line
User
Convert
Save Cancel Save Cancel to Risk Advance
Map
Excel Ranking View
Save Cancel
Sistem Informasi
Monitoring Korosi Pipa Minyak
Sistem Informasi
Monitoring Korosi Pipa Minyak
Waiting Cancel
Save Cancel Gathering
Detail Edit Approve Approve Line
Data Data
Save Cancel
baris-baris kode program yang dapat dimengerti oleh komputer. Selain itu
juga membahas sarana pendukung lain yang diperlukan agar sistem berjalan
dengan baik.
o Harddisk 80 GB
o Memory DDR2 2 GB
o LAN Card
o DVD – RW
o Printer Kyocera
o Macromedia Dreamweaver
o XAMPP
o Mozilla Firefox
106
dengan baik dalam arti masukan yang diterima dengan benar dan
hardware. Proses ini dapat dilakukan jika dalam proses implementasi sistem
PENUTUP
5.1 Kesimpulan
pembuatan laporan, serta informasi yang dihasilkan lebih akurat, cepat dan
5.2 Saran
2. Karena sistem ini hanya digunakan untuk mengolah data yang berasal dari
108
109
diproses adalah data yang berasal langsung dari alat-alat yang digunakan
110
111
Syafii, M., 2005. Panduan Membuat Aplikasi Database dengan PHP 5 MySQL
PostgreSQL Oracle. Penerbit Andi, Yogyakarta.
112
LAMPIRAN A
WAWANCARA
1. Wawancara 1
113
114
2. Wawancara 2
3. Wawancara 3
4. Wawancara 4
Kesimpulan Wawancara :
o Tugas dari bagian operation adalah melakukan perencanaan dan pelaksana
program yang telah dirancang di bidang korosi, baik itu program perawatan
pipa, perbaikan pipa ataupun survey pada suatu jaringan pipa.
o Hasil data monitoring korosi pipa hanya menggunakan lembaran-lembaran
kertas sebagai media penyimpanannya, belum adanya bentuk baku untuk
menganalisa data.
Dari kesimpulan di atas dapat diketahui bahwa proses penyimpanan dan
penganalisaan data monitoring korosi masih belum efektif sehingga dibutuhkan
suatu sistem informasi yang dapat digunakan penganalisaan data monitoring
korosi dan sebagai penyimpanan data aset pipa yang dapat diakses kapan saja dan
dimana saja, sehingga General Manager dapat memutuskan tindakan apa yang
perlu dilakukan pada suatu jaringan pipa.
LAMPIRAN B
KUESIONER
Kuesioner ini bertujuan untuk meminta pendapat kepada para Engineer dan
Manager setelah mencoba “Sistem Informasi Monitoring Korosi Pipa Minyak
Berbasis Web” yang penulis ajukan.
Nama :
Jabatan : Engineer / Manager
1. Apakah Anda sudah mencoba menggunakan “Sistem Informasi
Monitoring Korosi Pipa Minyak Berbasis Web” ?
a. Ya b. Tidak
4. Apakah pada waktu sistem ini Anda gunakan pernah terjadi error atau
tidak sesuai dengan permintaan yang diminta ?
a. Pernah b. Tidak Pernah
120
121
6. Menurut Anda, apakah sistem informasi ini layak untuk dijadikan sebagai
database data korosi dan penganalisa data korosi ?
a. Sangat Layak b. Layak
c. Cukup Layak d. Kurang Layak
122
TRANSKIP KUESIONER
b. Tidak 0 0
b. Mudah 7 70
c. Sulit 1 10
d. Sangat Sulit 0 0
b. Memadai 6 60
c. Cukup Memadai 2 20
d. Kurang Memadai 0 0
b. Baik 8 80
c. Cukup 1 10
d. Kurang 0 0
b. Layak 6 60
c. Cukup Layak 3 30
d. Kurang Layak 0 0
LAMPIRAN C
TAMPILAN APLIKASI
124
2. Halaman Utama Administrator
125
3. Halaman Administrasi Pengguna Sistem Informasi
126
4. Form Pengguna baru
127
5. Halaman Edit Akses Pengguna
128
6. Halaman Administrasi Backup Database
129
7. Halaman Utama Field Engineer (FE)
130
8. Halaman Ganti Password FE
131
9. Halaman Waiting Approval Data
132
10. Map Stasiun Rawa
133
11. Halaman Utama Gathering Line (GL)
134
12. Halaman Risk Ranking
135
13. Halaman General
136
14. Halaman Internal Corrosion Monitoring Device
137
15. Halaman Water Sampling
138
16. Halaman Chemical Treatment
139
17. Halaman Scaling Tendency
140
18. Halaman External Corrosion Protection
141
19. Halaman Corrosion Risk Data
142
20. Halaman Corrosion Rate
143
21. Halaman Pigging Facility
144
22. Halaman Pipe Condition
145
23. Halaman Edit Password Manager (MG)
146
24. Halaman Approval Data
147
25. Halaman Review Data Korosi
148
LAMPIRAN D
PENGUJIAN
Dibawah ini merupakan tabel hasil pengujian dari ”Sistem Informasi Monitoring
Korosi Pipa Minyak Berbasis Web (Studi Kasus : PT. ConocoPhillips Inc. Ltd)” :
sistem dengan
halaman login
pengguna
administrator, Field
Manager (MG)
logout.
149
150
pengedit ataupun
ada.
diinputkan.
yang diinginkan.
pengguna.
dan excel.
password.
Manager.
map. line.
gathering line.
gathering line
Manager.
cancel Manager.
1. index.htm
<html>
<head>
<title>Login WWI</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor=black text="#FFFFFF">
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="left" valign="bottom">
<td colspan="3" valign="middle">
<form name="form1" method="post" action="login.php">
<table width="150" border="3" align="center" cellpadding="0" cellspacing="0" bordercolor="#666666">
<tr>
<td width="300"><table width="285" height="97" border="0" align="center" cellpadding="5" cellspacing="0"
bgcolor="#0033CC">
<!--DWLayoutTable-->
<tr align="left" valign="bottom">
<td height="19" colspan="3" valign="top" align=center>
<img src=image/login.png>
<font size="4" face="Verdana, Arial, Helvetica, sans-serif">Login</font>
</td>
</tr>
<tr align="left" valign="bottom">
<td height="19" colspan="3" valign="top">
</td>
</tr>
<tr align="left" valign="bottom">
<td height="19" colspan="3" valign="top">
</td>
</tr>
<tr align="left" valign="middle">
<td>
</td>
<td width="64" height="22">
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Username:</font></p>
</td>
<td>
</td>
</tr>
<tr align="left" valign="bottom">
<td>
</td>
<td height="19" colspan="3" valign="top" width="194">
<input name="username" type="text" id="username" size="32">
</td>
<td>
</td>
</tr>
<tr align="left" valign="middle">
<td>
</td>
<td height="19">
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Password:</font></p></td>
<td>
</td>
</tr>
<tr align="left" valign="bottom">
<td>
</td>
<td height="19" colspan="3" valign="top">
<input name="password" type="password" id="password" size="32"></td>
</td>
<td>
</td>
</tr>
<tr align="left" valign="bottom">
<td height="19" colspan="3" valign="top">
</td>
</tr>
<tr align="left" valign="bottom">
<td>
</td>
153
154
<td height="17" colspan="3"><div align="center">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset">
</div></td>
<td>
</td>
</tr>
<tr align="left" valign="bottom">
<td height="19" colspan="3" valign="top">
</td>
</tr>
<tr align="left" valign="bottom">
<td>
</td>
<td height="19" colspan="3" valign="top" align=center>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color=red>@ 2010 PT. Wilson Walton Indonesia</p>
</td>
<td>
</td>
</tr>
<tr align="left" valign="bottom">
<td height="19" colspan="3" valign="top">
</td>
</tr>
</table></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
2. database.php
<?
$database="copi";
$hostname="localhost";
$user="root";
$pass="";
$koneksi=mysql_connect($hostname,$user,$pass);
mysql_select_db($database,$koneksi);
?>
3. login.php
<?php
include("database.php");
if(ereg("[a-z]|[A-Z]|[0-9]$",$username) && ereg("[a-z]|[A-Z]|[0-9]$",$password))
{
$pass=md5($password);
$perintah="SELECT * FROM user WHERE username = '$username'";
$query=mysql_query($perintah) or die ("ada yg salah");
$data=mysql_fetch_array($query);
$sesi_useradm=$data[username];
$sesi_usermg=$data[username];
$sesi_userfe=$data[username];
$sesi_userop=$data[username];
$sesi_user=$data[username];
$sesi_adm=$data[username];
if($pass=="")
$pass=" ";
if ($pass != $data[password] || $username!=$data[username])
{
header("Location:index.htm");
}
else
{
session_start();
if($data[status]=='0')
{
//Admin
session_register('sesi_useradm');
header("Location:admin/index.php");
}
else if($data[status]=='1')
{
155
//MG
session_register('sesi_usermg');
$user_loginmg = $data[username];
header("Location:mg/index.php");
}
else if($data[status]=='2')
{
//FE
session_register('sesi_userfe');
$user_loginfe = $data[username];
header("Location:fe/index.php");
}
else
{
header("Location:index.htm");
}
}
mysql_free_result($query);
}
else
{
header("Location:index.htm");
}
?>
4. session.php
<?php
session_start();
if (session_is_registered("sesi_useradm"))
{ }
else
header("Location:../index.htm");
?>
5. index.php (admin)
<html>
<head>
<style type="text/css">
a:hover,
a:focus { /* we use :focus for keyboard navigation */
z-index: 200 /* bring to top when the mouse is over */
}
a img {
border: none;
-webkit-transition: all .2s; /* in Safari, every animatable property triggers an animation in .2s */
}
a:hover img,
a:focus img {
-webkit-transform: scale(2);
-moz-transform: scale(2);
}
#GreyWhite {
background-color: #FBFBFB;
}
</style>
</head>
<body id="GreyWhite">
<?
include("database.php");
include("session.php");
?>
<center>
<br><br>
<h1>Admin</h1>
<br><br>
<table>
<tr>
<td align=center>
<a href="user.php?hal=1"><img src="../image/user.png" alt="a"
width="64"></a>
</td align=center>
<td>
<a href="backup_db.php"><img src="../image/database.png" alt="a"
width="64"></a>
</td>
<td align=center>
156
<a href="map.php"><img src="../image/map.png" alt="a"
width="64"></a>
</td>
<td align=center>
<a href="logout.php"><img src="../image/logout.png" alt="a"
width="64"></a>
</td>
</tr>
<tr>
<td align=center>
User
</td>
<td align=center>
Database
</td>
<td align=center>
Map
</td>
<td align=center>
Logout
</td>
</tr>
</table>
</center>
</body>
</html>
6. user.php
<html>
<head>
<style type="text/css">
a:hover,
a:focus { /* we use :focus for keyboard navigation */
z-index: 200 /* bring to top when the mouse is over */
}
a img {
border: none;
-webkit-transition: all .2s; /* in Safari, every animatable property triggers an animation in .2s */
}
a:hover img,
a:focus img {
-webkit-transform: scale(2);
-moz-transform: scale(2);
}
#GreyWhite {
background-color: #FBFBFB;
}
</style>
</head>
<body id="GreyWhite">
<?
include("database.php");
include("session.php");
?>
<center>
<br>
<table>
<tr>
<td align=center>
<a href="index.php"><img src="../image/home.png" alt="a"
width="32"></a>
</td>
<td align=center>
<a href="logout.php"><img src="../image/logout.png" alt="a"
width="32"></a>
</td>
</tr>
<tr>
<td align=center>
Home
</td>
<td align=center>
Logout
</td>
</tr>
</table>
<br>
<h2>User</h2>
157
<a href=add_user.php><img src=../image/add.png width=32></a><br>
Add New User
<table border=1 cellpadding=0 cellspacing=0 align="center">
<tr align="center">
<th bgcolor= class=> Username </th>
<th bgcolor= class=> Password </th>
<th bgcolor= class=> Status </th>
<th bgcolor= class=> Area </th>
<th bgcolor=> </th>
<th bgcolor=> </th>
</tr>
<?
$table = user;
$i=1;
$hal = $_GET[hal];
if(!isset($_GET['hal']))
{
$page = 1;
}
else
{
$page = $_GET['hal'];
}
$max_results = 21;
$from = (($page * $max_results) - $max_results);
$query = mysql_query("SELECT * FROM $table ORDER BY username ASC LIMIT $from, $max_results ");
while($baris = mysql_fetch_array($query))
{
if($i%2)
{
echo "<tr bgcolor=>";
}
else
{
echo "<tr bgcolor=>";
}
echo"
<td><font class=style8> $baris[0] </td>
<td><font class=style8> $baris[1] </td>
<td align=center><font class=style8>$baris[2]</td>
<td align=center><font class=style8>$baris[3]</td>
<td><a href='edit_user.php?username=$baris[0]' class=style2><img src=../image/edit.png width=32></a></td>
<td><a href='del_user.php?username=$baris[0]' class=style2><img src=../image/delete.png width=32></a></td>
</tr>";
$i++;
}
echo "</table><br><br>";
$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM $table"),0);
$total_pages = ceil($total_results / $max_results);
echo "<center><b><font class=style7>Select a Page</font></b><br>";
if($hal > 1)
{
$prev = ($page - 1);
echo "<a href=$_SERVER[PHP_SELF]?hal=$prev> <-Previous </a> ";
}
7. add_user.php
<html>
<head>
<style type="text/css">
a:hover,
a:focus { /* we use :focus for keyboard navigation */
z-index: 200 /* bring to top when the mouse is over */
}
a img {
border: none;
-webkit-transition: all .2s; /* in Safari, every animatable property triggers an animation in .2s */
}
a:hover img,
a:focus img {
-webkit-transform: scale(2);
-moz-transform: scale(2);
}
#GreyWhite {
background-color: #FBFBFB;
}
</style>
</head>
<body id="GreyWhite">
<?
include("database.php");
include("session.php");
?>
<center>
<table>
<tr>
<td align=center>
<a href="user.php?hal=1"><img src="../image/back.png" alt="a"
width="32"></a>
</td>
<td align=center>
<a href="index.php"><img src="../image/home.png" alt="a"
width="32"></a>
</td>
<td align=center>
<a href="logout.php"><img src="../image/logout.png" alt="a"
width="32"></a>
</td>
</tr>
<tr>
<td align=center>
Back
</td>
<td align=center>
Home
</td>
<td align=center>
Logout
</td>
</tr>
</table>
<br>
<h2>Form New User</h2>
<div align=center>
<form action="p_user.php" method="post">
<table width="400" height="140" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="left" valign="middle">
<td width="28" height="25" class="style7">Username</td>
<td width="8" height="25" class="style7">:</td>
<td width="92" height="25"><input name="username" type="text" id="username"></td>
</tr>
<tr align="left" valign="middle">
<td width="26" height="25" class="style7">Password</td>
<td width="8" height="25" class="style7">:</td>
<td height="25"><input name="password" type="password" id="password"></td>
</tr>
<tr align="left" valign="middle">
<td width="26" height="25" class="style7">Status</td>
<td width="8" height="25" class="style7">:</td>
<td height="25">
<select name="status">
159
<option value="">------- Status -------</option>
<option value="0">Admin</option>
<option value="1">GM</option>
<option value="2">FE</option>
<option value="3">OP</option>
</td>
</tr>
<tr align="left" valign="middle">
<td width="26" height="25" class="style7">Area</td>
<td width="8" height="25" class="style7">:</td>
<td height="25"><input name="area" type="text" id="area"></td>
</tr>
<tr>
<td height="25" colspan="3"><div align="center"><br>
<input type="submit" name="Submit" value="Save">
<a href="user.php?hal=1"><input type="reset" value="Cancel"></a>
</div>
</td>
</tr>
</table>
</form>
</div>
</center>
</body>
</html>
8. p_user.php
<html>
<body>
<?
include "session.php";
include "database.php";
$username=$_POST["username"];
$password=$_POST["password"];
$status=$_POST["status"];
$area=$_POST["area"];
$perintah="select username from user where username='$username'";
$query=mysql_query($perintah);
if($jumlah=mysql_num_rows($query)>0)
{
echo "<br><table align=center valign=middle><tr><td align=center class=style7>";
echo "Username yang dimasukkan sudah ada di dalam database !!!</td></tr>";
echo "<tr><td align=center><input type=button name=Submit value=Back onClick=self.history.back();>";
echo "</td></tr></table>";
}
else
{
$pass=md5($password);
$query2 ="INSERT INTO user (username,password,status,area) VALUES";
$query2 .="('$username','$pass','$status','$area')";
$hasil_mysql2=mysql_query($query2, $koneksi);
if($query2)
{
header("Location:user.php");
}
}
?>
</body>
</html>
9. edit_user.php
<html>
<head>
<style type="text/css">
a:hover,
a:focus { /* we use :focus for keyboard navigation */
z-index: 200 /* bring to top when the mouse is over */
}
a img {
border: none;
-webkit-transition: all .2s; /* in Safari, every animatable property triggers an animation in .2s */
}
a:hover img,
a:focus img {
-webkit-transform: scale(2);
-moz-transform: scale(2);
}
160
#GreyWhite {
background-color: #FBFBFB;
}
</style>
</head>
<body id="GreyWhite">
<?
include("database.php");
include("session.php");
?>
<center>
<h1>Admin</h1>
<table>
<tr>
<td align=center>
<a href="index.php"><img src="../image/home.png" alt="a"
width="32"></a>
</td>
<td align=center>
<a href="logout.php"><img src="../image/logout.png" alt="a"
width="32"></a>
</td>
</tr>
<tr>
<td align=center>
Home
</td>
<td align=center>
Logout
</td>
</tr>
</table>
<br>
<?
include("database.php");
$query=mysql_query("select * from user where username='$username'", $koneksi) or die (mysql_error());
while($row=mysql_fetch_array($query))
{
echo "<form method=post action=pedituser.php>";
echo "<center><table width=420 height=140 border=0 align=center cellpadding=0 cellspacing=0>";
echo "<tr><td height=50 colspan=3 align=center>";
echo "<b><font size=3 class=style7>Edit User</font></b></td></tr>";
echo "<tr align=left>";
echo "<td width=26 height=25 class=style7></td>";
echo "<td width=8 height=25 class=style7></td>";
echo "<td height=25 class=style7>
<input type=\"hidden\" name=\"username\" value=\"$row[0]\">";
echo "<tr align=left valign=middle>";
echo "<td width=96 height=25 class=style7>Username</td>";
echo "<td width=8 height=25 class=style7>:</td>";
echo "<td height=25>$row[0]";
echo "</td></tr>";
echo "<tr align=left valign=middle>";
echo " <td width=96 height=25 class=style7>Password</td>";
echo "<td width=8 height=25 class=style7>:</td>";
echo "<td height=25><input name=\"password\" type=\"password\">";
echo "</td></tr>";
echo "<tr align=left valign=middle>";
echo "<td width=26 height=25 class=style7>Status</td>";
echo "<td width=8 height=25 class=style7>:</td>";
echo "<td height=25><select name=\"status\">";
if($row[2]=='0')
{
echo "<option value=>------- Status -------</option>";
echo "<option value=\"0\" selected=\"selected\">Admin</option>";
echo "<option value=\"1\">GM</option>";
echo "<option value=\"2\">FE</option>";
echo "<option value=\"3\">OP</option>";
}
elseif($row[2]=='1')
{
echo "<option value=>------- Status -------</option>";
echo "<option value=\"0\">Admin</option>";
echo "<option value=\"1\" selected=\"selected\">GM</option>";
echo "<option value=\"2\">FE</option>";
echo "<option value=\"3\">OP</option>";
}
elseif($row[2]=='2')
{
161
echo "<option value=>------- Status -------</option>";
echo "<option value=\"0\">Admin</option>";
echo "<option value=\"1\">GM</option>";
echo "<option value=\"2\" selected=\"selected\">FE</option>";
echo "<option value=\"3\">OP</option>";
}
elseif($row[2]=='3')
{
echo "<option value=>------- Status -------</option>";
echo "<option value=\"0\">Admin</option>";
echo "<option value=\"1\">GM</option>";
echo "<option value=\"2\">FE</option>";
echo "<option value=\"3\" selected=\"selected\">OP</option>";
}
else
{
echo "<option value=>------- Status -------</option>";
echo "<option value=\"0\">Admin</option>";
echo "<option value=\"1\">GM</option>";
echo "<option value=\"2\">FE</option>";
echo "<option value=\"3\">OP</option>";
}
echo "<td></tr>";
echo "<tr><td> </td></tr>";
echo "<tr>
<td colspan=3 align=center><div align=\"center\"><a href=user.php?hal=1><input type=button name=\"cancel\"
value=\"cancel\"></a>
<input type=\"submit\" name=\"submit\" value=\"update\"></td></tr>";
echo "<tr><td> </td></tr>";
echo "</form>";
echo "</table>";
}
?>
</center>
</body>
</html>
10. pedituser.php
<html>
<body>
<?
include "session.php";
include "database.php";
$username=$_POST["username"];
$password=$_POST["password"];
$status=$_POST["status"];
$area=$_POST["area"];
$pass=md5($password);
$query="UPDATE user set password='$pass',status='$status',";
$query .="area='$area' where username='$username'";
$hasil_mysql=mysql_query($query, $koneksi);
if($query)
{
header("Location:user.php?hal=1");
}
?>
</body>
</html>
11. backup_db.php
<html>
<head>
<style type="text/css">
a:hover,
a:focus { /* we use :focus for keyboard navigation */
z-index: 200 /* bring to top when the mouse is over */
}
a img {
border: none;
-webkit-transition: all .2s; /* in Safari, every animatable property triggers an animation in .2s */
}
a:hover img,
a:focus img {
-webkit-transform: scale(2);
-moz-transform: scale(2);
}
162
#GreyWhite {
background-color: #FBFBFB;
}
</style>
</head>
<body id="GreyWhite">
<?
include("database.php");
include("session.php");
?>
<center>
<br>
<table>
<tr>
<td align=center>
<a href="index.php"><img src="../image/home.png" alt="a"
width="32"></a>
</td>
<td align=center>
<a href="logout.php"><img src="../image/logout.png" alt="a"
width="32"></a>
</td>
</tr>
<tr>
<td align=center>
Home
</td>
<td align=center>
Logout
</td>
</tr>
</table>
<br><br>
<b><h2>Backup Database<h2></b><br>
<table>
<tr>
<td align=center>
<a href="sql_backup.php"><img src="../image/sql.png" alt="a"
width="64"></a>
</td>
<td align=center>
<a href="xls_backup.php"><img src="../image/excel.png" alt="a"
width="64"></a>
</td>
</tr>
<tr>
<td align=center>
SQL
</td>
<td align=center>
Excel
</td>
</tr>
</table>
</center>
</body>
</html>
12. sql_backup.php
<?
include("database.php");
include("session.php");
$target="file";
if($target=="file")
{
header('Content-Type: application/octetstream');
header('Content-Disposition: filename="backup.sql"');
$asfile="download";
}
$crlf="\r\n";
$link = mysql_connect("localhost", "root", "");
$database = mysql_select_db("medco");
$dbname = "medco";
$dump_buffer="";
$tables = mysql_query("show tables from $dbname");
$num_tables = mysql_num_rows($tables);
163
if($num_tables == 0)
{
echo "# No Tables Found";
exit;
}
$dump_buffer.= "# DatabaseBackup $crlf";
$dump_buffer.= "# Backup made:$crlf";
$dump_buffer.= "# ".date("F j, Y, g:i a")."$crlf";
$dump_buffer.= "# Database: $dbname$crlf";
$dump_buffer.= "# Backed up tables : $dbname $crlf";
$i = 0;
while($i < $num_tables)
{
$table = mysql_tablename($tables, $i);
//echo $table . "<br>";
$dump_buffer.= "# --------------------------------------------------------$crlf";
$dump_buffer.= "$crlf#$crlf";
$dump_buffer.= "# Table structure for table '$table'$crlf";
$dump_buffer.= "#$crlf$crlf";
$db = $table;
$dump_buffer.= get_table_def($table, $crlf,$dbname).";$crlf";
$dump_buffer.= "$crlf#$crlf";
$dump_buffer.= "# Dumping data for table '$table'$crlf";
$dump_buffer.= "#$crlf$crlf";
$tmp_buffer="";
get_table_content($dbname, $table, 0, 0, 'my_handler', $dbname);
$dump_buffer.=$tmp_buffer;
$i++;
$dump_buffer.= "$crlf";
}
echo $dump_buffer;
exit;
function get_table_def($table, $crlf,$dbname)
{
$schema_create = "DROP TABLE IF EXISTS $table;$crlf";
$db = $table;
$schema_create .= "CREATE TABLE $table ($crlf";
$result = mysql_query("SHOW FIELDS FROM " .$dbname."."
. $table) or die();
while($row = mysql_fetch_array($result))
{
$schema_create .= " $row[Field] $row[Type]";
if(isset($row["Default"]) && (!empty($row["Default"]) || $row["Default"] == "0"))
$schema_create .= " DEFAULT '$row[Default]'";
if($row["Null"] != "YES")
$schema_create .= " NOT NULL";
if($row["Extra"] != "")
$schema_create .= " $row[Extra]";
$schema_create .= ",$crlf";
}
$schema_create = ereg_replace(",".$crlf."$", "", $schema_create);
$result = mysql_query("SHOW KEYS FROM " .$dbname."." .
$table) or die();
while($row = mysql_fetch_array($result))
{
$kname=$row['Key_name'];
$comment=(isset($row['Comment'])) ? $row['Comment'] : '';
$sub_part=(isset($row['Sub_part'])) ? $row['Sub_part'] : '';
if(($kname != "PRIMARY") && ($row['Non_unique'] == 0))
$kname="UNIQUE|$kname";
if($comment=="FULLTEXT")
$kname="FULLTEXT|$kname";
if(!isset($index[$kname]))
$index[$kname] = array();
if ($sub_part>1)
$index[$kname][] = $row['Column_name'] . "(" . $sub_part . ")";
else
$index[$kname][] = $row['Column_name'];
}
while(list($x, $columns) = @each($index))
{
$schema_create .= ",$crlf";
if($x == "PRIMARY")
$schema_create .= " PRIMARY KEY (";
elseif (substr($x,0,6) == "UNIQUE")
$schema_create .= " UNIQUE " .substr($x,7)." (";
elseif (substr($x,0,8) == "FULLTEXT")
$schema_create .= " FULLTEXT ".substr($x,9)." (";
else
164
$schema_create .= " KEY $x (";
$schema_create .= implode($columns,", ") . ")";
}
$schema_create .= "$crlf)";
if(get_magic_quotes_gpc()) {
return (stripslashes($schema_create));
} else {
return ($schema_create);
}
}
function get_table_content($db, $table, $limit_from = 0, $limit_to = 0,$handler)
{
// Defines the offsets to use
if ($limit_from > 0) {
$limit_from--;
} else {
$limit_from = 0;
}
if ($limit_to > 0 && $limit_from >= 0) {
$add_query = " LIMIT $limit_from, $limit_to";
} else {
$add_query = '';
}
get_table_content_fast($db, $table, $add_query,$handler);
}
function get_table_content_fast($db, $table, $add_query = '',$handler)
{
$result = mysql_query('SELECT * FROM ' . $db . '.' . $table . $add_query) or die();
if ($result != false) {
@set_time_limit(1200); // 20 Minutes
// Checks whether the field is an integer or not
for ($j = 0; $j < mysql_num_fields($result); $j++) {
$field_set[$j] = mysql_field_name($result, $j);
$type = mysql_field_type($result, $j);
if ($type == 'tinyint' || $type == 'smallint' || $type == 'mediumint' || $type == 'int' ||
$type == 'bigint' ||$type == 'timestamp') {
$field_num[$j] = true;
} else {
$field_num[$j] = false;
}
} // end for
// Get the scheme
if (isset($GLOBALS['showcolumns'])) {
$fields = implode(', ', $field_set);
$schema_insert = "INSERT INTO $table ($fields) VALUES (";
} else {
$schema_insert = "INSERT INTO $table VALUES (";
}
$field_count = mysql_num_fields($result);
$search = array("\x0a","\x0d","\x1a"); //\x08\\x09, not required
$replace = array("\\n","\\r","\Z");
while ($row = mysql_fetch_row($result)) {
for ($j = 0; $j < $field_count; $j++) {
if (!isset($row[$j])) {
$values[] = 'NULL';
} else if (!empty($row[$j])) {
// a number
if ($field_num[$j]) {
$values[] = $row[$j];
}
// a string
else {
$values[] = "'" . str_replace($search, $replace,
addslashes($row[$j])) . "'";
}
} else {
$values[] = "''";
} // end if
} // end for
$insert_line = $schema_insert . implode(',', $values) . ')';
unset($values);
// Call the handler
$handler($insert_line);
} // end while
} // end if ($result != false)
return true;
}
165
function my_handler($sql_insert)
{
global $crlf, $asfile;
global $tmp_buffer;
if(empty($asfile))
$tmp_buffer.= htmlspecialchars("$sql_insert;$crlf");
else
$tmp_buffer.= "$sql_insert;$crlf";
}
function faqe_db_error()
{
return mysql_error();
}
function faqe_db_insert_id($result)
{
return mysql_insert_id($result);
}
?>
13. xls_backup.php
<?
include("database.php");
include("session.php");
?>
<html>
<head>
<style type="text/css">
a:hover,
a:focus { /* we use :focus for keyboard navigation */
z-index: 200 /* bring to top when the mouse is over */
}
a img {
border: none;
-webkit-transition: all .2s; /* in Safari, every animatable property triggers an animation in .2s */
}
a:hover img,
a:focus img {
-webkit-transform: scale(2);
-moz-transform: scale(2);
}
#GreyWhite {
background-color: #FBFBFB;
}
</style>
<title>Daftar Tabel</title>
</head>
<body id="GreyWhite">
<br>
<div align=center>
<table>
<tr>
<td align=center>
<a href="backup_db.php"><img src="../image/back.png" alt="a"
width="32"></a>
</td>
<td align=center>
<a href="index.php"><img src="../image/home.png" alt="a"
width="32"></a>
</td>
<td align=center>
<a href="logout.php"><img src="../image/logout.png" alt="a"
width="32"></a>
</td>
</tr>
<tr>
<td align=center>
Back
</td>
<td align=center>
Home
</td>
<td align=center>
Logout
</td>
</tr>
166
</table>
</div>
<br>
<center>
<h2>Backup Database to Excel</h2>
</center>
<div align="center">
<table border="0" width="463" cellspacing="1" id="table1" style="font-family: Tahoma; font-size: 10pt; color: #000080">
<form method="POST" action="pxls_backup.php">
<tr>
<td bgcolor="#D3E3EB" width="459" valign="top" colspan="2">
</tr>
<?php
$koneksi=mysql_connect("localhost","$user","$password");
$query=mysql_query ("SHOW TABLE STATUS FROM $database Like '%' ");
while ($data=mysql_fetch_array($query) ) {
?>
<tr>
<td width="153" bgcolor="#F9D3A2">
<p style="margin: 2px 3px">
<font size="2"
color="#000080"> <?=$data[Name]?></font></td>
<td width="47" bgcolor="#F9D3A2">
<p style="margin: 2px 3px" align="center">
<font size="2"
color="#000080"><?=$data[Rows]?></font></td>
<td width="123" bgcolor="#F9D3A2">
<p style="margin: 2px 3px">
<font size="2"
color="#000080"> <?=$data[Create_time]?></font></td>
<td bgcolor="#F9D3A2">
<p style="margin: 2px 3px">
<input type="radio" value="<?=$data[Name]?>"
name="tabel"></td>
</tr>
<?
}
?>
</table>
</div>
</td>
</tr>
<tr>
<td colspan=4 bgcolor="#D3E3EB" width="83" valign="top" align=center>
<input type="submit" value="Convert to Excel" name="transfer">
</td>
</tr>
</form>
</table>
</div>
</body>
</html>
14. chg_pass.php
<html>
<head>
<style type="text/css">
a:hover,
167
a:focus { /* we use :focus for keyboard navigation */
z-index: 200 /* bring to top when the mouse is over */
}
a img {
border: none;
-webkit-transition: all .2s; /* in Safari, every animatable property triggers an animation in .2s */
}
a:hover img,
a:focus img {
-webkit-transform: scale(2);
-moz-transform: scale(2);
}
#GreyWhite {
background-color: #FBFBFB;
}
</style>
</head>
<body id="GreyWhite">
<?
include("database.php");
include("session.php");
?>
<center>
<br>
<table>
<tr>
<td align=center>
<a href="index.php"><img src="../image/home.png" alt="a"
width="32"></a>
</td>
<td align=center>
<a href="logout.php"><img src="../image/logout.png" alt="a"
width="32"></a>
</td>
</tr>
<tr>
<td align=center>
Home
</td>
<td align=center>
Logout
</td>
</tr>
</table>
<br>
<?
include("database.php");
$query=mysql_query("select * from user where username='$sesi_userfe'", $koneksi) or die (mysql_error());
while($row=mysql_fetch_array($query))
{
echo "<form method=post action=pchg_pass.php>";
</td>
</tr>";
echo "<tr><td> </td></tr>";
echo "</form>";
echo "</table>";
168
}
?>
</center>
</body>
</html>
15. pchg_pass.php
<html>
<body>
<?
include "session.php";
include "database.php";
$username=$_POST["username"];
$password=$_POST["password"];
$pass=md5($password);
$query="UPDATE user set password='$pass' where username='$username'";
$hasil_mysql=mysql_query($query, $koneksi);
if($query)
{
header("Location:index.php");
}
?>
</body>
</html>
16. save_data_gl.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Admin Panel (Proses Edit GL)</title>
<link href="../main.css" rel="stylesheet" type="text/css">
</head>
<body>
<?
include ("database.php");
include ("session.php");
//$year_service=
$tgl1 = $date_update;
$tgl2 = date("Y-m-d");
// memecah tanggal untuk mendapatkan bagian tanggal, bulan dan tahun dari tanggal pertama
$pecah1 = explode("-", $tgl1);
$date1 = $pecah1[2];
$month1 = $pecah1[1];
$year1 = $pecah1[0];
// memecah tanggal untuk mendapatkan bagian tanggal, bulan dan tahun dari tanggal kedua
$pecah2 = explode("-", $tgl2);
$date2 = $pecah2[2];
$month2 = $pecah2[1];
$year2 = $pecah2[0];
$year_service=$year2-$year_built;
//BFPD
$bfpd=$bopd+$bwpd;
//SMYS
if($pipe_grade='API 5L Grade B')
{
$smys=35000;
}
elseif($pipe_grade='API 5LX42')
{
$smys=42000;
}
//Nominal WT
if($pipe_size=='2')
{
if($schedule=='40')
{
$nominal_wt=0.154;
169
}
elseif($schedule=='80')
{
$nominal_wt=0.218;
}
}
elseif($pipe_size=='2.5')
{
if($schedule=='40')
{
$nominal_wt=0.203;
}
elseif($schedule=='80')
{
$nominal_wt=0.276;
}
}
elseif($pipe_size=='3')
{
if($schedule=='40')
{
$nominal_wt=0.216;
}
elseif($schedule=='80')
{
}
}
elseif($pipe_size=='3.5')
{
if($schedule=='40')
{
$nominal_wt=0.226;
}
elseif($schedule=='80')
{
$nominal_wt=0.318;
}
}
elseif($pipe_size=='4')
{
if($schedule=='40')
{
$nominal_wt=0.237;
}
elseif($schedule=='80')
{
$nominal_wt=0.337;
}
}
elseif($pipe_size=='5')
{
if($schedule=='40')
{
$nominal_wt=0.258;
}
elseif($schedule=='80')
{
$nominal_wt=0.375;
}
}
elseif($pipe_size=='6')
{
if($schedule=='40')
{
$nominal_wt=0.28;
}
elseif($schedule=='80')
{
$nominal_wt=0.432;
}
}
elseif($pipe_size=='8')
{
if($schedule='40')
{
$nominal_wt=0.322;
}
170
elseif($schedule=='80')
{
$nominal_wt=0.5;
}
}
elseif($pipe_size=='10')
{
if($schedule=='40')
{
$nominal_wt=0.365;
}
elseif($schedule=='80')
{
$nominal_wt=0.593;
}
}
elseif($pipe_size=='12')
{
if($schedule=='40')
{
$nominal_wt=0.406;
}
elseif($schedule=='80')
{
$nominal_wt=0.687;
}
}
//Remaining Life
$mawt=($op_press*$pipe_size)/((2*$smys*$design_factor)+$op_press);
$remaining_life=(($wt_remaining_current-$mawt)*1000)/$corr_rate_wt;
//Actual MAOP
if($psv_setting < $flange_rating)
{
$actual_maop=$psv_setting;
}
elseif(($psv_setting > $flange_rating) || ($psv_setting=0))
{
$actual_maop=$flange_rating;
}
//Calculated MAOP
$A=(0.893*$length)/sqrt($pipe_size*$nominal_wt);
$P=(2*$nominal_wt*$design_factor*$smys)/$pipe_size;
$X=1-((2*$total_wt_lost)/(3*$nominal_wt));
$Y=1-(((2/3)*$total_wt_lost)/($nominal_wt*(sqrt(($A*$A)+1))));
if($A<=4)
{
$calculated_maop=(1.1*$P*$Y)/$Y;
}
elseif($A>4)
{
$calculated_maop=1.1*$P*(1-($total_wt_lost/$nominal_wt));
}
//Corrosion Rate
if(($final_weight_a_int-$initial_weight_a_int) > ($final_weight_b_int-$initial_weight_b_int))
{
$weight_int=$final_weight_a_int-$initial_weight_a_int;
}
else
{
$weight_int=$final_weight_b_int-$initial_weight_b_int;
}
$date=($retrieving_date_int-$installation_date_coupon_int);
$corr_rate_int=($weight_int*22300)/($date*$density_int*$coupon_surface_int);
$query2="UPDATE gl_int_corr_mon_dev_fe set
fitting_size_int='$fitting_size_int',fitting_manufacture_int='$fitting_manufacture_int',access_fitting_type_int='$access_fitting_type_i
nt',condition_int='$condition_int',nos_af_int='$nos_af_int',plug_manufacture_int='$plug_manufacture_int',coupon_type_int='$coupo
n_type_int',holder_length_int='$holder_length_int',installation_date_coupon_int='$installation_date_coupon_int',";
$query2
.="retrieving_date_int='$retrieving_date_int',coupon_surface_int='$coupon_surface_int',density_int='$density_int',probe_type_int='$
probe_type_int',probe_element_int='$probe_element_int',probe_length_int='$probe_length_int',probe_span_int='$probe_span_int',pr
obe_id_int='$probe_id_int',installation_date_probe_int='$installation_date_probe_int',corr_rate_int='$corr_rate_int',coupon_id_a_int
='$coupon_id_a_int',";
$query2
.="initial_weight_a_int='$initial_weight_a_int',final_weight_a_int='$final_weight_a_int',color_coupon_a_int='$color_coupon_a_int',
body_attack_a_int='$body_attack_a_int',washer_attack_a_int='$washer_attack_a_int',edge_attack_a_int='$edge_attack_a_int',erosio
n_attack_a_int='$erosion_attack_a_int',scale_a_int='$scale_a_int',pitting_a_int='$pitting_a_int',debris_a_int='$debris_a_int',coupon_
id_b_int='$coupon_id_b_int',";
$query2
.="initial_weight_b_int='$initial_weight_b_int',final_weight_b_int='$final_weight_b_int',color_coupon_b_int='$color_coupon_b_int
',body_attack_b_int='$body_attack_b_int',washer_attack_b_int='$washer_attack_b_int',edge_attack_b_int='$edge_attack_b_int',erosi
on_attack_b_int='$erosion_attack_b_int',scale_b_int='$scale_b_int',pitting_b_int='$pitting_b_int',debris_b_int='$debris_b_int',status
_int='Waiting Approve' where id_gl='$id_gl'";
$hasil_mysql2=mysql_query($query2, $koneksi);
//Tendency
$query5="UPDATE gl_scaling_tendency_fe set
fitting_size='$fitting_size',access_fitting_type='$access_fitting_type',nos_af='$nos_af',fitting_manufacture='$fitting_manufacture',";
$query5
.="condition='$condition',plug_manufacture='$plug_manufacture',coupon_type='$coupon_type',holder_length='$holder_length',insta
llation_date='$installation_date',";
$query5
.="retrieving_date='$retrieving_date',scale_index='$scale_index',tendency='$tendency',scale_growth='$scale_growth',status='Waitin
g Approve' where id_gl='$id_gl'";
$hasil_mysql5=mysql_query($query5, $koneksi);
//Soil Corrosive
$query6="UPDATE gl_ext_corr_protection_fe set
type_cp='$type_cp',anode_weight='$anode_weight',anode_type='$anode_type',nos_anode='$nos_anode',year_installed='$year_instal
led',";
$query6
.="design_life_cp='$design_life_cp',current_output='$current_output',test_point_nos='$test_point_nos',insulation_flange='$insulatio
n_flange',tr_output_v='$tr_output_v',tr_output_a='$tr_output_a',highest_pipe_soil='$highest_pipe_soil',";
172
$query6
.="lowest_pipe_soil='$lowest_pipe_soil',location_soil='$location_soil',lowest_soil='$lowest_soil',soil_corrosive='$soil_corrosive',hi
ghest_soil='$highest_soil',status='Waiting Approve' where id_gl='$id_gl'";
$hasil_mysql6=mysql_query($query6, $koneksi);
//WT Lost
$total_wt_lost=$nominal_wt-$wt_remaining;
$query8="UPDATE gl_corr_rate_fe set
retrieving_date_coupon='$retrieving_date_coupon',corr_rate_coupon='$corr_rate_coupon',interrogated_date_probe='$interrogated_d
ate_probe',";
$query8
.="corr_rate_probe='$corr_rate_probe',date_previous_inspection='$date_previous_inspection',date_current_inspection='$date_curren
t_inspection',wt_remaining_previous='$wt_remaining_previous',";
$query8
.="wt_remaining_current='$wt_remaining_current',total_wt_lost='$total_wt_lost',defect_length_max='$defect_length_max',corr_rate
_wt='$corr_rate_wt',status='Waiting Approve' where id_gl='$id_gl'";
$hasil_mysql8=mysql_query($query8, $koneksi);
//$year_of_service= == gl_general
if($year_service <= 1)
{
$year_of_service=0.15*0;
}
elseif ($year_service <= 5)
{
$year_of_service=0.15*1.25;
}
elseif ($year_service <= 10)
{
$year_of_service=0.15*2.5;
}
elseif ($year_service < 16)
{
$year_of_service=0.15*3.75;
}
elseif ($year_service >= 16)
{
$year_of_service=0.15*5;
}
else
{
}
173
//$number_of_leak= gl_corr_risk_data ==> no of leak
if($no_of_leak <= 1)
{
$number_leak=0;
}
else if($no_of_leak <= 5)
{
$number_leak=0.15*1.25;
}
else if($no_of_leak < 10)
{
$number_leak=0.15*2.5;
}
else if($no_of_leak < 16)
{
$number_leak=0.15*3.75;
}
else if($no_of_leak >= 16)
{
$number_leak=0.15*5;
}
else
{
}
//$condition_coating=$data3[8];
if($condition_coating=="<5%")
{
$coating=0;
}
elseif($condition_coating=="5%-40%")
{
$coating=2.5*0.1;
}
elseif($condition_coating==">40%" || $condition_coating=="No Data")
{
$coating=5*0.1;
}
else
{
174
}
if($highest_pipe_soil < 850 || $highest_pipe_soil != 0)
{
$cathodic_protection=2.5*0.1;
}
elseif($highest_pipe_soil >= 850)
{
$cathodic_protection=0*0.1;
}
elseif($highest_pipe_soil = 0)
{
$cathodic_protection=5*0.1;
}
else
{
}
//Faktor PoF
175
$factor_pof=$year_of_service+$number_leak+$coating+$cathodic_protection+$corrosion_treatment+$mechanical_cleaning+$fl
uid_characteristic+$soil_resistivity;
//Category PoF
if($factor_pof <= 1)
{
$category_pof=1;
}
elseif ($factor_pof <= 2)
{
$category_pof=2;
}
elseif ($factor_pof <= 3)
{
$category_pof=3;
}
elseif ($factor_pof <= 4)
{
$category_pof=4;
}
elseif ($factor_pof > 4)
{
$category_pof=5;
}
while($baris = mysql_fetch_array($query3))
{
$jumlahBOPD=$jumlahBOPD+$baris[0];
}
$aBOPD=0; //0
$bBOPD=0.02*$jumlahBOPD; //2%
$cBOPD=0.05*$jumlahBOPD; //5%
$dBOPD=0.1*$jumlahBOPD; //10%
$eBOPD=0.15*$jumlahBOPD; //15%
if($bopd > 0)
{
$xBOPD=$bopd;
if($xBOPD==0)
{
$prod_loss=0;
}
elseif($xBOPD <= $bBOPD)
{
$prod_loss=0.5*2;
}
elseif($xBOPD <= $cBOPD)
{
$prod_loss=0.5*4;
}
elseif($xBOPD <= $dBOPD)
{
$prod_loss=0.5*6;
}
elseif($xBOPD <= $eBOPD)
{
$prod_loss=0.5*8;
}
elseif($xBOPD > $eBOPD)
{
$prod_loss=0.5*10;
}
}
$querymd = mysql_query("SELECT mscfd FROM gl_general where mscfd > 0 ", $koneksi) or die (mysql_error());
while($barismd = mysql_fetch_array($querymd))
{
$jumlahMSCFD=$jumlahMSCFD+$barismd[0];
}
$aMSCFD=0; //0
$bMSCFD=0.02*$jumlahMSCFD; //2%
176
$cMSCFD=0.05*$jumlahMSCFD; //5%
$dMSCFD=0.1*$jumlahMSCFD; //10%
$eMSCFD=0.15*$jumlahMSCFD; //15%
if($mscfd > 0)
{
$xMSCFD=$mscfd;
if($xMSCFD==0)
{
$public_image=0;
}
elseif($xMSCFD <= $bMSCFD)
{
$public_image=0.15*2;
}
elseif($xMSCFD <= $cMSCFD)
{
$public_image=0.15*4;
}
elseif($xMSCFD <= $dMSCFD)
{
$public_image=0.15*6;
}
elseif($xMSCFD <= $eMSCFD)
{
$public_image=0.15*8;
}
elseif($xMSCFD > $eMSCFD)
{
$public_image=0.15*10;
}
}
if($contingency_line=='In Place')
{
$pipe_safety=0*0.15;
}
elseif($contingency_line=='Easy to Install')
{
$pipe_safety=5*0.15;
}
elseif($contingency_line=='No Contingency Line'|| $contigency_line=='No Data')
{
$pipe_safety=10*0.15;
}
else
{
$pipe_safety=0;
}
//Faktor CoF
$factor_cof=$prod_loss+$public_image+$pipe_safety+$environment_community_impact;
//Category CoF
if($factor_cof <= 2)
{
$category_cof= "A";
}
elseif($factor_cof <= 4)
{
177
$category_cof= "B";
}
elseif ($factor_cof <= 6)
{
$category_cof= "C";
}
elseif($factor_cof <= 8)
{
$category_cof= "D";
}
elseif($factor_cof > 8)
{
$category_cof= "E";
}
//Risk
if($category_pof=='1' && $category_cof=='A')
{
$risk="low";
}
elseif($category_pof=='2' && $category_cof=='A')
{
$risk="low";
}
elseif($category_pof=='3' && $category_cof=='A')
{
$risk="low";
}
elseif($category_pof=='4' && $category_cof=='A')
{
$risk="middle";
}
elseif($category_pof=='5' && $category_cof=='A')
{
$risk="middle";
}
elseif($category_pof=='1' && $category_cof=='B')
{
$risk="low";
}
elseif($category_pof=='2' && $category_cof=='B')
{
$risk="low";
}
elseif($category_pof=='3' && $category_cof=='B')
{
$risk="middle";
}
elseif($category_pof=='4' && $category_cof=='B')
{
$risk="middle";
}
elseif($category_pof=='5' && $category_cof=='B')
{
$risk="high";
}
elseif($category_pof=='1' && $category_cof=='C')
{
$risk="low";
}
elseif($category_pof=='2' && $category_cof=='C')
{
$risk="middle";
}
elseif($category_pof=='3' && $category_cof=='C')
{
$risk="middle";
}
elseif($category_pof=='4' && $category_cof=='C')
{
$risk="high";
}
elseif($category_pof=='5' && $category_cof=='C')
{
$risk="high";
}
elseif($category_pof=='1' && $category_cof=='D')
{
$risk="low";
178
}
elseif($category_pof=='2' && $category_cof=='D')
{
$risk="middle";
}
elseif($category_pof=='3' && $category_cof=='D')
{
$risk="high";
}
elseif($category_pof=='4' && $category_cof=='D')
{
$risk="high";
}
elseif($category_pof=='5' && $category_cof=='D')
{
$risk="high";
}
elseif($category_pof=='1' && $category_cof=='E')
{
$risk="middle";
}
elseif($category_pof=='2' && $category_cof=='E')
{
$risk="high";
}
elseif($category_pof=='3' && $category_cof=='E')
{
$risk="high";
}
elseif($category_pof=='4' && $category_cof=='E')
{
$risk="high";
}
elseif($category_pof=='5' && $category_cof=='E')
{
$risk="high";
}
$query11="UPDATE gl_fe set status='$status',risk='$risk',data_st='Waiting Approve',pof='$category_pof',cof='$category_cof'
where id_gl='$id_gl'";
$hasil_mysql11=mysql_query($query11, $koneksi);
if($query11)
{
header("Location:map.php");
}
?>
</body>
</html>
17. app_data.php
<html>
<head>
<meta http-equiv=refresh content=5;url=app_data.php>
<style type="text/css">
a:hover,
a:focus { /* we use :focus for keyboard navigation */
z-index: 200 /* bring to top when the mouse is over */
}
a img {
border: none;
-webkit-transition: all .2s; /* in Safari, every animatable property triggers an animation in .2s */
}
a:hover img,
a:focus img {
-webkit-transform: scale(2);
-moz-transform: scale(2);
}
#GreyWhite {
background-color: #FBFBFB;
}
</style>
</head>
<body id="GreyWhite">
<?
include("database.php");
include("session.php");
?>
<center>
179
<br>
<table>
<tr>
<td align=center>
<a href="index.php"><img src="../image/home.png" alt="a"
width="32"></a>
</td>
<td align=center>
<a href="logout.php"><img src="../image/logout.png" alt="a"
width="32"></a>
</td>
</tr>
<tr>
<td align=center>
Home
</td>
<td align=center>
Logout
</td>
</tr>
</table>
<br>
<h3>Waiting Approve Data</h3>
<table border=1 cellpadding=0 cellspacing=0 align="center">
<tr align="center">
<th bgcolor= class=> Pipeline Number </th>
<th bgcolor= class=> Line Type </th>
<th bgcolor= class=> Description </th>
<th bgcolor= class=> Service </th>
<th bgcolor= class=> Status </th>
<th bgcolor= class=> Risk </th>
<th bgcolor=> </th>
<th bgcolor=> </th>
<th bgcolor=> </th>
</tr>
<?
$query = mysql_query("SELECT * FROM gl_general_fe where status='Waiting Approve'");
while($baris = mysql_fetch_array($query))
{
$perintah2="select * from gl_fe where id_gl='$baris[1]'";
$query2=mysql_query($perintah2);
$data2=mysql_fetch_array($query2);
if($i%2)
{
echo "<tr bgcolor=>";
}
else
{
echo "<tr bgcolor=>";
}
echo"
<td><font class=style8> $data2[1] </td>
<td><font class=style8> $data2[2] </td>
<td><font class=style8> $data2[3] </td>
<td><font class=style8> $data2[4] </td>
<td><font class=style8> $data2[5] </td>
<td><font class=style8>
";
if($data2[6]=='low')
{
echo "<b><font color='#66cc00'>$data2[6]</font></b>";
}
elseif($data2[6]=='middle')
{
echo "<b><font color='#eeee00'>$data2[6]</font></b>";
}
else
{
echo "<b><font color='red'>$data2[6]</font></b>";
}
echo " </td>
<td><a href='p_app.php?id_gl=$baris[0]' class=style2><img src=../image/approve.png width=32></a></td>
<td><a href='cancel_data_gl.php?id_gl=$baris[0]' class=style2><img src=../image/cancel.png width=32></a></td>
<td><a href='review.php?id_gl=$baris[0]' class=style2><img src=../image/review.png width=32></a></td>
</tr>";
$i++;
}
echo "</table><br><br>";
180
?>
<br>
<h3>Cancel Approve Data</h3>
<table border=1 cellpadding=0 cellspacing=0 align="center">
<tr align="center">
<th bgcolor= class=> Pipeline Number </th>
<th bgcolor= class=> Line Type </th>
<th bgcolor= class=> Description </th>
<th bgcolor= class=> Service </th>
<th bgcolor= class=> Status </th>
<th bgcolor= class=> Risk </th>
<th bgcolor= class=> Note </th>
</tr>
<?
while($baris = mysql_fetch_array($query))
{
if($i%2)
{
echo "<tr bgcolor=>";
}
else
{
echo "<tr bgcolor=>";
}
echo"
<td><font class=style8> $baris[1] </td>
<td><font class=style8> $baris[2] </td>
<td><font class=style8> $baris[3] </td>
<td><font class=style8> $baris[4] </td>
<td><font class=style8> $baris[5] </td>
<td><font class=style8> $baris[6] </td>
<td><font class=style8> $baris[8] </td>
</tr>";
$i++;
}
echo "</table><br><br>";
?>
</center>
</body>
</html>
18. cancel_data_gl.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Admin Panel (Proses Edit GL)</title>
<link href="../main.css" rel="stylesheet" type="text/css">
</head>
<body>
<?
include ("database.php");
include "session.php";
if($query10)
{
header("Location:app_data.php");
}
?>
</body>
</html>
19. risk_ranking.php
<html>
<title>Risk Ranking Statement</title>
<head>
<link href="main.css" rel="stylesheet" type="text/css">
</head>
<body>
<?
include "database.php";
$sesi_gl=$data[gl];
session_start();
session_register('sesi_gl');
</td>
<td>
<? echo "$data[5]"; ?>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td width=100>
Pipeline ID
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td width=200>
<? echo "$data[1]"; ?>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
183
<td>
</td>
<td>
</td>
<td>
</td>
<td width=120>
Year Service
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[14]";
?>
</td>
<td>
Year
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td width=100>
Description
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<? echo "$data[3]"; ?>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
184
</td>
<td>
</td>
<td>
</td>
<td width=120>
Design Service
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[13]";
?>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td width=100>
Fluid From
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<? echo "$data1a[3]"; ?>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
185
</td>
<td>
</td>
<td>
</td>
<td width=120>
Design Life
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[12]";
?>
</td>
<td>
Year
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table>
<tr>
<td>
</td>
</tr>
</table>
<br><br>
<table border=1 bgcolor=silver align=left width=950>
<tr>
<td>
<table>
<tr>
<td>
</td>
<td width=100>
Pipe Grade
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td width=130>
<?
echo "
$data1a[5]";
?>
</td>
<td>
</td>
<td>
186
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td width=120>
Design Press
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[9]";
?>
</td>
<td>
Psi
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td width=100>
SMYS
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[8]";
?>
</td>
<td>
Psi
</td>
<td>
187
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td width=120>
Operate Press
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[27]";
?>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td width=100>
Pipe Size
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[4]";
?>
</td>
<td>
Inch
</td>
<td>
188
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td width=120>
Operate Temp
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[26]";
?>
</td>
<td>
Psi
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td width=100>
Nominal WT
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[10]";
?>
</td>
<td>
Inch
</td>
<td>
</td>
189
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td width=120>
Current Service
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td colspan=2>
<?
echo "
$data1a[15]";
?>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td width=100>
Length
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[11]";
?>
</td>
<td>
m
</td>
<td>
</td>
<td>
</td>
190
<td>
</td>
<td>
</td>
<td>
</td>
<td width=120>
Chemical Injection
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "$data2a[13]";
?>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td width=100>
Line Type
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data[2]";
?>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
191
</td>
<td>
</td>
<td width=120>
Design Temp
</td>
<td>
</td>
<td>
:
</td>
<td>
</td>
<td>
<?
echo "
$data1a[19]";
?>
</td>
<td>
F
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table>
<tr>
<td>
</td>
</tr>
</table>
<table>
<tr>
<td>
</td>
</tr>
</table>
<br><br><br><br><br><br><br>
<br><br><br><br><br><br>
<h5><b>RISK RANKING FOR YEAR</b></h5>
<?
//$year_of_service= == gl_general
$perintah1="select * from gl_general where id_gl='$id_gl'";
$query1=mysql_query($perintah1);
$data1=mysql_fetch_array($query1);
$year_service=$data1[14];
if($year_service==0)
{
$year_of_service=0.15*5;
}
else
{
if($year_service > 0)
{
if($year_service <= 1)
{
$year_of_service=0.15*0;
}
elseif ($year_service <= 5)
{
$year_of_service=0.15*1.25;
}
elseif ($year_service <= 10)
{
192
$year_of_service=0.15*2.5;
}
elseif ($year_service < 16)
{
$year_of_service=0.15*3.75;
}
elseif ($year_service >= 16)
{
$year_of_service=0.15*5;
}
}
else
{
}
}
if($number_of_leak=0)
{
$number_leak=0.15*5;
}
else
{
if($year_service > 0)
{
if($number_of_leak <= 1)
{
$number_leak=0;
}
else if($number_of_leak <= 5)
{
$number_leak=0.15*1.25;
}
else if($number_of_leak < 10)
{
$number_leak=0.15*2.5;
}
else if($number_of_leak < 16)
{
$number_leak=0.15*3.75;
}
else if($number_of_leak >= 16)
{
$number_leak=0.15*5;
}
}
Else
{
}
}
$condition_coating=$data3[8];
if($condition_coating=="<5%")
{
$coating=0;
}
elseif($condition_coating=="5%-40%")
{
$coating=2.5*0.1;
}
elseif($condition_coating==">40%" || $condition_coating=="No Data")
{
$coating=5*0.1;
}
else
{
}
$highest_pipe_soil=$data4[13];
if ($highest_pipe_soil==0)
{
$cathodic_protection=5*0.1;
}
else if ($highest_pipe_soil > 0)
{
if ($highest_pipe_soil < 850 && $highest_pipe_soil!= 0)
{
$cathodic_protection=2.5*0.1;
}
else if ($highest_pipe_soil >= 850)
{
$cathodic_protection=0*0.1;
}
else if ($highest_pipe_soil = 0)
{
$cathodic_protection=5*0.1;
}
}
$chemical_treatment_type=$data5[2];
$injection_rate=$data5[11];
$recommendation_injection_rate=$data5[12];
if ($chemical_treatment_type=="Scale Inhibitor")
{
if ($injection_rate=='0' or $recommendation_injection_rate=='0')
{
$corrosion_treatment=5*0.1;
}
Else
{
If ($injection_rate > 0 && $recommendation_injection_rate > 0)
{
If ($injection_rate >= $recommendation_injection_rate && $injection_rate !=0 &&
$recommendation_injection_rate !=0)
{
$corrosion_treatment=0;
}
ElseIf ($injection_rate < $recommendation_injection_rate)
{
$corrosion_treatment=2.5*0.1;
}
ElseIf ($injection_rate=0)
{
$corrosion_treatment=5*0.1;
}
}
}
}
else
{
$corrosion_treatment=0;
}
$cleaning_pigging_activity=$data14[36];
$cleaning_pigging_recomendation=$data14[35];
If((empty($cleaning_pigging_activity)) or (empty($cleaning_pigging_recomendation)))
{
$mechanical_cleaning=5*0.1;
}
ElseIf((empty($cleaning_pigging_activity)) && (empty($cleaning_pigging_recomendation)))
{
$mechanical_cleaning=5*0.1;
}
194
Else
{
If($cleaning_pigging_activity > 0 && $cleaning_pigging_recomendation > 0)
{
If($cleaning_pigging_activity < $cleaning_pigging_recomendation)
{
$mechanical_cleaning=2.5*0.1;
}
ElseIf($cleaning_pigging_activity >= $cleaning_pigging_recomendation &&
$cleaning_pigging_activity!=0 && $cleaning_pigging_recomendation !=0)
{
$mechanical_cleaning=0;
}
ElseIf($cleaning_pigging_activity = 0 && $cleaning_pigging_recomendation != 0)
{
$mechanical_cleaning=5*0.1;
}
}
}
if($sand != 0 || $h2s > 4 || $ph >= 5 || $srb=="1000 < SRB < 10000" || $srb=="SRB >= 10000 /ml" || $actual_maop <
$op_press || $scale_index > 0.5 || $sand=="No Data" || $h2s=="No Data" || $ph=="No Data" || $co2_dissolved=="No Data" ||
$co2_dissolved > 5)
{
$fluid_characteristic=5*0.15;
}
else
{
$fluid_characteristic=0;
}
//Faktor PoF
$factor_pof=$year_of_service+$number_leak+$coating+$cathodic_protection+$corrosion_treatment+$mechanical_cleaning+$fl
uid_characteristic+$soil_resistivity;
//Category PoF
if($factor_pof <= 1)
{
$category_pof=1;
}
elseif ($factor_pof <= 2)
{
$category_pof=2;
}
elseif ($factor_pof <= 3)
{
$category_pof=3;
}
elseif ($factor_pof <= 4)
{
$category_pof=4;
}
elseif ($factor_pof > 4)
{
$category_pof=5;
}
if($xBOPD=0)
{
$prod_loss=0;
}
elseif($xBOPD <= $bBOPD)
{
$prod_loss=0.5*2;
}
elseif($xBOPD <= $cBOPD)
{
$prod_loss=0.5*4;
}
elseif($xBOPD <= $dBOPD)
{
$prod_loss=0.5*6;
}
elseif($xBOPD <= $eBOPD)
{
$prod_loss=0.5*8;
}
elseif($xBOPD > $eBOPD)
{
$prod_loss=0.5*10;
}
}
196
//$public_image= ==> gl_corr_risk_data
$perintah28="select * from gl_corr_risk_data where id_gl='$id_gl'";
$query28=mysql_query($perintah28);
$data28=mysql_fetch_array($query28);
$population_density=$data28[4];
if($population_density=="Density > 46" || $population_density=="No Data")
{
$public_image=10*0.15;
}
elseif($population_density=="10 < Density < 46 ")
{
$public_image=5*0.15;
}
elseif($population_density=="Density < 10")
{
$public_image=0*0.15;
}
if($community=="No Impact")
{
$environment_community_impact=0;
}
elseif($community=='Get Impact No Compensation')
{
$environment_community_impact=5*0.2;
}
elseif($community=='Get Impact Pay Compensation' || $community=='No Data')
{
$environment_community_impact=10*0.2;
}
//Faktor CoF
$factor_cof=$prod_loss+$public_image+$pipe_safety+$environment_community_impact;
//Category CoF
if($factor_cof <= 2)
{
$category_cof= "A";
}
elseif($factor_cof <= 4)
{
$category_cof= "B";
}
elseif ($factor_cof <= 6)
{
$category_cof= "C";
}
elseif($factor_cof <= 8)
{
$category_cof= "D";
}
elseif($factor_cof > 8)
{
$category_cof= "E";
197
}
//Ranking
if($category_pof=='1' && $category_cof=='A')
{
$A1="X";
}
elseif($category_pof=='2' && $category_cof=='A')
{
$A2="X";
}
elseif($category_pof=='3' && $category_cof=='A')
{
$A3="X";
}
elseif($category_pof=='4' && $category_cof=='A')
{
$A4="X";
}
elseif($category_pof=='5' && $category_cof=='A')
{
$A5="X";
}
elseif($category_pof=='1' && $category_cof=='B')
{
$B1="X";
}
elseif($category_pof=='2' && $category_cof=='B')
{
$B2="X";
}
elseif($category_pof=='3' && $category_cof=='B')
{
$B3="X";
}
elseif($category_pof=='4' && $category_cof=='B')
{
$B4="X";
}
elseif($category_pof=='5' && $category_cof=='B')
{
$B5="X";
}
elseif($category_pof=='1' && $category_cof=='C')
{
$C1="X";
}
elseif($category_pof=='2' && $category_cof=='C')
{
$C2="X";
}
elseif($category_pof=='3' && $category_cof=='C')
{
$C3="X";
}
elseif($category_pof=='4' && $category_cof=='C')
{
$C4="X";
}
elseif($category_pof=='5' && $category_cof=='C')
{
$C5="X";
}
elseif($category_pof=='1' && $category_cof=='D')
{
$D1="X";
}
elseif($category_pof=='2' && $category_cof=='D')
{
$D2="X";
}
elseif($category_pof=='3' && $category_cof=='D')
{
198
$D3="X";
}
elseif($category_pof=='4' && $category_cof=='D')
{
$D4="X";
}
elseif($category_pof=='5' && $category_cof=='D')
{
$D5="X";
}
elseif($category_pof=='1' && $category_cof=='E')
{
$E1="X";
}
elseif($category_pof=='2' && $category_cof=='E')
{
$E2="X";
}
elseif($category_pof=='3' && $category_cof=='E')
{
$E3="X";
}
elseif($category_pof=='4' && $category_cof=='E')
{
$E4="X";
}
elseif($category_pof=='5' && $category_cof=='E')
{
$E5="X";
}
include "rumus_risk.php";
?>
<table>
<tr>
<td>
<table border=1>
<tr>
<td>
</td>
<td align=center colspan=8>
<b>*Score</b>
</td>
<td align=middle>
<b>Factor</b>
</td>
<td align=center>
<b>Category</b>
</td>
</tr>
<tr>
<td align=center>
<b> Probability <br> of Failure </b>
</td>
<td align=center bgcolor=#0033FF>
<? echo "$year_of_service"; ?>
</td>
<td align=center bgcolor=#0099FF>
<? echo "$number_leak"; ?>
</td>
<td align=center bgcolor="#CC99FF">
<? echo "$coating"; ?>
</td>
<td align=center bgcolor="#990099">
<? echo "$cathodic_protection"; ?>
</td>
<td align=center bgcolor="#009933">
<? echo "$corrosion_treatment"; ?>
</td>
<td align=center bgcolor=#00FF00>
<? echo "$mechanical_cleaning"; ?>
</td>
<td align=center bgcolor="#00FFFF">
<? echo "$fluid_characteristic"; ?>
</td>
<td align=center bgcolor=#FF00FF>
<? echo "$soil_resistivity"; ?>
199
</td>
<td align=center>
<? echo "$factor_pof"; ?>
</td>
<td align=center>
<? echo "$category_pof"; ?>
</td>
</tr>
<tr>
<td align=center>
<b> Consequence <br>of Failure </b>
</td>
<td align=center>
<? echo "$factor_cof"; ?>
</td>
<td align=center>
<? echo "$category_cof"; ?>
</td>
</tr>
<tr>
<td align=center>
<b> Risk <br>CoF * PoF </b>
</td>
<td align=center colspan=8>
</td>
<td align=center>
<? echo "$factor_cof_pof"; ?>
</td>
<td align=center>
<? echo "$category_pof$category_cof"; ?>
</td>
</tr>
</table>
<table>
<tr>
<td bgcolor=#0033FF>
</td>
<td>
Year Service
</td>
<td>
</td>
<td bgcolor="#990099">
</td>
<td>
Cathodic Protection
</td>
<td>
</td>
<td bgcolor=#00FFFF>
</td>
<td>
Fluid Characteristic
</td>
<td>
200
</td>
<td bgcolor=#FFCC66>
</td>
<td>
Public Image
</td>
</tr>
<tr>
<td bgcolor=#0099FF>
</td>
<td>
Number of Leak
</td>
<td>
</td>
<td bgcolor=#009933>
</td>
<td>
Corrosion Treatment
</td>
<td>
</td>
<td bgcolor=#FF00FF>
</td>
<td>
Soil Resistivity
</td>
<td>
</td>
<td bgcolor=#FFFF66>
</td>
<td>
Pipe Safety
</td>
</tr>
<tr>
<td bgcolor="#CC99FF">
</td>
<td>
Coating
</td>
<td>
</td>
<td bgcolor=#00FF00>
</td>
<td>
Mechanical Cleaning
</td>
<td>
</td>
<td bgcolor=#FF6633>
</td>
<td>
Prod Loss
</td>
<td>
</td>
<td bgcolor=#99FF99>
</td>
<td>
Environment & Community Impact
</td>
201
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>
</td>
</tr>
</table>
</td>
<td>
<table border=1 bordercolor=black>
<tr>
<td rowspan=7 bgcolor=#0099FF>
<font color=white><b>PoF</b></font>
</td>
<td align=right bgcolor=#FFCC66>
<b>5</b>
</td>
<td bgcolor=yellow align=center>
<b> <? echo " $A5 "; ?> </b>
</td>
<td bgcolor=red align=center>
<b> <? echo " $B5 "; ?> </b>
</td>
<td bgcolor=red align=center>
<b> <? echo " $C5 "; ?> </b>
</td>
<td bgcolor=red align=center>
<b> <? echo " $D5 "; ?> </b>
</td>
<td bgcolor=red align=center>
<b> <? echo " $E5 "; ?> </b>
</td>
</tr>
<tr>
<td align=right bgcolor=#FFCC66>
<b>4</b>
</td>
<td bgcolor=yellow align=center>
<b> <? echo " $A4 "; ?> </b>
</td>
<td bgcolor=yellow align=center>
<b> <? echo " $B4 "; ?> </b>
</td>
<td bgcolor=red align=center>
<b> <? echo " $C4 "; ?> </b>
</td>
<td bgcolor=red align=center>
<b> <? echo " $D4 "; ?> </b>
</td>
<td bgcolor=red align=center>
<b> <? echo " $E4 "; ?> </b>
</td>
</tr>
<tr>
<td align=right bgcolor=#FFCC66>
<b>3</b>
</td>
<td bgcolor=green align=center>
<b> <? echo " $A3 "; ?> </b>
</td>
<td bgcolor=yellow align=center>
<b> <? echo " $B3 "; ?> </b>
</td>
<td bgcolor=yellow align=center>
<b> <? echo " $C3 "; ?> </b>
</td>
<td bgcolor=red align=center>
<b> <? echo "$D3 "; ?> </b>
</td>
<td bgcolor=red align=center>
<b> <? echo " $E3 "; ?> </b>
</td>
</tr>
<tr>
202
<td align=right bgcolor=#FFCC66>
<b>2</b>
</td>
<td bgcolor=green align=center>
<b> <? echo " $A2 "; ?> </b>
</td>
<td bgcolor=green align=center>
<b> <? echo " $B2 "; ?> </b>
</td>
<td bgcolor=yellow align=center>
<b> <? echo " $C2 "; ?> </b>
</td>
<td bgcolor=yellow align=center>
<b> <? echo " $D2 "; ?> </b>
</td>
<td bgcolor=red align=center>
<b> <? echo " $E2 "; ?> </b>
</td>
</tr>
<tr>
<td align=right bgcolor=#FFCC66>
<b>1</b>
</td>
<td bgcolor=green align=center>
<b> <? echo " $A1 "; ?> </b>
</td>
<td bgcolor=green align=center>
<b> <? echo " $B1 "; ?> </b>
</td>
<td bgcolor=green align=center>
<b> <? echo " $C1 "; ?> </b>
</td>
<td bgcolor=green align=center>
<b> <? echo " $D1 "; ?> </b>
</td>
<td bgcolor=yellow align=center>
<b> <? echo " $E1 "; ?> </b>
</td>
</tr>
<tr>
<td align=right bgcolor=#FFCC66>
</td>
<td bgcolor=#FFCC66>
<b>A</b>
</td>
<td bgcolor=#FFCC66>
<b>B</b>
</td>
<td bgcolor=#FFCC66>
<b>C</b>
</td>
<td bgcolor=#FFCC66>
<b>D</b>
</td>
<td bgcolor=#FFCC66>
<b>E</b>
</td>
</tr>
<tr>
<td colspan=6 align=center bgcolor=#0099FF>
<font color=white><b>CoF</b></font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<h5><b> CORROSION MATRIK </b></h5>
<table border=1>
<tr align=center>
<td width=220>
<b>CORROSION TASK</b>
</td>
<td width=185>
<b>Corrosion Monitoring</b>
</td>
<td width=120>
203
<b>Data Finding</b>
</td>
<td>
<b>Thereshold</b>
</td>
<td>
<b>Consequence</b>
</td>
<td width=160>
<b>Requirement For</b>
</td>
</tr>
<?
$perintaht="select * from gl_corr_rate where id_gl='$id_gl'";
$queryt=mysql_query($perintaht);
$datat=mysql_fetch_array($queryt);
if($datat[5] > 0)
{
//$coreRate = CDbl($datat[5])
if($datat[5] > 5)
{
$LossWallTicknes = "Replace Corr. Monitoring Coupon By Probe";
}
elseif($datat[5] <= 5)
{
$LossWallTicknes = "Maintain Corrosion Inhibitor pump and Injection Rate at Current Condition";
}
}
else
{
$LossWallTicknes = "-";
}
if($data2t[13]=="No Tendency")
{
$PluggingWell = "Maintain Scale Inhibitor pump and Injection Rate at Current Condition";
}
elseif($data2t[13]=="Possible" || $data2t[13]=="Severe")
{
$PluggingWell = "Inject Scale Inhibitor at Well head or downhole and Cleaning pipeline such as Mechanical Cleaning pigging";
}
if($data3t[19]=="yes")
{
if($data3t[13]=="0" || $data3t[13]=="SRB <= 10" || $data3t[13]=="10 < SRB < 100" || $data3t[13]=="100 < SRB <1000")
{
$LackMicrobialControl="Maintain Biocide Injection rate at Curent Condition";
}
elseif($data3t[13]=="1000 < SRB < 10000" || $data3t[13]=="SRB >= 10000" || $data3t[13]=="No Data")
{
$LackMicrobialControl="Cleaning pipeline by pigging and inject Biocide";
}
elseif($data3t[13]=="No Data")
{
$LackMicrobialControl="Conduct Sampling analisis dan Install Sampling Point";
}
}
else
204
{
$LackMicrobialControl = "Install Sampling Point";
}
//$ironCount
if($data3t[18] > 0)
{
//$ironCount = CDbl(PLAdvForm.txtIronCount.Value)
if($data6t[13]=="yes")
{
//chemical_treatment_type
if($data6t[2]=="N/A")
{
//$coreRate = CDbl($datat[5])
if($datat[3] > 0)
{
if($datat[3] > 5)
{
$PotentialIncreaseCorrCI = "Replace Corr. Monitoring Coupon By Probe";
}
elseif($datat[3] <= 5)
{
$PotentialIncreaseCorrCI = "Maintain Corrosion Inhibitor pump and Injection Rate at Current Condition";
}
}
//$tendency=$data2t[16]
if($data2t[13]=="No Tendency")
{
$PotentialScaleWellTubing = "Maintain Scale Inhibitor pump and Injection Rate at Current Condition";
}
elseif($data2t[13]=="Possible" || $data2t[13]=="Severe")
{
$PotentialScaleWellTubing = "Inject Scale Inhibitor at Well head or downhole and Cleaning pipeline such as
Mechanical Cleaning pigging";
}
}
elseif($data6t[2]=="Corr.Inhibitor")
{
if($data6t[2] = "Corr.Inhibitor")
{
$CorrosionInhibitorInjection = $data6t[11];
$ScaleInhibitorInjection = $data6t[11];
if($datat[3] > 5)
{
$PotentialIncreaseCorrCI = "Inject Corrosion Inhibitor";
}
elseif($datat[3] <= 5)
{
$PotentialIncreaseCorrCI = "Maintain at Current Condition";
}
}
else
{
$PotentialIncreaseCorrCI = "-";
}
if($data2t[13]=="No Tendency")
{
$PotentialScaleWellTubing = "Maintain at Current Condition";
}
elseif($data2t[13]=="Possible" || $data2t[13]=="Severe")
{
$PotentialScaleWellTubing = "Inject Scale Inhibitor";
}
else
{
$PotentialScaleWellTubing = "-";
}
$CorrosionInhibitorInjection = $data6t[11];
$ScaleInhibitorInjection = $data6t[11];
}
?>
<tr align=center>
<td rowspan=8>
<b>CORROSION <br>
MONITORING</b>
</td>
<td height=70>
Weight Coupon
</td>
<td height=70>
<font color=blue> <? echo "$datat[5]"; ?> </font>
</td>
<td height=70>
Corr. Rate > 5 Mpy
</td>
<td height=70>
Loss Wall Thickness
</td>
<td height=70 align=left>
<font color=blue> <? echo "$LossWallTicknes"; ?>
</td>
</tr>
<tr align=center>
<td height=70>
Scale Coupon
</td>
<td>
<font color=blue> <? echo "$data2t[13]"; ?> </font>
</td>
<td>
Scaling Indication
</td>
<td>
Plugging Well
</td>
<td align=left>
<font color=blue><? echo "$PluggingWell"; ?> </font>
</td>
</tr>
<tr align=center>
<td height=70>
SRB Sampling
</td>
<td>
207
<font color=blue> <? echo "$data3t[13]"; ?> </font>
</td>
<td>
Planktonic < 1000 ml
</td>
<td>
Lack of Microbial Control
</td>
<td align=left>
<font color=blue><? echo "$LackMicrobialControl"; ?> </font>
</td>
</tr>
<tr align=center>
<td height=70>
Iron Counts Sampling
</td>
<td>
<font color=blue> <? echo "$data3t[18]"; ?> </font>
</td>
<td>
Fe < 50 ppm
</td>
<td width=200>
Any Increase in Iron content
would indicate potential
internal corr.
</td>
<td align=left>
<font color=blue> <? echo "$IncreaseIronIndicatePotential"; ?> </font>
</td>
</tr>
<tr align=center>
<td height=70>
O2 Dissolve Monitoring
</td>
<td>
<font color=blue> <? echo "$data3t[17]"; ?>
</td>
<td>
O2 < 50 ppb
</td>
<td>
Dried gas hence no
corrosion threat
</td>
<td align=left>
<font color=blue> <? echo "$DriedGasCorrosion"; ?>
</td>
</tr>
<tr align=center>
<td height=70>
Sampling For Scale Index
Calculation
</td>
<td>
<font color=blue> <? echo "$data2t[12]"; ?>
</td>
<td>
0.5 < SI < 1
</td>
<td>
Plugging Well tubing
</td>
<td align=left>
<font color=blue><? echo "$PluggingWellTubing"; ?>
</td>
</tr>
<tr align=center>
<td height=70>
Coating Inspection
</td>
<td>
<font color=blue> <? echo "$data4t[8]"; ?>
</td>
<td>
208
Coating damage > 40 %
</td>
<td>
Initiate external corrosion
</td>
<td align=left>
<font color=blue><? echo "$InitiateExtCorrCoating"; ?>
</td>
</tr>
<tr align=center>
<td height=70>
CP Potential Reading
</td>
<td>
<font color=blue> <? echo "$data5t[13]"; ?>
</td>
<td width=190>
Pipe to Soil potential > -850
mV vs Cu/CuSO4
</td>
<td>
Initiate external corrosion
</td>
<td align=left>
<font color=blue><? echo "$InitiateExtCorrPipeSoil"; ?>
</td>
</tr>
<tr align=center>
<td rowspan=4>
<b>CORROSION CONTROL / <br>
RECOMENDATION</b>
</td>
<td height=70>
Corrosion Inhibitor Injection
</td>
<td>
<font color=blue> <? echo "$CorrosionInhibitorInjection"; ?>
</td>
<td height=70>
Maintain Cl Pump &
Avabiality > 85 %
Performance
</td>
<td>
Potential of Increase
Corrosion Rate
</td>
<td align=left>
<font color=blue> <? echo "$PotentialIncreaseCorrCI"; ?>
</td>
</tr>
<tr align=center>
<td height=70>
Scale Inhibitor Injection
</td>
<td>
<font color=blue> <? echo "$ScaleInhibitorInjection"; ?>
</td>
<td>
Maintain CL Pump &
Avabiality > 85 %
Performance
</td>
<td>
Potential of Scale Formation
at Well tubing
</td>
<td align=left>
<font color=blue><? echo "$PotentialScaleWellTubing"; ?>
</td>
</tr>
<tr align=center>
<td height=70>
Coating Refurbishment
209
</td>
<td>
<font color=blue> <? echo "$data4t[8]"; ?>
</td>
<td>
No Significant pipe defect
</td>
<td>
Initiate external corrosion
</td>
<td align=left>
<font color=blue><? echo "$InitiateExtCorrPipeDefect"; ?>
</td>
</tr>
<tr align=center>
<td height=70>
CP Upgrading
</td>
<td>
<font color=blue> <? echo "$data5t[13]"; ?>
</td>
<td>
Pipe to Soil petential > -850
mV vs Cu/CuSO4
</td>
<td>
Potential of Increase
Corrosion Rate
</td>
<td align=left>
<font color=blue><? echo "$PotentialIncreaseCorrPipeSoil"; ?>
</td>
</tr>
</table>
<br>
<center>
DOKUMEN-DOKUMEN
Komponen-komponen Korosi
a. General
General adalah data desain umum suatu pipa minyak. Desain tersebut dibuat oleh
para enggineer sesuai fungsi yang diinginkan dari suatu pipa minyak. Data-data
desain pipa diantaranya: pipe size, schedule, year built, flange rating, design
temperature, pipe grade, length, PSV setting, design factor, design pressure, design
life, BOPD, dan BWPD. Dari data-data tersebut didapat BFPD, SMYS, nominal
Year Service
BFPD
SMYS
210
211
Remaining Life
Actual MAOP
Dan jika PSV Setting > Flange Rating (psi) atau PSV Setting (psi) kosong maka
Actual MAOP = Flange Rating (psi)
212
Calculated MAOP
Data internal corrosion monitoring device adalah data laju korosi yang di dapat
dengan menggunakan beberapa alat yang ditempatkan di dalam pipa. Alat-alat yang
digunakan adalah coupon dan probe, data-data yang dipergunakan adalah fitting
size, access fitting type, fitting manufacture, condition, coupon type, holder length,
installation date coupon, retrieving date, probe type, probe element, probe length,
probe span, probe ID, installation date probe, coupon ID A, initial weight coupon
final weight coupon B, color coupon B,. Dari data-data tersebut di dapat coupon
Corrosion Rate
Jika (Final Weight Coupon A - Initial weight Coupon A) > (Final Weight Coupon B -
Initial weight Coupon B) , maka
Δ Weight = Final Weight Coupon A - Initial Weight Coupon A
Jika Tidak
Δ Weight = Final Weight Coupon B - Initial Weight Coupon B
c. Water Sampling
Data water sampling adalah data yang didapat dari keadaan air disekitar pipa
minyak. Data-data yang didapat dari water sampling sebagai berikut temperature,
pH, sand, H2S, CO2 dissolved, SRB, Mn, residual amine, residual phosphate,
d. Chemical Treatment
Data chemical treatment adalah data chemical treatment yang digunakan pada suatu
condition, nos, access fitting type, device manufacture, injection tube, operation
214
rate.
e. Scaling Tendency
Data scaling tendency adalah data scaling tendency yang digunakan pada suatu pipa
minyak. Data-data scaling tendency diantaranya access fitting size, access fitting
type, fitting manufacture, condition, plug manufacture, coupon type, holder length,
installation date, retrieving date, scale index, dan scale growth. Dari data-data
Tendency
External corrosion protection adalah sistem perlindungan korosi dari luar pipa
protection, anode weight, anode type, nos anode, year installed, design life, current
output, test point nos, insulation flange, highest pipe to soil potential, lowest pipe to
soil potential, lowest soil resistivity, dari data-data tersebut didapat soil
corrosiveness category.
215
Corrosion risk data adalah data-data yang menggambarkan resiko yang dapat
h. Corrosion Rate
Corrosion rate adalah data-data yang memperlihatkan tingkatan korosi pada suatu
corrosion rate coupon, interrogated date probe, corrosion rate probe, date previous
wall thickness (wt) inspection, previous wt remaining, defect length max, date
WT Lost
i. Pigging Facility
Pigging facility adalah desain fasilitas pigging yang digunakan pada pipa minyak.
ataupun material-material yang terbawa pada saat minyak mengalir pada pipa
tersebut. Data-data yang terdapat pada pigging facility diantaranya barrel length
launcher, nominal length launcher, reducer length launcher, bridle to door launcher,
valve body width launcher, access length launcher, access width launcher, barrel
launcher, barrel length receiver, nominal length receiver, reducer length receiver,
bridle to door receiver, valve body width receiver, access length receiver, access
j. Pipe Condition
Pipe condition adalah data yang didapat dari pengamatan pada kondisi pipa. Data-
data pipe condition diantaranya original gathering line placement, location, KM,