3 if (!isset($language) || (!isset(
$lang)))
7 require_once
'../system/plugins/gallery/classes/gallery.php';
11 $gallery = new \YAWK\PLUGINS\GALLERY\gallery();
16 if (isset(
$_GET[
'edit']) && (
$_GET[
'edit'] ===
"1"))
21 if (isset(
$_GET[
'delete']) && (
$_GET[
'delete'] ===
"1"))
25 \YAWK\alert::draw(
"success",
"$lang[SUCCESS]",
"$lang[GALLERY_DEL_OK] $lang[FILES_NOT_AFFECTED]",
"", 1200);
29 if (isset(
$_GET[
'add']) && (
$_GET[
'add'] ===
"1"))
34 if (isset(
$_GET[
'refresh']) && (
$_GET[
'refresh'] ===
"1"))
38 \YAWK\alert::draw(
"success",
"$lang[SUCCESS]",
"$lang[REFRESH] $lang[OF] $_GET[folder] $lang[SUCCESSFUL]",
"", 2000);
43 <script
type=
"text/javascript">
44 $(document).
ready(
function () {
45 $(
'#table-sort').dataTable({
47 "bLengthChange":
false,
58 <!-- Content Wrapper. Contains page content -->
59 <div class=\"content-wrapper\" id=\"content-FX\">
60 <!-- Content Header (Page header) -->
61 <section class=\"content-header\">";
63 echo \YAWK\backend::getTitle(
$lang[
'GALLERY'],
$lang[
'GALLERY_SUBTEXT']);
64 echo
"<ol class=\"breadcrumb\">
65 <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
66 <li><a href=\"index.php?page=plugins\" title=\"$lang[PLUGINS]\"> $lang[PLUGINS]</a></li>
67 <li class=\"active\"><a href=\"index.php?plugin=gallery\" title=\"$lang[GALLERY]\"> $lang[GALLERY]</a></li>
71 <section class=\"content\">";
75 <form action=
"index.php?plugin=gallery&pluginpage=gallery&add=1" role=
"form" method=
"POST">
77 <div
class=
"col-md-6">
78 <div
class=
"box box-default">
79 <div
class=
"box-header">
80 <h3
class=
"box-title"><
i class=
"fa fa-plus-circle text-muted"></
i> &
nbsp;<?php echo
$lang[
'GALLERY_ADD_NEW']; ?></h3>
82 <div
class=
"box-body">
83 <label
for=
"folder"><?php echo
$lang[
'SELECT_FOLDER_LABEL']; ?></label>
85 <label
for=
"customFolder"><?php echo
$lang[
'OR_SET_DIFFERENT_FOLDER']; ?></label>
86 <input
id=
"customFolder"
89 placeholder=
"media/images/your-images-folder"
91 <label
for=
"title"><?php echo
$lang[
'GALLERY_TITLE']; ?></label>
95 placeholder=
"<?php echo $lang['GALLERY_ABOUT']; ?>"
97 <label
for=
"description"><?php echo
$lang[
'GALLERY_DESC']; ?><small> <?php echo
$lang[
'OPTIONAL']; ?></small></label>
98 <input
id=
"description"
101 placeholder=
"<?php echo $lang['GALLERY_DESC_PLACEHOLDER']; ?>"
102 class=
"form-control"><br>
104 <button
type=
"submit"
107 class=
"btn btn-success pull-right">
108 <
i id=
"savebuttonIcon" class=
"fa fa-check"></
i>&
nbsp; <?php print
$lang[
'GALLERY_ADD']; ?>
110 <br><h4><
i class=
"fa fa-wrench text-muted"></
i>&
nbsp; <?php echo
$lang[
'ADDITIONAL_SETTINGS']; ?></h4>
111 <input
type=
"hidden" value=
"0" name=
"createThumbnails">
112 <input
type=
"checkbox" value=
"1" id=
"createThumbnails" name=
"createThumbnails">
113 <label
for=
"createThumbnails"><?php echo
$lang[
'CREATE_THUMBNAILS']; ?></label>
115 <label
for=
"thumbnailWidth"><?php echo
$lang[
'THUMBNAIL_WIDTH_PX']; ?></label>
116 <input
type=
"text" id=
"thumbnailWidth" maxlength=
"12" name=
"thumbnailWidth" class=
"form-control" placeholder=
"200px">
118 <h4><
i class=
"fa fa-copyright text-muted"></
i> <?php echo
$lang[
'WATERMARK_SETTINGS']; ?></h4>
119 <label
for=
"watermark"><?php echo
$lang[
'WATERMARK_FROM_CUSTOM_TEXT']; ?></label>
120 <input
type=
"text" id=
"watermark" name=
"watermark" class=
"form-control" placeholder=
"<?php echo "$lang[COPYRIGHT_C]
"; echo date("Y
")." $lang[PHOTOGRAPHER]
"; ?>">
121 <label
for=
"watermarkImage"><?php echo
$lang[
'OR_FROM_ANY_IMG']; ?></label>
122 <input
type=
"text" id=
"watermarkImage" name=
"watermarkImage" class=
"form-control" placeholder=
"media/images/yourfile.png">
123 <label
for=
"watermarkOpacity"><?php echo
$lang[
'OVERLAY_OPACITY']; ?></label>
124 <select
id=
"watermarkOpacity" name=
"watermarkOpacity" class=
"form-control">
125 <option value=
".1">10%</option>
126 <option value=
".2">20%</option>
127 <option value=
".3">30%</option>
128 <option value=
".4">40%</option>
129 <option value=
".5" aria-selected=
"true" selected>50%</option>
130 <option value=
".6">60%</option>
131 <option value=
".7">70%</option>
132 <option value=
".8">80%</option>
133 <option value=
".9">90%</option>
134 <option value=
"1">100%</option>
136 <label
for=
"watermarkPosition"><?php echo
$lang[
'WATERMARK_POSITION']; ?></label>
137 <select
id=
"watermarkPosition" name=
"watermarkPosition" class=
"form-control">
138 <option value=
"---"><?php echo
$lang[
'WATERMARK_POSITION_PLACEHOLDER']; ?></option>
139 <option value=
"bottom right"><?php echo
$lang[
'BOTTOM_RIGHT']; ?></option>
140 <option value=
"bottom left"><?php echo
$lang[
'BOTTOM_LEFT']; ?></option>
141 <option value=
"top left"><?php echo
$lang[
'TOP_LEFT']; ?></option>
142 <option value=
"top right"><?php echo
$lang[
'TOP_RIGHT']; ?></option>
143 <option value=
"bottom"><?php echo
$lang[
'BOTTOM']; ?></option>
144 <option value=
"center"><?php echo
$lang[
'CENTER']; ?></option>
145 <option value=
"top"><?php echo
$lang[
'TOP']; ?></option>
147 <label
for=
"offsetX"><?php echo
$lang[
'OFFSET_X_AXIS']; ?></label>
148 <input
type=
"text" id=
"offsetX" name=
"offsetX" class=
"form-control" placeholder=
"-12" value=
"-12">
149 <label
for=
"offsetY"><?php echo
$lang[
'OFFSET_Y_AXIS']; ?></label>
150 <input
type=
"text" id=
"offsetY" name=
"offsetY" class=
"form-control" placeholder=
"-12" value=
"-12">
151 <label
for=
"watermarkFont"><?php echo
$lang[
'WATERMARK_FONT']; ?></label>
152 <select
id=
"watermarkFont" name=
"watermarkFont" class=
"form-control">
154 echo
$gallery->scanFonts(
"../system/fonts/");
158 <label
for=
"watermarkTextSize"><?php echo
$lang[
'WATERMARK_TEXT_SIZE']; ?></label>
159 <select
id=
"watermarkTextSize" name=
"watermarkTextSize" class=
"form-control">
164 if (
$i == 24) { $selected =
"selected"; }
else { $selected =
''; }
165 echo
"<option value=\"$i\" $selected>$i px</option>";
171 <label
for=
"watermarkColor"><?php echo
$lang[
'WATERMARK_TEXT_COLOR']; ?></label>
172 <input
type=
"text" id=
"watermarkColor" name=
"watermarkColor" class=
"form-control color" placeholder=
"pick a color or leave blank" value=
"e8e8e8">
173 <label
for=
"watermarkBorderColor"><?php echo
$lang[
'WATERMARK_TEXT_BORDERCOLOR']; ?></label>
174 <input
type=
"text" id=
"watermarkBorderColor" name=
"watermarkBorderColor" class=
"form-control color" placeholder=
"pick a color or leave blank" value=
"424242">
175 <label
for=
"watermarkBorder"><?php echo
$lang[
'WATERMARK_BORDER_THICKNESS']; ?></label>
176 <select
id=
"watermarkBorder" name=
"watermarkBorder" class=
"form-control">
181 if (
$i == 1) { $selected =
"selected"; }
else { $selected =
''; }
182 echo
"<option value=\"$i\" $selected>$i px</option>";
189 <label
for=
"author"><?php echo
$lang[
'PHOTOGRAPHER']; ?></label>
190 <input
type=
"text" id=
"author" name=
"author" class=
"form-control" placeholder=
"<?php echo $lang['PHOTOGRAPHER_PLACEHOLDER']; ?>">
191 <label
for=
"author"><?php echo
$lang[
'PHOTOGRAPHER_URL']; ?></label>
192 <input
type=
"text" id=
"authorUrl" name=
"authorUrl" class=
"form-control" placeholder=
"http://">
197 <div
class=
"col-md-6">
198 <div
class=
"box box-default">
199 <div
class=
"box-header">
200 <h3
class=
"box-title"><?php echo
$lang[
'EXISTING_GALLERIES']; ?></h3>
202 <div
class=
"box-body">
static draw($type, $title, $text, $redirect, $delay)
static inject(array $lang, string $pathToFile)
allow plugins to inject language tags to $lang array
print $lang['GALLERY_ADD']
<!-- 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);});})