ResultManager/subs/part/phases.php
2019-08-08 16:58:29 +03:00

113 lines
5.0 KiB
PHP

<?php
/**
* /subs/phases.php
* @version 1.0
* @desc phases menu
* @author Fándly Gergő Zoltán (fandlygergo@gmail.hu, systemtest.tk)
* @copy 2017 Fándly Gergő Zoltán
* License:
Result Manager for managing results of students in bilingual school systems.
Copyright (C) 2017 Fándly Gergő Zoltán
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
?>
<div class="selfcenter">
<!-- language for jquery -->
<span id="phasesDeleteConfirm" style="display: none"><?php echo $lang['delete_confirm'] ?></span>
<!-- filter -->
<div class="dropdown selfcenter" style="width: 95%" id="dd_filter">
<div class="dropdown header">
<a onclick="toggleDropdown('#dd_filter_content', '#dd_filter_img')">
<img class="icon" src="./res/plus.png" alt="plusminus" id="dd_filter_img">
<span><?php echo $lang['filter'] ?></span>
</a>
</div>
<div class="dropdown content" id="dd_filter_content">
<form method="POST" class="ajaxform" id="dd_filter_form" onsubmit="phasesFilterApply()">
<input type="hidden" name="filter">
<p><?php echo $lang['search'].":" ?></p>
<input type="text" name="f_search" placeholder="<?php echo $lang['search']."..." ?>">
<hr>
<button type="submit" form="dd_filter_form"><?php echo $lang['apply'] ?></button>
<button type="button" onclick="phasesFilterReset()"><?php echo $lang['reset'] ?></button>
</form>
</div>
</div>
<hr class="placeholder">
<?php if($_SESSION['accesslevel']>=3): ?>
<!-- new FOR elevated -->
<div class="dropdown selfcenter" style="width: 95%" id="dd_new">
<div class="dropdown header">
<a onclick="toggleDropdown('#dd_new_content', '#dd_new_img')">
<img class="icon" src="./res/plus.png" alt="plusminus" id="dd_new_img">
<span><?php echo $lang['new'] ?></span>
</a>
</div>
<div class="dropdown content" id="dd_new_content">
<form method="POST" class="ajaxform" id="dd_new_form" onsubmit="phasesNew()">
<input type="hidden" name="new">
<table>
<tr>
<td><?php echo $lang['name_1'].": " ?></td>
<td><input type="text" name="name_1" placeholder="<?php echo $lang['name_1']."..." ?>" required></td>
</tr>
<tr>
<td><?php echo $lang['name_2'].": " ?></td>
<td><input type="text" name="name_2" placeholder="<?php echo $lang['name_2']."..." ?>" required></td>
</tr>
</table>
<br>
<br>
<button type="submit" form="dd_new_form"><?php echo $lang['ok'] ?></button>
<button type="reset" form="dd_new_form" onclick="toggleDropdown('#dd_new_content', '#dd_new_img')"><?php echo $lang['cancel'] ?></button>
</form>
</div>
</div>
<hr class="placeholder">
<!-- edit -->
<div class="dropdown selfcenter" style="width: 95%; display: none" id="dd_edit">
<div class="dropdown header">
<span><?php echo $lang['edit'] ?></span>
</div>
<div class="dropdown content" style="display: block">
<form method="POST" class="ajaxform" id="dd_edit_form" onsubmit="phasesSubmitEdit()">
<input type="hidden" name="edit">
<table>
<tr>
<td><?php echo $lang['name_1'].": " ?></td>
<td><input type="text" name="name_1" placeholder="<?php echo $lang['name_1']."..." ?>" required></td>
</tr>
<tr>
<td><?php echo $lang['name_2'].": " ?></td>
<td><input type="text" name="name_2" placeholder="<?php echo $lang['name_2']."..." ?>" required></td>
</tr>
</table>
<br>
<br>
<button type="submit" form="dd_edit_form"><?php echo $lang['ok'] ?></button>
<button type="button" onclick="phasesCancelEdit()"><?php echo $lang['cancel'] ?></button>
</form>
</div>
</div>
<?php endif ?>
<hr class="placeholder">
<!-- list -->
<div id="list" class="selfcenter">
<!-- list goes here -->
</div>
</div>