-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchangeComplexity.php
More file actions
147 lines (132 loc) · 4.97 KB
/
changeComplexity.php
File metadata and controls
147 lines (132 loc) · 4.97 KB
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?php
require './config.inc.php';
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Project Complexity</title>
<meta name="generator" content="Bootply" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Custom CSS -->
<link href="css/landing-page.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-static">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="whereIsHome.php" target=""><b>Schneider Electric: Administrator</b></a>
<a class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="glyphicon glyphicon-chevron-down"></span>
</a>
</div>
<ul class="nav navbar-nav navbar-right navbar-user">
<li><a href="userlogout.php"><i class="fa fa-power-off"></i><b> Log Out</b></a></li>
</ul>
</div>
</nav><!-- /.navbar -->
<h1><center>Change Complexity</center></a></h1><br>
<!-- Begin Body -->
<div class="container">
<div class="no-gutter row">
<!-- left side column -->
<div class="col-md-2">
<div class="panel panel-default" id="sidebar">
<!--<div class="panel-heading" style="background-color:#64F797"></div>
<div class="panel-body">
<ul class="nav nav-stacked">
<li><a href="newAccount.html">Add User </a></li>
<li><a href="deleteUser.html">Edit/Delete User</a></li>
</ul>
</div>-->
</div>
</div><!--/end left column-->
<!--mid column-->
<div class="col-md-8">
<div class="panel" id="midCol">
<div class="panel-heading" style="background-color:#3DC66D"></div>
<div class="panel-body">
<!--div class="table-responsive"-->
<br><br>
<table align="center" style="width:200px" class="table table-bordered table-striped">
<thead>
<tr>
<td data-field="complexity">Complexity</td>
</tr>
</thead>
<tbody class="result"></tbody>
</table>
<br>
<table class="table table-borderless">
<tr> <!--row0-->
<th> Insert <br></th>
<td><input type="text" style="width:100px; text-align:center" id="ICV" name="ICV">Insert Complexity</td>
<th> Delete <br></th>
<td><input type="text" style="width:100px; text-align:center" id="DCV" name="DCV">Delete Complexity</td>
</tr>
</table><!--/div-->
<table align="center">
<tr> <!--row0-->
<button type="button" style="float:right;" class="button" name="save" onclick="updateComplexities()" value="Save">Save</button>
</tr>
<tr> <!--row0-->
<button type="button" style="float:right;" class="button" name="done" onclick="done()" value="Done">Done</button>
</tr>
</table>
</div><!--/panel-->
</div>
</div> <!--/end mid column-->
</div>
</div>
<!-- script references -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/scripts.js"></script>
<script type="text/javascript">
window.onload=getComplexities;
function updateComplexities(){
var ICE = document.getElementById("ICV");
if(ICE != null){
var IC = ICE.value;
}
var DCE = document.getElementById("DCV");
if(DCE != null){
var DC = DCE.value;
}
var action = 'updateComplexities';
var ajaxurl = 'ajax.php',
data = {'action':action,
'IC':IC,
'DC':DC};
$.post(ajaxurl,data,function(response){
var jsonData = JSON.parse(response);
if(jsonData){
alert("Complexities updated successfully.");
}else{
alert("Error updating complexities.");
}
location.reload();
//window.location = "adminHomepage.html";
});
}
function getComplexities(){
var action = 'getComplexities';
var ajaxurl = 'ajax.php',
data = {'action':action};
$.post(ajaxurl,data,function(response){
$(".result").html(response);
});
}
function done(){
window.location = "adminHomepage.html";
}
</script>
</body>
</html>