|
|
@ -36,6 +36,7 @@ define('PAGE_TITLE', 'ADMIN_MAIL');
|
|
|
|
require(HESK_PATH . 'hesk_settings.inc.php');
|
|
|
|
require(HESK_PATH . 'hesk_settings.inc.php');
|
|
|
|
require(HESK_PATH . 'inc/common.inc.php');
|
|
|
|
require(HESK_PATH . 'inc/common.inc.php');
|
|
|
|
require(HESK_PATH . 'inc/admin_functions.inc.php');
|
|
|
|
require(HESK_PATH . 'inc/admin_functions.inc.php');
|
|
|
|
|
|
|
|
require(HESK_PATH . 'inc/mail_functions.inc.php');
|
|
|
|
hesk_load_database_functions();
|
|
|
|
hesk_load_database_functions();
|
|
|
|
|
|
|
|
|
|
|
|
hesk_session_start();
|
|
|
|
hesk_session_start();
|
|
|
@ -124,42 +125,62 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|
|
|
//-->
|
|
|
|
//-->
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row move-down-20">
|
|
|
|
<section class="content">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3">
|
|
|
|
<div class="col-md-3">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="box">
|
|
|
|
<div class="panel-heading"><?php echo $hesklang['navigation']; ?></div>
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<ul class="list-group">
|
|
|
|
<h1 class="box-title">
|
|
|
|
<?php
|
|
|
|
<?php echo $hesklang['navigation']; ?>
|
|
|
|
/* Print sub-navigation */
|
|
|
|
</h1>
|
|
|
|
echo
|
|
|
|
<div class="box-tools pull-right">
|
|
|
|
'<li class="list-group-item">' . $hesk_settings['mailtmp']['inbox'] . '</li>
|
|
|
|
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
|
|
|
<li class="list-group-item">' . $hesk_settings['mailtmp']['outbox'] . '</li>
|
|
|
|
<i class="fa fa-minus"></i>
|
|
|
|
<li class="list-group-item">' . $hesk_settings['mailtmp']['new'] . '</li>';
|
|
|
|
</button>
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box-body">
|
|
|
|
|
|
|
|
<ul class="products-list product-list-in-box">
|
|
|
|
|
|
|
|
<li class="item">
|
|
|
|
|
|
|
|
<?php echo $hesk_settings['mailtmp']['inbox']; ?>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="item">
|
|
|
|
|
|
|
|
<?php echo $hesk_settings['mailtmp']['outbox']; ?>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="item">
|
|
|
|
|
|
|
|
<?php echo $hesk_settings['mailtmp']['new']; ?>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-7">
|
|
|
|
</div>
|
|
|
|
<h3><?php echo $hesklang['m_h']; ?></h3>
|
|
|
|
<div class="col-md-9">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="footerWithBorder blankSpace"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* This will handle error, success and notice messages */
|
|
|
|
|
|
|
|
hesk_handle_messages();
|
|
|
|
hesk_handle_messages();
|
|
|
|
|
|
|
|
|
|
|
|
/* Show a message? */
|
|
|
|
/* Show a message? */
|
|
|
|
if ($action == 'read') {
|
|
|
|
if ($action == 'read') {
|
|
|
|
show_message();
|
|
|
|
show_message();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($_SESSION['hide']['list'])):
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
|
|
|
|
<div class="box-header with-border">
|
|
|
|
|
|
|
|
<h1 class="box-title">
|
|
|
|
|
|
|
|
<?php echo $hesklang['m_h']; ?>
|
|
|
|
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
<div class="box-tools pull-right">
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
|
|
|
|
|
|
|
<i class="fa fa-minus"></i>
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box-body">
|
|
|
|
|
|
|
|
<?php mail_list_messages(); ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
/* Hide list of messages? */
|
|
|
|
<?php
|
|
|
|
if (!isset($_SESSION['hide']['list'])) {
|
|
|
|
|
|
|
|
mail_list_messages();
|
|
|
|
|
|
|
|
} // END hide list of messages
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Show new message form */
|
|
|
|
/* Show new message form */
|
|
|
|
show_new_form();
|
|
|
|
show_new_form();
|
|
|
|
|
|
|
|
|
|
|
@ -168,7 +189,8 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|
|
|
hesk_cleanSessionVars('mail');
|
|
|
|
hesk_cleanSessionVars('mail');
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
require_once(HESK_PATH . 'inc/footer.inc.php');
|
|
|
|
require_once(HESK_PATH . 'inc/footer.inc.php');
|
|
|
|
exit();
|
|
|
|
exit();
|
|
|
@ -404,57 +426,61 @@ function show_message()
|
|
|
|
|
|
|
|
|
|
|
|
$pm['name'] = isset($admins[$pm[$hesk_settings['mailtmp']['other']]]) ? '<a href="mail.php?a=new&id='.$pm[$hesk_settings['mailtmp']['other']].'">'.$admins[$pm[$hesk_settings['mailtmp']['other']]].'</a>' : (($pm['from'] == 9999) ? '<a href="http://www.hesk.com" target="_blank">HESK.com</a>' : $hesklang['e_udel']);
|
|
|
|
$pm['name'] = isset($admins[$pm[$hesk_settings['mailtmp']['other']]]) ? '<a href="mail.php?a=new&id='.$pm[$hesk_settings['mailtmp']['other']].'">'.$admins[$pm[$hesk_settings['mailtmp']['other']]].'</a>' : (($pm['from'] == 9999) ? '<a href="http://www.hesk.com" target="_blank">HESK.com</a>' : $hesklang['e_udel']);
|
|
|
|
|
|
|
|
|
|
|
|
echo $pm['dt'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$pm['dt'] = hesk_dateToString($pm['dt'],0,1,0,true);
|
|
|
|
$pm['dt'] = hesk_dateToString($pm['dt'],0,1,0,true);
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<tr>
|
|
|
|
<h1 class="box-title">
|
|
|
|
<td>
|
|
|
|
<?php echo $hesklang['private_message_header']; ?>
|
|
|
|
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
<div class="box-tools pull-right">
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
|
|
|
|
|
|
|
<i class="fa fa-minus"></i>
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box-body">
|
|
|
|
|
|
|
|
<div class="callout callout-info">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-md-4 col-sm-6">
|
|
|
|
|
|
|
|
<b><?php echo $hesk_settings['mailtmp']['m_from']; ?></b>
|
|
|
|
|
|
|
|
<?php echo $pm['name']; ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-4 col-sm-6">
|
|
|
|
|
|
|
|
<b><?php echo $hesklang['date_colon']; ?></b>
|
|
|
|
|
|
|
|
<?php echo $pm['dt']; ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-4 col-sm-6">
|
|
|
|
|
|
|
|
<b><?php echo $hesklang['m_sub']; ?></b>
|
|
|
|
|
|
|
|
<?php echo $pm['subject']; ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">
|
|
|
|
|
|
|
|
<table border="0">
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td><b><?php echo $hesk_settings['mailtmp']['m_from']; ?></b></td>
|
|
|
|
|
|
|
|
<td><?php echo $pm['name']; ?></td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td><b><?php echo $hesklang['date']; ?></b></td>
|
|
|
|
|
|
|
|
<td><?php echo $pm['dt']; ?></td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td><b><?php echo $hesklang['m_sub']; ?></b></td>
|
|
|
|
|
|
|
|
<td><?php echo $pm['subject']; ?></td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="text-right" style="vertical-align:top;">
|
|
|
|
<td class="text-right" style="vertical-align:top;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<p><?php echo $pm['message']; ?></p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box-footer">
|
|
|
|
|
|
|
|
<div class="pull-right">
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
$folder = '&folder=outbox';
|
|
|
|
$folder = '&folder=outbox';
|
|
|
|
if ($pm['to'] == $_SESSION['id'])
|
|
|
|
if ($pm['to'] == $_SESSION['id'])
|
|
|
|
{
|
|
|
|
{
|
|
|
|
echo '<a href="mail.php?a=mark_unread&id='.$id.'&token='.hesk_token_echo(0).'"><i class="fa fa-envelope-o font-size-14p"></i></a> ';
|
|
|
|
echo '<a class="btn btn-default" href="mail.php?a=mark_unread&id='.$id.'&token='.hesk_token_echo(0).'"><i class="fa fa-envelope-o icon-link"></i> '.$hesklang['mau'].'</a> ';
|
|
|
|
$folder = '';
|
|
|
|
$folder = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '<a href="mail.php?a=delete&id='.$id.'&token='.hesk_token_echo(0).$folder.'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['delm']).'?\');"><i class="fa fa-times font-size-14p red"></i></a>';
|
|
|
|
echo '<a class="btn btn-danger" href="mail.php?a=delete&id='.$id.'&token='.hesk_token_echo(0).$folder.'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['delm']).'?\');"><i class="fa fa-times icon-link"></i> '.$hesklang['delm'].'</a>';
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</div>
|
|
|
|
</tr>
|
|
|
|
</div>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p><?php echo $pm['message']; ?></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div><hr />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
} // END if $num
|
|
|
|
} // END if $num
|
|
|
|
|
|
|
|
|
|
|
@ -547,7 +573,7 @@ function mail_list_messages()
|
|
|
|
<th><input type="checkbox" name="checkall" value="2" onclick="hesk_changeAll(this)"/></th>
|
|
|
|
<th><input type="checkbox" name="checkall" value="2" onclick="hesk_changeAll(this)"/></th>
|
|
|
|
<th><?php echo $hesklang['m_sub']; ?></th>
|
|
|
|
<th><?php echo $hesklang['m_sub']; ?></th>
|
|
|
|
<th><?php echo $hesk_settings['mailtmp']['m_from']; ?></th>
|
|
|
|
<th><?php echo $hesk_settings['mailtmp']['m_from']; ?></th>
|
|
|
|
<th><?php echo $hesklang['date']; ?></th>
|
|
|
|
<th><?php echo $hesklang['date_colon']; ?></th>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
@ -620,12 +646,20 @@ function show_new_form()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
global $hesk_settings, $hesklang, $admins;
|
|
|
|
global $hesk_settings, $hesklang, $admins;
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
<form action="mail.php" method="post" name="form2" class="form-horizontal" role="form" data-toggle="validator">
|
|
|
|
|
|
|
|
<h3><?php echo $hesklang['new_mail']; ?></h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="footerWithBorder blankSpace"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<form action="mail.php" method="post" name="form2" class="form-horizontal" role="form" data-toggle="validator">
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
|
|
|
|
<div class="box-header with-border">
|
|
|
|
|
|
|
|
<h1 class="box-title">
|
|
|
|
|
|
|
|
<?php echo $hesklang['new_mail']; ?>
|
|
|
|
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
<div class="box-tools pull-right">
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
|
|
|
|
|
|
|
<i class="fa fa-minus"></i>
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box-body">
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="to" class="col-sm-3 control-label"><?php echo $hesklang['m_to']; ?></label>
|
|
|
|
<label for="to" class="col-sm-3 control-label"><?php echo $hesklang['m_to']; ?></label>
|
|
|
|
|
|
|
|
|
|
|
@ -692,6 +726,9 @@ global $hesk_settings, $hesklang, $admins;
|
|
|
|
<input type="submit" value="<?php echo $hesklang['m_send']; ?>" class="btn btn-default"/>
|
|
|
|
<input type="submit" value="<?php echo $hesklang['m_send']; ?>" class="btn btn-default"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
} // END show_new_form()
|
|
|
|
} // END show_new_form()
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|