From 656834015ec0a109560e68b3159a62e66ba8d29f Mon Sep 17 00:00:00 2001
From: Vincent Theophilus Ciputra <vincent_theophilusc@yahoo.com>
Date: Mon, 16 May 2016 17:37:28 +0700
Subject: [PATCH] added fix log

---
 bdgwebkit/log.txt             |  4 ++++
 bdgwebkit/permohonanClass.php | 18 ++++++++++++++++++
 bdgwebkit/staffPermohonan.php | 12 ++++++++++++
 3 files changed, 34 insertions(+)

diff --git a/bdgwebkit/log.txt b/bdgwebkit/log.txt
index 8f0e529..4fe621b 100644
--- a/bdgwebkit/log.txt
+++ b/bdgwebkit/log.txt
@@ -4,3 +4,7 @@ Update Permohonan : alexsukono
 Update Permohonan : alexsukono
 Update Permohonan sukonoedit : alexsukono
 Update Permohonan sukonoedit2 : alexsukono
+Insert Permohonan sukonoaha : alexsukono
+Verify Staf Disdukcapil : gerrykastogi
+Verify Staf Disdukcapil 1 : gerrykastogi
+Verify Staf Disdukcapil 47 : gerrykastogi
diff --git a/bdgwebkit/permohonanClass.php b/bdgwebkit/permohonanClass.php
index eb9a94e..eb679ad 100644
--- a/bdgwebkit/permohonanClass.php
+++ b/bdgwebkit/permohonanClass.php
@@ -91,6 +91,12 @@ class Permohonan{
 	 
 
 		$q = mysql_query($permohonan);
+
+		$myfile = fopen("log.txt", "a+") or die("Unable to open file!");
+  		$activity = 'Verify Rumah Sakit ' . $id . ' : ';
+ 		fwrite($myfile, $activity);
+  		fclose($myfile);
+
 		return $q;
 	}
 
@@ -104,6 +110,12 @@ class Permohonan{
 	 
 
 		$q = mysql_query($permohonan);
+
+		$myfile = fopen("log.txt", "a+") or die("Unable to open file!");
+  		$activity = 'Verify Staf Disdukcapil ' . $id . ' : ';
+ 		fwrite($myfile, $activity);
+  		fclose($myfile);
+
 		return $q;
 	}
 
@@ -120,6 +132,12 @@ class Permohonan{
 
 		$q = mysql_query($permohonan);
 
+		$myfile = fopen("log.txt", "a+") or die("Unable to open file!");
+  		$activity = 'Cetak ' . $id . ' : ';
+ 		fwrite($myfile, $activity);
+  		fclose($myfile);
+
+
 		// $row = mysql_fetch_array($rq, MYSQLI_ASSOC);
 	
 		// $row['nama']; 
diff --git a/bdgwebkit/staffPermohonan.php b/bdgwebkit/staffPermohonan.php
index 82d15a1..bdf7199 100644
--- a/bdgwebkit/staffPermohonan.php
+++ b/bdgwebkit/staffPermohonan.php
@@ -18,10 +18,22 @@
   if (!empty($_POST)) {
       if($user->get_role($id) == "stafDisdukcapil") {
         $permohonan->verifyStafDisdukcapil($_POST['permohonan_id']);
+        $myfile = fopen("log.txt", "a+") or die("Unable to open file!");
+        $username = $user->get_usernameReturn($id) . PHP_EOL;
+        fwrite($myfile, $username);
+        fclose($myfile);
       } else if ($user->get_role($id) == "rumahSakit") {
         $permohonan->verifyRS($_POST['permohonan_id']);
+        $myfile = fopen("log.txt", "a+") or die("Unable to open file!");
+        $username = $user->get_usernameReturn($id) . PHP_EOL;
+        fwrite($myfile, $username);
+        fclose($myfile);
       } else {
         $permohonan->cetak($_POST['permohonan_id']);
+        $myfile = fopen("log.txt", "a+") or die("Unable to open file!");
+        $username = $user->get_usernameReturn($id) . PHP_EOL;
+        fwrite($myfile, $username);
+        fclose($myfile);
       }
 
   }
-- 
GitLab