2 <script
type=
"text/javascript" src=
"../system/engines/jquery/bootstrap-tabcollapse.js"></script>
3 <!-- data tables JS -->
4 <script
type=
"text/javascript">
5 $(document).
ready(
function() {
18 $(
'#myTab').tabCollapse({
19 tabsClass:
'hidden-sm hidden-xs',
20 accordionClass:
'visible-sm visible-xs'
30 $(
'a[data-toggle="tab"]').
on(
'shown.bs.tab',
function (
e) {
32 localStorage.setItem(
'lastTab', $(
this).attr(
'href'));
35 var lastTab = localStorage.getItem(
'lastTab');
37 $(
'[href="' + lastTab +
'"]').tab(
'show');
39 var activeTab = lastTab.toLowerCase();
41 var activeFolder = activeTab.slice(1);
43 $(
'select option[value="'+activeFolder+
'"]').prop(
'selected',
true);
56 function setRenameFieldState(path, itemName, itemType)
59 inputField = $(
"#newItemName");
61 $(
'#renameModal').
on(
'shown.bs.modal',
function () {
63 $(inputField).focus().select();
66 inputField.val(itemName);
70 $(
"#oldItemName").val(itemName);
72 $(
"#itemType").val(itemType);
74 $(
"#fileTypeHeading").text(itemType);
76 $(
"#newItemNameLabel").text(itemType);
87 function setChmodCode(item, chmodCode)
90 inputField = $(
"#customChmodCode");
92 $(
'#chmodModal').
on(
'shown.bs.modal',
function () {
94 $(inputField).focus().select();
97 inputField.val(chmodCode);
106 function flipTheSwitch(folder)
109 $(
'select option[value="'+folder+
'"]').prop(
'selected',
true);
138 if (isset($_POST[
'upload']))
140 if (isset($_POST[
'folderselect']))
142 $upload_folder = $_POST[
'folderselect'];
143 $upload_folder =
"../media/$upload_folder/";
147 $upload_folder =
"../media/uploads/";
150 switch ($_POST[
'upload'])
154 $target_path = $upload_folder . basename( $_FILES[
'file'][
'name']);
156 if(move_uploaded_file($_FILES[
'file'][
'tmp_name'],
$target_path))
158 $file = basename( $_FILES[
'file'][
'name']);
160 sys::setSyslog(
$db, 25, 0,
"uploaded <b>$file</b>", 0, 0, 0, 0);
162 print alert::draw(
"success",
"$lang[SUCCESS]",
"$lang[UPLOAD_SUCCESSFUL]: $lang[FILE] <strong>".$file.
"</strong>",
"", 800);
166 $file = basename( $_FILES[
'file'][
'name']);
168 sys::setSyslog(
$db, 28, 1,
"failed to upload <b>$file</b>", 0, 0, 0, 0);
170 print alert::draw(
"danger",
"$lang[ERROR]",
"$lang[UPLOAD_FAILED]: ".$_FILES[
'file'][
'name'].
"",
"", 5800);
177 if (isset(
$_GET[
'delete']))
179 if (
$_GET[
'delete']==1 AND (isset(
$_GET[
'item'])))
181 if (isset(
$_GET[
'path']))
183 $path =
$_GET[
'path'];
191 $file=
"$path".
"/".
"$item";
193 if (
YAWK\filemanager::deleteItem($file) ===
true)
195 sys::setSyslog(
$db, 25, 0,
"deleted $file", 0, 0, 0, 0);
197 print alert::draw(
"success",
"$lang[SUCCESS]",
"$lang[FILE] $file $lang[DELETE_SUCCESSFUL]",
"",
"1200");
201 sys::setSyslog(
$db, 28, 1,
"failed to delete $file", 0, 0, 0, 0);
203 print alert::draw(
"danger",
"$lang[ERROR]",
"$lang[FILE] $file $lang[DELETE_FAILED]",
"",
"2400");
209 if (isset($_POST[
'renameItem']) && ($_POST[
'renameItem'] ===
"true"))
212 if (isset($_POST[
'newItemName']) && (!empty($_POST[
'newItemName'])))
214 if (isset($_POST[
'path']) && (!empty($_POST[
'path'])))
217 $newItemName = filemanager::removeSpecialChars($_POST[
'newItemName']);
219 $from =
"$_POST[path]/$_POST[oldItemName]";
221 $to =
"$_POST[path]/$newItemName";
224 if (isset($_POST[
'itemType']) && (!empty($_POST[
'itemType'])))
226 $itemType = $_POST[
'itemType'];
234 if (rename($from, $to))
236 sys::setSyslog(
$db, 25, 0,
"folder renamed: $_POST[oldItemName] file to $_POST[newItemName]", 0, 0, 0, 0);
237 echo alert::draw(
"success",
"$lang[SUCCESS]",
"$lang[$itemType] $lang[RENAMED]: <i>$_POST[oldItemName]</i> $lang[FILEMAN_TO] <b>$_POST[newItemName]</b>",
"",
"1200");
242 sys::setSyslog(
$db, 28, 0,
"failed to rename $_POST[oldItemName] file to $_POST[newItemName]", 0, 0, 0, 0);
243 echo alert::draw(
"danger",
"$lang[ERROR]",
"$lang[$itemType] $lang[RENAMED] $_POST[oldFolderName] $lang[FILEMAN_TO] $_POST[newFolderName] $lang[FAILED]",
"",
"4800");
249 if (isset($_POST[
'chmod']) && ($_POST[
'chmod'] ===
"true"))
251 if (isset($_POST[
'item']) && (!empty($_POST[
'item'])))
253 if (isset($_POST[
'chmodCode']) && (!empty($_POST[
'chmodCode'])))
255 if ($_POST[
'chmodCode'] ===
"false")
257 if (isset($_POST[
'customChmodCode']))
259 $_POST[
'chmodCode'] = $_POST[
'customChmodCode'];
263 if (chmod($_POST[
'item'], octdec($_POST[
'chmodCode'])))
265 print alert::draw(
"success",
"$lang[SUCCESS]",
"$lang[FILEMAN_CHANGED_CHMOD] $lang[TO] $_POST[chmodCode]",
"",
"1200");
269 print alert::draw(
"success",
"$lang[DANGER]",
"$lang[FILEMAN_CHANGED_CHMOD] $_POST[item] $lang[TO] $_POST[chmodCode] $_POST[FAILED]",
"",
"1200");
276 if (isset($_POST[
'addFolder']) && ($_POST[
'addFolder'] ===
"true"))
279 if (isset($_POST[
'newFolder']) && (!empty($_POST[
'newFolder'])))
281 $newFolder = filemanager::removeSpecialChars($_POST[
'newFolder']);
288 if (isset($_POST[
'folderselect']))
290 $selectedFolder = $_POST[
'folderselect'];
291 $selectedFolder =
"../media/$selectedFolder/";
295 $selectedFolder =
"../media/uploads/";
300 $newDirectory =
"$selectedFolder$newFolder";
302 if (mkdir($newDirectory))
304 sys::setSyslog(
$db, 25, 0,
"created new folder: $newDirectory", 0, 0, 0, 0);
306 print alert::draw(
"success",
"$lang[SUCCESS]",
"$lang[FOLDER] $newDirectory $lang[CREATED]",
"",
"1200");
310 sys::setSyslog(
$db, 28, 1,
"failed to create new folder: $newDirectory", 0, 0, 0, 0);
312 print alert::draw(
"success",
"$lang[SUCCESS]",
"$lang[FOLDER] $newDirectory $lang[CREATED]",
"",
"1200");
318 if (isset(
$_GET[
'path']) && (!empty(
$_GET[
'path'])))
321 if (
$_GET[
'path'] = strstr(
$_GET[
'path'],
"../media"))
323 $firstTabStatus =
"class=\"active disabled\"";
329 alert::draw(
"danger",
"$lang[ERROR]",
"$lang[ACTION_FORBIDDEN]", 0, 6000);
334 $firstTabStatus =
"class=\"active\"";
339 <script src=
"../system/engines/jquery/dropzone/dropzone.js"></script>
340 <link href=
"../system/engines/jquery/dropzone/dropzone.css" rel=
"stylesheet">
349 border: 1px dashed #3c8dbc;
350 background: #23282d; !important;
357 <!-- Content Wrapper. Contains page content -->
358 <div
class=
"content-wrapper" id=
"content-FX">
359 <!-- Content Header (Page header) -->
360 <section
class=
"content-header">
362 <?php echo backend::getTitle(
$lang[
'FILEMAN_TITLE'],
$lang[
'FILEMAN_SUBTEXT']); ?>
363 <ol
class=
"breadcrumb">
364 <li><
a href=
"index.php?page=dashboard" title=
"<?php echo $lang['DASHBOARD']; ?>"><
i class=
"fa fa-dashboard"></
i> <?php echo
$lang[
'DASHBOARD']; ?></
a></li>
365 <li
class=
"active"><
a href=
"index.php?page=filemanager" title=
"<?php echo $lang['FILEMANAGER']; ?>"> <?php echo
$lang[
'FILEMANAGER']; ?></
a></li>
368 <!-- Main content -->
369 <section
class=
"content">
371 <div
class=
"col-md-8">
372 <!-- START CONTENT HERE -->
373 <div
class=
"box box-default">
374 <div
class=
"box-body">
377 <!-- FILE UPLOAD MODAL DIALOG -->
378 <div
class=
"modal fade" id=
"myModal" tabindex=
"-1" role=
"dialog" aria-labelledby=
"myModalLabel">
379 <div
class=
"modal-dialog" role=
"document">
380 <div
class=
"modal-content">
381 <div
class=
"modal-header">
382 <button
type=
"button" class=
"close" data-dismiss=
"modal" aria-label=
"Close"><span aria-hidden=
"true">×</span></button>
384 <div
class=
"col-md-1"><h3
class=
"modal-title"><
i class=
"fa fa-folder-open-o"></
i></h3></div>
385 <div
class=
"col-md-11"><h3
class=
"modal-title"><?php print
$lang[
'FILEMAN_UPLOAD']; ?> (max <?php print $maxFileSize; ?>B)</h3></div>
387 <div
class=
"modal-body">
388 <form enctype=
"multipart/form-data" class=
"dropzone" action=
"index.php?page=filemanager" method=
"POST">
389 <input
type=
"hidden" name=
"MAX_FILE_SIZE" value=
"">
390 <input
type=
"hidden" name=
"upload" value=
"sent">
391 <!-- <label
for=
"uploadedfile"></label>
392 <input
class=
"btn btn-default btn-file" id=
"uploadedfile" name=
"uploadedfile" type=
"file" multiple><br> !-->
394 <label
for=
"folderselect"><?php echo
$lang[
'UPLOAD_TO']; ?>: </label>
395 <select
id=
"folderselect" name=
"folderselect" class=
"form-control">
396 <option value=
"audio"><?php echo
$lang[
'FILEMAN_AUDIO']; ?></option>
397 <option value=
"backup"><?php echo
$lang[
'FILEMAN_BACKUP']; ?></option>
398 <option value=
"documents"><?php echo
$lang[
'FILEMAN_DOCUMENTS']; ?></option>
399 <option value=
"downloads"><?php echo
$lang[
'FILEMAN_DOWNLOADS']; ?></option>
400 <option value=
"images" selected><?php echo
$lang[
'FILEMAN_IMAGES']; ?></option>
401 <option value=
"uploads"><?php echo
$lang[
'FILEMAN_UPLOADS']; ?></option>
402 <option value=
"video"><?php echo
$lang[
'FILEMAN_VIDEOS']; ?></option>
405 <div
class=
"modal-footer">
406 <input
class=
"btn btn-large btn-success pull-right" type=
"submit" value=
"Datei hochladen" />
414 <!-- Modal --ADD FOLDER -- -->
415 <div
class=
"modal fade" id=
"myModal2" tabindex=
"-1" role=
"dialog" aria-labelledby=
"myModal2Label" aria-hidden=
"true">
416 <div
class=
"modal-dialog">
417 <div
class=
"modal-content">
418 <form enctype=
"multipart/form-data" action=
"index.php?page=filemanager" method=
"POST">
419 <div
class=
"modal-header">
420 <!-- modal header with close controls -->
421 <button
type=
"button" class=
"close" data-dismiss=
"modal" aria-hidden=
"true"><
i class=
"fa fa-times"></
i></button>
423 <div
class=
"col-md-1"><h3
class=
"modal-title"><
i class=
"fa fa-folder-open-o"></
i></h3></div>
424 <div
class=
"col-md-11"><h3
class=
"modal-title"><?php print
$lang[
'FILEMAN_ADD_FOLDER']; ?></h3></div>
426 <div
class=
"modal-body">
427 <input
type=
"hidden" name=
"addFolder" value=
"true">
428 <!-- save to... folder select options -->
429 <label
for=
"folderselect"><?php echo
$lang[
'SAVE_TO']; ?> </label>
430 <select
id=
"folderselect" name=
"folderselect" class=
"form-control">
431 <optgroup label=
"Media Folder">
432 <option value=
"audio"><?php echo
$lang[
'FILEMAN_AUDIO']; ?></option>
433 <option value=
"backup"><?php echo
$lang[
'FILEMAN_BACKUP']; ?></option>
434 <option value=
"documents"><?php echo
$lang[
'FILEMAN_DOCUMENTS']; ?></option>
435 <option value=
"downloads"><?php echo
$lang[
'FILEMAN_DOWNLOADS']; ?></option>
436 <option value=
"images" selected><?php echo
$lang[
'FILEMAN_IMAGES']; ?></option>
437 <option value=
"uploads"><?php echo
$lang[
'FILEMAN_UPLOADS']; ?></option>
438 <option value=
"video"><?php echo
$lang[
'FILEMAN_VIDEOS']; ?></option>
441 filemanager::subdirToOptions(
"../media/");
445 <label
for=
"newFolder"><?php print
$lang[
'FILEMAN_ADD_FOLDER_LABEL']; ?></label>
446 <input
id=
"newFolder" name=
"newFolder" class=
"form-control" placeholder=
"<?php print $lang['FILEMAN_ADD_FOLDER_PLACEHOLDER']; ?>">
448 <!-- modal footer /
w submit btn -->
449 <div
class=
"modal-footer">
450 <input
type=
"hidden" name=
"move" value=
"sent">
451 <input
class=
"btn btn-large btn-success" type=
"submit" value=
"<?php echo $lang['FILEMAN_ADD_FOLDER_BTN']; ?>">
455 </div> <!-- modal content -->
456 </div> <!-- modal dialog -->
460 <!-- Modal --RENAME FOLDER -- -->
461 <div
class=
"modal fade" id=
"renameModal" tabindex=
"-1" role=
"dialog" aria-labelledby=
"myModal2Label" aria-hidden=
"true">
462 <div
class=
"modal-dialog">
463 <div
class=
"modal-content">
464 <form enctype=
"multipart/form-data" action=
"index.php?page=filemanager" method=
"POST">
465 <div
class=
"modal-header">
466 <!-- modal header with close controls -->
467 <button
type=
"button" class=
"close" data-dismiss=
"modal" aria-hidden=
"true"><
i class=
"fa fa-times"></
i> </button>
469 <div
class=
"col-md-1"><h3
class=
"modal-title"><
i class=
"fa fa-pencil"></
i></h3></div>
470 <div
class=
"col-md-11"><h3
class=
"modal-title"><div
id=
"fileTypeHeading"> <!-- gets filled via JS setRenameFieldState--></div></h3></div>
474 <div
class=
"modal-body">
475 <input
type=
"hidden" id=
"renameItem" name=
"renameItem" value=
"true">
476 <input
type=
"hidden" id=
"oldItemName" name=
"oldItemName">
477 <input
type=
"hidden" id=
"itemType" name=
"itemType">
478 <input
type=
"hidden" id=
"path" name=
"path">
479 <!-- save to... folder select options -->
480 <label
id=
"newItemNameLabel" for=
"newItemName"><!-- gets filled via JS setRenameFieldState --> </label>
481 <input
id=
"newItemName" class=
"form-control" name=
"newItemName" value=
"" autofocus>
484 <!-- modal footer /
w submit btn -->
485 <div
class=
"modal-footer">
486 <input
class=
"btn btn-large btn-success" type=
"submit" value=
"<?php echo $lang['RENAME']; ?>">
490 </div> <!-- modal content -->
491 </div> <!-- modal dialog -->
494 <!-- Modal --CHMOD WINDOW-- -->
495 <div
class=
"modal fade" id=
"chmodModal" tabindex=
"-1" role=
"dialog" aria-labelledby=
"myModal2Label" aria-hidden=
"true">
496 <div
class=
"modal-dialog">
497 <div
class=
"modal-content">
498 <form enctype=
"multipart/form-data" action=
"index.php?page=filemanager" method=
"POST">
499 <div
class=
"modal-header">
500 <!-- modal header with close controls -->
501 <button
type=
"button" class=
"close" data-dismiss=
"modal" aria-hidden=
"true"><
i class=
"fa fa-times"></
i></button>
503 <div
class=
"col-md-1"><h3
class=
"modal-title"><
i class=
"fa fa-edit"></
i></h3></div>
504 <div
class=
"col-md-11"><h3
class=
"modal-title"><?php echo
$lang[
'FILEMAN_CHMOD']; ?></h3></div>
507 <div
class=
"modal-body">
508 <input
type=
"hidden" id=
"chmod" name=
"chmod" value=
"true">
509 <input
type=
"hidden" id=
"item" name=
"item">
510 <input
type=
"hidden" id=
"path" name=
"path">
512 <!-- chmod select field -->
513 <label
for=
"chmodCode"><?php echo
$lang[
'FILEMAN_CHMOD']; ?></label>
514 <select
id=
"chmodCode" name=
"chmodCode" class=
"form-control">
515 <option value=
"false"><?php echo
$lang[
'FILEMAN_CHMOD_SELECT']; ?></option>
516 <optgroup label=
"<?php echo $lang['FILEMAN_HIGH_SEC_LVL']; ?>"></optgroup>
517 <option value=
"0600"><?php echo
$lang[
'FILEMAN_0600']; ?></option>
518 <option value=
"0644"><?php echo
$lang[
'FILEMAN_0644']; ?></option>
519 <optgroup label=
"<?php echo $lang['FILEMAN_CASUAL_SEC_LVL']; ?>"></optgroup>
520 <option value=
"0750"><?php echo
$lang[
'FILEMAN_0750']; ?></option>
521 <option value=
"0755"><?php echo
$lang[
'FILEMAN_0755']; ?></option>
522 <optgroup label=
"<?php echo $lang['FILEMAN_LOW_SEC_LVL']; ?>"></optgroup>
523 <option value=
"0777"><?php echo
$lang[
'FILEMAN_0777']; ?></option>
526 <!-- chmod custom field -->
527 <label
for=
"customChmodCode"><?php echo
$lang[
'FILEMAN_CHMOD_CUSTOM']; ?> </label>
528 <input
id=
"customChmodCode" class=
"form-control" name=
"customChmodCode" value=
"">
531 <!-- modal footer /
w submit btn -->
532 <div
class=
"modal-footer">
533 <input
type=
"hidden" name=
"move" value=
"sent">
534 <input
class=
"btn btn-large btn-success" type=
"submit" value=
"<?php echo $lang['FILEMAN_CHMOD']; ?>">
538 </div> <!-- modal content -->
539 </div> <!-- modal dialog -->
541 <!-- START FILEMANAGER CONTENT -->
543 <ul
id=
"myTab" class=
"nav nav-tabs">
544 <li <?php echo $firstTabStatus; ?>><
a href=
"#images" onclick=
"flipTheSwitch('images');"<?php echo
$dataToggle; ?>><
i class=
"fa fa-picture-o"></
i> &
nbsp;<?php echo
$lang[
'FILEMAN_IMAGES']; ?></
a></li>
545 <li <?php echo $disabledStatus; ?>><
a href=
"#audio" onclick=
"flipTheSwitch('audio');"<?php echo
$dataToggle; ?>><
i class=
"fa fa-music"></
i> &
nbsp;<?php echo
$lang[
'FILEMAN_AUDIO']; ?></
a></li>
546 <li <?php echo $disabledStatus; ?>><
a href=
"#video" onclick=
"flipTheSwitch('video');"<?php echo
$dataToggle; ?>><
i class=
"fa fa-video-camera"></
i> &
nbsp;<?php echo
$lang[
'FILEMAN_VIDEOS']; ?></
a></li>
547 <li <?php echo $disabledStatus; ?>><
a href=
"#documents" onclick=
"flipTheSwitch('documents');"<?php echo
$dataToggle; ?>><
i class=
"fa fa-file-text-o"></
i> &
nbsp;<?php echo
$lang[
'FILEMAN_DOCUMENTS']; ?></
a></li>
548 <li <?php echo $disabledStatus; ?>><
a href=
"#downloads" onclick=
"flipTheSwitch('downloads');"<?php echo
$dataToggle; ?>><
i class=
"fa fa-download"></
i> &
nbsp;<?php echo
$lang[
'FILEMAN_DOWNLOADS']; ?></
a></li>
549 <li <?php echo $disabledStatus; ?>><
a href=
"#uploads" onclick=
"flipTheSwitch('uploads');"<?php echo
$dataToggle; ?>><
i class=
"fa fa-upload"></
i> &
nbsp;<?php echo
$lang[
'FILEMAN_UPLOADS']; ?></
a></li>
550 <li <?php echo $disabledStatus; ?>><
a href=
"#backup" onclick=
"flipTheSwitch('backup');"<?php echo
$dataToggle; ?>><
i class=
"fa fa-file-zip-o"></
i> &
nbsp;<?php echo
$lang[
'FILEMAN_BACKUP']; ?></
a></li>
555 echo
'<li '.$disabledStatus.
'><a href="#mailbox" '.
$dataToggle.
'><i class="fa fa-envelope-o"></i> '.
$lang[
"WEBMAIL"].
'</a></li>';
560 <!-- content start -->
561 <div
id=
"myTabContent" class=
"tab-content">
562 <!-- images folder -->
563 <div
class=
"tab-pane fade in active" id=
"images">
569 <!-- audio folder -->
570 <div
class=
"tab-pane fade in" id=
"audio">
576 <!-- video folder -->
577 <div
class=
"tab-pane fade in" id=
"video">
583 <!-- documents folder -->
584 <div
class=
"tab-pane fade in" id=
"documents">
590 <!-- downloads folder -->
591 <div
class=
"tab-pane fade in" id=
"downloads">
597 <!-- upload folder -->
598 <div
class=
"tab-pane fade in" id=
"uploads">
604 <!-- backup folder -->
605 <div
class=
"tab-pane fade in" id=
"backup">
611 <!-- webmail folder (mailbox attachments) -->
616 <div class=\"tab-pane fade in\" id=\"mailbox\">
629 <div
class=
"col-md-4">
630 <div
class=
"box box-default">
631 <div
class=
"box-header">
632 <h3
class=
"box-title"><?php print
$lang[
'FILEMAN_UPLOADS']; ?></h3>
633 <!-- add folder btn -->
634 <
a class=
"btn btn-success" data-toggle=
"modal" data-target=
"#myModal2" href=
"#myModal" style=
"float:right;">
635 <
i class=
"fa fa-folder-open-o"></
i> &
nbsp;<?php print
$lang[
'FILEMAN_NEW_FOLDER']; ?></
a>
637 <div
class=
"box-body">
638 <form action=
"index.php?page=filemanager" method=
"POST" class=
"dropzone" enctype=
"multipart/form-data">
639 <input
type=
"hidden" name=
"MAX_FILE_SIZE" value=
"">
640 <input
type=
"hidden" name=
"upload" value=
"sent">
641 <!-- <label
for=
"uploadedfile"></label>
642 <input
class=
"btn btn-default btn-file" id=
"uploadedfile" name=
"uploadedfile" type=
"file" multiple> -->
644 <label
for=
"folderselect"><?php echo
$lang[
'UPLOAD_TO']; ?> </label>
645 <select
id=
"folderselect" name=
"folderselect" class=
"form-control">
646 <optgroup label=
"Media Folder">
647 <option value=
"audio"><?php echo
$lang[
'FILEMAN_AUDIO']; ?></option>
648 <option value=
"backup"><?php echo
$lang[
'FILEMAN_BACKUP']; ?></option>
649 <option value=
"documents"><?php echo
$lang[
'FILEMAN_DOCUMENTS']; ?></option>
650 <option value=
"downloads"><?php echo
$lang[
'FILEMAN_DOWNLOADS']; ?></option>
651 <option value=
"images" selected><?php echo
$lang[
'FILEMAN_IMAGES']; ?></option>
652 <option value=
"uploads"><?php echo
$lang[
'FILEMAN_UPLOADS']; ?></option>
653 <option value=
"video"><?php echo
$lang[
'FILEMAN_VIDEOS']; ?></option>
655 filemanager::subdirToOptions(
"../media/");
print $lang['FILEMAN_UPLOAD']
if(!isset($language)||(!isset($lang))) $item
Throws a fancy Bootstrap Alert (success, info, warning or danger)
Backend class serves a few useful functions for the admin backend.
Mysqli database class; returns db connection object.
Basic File Manager (Backend)
static getFilesFromFolder($folder, $lang)
returns a list of all files in given folder. expect $folder as string
static drawTableFooter()
draw: output html end table body, end table
static drawTableHeader($lang, $i)
draw the table header with labeling
The language class - support multilingual backend.
Settings class: get and set YaWK system settings.
static getSetting($db, $property)
Get and return value for property from settings database.
The sys class - handles yawk's system core functions.
This class serves methods to create backup from files.
<!-- backend language -->< h3 >< i class="fa fa-language"></i > & nbsp
document ready(function() { $('a[data-confirm]').click(function(ev) { modal='#dataConfirmModal';var href=$(this).attr('href');var title=$(this).attr('title');var icon=$(this).attr('data-icon');if(!icon) { icon='fa fa-trash-o';} if(!$(modal).length) { $('body').append('< div id="dataConfirmModal" class="modal fade" role="dialog" aria-labelledby="dataConfirmLabel" aria-hidden="true">< div class="modal-dialog">< div class="modal-content">< div class="modal-header">< button type="button" class="close" data-dismiss="modal" aria-hidden="true">< i class="fa fa-times"></i ></button >< br >< div class="col-md-1">< h3 class="modal-title">< i class="'+icon+'"></i ></h3 ></div >< div class="col-md-11">< h3 class="modal-title" id="dataConfirmLabel">'+title+'</h3 ></div ></h3 ></div >< div class="modal-body"></div >< div class="modal-footer">< button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">Abbrechen</button >< a type="button" class="btn btn-danger" id="dataConfirmOK">< i class="'+icon+'"></i > L öschen</a ></div ></div ></div ></div >');} $(modal).find('.modal-body').text($(this).attr('data-confirm'));$('#dataConfirmOK').attr('href', href);$(modal).modal({show:true});return false;});$('#terminateUser').click(function() { var terminate=window.confirm("ACHTUNG!\nDas wird Deinen Account permanent deaktivieren.\n"+"Bist Du Dir sicher, dass Du das tun willst?");if(terminate===true) { var terminateUser=window.confirm("Bist Du Dir wirklich ganz sicher?\n"+"Diese Aktion kann nicht rueckgaengig gemacht werden.");if(terminateUser===true) { $.get('system/templates/YaWK-bootstrap3/js/terminate-user.php', function(data) { if(data==="true") { setTimeout("window.location='logout.html'", 0);} else { alert("Fehler: "+data);} });} } });function dismissNotifications() { $.ajax({ url:'js/dismiss-notifications.php', type:'POST', success:function(data) { if(!data) { alert('Something went wrong!');return false;} } });$("#bell-label").fadeOut();$('#notification-header').html('You have 0 notifications');$('#notification-menu').fadeOut();} $("#dismiss").click(function() { dismissNotifications();});function disableButtons(delay) { $('#loginButton').removeClass().addClass('btn btn-success disabled').attr('id', 'LOGIN_FORBIDDEN');$('#resetPasswordButton').removeClass().addClass('btn btn-danger disabled');setTimeout(function() { $('#LOGIN_FORBIDDEN').attr('id', 'loginButton').removeClass().addClass('btn btn-success');$('#resetPasswordButton').removeClass().addClass('btn btn-danger');}, delay);} $("#loginButton").click(function(){ if($('#loginButton').length > 0) { if($('#loginButton').hasClass('btn') &&$('#loginButton').hasClass('btn-success') &&$('#loginButton').hasClass('disabled')) { } else { $("#loginForm").submit();disableButtons(10000);} } else if($('#LOGIN_FORBIDDEN').length > 0) { if($('#LOGIN_FORBIDDEN').hasClass('btn') &&$('#LOGIN_FORBIDDEN').hasClass('btn-success') &&$('#LOGIN_FORBIDDEN').hasClass('disabled')) { } else { } } });$("#blockedBtn").hover(function() { $("#blockedBtn").hide();$("#askBtn").fadeIn(820);});})