1 <script src=
"../system/engines/jquery/dropzone/dropzone.js"></script>
2 <link href=
"../system/engines/jquery/dropzone/dropzone.css" rel=
"stylesheet">
16 require_once
'../system/classes/editor.php';
23 require_once
"../system/engines/imapClient/AdapterForOutgoingMessage.php";
24 require_once
"../system/engines/imapClient/Helper.php";
25 require_once
"../system/engines/imapClient/ImapClient.php";
26 require_once
"../system/engines/imapClient/ImapClientException.php";
27 require_once
"../system/engines/imapClient/ImapConnect.php";
28 require_once
"../system/engines/imapClient/IncomingMessage.php";
29 require_once
"../system/engines/imapClient/IncomingMessageAttachment.php";
30 require_once
"../system/engines/imapClient/OutgoingMessage.php";
31 require_once
"../system/engines/imapClient/Section.php";
32 require_once
"../system/engines/imapClient/SubtypeBody.php";
33 require_once
"../system/engines/imapClient/TypeAttachments.php";
34 require_once
"../system/engines/imapClient/TypeBody.php";
37 use SSilence\ImapClient\ImapClientException;
38 use SSilence\ImapClient\ImapClient as Imap;
71 require_once
"../system/classes/webmail.php";
75 $webmail->connectionInfo =
"<i>$username</i>";
88 if (isset(
$_GET[
'folder']) && (!empty(
$_GET[
'folder']) && (is_string(
$_GET[
'folder']))))
96 $imap->selectFolder(
'INBOX');
97 $imap->currentFolder =
"INBOX";
101 catch (ImapClientException
$error)
106 $errorMsg =
'Oh no! Verbindung mit server: '.$server.
' als user: '.
$username.
' nicht moeglich!';
123 <!-- Content Wrapper. Contains page content -->
124 <div class=\"content-wrapper\" id=\"content-FX\">
125 <!-- Content Header (Page header) -->
126 <section class=\"content-header\">";
128 echo backend::getTitle(
$lang[
'WEBMAIL'],
$lang[
'WEBMAIL_SUBTEXT']);
129 echo
"<ol class=\"breadcrumb\">
130 <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
131 <li class=\"active\"><a href=\"index.php?page=webmail\" title=\"$lang[WEBMAIL]\"> $lang[WEBMAIL]</a></li>
134 <!-- Main content -->
135 <section class=\"content\">";
147 <div
class=
"col-md-3">
149 <
a href=
"index.php?page=webmail" class=
"btn btn-success btn-large" style=
"width: 100%;"><
i class=
"fa fa-reply-all"></
i>&
nbsp;&
nbsp; Back to inbox</
a><br><br>
150 <div
class=
"box box-default">
151 <div
class=
"box-header with-border">
152 <h3
class=
"box-title">Folders</h3>
154 <div
class=
"box-tools">
155 <button
type=
"button" class=
"btn btn-box-tool" data-widget=
"collapse"><
i class=
"fa fa-minus"></
i>
159 <div
class=
"box-body no-padding animated fadeIn">
160 <ul
class=
"nav nav-pills nav-stacked">
169 </div> <!-- /. left col -->
171 <div
class=
"col-md-9 animated fadeIn">
172 <!-- <form enctype=
"multipart/form-data" class=
"dropzone" action=
"index.php?page=webmail-compose" method=
"POST"> -->
173 <form
id=
"my-dropzone" class=
"dropzone" enctype=
"multipart/form-data">
175 <div
class=
"box box-secondary">
176 <div
class=
"box-header with-border">
177 <h3
class=
"box-title">Compose New Message</h3>
178 <div
class=
"pull-right">
179 <
i id=
"addCCBtn" class=
"btn btn-default btn-sm">CC</
i>&
nbsp;&
nbsp;
180 <
i id=
"addBCCBtn" class=
"btn btn-default btn-sm">BCC</
i>
183 <!-- /.box-header -->
184 <div
class=
"box-body">
185 <div
class=
"form-group">
186 <input
class=
"form-control" name=
"to" placeholder=
"To:">
187 <input
id=
"ccField" class=
"form-control hidden" name=
"ccField" placeholder=
"CC:">
188 <input
id=
"bccField" class=
"form-control hidden" name=
"bccField" placeholder=
"BCC:">
190 <div
class=
"form-group">
191 <input
class=
"form-control" name=
"subject" placeholder=
"Subject:">
193 <div
class=
"form-group">
194 <label
for=
"summernote" class=
"hidden"></label>
195 <!-- summernote
editor -->
196 <textarea
id=
"summernote" name=
"body" class=
"form-control"></textarea>
199 <!-- start dropzone -->
201 <!--
this is were the previews should be shown. -->
202 <div
class=
"dropzone-previews"></div>
203 <!-- The fileinput-button span is used to style the file input field as button -->
204 <span
id=
"addBtn" class=
"btn btn-success fileinput-button">
205 <
i class=
"fa fa-plus"></
i>
206 <span>Add files...</span>
209 <div
class=
"pull-right">
210 <
a id=
"draftBtn" href=
"index.php?page=webmail-compose&draft=1" type=
"button" class=
"btn btn-default"><
i class=
"fa fa-pencil"></
i>&
nbsp; Draft</
a>
212 <button
id=
"submitBtn" type=
"submit" class=
"btn btn-success pull-right"><
i id=
"submitIcon" class=
"fa fa-paper-plane-o"></
i> &
nbsp;&
nbsp;Send Email</button>
213 <!-- <button
type=
"submit" id=
"submitBtn" class=
"btn btn-success start"><
i class=
"fa fa-paper-plane-o"></
i>&
nbsp; Send</button> -->
214 <input
type=
"hidden" name=
"sendEmail" value=
"true">
217 <
p class=
"help-block">Max. <?php echo filemanager::getPostMaxSize(); ?></
p>
219 <!-- /. bootstrap dropzone -->
234 echo
"<h4>".$lang[
'WEBMAIL_NOT_ENABLED'].
"</h4>";
238 <script
type=
"text/javascript">
240 Dropzone.options.myDropzone = {
242 url:
"js/email-send.php",
244 autoProcessQueue:
false,
245 uploadMultiple:
true,
246 parallelUploads: 100,
249 addRemoveLinks:
true,
251 acceptedFiles:
".jpg, .jpeg, .png, .gif, .pdf, .doc, .xls, .wav, .mp3, .mp4, .mpg",
252 clickable:
".fileinput-button",
255 dictFileTooBig:
"File is to big ({{filesize}}mb). Max allowed file size is {{maxFilesize}}mb",
256 dictInvalidFileType:
"Invalid File Type",
257 dictCancelUpload:
"Cancel",
258 dictRemoveFile:
"Remove",
259 dictMaxFilesExceeded:
"Only {{maxFiles}} files are allowed",
260 dictDefaultMessage:
"Drop files here to upload",
264 var myDropzone =
this;
265 var dropzoneFormElement = $(
'#my-dropzone');
267 $(
".dz-message").hide();
269 this.element.querySelector(
"button[type=submit]").addEventListener(
"click",
function(
e) {
275 if (myDropzone.getQueuedFiles().length > 0) {
276 myDropzone.processQueue();
281 $(dropzoneFormElement).attr(
'action',
'js/email-send.php');
282 $(dropzoneFormElement).attr(
'method',
'post');
283 $(dropzoneFormElement).submit();
289 this.
on(
"sendingmultiple",
function(file) {
292 $(
"#submitIcon").removeClass().addClass(
"fa fa-spinner fa-spin");
293 $(
"#submitBtn").removeClass().addClass(
"btn btn-danger disabled pull-right");
294 $(
"#draftBtn").removeClass().addClass(
"btn btn-default disabled");
295 $(
"#addBtn").removeClass().addClass(
"btn btn-success disabled");
298 this.
on(
"successmultiple",
function(files, response) {
301 window.location.replace(
"index.php?page=webmail");
303 this.
on(
"errormultiple",
function(files, response) {
311 $(
"#addCCBtn" ).click(
function() {
313 var ccField = $(
'#ccField');
314 var ccFieldClass = $(ccField).attr(
'class');
315 if (ccFieldClass ===
'form-control hidden')
317 $(ccField).removeClass().addClass(
'form-control animated fadeIn');
319 else if (ccFieldClass ===
'form-control animated fadeIn')
321 $(ccField).removeClass().addClass(
'form-control animated fadeOut hidden');
323 else if (ccFieldClass ===
'form-control animated fadeOut hidden')
325 $(ccField).removeClass().addClass(
'form-control animated fadeIn');
330 $(
"#addBCCBtn" ).click(
function() {
332 var bccField = $(
'#bccField');
333 var bccFieldClass = $(bccField).attr(
'class');
334 if (bccFieldClass ===
'form-control hidden')
336 $(bccField).removeClass().addClass(
'form-control animated fadeIn');
338 else if (bccFieldClass ===
'form-control animated fadeIn')
340 $(bccField).removeClass().addClass(
'form-control animated fadeOut hidden');
342 else if (bccFieldClass ===
'form-control animated fadeOut hidden')
344 $(bccField).removeClass().addClass(
'form-control animated fadeIn');
print $lang['FILEMAN_UPLOAD']
Backend class serves a few useful functions for the admin backend.
Mysqli database class; returns db connection object.
Load editor settings, required javascript and html markup.
Basic File Manager (Backend)
The language class - support multilingual backend.
Settings class: get and set YaWK system settings.
<!-- backend language -->< h3 >< i class="fa fa-language"></i > & nbsp