-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
101 lines (87 loc) · 2.89 KB
/
index.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
<?php
/**
* Created by PhpStorm.
* User: ahmet
* Date: 15.11.2017
* Time: 23:24
*/
error_reporting(0);
require "classes/Karnaugh.php";
?>
<html>
<head>
<title>Karnaugh Map | Ahmet Çotur</title>
<style type="text/css">
body{
margin: 0;
padding: 0;
}
span.head{
display: block;
font-size: 25px;
font-weight: bold;
padding: 10px;
text-align: center;
}
table.TruthTable{
font-size:20px;
font-weight:bold;
}
a{
color:dimgrey;
text-decoration: none;
}
a:hover{
text-decoration: underline;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
var data = { 'numbs[]' : []};
$("input:checked").each(function() {
data['numbs[]'].push($(this).val());
});
$.post("post.php", data).done(function( ret ) {
$("#changeArea").html(ret);
$(".numbsCheck").attr("disabled",null);
});
$('.numbsCheck').change(function() {
$(".numbsCheck").attr("disabled","disabled");
if(this.checked) {
$(".fNumbs"+ this.value).html("1");
}else {
$(".fNumbs"+ this.value).html("0");
}
var data = { 'numbs[]' : []};
$("input:checked").each(function() {
data['numbs[]'].push($(this).val());
});
$.post("post.php", data).done(function( ret ) {
$("#changeArea").html(ret);
$(".numbsCheck").attr("disabled",null);
});
});
});
</script>
</head>
<body>
<center><h1>Karnaugh Map <h6 style="color: dimgrey"><a style="color: dimgrey" href="https://en.wikipedia.org/wiki/Karnaugh_map" target="_blank">What is it?</a></h6></h1></center>
<hr>
<?php
$kTable = new Karnaugh(4,"min");
?>
<center><div style="width: 500px;display: inline-block">
<div style="float: left;">
<form action="post.php" method="post" id="truthTable">
<?php
$kTable->printTruthTable();
?>
</form>
</div>
<div id="changeArea" style="float: right;margin-right: 50px">
</div>
</div></center>
<script src="js/malsup.js" type="text/javascript"></script>
</body>
</html>