Browse Source

Upload files to 'public_html'

david.ortiz11 5 years ago
parent
commit
5546a31c23
4 changed files with 462 additions and 0 deletions
  1. 179
    0
      public_html/manage-personnel.php
  2. 118
    0
      public_html/materials.php
  3. 117
    0
      public_html/menu.php
  4. 48
    0
      public_html/navbar.php

+ 179
- 0
public_html/manage-personnel.php View File

@@ -0,0 +1,179 @@
1
+<!--    Authors         :   Carlos C. Corrada-Bravo
2
+                            David J. Ortiz-Rivera
3
+
4
+        Organization    :   Centro de Desarrollo y Consultoria Computacional
5
+        Project         :   OPASO Material Registry  
6
+        File            :   manage-personnel
7
+        Description     :   Manage laboratory personnel -->
8
+
9
+<!-- verify session -->
10
+<?php require_once("header.php");
11
+
12
+    /* start user session */
13
+    if(!isset($_SESSION)){
14
+        session_start();
15
+    }
16
+    if(!($_SESSION["access_level"] === "admin") and !($_SESSION["access_level"] === "investigator")){
17
+        header("Location: /menu");
18
+        die();
19
+    }
20
+?>
21
+
22
+<!doctype html>
23
+<html lang="en">
24
+    <!-- encoding/imports/styling -->
25
+    <head>
26
+        <meta charset="utf-8">
27
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
28
+        <title class="title">Manage Personnel</title>
29
+        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
30
+        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
31
+        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
32
+        <link rel="stylesheet" href="./style/main.css">
33
+        <link rel="stylesheet" href="/style/manage.css">
34
+        <link rel="stylesheet" href="/style/add.css">
35
+    </head>
36
+
37
+    <!-- content -->
38
+    <body>
39
+        <!-- forms -->
40
+        <div class="form-shader close-form">
41
+            <!-- access form -->
42
+            <div class="main-form close-form">
43
+                <div class="form-wrapper">
44
+                    <div class="form-header-wrapper">
45
+                        <h5 class="form-header main-header"></h5>
46
+                        <div class="close-icon"><i class="close-form material-icons">close</i></div>
47
+                    </div>
48
+                    <div class="form">
49
+                        <div class="form-body">
50
+                            <h6 class="form-header person"></h6>
51
+                            <div class="select-wrapper">
52
+                                <label class="select-label" for="number">Laboratory</label>
53
+                                <select class="laboratories"></select>
54
+                            </div>
55
+                            <div class="select-wrapper">
56
+                                <label class="select-label" for="number">Access Level</label>
57
+                                <select class=access_level>
58
+                                    <option value="investigator">Investigator</option>
59
+                                    <option value="technician">Technician</option>
60
+                                    <option value="none">None</option>
61
+                                </select>
62
+                            </div>
63
+                        </div>
64
+                        <div class="form-actions">
65
+                            <button class="btn btn-primary action-btn submit" id="main-submit">Submit</button>
66
+                        </div>
67
+                    </div>
68
+                </div>
69
+            </div>
70
+
71
+            <!-- add form -->
72
+            <div class="add-form close-form">
73
+                <div class="add-form-wrapper">
74
+                    <div class="add-form-header-wrapper">
75
+                        <h5 class="form-header">Add Personnel</h5>
76
+                        <div class="close-icon"><i class="close-form material-icons">close</i></div>
77
+                    </div>
78
+                    <div class="add-form-body-wrapper">
79
+                        <div class="add-form-body">
80
+                            <div class="details material">
81
+                                <div class="li-wrapper medium-field">
82
+                                    <label class="form-label" for="name">Full Name</label>
83
+                                    <input id="person_name" class="required ap-field" placeholder="Full name" type="text" name="name">
84
+                                    <div class="invalid-feedback person_name">Please provide a valid name</div>
85
+                                </div>
86
+                                <div class="li-append">
87
+                                    <div class="li-wrapper medium-field">
88
+                                        <label class="form-label" for="email">Email</label>
89
+                                        <input id="email" class="required ap-field" placeholder="someone@upr.edu" type="text" name="email">
90
+                                        <div class="invalid-feedback email">Please provide a valid email</div>
91
+                                    </div>
92
+                                    <div class="li-wrapper small-field margin-left phone-number">
93
+                                        <label class="form-label" for="number">Contact Number</label>
94
+                                        <input id="phone_number" class="ap-field" type="text" name="number" placeholder="Phone number" oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g,'$1');">
95
+                                    </div>                               
96
+                                </div>
97
+                            </div>
98
+                        </div>
99
+                        <div class="add-form-actions">
100
+                            <button class="btn btn-primary action-btn submit" id="add-submit">Submit</button>
101
+                        </div>
102
+                    </div>
103
+                </div>
104
+            </div> 
105
+        </div>
106
+
107
+        <!-- alerts -->
108
+        <div class="alerts">
109
+            <div class="alert">
110
+                <div class="message-icon-wrapper">
111
+                    <i class="message-icon success-icon material-icons">done</i>
112
+                    <i class="message-icon error-icon failed-icon warning-icon material-icons">close</i>
113
+                </div>
114
+                <p class="alert-status"></p>
115
+                <p class="alert-message"></p>
116
+            </div>
117
+        </div>
118
+
119
+        <div class="content">
120
+            <!-- navbar -->
121
+            <?php require_once("navbar.php")?>
122
+            <div class="main">
123
+                <div class="header-wrapper">
124
+                    <h5 class="header">Manage Personnel</h5>
125
+
126
+                    <!-- processing -->
127
+                    <div class="processing">
128
+                        <p class="processing-text">Fetching personnel...</p>
129
+                        <div class="loader"></div>
130
+                    </div>
131
+                </div>
132
+                <div class="main-wrapper">
133
+                    <!-- search form -->
134
+                    <div class="float-right">
135
+                        <div class="transaction btn btn-light" id="add">
136
+                            <i class="fas fa-plus add-personnel-icon"></i>
137
+                            <p class="add-text">Add</p>
138
+                        </div>
139
+
140
+                        <div class="search-form-wrapper">
141
+                            <input class="search-form" placeholder="Search for personnel" type="text" name="search-form">
142
+                            <button class="clear-btn search-form-submit">
143
+                                <i class="material-icons clear-icon">close</i>
144
+                            </button>
145
+                        </div>
146
+                    </div>
147
+
148
+                    <!-- personnel -->
149
+                    <h6 class="header sub-header">Personnel List</h6>
150
+                    <div class="table-wrapper content-wrapper personnel">
151
+                        <table class="table">
152
+                            <thead class="table-header">
153
+                                <tr>
154
+                                    <th value="person">Person</th>
155
+                                    <th >Authorized</th>
156
+                                    <th >Access Level</th>
157
+                                    <th >Actions</th>
158
+                                </tr>
159
+                            </thead>
160
+                            <tbody></tbody>
161
+                        </table>
162
+                    </div>
163
+
164
+                    <h6 class="header table-total"></h6>
165
+                </div>
166
+            </div>
167
+
168
+            <!-- footer -->
169
+            <?php require_once("footer.php")?>
170
+        </div>  
171
+
172
+        <!-- scripts -->
173
+        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
174
+        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
175
+        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
176
+        <script type="text/javascript" src="/scripts/main.js"></script>
177
+        <script type="text/javascript" src="/scripts/manage-personnel.js"></script>
178
+    </body>
179
+</html>

