YaWK  24.1
Yet another WebKit
faq.php
Go to the documentation of this file.
1 <?php
2 // check if language is set
3 if (!isset($language) || (!isset($lang)))
4 { // inject (add) language tags to core $lang array
5  $lang = \YAWK\language::inject(@$lang, "../system/plugins/faq/language/");
6 }
7 include '../system/plugins/faq/classes/faq-backend.php';
8 if (isset($_GET['addpage'])){
9  if ($_GET['addpage']==='1')
10  { // user clicked on add
11  \YAWK\plugin::createPluginPage($db, "faq", "faq");
12  }
13 }
14 ?>
15 <script type="text/javascript">
16  $(document).ready(function () {
17  $('#table-sort').dataTable({
18  "bPaginate": false,
19  "bLengthChange": false,
20  "bFilter": true,
21  "bSort": true,
22  "bInfo": true,
23  "bAutoWidth": false
24  });
25  });
26 </script>
27 <?php
28 // TEMPLATE WRAPPER - HEADER & breadcrumbs
29 echo "
30  <!-- Content Wrapper. Contains page content -->
31  <div class=\"content-wrapper\" id=\"content-FX\">
32  <!-- Content Header (Page header) -->
33  <section class=\"content-header\">";
34 /* draw Title on top */
35 echo \YAWK\backend::getTitle($lang['FAQ'], $lang['FAQ_SUBTEXT']);
36 echo"<ol class=\"breadcrumb\">
37  <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
38  <li><a href=\"index.php?page=plugins\" title=\"$lang[PLUGINS]\"> $lang[PLUGINS]</a></li>
39  <li class=\"active\"><a href=\"index.php?plugin=faq\" title=\"$lang[FAQ]\"> $lang[FAQ]</a></li>
40  </ol>
41  </section>
42  <!-- Main content -->
43  <section class=\"content\">";
44 /* page content start here */
45 ?>
46 <div class="box box-default">
47  <div class="box-header">
48 
49 <!-- btn -->
50 <a class="btn btn-default pull-right" href="index.php?plugin=faq&addpage=1">
51  <i class="glyphicon glyphicon-wrench"></i> &nbsp;<?php print $lang['PAGE_ADD_BTN']; ?></a>
52 <!-- btn -->
53 <a class="btn btn-success pull-right" href="index.php?plugin=faq&pluginpage=faq-new">
54 <i class="glyphicon glyphicon-plus"></i> &nbsp;<?php print $lang['FAQ_ADD']; ?></a>
55 <!-- tbl -->
56 <table width="100%" cellpadding="4" cellspacing="0" border="0" class="table table-hover" id="table-sort">
57  <thead>
58  <tr>
59  <td width="3%"><strong>&nbsp;</strong></td>
60  <td width="5%" class=\"text-center\"><strong><?php echo $lang['ID']; ?></strong></td>
61  <td width="5%" class=\"text-center\"><strong><?php echo $lang['SORTATION']; ?></strong></td>
62  <td width="70%"><strong><?php echo $lang['FAQ_QUESTION']; ?></strong></td>
63  <td width="7%" class=\"text-center\"><strong><?php echo $lang['CATEGORY']; ?></strong></td>
64  <td width="10%" class=\"text-center\"><strong><?php echo $lang['ACTIONS']; ?></strong></td>
65  </tr>
66  </thead>
67  <tbody>
68 <?php
69 $faq = new \YAWK\PLUGINS\FAQ\faq();
70 $faq->drawBackEndTableBody($db);
71 ?>
72  </tbody>
73  </table>
74  </div>
75 </div>
print $lang['PAGE_ADD_BTN']
Definition: faq.php:35
static inject(array $lang, string $pathToFile)
allow plugins to inject language tags to $lang array
Definition: language.php:439
function a
Definition: browser.js:14
type
Definition: menu-new.php:35
print $_GET['id']
Definition: page-edit.php:357
function i(e, t)
Definition: plyr.js:1
<!-- 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 &ouml;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);});})