-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsorumlu_gor.php
60 lines (54 loc) · 1.87 KB
/
sorumlu_gor.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
<?php
include "database.php";
session_start();
if(!isset($_SESSION["AID"])) {
echo "<script>window.open('admin_giris.php?mes=Hata...','_self');</script>";
}
?>
<!DOCTYPE html>
<html>
<head>
<title>E-OKUL</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<?php include "ust_kisayol.php";?>
<div id="section">
<?php include "yan_kisayol.php";?><br>
<h3 class="text">Hoşgeldiniz <?php echo $_SESSION["ANAME"]; ?></h3><br><hr><br>
<div class="content1">
<h3 > Sorumlular</h3><br>
<br>
<div id="box"></div>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
var txtInput = document.getElementById("txt");
var boxDiv = document.getElementById("box");
var xhr = new XMLHttpRequest();
xhr.open("GET", "ara.php", true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
boxDiv.innerHTML = xhr.responseText;
}
};
xhr.send();
txtInput.addEventListener("input", function() {
var txt = txtInput.value;
if (txt !== "") {
var xhr = new XMLHttpRequest();
xhr.open("POST", "ara.php", true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
boxDiv.innerHTML = xhr.responseText;
}
};
xhr.send("s=" + txt);
}
});
});
</script>
</body>
</html>