public function cek_exist_nomor($nomor) { $sql = "SELECT NO_CUTI FROM " . $this->t_cuti; $data = $this->_db->select($sql); foreach ($data as $v) { $tmp = Validasi::remove_space($v['NO_CUTI']); $cek = $nomor == $tmp; if ($cek) { return true; } } return false; }
public function cek_exist_nomor() { $nomor = $_POST['nomor']; // $nomor = 'ST-1349/PB.1/2012'; $nomor = Validasi::remove_space($nomor); $st = new SuratTugas($this->registry); $cek = $st->cek_exist_nomor($nomor); if ($cek) { echo 1; } else { echo 0; } }
public function cek_exist_nomor() { $nomor = $_POST['nomor']; $nomor = Validasi::remove_space($nomor); $sc = new Cuti($this->registry); $cek = $sc->cek_exist_nomor($nomor); if ($cek) { echo 1; } else { echo 0; } }