-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
243 lines (234 loc) · 15 KB
/
Copy pathindex.php
File metadata and controls
243 lines (234 loc) · 15 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<?php
session_start();
if (isset($_SESSION['xmlcontents'])) {
$xmlval = $_SESSION['xmlcontents'];
} else {
$xmlval = "";
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Internship Project 1</title>
<script src="js/jquery-3.2.1.min.js" charset="utf-8"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/toastr.min.js"></script>
<script type="text/javascript">
mxBasePath = 'src';
</script>
<link rel="stylesheet" href="css/toastr.min.css"/>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/hexagon.min.css">
<link href="https://fonts.googleapis.com/css?family=Raleway:400,500,700|Roboto:400,500,700" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<!-- <body onload="main(document.getElementById('mainer'))"> -->
<div class="container cont-main">
<div class="row">
<div class="col-2 agent-col">
<div class="agent-img text-center">
<img src="css/agent.png" alt="" class="agent-sizer" style="border-radius: 50%; margin-bottom: 25px;">
<br>
<p class="text-center agent-text noselect">I'm going to give you a tour of the Workspace. Let's get started!</p>
<input type="submit" class="text-center skip-intro" name="" value="Skip Intro">
</div>
</div>
<div class="col-10 main-data">
<span class="main-hide">
<button type="button" name="a-close" class="agent-closer" onclick="hidagent()"><i class="fa fa-arrow-left arrow-left" aria-hidden="true"></i></button>
</span>
<div class="my-navbar text-center">
<div class="header-placer">
<span class="ws-ele" style="float:left;"><h3 class="Workspace">WORKSPACE</h3></span>
</div>
<!-- <div class="header-placer">
<span class="ws-ele"><input type="submit" class="btn btn-info btn-in" name="" onclick="zoomIn()" value="+"></span>
<span class="ws-ele"><input type="submit" class="btn btn-info btn-out" name="" onclick="zoomOut()" value="-"></span>
</div> -->
<div class="header-placer">
<span class="ws-ele del-rel" style="float: right;">
<label for="stuff" class="fa fa-refresh input-icon"></label>
<input type="submit" class="btn btn-info btn-so delete-btn" name="" onclick="clearAll()" value="Start Over">
</span>
<span class="ws-ele del-rel" style="float: right;">
<label for="stuff" class="fa fa-times input-icon"></label>
<input type="submit" class="btn btn-info btn-so delete-btn" name="" onclick="deleteCells()" value="Delete">
</span>
<span style="float: right;">
<span class="saver ws-ele del-rel" style="float: right;">
<label for="stuff" class="fa fa-floppy-o input-icon"></label>
<input type="submit" class="btn btn-info btn-save save-to" name="" onclick="" value="Save">
</span>
<!-- <span style="float: right;"> -->
<!-- For saving uid & filename -->
<div class="messagepop pop">
<form action="process.php" method="post">
<p><label for="username" class="modal-label">Your username</label><input type="text" class="form-control" size="30" name="username" id="uname" required/></p>
<p><label for="filename" class="modal-label">Your filename</label><input type="text" class="form-control" size="30" name="filename" id="fname" required/></p>
<p><input type="submit" class="btn btn-info" value="Store Graph" name="commit" id="get-graph" onclick=""/> or <input type="button" class="btn-info btn closebtn" href="/" value="Cancel"></p>
<input type="text" class="hidden-xml-ip" name="content" value="" style="display: none !important;">
</form>
</div>
<span class="saver ws-ele del-rel" style="float: right;">
<label for="stuff" class="fa fa-spinner input-icon"></label>
<input type="submit" class="btn btn-info btn-save load-from" name="" onclick="" value="Load">
</span>
<!-- For retrieving uid & filename -->
<div class="messagepop2 pop2">
<form action="retrieve.php" method="get" onsubmit="retrieveptr()">
<p><label for="username" class="modal-label">Your username</label><input type="text" class="form-control" size="30" name="username" id="uname" required/></p>
<p><label for="filename" class="modal-label">Your filename</label><input type="text" class="form-control" size="30" name="filename" id="fname" required/></p>
<p><input type="submit" class="btn btn-info" value="Retrieve Graph" name="commit" id="get-graph retrieve-graph" onclick=""/> or <input type="button" class="btn-info btn closebtn2" href="/" value="Cancel"></p>
<input type="text" class="hidden-xml-op" name="contented" value="<?php echo ($xmlval); ?>" style="display: none !important;">
</form>
</div>
</span>
</div>
</div>
<!-- <br> -->
<div class="row ws-data">
<div class="col-md-12 text-center extra-data">
<span style="display: inline-block;" class="qn-text noselect">
<!-- Q1. Hello this is a random question of a minimum of 10 words to be displayed in the text area so please recheck it to adjust! -->
</span>
<div class="col-md-2 text-center floater og-pal">
<div class="tp-full-left">
<h4 class="tool-pal noselect">CANVAS PALETTE</h4>
<br>
<!-- <br> -->
<span class="saver ws-ele text-center blocker" style=""><input id="heirarchical" type="submit" class="autolayout-btn btn btn-info text-center left-toolbar" name="" onclick="" value="Auto Layout"></span>
<!-- <br> -->
<span class="saver ws-ele text-center blocker" style=""><input type="submit" class="btn btn-info text-center left-toolbar" name="" onclick="undoChange()" id="undo-btn" value="Undo"></span>
<!-- <br> -->
<span class="saver ws-ele text-center blocker" style=""><input type="submit" class="btn btn-info text-center left-toolbar" name="" onclick="redoChange()" id="redo-btn" value="Redo"></span>
<!-- <br> -->
<span class="saver ws-ele text-center" style=""><input type="submit" class="btn btn-info text-center left-toolbar" name="" onclick="viewXML()" value="View XML"></span>
<!-- <br> -->
<!-- <span class="saver ws-ele text-center" style=""><input type="submit" class="btn btn-info text-center left-toolbar" name="" onclick="downloadXML()" value="Download XML"></span> -->
<!-- <input type="text" id="dwnld-name" placeholder="Save as" name="" value=""> -->
<!-- <br> -->
<span class="saver ws-ele text-center blocker" style=""><input type="submit" class="btn btn-info text-center left-toolbar" id="get_file" name="" onclick="importXML()" value="Import XML"></span>
<input type="file" id="my_file" onchange='loadFileAsText(event, onFileLoad.bind(this, "contents"))'>
<div id="customfileupload" class="text-center fileselect">Select a file</div>
<br>
</div>
<div class="tp-swapper-left">
<span class="saver ws-ele text-center" style=""><input type="submit" class="btn text-center swap-btn" name="" onclick="swappal()" value="TOOLS PALETTE"></span>
</div>
</div>
<div class="col-md-2 text-center floater can-pal">
<div class="tp-full-left">
<h4 class="tool-pal noselect">TOOLS PALETTE</h4>
<br>
<!-- <br> -->
<span class="saver ws-ele text-center tool-blocker noselect" style=""> <input type="image" src="css/img1.png" width="25" height="43" name="" value=""> </span>
<!-- <br> -->
<!-- <span class="saver ws-ele text-center tool-blocker" style=""> <input type="image" src="css/img2.png" width="60" height="35" onclick="eyeclick()" name="" value=""> </span> -->
<!-- <br> -->
<div class="btn-group tool-blocker noselect">
<input type="image" src="css/img2new.png" width="60" height="35" class="btn btn-default dropdown-toggle dd-btn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
</input>
<ul class="dropdown-menu">
<span class="saver ws-ele text-center tool-blocker" style=""> <input type="image" src="css/img6.png" width="35" height="45" onclick="" name="" value=""> </span>
<span class="saver ws-ele text-center tool-blocker" style=""> <input type="image" src="css/img7.png" width="45" height="45" onclick="" name="" value=""> </span>
<span class="saver ws-ele text-center tool-blocker" style=""> <input type="image" src="css/img8.png" width="45" height="45" onclick="" name="" value=""> </span>
</ul>
</div>
<!-- <br> -->
<div class="btn-group tool-blocker noselect">
<input type="image" src="css/img3new.png" width="43" height="43" class="btn btn-default dropdown-toggle dd-btn" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
</input>
<ul class="dropdown-menu">
<span class="saver ws-ele text-center tool-blocker" style=""> <input type="image" src="css/img9.png" width="30" height="45" onclick="" name="" value=""> </span>
<span class="saver ws-ele text-center tool-blocker" style=""> <input type="image" src="css/img10.png" width="45" height="45" onclick="" name="" value=""> </span>
</ul>
<!-- <br> -->
<!-- <span class="saver ws-ele text-center tool-blocker" style=""> <input type="image" src="css/img3.png" width="43" height="43" onclick="toolclick()" name="" value=""> </span> -->
</div>
<!-- <br> -->
<span class="saver ws-ele text-center tool-blocker noselect" style=""> <input type="image" src="css/img4.png" width="40" height="40" name="" value=""> </span>
<!-- <br> -->
<span class="saver ws-ele text-center tool-blocker noselect" style=""> <input type="image" src="css/img5.png" width="55" height="47" name="" value=""> </span>
<!-- <br> -->
</div>
<div class="tp-swapper-left">
<span class="saver ws-ele text-center noselect" style=""><input type="submit" class="btn text-center swap-btn" name="" onclick="swappal()" value="CANVAS PALETTE"></span>
</div>
</div>
<div class="col-md-8 main-row floater">
<div class="main-ws" id="mainer">
<!-- <span class="element1">You can drag me only within this div.</span> -->
<span class="zoomdata">
<span class="zoom-ele"><button type="submit" class="btn btn-in magnify" name="" onclick="zoomIn()"><i class="fa fa-search-plus"></i></button></span>
<span class="zoom-ele"><button type="submit" class="btn btn-out magnify" name="" onclick="zoomOut()"><i class="fa fa-search-minus"></i></button></span>
</span>
</div>
</div>
<div class="col-md-2 tp-full text-center floater">
<h4 class="nodes-ws">NODES</h4>
<br>
<!-- <div class="circle-xs node-eles" onclick="gencircle()"><span class="f-text">F</span></div> -->
<img class="FVer" src="css\F.png" style="width:50px;height:50px;" data-toggle="tooltip" data-placement="top" title="Function - It is the high level activities performed by the proposed system. It answers the question 'What all the proposed system does?'" onclick="addFSBVertex(mainer,1)">
<br>
<br>
<!-- <div class="hexagon-xs hexagon-warning node-eles" onclick="genhex()">S</div> -->
<img class="SVer" src="css\S.png" style="width:50px;height:50px;" data-toggle="tooltip" data-placement="top" title="Structure - The components required for implementing the function. It answers the question 'What are the visible/invisible components required to implement the function?'" onclick="addFSBVertex(mainer,2)">
<br>
<br>
<!-- <div class="rect-xs node-eles" onclick="genrect()">B</div> -->
<img class="BVer" src="css\B.png" style="width:60px;height:44px;" data-toggle="tooltip" data-placement="top" title="Behaviour - The working of the components together to achieve the function. It answers the question of 'How the components work together to achieve the function?'" onclick="addFSBVertex(mainer,3)">
<br>
<br>
<h4 class="nodes-ws">CONNECTORS</h4>
<br id="smallbreak">
<img src="css\arrow1.png" style="width:95px;height:50px;" onclick="addFSBEdge(mainer, 1)">
<br>
<img src="css\arrow2.png" style="width:95px;height:50px;" onclick="addFSBEdge(mainer, 2)">
<br>
<img src="css\arrow3.png" style="width:95px;height:50px;" onclick="addFSBEdge(mainer, 3)">
<br>
<img src="css\arrow4.png" style="width:95px;height:50px;" onclick="addFSBEdge(mainer, 4)">
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<?php
echo " ";
if (isset($_SESSION['repeat'])) {
if (($_SESSION['repeat']) == 2) {
echo " ";
echo "<script>toastr.error('Please enter a new filename.', 'The filename already exists!');</script>";
$_SESSION['repeat'] = 0;
} else if (($_SESSION['repeat']) == 1) {
echo " ";
echo "<script>toastr.success('The graph was successfully saved.', 'Save Successful!');</script>";
$_SESSION['repeat'] = 0;
}
}
?>
<script type="text/javascript" src="js/mxClient.js"></script>
<script type="text/javascript" src="js/tether.min.js" charset="utf-8"></script>
<!-- <script type="text/javascript" src="js/index.js" charset="utf-8"></script> -->
<script type="text/javascript" src="js/bootstrap.min.js" charset="utf-8"></script>
<script type="text/javascript" src="js/graphFunctions.js"></script>
<script type="text/javascript" src="js/Actions.js"></script>
<script>
document.getElementById('get_file').onclick = function() {
document.getElementById('my_file').click();
};
$('input[type=file]').change(function(e) {
$('#customfileupload').html($(this).val());
});
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
</html>