+ 118
- 0
public_html/materials.php View File

@@ -0,0 +1,118 @@
1
+<!--    Authors         :   Carlos C. Corrada-Bravo
2
+                            David J. Ortiz-Rivera
3
+
4
+        Organization    :   Centro de Desarrollo y Consultoria Computacional
5
+        Project         :   OPASO Material Registry  
6
+        File            :   materials
7
+        Description     :   Display authorized materials -->
8
+
9
+<!-- verify session -->
10
+<?php require_once("header.php");?>
11
+
12
+<!doctype html>
13
+<html lang="en">
14
+    <!-- encoding/imports/styling -->
15
+    <head>
16
+        <meta charset="utf-8">
17
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
+        <title class="title">Materials</title>
19
+        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
20
+        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
21
+        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
22
+        <link rel="stylesheet" href="/style/main.css">
23
+        <link rel="stylesheet" href="/style/materials.css">
24
+    </head>
25
+
26
+    <!-- content -->
27
+    <body>
28
+        <div class="material-data-shader hide-material-data">
29
+            <div class="material-data-wrapper">
30
+                <div class="material-data-icon-wrapper">
31
+                    <i class="hide-material-data-icon hide-material-data material-icons">close</i>
32
+                </div>
33
+                <div class="material-name-wrapper">
34
+                    <h5 class="header material-data-header material-name" value="mat_name"></h6>
35
+                </div>
36
+                <div class="material-data">
37
+                </div> 
38
+            </div>
39
+        </div>
40
+
41
+        <!-- alerts -->
42
+        <div class="alerts">
43
+            <div class="alert">
44
+                <div class="message-icon-wrapper">
45
+                    <i class="message-icon success-icon material-icons">done</i>
46
+                    <i class="message-icon error-icon failed-icon warning-icon material-icons">close</i>
47
+                </div>
48
+                <p class="alert-status"></p>
49
+                <p class="alert-message"></p>
50
+            </div>
51
+        </div>
52
+
53
+        <div class="content">
54
+            <!-- navbar -->
55
+            <?php require_once("navbar.php")?>
56
+            <div class="main">
57
+                <div class="header-wrapper">
58
+                    <h5 class="header">Materials</h5>
59
+                    
60
+                    <!-- processing -->
61
+                    <div class="processing">
62
+                        <p class="processing-text">Fetching materials...</p>
63
+                        <div class="loader"></div>
64
+                    </div>
65
+                </div>
66
+
67
+                <div class="main-wrapper">
68
+                    <div class="float-right">
69
+                        <div class="dropdown download">
70
+                            <button class="btn btn-outline-success download-btn" type="button" title="Download" id="dropdown-menu-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="material-icons download-icon">archived</i></button>
71
+                            <div class="dropdown-menu" aria-labelledby="dropdown-menu-button">
72
+                                <span class="download-option" value="full_report">Full Report</span><br>
73
+                                <span class="download-option" value="full_lab_report">Full Lab Report</span>
74
+                            </div>
75
+                        </div>
76
+
77
+                        <div class="search-form-wrapper">
78
+                            <input class="search-form" type="text" placeholder="Search for materials" name="search-form">
79
+                            <button class="clear-btn search-form-submit">
80
+                                <i class="material-icons clear-icon">close</i>
81
+                            </button>
82
+                        </div>
83
+                    </div>
84
+
85
+                    <!-- inventory -->
86
+                    <h6 class="header sub-header">Full Inventory</h6>
87
+                    <div class="table-wrapper content-wrapper">
88
+                        <table class="table">
89
+                            <thead class="table-header">
90
+                                <tr>
91
+                                    <th class="sort" value="mat_name" >Material
92
+                                        <i class="sort-icon sort-material fas fa-caret-down"></i>
93
+                                    </th>
94
+                                    <th value="">CAS</th>
95
+                                    <th class="sort" value="total" >Total
96
+                                        <i class="sort-icon sort-alt fas fa-caret-down"></i>
97
+                                    </th>
98
+                                </tr>
99
+                            </thead>
100
+                            <tbody></tbody>
101
+                        </table>
102
+                    </div>
103
+                    <h6 class="header table-total"></h6>
104
+                </div>
105
+            </div>
106
+
107
+            <!-- footer -->
108
+            <?php require_once("footer.php")?>
109
+        </div>  
110
+
111
+        <!-- scripts -->
112
+        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
113
+        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
114
+        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
115
+        <script type="text/javascript" src="/scripts/main.js"></script>
116
+        <script type="text/javascript" src="/scripts/materials.js"></script>
117
+    </body>
118
+</html>

