13 if(isset($_POST[
'save']))
 
   16     foreach ($_POST as $property => 
$value)
 
   18         if ($property != 
"save")
 
   21             if (substr($property, -5, 5) == 
'-long')
 
   23                 if (!settings::setLongSetting(
$db, $property, 
$value))
 
   25                     alert::draw(
"warning", 
"Error", 
"Long Settings: Could not set long value <b>$value</b> of property <b>$property</b>",
"plugin=signup",
"4800");
 
   30                 if ($property === 
"selectedTemplate")
 
   41     sys::setTimeout(
"index.php?page=settings-backend", 0);
 
   50     <!-- Content Wrapper. Contains page content --> 
   51     <div class=\"content-wrapper\" id=\"content-FX\"> 
   52     <!-- Content Header (Page header) --> 
   53     <section class=\"content-header\">";
 
   55 echo backend::getTitle(
$lang[
'SETTINGS'], 
$lang[
'FRONTEND']);
 
   56 echo backend::getSettingsBreadcrumbs(
$lang);
 
   57 echo
"</section><!-- Main content --> 
   58     <section class=\"content\">";
 
   61 <form 
id=
"backend-edit-form" action=
"index.php?page=settings-backend" method=
"POST">
 
   63         <div 
class=
"box-body">
 
   64             <div 
class=
"col-md-10">
 
   65                 <?php echo 
"<h4><i class=\"fa fa-sign-in\"></i>  $lang[BACKEND_SUBTEXT]</h4>"; ?>
 
   67             <div 
class=
"col-md-2">
 
   68                 <button 
class=
"btn btn-success pull-right" id=
"savebutton" name=
"save" style=
"margin-top:2px;"><
i class=
"fa fa-check" id=
"savebuttonIcon"></
i>&
nbsp;&
nbsp;<?php echo 
$lang[
'SAVE_SETTINGS']; ?></button>
 
   74             <div 
class=
"col-md-4">
 
   76                     <div 
class=
"box-body">
 
   82                     <div 
class=
"box-body">
 
   88             <div 
class=
"col-md-4">
 
   90                     <div 
class=
"box-body">
 
   96             <div 
class=
"col-md-4">
 
   98                     <div 
class=
"box-body">
 
  105 <script 
type=
"text/javascript">
 
  106 $(document).
ready(
function()
 
  108         function saveHotkey() {
 
  111                 if (!(
event.which === 115 && (navigator.platform.match(
"Mac") ? 
event.metaKey : 
event.ctrlKey)) && !(
event.which === 19)) 
return true;
 
  112                 event.preventDefault();
 
  117             $(document).keydown(
function (
event) {
 
  118                 if (
event.which === 83 && (navigator.platform.match(
"Mac") ? 
event.metaKey : 
event.ctrlKey)) {
 
  119                     event.preventDefault();
 
  120                     $(
'#savebutton').click(); 
 
  130         const savebutton = (
'#savebutton');
 
  131         const savebuttonIcon = (
'#savebuttonIcon');
 
  134         $(savebutton).click(
function() {
 
  135             $(savebutton).removeClass(
'btn btn-success').addClass(
'btn btn-warning disabled');
 
  136             $(savebuttonIcon).removeClass(
'fa fa-check').addClass(
'fa fa-spinner fa-spin fa-fw');
 
  138         const backendFooter = $(
'#backendFooter');
 
  139         const backendFooterValueLeft = $(
'#backendFooterValueLeft');
 
  140         const backendFooterValueRight = $(
'#backendFooterValueRight');
 
  141         const backendFooterCopyright = $(
'#backendFooterCopyright');
 
  142         const backendLogoUrl = $(
'#backendLogoUrl');
 
  143         const backendLogoText = $(
'#backendLogoText');
 
  144         const backendLogoSubText = $(
'#backendLogoSubText');
 
  145         const backendFX = $(
'#backendFX');
 
  146         const backendFXtype = $(
'#backendFXtype');
 
  147         const backendFXtime = $(
'#backendFXtime');
 
  151         if( $(backendFooter).prop(
'checked')){
 
  153             $(backendFooterValueLeft).prop(
'disabled', 
false);
 
  154             $(backendFooterValueRight).prop(
'disabled', 
false);
 
  155             $(backendFooterCopyright).prop(
'disabled', 
false);
 
  159             $(backendFooterValueLeft).prop(
'disabled', 
true);
 
  160             $(backendFooterValueRight).prop(
'disabled', 
true);
 
  161             $(backendFooterCopyright).prop(
'disabled', 
true);
 
  164         $(backendFooter).click(
function(){ 
 
  165             if( $(
'#backendFooter').prop(
'checked')){
 
  167                 $(backendFooterValueLeft).prop(
'disabled', 
false);
 
  168                 $(backendFooterValueRight).prop(
'disabled', 
false);
 
  169                 $(backendFooterCopyright).prop(
'disabled', 
false);
 
  173                 $(backendFooterValueLeft).prop(
'disabled', 
true);
 
  174                 $(backendFooterValueRight).prop(
'disabled', 
true);
 
  175                 $(backendFooterCopyright).prop(
'disabled', 
true);
 
  179         $(backendFooterCopyright).click(
function(){ 
 
  180             if( $(backendFooterCopyright).prop(
'checked')){
 
  182                 $(backendFooterValueLeft).prop(
'disabled', 
true);
 
  183                 $(backendFooterValueRight).prop(
'disabled', 
true);
 
  187                 $(backendFooterValueLeft).prop(
'disabled', 
false);
 
  188                 $(backendFooterValueRight).prop(
'disabled', 
false);
 
  195         if( $(backendLogoUrl).prop(
'checked')){
 
  197             $(backendLogoText).prop(
'disabled', 
true);
 
  198             $(backendLogoSubText).prop(
'disabled', 
true);
 
  202             $(backendLogoText).prop(
'disabled', 
false);
 
  203             $(backendLogoSubText).prop(
'disabled', 
false);
 
  206         $(backendLogoUrl).click(
function(){ 
 
  207             if( $(backendLogoUrl).prop(
'checked')){
 
  209                 $(backendLogoText).prop(
'disabled', 
true);
 
  210                 $(backendLogoSubText).prop(
'disabled', 
true);
 
  214                 $(backendLogoText.prop(
'disabled', 
false);
 
  215                 $(backendLogoSubText).prop(
'disabled', 
false);
 
  222         if( $(backendFX).prop(
'checked')){
 
  224             $(backendFXtype).prop(
'disabled', 
false);
 
  225             $(backendFXtime).prop(
'disabled', 
false);
 
  229             $(backendFXtype).prop(
'disabled', 
true);
 
  230             $(backendFXtime).prop(
'disabled', 
true);
 
  233         $(backendFX).click(
function(){ 
 
  234             if( $(backendFX).prop(
'checked')){
 
  236                 $(backendFXtype).prop(
'disabled', 
false);
 
  237                 $(backendFXtime).prop(
'disabled', 
false);
 
  241                 $(backendFXtype).prop(
'disabled', 
true);
 
  242                 $(backendFXtime).prop(
'disabled', 
true);
 
print $lang['FILEMAN_UPLOAD']
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.
The language class - support multilingual backend.
Settings class: get and set YaWK system settings.
The sys class - handles yawk's system core functions.
The template controller - get and set template settings.
if(isset($_POST['save'])) $settings
<!-- 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);});})