SHOW:
|
|
- or go back to the newest paste.
1 | - | function status($z) { |
1 | + | function status($z){ |
2 | - | $Result2=mysql_query("SELECT * FROM trac_status"); |
2 | + | $status = array(1=>'Delivery', 'Customer Receipt', 'Customer AP', 'Customer Accounting', 'Customer Finance', 'Customer Buyer', 'Complete'); |
3 | - | while($row=mysql_fetch_array($Result2)) { |
3 | + | $Result2=mysql_query("SELECT status FROM trac_status"); |
4 | - | |
4 | + | while($row=mysql_fetch_array($Result2)){ |
5 | - | if($row['status']=='1') { |
5 | + | $output = $status[$row['status']] ? $status[$row['status']] : 'Tak ditemukan'; |
6 | - | |
6 | + | } |
7 | - | $status='Delivery'; |
7 | + | return $output; |
8 | - | } |
8 | + |