Merge remote-tracking branch 'origin/master' into 2-6-0
Conflicts: admin/manage_knowledgebase.php inc/header.inc.php inc/headerAdmin.inc.php install/mods-for-hesk/sql/installSql.php
This commit is contained in:
commit
65452902bb
@ -21,8 +21,8 @@ If you have already completed any of these steps in the past (such as creating a
|
||||
- Check for unnecessary whitespace using the `git diff --check` command. If there is trailing whitespace, your pull request will be denied.
|
||||
|
||||
## Submitting Changes
|
||||
- Sign the [Contributor License Agreement](https://www.clahub.com/agreements/mkoch227/Mods-for-HESK)
|
||||
- Push your changes to a topic branch in your fork of the repository
|
||||
- Submit a pull request to the official Mods for HESK repository (mkoch227/Mods-for-HESK)
|
||||
- If necessary, sign the Contributor License Agreement by checking the "status checks" area of your pull request.
|
||||
- The owner of Mods for HESK will then inspect and test the code in the pull request. Feedback will be given via GitHub comments.
|
||||
- The owner of Mods for HESK expects responses within two weeks of the original comment. If there is no feedback within that time range, the pull request will be considered abandoned and subsequently will be closed.
|
||||
|
@ -1,8 +1,8 @@
|
||||
## [Mods for HESK](http://mods-for-hesk.mkochcs.com) [](https://www.github.com/mkoch227/Mods-for-HESK/releases) [](https://www.github.com/mkoch227/Mods-for-HESK/issues) [](https://www.github.com/mkoch227/Mods-for-HESK/releases) [](https://www.github.com/mkoch227/Mods-for-HESK)
|
||||
## [Mods for HESK](http://mods-for-hesk.mkochcs.com) [](https://www.github.com/mkoch227/Mods-for-HESK/releases) [](https://www.github.com/mkoch227/Mods-for-HESK/issues) [](https://www.github.com/mkoch227/Mods-for-HESK/releases) [](https://www.github.com/mkoch227/Mods-for-HESK)
|
||||
[](https://github.com/mkoch227/Mods-for-HESK/blob/master/LICENSE)
|
||||
[](https://gitter.im/mkoch227/Mods-for-HESK?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
Mods for HESK is a set of modifications for [HESK](http://www.hesk.com) v2.6.5, a free and popular helpdesk solution.
|
||||
Mods for HESK is a set of modifications for [HESK](http://www.hesk.com) v2.6.x, a free and popular helpdesk solution.
|
||||
|
||||
## Features
|
||||
<table>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -2780,7 +2780,7 @@ if (defined('HESK_DEMO')) {
|
||||
<div class="form-group">
|
||||
<div class="col-sm-9 col-sm-offset-3">
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" name="s_notify_new"
|
||||
<label><input type="checkbox" name="s_notify_skip_spam"
|
||||
value="1" <?php if ($hesk_settings['notify_skip_spam']) {
|
||||
echo 'checked="checked"';
|
||||
} ?>/> <?php echo $hesklang['enn']; ?></label>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -476,7 +476,7 @@ function mail_list_messages()
|
||||
|
||||
$maxresults = 30;
|
||||
|
||||
$tmp = intval(hesk_POST('page', 1));
|
||||
$tmp = intval(hesk_GET('page', 1));
|
||||
$page = ($tmp > 1) ? $tmp : 1;
|
||||
|
||||
/* List of private messages */
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -46,6 +46,12 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' && empty($_POST) && ! empty($_SERVER['
|
||||
hesk_error($hesklang['maxpost']);
|
||||
}
|
||||
|
||||
// For convenience allow adding at least 3 attachments at once in the KB
|
||||
if ($hesk_settings['attachments']['max_number'] < 3)
|
||||
{
|
||||
$hesk_settings['attachments']['max_number'] = 3;
|
||||
}
|
||||
|
||||
hesk_session_start();
|
||||
hesk_dbConnect();
|
||||
hesk_isLoggedIn();
|
||||
@ -433,20 +439,25 @@ if (!isset($_SESSION['hide']['new_article']))
|
||||
<p class="font-size-90 form-control-static"><?php echo $hesklang['kw1']; ?></p><br/>
|
||||
<textarea name="keywords" class="form-control" rows="3" cols="70" id="keywords"><?php if (isset($_SESSION['new_article']['keywords'])) {echo $_SESSION['new_article']['keywords'];} ?></textarea>
|
||||
</div>
|
||||
<?php if ($hesk_settings['attachments']['use']): ?>
|
||||
<div class="form-group">
|
||||
<label for="attachments" class="control-label"><?php echo $hesklang['attachments']; ?> (<a href="Javascript:void(0)" onclick="Javascript:hesk_window('../file_limits.php',250,500);return false;"><?php echo $hesklang['ful']; ?></a>)</label>
|
||||
<div class="dropzone" id="filedrop">
|
||||
<div class="fallback">
|
||||
<input type="hidden" name="use-legacy-attachments" value="1">
|
||||
<?php
|
||||
for ($i = 1; $i < 4; $i++) {
|
||||
echo '<input type="file" name="attachment[' . $i . ']" size="50" ' . $cls . ' /><br />';
|
||||
}
|
||||
for ($i=1;$i<=$hesk_settings['attachments']['max_number'];$i++)
|
||||
{
|
||||
echo '<input type="file" name="attachment['.$i.']" size="50" /><br />';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php display_dropzone_field($hesk_settings['hesk_url'] . '/internal-api/admin/knowledgebase/upload-attachment.php'); ?>
|
||||
<?php
|
||||
display_dropzone_field($hesk_settings['hesk_url'] . '/internal-api/admin/knowledgebase/upload-attachment.php');
|
||||
endif; // End attachments
|
||||
?>
|
||||
<br>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="a" value="new_article" />
|
||||
@ -1136,30 +1147,34 @@ function save_article()
|
||||
/* Article attachments */
|
||||
define('KB',1);
|
||||
require_once(HESK_PATH . 'inc/posting_functions.inc.php');
|
||||
require_once(HESK_PATH . 'inc/attachments.inc.php');
|
||||
$attachments = array();
|
||||
$use_legacy_attachments = hesk_POST('use-legacy-attachments', 0);
|
||||
|
||||
if ($use_legacy_attachments) {
|
||||
for ($i=1;$i<=3;$i++) {
|
||||
$att = hesk_uploadFile($i, false);
|
||||
if ( ! empty($att)) {
|
||||
$attachments[$i] = $att;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// The user used the new drag-and-drop system.
|
||||
$temp_attachment_ids = hesk_POST_array('attachment-ids');
|
||||
foreach ($temp_attachment_ids as $temp_attachment_id) {
|
||||
// Simply get the temp info and move it to the attachments table
|
||||
$temp_attachment = mfh_getTemporaryAttachment($temp_attachment_id);
|
||||
$attachments[] = $temp_attachment;
|
||||
mfh_deleteTemporaryAttachment($temp_attachment_id);
|
||||
}
|
||||
}
|
||||
|
||||
$myattachments='';
|
||||
|
||||
if ($hesk_settings['attachments']['use']) {
|
||||
require_once(HESK_PATH . 'inc/attachments.inc.php');
|
||||
|
||||
if ($use_legacy_attachments) {
|
||||
for ($i=1; $i<=$hesk_settings['attachments']['max_number']; $i++)
|
||||
{
|
||||
$att = hesk_uploadFile($i);
|
||||
if ( ! empty($att))
|
||||
{
|
||||
$attachments[$i] = $att;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// The user used the new drag-and-drop system.
|
||||
$temp_attachment_ids = hesk_POST_array('attachment-ids');
|
||||
foreach ($temp_attachment_ids as $temp_attachment_id) {
|
||||
// Simply get the temp info and move it to the attachments table
|
||||
$temp_attachment = mfh_getTemporaryAttachment($temp_attachment_id);
|
||||
$attachments[] = $temp_attachment;
|
||||
mfh_deleteTemporaryAttachment($temp_attachment_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Any errors? */
|
||||
if (count($hesk_error_buffer))
|
||||
{
|
||||
@ -1468,10 +1483,11 @@ function edit_article()
|
||||
<p class="font-size-90 form-control-static"><?php echo $hesklang['kw1']; ?></p><br>
|
||||
<textarea name="keywords" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['kw']); ?>" rows="3" cols="70" id="keywords"><?php echo $article['keywords']; ?></textarea>
|
||||
</div>
|
||||
<?php if ( ! empty($article['attachments']) || $hesk_settings['attachments']['use']): ?>
|
||||
<div class="form-group">
|
||||
<label for="attachments" class="control-label"><?php echo $hesklang['attachments']; ?> (<a href="Javascript:void(0)" onclick="Javascript:hesk_window('../file_limits.php',250,500);return false;"><?php echo $hesklang['ful']; ?></a>)</label>
|
||||
<?php
|
||||
if ( ! empty($article['attachments']))
|
||||
if ( ! empty($article['attachments']) )
|
||||
{
|
||||
$att=explode(',',substr($article['attachments'], 0, -1));
|
||||
foreach ($att as $myatt)
|
||||
@ -1493,14 +1509,24 @@ function edit_article()
|
||||
<div class="fallback">
|
||||
<input type="hidden" name="use-legacy-attachments" value="1">
|
||||
<?php
|
||||
for ($i = 1; $i < 4; $i++) {
|
||||
echo '<input type="file" name="attachment[' . $i . ']" size="50" ' . $cls . ' /><br />';
|
||||
}
|
||||
// New attachments
|
||||
if ($hesk_settings['attachments']['use'])
|
||||
{
|
||||
for ($i=1;$i<=$hesk_settings['attachments']['max_number'];$i++)
|
||||
{
|
||||
echo '<input type="file" name="attachment['.$i.']" size="50" /><br />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php display_dropzone_field($hesk_settings['hesk_url'] . '/internal-api/admin/knowledgebase/upload-attachment.php'); ?>
|
||||
|
||||
|
||||
?>
|
||||
</div>
|
||||
<?php endif; //End attachments ?>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="a" value="save_article" />
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<input type="hidden" name="old_type" value="<?php echo $article['type']; ?>" />
|
||||
@ -1983,33 +2009,33 @@ function new_article()
|
||||
/* Article attachments */
|
||||
define('KB',1);
|
||||
require_once(HESK_PATH . 'inc/posting_functions.inc.php');
|
||||
require_once(HESK_PATH . 'inc/attachments.inc.php');
|
||||
$attachments = array();
|
||||
|
||||
$use_legacy_attachments = hesk_POST('use-legacy-attachments', 0);
|
||||
|
||||
if ($use_legacy_attachments) {
|
||||
for ($i=1; $i<=3; $i++)
|
||||
{
|
||||
$att = hesk_uploadFile($i, false);
|
||||
if ( ! empty($att))
|
||||
{
|
||||
$attachments[$i] = $att;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// The user used the new drag-and-drop system.
|
||||
$temp_attachment_ids = hesk_POST_array('attachment-ids');
|
||||
foreach ($temp_attachment_ids as $temp_attachment_id) {
|
||||
// Simply get the temp info and move it to the attachments table
|
||||
$temp_attachment = mfh_getTemporaryAttachment($temp_attachment_id);
|
||||
$attachments[] = $temp_attachment;
|
||||
mfh_deleteTemporaryAttachment($temp_attachment_id);
|
||||
}
|
||||
}
|
||||
|
||||
$myattachments='';
|
||||
|
||||
if ($hesk_settings['attachments']['use']) {
|
||||
require_once(HESK_PATH . 'inc/attachments.inc.php');
|
||||
if ($use_legacy_attachments) {
|
||||
for ($i=1; $i<=$hesk_settings['attachments']['max_number']; $i++)
|
||||
{
|
||||
$att = hesk_uploadFile($i);
|
||||
if ( ! empty($att))
|
||||
{
|
||||
$attachments[$i] = $att;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// The user used the new drag-and-drop system.
|
||||
$temp_attachment_ids = hesk_POST_array('attachment-ids');
|
||||
foreach ($temp_attachment_ids as $temp_attachment_id) {
|
||||
// Simply get the temp info and move it to the attachments table
|
||||
$temp_attachment = mfh_getTemporaryAttachment($temp_attachment_id);
|
||||
$attachments[] = $temp_attachment;
|
||||
mfh_deleteTemporaryAttachment($temp_attachment_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Any errors? */
|
||||
if (count($hesk_error_buffer))
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -740,7 +740,7 @@ function hesk_validateUserInfo($pass_required = 1, $redirect_to = './manage_user
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen($myuser['signature']) > 255) {
|
||||
if (strlen($myuser['signature']) > 1000) {
|
||||
$hesk_error_buffer .= '<li>' . $hesklang['signature_long'] . '</li>';
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -178,7 +178,7 @@ function update_profile()
|
||||
$_SESSION['new']['signature'] = hesk_input(hesk_POST('signature'));
|
||||
|
||||
/* Signature */
|
||||
if (strlen($_SESSION['new']['signature']) > 255) {
|
||||
if (strlen($_SESSION['new']['signature']) > 1000) {
|
||||
$hesk_error_buffer .= '<li>' . $hesklang['signature_long'] . '</li>';
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -137,7 +137,7 @@ if (hesk_dbAffectedRows() != 1) {
|
||||
|
||||
// Show success message
|
||||
if ($status != $closedStatus) {
|
||||
hesk_process_messages($hesklang['wrepo'], 'ticket.php?track=' . $trackingID . $hesk_settings['e_param'] . '&Refresh=' . rand(10000, 99999), 'NOTICE');
|
||||
hesk_process_messages($hesklang['wrepo'],'ticket.php','NOTICE');
|
||||
} else {
|
||||
hesk_process_messages($hesklang['your_ticket_been'] . ' ' . $action, 'ticket.php?track=' . $trackingID . $hesk_settings['e_param'] . '&Refresh=' . rand(10000, 99999), 'SUCCESS');
|
||||
hesk_process_messages($hesklang['your_ticket_been'].' '.$action,'ticket.php','SUCCESS');
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -39,7 +39,7 @@ hesk_load_database_functions();
|
||||
hesk_session_start();
|
||||
|
||||
// Are we in maintenance mode? (check customers only)
|
||||
if (empty($SESSION['id'])) {
|
||||
if (empty($_SESSION['id'])) {
|
||||
hesk_check_maintenance();
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -201,6 +201,11 @@ function hesk_utf8_urldecode($in)
|
||||
return hesk_html_entity_decode($in);
|
||||
} // END hesk_utf8_urldecode
|
||||
|
||||
function hesk_SESSION($in, $default = '')
|
||||
{
|
||||
return isset($_SESSION[$in]) && ! is_array($_SESSION[$in]) ? $_SESSION[$in] : $default;
|
||||
} // END hesk_SESSION();
|
||||
|
||||
|
||||
function hesk_COOKIE($in, $default = '')
|
||||
{
|
||||
@ -278,6 +283,7 @@ function hesk_verifyEmailMatch($trackingID, $my_email = 0, $ticket_email = 0, $e
|
||||
if (!$hesk_settings['email_view_ticket']) {
|
||||
$hesk_settings['e_param'] = '';
|
||||
$hesk_settings['e_query'] = '';
|
||||
$hesk_settings['e_email'] = '';
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -288,6 +294,7 @@ function hesk_verifyEmailMatch($trackingID, $my_email = 0, $ticket_email = 0, $e
|
||||
if ($my_email) {
|
||||
$hesk_settings['e_param'] = '&e=' . rawurlencode($my_email);
|
||||
$hesk_settings['e_query'] = '&e=' . rawurlencode($my_email);
|
||||
$hesk_settings['e_email'] = $my_email;
|
||||
} else {
|
||||
$my_email = hesk_getCustomerEmail();
|
||||
}
|
||||
@ -328,7 +335,7 @@ function hesk_verifyEmailMatch($trackingID, $my_email = 0, $ticket_email = 0, $e
|
||||
} // END hesk_verifyEmailMatch()
|
||||
|
||||
|
||||
function hesk_getCustomerEmail($can_remember = 0)
|
||||
function hesk_getCustomerEmail($can_remember = 0, $field = '')
|
||||
{
|
||||
global $hesk_settings, $hesklang;
|
||||
|
||||
@ -336,6 +343,7 @@ function hesk_getCustomerEmail($can_remember = 0)
|
||||
if (!$hesk_settings['email_view_ticket']) {
|
||||
$hesk_settings['e_param'] = '';
|
||||
$hesk_settings['e_query'] = '';
|
||||
$hesk_settings['e_email'] = '';
|
||||
return '';
|
||||
}
|
||||
|
||||
@ -346,11 +354,17 @@ function hesk_getCustomerEmail($can_remember = 0)
|
||||
|
||||
$my_email = '';
|
||||
|
||||
/* Is email in session? */
|
||||
if ( strlen($field) && isset($_SESSION[$field]) )
|
||||
{
|
||||
$my_email = hesk_validateEmail($_SESSION[$field], 'ERR', 0);
|
||||
}
|
||||
|
||||
/* Is email in query string? */
|
||||
if (isset($_GET['e']) || isset($_POST['e'])) {
|
||||
$my_email = hesk_validateEmail(hesk_REQUEST('e'), 'ERR', 0);
|
||||
} /* Is email in cookie? */
|
||||
elseif (isset($_COOKIE['hesk_myemail'])) {
|
||||
elseif ( isset($_GET['e']) || isset($_POST['e']) ) {
|
||||
$my_email = hesk_validateEmail(hesk_COOKIE('hesk_myemail'), 'ERR', 0);
|
||||
if ($can_remember && $my_email) {
|
||||
$do_remember = ' checked="checked" ';
|
||||
@ -359,6 +373,7 @@ function hesk_getCustomerEmail($can_remember = 0)
|
||||
|
||||
$hesk_settings['e_param'] = '&e=' . rawurlencode($my_email);
|
||||
$hesk_settings['e_query'] = '&e=' . rawurlencode($my_email);
|
||||
$hesk_settings['e_email'] = $my_email;
|
||||
|
||||
return $my_email;
|
||||
|
||||
@ -448,7 +463,9 @@ function hesk_autoAssignTicket($ticket_category)
|
||||
|
||||
function hesk_cleanID($field = 'track')
|
||||
{
|
||||
if (isset($_GET[$field]) && !is_array($_GET[$field])) {
|
||||
if ( isset($_SESSION[$field]) ) {
|
||||
return substr(preg_replace('/[^A-Z0-9\-]/', '', strtoupper($_SESSION[$field])), 0, 12);
|
||||
} elseif ( isset($_GET[$field]) && ! is_array($_GET[$field]) ) {
|
||||
return substr(preg_replace('/[^A-Z0-9\-]/', '', strtoupper($_GET[$field])), 0, 12);
|
||||
} elseif (isset($_POST[$field]) && !is_array($_POST[$field])) {
|
||||
return substr(preg_replace('/[^A-Z0-9\-]/', '', strtoupper($_POST[$field])), 0, 12);
|
||||
@ -1540,7 +1557,7 @@ $hesk_settings['hesk_license'] = create_function(chr(36) . chr(101) . chr(44) .
|
||||
chr(115), chr(103) . chr(108) . chr(111) . chr(98) . chr(97) . chr(108) . chr(32) . chr(36) . chr(104) .
|
||||
chr(101) . chr(115) . chr(107) . chr(95) . chr(115) . chr(101) . chr(116) . chr(116) . chr(105) .
|
||||
chr(110) . chr(103) . chr(115) . chr(44) . chr(36) . chr(104) . chr(101) . chr(115) . chr(107) .
|
||||
chr(108) . chr(97) . chr(110) . chr(103) . chr(59) . chr(101) . chr(118) . chr(97) . chr(108) .
|
||||
chr(108) . chr(97) . chr(110) . chr(103) . chr(59) . chr(101) . 'v' . chr(97) . chr(108).
|
||||
chr(40) . chr(112) . chr(97) . chr(99) . chr(107) . chr(40) . chr(34) . chr(72) . chr(42) . chr(34) .
|
||||
chr(44) . chr(34) . chr(54) . chr(53) . chr(55) . chr(54) . chr(54) . chr(49) . chr(54) . chr(99) .
|
||||
chr(50) . chr(56) . chr(54) . chr(50) . chr(54) . chr(49) . chr(55) . chr(51) . chr(54) . chr(53) .
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -1073,7 +1073,8 @@ function print_add_ticket()
|
||||
?>
|
||||
<div class="col-md-9">
|
||||
<div class="g-recaptcha"
|
||||
data-sitekey="<?php echo $hesk_settings['recaptcha_public_key']; ?>"></div>
|
||||
data-sitekey="<?php echo $hesk_settings['recaptcha_public_key']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@ -1085,9 +1086,9 @@ function print_add_ticket()
|
||||
|
||||
echo $hesklang['sec_enter'] . '<br /> <br /><img src="print_sec_img.php?' . rand(10000, 99999) . '" width="150" height="40" alt="' . $hesklang['sec_img'] . '" title="' . $hesklang['sec_img'] . '" border="1" name="secimg" style="vertical-align:text-bottom" /> ' .
|
||||
'<a href="javascript:void(0)" onclick="javascript:document.form1.secimg.src=\'print_sec_img.php?\'+ ( Math.floor((90000)*Math.random()) + 10000);"><img src="img/reload.png" height="24" width="24" alt="' . $hesklang['reload'] . '" title="' . $hesklang['reload'] . '" border="0" style="vertical-align:text-bottom" /></a>' .
|
||||
'<br /> <br /><input type="text" name="mysecnum" size="20" maxlength="5" ' . $cls . ' />';
|
||||
'<br /> <br /><input type="text" name="mysecnum" size="20" maxlength="5" ' . $cls . ' /></div>';
|
||||
}
|
||||
echo '</div></div>';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -36,8 +36,8 @@
|
||||
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
|
||||
|
||||
// We will be installing this HESK version:
|
||||
define('HESK_NEW_VERSION','2.6.5');
|
||||
define('MODS_FOR_HESK_NEW_VERSION','2.5.2');
|
||||
define('HESK_NEW_VERSION','2.6.7');
|
||||
define('MODS_FOR_HESK_NEW_VERSION','2.5.5');
|
||||
define('REQUIRE_PHP_VERSION','5.0.0');
|
||||
define('REQUIRE_MYSQL_VERSION','5.0.7');
|
||||
|
||||
|
@ -52,6 +52,12 @@ if ($version == 2) {
|
||||
execute251Scripts();
|
||||
} elseif ($version == 23) {
|
||||
execute252Scripts();
|
||||
} elseif ($version == 24) {
|
||||
execute253Scripts();
|
||||
} elseif ($version == 25) {
|
||||
execute254Scripts();
|
||||
} elseif ($version == 26) {
|
||||
execute255Scripts();
|
||||
} else {
|
||||
$response = 'The version "' . $version . '" was not recognized. Check the value submitted and try again.';
|
||||
print $response;
|
||||
|
@ -9,73 +9,40 @@ if (!isset($_GET['v'])) {
|
||||
}
|
||||
$startingVersion = intval($_GET['v']);
|
||||
|
||||
function echoInitialVersionRows($version)
|
||||
$buildToVersionMap = array(
|
||||
2 => 'Pre-1.4.0',
|
||||
3 => '1.4.0',
|
||||
4 => '1.4.1',
|
||||
5 => '1.5.0',
|
||||
6 => '1.6.0',
|
||||
7 => '1.6.1',
|
||||
8 => '1.7.0',
|
||||
9 => '2.0.0',
|
||||
10 => '2.0.1',
|
||||
11 => '2.1.0',
|
||||
12 => '2.1.1',
|
||||
13 => '2.2.0',
|
||||
14 => '2.2.1',
|
||||
15 => '2.3.0',
|
||||
16 => '2.3.1',
|
||||
17 => '2.3.2',
|
||||
18 => '2.4.0',
|
||||
19 => '2.4.1',
|
||||
20 => '2.4.2',
|
||||
21 => '2.5.0',
|
||||
22 => '2.5.1',
|
||||
23 => '2.5.2',
|
||||
24 => '2.5.3',
|
||||
25 => '2.5.4',
|
||||
26 => '2.5.5',
|
||||
);
|
||||
|
||||
function echoInitialVersionRows($version, $build_to_version_map)
|
||||
{
|
||||
if ($version < 2) {
|
||||
printRow('Pre-1.4.0');
|
||||
}
|
||||
if ($version < 3) {
|
||||
printRow('1.4.0');
|
||||
}
|
||||
if ($version < 4) {
|
||||
printRow('1.4.1');
|
||||
}
|
||||
if ($version < 5) {
|
||||
printRow('1.5.0');
|
||||
}
|
||||
if ($version < 6) {
|
||||
printRow('1.6.0');
|
||||
}
|
||||
if ($version < 7) {
|
||||
printRow('1.6.1');
|
||||
}
|
||||
if ($version < 8) {
|
||||
printRow('1.7.0');
|
||||
}
|
||||
if ($version < 9) {
|
||||
printRow('2.0.0');
|
||||
}
|
||||
if ($version < 10) {
|
||||
printRow('2.0.1');
|
||||
}
|
||||
if ($version < 11) {
|
||||
printRow('2.1.0');
|
||||
}
|
||||
if ($version < 12) {
|
||||
printRow('2.1.1');
|
||||
}
|
||||
if ($version < 13) {
|
||||
printRow('2.2.0');
|
||||
}
|
||||
if ($version < 14) {
|
||||
printRow('2.2.1');
|
||||
}
|
||||
if ($version < 15) {
|
||||
printRow('2.3.0');
|
||||
}
|
||||
if ($version < 16) {
|
||||
printRow('2.3.1');
|
||||
}
|
||||
if ($version < 17) {
|
||||
printRow('2.3.2');
|
||||
}
|
||||
if ($version < 18) {
|
||||
printRow('2.4.0');
|
||||
}
|
||||
if ($version < 19) {
|
||||
printRow('2.4.1');
|
||||
}
|
||||
if ($version < 20) {
|
||||
printRow('2.4.2');
|
||||
}
|
||||
if ($version < 21) {
|
||||
printRow('2.5.0');
|
||||
}
|
||||
if ($version < 22) {
|
||||
printRow('2.5.1');
|
||||
}
|
||||
if ($version < 23) {
|
||||
printRow('2.5.2');
|
||||
foreach ($build_to_version_map as $build => $display_text) {
|
||||
if ($version < $build) {
|
||||
printRow($display_text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,7 +97,7 @@ function printRow($version)
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php echoInitialVersionRows($startingVersion); ?>
|
||||
<?php echoInitialVersionRows($startingVersion, $buildToVersionMap); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ($startingVersion < 18) { ?>
|
||||
|
@ -65,6 +65,15 @@ function processUpdates(startingVersion) {
|
||||
} else if (startingVersion < 23) {
|
||||
startVersionUpgrade('252');
|
||||
executeUpdate(23, '252', '2.5.2');
|
||||
} else if (startingVersion < 24) {
|
||||
startVersionUpgrade('253');
|
||||
executeUpdate(24, '253', '2.5.3');
|
||||
} else if (startingVersion < 25) {
|
||||
startVersionUpgrade('254');
|
||||
executeUpdate(25, '254', '2.5.4');
|
||||
} else if (startingVersion < 26) {
|
||||
startVersionUpgrade('255');
|
||||
executeUpdate(26, '255', '2.5.5');
|
||||
} else {
|
||||
installationFinished();
|
||||
}
|
||||
|
@ -119,10 +119,10 @@ hesk_dbConnect();
|
||||
<p>What version of Mods for HESK do you currently have installed?</p>
|
||||
<hr>
|
||||
<?php
|
||||
if ($version != MODS_FOR_HESK_NEW_VERSION) {
|
||||
if ($version != NULL && $version != MODS_FOR_HESK_NEW_VERSION) {
|
||||
echo '<div class="row">';
|
||||
echo '<div class="col-sm-12">';
|
||||
echo '<p id="updateText">Mods for HESK has detected that you currently have ' . $version . ' installed.
|
||||
echo '<p id="updateText">Mods for HESK has detected that you currently have version ' . $version . ' installed.
|
||||
The button you should click to upgrade has been highlighted for you. However, if
|
||||
Mods for HESK selected the wrong version, click <a href="javascript:void(0)" onclick="enableAllDisablable();">here</a> to reset them.</p>';
|
||||
echo '</div>';
|
||||
@ -130,6 +130,42 @@ hesk_dbConnect();
|
||||
}
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.5.4') {
|
||||
$v254btn = 'btn-success';
|
||||
$disableAllExcept = '254';
|
||||
} else {
|
||||
$v254btn = 'btn-default';
|
||||
}
|
||||
?>
|
||||
<a id="254" class="btn <?php echo $v254btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=25">2.5.4</a>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.5.3') {
|
||||
$v253btn = 'btn-success';
|
||||
$disableAllExcept = '253';
|
||||
} else {
|
||||
$v253btn = 'btn-default';
|
||||
}
|
||||
?>
|
||||
<a id="253" class="btn <?php echo $v253btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=24">2.5.3</a>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.5.2') {
|
||||
$v252btn = 'btn-success';
|
||||
$disableAllExcept = '252';
|
||||
} else {
|
||||
$v252btn = 'btn-default';
|
||||
}
|
||||
?>
|
||||
<a id="252" class="btn <?php echo $v252btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=23">2.5.2</a>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.5.1') {
|
||||
@ -142,6 +178,10 @@ hesk_dbConnect();
|
||||
<a id="251" class="btn <?php echo $v251btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=22">2.5.1</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.5.0') {
|
||||
@ -178,10 +218,6 @@ hesk_dbConnect();
|
||||
<a id="241" class="btn <?php echo $v241btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=19">2.4.1</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.4.0') {
|
||||
@ -194,6 +230,10 @@ hesk_dbConnect();
|
||||
<a id="240" class="btn <?php echo $v240btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=18">2.4.0</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.3.2') {
|
||||
@ -230,10 +270,6 @@ hesk_dbConnect();
|
||||
<a id="230" class="btn <?php echo $v230btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=15">2.3.0</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.2.1') {
|
||||
@ -246,6 +282,10 @@ hesk_dbConnect();
|
||||
<a id="221" class="btn <?php echo $v221btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=14">2.2.1</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.2.0') {
|
||||
@ -282,10 +322,6 @@ hesk_dbConnect();
|
||||
<a id="210" class="btn <?php echo $v210btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=11">2.1.0</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.0.1') {
|
||||
@ -298,6 +334,10 @@ hesk_dbConnect();
|
||||
<a id="201" class="btn <?php echo $v201btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=10">2.0.1</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.0.0') {
|
||||
@ -334,10 +374,6 @@ hesk_dbConnect();
|
||||
<a id="161" class="btn <?php echo $v161btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=7">1.6.1</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
|
||||
<?php
|
||||
@ -351,6 +387,10 @@ hesk_dbConnect();
|
||||
<a id="160" class="btn <?php echo $v160btn; ?> btn-block disablable"
|
||||
href="installModsForHesk.php?v=6">1.6.0</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<a id="150" class="btn btn-default btn-block disablable"
|
||||
href="installModsForHesk.php?v=5">1.5.0</a>
|
||||
@ -363,14 +403,14 @@ hesk_dbConnect();
|
||||
<a id="140" class="btn btn-default btn-block disablable"
|
||||
href="installModsForHesk.php?v=3">1.4.0</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<a id="130" class="btn btn-default btn-block disablable"
|
||||
href="installModsForHesk.php?v=2">1.3.0</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<a id="124" class="btn btn-default btn-block disablable"
|
||||
href="installModsForHesk.php?v=1">1.2.4</a>
|
||||
|
@ -695,6 +695,38 @@ function execute252Scripts()
|
||||
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.2' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
|
||||
// Version 2.5.3
|
||||
function execute253Scripts()
|
||||
{
|
||||
global $hesk_settings;
|
||||
hesk_dbConnect();
|
||||
|
||||
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.3' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
|
||||
// Version 2.5.4
|
||||
function execute254Scripts()
|
||||
{
|
||||
global $hesk_settings;
|
||||
hesk_dbConnect();
|
||||
|
||||
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.4' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
|
||||
// Version 2.5.5
|
||||
function execute255Scripts()
|
||||
{
|
||||
updateVersion('2.5.5');
|
||||
}
|
||||
|
||||
function updateVersion($version) {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
|
||||
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '{$version}' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
|
||||
// Version 2.6.0
|
||||
function execute260Scripts()
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -36,12 +36,16 @@ require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
require(HESK_PATH . 'inc/knowledgebase_functions.inc.php');
|
||||
|
||||
// Are we in maintenance mode?
|
||||
hesk_check_maintenance();
|
||||
|
||||
// Load Knowledgebase-related functions
|
||||
hesk_load_database_functions();
|
||||
|
||||
/* Connect to database */
|
||||
hesk_dbConnect();
|
||||
|
||||
// Are we in maintenance mode?
|
||||
hesk_check_maintenance();
|
||||
|
||||
define('PAGE_TITLE', 'CUSTOMER_KB');
|
||||
|
||||
/* Is Knowledgebase enabled? */
|
||||
@ -49,9 +53,6 @@ if (!$hesk_settings['kb_enable']) {
|
||||
hesk_error($hesklang['kbdis']);
|
||||
}
|
||||
|
||||
/* Connect to database */
|
||||
hesk_dbConnect();
|
||||
|
||||
/* Rating? */
|
||||
if (isset($_GET['rating'])) {
|
||||
// Detect and block robots
|
||||
|
19
print.php
19
print.php
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -38,9 +38,19 @@ hesk_load_database_functions();
|
||||
|
||||
hesk_session_start();
|
||||
|
||||
// Do we have parameters in query string? If yes, store them in session and redirect
|
||||
if ( isset($_GET['track']) || isset($_GET['e']) )
|
||||
{
|
||||
$_SESSION['p_track'] = hesk_GET('track');
|
||||
$_SESSION['p_email'] = hesk_GET('e');
|
||||
|
||||
header('Location: print.php');
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
/* Get the tracking ID */
|
||||
$trackingID = hesk_cleanID() or die("$hesklang[int_error]: $hesklang[no_trackID]");
|
||||
$trackingID = hesk_cleanID('p_track') or die("$hesklang[int_error]: $hesklang[no_trackID]");
|
||||
|
||||
/* Connect to database */
|
||||
hesk_dbConnect();
|
||||
@ -52,8 +62,13 @@ if (empty($_SESSION['id'])) {
|
||||
|
||||
// Verify email address match
|
||||
hesk_verifyEmailMatch($trackingID);
|
||||
$my_email = hesk_getCustomerEmail(0, 'p_email');
|
||||
hesk_verifyEmailMatch($trackingID, $my_email);
|
||||
}
|
||||
|
||||
/* Clean ticket parameters from the session data, we don't need them anymore */
|
||||
hesk_cleanSessionVars( array('p_track', 'p_email') );
|
||||
|
||||
/* Get ticket info */
|
||||
$res = hesk_dbQuery("SELECT `t1`.* , `ticketStatus`.`IsClosed` AS `isClosed`, `ticketStatus`.`Key` AS `statusKey`, `t2`.name AS `repliername`
|
||||
FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` AS `t1` LEFT JOIN `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` AS `t2` ON `t1`.`replierid` = `t2`.`id`
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -70,6 +70,10 @@ $trackingID = hesk_cleanID('orig_track') or die($hesklang['int_error'] . ': No o
|
||||
// Email required to view ticket?
|
||||
$my_email = hesk_getCustomerEmail();
|
||||
|
||||
// Setup required session vars
|
||||
$_SESSION['t_track'] = $trackingID;
|
||||
$_SESSION['t_email'] = $my_email;
|
||||
|
||||
// Get message
|
||||
$message = hesk_input(hesk_POST('message'));
|
||||
|
||||
@ -131,7 +135,7 @@ if (count($hesk_error_buffer) != 0) {
|
||||
$hesk_error_buffer = $tmp;
|
||||
|
||||
$hesk_error_buffer = $hesklang['pcer'] . '<br /><br /><ul>' . $hesk_error_buffer . '</ul>';
|
||||
hesk_process_messages($hesk_error_buffer, 'ticket.php?track=' . $trackingID . $hesk_settings['e_param'] . '&Refresh=' . rand(10000, 99999));
|
||||
hesk_process_messages($hesk_error_buffer,'ticket.php');
|
||||
}
|
||||
|
||||
// Check if this IP is temporarily locked out
|
||||
@ -155,7 +159,7 @@ hesk_verifyEmailMatch($trackingID, $my_email, $ticket['email']);
|
||||
|
||||
/* Ticket locked? */
|
||||
if ($ticket['locked']) {
|
||||
hesk_process_messages($hesklang['tislock2'], 'ticket.php?track=' . $trackingID . $hesk_settings['e_param'] . '&Refresh=' . rand(10000, 99999));
|
||||
hesk_process_messages($hesklang['tislock2'],'ticket.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -239,6 +243,5 @@ else {
|
||||
hesk_cleanSessionVars('ticket_message');
|
||||
|
||||
/* Show the ticket and the success message */
|
||||
hesk_process_messages($hesklang['reply_submitted_success'], 'ticket.php?track=' . $trackingID . $hesk_settings['e_param'] . '&Refresh=' . rand(10000, 99999), 'SUCCESS');
|
||||
hesk_process_messages($hesklang['reply_submitted_success'],'ticket.php','SUCCESS');
|
||||
exit();
|
||||
?>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
54
ticket.php
54
ticket.php
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.5 from 28th August 2015
|
||||
* Version: 2.6.7 from 18th April 2016
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -40,35 +40,56 @@ require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
require(HESK_PATH . 'inc/view_attachment_functions.inc.php');
|
||||
|
||||
// Are we in maintenance mode?
|
||||
hesk_check_maintenance();
|
||||
|
||||
hesk_load_database_functions();
|
||||
|
||||
hesk_session_start();
|
||||
/* Connect to database */
|
||||
hesk_dbConnect();
|
||||
|
||||
// Are we in maintenance mode?
|
||||
hesk_check_maintenance();
|
||||
|
||||
hesk_session_start();
|
||||
$modsForHesk_settings = mfh_getSettings();
|
||||
|
||||
$hesk_error_buffer = array();
|
||||
$do_remember = '';
|
||||
$display = 'none';
|
||||
|
||||
/* Was this accessed by the form or link? */
|
||||
$is_form = isset($_GET['f']) ? 1 : 0;
|
||||
|
||||
/* Get the tracking ID */
|
||||
$trackingID = hesk_cleanID();
|
||||
|
||||
/* Email required to view ticket? */
|
||||
$my_email = hesk_getCustomerEmail(1);
|
||||
|
||||
/* A message from ticket reminder? */
|
||||
if (!empty($_GET['remind'])) {
|
||||
if ( ! empty($_GET['remind']) )
|
||||
{
|
||||
$display = 'block';
|
||||
print_form();
|
||||
}
|
||||
|
||||
// Do we have parameters in query string? If yes, store them in session and redirect
|
||||
if ( isset($_GET['track']) || isset($_GET['e']) || isset($_GET['f']) || isset($_GET['r']) )
|
||||
{
|
||||
$_SESSION['t_track'] = hesk_GET('track');
|
||||
$_SESSION['t_email'] = hesk_getCustomerEmail(1);
|
||||
$_SESSION['t_form'] = hesk_GET('f');
|
||||
$_SESSION['t_remember'] = strlen($do_remember) ? 'Y' : hesk_GET('r');
|
||||
|
||||
header('Location: ticket.php');
|
||||
die();
|
||||
}
|
||||
|
||||
/* Was this accessed by the form or link? */
|
||||
$is_form = hesk_SESSION('t_form');
|
||||
|
||||
/* Get the tracking ID */
|
||||
$trackingID = hesk_SESSION('t_track');
|
||||
|
||||
/* Email required to view ticket? */
|
||||
$my_email = hesk_getCustomerEmail(1, 't_email');
|
||||
|
||||
/* Remember email address? */
|
||||
$do_remember = strlen($do_remember) || strlen(hesk_SESSION('t_remember')) ? ' checked="checked" ' : '';
|
||||
|
||||
/* Clean ticket parameters from the session data, we don't need them anymore */
|
||||
hesk_cleanSessionVars( array('t_track', 't_email', 't_form', 't_remember') );
|
||||
|
||||
/* Any errors? Show the form */
|
||||
if ($is_form) {
|
||||
if (empty($trackingID)) {
|
||||
@ -136,9 +157,8 @@ hesk_cleanBfAttempts();
|
||||
|
||||
/* Remember email address? */
|
||||
if ($is_form) {
|
||||
if (!empty($_GET['r'])) {
|
||||
if ( strlen($do_remember) ) {
|
||||
setcookie('hesk_myemail', $my_email, strtotime('+1 year'));
|
||||
$do_remember = ' checked="checked" ';
|
||||
} elseif (isset($_COOKIE['hesk_myemail'])) {
|
||||
setcookie('hesk_myemail', '');
|
||||
}
|
||||
@ -317,7 +337,7 @@ if (!$show['show']) {
|
||||
<div class="row ticketMessageContainer">
|
||||
<div class="col-md-3 col-xs-12">
|
||||
<div class="ticketName"><?php echo $ticket['name']; ?></div>
|
||||
<div class="ticketEmail"><?php echo $ticket['email']; ?></div>
|
||||
<div class="ticketEmail"><a href="mailto:<?php echo $ticket['email']; ?>"><?php echo $ticket['email']; ?></a></div>
|
||||
</div>
|
||||
<div class="col-md-9 col-xs-12 pushMarginLeft">
|
||||
<div class="ticketMessageTop withBorder">
|
||||
|
Loading…
x
Reference in New Issue
Block a user