<?php
class library
{
	public $root_user = ".";
	public $current_url;
	
	public $kriteria_jenis=array(1 => 'Kriteria', 2 => 'Keputusan');
	public $kriteria_masukan=array(1 => 'Pilihan', 2 => 'Angka [Range]', 3=>'Angka' );	
		
	public function __construct()
	{
		$this->current_url = "http" . ((@$_SERVER["HTTPS"] == "on") ? "s://" : "://") . @$_SERVER['HTTP_HOST'] . @$_SERVER['REQUEST_URI'];
	}
	
	public function angka($data)
    {        
		return number_format((int)$data,0,",",".");
    }
	
    public function angka_des($data, $koma=3)
    {        
		return number_format(doubleVal($data),$koma,",",".");
    }
	
}
?>