|
1 | 1 | <?php |
2 | 2 |
|
3 | | -require_once "../../resources/autoload.php"; |
| 3 | +require_once __DIR__ . "/../../resources/autoload.php"; |
4 | 4 |
|
5 | 5 | use UnityWebPortal\lib\UnitySite; |
6 | 6 |
|
|
77 | 77 | case "account_deletion_request": |
78 | 78 | $hasGroups = count($USER->getGroups()) > 0; |
79 | 79 | if ($hasGroups) { |
80 | | - die(); |
81 | 80 | break; |
82 | 81 | } |
83 | 82 | if (!$SQL->accDeletionRequestExists($USER->getUID())) { |
|
115 | 114 | } elseif ($isActive) { |
116 | 115 | echo "<p>You are curently a <strong>user</strong> on the Unity Cluster</p>"; |
117 | 116 | } else { |
118 | | - echo "<p>You are currently not assigned to any PI, and will be |
119 | | - <strong>unable to use the cluster</strong>. Go to the <a href='groups.php'>My PIs</a> |
| 117 | + echo "<p>You are currently not assigned to any PI, and will be |
| 118 | + <strong>unable to use the cluster</strong>. Go to the <a href='groups.php'>My PIs</a> |
120 | 119 | page to join a PI, or click on the button below if you are a PI</p>"; |
121 | 120 | echo "<p>Students should not request a PI account.</p>"; |
122 | 121 | } |
123 | 122 |
|
124 | 123 | if (!$isPI) { |
125 | 124 | if ($SQL->accDeletionRequestExists($USER->getUID())) { |
126 | 125 | echo |
127 | | - "<form action='' method='POST' id='piReq' |
| 126 | + "<form action='' method='POST' id='piReq' |
128 | 127 | onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'> |
129 | 128 | <input type='hidden' name='form_type' value='pi_request'>"; |
130 | 129 | echo "<input type='submit' value='Request PI Account' disabled>"; |
|
135 | 134 | echo "</form>"; |
136 | 135 | } else { |
137 | 136 | echo |
138 | | - "<form action='' method='POST' id='piReq' |
| 137 | + "<form action='' method='POST' id='piReq' |
139 | 138 | onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'> |
140 | 139 | <input type='hidden' name='form_type' value='pi_request'>"; |
141 | 140 | if ($SQL->requestExists($USER->getUID())) { |
|
163 | 162 | echo |
164 | 163 | "<div class='key-box'> |
165 | 164 | <textarea spellcheck='false' readonly>" . $sshPubKeys[$i] . "</textarea> |
166 | | - <form action='' id='del-" . $i . "' |
| 165 | + <form action='' id='del-" . $i . "' |
167 | 166 | onsubmit='return confirm(\"Are you sure you want to delete this SSH key?\");' method='POST'> |
168 | 167 | <input type='hidden' name='delIndex' value='$i'> |
169 | 168 | <input type='hidden' name='form_type' value='delKey'> |
|
182 | 181 |
|
183 | 182 | <input type="hidden" name="form_type" value="loginshell"> |
184 | 183 |
|
185 | | - <select id="loginSelector" name= "shellSelect"> |
| 184 | + <select id="loginSelector" name= "shellSelect"> |
186 | 185 |
|
187 | 186 | <option value="" disabled hidden>Select Login Shell...</option> |
188 | 187 |
|
|
209 | 208 | <?php |
210 | 209 |
|
211 | 210 | if ($found_selector) { |
212 | | - echo "<input id='customLoginBox' type='text' |
| 211 | + echo "<input id='customLoginBox' type='text' |
213 | 212 | placeholder='Enter login shell path (ie. /bin/bash)' name='shell'>"; |
214 | 213 | } else { |
215 | | - echo "<input id='customLoginBox' type='text' |
| 214 | + echo "<input id='customLoginBox' type='text' |
216 | 215 | placeholder='Enter login shell path (ie. /bin/bash)' name='shell' value='$cur_shell'>"; |
217 | 216 | } |
218 | 217 |
|
|
232 | 231 | echo "<p>You cannot request to delete your account while you are in a PI group.</p>"; |
233 | 232 | } else { |
234 | 233 | echo |
235 | | - "<form action='' method='POST' id='accDel' |
| 234 | + "<form action='' method='POST' id='accDel' |
236 | 235 | onsubmit='return confirm(\"Are you sure you want to request an account deletion?\")'> |
237 | 236 | <input type='hidden' name='form_type' value='account_deletion_request'>"; |
238 | 237 | if ($SQL->accDeletionRequestExists($USER->getUID())) { |
|
0 commit comments