+ 117
- 0
public_html/menu.php View File

@@ -0,0 +1,117 @@
1
+<!--    Authors         :   Carlos C. Corrada-Bravo
2
+                            David J. Ortiz-Rivera
3
+
4
+        Organization    :   Centro de Desarrollo y Consultoria Computacional
5
+        Project         :   OPASO Material Registry  
6
+        File            :   menu
7
+        Description     :   Display user menu -->
8
+
9
+<!-- verify session -->
10
+<?php require_once("header.php");?>
11
+
12
+<!doctype html>
13
+<html lang="en">
14
+    <!-- encoding/imports/styling -->
15
+    <head>
16
+        <meta charset="utf-8">
17
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
+        <title class="title">Menu</title>
19
+        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
20
+        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
21
+        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
22
+        <link rel="stylesheet" href="/style/main.css">
23
+        <link rel="stylesheet" href="/style/menu.css">
24
+    </head>
25
+    
26
+    <!-- content -->
27
+    <body>
28
+        <div class="content">
29
+            <!-- navbar -->
30
+            <?php require_once("navbar.php")?>
31
+
32
+            <div class="main">
33
+                <div class="header-wrapper">
34
+                    <h5 class="header">Menu</h5>
35
+
36
+                	<!-- processing -->
37
+                    <div class="processing">
38
+                        <p class="processing-text">Fetching laboratories...</p>
39
+                        <div class="loader"></div>
40
+                    </div>  
41
+                </div>
42
+                <div class="main-wrapper">
43
+                    <!-- Menu -->
44
+                    <div class="menu">
45
+                    	<div class="sub-menu-wrapper">
46
+							<?php
47
+							    if(($_SESSION["access_level"] === "admin") or ($_SESSION["access_level"] === "investigator")){
48
+						    	echo 	'<div class="sub-menu admin">
49
+	                        				<h6 class="header">Admin</h6><br>  
50
+	                        				<div class="col-lg-5 menu-link-wrapper">
51
+	                        					<a class="menu-link" href="/manage-personnel">Mangage Personnel 
52
+	                        						<i class="fas fa-user-alt menu-link-icon"></i>
53
+	                        					</a>
54
+	                        				</div>
55
+	                        				<div class="col-lg-5 menu-link-wrapper">
56
+	                        					<a class="menu-link" href="/manage-laboratories">Mangage Laboratories
57
+	                        						<i class="fas fa-building menu-link-icon"></i>
58
+	                        					</a>
59
+	                        				</div>
60
+	                        				<div class="col-lg-5 menu-link-wrapper">
61
+	                        					<a class="menu-link" href="/transactions">Transactions
62
+	                        						<i class="material-icons menu-link-icon">attach_money</i>
63
+	                        					</a>
64
+	                        				</div>';
65
+									if($_SESSION["access_level"] === "admin"){
66
+										echo '<div class="col-lg-5 menu-link-wrapper">
67
+	                        					<a class="menu-link" href="/requests">Requests
68
+	                        						<i class="material-icons menu-link-icon">notes</i>
69
+	                        					</a>
70
+	                        				  </div>';
71
+									}
72
+
73
+	                        		echo '</div>';
74
+							    }
75
+							?>	
76
+
77
+	                        <div class="sub-menu materials">
78
+	                            <h6 class="header">Materials</h6><br>  
79
+								<div class="col-lg-5 menu-link-wrapper">
80
+	            					<a class="menu-link" href="/materials">See Materials
81
+	            						<i class="fas fa-flask menu-link-icon"></i>
82
+	            					</a>
83
+	            				 </div>
84
+								<div class="col-lg-5 menu-link-wrapper">
85
+	            					<a class="menu-link" href="/hazards">See Materials by Hazard
86
+	            						<i class="material-icons menu-link-icon">warning</i>
87
+	            					</a>
88
+	            				 </div>
89
+								<div class="col-lg-5 menu-link-wrapper">
90
+	            					<a class="menu-link" href="/offered">Offered Materials
91
+	            						<i class="material-icons menu-link-icon">redeem</i>
92
+	            					</a>
93
+	            				 </div>
94
+	                        </div>
95
+                        </div>
96
+                        <div class="sub-menu-wrapper">
97
+	                        <div class="sub-menu laboratories">
98
+	                            <h6 class="header">Laboratories</h6><br>  
99
+	                            
100
+	                        </div>
101
+						</div>
102
+                    </div>
103
+
104
+                </div>
105
+            </div>
106
+            <!-- footer -->
107
+            <?php require_once("footer.php")?>
108
+        </div> 
109
+
110
+        <!-- scripts -->
111
+        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
112
+        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
113
+        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
114
+        <script type="text/javascript" src="/scripts/main.js"></script>
115
+        <script type="text/javascript" src="/scripts/menu.js"></script>
116
+    </body>
117
+</html>

