-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsupporting_files.php
118 lines (95 loc) · 3.36 KB
/
supporting_files.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
<?php
/*
* supporting_files.php
*
* A place to edit/update the supporting files
*
*/
include_once 'checkinstance.php';
if ( $_SESSION['userlevel'] < 1 )
{
header('Location: index.php');
exit();
}
include 'config.php';
include 'db.php';
include 'lib/utility.php';
// Start displaying page
$page_title = 'Supporting Files';
$css = 'css/supporting_files.css';
$js = 'js/supporting_files.js';
include 'header.php';
echo <<< HTML
<!-- Begin page content -->
<div id="sf_content">
<div style="clear: both"></div>
<div id="sf_navbar" class="sf_item">
<div class="sf_navbar_item" id="sf_view" onclick="handle_mode(this)"> View / Edit</div>
<div class="sf_navbar_item" id="sf_new" onclick="handle_mode(this)"> New </div>
</div>
<div id="sf_edit_item">
<input type="checkbox" id="sf_edit" onchange="set_edit_mode(this)">
<span id="sf_edit_label">Edit Document </span>
</div>
<fieldset id="sf_sel_proj_item" class="sf_item">
<label for="sf_sel_proj">Project:</label>
<select id="sf_sel_proj" onchange="select_project(this)">
<option value="EMPTY">--- Empty ---</option>
</select>
</fieldset>
<fieldset id="sf_sel_file_item" class="sf_item">
<label for="sf_sel_file">Document:</label>
<select id="sf_sel_file" onchange="select_document()">
<option value="EMPTY">--- Empty ---</option>
</select>
<button id="sf_prev" type="button" onclick="sf_prev_doc()"> Previous </button>
<button id="sf_next" type="button" onclick="sf_next_doc()"> Next </button>
</fieldset>
<div class="sf_item">
<label for="sf_desc"> Description: </label>
<input type="text" name="sf_desc" id="sf_desc" value="" oninput="filter_text(this)">
</div>
<div class="sf_item">
<label for="sf_filename"> Filename: </label>
<input type="text" name="sf_filename" id="sf_filename" value="" readonly>
<input type="file" name="sf_browse" id="sf_browse" onchange="browse_document(this)">
</div>
<div class="sf_item" id="sf_class_item">
<label for="sf_sel_class">Category:</label>
<select id="sf_sel_class" onchange="select_class(this)">
<option value="EMPTY">--- Empty ---</option>
</select>
<input type="text" id="sf_txt_class" value="" readonly>
</div>
<div class="sf_item" id="sf_subclass_item">
<label for="sf_sel_subclass">Subcategory:</label>
<select id="sf_sel_subclass">
<option value="EMPTY">--- Empty ---</option>
</select>
<input type="text" id="sf_txt_subclass" value="" readonly>
</div>
<div id="sf_status_button_item">
<div>
<input type="text" id="sf_status" value="" readonly>
</div>
<div id="sf_button_item" class="sf_item">
<button id="sf_save" type="button" onclick="save_document()"> Save File </button>
<button id="sf_update" type="button" onclick="update_document()"> Update </button>
<button id="sf_delete" type="button" onclick="delete_document()"> Delete </button>
<button id="sf_upload" type="button" onclick="upload_document()"> Upload </button>
</div>
</div>
<br>
<object id="pdf_viewer" type="application/pdf" data="" width="800" height="600"></object>
<img id="image_viewer" src="" alt="">
<div>
<textarea id="txt_viewer" rows="20" cols="100" readonly></textarea>
</div>
</div>
<script>init_setup()</script>
<script>handle_mode(element_view)</script>
HTML;
echo "<!-- Footer -->";
include 'footer.php';
exit();
?>