-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlog.php
121 lines (99 loc) · 4.98 KB
/
log.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!--
//////////////////////////////////////////////////////////////////////////////////////////
//
// Project: BLOOD_BANK - Management System
//
// File: log.php
//
// Version: 1.0
//
// Description:
//
// A Simple Blood Bank Mangement System made in Raw PHP
//
//
//
//
// Author: Ami Bappy [[email protected]]
//
// Github: https://github.com/amibappy
//
//
// .______ .___ .______ .______ ____. .____
// | _ \ / \ | _ \ | _ \ \ \ / /
// | |_) | / ^ \ | |_) | | |_) | \ \/ /
// | _ < / /_\ \ | ___/ | ___/ \_ _/
// | |_) | / _____ \ | | | | | |
// |______/ /__/ \__\ | _| | _| |__|
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2017 Bappy [[email protected]]
// All Rights Reserved.
//
//////////////////////////////////////////////////////////////////////////////////////////
//
// Unauthorized copying of this file, via any medium is strictly prohibited
// Proprietary and confidential
//
//////////////////////////////////////////////////////////////////////////////////////////
//
// DO NOT REMOVE THIS AREA
//
//////////////////////////////////////////////////////////////////////////////////////////
-->
<?php session_start(); ?>
<?php require_once('header.php')?>
<?php require_once('sidebar.php')?>
<?php
if(!$_SESSION['user'])
{
header('Location: login.php');
}
if(isset($_GET['p']))
{
$p = $_GET['p'];
$conn = oci_connect('system', 'admin', 'localhost/XE');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$query = 'DELETE FROM admin.user_triger WHERE ut_id='.$p;
$stid = oci_parse($conn, $query);
oci_execute($stid);
header('Location: log.php');
}
?>
<div class="donor-section">
<h1 class="menu-title">LOG REPORT : (USER)</h1>
<?php
$conn = oci_connect('system', 'admin', 'localhost/XE');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$stid = oci_parse($conn, 'SELECT * FROM admin.user_triger');
oci_execute($stid);
echo '<table class="tbls">
<tr>
<td>Action</td>
<td>Time</td>
<td>Old Username</td>
<td>New Username</td>
<td>Delete</td>
</tr>';
while (($row = oci_fetch_array($stid, OCI_BOTH)) != false) {
echo '<tr>
<td>'.$row["ACTION"].'</td>
<td>'.$row["TIME"].'</td>
<td>'.$row["OLD"].'</td>
<td>'.$row["NEW"].'</td>
<td> <a id="delete" onclick="return confirm(\'You Want To Delete This Item ?\');"" href="log.php?p='.$row['UT_ID'].'">Delete</a></td>
</tr>';
}
echo '</table>';
?>
</div>
<?php require_once('footer.php')?>