+ 48
- 0
public_html/navbar.php View File

@@ -0,0 +1,48 @@
1
+<nav class="navbar navbar-expand-xlg">
2
+	<div class="navbar-header">
3
+		<a class="navbar-title" href="/menu">OPASO</a><br>	
4
+		<!-- logo -->
5
+		<!-- <img class="navbar-logo" src="https://cdn.shopify.com/s/files/1/0533/2089/files/placeholder-images-image_large.png?v=1530129081"> -->
6
+	</div>
7
+
8
+	<!-- links -->
9
+	<div class="link-wrapper">
10
+		<ul class="navbar-nav">
11
+			<li class="nav-item"><a class="nav-link" href="/menu">Menu</a></li>
12
+
13
+			<?php
14
+				/* generate link for current page */
15
+				if(basename($_SERVER["PHP_SELF"]) !== "menu.php"){
16
+					$current = basename($_SERVER["PHP_SELF"]);
17
+					$base = explode(".",$current)[0];
18
+					$title = ucwords(implode(" ",explode("-",$base)));
19
+
20
+					if($base !== "laboratory" and $base !== "inventory"){
21
+						echo '<li class="nav-item menu-link"><a class="nav-link" href="/' . $base . '">' . $title . '</a></li>';
22
+					
23
+					}
24
+					
25
+					/* lab or inventory */
26
+					else{
27
+						if($base === "inventory"){
28
+							echo '<li class="nav-item menu-link"><a class="nav-link arg-link" href="/laboratory">Laboratory</a></li>';
29
+						}
30
+
31
+						echo '<li class="nav-item menu-link arg-link-wrapper"><a class="nav-link arg-link" href="/' . $base . '">' . $title . '</a></li>';
32
+					}
33
+				}
34
+			?>
35
+
36
+		</ul>
37
+
38
+		<!-- user menu -->
39
+		<div class="um-wrapper" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
40
+			<div class="user-menu">
41
+				<a class="user nav-link" href="#"><span class="user-name"><?php echo $_SESSION["person_name"]; ?></span><i class="um-icons dropdown-icon fas fa-caret-down"></i></a>
42
+				<div class="dropdown-menu dropdown-menu-right">
43
+					<span class="dropdown-item logout">Log Out <i class="um-icons fas fa-sign-out-alt"></i></span>
44
+				</div>
45
+			</div>
46
+		</div>
47
+	</div>
48
+</nav>