Merge branch 'master' into web-services

merge-requests/3/head
Mike Koch 10 years ago
commit d7876bfe50

102
.gitignore vendored

@ -1,10 +1,8 @@
admin/admin_suggest_articles.php
admin/archive.php
admin/assign_owner.php
admin/delete_tickets.php
admin/generate_spam_question.php
admin/move_category.php
admin/options.php
admin/priority.php
admin/test_connection.php
attachments/index.htm
@ -13,7 +11,6 @@ docs/docs_style.css
docs/index.html
docs/quick-guide.html
docs/step-by-step-guide.html
download_attachment.php
file_limits.php
footer.txt
header.txt
@ -149,7 +146,6 @@ img/tag_off.png
img/unlock.png
img/vertical.jpg
img/view.png
inc/admin_functions.inc.php
inc/assignment_search.inc.php
inc/attachments.inc.php
inc/calendar/img/cal.gif
@ -164,7 +160,6 @@ inc/calendar/tcal.js
inc/calendar/tcal.php
inc/database.inc.php
inc/database_mysqli.inc.php
inc/email_functions.inc.php
inc/footer.inc.php
inc/index.htm
inc/mail/email_parser.php
@ -183,10 +178,8 @@ inc/mail/sasl/ntlm_sasl_client.php
inc/mail/sasl/plain_sasl_client.php
inc/mail/sasl/sasl.php
inc/mail/smtp.php
inc/pipe_functions.inc.php
inc/posting_functions.inc.php
inc/prepare_ticket_export.inc.php
inc/prepare_ticket_search.inc.php
inc/print_group.inc.php
inc/recaptcha/LICENSE
inc/recaptcha/index.htm
@ -199,52 +192,52 @@ inc/tabs/tabber-minimized.js
inc/tabs/tabber.css
inc/timer/hesk_timer.js
inc/timer/index.htm
inc/tiny_mce/3.5.10/langs/en.js
inc/tiny_mce/3.5.10/license.txt
inc/tiny_mce/3.5.10/themes/advanced/about.htm
inc/tiny_mce/3.5.10/themes/advanced/anchor.htm
inc/tiny_mce/3.5.10/themes/advanced/charmap.htm
inc/tiny_mce/3.5.10/themes/advanced/color_picker.htm
inc/tiny_mce/3.5.10/themes/advanced/editor_template.js
inc/tiny_mce/3.5.10/themes/advanced/image.htm
inc/tiny_mce/3.5.10/themes/advanced/img/colorpicker.jpg
inc/tiny_mce/3.5.10/themes/advanced/img/flash.gif
inc/tiny_mce/3.5.10/themes/advanced/img/icons.gif
inc/tiny_mce/3.5.10/themes/advanced/img/iframe.gif
inc/tiny_mce/3.5.10/themes/advanced/img/pagebreak.gif
inc/tiny_mce/3.5.10/themes/advanced/img/quicktime.gif
inc/tiny_mce/3.5.10/themes/advanced/img/realmedia.gif
inc/tiny_mce/3.5.10/themes/advanced/img/shockwave.gif
inc/tiny_mce/3.5.10/themes/advanced/img/trans.gif
inc/tiny_mce/3.5.10/themes/advanced/img/video.gif
inc/tiny_mce/3.5.10/themes/advanced/img/windowsmedia.gif
inc/tiny_mce/3.5.10/themes/advanced/js/about.js
inc/tiny_mce/3.5.10/themes/advanced/js/anchor.js
inc/tiny_mce/3.5.10/themes/advanced/js/charmap.js
inc/tiny_mce/3.5.10/themes/advanced/js/color_picker.js
inc/tiny_mce/3.5.10/themes/advanced/js/image.js
inc/tiny_mce/3.5.10/themes/advanced/js/link.js
inc/tiny_mce/3.5.10/themes/advanced/js/source_editor.js
inc/tiny_mce/3.5.10/themes/advanced/langs/en.js
inc/tiny_mce/3.5.10/themes/advanced/langs/en_dlg.js
inc/tiny_mce/3.5.10/themes/advanced/link.htm
inc/tiny_mce/3.5.10/themes/advanced/shortcuts.htm
inc/tiny_mce/3.5.10/themes/advanced/skins/default/content.css
inc/tiny_mce/3.5.10/themes/advanced/skins/default/dialog.css
inc/tiny_mce/3.5.10/themes/advanced/skins/default/img/buttons.png
inc/tiny_mce/3.5.10/themes/advanced/skins/default/img/items.gif
inc/tiny_mce/3.5.10/themes/advanced/skins/default/img/menu_arrow.gif
inc/tiny_mce/3.5.10/themes/advanced/skins/default/img/menu_check.gif
inc/tiny_mce/3.5.10/themes/advanced/skins/default/img/progress.gif
inc/tiny_mce/3.5.10/themes/advanced/skins/default/img/tabs.gif
inc/tiny_mce/3.5.10/themes/advanced/skins/default/ui.css
inc/tiny_mce/3.5.10/themes/advanced/source_editor.htm
inc/tiny_mce/3.5.10/tiny_mce.js
inc/tiny_mce/3.5.10/tiny_mce_popup.js
inc/tiny_mce/3.5.10/utils/editable_selects.js
inc/tiny_mce/3.5.10/utils/form_utils.js
inc/tiny_mce/3.5.10/utils/mctabs.js
inc/tiny_mce/3.5.10/utils/validate.js
inc/tiny_mce/3.5.11/langs/en.js
inc/tiny_mce/3.5.11/license.txt
inc/tiny_mce/3.5.11/themes/advanced/about.htm
inc/tiny_mce/3.5.11/themes/advanced/anchor.htm
inc/tiny_mce/3.5.11/themes/advanced/charmap.htm
inc/tiny_mce/3.5.11/themes/advanced/color_picker.htm
inc/tiny_mce/3.5.11/themes/advanced/editor_template.js
inc/tiny_mce/3.5.11/themes/advanced/image.htm
inc/tiny_mce/3.5.11/themes/advanced/img/colorpicker.jpg
inc/tiny_mce/3.5.11/themes/advanced/img/flash.gif
inc/tiny_mce/3.5.11/themes/advanced/img/icons.gif
inc/tiny_mce/3.5.11/themes/advanced/img/iframe.gif
inc/tiny_mce/3.5.11/themes/advanced/img/pagebreak.gif
inc/tiny_mce/3.5.11/themes/advanced/img/quicktime.gif
inc/tiny_mce/3.5.11/themes/advanced/img/realmedia.gif
inc/tiny_mce/3.5.11/themes/advanced/img/shockwave.gif
inc/tiny_mce/3.5.11/themes/advanced/img/trans.gif
inc/tiny_mce/3.5.11/themes/advanced/img/video.gif
inc/tiny_mce/3.5.11/themes/advanced/img/windowsmedia.gif
inc/tiny_mce/3.5.11/themes/advanced/js/about.js
inc/tiny_mce/3.5.11/themes/advanced/js/anchor.js
inc/tiny_mce/3.5.11/themes/advanced/js/charmap.js
inc/tiny_mce/3.5.11/themes/advanced/js/color_picker.js
inc/tiny_mce/3.5.11/themes/advanced/js/image.js
inc/tiny_mce/3.5.11/themes/advanced/js/link.js
inc/tiny_mce/3.5.11/themes/advanced/js/source_editor.js
inc/tiny_mce/3.5.11/themes/advanced/langs/en.js
inc/tiny_mce/3.5.11/themes/advanced/langs/en_dlg.js
inc/tiny_mce/3.5.11/themes/advanced/link.htm
inc/tiny_mce/3.5.11/themes/advanced/shortcuts.htm
inc/tiny_mce/3.5.11/themes/advanced/skins/default/content.css
inc/tiny_mce/3.5.11/themes/advanced/skins/default/dialog.css
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/buttons.png
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/items.gif
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/menu_arrow.gif
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/menu_check.gif
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/progress.gif
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/tabs.gif
inc/tiny_mce/3.5.11/themes/advanced/skins/default/ui.css
inc/tiny_mce/3.5.11/themes/advanced/source_editor.htm
inc/tiny_mce/3.5.11/tiny_mce.js
inc/tiny_mce/3.5.11/tiny_mce_popup.js
inc/tiny_mce/3.5.11/utils/editable_selects.js
inc/tiny_mce/3.5.11/utils/form_utils.js
inc/tiny_mce/3.5.11/utils/mctabs.js
inc/tiny_mce/3.5.11/utils/validate.js
inc/treemenu/TreeMenu.php
inc/treemenu/index.htm
inc/users_online.inc.php
@ -256,7 +249,6 @@ install/update.php
language/en/emails/category_moved.txt
language/en/emails/forgot_ticket_id.txt
language/en/emails/index.htm
language/en/emails/new_note.txt
language/en/emails/new_pm.txt
language/en/emails/new_reply_by_customer.txt
language/en/emails/new_reply_by_staff.txt
@ -270,3 +262,5 @@ rate.php
readme.html
robots.txt
.idea/
attachments/__latest.txt
attachments

@ -1,23 +1,28 @@
[![Analytics](https://ga-beacon.appspot.com/UA-49251479-1/hesk/README)](https://github.com/mkoch227/Hesk)
[![Stories in Ready](https://badge.waffle.io/mkoch227/Mods-For-Hesk.png?label=waffle:ready&title=Ready)](https://waffle.io/mkoch227/Mods-For-Hesk)
<h2><a href="http://mods-for-hesk.mkochcs.com" target="_blank">Mods for HESK</a> v1.6.1</h2>
<h2>NuMods v1.2.1</h2>
This branch contains all files modified from the base version of HESK to become NuMods, a set of modifications for HESK v2.x
Mods for HESK is a set of modifications for HESK v2.5.5, a free and popular helpdesk solution.
<h2>Features</h2>
<p>Currently, the two major features of NuMods are:</p>
<ul>
<li>A new, responsive user interface</li>
<li>Ability to create custom ticket statuses</li>
<li>Ability to ban IP addresses / email addresses</li>
<li>Right-to-left text direction</li>
<li>Designate parent/child relationships for tickets</li>
<li>Dynamically add columns to the ticket dashboard</li>
<li>Maintenance Mode</li>
<li>Ticket Dashboard Automatic Refresh</li>
<li>...and more!</li>
</ul>
<h2>Download</h2>
You can download this tweak via two ways:
You can download Mods for HESK via two ways:
<ol>
<li><strong>Stable Releases:</strong> Releases that have a release tag associated with a commit are considered releases. You can click on "releases" on the top of the repo, and then click "zip" or "tar.gz" to download the repo at that stage.</li>
<li><strong>Bleeding-edge Releases:</strong> You can also download the latest, bleeding-edge version of NuMods by simply clicking "download as zip" to the right of the repository. This will download an exact copy of this branch in its current state, which may be contain bugs/other issues. This is not recommended for a production use.</li>
<li><strong>Bleeding-edge Releases:</strong> You can also download the latest, bleeding-edge version of Mods for HESK by simply clicking "download as zip" to the right of the repository. This will download an exact copy of this branch in its current state, which may be contain bugs/other issues. This is not recommended for a production use.</li>
</ol>
<h2>Installation</h2>
@ -25,18 +30,18 @@ You can download this tweak via two ways:
<ol>
<li>Download HESK from <a href="http://www.hesk.com/download.php" target="_blank">http://www.hesk.com/download.php</a>.</li>
<li>Extract the contents of HESK to a directory of your choice.</li>
<li>Download NuMods from one of the two methods described above.</li>
<li>Download Mods for HESK from one of the two methods described above.</li>
<li>Copy and paste the contents of the zip/tar.gz bundle and overwrite any files in the original HESK 2.x folder.</li>
<li>Upload the resulting folder to your webserver.</li>
<li>Go to the /install directory in your web browser and click on "Install/Update NuMods Installation"</li>
<li>Go to the /install directory in your web browser and click on "Install/Update Mods for HESK Installation"</li>
</ol>
<p>Please consult the official HESK Documentation on how to install HESK, as it is the same for both HESK and NuMods.</p>
<p>Please consult the official HESK Documentation on how to install HESK, as it is the same for both HESK and Mods for HESK.</p>
<h2>Languages</h2>
<p>As of current, only English is a supported language, as there have been several language items that have been edited/created. If you want to translate NuMods to your own language, it is recommended to download the original HESK language file for your language, and then add/edit the lines listed under <code>//Added or modified in HESK UI</code> and <code>//Added or modified in NuMods X.X.X</code> (where X.X.X is a version number) for your language.</p>
<p>If you create a translation for NuMods, please submit it via a pull request or via the PHP Junkyards forum, where it will be committed to this branch.</p>
<p>As of current, only English is a supported language, as there have been several language items that have been edited/created. If you want to translate Mods for HESK to your own language, it is recommended to download the original HESK language file for your language, and then add/edit the lines listed under <code>//Added or modified in Mods for HESK X.X.X (where X.X.X is a version number) for your language.</p>
<p>Mods for HESK translations are available at <a href="http://mods-for-hesk.mkochcs.com/download.php" target="_blank">http://mods-for-hesk.mkochcs.com/download.php</a>.</p>
<h2>Browser Compability</h2>
<h2>Browser Compatibility</h2>
<p>This list may be incomplete. Please leave a note on the PHP Junkyard forums for additional browser compatibility information.
<ul>
<li><strong>Google Chrome 33+: </strong> Compatible</li>
@ -45,10 +50,10 @@ You can download this tweak via two ways:
<li><strong>Internet Explorer 8:</strong> Partial Compatibility</li>
<li><strong>Internet Explorer 9:</strong> Compatible</li>
</ul>
<p>There are no intentions of making NuMods compatible with Internet Explorer 6 or 7, or any browser that is 2 or more major revisions older than its latest version.</p>
<p>There are no intentions of making Mods for HESK compatible with Internet Explorer 6 or 7, or any browser that is 2 or more major revisions older than its latest version.</p>
<h2>Versioning</h2>
<p>NuMods will be maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered with the following format:</p>
<p>Mods for HESK will be maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered with the following format:</p>
<code>&lt;major&gt;.&lt;minor&gt;.&lt;patch&gt;</code>
@ -63,6 +68,5 @@ You can download this tweak via two ways:
<p>For more information on SemVer, please visit http://semver.org.</p>
<h2>Credits</h2>
<p>Mike Koch - Creator of NuMods</p>
<p>Mike Koch - Creator of Mods for HESK</p>
<p>Klemen Stirn - Creator of HESK</p>
<p>lupolo from PHPJunkyard Scripts - diligent bug reporting on the PHPJunkyard Scripts Forum</p>

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -59,7 +59,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?>
<div class="row">
<div class="col-md-8 col-md-offset-2" style="padding-top: 20px">
<div class="col-md-10 col-md-offset-1" style="padding-top: 20px">
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
@ -70,12 +70,10 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
if ( ! isset($_SESSION['hide']['ticket_list']) ) //Number of tickets (table header. NOT ACTUAL TABLE)
{
echo '
<div class="row">
<div class="col-md-4">&nbsp;</div>
<div class="col-md-4" style="text-align: center"><h3>'.$hesklang['open_tickets'].'</h3></div>
<div class="col-md-4">&nbsp;</div>
</div>
';
<div class="panel panel-default">
<div class="panel-heading">
<h4>'.$hesklang['open_tickets'].' <span class="nu-floatRight" style="margin-top: -7px;"><a href="new_ticket.php" class="btn btn-success">'.$hesklang['nti'].'</a></span></h4>
</div>'; // The rest of the panel will be printed by print_tickets.inc.php
}
/* Reset default settings? */

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -251,8 +251,8 @@ $info = array(
'subject' => $ticket['subject'],
'message' => stripslashes($message),
'attachments' => $myattachments,
'dt' => hesk_date($ticket['dt']),
'lastchange' => hesk_date($ticket['lastchange']),
'dt' => hesk_date($ticket['dt'], true),
'lastchange' => hesk_date($ticket['lastchange'], true),
);
// 2. Add custom fields to the array

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -37,6 +37,7 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/email_functions.inc.php');
@ -48,7 +49,7 @@ hesk_dbConnect();
hesk_isLoggedIn();
// Check permissions for this feature
hesk_checkPermission('can_man_settings');
hesk_checkPermission('can_manage_settings');
// A security check
hesk_token_check('POST');
@ -389,7 +390,7 @@ for ($i=1;$i<=20;$i++)
$set['custom_fields'][$this_field]['maxlen'] = intval( hesk_POST('s_custom'.$i.'_maxlen', 255) );
$set['custom_fields'][$this_field]['value'] = hesk_input( hesk_POST('s_custom'.$i.'_val') );
if (!in_array($set['custom_fields'][$this_field]['type'],array('text','textarea','select','radio','checkbox')))
if (!in_array($set['custom_fields'][$this_field]['type'],array('text','textarea','select','radio','checkbox','date','multiselect')))
{
$set['custom_fields'][$this_field]['type'] = 'text';
}
@ -402,6 +403,7 @@ for ($i=1;$i<=20;$i++)
//-- Update the statuses
hesk_dbConnect();
$wasStatusDeleted = false;
//-- Get all the status IDs
$statusesSql = 'SELECT * FROM `'.$hesk_settings['db_pfix'].'statuses`';
$results = hesk_dbQuery($statusesSql);
@ -414,19 +416,7 @@ while ($row = $results->fetch_assoc())
$stmt = hesk_dbConnect()->prepare($delete);
$stmt->bind_param('i', $row['ID']);
$stmt->execute();
//-- In case we deleted a status in the middle, we now need to re-index the other IDs.
$reIndexQuery = 'SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `ID` > '.$row['ID'];
$reIndexRS = hesk_dbQuery($reIndexQuery);
//-- Update each ID by subtracting 1
$reIndexQuery = 'UPDATE `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` SET `ID` = ? WHERE `ID` = ?';
while ($row = $reIndexRS->fetch_assoc())
{
$stmt = hesk_dbConnect()->prepare($reIndexQuery);
$newID = $row['ID'] - 1;
$stmt->bind_param('ii', $newID, $row['ID']);
$stmt->execute();
}
$wasStatusDeleted = true;
} else
{
//-- Update the information in the database with what is on the page
@ -438,6 +428,16 @@ while ($row = $results->fetch_assoc())
}
}
//-- If any statuses were deleted, re-index them before adding a new one
if ($wasStatusDeleted) {
//-- First drop and re-add the ID column
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` DROP COLUMN `ID`");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` ADD `ID` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST");
//-- Since statuses should be zero-based, but are now one-based, subtract one from each ID
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` SET `ID` = `ID`-1");
}
//-- Insert the addition if there is anything to add
if ($_POST['sN_shortName'] != null && $_POST['sN_longName'] != null && $_POST['sN_textColor'] != null)
{
@ -496,8 +496,105 @@ $stmt = hesk_dbConnect()->prepare($updateQuery);
$stmt->bind_param('i', $_POST['lockedTicketStatus']);
$stmt->execute();
//-- IP Bans
$ipBanSql = hesk_dbQuery('SELECT * FROM `'.$hesk_settings['db_pfix'].'denied_ips`');
while ($row = $ipBanSql->fetch_assoc()) {
if (isset($_POST['ipDelete'][$row['ID']])) {
hesk_dbQuery('DELETE FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_ips` WHERE ID = '.hesk_dbEscape($row['ID']));
} else {
$ipAddressFrom = ip2long($_POST['ipFrom'][$row['ID']]);
$ipAddressTo = ip2long($_POST['ipTo'][$row['ID']]);
hesk_dbQuery('UPDATE `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_ips`
SET `RangeStart` = \''.hesk_dbEscape($ipAddressFrom).'\',
`RangeEnd` = \''.hesk_dbEscape($ipAddressTo).'\'
WHERE ID = '.hesk_dbEscape($row['ID']));
}
}
if (!empty($_POST['addIpFrom']) && !empty($_POST['addIpTo'])) {
$ipAddressFrom = ip2long($_POST['addIpFrom']);
$ipAddressTo = ip2long($_POST['addIpTo']);
hesk_dbQuery('INSERT INTO `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_ips` (`RangeStart`, `RangeEnd`)
VALUES (\''.hesk_dbEscape($ipAddressFrom).'\', \''.hesk_dbEscape($ipAddressTo).'\')');
}
//-- Email Bans
$emailBanSql = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_emails`');
while ($row = $emailBanSql->fetch_assoc()) {
if (isset($_POST['emailDelete'][$row['ID']])) {
hesk_dbQuery('DELETE FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_emails` WHERE ID = '.hesk_dbEscape($row['ID']));
} else {
hesk_dbQuery('UPDATE `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_emails`
SET Email = \''.hesk_dbEscape($_POST['email'][$row['ID']]).'\'
WHERE ID = '.hesk_dbEscape($row['ID']));
}
}
if (!empty($_POST['addEmail'])) {
hesk_dbQuery('INSERT INTO `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_emails` (Email) VALUES (\''.hesk_dbEscape($_POST['addEmail']).'\')');
}
$set['hesk_version'] = $hesk_settings['hesk_version'];
// Save the modsForHesk_settings.inc.php file
$set['rtl'] = empty($_POST['rtl']) ? 0 : 1;
$set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1;
$set['maintenance-mode'] = empty($_POST['maintenance-mode']) ? 0 : 1;
$set['custom-field-setting'] = empty($_POST['custom-field-setting']) ? 0 : 1;
$set['customer-email-verification-required'] = empty($_POST['email-verification']) ? 0 : 1;
if ($set['customer-email-verification-required'])
{
//-- Don't allow multiple emails if verification is required
$set['multi_eml'] = 0;
}
$set['navbarBackgroundColor'] = hesk_input(hesk_POST('navbarBackgroundColor'));
$set['navbarBrandColor'] = hesk_input(hesk_POST('navbarBrandColor'));
$set['navbarBrandHoverColor'] = hesk_input(hesk_POST('navbarBrandHoverColor'));
$set['navbarItemTextColor'] = hesk_input(hesk_POST('navbarItemTextColor'));
$set['navbarItemTextHoverColor'] = hesk_input(hesk_POST('navbarItemTextHoverColor'));
$set['navbarItemTextSelectedColor'] = hesk_input(hesk_POST('navbarItemTextSelectedColor'));
$set['navbarItemSelectedBackgroundColor'] = hesk_input(hesk_POST('navbarItemSelectedBackgroundColor'));
$set['dropdownItemTextColor'] = hesk_input(hesk_POST('dropdownItemTextColor'));
$set['dropdownItemTextHoverColor'] = hesk_input(hesk_POST('dropdownItemTextHoverColor'));
$set['questionMarkColor'] = hesk_input(hesk_POST('questionMarkColor'));
$set['dropdownItemTextHoverBackgroundColor'] = hesk_input(hesk_POST('dropdownItemTextHoverBackgroundColor'));
$modsForHesk_file_content='<?php
//-- Mods For Hesk Theme Color Settings
$modsForHesk_settings[\'navbarBackgroundColor\'] = \''.$set['navbarBackgroundColor'].'\';
$modsForHesk_settings[\'navbarBrandColor\'] = \''.$set['navbarBrandColor'].'\';
$modsForHesk_settings[\'navbarBrandHoverColor\'] = \''.$set['navbarBrandHoverColor'].'\';
$modsForHesk_settings[\'navbarItemTextColor\'] = \''.$set['navbarItemTextColor'].'\';
$modsForHesk_settings[\'navbarItemTextHoverColor\'] = \''.$set['navbarItemTextHoverColor'].'\';
$modsForHesk_settings[\'navbarItemTextSelectedColor\'] = \''.$set['navbarItemTextSelectedColor'].'\';
$modsForHesk_settings[\'navbarItemSelectedBackgroundColor\'] = \''.$set['navbarItemSelectedBackgroundColor'].'\';
$modsForHesk_settings[\'dropdownItemTextColor\'] = \''.$set['dropdownItemTextColor'].'\';
$modsForHesk_settings[\'dropdownItemTextHoverColor\'] = \''.$set['dropdownItemTextHoverColor'].'\';
$modsForHesk_settings[\'dropdownItemTextHoverBackgroundColor\'] = \''.$set['dropdownItemTextHoverBackgroundColor'].'\';
$modsForHesk_settings[\'questionMarkColor\'] = \''.$set['questionMarkColor'].'\';
//-- Set this to 1 for right-to-left text.
$modsForHesk_settings[\'rtl\'] = '.$set['rtl'].';
//-- Set this to 1 to show icons next to navigation menu items
$modsForHesk_settings[\'show_icons\'] = '.$set['show-icons'].';
//-- Set this to 1 to enable maintenance mode
$modsForHesk_settings[\'maintenance_mode\'] = '.$set['maintenance-mode'].';
//-- Set this to 1 to enable custom field names as keys
$modsForHesk_settings[\'custom_field_setting\'] = '.$set['custom-field-setting'].';
//-- Set this to 1 to enable email verification for new customers
$modsForHesk_settings[\'customer_email_verification_required\'] = '.$set['customer-email-verification-required'].';';
// Write the file
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )
{
hesk_error($hesklang['err_modsForHesk_settings']);
}
// Prepare settings file and save it
$settings_file_content='<?php
// Settings file for HESK ' . $set['hesk_version'] . '

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -63,7 +63,7 @@ if ( empty($_POST) && ! empty($_SERVER['CONTENT_LENGTH']) )
$hesk_error_buffer = array();
$tmpvar['name'] = hesk_input( hesk_POST('name') ) or $hesk_error_buffer['name']=$hesklang['enter_your_name'];
$tmpvar['email'] = hesk_validateEmail( hesk_POST('email'), 'ERR', 0) or $hesk_error_buffer['email']=$hesklang['enter_valid_email'];
$tmpvar['email'] = hesk_POST('email');
$tmpvar['category'] = intval( hesk_POST('category') ) or $hesk_error_buffer['category']=$hesklang['sel_app_cat'];
$tmpvar['priority'] = intval( hesk_POST('priority') );
@ -92,7 +92,11 @@ foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'] && isset($_POST[$k]))
{
if (is_array($_POST[$k]))
// Date will be handled by the jQuery datepicker
if( $v['type'] == 'date' && $_POST[$k] != '')
{
$tmpvar[$k] = strtotime($_POST[$k]);
} else if (is_array($_POST[$k]))
{
$tmpvar[$k]='';
foreach ($_POST[$k] as $myCB)
@ -178,7 +182,7 @@ elseif (hesk_checkPermission('can_assign_self',0) && hesk_okCategory($tmpvar['ca
}
// Notify customer of the ticket?
$notify = ! empty($_POST['notify']) ? 1 : 0;
$notify = (!empty($_POST['notify']) && !empty($tmpvar['email']) ) ? 1 : 0;
// Show ticket after submission?
$show = ! empty($_POST['show']) ? 1 : 0;

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -39,6 +39,7 @@ define('HESK_PATH','../');
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/posting_functions.inc.php');
hesk_load_database_functions();
hesk_session_start();
@ -238,54 +239,75 @@ if (isset($_POST['notemsg']) && hesk_token_check('POST'))
{
/* Add note to database */
$msg = nl2br(hesk_makeURL($msg));
hesk_dbInsertID();
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` (`ticket`,`who`,`dt`,`message`) VALUES ('".intval($ticket['id'])."','".intval($_SESSION['id'])."',NOW(),'".hesk_dbEscape($msg)."')");
$noteId = hesk_dbInsertID();
/* Notify assigned staff that a note has been added if needed */
if ($ticket['owner'] && $ticket['owner'] != $_SESSION['id'])
/* Upload attachments to database */
if ($hesk_settings['attachments']['use'])
{
require(HESK_PATH . 'inc/attachments.inc.php');
$attachments = array();
for ($i=1;$i<=$hesk_settings['attachments']['max_number'];$i++)
{
$att = hesk_uploadFile($i);
if ($att !== false && !empty($att))
{
$attachments[$i] = $att;
}
}
}
if ($hesk_settings['attachments']['use'] && !empty($attachments))
{
$res = hesk_dbQuery("SELECT `email`, `notify_note` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `id`='".intval($ticket['owner'])."' LIMIT 1");
foreach ($attachments as $myatt)
{
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` (`note_id`,`saved_name`,`real_name`,`size`) VALUES ('".hesk_dbEscape($noteId)."','".hesk_dbEscape($myatt['saved_name'])."','".hesk_dbEscape($myatt['real_name'])."','".intval($myatt['size'])."')");
}
}
if (hesk_dbNumRows($res) == 1)
{
$owner = hesk_dbFetchAssoc($res);
// 1. Generate the array with ticket info that can be used in emails
$info = array(
'email' => $ticket['email'],
'category' => $ticket['category'],
'priority' => $ticket['priority'],
'owner' => $ticket['owner'],
'trackid' => $ticket['trackid'],
'status' => $ticket['status'],
'name' => $_SESSION['name'],
'lastreplier' => $ticket['lastreplier'],
'subject' => $ticket['subject'],
'message' => stripslashes($msg),
'dt' => hesk_date($ticket['dt']),
'lastchange' => hesk_date($ticket['lastchange']),
);
// 2. Add custom fields to the array
foreach ($hesk_settings['custom_fields'] as $k => $v)
{
$info[$k] = $v['use'] ? $ticket[$k] : '';
}
// 3. Make sure all values are properly formatted for email
$ticket = hesk_ticketToPlain($info, 1, 0);
/* Notify assigned staff that a note has been added if needed */
$users = hesk_dbQuery("SELECT `email`, `notify_note` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE (`id`='".intval($ticket['owner'])."' OR (`isadmin` = '1' AND `notify_note_unassigned` = '1')) AND `id` <> '".intval($_SESSION['id'])."'");
/* Get email functions */
require(HESK_PATH . 'inc/email_functions.inc.php');
if (hesk_dbNumRows($users) > 0)
{
// 1. Generate the array with ticket info that can be used in emails
$info = array(
'email' => $ticket['email'],
'category' => $ticket['category'],
'priority' => $ticket['priority'],
'owner' => $ticket['owner'],
'trackid' => $ticket['trackid'],
'status' => $ticket['status'],
'name' => $_SESSION['name'],
'lastreplier' => $ticket['lastreplier'],
'subject' => $ticket['subject'],
'message' => stripslashes($msg),
'dt' => hesk_date($ticket['dt'], true),
'lastchange' => hesk_date($ticket['lastchange'], true),
);
// 2. Add custom fields to the array
foreach ($hesk_settings['custom_fields'] as $k => $v)
{
$info[$k] = $v['use'] ? $ticket[$k] : '';
}
/* Format email subject and message for staff */
$subject = hesk_getEmailSubject('new_note',$ticket);
$message = hesk_getEmailMessage('new_note',$ticket,1);
// 3. Make sure all values are properly formatted for email
$ticket = hesk_ticketToPlain($info, 1, 0);
/* Send email to staff */
hesk_mail($owner['email'], $subject, $message);
}
}
/* Get email functions */
require(HESK_PATH . 'inc/email_functions.inc.php');
/* Format email subject and message for staff */
$subject = hesk_getEmailSubject('new_note',$ticket);
$message = hesk_getEmailMessage('new_note',$ticket,1);
/* Send email to staff */
while ($user = hesk_dbFetchAssoc($users)) {
hesk_mail($user['email'], $subject, $message);
}
}
}
header('Location: admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999));
exit();
@ -309,6 +331,51 @@ if ( ($can_reply || $can_edit) && isset($_POST['h']) && isset($_POST['m']) && is
hesk_process_messages($hesklang['twu'],'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999),'SUCCESS');
}
/* Add child action */
if (($can_reply || $can_edit) && isset($_POST['childTrackingId'])) {
//-- Make sure this isn't the same ticket or one of its merged tickets.
$mergedTickets = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` WHERE `trackid` =
\''.hesk_dbEscape($trackingID).'\' AND `merged` LIKE \'%#'.hesk_dbEscape($_POST['childTrackingId']).'#%\'');
if ($_POST['childTrackingId'] == $trackingID || $mergedTickets->num_rows > 0) {
hesk_process_messages($hesklang['child_is_itself'], 'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999));
}
//-- Does the child exist?
$existRs = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` WHERE `trackid` = \''.hesk_dbEscape($_POST['childTrackingId']).'\'');
if ($existRs->num_rows == 0) {
//-- Maybe it was merged?
$existRs = hesk_dbQuery('SELECT `trackid` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` WHERE `merged` LIKE \'#'.hesk_dbEscape($_POST['childTrackingId']).'#\'');
if ($existRs->num_rows > 0) {
//-- Yes, it was merged. Set the child to the "new" ticket; not the merged one.
$exist = $existRs->fetch_assoc();
$_POST['childTrackingId'] = $exist['trackid'];
} else {
hesk_process_messages(sprintf($hesklang['child_does_not_exist'], $_POST['childTrackingId']), 'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999));
}
}
//-- Check if the ticket is already a child.
$childRs = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` WHERE `parent` = '.$ticket['id'].' AND `trackid` = \''.$_POST['childTrackingId'].'\'');
if ($childRs->num_rows > 0) {
hesk_process_messages(sprintf($hesklang['is_child_already'], $_POST['childTrackingId']), 'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999), 'NOTICE');
}
hesk_dbQuery('UPDATE `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` SET `parent` = '.$ticket['id'].' WHERE `trackid` = \''.$_POST['childTrackingId'].'\'');
hesk_process_messages(sprintf($hesklang['child_added'], $_POST['childTrackingId']), 'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999), 'SUCCESS');
}
/* Delete child action */
if (($can_reply || $can_edit) && isset($_GET['deleteChild'])) {
//-- Delete the relationship
hesk_dbQuery('UPDATE `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` SET `parent` = NULL WHERE `ID` = '.hesk_dbEscape($_GET['deleteChild']));
hesk_process_messages($hesklang['relationship_deleted'], 'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999), 'SUCCESS');
} elseif (($can_reply || $can_edit) && isset($_GET['deleteParent'])) {
//-- Delete the relationship
hesk_dbQuery('UPDATE `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` SET `parent` = NULL WHERE `ID` = '.hesk_dbEscape($ticket['id']));
hesk_process_messages($hesklang['relationship_deleted'], 'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999), 'SUCCESS');
}
/* Delete attachment action */
if (isset($_GET['delatt']) && hesk_token_check())
{
@ -360,6 +427,63 @@ if (isset($_GET['delatt']) && hesk_token_check())
hesk_process_messages($hesklang['kb_att_rem'],'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999),'SUCCESS');
}
/* Delete note attachment option */
if (isset($_GET['delete-note-att']) && hesk_token_check()) {
if ( ! $can_delete || ! $can_edit)
{
hesk_process_messages($hesklang['no_permission'],'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999));
}
$att_id = intval( hesk_GET('delete-note-att') ) or hesk_error($hesklang['inv_att_id']);
$reply = intval( hesk_GET('reply', 0) );
if ($reply < 1)
{
$reply = 0;
}
/* Get attachment info */
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` WHERE `att_id`='".intval($att_id)."' LIMIT 1");
if (hesk_dbNumRows($res) != 1)
{
hesk_process_messages($hesklang['id_not_valid'].' (att_id)','admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999));
}
$att = hesk_dbFetchAssoc($res);
/* Is note ID valid for this attachment? */
if (!isset($_GET['note_id']) || $att['note_id'] != $_GET['note_id'])
{
hesk_process_messages($hesklang['trackID_not_found'],'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999));
}
/* Delete file from server */
hesk_unlink(HESK_PATH.$hesk_settings['attach_dir'].'/'.$att['saved_name']);
/* Delete attachment from database */
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` WHERE `att_id`='".intval($att_id)."'");
hesk_process_messages($hesklang['kb_att_rem'],'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999),'SUCCESS');
}
if (isset($_POST['note_message'])) {
$n = $_POST['note_id'];
if ($can_del_notes)
{
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."notes`
SET `edit_date` = NOW(), `message` = '".hesk_dbEscape($_POST['note_message'])."', `number_of_edits` = `number_of_edits` + 1
WHERE `id`='".intval($n)."' LIMIT 1");
}
else
{
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."notes`
SET `edit_date` = NOW(), `message` = '".hesk_dbEscape($_POST['note_message'])."', `number_of_edits` = `number_of_edits` + 1
WHERE `id`='".intval($n)."' AND `who`='".intval($_SESSION['id'])."' LIMIT 1");
}
hesk_process_messages($hesklang['note_edit_successful'],'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999),'SUCCESS');
}
/* Print header */
require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
@ -368,13 +492,14 @@ $result = hesk_dbQuery("SELECT `id`,`name` FROM `".hesk_dbEscape($hesk_settings[
$categories_options='';
while ($row=hesk_dbFetchAssoc($result))
{
if ($row['id'] == $ticket['category']) {continue;}
$categories_options.='<option value="'.$row['id'].'">'.$row['name'].'</option>';
$selected = '';
if ($row['id'] == $ticket['category']) {$selected='selected';}
$categories_options.='<option value="'.$row['id'].'" '.$selected.'>'.$row['name'].'</option>';
}
/* List of users */
$admins = array();
$result = hesk_dbQuery("SELECT `id`,`name`,`isadmin`,`categories`,`heskprivileges` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` ORDER BY `id` ASC");
$result = hesk_dbQuery("SELECT `id`,`name`,`isadmin`,`categories`,`heskprivileges` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `active` = '1' ORDER BY `id` ASC");
while ($row=hesk_dbFetchAssoc($result))
{
/* Is this an administrator? */
@ -443,11 +568,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</li>
<li class="list-group-item">
<strong><?php echo $hesklang['created_on']; ?></strong><br/>
<?php echo hesk_date($ticket['dt']); ?>
<?php echo hesk_date($ticket['dt'], true); ?>
</li>
<li class="list-group-item">
<strong><?php echo $hesklang['last_update']; ?></strong><br/>
<?php echo hesk_date($ticket['lastchange']); ?>
<?php echo hesk_date($ticket['lastchange'], true); ?>
</li>
<li class="list-group-item">
<strong><?php echo $hesklang['last_replier']; ?></strong><br/>
@ -500,6 +625,57 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
}
?>
</li>
<li class="list-group-item">
<strong><?php echo $hesklang['parent']; ?></strong>
<p><?php
if ($ticket['parent'] != null) {
//-- Get the tracking ID of the parent
$parent = hesk_dbQuery('SELECT `trackid` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets`
WHERE `ID` = '.hesk_dbEscape($ticket['parent']))->fetch_assoc();
echo '<a href="admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999).'&deleteParent=true">
<i class="fa fa-times-circle" data-toggle="tooltip" data-placement="top" title="'.$hesklang['delete_relationship'].'"></i></a>';
echo '&nbsp;<a href="admin_ticket.php?track='.$parent['trackid'].'&Refresh='.mt_rand(10000,99999).'">'.$parent['trackid'].'</a>';
} else {
echo $hesklang['none'];
}
?></p>
</li>
<li class="list-group-item">
<strong><?php echo $hesklang['children']; ?></strong>
<p><?php
//-- Check if any tickets have a parent set to this tracking ID
$hasRows = false;
$childrenRS = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets`
WHERE `parent` = '.hesk_dbEscape($ticket['id']));
while ($row = $childrenRS->fetch_assoc()) {
$hasRows = true;
echo '<a href="admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999).'&deleteChild='.$row['id'].'">
<i class="fa fa-times-circle" data-toggle="tooltip" data-placement="top" title="'.$hesklang['delete_relationship'].'"></i></a>';
echo '&nbsp;<a href="admin_ticket.php?track='.$row['trackid'].'&Refresh='.mt_rand(10000,99999).'">'.$row['trackid'].'</a>';
echo '<br>';
}
if (!$hasRows) {
echo $hesklang['none'];
}
?></p>
<?php
if ($can_reply || $can_edit) {
?>
<div id="addChildText"><p><?php echo '<a class="btn btn-default btn-sm" href="javascript:void(0)" onclick="toggleChildrenForm(true)">'.$hesklang['add_child'].'</a>'; ?></p></div>
<div id="childrenForm" style="display: none">
<form action="admin_ticket.php" method="post">
<div class="form-group"><label for="childTrackingId" class="control-label">Tracking ID</label>
<input type="text" name="childTrackingId" class="form-control input-sm"></div>
<input type="submit" class="btn btn-primary btn-sm" value="<?php echo $hesklang['save']; ?>">
<a class="btn btn-default btn-sm" href="javascript:void(0)" onclick="toggleChildrenForm(false)">
<?php echo $hesklang['cancel']; ?>
</a>
<input type="hidden" name="track" value="<?php echo $trackingID; ?>" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
</form>
</div>
<?php } ?>
</li>
</ul>
</div>
</div>
@ -514,12 +690,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
echo hesk_getAdminButtons();
?>
<div class="blankSpace"></div>
<!-- BEGIN TICKT HEAD -->
<table class="table table-bordered">
<tbody>
<tr>
<td colspan="20" style="border-bottom: 0px">
<h3>
<!-- BEGIN TICKET HEAD -->
<div class="table-bordered">
<div class="row">
<div class="col-md-12">
<h3>
<?php
if ($ticket['archive'])
{
@ -531,12 +706,17 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
}
echo $ticket['subject'];
?></h3>
</td>
</tr>
<tr>
<td colspan="10" style="border-width: 0px"><?php echo $hesklang['created_on'].': '.hesk_date($ticket['dt']); ?>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $hesklang['last_update'].': '.hesk_date($ticket['lastchange']); ?></td>
<td colspan="10" style="border-width: 0px; text-align: right">
<?php
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-12" style="padding-top: 6px">
<p><?php echo $hesklang['created_on'].': '.hesk_date($ticket['dt']); ?></p>
</div>
<div class="col-md-3 col-sm-12" style="padding-top: 6px">
<p><?php echo $hesklang['last_update'].': '.hesk_date($ticket['lastchange']); ?></p>
</div>
<div class="col-md-6 col-sm-12 close-ticket">
<?php
$random=rand(10000,99999);
$statusSql = 'SELECT `ID`, `ShortNameContentKey`, `IsStaffClosedOption`, `IsStaffReopenedStatus` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsStaffClosedOption` = 1 OR `IsStaffReopenedStatus` = 1';
@ -558,183 +738,258 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
$isTicketClosedRow = hesk_dbQuery($isTicketClosedSql)->fetch_assoc();
$isTicketClosed = $isTicketClosedRow['IsClosed'];
echo '<div class="btn-group" role="group">';
if ($isTicketClosed == 0) // Ticket is still open
{
echo '<a
href="change_status.php?track='.$trackingID.'&amp;s='.$staffClosedOptionStatus['ID'].'&amp;Refresh='.$random.'&amp;token='.hesk_token_echo(0).'">'.$hesklang['close_action'].'</a>';
class="btn btn-default btn-sm" href="change_status.php?track='.$trackingID.'&amp;s='.$staffClosedOptionStatus['ID'].'&amp;Refresh='.$random.'&amp;token='.hesk_token_echo(0).'">
<i class="fa fa-check-circle"></i> '.$hesklang['close_action'].'</a>';
}
else
{
echo '<a
href="change_status.php?track='.$trackingID.'&amp;s='.$staffReopenedStatus['ID'].'&amp;Refresh='.$random.'&amp;token='.hesk_token_echo(0).'">'.$hesklang['open_action'].'</a>';
class="btn btn-default btn-sm" href="change_status.php?track='.$trackingID.'&amp;s='.$staffReopenedStatus['ID'].'&amp;Refresh='.$random.'&amp;token='.hesk_token_echo(0).'">
<i class="fa fa-check-circle"></i> '.$hesklang['open_action'].'</a>';
}
?>
</td>
</tr>
<tr>
<td colspan="20" style="border-width: 0px">
<b><i><?php echo $hesklang['notes']; ?>: </i></b>
<?php
if ($can_reply)
{
?>
&nbsp; <a href="Javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('notesform')"><?php echo $hesklang['addnote']; ?></a>
<?php
}
?>
<div id="notesform" style="display:none">
<form method="post" action="admin_ticket.php" style="margin:0px; padding:0px;">
<textarea class="form-control" name="notemsg" rows="6" cols="60"></textarea><br />
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['s']; ?>" /><input type="hidden" name="track" value="<?php echo $trackingID; ?>" />
<i><?php echo $hesklang['nhid']; ?></i>
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
</form>
</div>
</td>
</tr>
<?php
$res = hesk_dbQuery("SELECT t1.*, t2.`name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` AS t1 LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."users` AS t2 ON t1.`who` = t2.`id` WHERE `ticket`='".intval($ticket['id'])."' ORDER BY t1.`id` " . ($hesk_settings['new_top'] ? 'DESC' : 'ASC') );
while ($note = hesk_dbFetchAssoc($res))
{
?>
<tr>
<td colspan="20" class="notes" style="padding: 10px; border: #ffe6b8 1px solid">
<?php if ($can_del_notes || $note['who'] == $_SESSION['id']) { ?><p><a href="admin_ticket.php?track=<?php echo $trackingID; ?>&amp;Refresh=<?php echo mt_rand(10000,99999); ?>&amp;delnote=<?php echo $note['id']; ?>&amp;token=<?php hesk_token_echo(); ?>" onclick="return hesk_confirmExecute('<?php echo hesk_makeJsString($hesklang['delnote']).'?'; ?>');"><i class="fa fa-times"></i> Delete Note</a></p><?php }?>
<p><i><?php echo $hesklang['noteby']; ?> <b><?php echo ($note['name'] ? $note['name'] : $hesklang['e_udel']); ?></b></i> - <?php echo hesk_date($note['dt']); ?></p>
<p><?php echo $note['message']; ?></p>
</td>
</tr>
$linkText = 'new_ticket.php?name='.$ticket['name'].'&email='.$ticket['email'].'&catid='.$category['id'].'&priority='.$ticket['priority'];
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'] == 1)
{
if ($v['type'] == 'checkbox')
{
$value = str_replace('<br />', '-CHECKBOX-', $ticket[$k]);
} else {
$value = $ticket[$k];
}
$linkText .= '&c_'.$k.'='.$value;
}
}
echo '<a class="btn btn-default btn-sm" href="'.$linkText.'">
<i class="fa fa-plus"></i> '.$hesklang['create_based_on_contact'].'
</a>';
echo '</div>';
?>
</div>
</div>
<div class="row medLowPriority">
<?php
}
?>
<tr class="medLowPriority">
<?php
$hesk_settings['ticketColumnWidth'] = 5;
$options = array(
0 => '<option value="0">'.$hesklang['critical'].'</option>',
1 => '<option value="1">'.$hesklang['high'].'</option>',
2 => '<option value="2">'.$hesklang['medium'].'</option>',
3 => '<option value="3">'.$hesklang['low'].'</option>'
);
$priorityLanguages = array(
0 => $hesklang['critical'],
1 => $hesklang['high'],
2 => $hesklang['medium'],
3 => $hesklang['low']
);
$options = array();
for ($i = 0; $i < 4; $i++) {
$selected = $ticket['priority'] == $i ? 'selected' : '';
array_push($options, '<option value="'.$i.'" '.$selected.'>'.$priorityLanguages[$i].'</option>');
}
echo '<div class="ticket-cell-admin col-md-3 col-sm-12 ';
if ($ticket['priority'] == 0) {echo 'criticalPriority">';}
elseif ($ticket['priority'] == 1) {echo 'highPriority">';}
else {echo 'medLowPriority">';}
echo '<p class="ticketPropertyTitle">'.$hesklang['priority'].'</p>';
echo '<form style="margin-bottom:0;" id="changePriorityForm" action="priority.php" method="post">
<span style="white-space:nowrap;">
<select class="form-control" name="priority" onchange="document.getElementById(\'changePriorityForm\').submit();">';
echo implode('',$options);
echo '
</select>
<input type="submit" style="display: none" value="'.$hesklang['go'].'" /><input type="hidden" name="track" value="'.$trackingID.'" />
<input type="hidden" name="token" value="'.hesk_token_echo(0).'" />
</span>
</form>
</div>';
echo '<div class="col-md-3 col-sm-12 ticket-cell-admin"><p class="ticketPropertyTitle">'.$hesklang['status'].'</p>';
$status_options = array();
$results = hesk_dbQuery("SELECT `ID`, `ShortNameContentKey` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses`");
while ($row = $results->fetch_assoc())
{
$selected = $ticket['status'] == $row['ID'] ? 'selected' : '';
$status_options[$row['ID']] = '<option value="'.$row['ID'].'" '.$selected.'>'.$hesklang[$row['ShortNameContentKey']].'</option>';
}
echo '
<form role="form" id="changeStatusForm" style="margin-bottom:0;" action="change_status.php" method="post">
<span style="white-space:nowrap;">
<select class="form-control" onchange="document.getElementById(\'changeStatusForm\').submit();" name="s">
' . implode('', $status_options) . '
</select>
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'" ';
if ($ticket['priority'] == 0) {echo 'class="criticalPriority">';}
elseif ($ticket['priority'] == 1) {echo 'class="highPriority">';}
else {echo 'class="medLowPriority">';}
<input type="submit" style="display:none;" value="'.$hesklang['go'].'" class="btn btn-default" /><input type="hidden" name="track" value="'.$trackingID.'" />
<input type="hidden" name="token" value="'.hesk_token_echo(0).'" />
</span>
</form>
</div>';
echo '<div class="col-md-3 col-sm-12 ticket-cell-admin"><p class="ticketPropertyTitle">'.$hesklang['owner'].'</p>';
echo '<p class="ticketPropertyTitle">'.$hesklang['priority'].'</p>';
if (hesk_checkPermission('can_assign_others',0))
{
echo'
<form style="margin-bottom:0;" id="changeOwnerForm" action="assign_owner.php" method="post">
<span style="white-space:nowrap;">
<select class="form-control" name="owner" onchange="document.getElementById(\'changeOwnerForm\').submit();">';
$selectedForUnassign = 'selected';
foreach ($admins as $k=>$v)
{
$selected = '';
if ($k == $ticket['owner']) {
$selectedForUnassign = '';
$selected = 'selected';
}
echo '<option value="'.$k.'" '.$selected.'>'.$v.'</option>';
}
echo '<option value="-1" '.$selectedForUnassign.'> &gt; '.$hesklang['unas'].' &lt; </option>';
echo '</select>
<input type="submit" style="display: none" value="'.$hesklang['go'].'" class="orangebutton" onmouseover="hesk_btn(this,\'orangebuttonover\');" onmouseout="hesk_btn(this,\'orangebutton\');" />
<input type="hidden" name="track" value="'.$trackingID.'" />
<input type="hidden" name="token" value="'.hesk_token_echo(0).'" />
</span>';
} else
{
echo '<p class="ticketPropertyText">';
echo isset($admins[$ticket['owner']]) ? $admins[$ticket['owner']] :
($can_assign_self ? $hesklang['unas'].' [<a href="assign_owner.php?track='.$trackingID.'&amp;owner='.$_SESSION['id'].'&amp;token='.hesk_token_echo(0).'">'.$hesklang['asss'].'</a>]' : $hesklang['unas']);
echo '</p>';
}
echo '</form></div>';
echo '<div class="col-md-3 col-sm-12 ticket-cell-admin"><p class="ticketPropertyTitle">'.$hesklang['category'].'</p>';
if ($can_change_cat)
{
echo '
if ($ticket['priority']==0) {echo '<p class="ticketPropertyText">'.$hesklang['critical'].'</p>';}
elseif ($ticket['priority']==1) {echo '<p class="ticketPropertyText">'.$hesklang['high'].'</p>';}
elseif ($ticket['priority']==2) {echo '<p class="ticketPropertyText">'.$hesklang['medium'].'</p>';}
else {echo '<p class="ticketPropertyText">'.$hesklang['low'].'</p>';}
echo '<br/>
<form style="margin-bottom:0;" id="changePriorityForm" action="priority.php" method="post">
<form style="margin-bottom:0;" id="changeCategory" action="move_category.php" method="post">
<span style="white-space:nowrap;">
<select class="form-control" name="priority" onchange="document.getElementById(\'changePriorityForm\').submit();">
<option value="-1" selected="selected">'.$hesklang['priorityChange'].'</option>
';
echo implode('',$options);
echo '
<select name="category" class="form-control" onchange="document.getElementById(\'changeCategory\').submit();">
'.$categories_options.'
</select>
<input type="submit" style="display: none" value="'.$hesklang['go'].'" /><input type="hidden" name="track" value="'.$trackingID.'" />
<input type="hidden" name="token" value="'.hesk_token_echo(0).'" />
</span>
</form>';
} else
{
echo '<p class="ticketPropertyText">'.$category['name'].'</p>';
}
echo '</div>';
?>
</div>
</div>
<?php
$res = hesk_dbQuery("SELECT t1.*, t2.`name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` AS t1 LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."users` AS t2 ON t1.`who` = t2.`id` WHERE `ticket`='".intval($ticket['id'])."' ORDER BY t1.`id` " . ($hesk_settings['new_top'] ? 'DESC' : 'ASC') );
while ($note = hesk_dbFetchAssoc($res))
{
?>
<div class="row">
<div class="col-md-12 alert-warning" style="padding-top: 5px;">
<?php if ($can_del_notes || $note['who'] == $_SESSION['id']) { ?>
<div class="btn-group btn-group-sm float-right-sm" role="group" style="padding-top: 5px; padding-bottom: 5px;">
<a class="btn btn-danger"
href="admin_ticket.php?track=<?php echo $trackingID; ?>&amp;Refresh=<?php echo mt_rand(10000,99999); ?>&amp;delnote=<?php echo $note['id']; ?>&amp;token=<?php hesk_token_echo(); ?>" onclick="return hesk_confirmExecute('<?php echo hesk_makeJsString($hesklang['delnote']).'?'; ?>');">
<i class="fa fa-times"></i> <?php echo $hesklang['delete']; ?>
</a>&nbsp;
<a class="btn btn-warning"
href="javascript:void(0)" onclick="toggleNote(<?php echo $note['id']; ?>, true)">
<i class="fa fa-pencil"></i> <?php echo $hesklang['edit']; ?>
</a>
</div>
<?php }?>
<p><i><?php echo $hesklang['noteby']; ?> <b><?php echo ($note['name'] ? $note['name'] : $hesklang['e_udel']); ?></b></i> - <?php echo hesk_date($note['dt']); ?></p>
<div class="row" style="margin-top: 23px;">
<div class="col-md-7">
<p id="note-<?php echo $note['id']; ?>-p"><?php echo $note['message']; ?></p>
<form style="display: none" id="note-<?php echo $note['id']; ?>-form" role="form" method="post"
action="admin_ticket.php?track=<?php echo $trackingID; ?>&amp;Refresh=<?php echo mt_rand(10000,99999); ?>&amp;token=<?php hesk_token_echo(); ?>">
<textarea style="margin-bottom: 5px;" class="form-control" id="note-<?php echo $note['id']; ?>-textarea" name="note_message"><?php echo $note['message']; ?></textarea>
<input type="hidden" name="note_id" value="<?php echo $note['id']; ?>">
<button style="margin-bottom: 5px;" class="btn btn-success btn-sm" type="submit"><i class="fa fa-check"></i> <?php echo $hesklang['save']; ?></button>
<a style="margin-bottom: 5px;" class="btn btn-danger btn-sm" href="javascript:void(0)" onclick="toggleNote(<?php echo $note['id']; ?>, false)">
<i class="fa fa-times"></i> <?php echo $hesklang['cancel']; ?>
</a>
</form>
</td>';
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['status'].'</p>';
$status_options = array();
$results = hesk_dbQuery("SELECT `ID`, `ShortNameContentKey` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses`");
while ($row = $results->fetch_assoc())
{
$status_options[$row['ID']] = '<option value="'.$row['ID'].'">'.$hesklang[$row['ShortNameContentKey']].'</option>';
}
</div>
<div class="col-md-4">
<?php
$noteAttachmentRS = hesk_dbQuery("SELECT `att_id`, `real_name`, `note_id` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` WHERE `note_id` = ".intval($note['id']));
while ($noteAttachment = hesk_dbFetchAssoc($noteAttachmentRS)) {
echo '<a href="admin_ticket.php?delete-note-att='.$noteAttachment['att_id'].'&amp;note_id='.$noteAttachment['note_id'].'&amp;track='.$trackingID.'&amp;'.$tmp.'&amp;Refresh='.mt_rand(10000,99999).'&amp;token='.hesk_token_echo(0).'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['pda']).'\');"><i class="fa fa-times" style="color: #FF0000"></i></a>
<a href="../download_attachment.php?att_id='.$noteAttachment['att_id'].'&amp;note='.$noteAttachment['note_id'].'"><i class="fa fa-paperclip"></i></a>
<a href="../download_attachment.php?att_id='.$noteAttachment['att_id'].'&amp;note='.$noteAttachment['note_id'].'">'.$noteAttachment['real_name'].'</a><br />';
} ?>
</div>
</div>
<?php if ($note['number_of_edits'] > 0) { ?>
<p><i><?php echo sprintf($hesklang['note_last_edit'], hesk_date($note['edit_date'])); echo ' | '.sprintf($hesklang['total_number_of_edits'], $note['number_of_edits']); ?></i></p>
<?php } ?>
</div>
</div>
<?php
}
?>
<div class="row">
<div class="col-md-12">
<?php
if ($can_reply)
{
?>
&nbsp; <a href="Javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('notesform')"><i class="fa fa-plus"></i> <?php echo $hesklang['addnote']; ?></a>
<?php
}
?>
$ticketStatus = hesk_dbFetchAssoc(hesk_dbQuery("SELECT `TicketViewContentKey` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE ID = " .$ticket['status']));
echo '<p class="ticketPropertyText">'.$hesklang[$ticketStatus['TicketViewContentKey']].'</p>';
echo '<br/>
<form role="form" id="changeStatusForm" style="margin-bottom:0;" action="change_status.php" method="post">
<span style="white-space:nowrap;">
<select class="form-control" onchange="document.getElementById(\'changeStatusForm\').submit();" name="s">
<option value="-1" selected="selected">'.$hesklang['statusChange'].'</option>
' . implode('', $status_options) . '
</select>
<input type="submit" style="display:none;" value="'.$hesklang['go'].'" class="btn btn-default" /><input type="hidden" name="track" value="'.$trackingID.'" />
<input type="hidden" name="token" value="'.hesk_token_echo(0).'" />
</span>
</form>
</td>';
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['owner'].'</p>
<p class="ticketPropertyText">';
echo isset($admins[$ticket['owner']]) ? $admins[$ticket['owner']] :
($can_assign_self ? $hesklang['unas'].' [<a href="assign_owner.php?track='.$trackingID.'&amp;owner='.$_SESSION['id'].'&amp;token='.hesk_token_echo(0).'">'.$hesklang['asss'].'</a>]' : $hesklang['unas']);
echo '</p><br/>';
if (hesk_checkPermission('can_assign_others',0))
{
echo'
<form style="margin-bottom:0;" id="changeOwnerForm" action="assign_owner.php" method="post">
<span style="white-space:nowrap;">
<select class="form-control" name="owner" onchange="document.getElementById(\'changeOwnerForm\').submit();">
<option value="" selected="selected">'.$hesklang['ownerChange'].'</option>';
if ($ticket['owner'])
<div id="notesform" style="display:none">
<form method="post" action="admin_ticket.php" style="margin:0px; padding:0px;" enctype="multipart/form-data">
<div class="row" style="margin-bottom: 10px;">
<div class="col-md-7">
<h5><?php echo $hesklang['message']; ?></h5>
<div class="footerWithBorder" style="margin-bottom: 10px;"></div>
<textarea class="form-control" name="notemsg" rows="6" cols="60"></textarea>
</div>
<div class="col-md-5">
<h5><?php echo $hesklang['attachments']; ?></h5>
<div class="footerWithBorder" style="margin-bottom: 10px;"></div>
<span style="display: none" id="number-of-file-dialogs">2</span>
<div id="files-for-notes">
<?php for ($i=1;$i<=$hesk_settings['attachments']['max_number'];$i++)
{
echo '<option value="-1"> &gt; '.$hesklang['unas'].' &lt; </option>';
echo '<input type="file" name="attachment['.$i.']" size="50" /><br />';
}
foreach ($admins as $k=>$v)
{
if ($k != $ticket['owner'])
{
echo '<option value="'.$k.'">'.$v.'</option>';
}
}
echo '</select>
<input type="submit" style="display: none" value="'.$hesklang['go'].'" class="orangebutton" onmouseover="hesk_btn(this,\'orangebuttonover\');" onmouseout="hesk_btn(this,\'orangebutton\');" />
<input type="hidden" name="track" value="'.$trackingID.'" />
<input type="hidden" name="token" value="'.hesk_token_echo(0).'" />
</span>';
}
echo '</form></td>';
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['category'].'</p>
<p class="ticketPropertyText">'.$category['name'].'</p>';
if ($can_change_cat)
{
echo '
<br/>
<form style="margin-bottom:0;" id="changeCategory" action="move_category.php" method="post">
<span style="white-space:nowrap;">
<select name="category" class="form-control" onchange="document.getElementById(\'changeCategory\').submit();">
<option value="-1" selected="selected">'.$hesklang['categoryChange'].'</option>
'.$categories_options.'
</select>
<input type="submit" style="display: none" value="'.$hesklang['go'].'" /><input type="hidden" name="track" value="'.$trackingID.'" />
<input type="hidden" name="token" value="'.hesk_token_echo(0).'" />
</span>
</form>'; }
echo '</td>';
?>
</tr>
</tbody>
</table>
echo '<a href="Javascript:void(0)" onclick="Javascript:hesk_window(\'../file_limits.php\',250,500);return false;">' . $hesklang['ful'] . '</a>';
?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['s']; ?>" /><input type="hidden" name="track" value="<?php echo $trackingID; ?>" />
<i><?php echo $hesklang['nhid']; ?></i>
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
</div>
</div>
</form>
</div>
</div>
</div>
<div class="blankSpace"></div>
<!-- END TICKET HEAD -->
<?php
@ -765,7 +1020,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<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"><?php echo $hesklang['ip']; ?>: <?php echo $ticket['ip']; ?></div>
<div class="ticketEmail"><?php echo $hesklang['ip']; ?>: <?php echo '<a href="http://whois.domaintools.com/'.$ticket['ip'].'">'.$ticket['ip'].'</a>'; ?></div>
</div>
<div class="col-md-9 col-xs-12 pushMarginLeft">
<div class="ticketMessageTop withBorder">
@ -773,7 +1028,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<?php echo hesk_getAdminButtonsInTicket(0, $i); ?>
<!-- Date -->
<p><br/><?php echo $hesklang['date']; ?>: <?php echo hesk_date($ticket['dt']); ?>
<p><br/><?php echo $hesklang['date']; ?>: <?php echo hesk_date($ticket['dt'], true); ?>
<!-- Custom Fields Before Message -->
<?php
@ -781,8 +1036,21 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
if ($v['use'] && $v['place']==0)
{
echo '
<p>'.$v['name'].': '.$ticket[$k].'</p>';
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
echo '<p>'.$v['name'].': ';
if ($v['type'] == 'date' && !empty($ticket[$k]))
{
$dt = date('Y-m-d h:i:s', $ticket[$k]);
echo hesk_dateToString($dt, 0);
} else
{
echo $ticket[$k];
}
echo '</p>';
}
}
?>
@ -799,8 +1067,21 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
if ($v['use'] && $v['place'])
{
echo '
<p>'.$v['name'].': '.$ticket[$k].'</p>';
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
echo '<p>'.$v['name'].': ';
if ($v['type'] == 'date' && !empty($ticket[$k]))
{
$dt = date('Y-m-d h:i:s', $ticket[$k]);
echo hesk_dateToString($dt, 0);
} else
{
echo $ticket[$k];
}
echo '</p>';
}
}
/* Attachments */
@ -970,7 +1251,7 @@ function hesk_getAdminButtonsInTicket($reply=0,$white=1)
{
global $hesk_settings, $hesklang, $ticket, $reply, $trackingID, $can_edit, $can_archive, $can_delete;
$options = '<div class="btn-group" style="width: 70%; text-align: right; margin-left: auto; margin-right: auto">';
$options = '<div class="btn-group text-right" style="width: 70%; margin-left: auto; margin-right: auto">';
/* Style and mousover/mousout */
$tmp = $white ? 'White' : 'Blue';
@ -1100,7 +1381,7 @@ function hesk_printTicketReplies() {
{
$color = 'class="ticketMessageContainer"';
$reply['dt'] = hesk_date($reply['dt']);
$reply['dt'] = hesk_date($reply['dt'], true);
?>
<div class="row ticketMessageContainer">
<div class="col-md-3 col-xs-12">
@ -1153,7 +1434,7 @@ function hesk_printReplyForm() {
?>
<!-- START REPLY FORM -->
<h3 style="text-align: left"><?php echo $hesklang['add_reply']; ?></h3>
<h3 class="text-left"><?php echo $hesklang['add_reply']; ?></h3>
<div class="footerWithBorder"></div>
<div class="blankSpace"></div>
@ -1179,7 +1460,7 @@ function hesk_printReplyForm() {
<div class="col-sm-6">
<input type="text" class="form-control" name="time_worked" id="time_worked" size="10" value="<?php echo ( isset($_SESSION['time_worked']) ? hesk_getTime($_SESSION['time_worked']) : '00:00:00'); ?>" />
</div>
<div class="col-sm-3" style="text-align: right">
<div class="col-sm-3 text-right">
<input type="button" class="btn btn-success" onclick="ss()" id="startb" value="<?php echo $hesklang['start']; ?>" />
<input type="button" class="btn btn-danger" onclick="r()" value="<?php echo $hesklang['reset']; ?>" />
</div>
@ -1262,8 +1543,12 @@ function hesk_printReplyForm() {
</select></div><br />
<label><input type="checkbox" name="signature" value="1" checked="checked" /> <?php echo $hesklang['attach_sign']; ?></label>
(<a href="profile.php"><?php echo $hesklang['profile_settings']; ?></a>)<br />
<label><input type="checkbox" name="no_notify" value="1" /> <?php echo $hesklang['dsen']; ?></label><br/><br/>
<?php if (empty($ticket['email'])) { ?>
<label><input type="checkbox" name="no_notify" value="1" checked="checked" disabled> <?php echo $hesklang['dsen']; ?></label><br/><br/>
<input type="hidden" name="no_notify" value="1">
<?php } else { ?>
<label><input type="checkbox" name="no_notify" value="1" <?php if (!$_SESSION['default_notify_customer_email']) { echo 'checked'; } ?>> <?php echo $hesklang['dsen']; ?></label><br/><br/>
<?php } ?>
<input type="hidden" name="orig_id" value="<?php echo $ticket['id']; ?>" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['submit_reply']; ?>" />

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -74,6 +74,13 @@ if ( ! isset($status_options[$status]))
$locked = 0;
// Ticket info
$result = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `trackid`='".hesk_dbEscape($trackingID)."' LIMIT 1");
if (hesk_dbNumRows($result) != 1) {
hesk_error($hesklang['ticket_not_found']);
}
$ticket = hesk_dbFetchAssoc($result);
$statusRow = hesk_dbFetchAssoc(hesk_dbQuery("SELECT `ID`, `IsClosed` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE ID = ".$status));
if ($statusRow['IsClosed']) // Closed
{
@ -84,6 +91,14 @@ if ($statusRow['IsClosed']) // Closed
{
$locked = 1;
}
// Notify customer
require(HESK_PATH . 'inc/email_functions.inc.php');
if (!empty($ticket['email']))
{
hesk_notifyCustomer('ticket_closed');
}
}
elseif ($statusRow['ID'] != 0) //Ticket is still open, but not new
{
@ -96,6 +111,16 @@ else // Ticket is marked as "NEW"
$revision = sprintf($hesklang['thist4'],hesk_date(),$_SESSION['name'].' ('.$_SESSION['user'].')');
}
//-- Notify staff after ticket re-open?
$currentStatusRS = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `ID` = '.$ticket['status']);
$currentStatus = hesk_dbFetchAssoc($currentStatusRS);
if (intval($currentStatus['IsClosed']) == 1 && $statusRow['IsClosed'] == 0 && $ticket['owner'] != $_SESSION['id']) {
$ticket['name'] = $_SESSION['name'];
require(HESK_PATH . 'inc/email_functions.inc.php');
hesk_notifyAssignedStaff(false, 'ticket_reopen_assigned');
}
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `status`='{$status}', `locked`='{$locked}', `history`=CONCAT(`history`,'".hesk_dbEscape($revision)."') WHERE `trackid`='".hesk_dbEscape($trackingID)."' LIMIT 1");
if (hesk_dbAffectedRows() != 1)

@ -0,0 +1,292 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
* Copyright 2005-2014 Klemen Stirn. All Rights Reserved.
* HESK is a registered trademark of Klemen Stirn.
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden. To remove HESK copyright notice you must purchase
* a license for this script. For more information on how to obtain
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
define('IN_SCRIPT',1);
define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_load_database_functions();
hesk_session_start();
hesk_dbConnect();
hesk_isLoggedIn();
/* Set correct return URL */
if (isset($_SERVER['HTTP_REFERER']))
{
$url = hesk_input($_SERVER['HTTP_REFERER']);
$url = str_replace('&amp;','&',$url);
if ($tmp = strstr($url,'show_tickets.php'))
{
$referer = $tmp;
}
elseif ($tmp = strstr($url,'find_tickets.php'))
{
$referer = $tmp;
}
elseif ($tmp = strstr($url,'admin_main.php'))
{
$referer = $tmp;
}
else
{
$referer = 'admin_main.php';
}
}
else
{
$referer = 'admin_main.php';
}
/* Is this a delete ticket request from within a ticket ("delete" icon)? */
if ( isset($_GET['delete_ticket']) )
{
/* Check permissions for this feature */
hesk_checkPermission('can_del_tickets');
/* A security check */
hesk_token_check();
// Tracking ID
$trackingID = hesk_cleanID() or die($hesklang['int_error'].': '.$hesklang['no_trackID']);
/* Get ticket info */
$result = hesk_dbQuery("SELECT `id`,`trackid`,`category` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `trackid`='".hesk_dbEscape($trackingID)."' LIMIT 1");
if (hesk_dbNumRows($result) != 1)
{
hesk_error($hesklang['ticket_not_found']);
}
$ticket = hesk_dbFetchAssoc($result);
/* Is this user allowed to delete tickets inside this category? */
hesk_okCategory($ticket['category']);
hesk_fullyDeleteTicket();
hesk_process_messages(sprintf($hesklang['num_tickets_deleted'],1),$referer,'SUCCESS');
}
/* This is a request from ticket list. Must be POST and id must be an array */
if ( ! isset($_POST['id']) || ! is_array($_POST['id']) )
{
hesk_process_messages($hesklang['no_selected'], $referer, 'NOTICE');
}
/* If not, then needs an action (a) POST variable set */
elseif ( ! isset($_POST['a']) )
{
hesk_process_messages($hesklang['invalid_action'], $referer);
}
$i=0;
/* DELETE */
if ($_POST['a']=='delete')
{
/* Check permissions for this feature */
hesk_checkPermission('can_del_tickets');
/* A security check */
hesk_token_check('POST');
foreach ($_POST['id'] as $this_id)
{
if ( is_array($this_id) )
{
continue;
}
$this_id = intval($this_id) or hesk_error($hesklang['id_not_valid']);
$result = hesk_dbQuery("SELECT `id`,`trackid`,`category` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `id`='".intval($this_id)."' LIMIT 1");
if (hesk_dbNumRows($result) != 1)
{
continue;
}
$ticket = hesk_dbFetchAssoc($result);
hesk_okCategory($ticket['category']);
hesk_fullyDeleteTicket();
$i++;
}
hesk_process_messages(sprintf($hesklang['num_tickets_deleted'],$i),$referer,'SUCCESS');
}
/* MERGE TICKETS */
elseif ($_POST['a']=='merge')
{
/* Check permissions for this feature */
hesk_checkPermission('can_merge_tickets');
/* A security check */
hesk_token_check('POST');
/* Sort IDs, tickets will be merged to the lowest ID */
sort($_POST['id'], SORT_NUMERIC);
/* Select lowest ID as the target ticket */
$merge_into = array_shift($_POST['id']);
/* Merge tickets or throw an error */
if ( hesk_mergeTickets( $_POST['id'] , $merge_into ) )
{
hesk_process_messages($hesklang['merged'],$referer,'SUCCESS');
}
else
{
$hesklang['merge_err'] .= ' ' . $_SESSION['error'];
hesk_cleanSessionVars($_SESSION['error']);
hesk_process_messages($hesklang['merge_err'],$referer);
}
}
/* TAG/UNTAG TICKETS */
elseif ($_POST['a']=='tag' || $_POST['a']=='untag')
{
/* Check permissions for this feature */
hesk_checkPermission('can_add_archive');
/* A security check */
hesk_token_check('POST');
if ($_POST['a']=='tag')
{
$archived = 1;
$action = $hesklang['num_tickets_tag'];
}
else
{
$archived = 0;
$action = $hesklang['num_tickets_untag'];
}
foreach ($_POST['id'] as $this_id)
{
if ( is_array($this_id) )
{
continue;
}
$this_id = intval($this_id) or hesk_error($hesklang['id_not_valid']);
$result = hesk_dbQuery("SELECT `id`,`trackid`,`category` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `id`='".intval($this_id)."' LIMIT 1");
if (hesk_dbNumRows($result) != 1)
{
continue;
}
$ticket = hesk_dbFetchAssoc($result);
hesk_okCategory($ticket['category']);
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `archive`='$archived' WHERE `id`='".intval($this_id)."' LIMIT 1");
$i++;
}
hesk_process_messages(sprintf($action,$i),$referer,'SUCCESS');
}
/* JUST CLOSE */
else
{
/* Check permissions for this feature */
hesk_checkPermission('can_view_tickets');
hesk_checkPermission('can_reply_tickets');
/* A security check */
hesk_token_check('POST');
require(HESK_PATH . 'inc/email_functions.inc.php');
$revision = sprintf($hesklang['thist3'],hesk_date(),$_SESSION['name'].' ('.$_SESSION['user'].')');
foreach ($_POST['id'] as $this_id)
{
if ( is_array($this_id) )
{
continue;
}
$this_id = intval($this_id) or hesk_error($hesklang['id_not_valid']);
$result = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `id`='".intval($this_id)."' LIMIT 1");
$ticket = hesk_dbFetchAssoc($result);
hesk_okCategory($ticket['category']);
$closedStatusRS = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `IsStaffClosedOption` = 1");
$closedStatus = hesk_dbFetchAssoc($closedStatusRS);
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `status`='".$closedStatus['ID']."', `history`=CONCAT(`history`,'".hesk_dbEscape($revision)."') WHERE `id`='".intval($this_id)."' LIMIT 1");
$i++;
hesk_notifyCustomer('ticket_closed');
}
hesk_process_messages(sprintf($hesklang['num_tickets_closed'],$i),$referer,'SUCCESS');
}
/*** START FUNCTIONS ***/
function hesk_fullyDeleteTicket()
{
global $hesk_settings, $hesklang, $ticket;
/* Delete attachment files */
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` WHERE `ticket_id`='".hesk_dbEscape($ticket['trackid'])."'");
if (hesk_dbNumRows($res))
{
$hesk_settings['server_path'] = dirname(dirname(__FILE__));
while ($file = hesk_dbFetchAssoc($res))
{
hesk_unlink($hesk_settings['server_path'].'/'.$hesk_settings['attach_dir'].'/'.$file['saved_name']);
}
}
/* Delete attachments info from the database */
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` WHERE `ticket_id`='".hesk_dbEscape($ticket['trackid'])."'");
/* Delete the ticket */
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `id`='".intval($ticket['id'])."'");
/* Delete replies to the ticket */
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` WHERE `replyto`='".intval($ticket['id'])."'");
/* Delete ticket notes */
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` WHERE `ticket`='".intval($ticket['id'])."'");
return true;
}
?>

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -116,7 +116,7 @@ if (isset($_POST['save']))
else
{
$tmpvar['name'] = hesk_input( hesk_POST('name') ) or $hesk_error_buffer[]=$hesklang['enter_your_name'];
$tmpvar['email'] = hesk_validateEmail( hesk_POST('email'), 'ERR', 0) or $hesk_error_buffer[]=$hesklang['enter_valid_email'];
$tmpvar['email'] = hesk_validateEmail( hesk_POST('email'), 'ERR', 0);
$tmpvar['subject'] = hesk_input( hesk_POST('subject') ) or $hesk_error_buffer[]=$hesklang['enter_ticket_subject'];
$tmpvar['message'] = hesk_input( hesk_POST('message') ) or $hesk_error_buffer[]=$hesklang['enter_message'];
@ -144,7 +144,10 @@ if (isset($_POST['save']))
{
if ($v['use'] && isset($_POST[$k]))
{
if (is_array($_POST[$k]))
if( $v['type'] == 'date' && $_POST[$k] != '')
{
$tmpvar[$k] = strtotime($_POST[$k]);
} elseif (is_array($_POST[$k]))
{
$tmpvar[$k]='';
foreach ($_POST[$k] as $myCB)
@ -246,6 +249,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
$k_value = $ticket[$k];
if ($v['type'] == 'checkbox')
@ -360,6 +368,44 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div>';
break;
case 'date':
if (strlen($k_value) != 0)
{
$v['value'] = $k_value;
}
echo '
<div class="form-group">
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': </label>
<div class="col-sm-9">
<input type="text" class="datepicker form-control white-readonly" placeholder="'.$v['name'].'" id="'.$v['name'].'" name="'.$k.'" size="40"
maxlength="'.$v['maxlen'].'" value="'.date('Y-m-d', $v['value']).'" readonly/>
</div>
</div>';
break;
case 'multiselect':
echo '<div class="form-group"><label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': </label>
<div class="col-sm-9"><select class="form-control" id="'.$v['name'].'" name="'.$k.'" multiple>';
$options = explode('#HESK#',$v['value']);
foreach ($options as $option)
{
if (strlen($k_value) == 0 || $k_value == $option)
{
$k_value = $option;
$selected = 'selected="selected"';
}
else
{
$selected = '';
}
echo '<option '.$selected.'>'.$option.'</option>';
}
echo '</select>
<div class="btn-group" role="group">
<button type="button" class="btn btn-default" onclick="selectAll(\''.$v['name'].'\')">Select All</button>
<button type="button" class="btn btn-default" onclick="deselectAll(\''.$v['name'].'\')">Deselect All</button>
</div></div></div>';
break;
/* Default text input */
default:
if (strlen($k_value) != 0)
@ -407,11 +453,6 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div>
</div>
<p style="text-align:center"></p>
<p>&nbsp;</p>
<?php
require_once(HESK_PATH . 'inc/footer.inc.php');
exit();

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -481,6 +481,11 @@ if (isset($_GET['w']))
{
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
$tmp .= '<Cell><Data ss:Type="String">'.$v['name'].'</Data></Cell>' . "\n";
}
}
@ -523,16 +528,17 @@ if (isset($_GET['w']))
$ticket['message'] = hesk_msgToPlain($ticket['message'], 1);
$ticket['subject'] = hesk_msgToPlain($ticket['subject'], 1);
$ticket['owner'] = isset($admins[$ticket['owner']]) ? $admins[$ticket['owner']] : '';
$ticket['dt'] = date("Y-m-d\TH:i:s\.000", strtotime($ticket['dt']));
$ticket['lastchange'] = date("Y-m-d\TH:i:s\.000", strtotime($ticket['lastchange']));
// Format for export dates
$hesk_settings['timeformat'] = "Y-m-d\TH:i:s\.000";
// Create row for the XML file
$tmp .= '
<Row>
<Cell><Data ss:Type="Number">'.$ticket['id'].'</Data></Cell>
<Cell><Data ss:Type="String"><![CDATA['.$ticket['trackid'].']]></Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="DateTime">'.$ticket['dt'].'</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="DateTime">'.$ticket['lastchange'].'</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="DateTime">'.hesk_date($ticket['dt'], true).'</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="DateTime">'.hesk_date($ticket['lastchange'], true).'</Data></Cell>
<Cell><Data ss:Type="String"><![CDATA['.hesk_msgToPlain($ticket['name'], 1).']]></Data></Cell>
<Cell><Data ss:Type="String"><![CDATA['.$ticket['email'].']]></Data></Cell>
<Cell><Data ss:Type="String"><![CDATA['.$my_cat[$ticket['category']].']]></Data></Cell>
@ -567,6 +573,9 @@ if (isset($_GET['w']))
$tickets_exported++;
$this_round++;
} // End of while loop
// Go back to the HH:MM:SS format for hesk_date()
$hesk_settings['timeformat'] = 'H:i:s';
// Append any remaining rows into the file
if ($this_round > 0)
@ -697,25 +706,22 @@ require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?>
<div class="enclosingDashboard" style="padding-top: 20px">
<div class="row">
<div align="left" class="col-md-4">
<div class="moreToLeft">
<ul class="nav nav-tabs">
<?php
if ( hesk_checkPermission('can_run_reports',0) )
{
?>
<li><a href="reports.php"><?php echo $hesklang['reports_tab']; ?></a></li>
<?php } ?>
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['export']; ?></a></li>
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<p><?php echo $hesklang['export_intro']; ?></p>
</div>
</div>
</div>
<div class="row" style="margin-top: 20px">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading"><?php echo $hesklang['export']; ?></div>
<?php
if (hesk_checkPermission('can_run_reports',0)) {
$canRunReports = true;
} else {
$canRunReports = false;
}
?>
<div class="panel-body" <?php if ($canRunReports) {echo 'style="margin-top: -15px;"';} ?>>
<?php if ($canRunReports) { echo '<small><a href="reports.php">'.$hesklang['reports_tab'].'</a></small><div class="blankSpace"></div>';} ?>
<p><?php echo $hesklang['export_intro']; ?></p>
</div>
</div>
</div>
<div class="col-md-8">
<?php

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -65,8 +65,12 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</tr>
<tr>
<td>
<h3 align="center"><?php echo $hesklang['tickets_found']; ?></h3>
<div class="row" style="padding-top: 20px">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">
<h4><?php echo $hesklang['tickets_found']; ?> <span style="float: right; margin-top: -7px;"><a href="new_ticket.php" class="btn btn-success"><?php echo $hesklang['nti']; ?></a></span></h4>
</div>
<?php
@ -237,8 +241,6 @@ if ($handle !== FALSE)
}
?>
<hr />
<?php
/* Clean unneeded session variables */

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -34,6 +34,7 @@
define('IN_SCRIPT',1);
define('HESK_PATH','../');
define('ON_LOGIN_PAGE',1);
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
@ -196,10 +197,21 @@ function do_login()
unset($_SESSION['pass']);
/* Login successful, clean brute force attempts */
hesk_cleanBfAttempts();
/* Regenerate session ID (security) */
/* Make sure our user is active */
if (!$_SESSION['active']) {
hesk_session_stop();
$_SESSION['a_iserror'] = array('active');
hesk_process_messages($hesklang['inactive_user'], 'NOREDIRECT');
print_login();
exit();
}
/* Regenerate session ID (security) */
hesk_session_regenerate_id();
/* Remember username? */
@ -279,7 +291,7 @@ function print_login()
<div>
<form class="form-signin form-horizontal" role="form" action="index.php" method="post" name="form1">
<h2 class="form-signin-heading">&nbsp;<?php echo $hesklang['admin_login']; ?></a></h2><br/>
<h2 class="form-signin-heading"><span <?php echo $iconDisplay; ?>><span class="mega-octicon octicon-sign-in"></span>&nbsp;</span><?php echo $hesklang['admin_login']; ?></a></h2><br/>
<?php if (in_array('pass',$_SESSION['a_iserror'])) { echo '<div class="form-group has-error">';} else { echo '<div class="form-group">';}?>
<label for="user" class="col-sm-3 control-label"><?php echo $hesklang['username']; ?>:</label>
<div class="col-sm-9">

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -282,7 +282,7 @@ function hesk_show_kb_article($artid)
</tr>
<tr>
<td><?php echo $hesklang['dta']; ?>: </td>
<td><?php echo hesk_date($article['dt']); ?></td>
<td><?php echo hesk_date($article['dt'], true); ?></td>
</tr>
<tr>
<td><?php echo $hesklang['views']; ?>: </td>

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -133,9 +133,8 @@ function confirm_delete()
//-->
</script>
<div class="enclosingDashboard" style="padding-top: 20px">
<div class="row">
<div class="col-md-3" style="margin-top: 60px">
<div class="row" style="margin-top: 20px">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-heading"><?php echo $hesklang['navigation']; ?></div>
<ul class="list-group">
@ -428,7 +427,10 @@ function show_message()
}
$pm['name'] = isset($admins[$pm[$hesk_settings['mailtmp']['other']]]) ? '<a href="mail.php?a=new&amp;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['dt'] = hesk_dateToString($pm['dt'],0,1);
echo $pm['dt'];
$pm['dt'] = hesk_dateToString($pm['dt'],0,1,0,true);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
@ -453,7 +455,7 @@ function show_message()
</tr>
</table>
</td>
<td style="text-align:right; vertical-align:top;">
<td class="text-right" style="vertical-align:top;">
<?php
$folder = '&amp;folder=outbox';
@ -597,7 +599,7 @@ function mail_list_messages()
$pm['subject'] = '<b>'.$pm['subject'].'</b>';
}
$pm['name'] = isset($admins[$pm[$hesk_settings['mailtmp']['other']]]) ? '<a href="mail.php?a=new&amp;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['dt'] = hesk_dateToString($pm['dt'],0);
$pm['dt'] = hesk_dateToString($pm['dt'],0,0,0,true);
echo <<<EOC
<tr>

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -107,202 +107,203 @@ myField.value += myValue;
$j=0;
$num = hesk_dbNumRows($result);
?>
<div class="enclosingDashboard" style="padding-top: 20px">
<div class="row">
<div class="col-md-5">
<div class="moreToLeft">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['savedResponses']; ?></a></li>
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<?php if ($num < 1)
<div class="row" style="margin-top: 20px">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading"><?php echo $hesklang['savedResponses']; ?></div>
<div class="panel-body">
<?php if ($num < 1)
{
echo '<p>'.$hesklang['no_saved'].'</p>';
}
else
{ ?>
<table class="table table-hover">
<tr>
<th><?php echo $hesklang['saved_title']; ?></th>
<th><?php echo $hesklang['opt']; ?></th>
</tr>
<?php
while ($mysaved=hesk_dbFetchAssoc($result))
{
echo '<p>'.$hesklang['no_saved'].'</p>';
}
else
{ ?>
<table class="table table-hover">
<tr>
<th><?php echo $hesklang['saved_title']; ?></th>
<th><?php echo $hesklang['opt']; ?></th>
</tr>
<?php
while ($mysaved=hesk_dbFetchAssoc($result))
$j++;
if (isset($_SESSION['canned']['selcat2']) && $mysaved['id'] == $_SESSION['canned']['selcat2'])
{
$j++;
if (isset($_SESSION['canned']['selcat2']) && $mysaved['id'] == $_SESSION['canned']['selcat2'])
{
$color = 'admin_green';
unset($_SESSION['canned']['selcat2']);
}
else
{
$color = $i ? 'admin_white' : 'admin_gray';
}
$tmp = $i ? 'White' : 'Blue';
$style = 'class="option'.$tmp.'OFF" onmouseover="this.className=\'option'.$tmp.'ON\'" onmouseout="this.className=\'option'.$tmp.'OFF\'"';
$i = $i ? 0 : 1;
$options .= '<option value="'.$mysaved['id'].'"';
$options .= (isset($_SESSION['canned']['id']) && $_SESSION['canned']['id'] == $mysaved['id']) ? ' selected="selected" ' : '';
$options .= '>'.$mysaved['title'].'</option>';
$javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", addslashes($mysaved['message']) )."';\n";
$javascript_titles.='myTitle['.$mysaved['id'].']=\''.addslashes($mysaved['title'])."';\n";
echo '
<tr>
<td>'.$mysaved['title'].'</td>
<td>
';
if ($num > 1)
$color = 'admin_green';
unset($_SESSION['canned']['selcat2']);
}
else
{
$color = $i ? 'admin_white' : 'admin_gray';
}
$tmp = $i ? 'White' : 'Blue';
$style = 'class="option'.$tmp.'OFF" onmouseover="this.className=\'option'.$tmp.'ON\'" onmouseout="this.className=\'option'.$tmp.'OFF\'"';
$i = $i ? 0 : 1;
$options .= '<option value="'.$mysaved['id'].'"';
$options .= (isset($_SESSION['canned']['id']) && $_SESSION['canned']['id'] == $mysaved['id']) ? ' selected="selected" ' : '';
$options .= '>'.$mysaved['title'].'</option>';
$javascript_messages.='myMsgTxt['.$mysaved['id'].']=\''.str_replace("\r\n","\\r\\n' + \r\n'", addslashes($mysaved['message']) )."';\n";
$javascript_titles.='myTitle['.$mysaved['id'].']=\''.addslashes($mysaved['title'])."';\n";
echo '
<tr>
<td>'.$mysaved['title'].'</td>
<td>
';
if ($num > 1)
{
if ($j == 1)
{
if ($j == 1)
{
echo'<img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" /> <a href="manage_canned.php?a=order&amp;replyid='.$mysaved['id'].'&amp;move=15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_dn'].'"><i class="fa fa-arrow-down" style="font-size: 14px; color: green"></i></a>';
}
elseif ($j == $num)
{
echo'<a href="manage_canned.php?a=order&amp;replyid='.$mysaved['id'].'&amp;move=-15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_up'].'"><i class="fa fa-arrow-up" style="font-size: 14px; color: green"></i></a> <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
}
else
{
echo'
<a href="manage_canned.php?a=order&amp;replyid='.$mysaved['id'].'&amp;move=-15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_up'].'"><i class="fa fa-arrow-up" style="font-size: 14px; color: green"></i></a>
<a href="manage_canned.php?a=order&amp;replyid='.$mysaved['id'].'&amp;move=15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_dn'].'"><i class="fa fa-arrow-down" style="font-size: 14px; color: green"></i></a>
';
}
echo'<img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" /> <a href="manage_canned.php?a=order&amp;replyid='.$mysaved['id'].'&amp;move=15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_dn'].'"><i class="fa fa-arrow-down" style="font-size: 14px; color: green"></i></a>';
}
elseif ($j == $num)
{
echo'<a href="manage_canned.php?a=order&amp;replyid='.$mysaved['id'].'&amp;move=-15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_up'].'"><i class="fa fa-arrow-up" style="font-size: 14px; color: green"></i></a> <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
}
else
{
echo '';
echo'
<a href="manage_canned.php?a=order&amp;replyid='.$mysaved['id'].'&amp;move=-15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_up'].'"><i class="fa fa-arrow-up" style="font-size: 14px; color: green"></i></a>
<a href="manage_canned.php?a=order&amp;replyid='.$mysaved['id'].'&amp;move=15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_dn'].'"><i class="fa fa-arrow-down" style="font-size: 14px; color: green"></i></a>
';
}
}
else
{
echo '';
}
echo '
<a href="manage_canned.php?a=remove&amp;id='.$mysaved['id'].'&amp;token='.hesk_token_echo(0).'" onclick="return confirm_delete();" data-toggle="tooltip" data-placement="top" title="'.$hesklang['delete'].'"><i class="fa fa-times" style="font-size: 14px; color: #FF0000"></i></a>&nbsp;</td>
</tr>
';
} // End while
}
?>
</table>
</div>
</div>
echo '
<a href="manage_canned.php?a=remove&amp;id='.$mysaved['id'].'&amp;token='.hesk_token_echo(0).'" onclick="return confirm_delete();" data-toggle="tooltip" data-placement="top" title="'.$hesklang['delete'].'"><i class="fa fa-times" style="font-size: 14px; color: #FF0000"></i></a>&nbsp;</td>
</tr>
';
} // End while
}
?>
</table>
</div>
</div>
<div class="col-md-7">
<script language="javascript" type="text/javascript"><!--
var myMsgTxt = new Array();
myMsgTxt[0]='';
var myTitle = new Array();
myTitle[0]='';
<?php
echo $javascript_titles;
echo $javascript_messages;
?>
function setMessage(msgid) {
if (document.getElementById) {
document.getElementById('HeskMsg').innerHTML='<textarea class="form-control" name="msg" rows="15" cols="70">'+myMsgTxt[msgid]+'</textarea>';
document.getElementById('HeskTitle').innerHTML='<input type="text" class="form-control" name="name" size="40" maxlength="50" value="'+myTitle[msgid]+'">';
} else {
document.form1.msg.value=myMsgTxt[msgid];
document.form1.name.value=myTitle[msgid];
}
</div>
<div class="col-md-8">
<script language="javascript" type="text/javascript"><!--
var myMsgTxt = new Array();
myMsgTxt[0]='';
var myTitle = new Array();
myTitle[0]='';
<?php
echo $javascript_titles;
echo $javascript_messages;
?>
function setMessage(msgid) {
if (document.getElementById) {
document.getElementById('HeskMsg').innerHTML='<textarea class="form-control" name="msg" rows="15" cols="70">'+myMsgTxt[msgid]+'</textarea>';
document.getElementById('HeskTitle').innerHTML='<input type="text" class="form-control" name="name" size="40" maxlength="50" value="'+myTitle[msgid]+'">';
} else {
document.form1.msg.value=myMsgTxt[msgid];
document.form1.name.value=myTitle[msgid];
}
if (msgid==0) {
document.form1.a[0].checked=true;
} else {
document.form1.a[1].checked=true;
}
if (msgid==0) {
document.form1.a[0].checked=true;
} else {
document.form1.a[1].checked=true;
}
//-->
</script>
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
?>
<h3><?php echo $hesklang['manage_saved']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['manage_intro']); ?>')"><i class="fa fa-question-circle" style="color:black"></i></a></h3>
}
//-->
</script>
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
?>
<h3><?php echo $hesklang['manage_saved']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['manage_intro']); ?>')"><i class="fa fa-question-circle settingsquestionmark"></i></a></h3>
<div class="footerWithBorder blankSpace"></div>
<form action="manage_canned.php" method="post" name="form1" class="form-horizontal" role="form">
<h3><?php echo $hesklang['new_saved']; ?></h3>
<div class="footerWithBorder blankSpace"></div>
<form action="manage_canned.php" method="post" name="form1" class="form-horizontal" role="form">
<h3><?php echo $hesklang['new_saved']; ?></h3>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
<div class="col-sm-12">
<?php
if ($num > 0)
{
?>
<div class="radio">
<div class="form-group">
<div class="col-sm-12">
<?php
if ($num > 0)
{
?>
<div class="col-sm-12">
<div class="radio">
<label><input type="radio" name="a" value="new" <?php echo (!isset($_SESSION['canned']['what']) || $_SESSION['canned']['what'] != 'EDIT') ? 'checked="checked"' : ''; ?> /> <?php echo $hesklang['canned_add']; ?></label>
</div>
<div class="row">
<div class="col-sm-6">
<div class="radio">
<label><input type="radio" name="a" value="edit" <?php echo (isset($_SESSION['canned']['what']) && $_SESSION['canned']['what'] == 'EDIT') ? 'checked="checked"' : ''; ?> /> <?php echo $hesklang['canned_edit']; ?></label>:
</div>
</div>
<div class="col-sm-6">
<select class="form-control" name="saved_replies" onchange="setMessage(this.value)"><option value="0"> - <?php echo $hesklang['select_empty']; ?> - </option><?php echo $options; ?></select>
</div>
<div class="row">
<div class="col-sm-6">
<div class="radio">
<label><input type="radio" name="a" value="edit" <?php echo (isset($_SESSION['canned']['what']) && $_SESSION['canned']['what'] == 'EDIT') ? 'checked="checked"' : ''; ?> /> <?php echo $hesklang['canned_edit']; ?></label>:
</div>
</div>
<?php
}
else
{
echo '<input type="hidden" name="a" value="new" /><label> ' . $hesklang['canned_add'] . '</label>';
}
?>
</div>
<div class="col-sm-6">
<select class="form-control" name="saved_replies" onchange="setMessage(this.value)"><option value="0"> - <?php echo $hesklang['select_empty']; ?> - </option><?php echo $options; ?></select>
</div>
</div>
<?php
}
else
{
echo '<input type="hidden" name="a" value="new" /><label> ' . $hesklang['canned_add'] . '</label>';
}
?>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label"><?php echo $hesklang['saved_title']; ?>:</label>
<div class="col-sm-10">
<span id="HeskTitle"><input class="form-control" placeholder="<?php echo $hesklang['saved_title']; ?>" type="text" name="name" size="40" maxlength="50" <?php if (isset($_SESSION['canned']['name'])) {echo ' value="'.stripslashes($_SESSION['canned']['name']).'" ';} ?> /></span>
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label"><?php echo $hesklang['saved_title']; ?>:</label>
<div class="col-sm-10">
<span id="HeskTitle"><input class="form-control" placeholder="<?php echo $hesklang['saved_title']; ?>" type="text" name="name" size="40" maxlength="50" <?php if (isset($_SESSION['canned']['name'])) {echo ' value="'.stripslashes($_SESSION['canned']['name']).'" ';} ?> /></span>
</div>
<div class="form-group">
<label for="msg" class="col-sm-2 control-label"><?php echo $hesklang['message']; ?>:</label>
<div class="col-sm-10">
<span id="HeskMsg">
<textarea class="form-control" placeholder="<?php echo $hesklang['message']; ?>" name="msg" rows="15" cols="70"><?php
if (isset($_SESSION['canned']['msg']))
</div>
<div class="form-group">
<label for="msg" class="col-sm-2 control-label"><?php echo $hesklang['message']; ?>:</label>
<div class="col-sm-10">
<span id="HeskMsg">
<textarea class="form-control" placeholder="<?php echo $hesklang['message']; ?>" name="msg" rows="15" cols="70"><?php
if (isset($_SESSION['canned']['msg']))
{
echo stripslashes($_SESSION['canned']['msg']);
}
?></textarea>
<?php echo $hesklang['insert_special']; ?>:
<a href="javascript:void(0)" onclick="hesk_insertTag('HESK_NAME')"><?php echo $hesklang['name']; ?></a> |
<a href="javascript:void(0)" onclick="hesk_insertTag('HESK_EMAIL')"><?php echo $hesklang['email']; ?></a>
<?php
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
echo stripslashes($_SESSION['canned']['msg']);
$v['name'] = $hesklang[$v['name']];
}
?></textarea>
<?php echo $hesklang['insert_special']; ?>:
<a href="javascript:void(0)" onclick="hesk_insertTag('HESK_NAME')"><?php echo $hesklang['name']; ?></a> |
<a href="javascript:void(0)" onclick="hesk_insertTag('HESK_EMAIL')"><?php echo $hesklang['email']; ?></a>
<?php
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'])
{
echo '| <a href="javascript:void(0)" onclick="hesk_insertTag(\'HESK_'.$k.'\')">'.$v['name'].'</a> ';
}
}
?>
</span>
</div>
</div>
<div class="form-group" style="text-align: center">
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="submit" value="<?php echo $hesklang['save_reply']; ?>" class="btn btn-default" />
</div>
</form>
</div>
echo '| <a href="javascript:void(0)" onclick="hesk_insertTag(\'HESK_'.$k.'\')">'.$v['name'].'</a> ';
}
}
?>
</span>
</div>
</div>
<div class="form-group" style="text-align: center">
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="submit" value="<?php echo $hesklang['save_reply']; ?>" class="btn btn-default" />
</div>
</form>
</div>
</div>
<?php
require_once(HESK_PATH . 'inc/footer.inc.php');

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -87,233 +87,229 @@ else {return false;}
$options .= '>'.$mycat['name'].'</option>';
}
?>
<div class="enclosingDashboard" style="padding-top: 20px">
<div class="row">
<div align="left" class="col-md-4">
<div class="moreToLeft">
<ul class="nav nav-tabs">
<li class="active"><a href="#addCat" data-toggle="tab"><?php echo $hesklang['add_cat']; ?></a></li>
<li><a href="#renameCat" data-toggle="tab"><?php echo $hesklang['ren_cat']; ?></a></li>
</ul>
<div class="tab-content summaryList viewTicketSidebar">
<div class="tab-pane fade in active" id="addCat">
<!-- CONTENT -->
<form action="manage_categories.php" method="post" role="form" class="form-horizontal">
<h4><?php echo $hesklang['add_cat']; ?></h4>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
<p class="col-sm-4 control-label" style="font-size: .87em"><b><?php echo $hesklang['cat_name']; ?>:</b> (<?php echo $hesklang['max_chars']; ?>)</p>
<div class="col-sm-8">
<input class="form-control" placeholder="<?php echo $hesklang['cat_name']; ?>" type="text" name="name" size="40" maxlength="40"
<?php
if (isset($_SESSION['catname']))
{
echo ' value="'.hesk_input($_SESSION['catname']).'" ';
}
?>
/>
</div>
</div>
<div class="form-group">
<label for="options" class="col-sm-4 control-label"><?php echo $hesklang['opt']; ?>:</label>
<div class="col-sm-8">
<?php
if ($hesk_settings['autoassign'])
<div class="row" style="margin-top: 20px">
<div align="left" class="col-md-4">
<ul class="nav nav-tabs">
<li class="active"><a href="#addCat" data-toggle="tab"><?php echo $hesklang['add_cat']; ?></a></li>
<li><a href="#renameCat" data-toggle="tab"><?php echo $hesklang['ren_cat']; ?></a></li>
</ul>
<div class="tab-content summaryList tabPadding">
<div class="tab-pane fade in active" id="addCat">
<!-- CONTENT -->
<form action="manage_categories.php" method="post" role="form" class="form-horizontal">
<h4><?php echo $hesklang['add_cat']; ?></h4>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
<p class="col-sm-4 control-label" style="font-size: .87em"><b><?php echo $hesklang['cat_name']; ?>:</b> (<?php echo $hesklang['max_chars']; ?>)</p>
<div class="col-sm-8">
<input class="form-control" placeholder="<?php echo $hesklang['cat_name']; ?>" type="text" name="name" size="40" maxlength="40"
<?php
if (isset($_SESSION['catname']))
{
?>
<div class="checkbox">
<label><input type="checkbox" name="autoassign" value="Y" <?php if ( ! isset($_SESSION['cat_autoassign']) || $_SESSION['cat_autoassign'] == 1 ) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['cat_aa']; ?></label><br />
</div>
<?php
echo ' value="'.hesk_input($_SESSION['catname']).'" ';
}
?>
<div class="checkbox">
<label><input type="checkbox" name="type" value="Y" <?php if ( isset($_SESSION['cat_type']) && $_SESSION['cat_type'] == 1 ) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['cat_type']; ?></label>
</div>
</div>
</div>
<div class="form-group" style="text-align: center">
<input type="hidden" name="a" value="new" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="submit" value="<?php echo $hesklang['create_cat']; ?>" class="btn btn-default" />
</div>
</form>
?>
/>
</div>
</div>
<div class="tab-pane fade" id="renameCat">
<form action="manage_categories.php" method="post" role="form" class="form-horizontal">
<h4><?php echo $hesklang['ren_cat']; ?></h4>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
<label for="catid" class="col-sm-4 control-label"><?php echo $hesklang['oln']; ?></label>
<div class="col-sm-8">
<select class="form-control" name="catid"><?php echo $options; ?></select>
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-4 control-label"><?php echo $hesklang['nen']; ?></label>
<div class="col-sm-8">
<input class="form-control" placeholder="<?php echo $hesklang['cat_name']; ?>" type="text" name="name" size="40" maxlength="40" <?php if (isset($_SESSION['catname2'])) {echo ' value="'.hesk_input($_SESSION['catname2']).'" ';} ?> />
</div>
</div>
<div class="form-group" style="text-align: center">
<input type="hidden" name="a" value="rename" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="submit" value="<?php echo $hesklang['ren_cat']; ?>" class="btn btn-default" />
</div>
</form>
<div class="form-group">
<label for="options" class="col-sm-4 control-label"><?php echo $hesklang['opt']; ?>:</label>
<div class="col-sm-8">
<?php
if ($hesk_settings['autoassign'])
{
?>
<div class="checkbox">
<label><input type="checkbox" name="autoassign" value="Y" <?php if ( ! isset($_SESSION['cat_autoassign']) || $_SESSION['cat_autoassign'] == 1 ) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['cat_aa']; ?></label><br />
</div>
<?php
}
?>
<div class="checkbox">
<label><input type="checkbox" name="type" value="Y" <?php if ( isset($_SESSION['cat_type']) && $_SESSION['cat_type'] == 1 ) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['cat_type']; ?></label>
</div>
</div>
</div>
</div>
</div>
<script>
$(function () {
$('#addCat a:last').tab('show')
})
</script>
</div>
<div class="col-md-7" style="padding-top: 20px">
<div class="form-group" style="text-align: center">
<input type="hidden" name="a" value="new" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="submit" value="<?php echo $hesklang['create_cat']; ?>" class="btn btn-default" />
</div>
</form>
</div>
<div class="tab-pane fade" id="renameCat">
<form action="manage_categories.php" method="post" role="form" class="form-horizontal">
<h4><?php echo $hesklang['ren_cat']; ?></h4>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
<label for="catid" class="col-sm-4 control-label"><?php echo $hesklang['oln']; ?></label>
<div class="col-sm-8">
<select class="form-control" name="catid"><?php echo $options; ?></select>
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-4 control-label"><?php echo $hesklang['nen']; ?></label>
<div class="col-sm-8">
<input class="form-control" placeholder="<?php echo $hesklang['cat_name']; ?>" type="text" name="name" size="40" maxlength="40" <?php if (isset($_SESSION['catname2'])) {echo ' value="'.hesk_input($_SESSION['catname2']).'" ';} ?> />
</div>
</div>
<div class="form-group" style="text-align: center">
<input type="hidden" name="a" value="rename" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="submit" value="<?php echo $hesklang['ren_cat']; ?>" class="btn btn-default" />
</div>
</form>
</div>
</div>
<script>
$(function () {
$('#addCat a:last').tab('show')
})
</script>
</div>
<div class="col-md-8">
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
?>
<h3><?php echo $hesklang['manage_cat']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['cat_intro']); ?>')"><i class="fa fa-question-circle settingsquestionmark"></i></a></h3>
<div class="footerWithBorder blankSpace"></div>
<table class="table table-hover">
<tr>
<th><?php echo $hesklang['id']; ?></th>
<th><?php echo $hesklang['cat_name']; ?></th>
<th><?php echo $hesklang['not']; ?></th>
<th><?php echo $hesklang['graph']; ?></th>
<th><?php echo $hesklang['opt']; ?></th>
</tr>
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
?>
<h3><?php echo $hesklang['manage_cat']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['cat_intro']); ?>')"><i class="fa fa-question-circle" style="color:black"></i></a></h3>
<div class="footerWithBorder blankSpace"></div>
<table class="table table-hover">
<tr>
<th><?php echo $hesklang['id']; ?></th>
<th><?php echo $hesklang['cat_name']; ?></th>
<th><?php echo $hesklang['not']; ?></th>
<th><?php echo $hesklang['graph']; ?></th>
<th><?php echo $hesklang['opt']; ?></th>
</tr>
/* Get number of tickets per category */
$tickets_all = array();
$tickets_total = 0;
$res = hesk_dbQuery('SELECT COUNT(*) AS `cnt`, `category` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` GROUP BY `category`');
while ($tmp = hesk_dbFetchAssoc($res))
{
$tickets_all[$tmp['category']] = $tmp['cnt'];
$tickets_total += $tmp['cnt'];
}
<?php
/* Get number of tickets per category */
$tickets_all = array();
$tickets_total = 0;
/* Get list of categories */
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` ORDER BY `cat_order` ASC");
$res = hesk_dbQuery('SELECT COUNT(*) AS `cnt`, `category` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets` GROUP BY `category`');
while ($tmp = hesk_dbFetchAssoc($res))
$i=1;
$j=0;
$num = hesk_dbNumRows($res);
while ($mycat=hesk_dbFetchAssoc($res))
{
$j++;
if (isset($_SESSION['selcat2']) && $mycat['id'] == $_SESSION['selcat2'])
{
$color = 'admin_green';
unset($_SESSION['selcat2']);
}
else
{
$tickets_all[$tmp['category']] = $tmp['cnt'];
$tickets_total += $tmp['cnt'];
$color = $i ? 'admin_white' : 'admin_gray';
}
/* Get list of categories */
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` ORDER BY `cat_order` ASC");
$tmp = $i ? 'White' : 'Blue';
$style = 'class="option'.$tmp.'OFF" onmouseover="this.className=\'option'.$tmp.'ON\'" onmouseout="this.className=\'option'.$tmp.'OFF\'"';
$i = $i ? 0 : 1;
$i=1;
$j=0;
$num = hesk_dbNumRows($res);
/* Number of tickets and graph width */
$all = isset($tickets_all[$mycat['id']]) ? $tickets_all[$mycat['id']] : 0;
$width_all = 0;
if ($tickets_total && $all)
{
$width_all = round(($all / $tickets_total) * 100);
}
while ($mycat=hesk_dbFetchAssoc($res))
/* Deleting category with ID 1 (default category) is not allowed */
if ($mycat['id'] == 1)
{
$j++;
$remove_code=' <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
}
else
{
$remove_code=' <a href="manage_categories.php?a=remove&amp;catid='.$mycat['id'].'&amp;token='.hesk_token_echo(0).'" onclick="return confirm_delete();" data-toggle="tooltip" data-placement="top" title="'.$hesklang['delete'].'"><i class="fa fa-times" style="color: #FF0000; font-size: 14px;"></i></a>';
}
if (isset($_SESSION['selcat2']) && $mycat['id'] == $_SESSION['selcat2'])
/* Is category private or public? */
if ($mycat['type'])
{
$type_code = '<a href="manage_categories.php?a=type&amp;s=0&amp;catid='.$mycat['id'].'&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['cat_private'].'"><span class="glyphicon glyphicon-user" style="color: gray"></span></a>';
}
else
{
$type_code = '<a href="manage_categories.php?a=type&amp;s=1&amp;catid='.$mycat['id'].'&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['cat_public'].'"><span class="glyphicon glyphicon-user" style="color: #0000FF"></span></a>';
}
/* Is auto assign enabled? */
if ($hesk_settings['autoassign'])
{
if ($mycat['autoassign'])
{
$color = 'admin_green';
unset($_SESSION['selcat2']);
}
$autoassign_code = '<a href="manage_categories.php?a=autoassign&amp;s=0&amp;catid='.$mycat['id'].'&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['aaon'].'"><i class="fa fa-bolt" style="font-size: 14px; color: orange"></i></a>';
}
else
{
$color = $i ? 'admin_white' : 'admin_gray';
$autoassign_code = '<a href="manage_categories.php?a=autoassign&amp;s=1&amp;catid='.$mycat['id'].'&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['aaoff'].'"><i class="fa fa-bolt" style="font-size: 14px; color: gray"></i></a>';
}
}
else
{
$autoassign_code = '';
}
$tmp = $i ? 'White' : 'Blue';
$style = 'class="option'.$tmp.'OFF" onmouseover="this.className=\'option'.$tmp.'ON\'" onmouseout="this.className=\'option'.$tmp.'OFF\'"';
$i = $i ? 0 : 1;
/* Number of tickets and graph width */
$all = isset($tickets_all[$mycat['id']]) ? $tickets_all[$mycat['id']] : 0;
$width_all = 0;
if ($tickets_total && $all)
{
$width_all = round(($all / $tickets_total) * 100);
}
echo '
<tr>
<td>'.$mycat['id'].'</td>
<td>'.$mycat['name'].'</td>
<td>'.$all.'</td>
<td>
<div class="progress-container" style="width: 160px" title="'.sprintf($hesklang['perat'],$width_all.'%').'">
<div style="width: '.$width_all.'%;float:left;"></div>
</div>
</td>
<td>
<a href="Javascript:void(0)" onclick="Javascript:hesk_window(\'manage_categories.php?a=linkcode&amp;catid='.$mycat['id'].'&amp;p='.$mycat['type'].'\',\'200\',\'500\')" id="tooltip" data-toggle="tooltip" data-placement="top" title="'.$hesklang['geco'].'"><i class="fa fa-code" style="font-size: 14px; color: '. ($mycat['type'] ? 'gray' : 'green') . '"></i></a>
' . $autoassign_code . '
' . $type_code . ' ';
/* Deleting category with ID 1 (default category) is not allowed */
if ($mycat['id'] == 1)
{
$remove_code=' <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
}
else
if ($num > 1)
{
if ($j == 1)
{
$remove_code=' <a href="manage_categories.php?a=remove&amp;catid='.$mycat['id'].'&amp;token='.hesk_token_echo(0).'" onclick="return confirm_delete();" data-toggle="tooltip" data-placement="top" title="'.$hesklang['delete'].'"><i class="fa fa-times" style="color: #FF0000; font-size: 14px;"></i></a>';
echo'<img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" /> <a href="manage_categories.php?a=order&amp;catid='.$mycat['id'].'&amp;move=15&amp;token='.hesk_token_echo(0).'"><i class="fa fa-arrow-down" style="font-size: 14px; color: green" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_dn'].'"></i></a>';
}
/* Is category private or public? */
if ($mycat['type'])
{
$type_code = '<a href="manage_categories.php?a=type&amp;s=0&amp;catid='.$mycat['id'].'&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['cat_private'].'"><span class="glyphicon glyphicon-user" style="color: gray"></span></a>';
}
else
{
$type_code = '<a href="manage_categories.php?a=type&amp;s=1&amp;catid='.$mycat['id'].'&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['cat_public'].'"><span class="glyphicon glyphicon-user" style="color: #0000FF"></span></a>';
}
/* Is auto assign enabled? */
if ($hesk_settings['autoassign'])
elseif ($j == $num)
{
if ($mycat['autoassign'])
{
$autoassign_code = '<a href="manage_categories.php?a=autoassign&amp;s=0&amp;catid='.$mycat['id'].'&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['aaon'].'"><i class="fa fa-bolt" style="font-size: 14px; color: orange"></i></a>';
}
else
{
$autoassign_code = '<a href="manage_categories.php?a=autoassign&amp;s=1&amp;catid='.$mycat['id'].'&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['aaoff'].'"><i class="fa fa-bolt" style="font-size: 14px; color: gray"></i></a>';
}
echo'<a href="manage_categories.php?a=order&amp;catid='.$mycat['id'].'&amp;move=-15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_up'].'"><i class="fa fa-arrow-up" style="font-size: 14px; color: green"></i></a> <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
}
else
{
$autoassign_code = '';
echo'
<a href="manage_categories.php?a=order&amp;catid='.$mycat['id'].'&amp;move=-15&amp;token='.hesk_token_echo(0).'"><i class="fa fa-arrow-up" style="font-size: 14px; color: green" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_up'].'"></i></a>
<a href="manage_categories.php?a=order&amp;catid='.$mycat['id'].'&amp;move=15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_dn'].'"><i class="fa fa-arrow-down" style="font-size: 14px; color: green"></i></a>&nbsp;
';
}
}
echo $remove_code.'</td>
</tr>
';
echo '
<tr>
<td>'.$mycat['id'].'</td>
<td>'.$mycat['name'].'</td>
<td>'.$all.'</td>
<td>
<div class="progress-container" style="width: 160px" title="'.sprintf($hesklang['perat'],$width_all.'%').'">
<div style="width: '.$width_all.'%;float:left;"></div>
</div>
</td>
<td>
<a href="Javascript:void(0)" onclick="Javascript:hesk_window(\'manage_categories.php?a=linkcode&amp;catid='.$mycat['id'].'&amp;p='.$mycat['type'].'\',\'200\',\'500\')" id="tooltip" data-toggle="tooltip" data-placement="top" title="'.$hesklang['geco'].'"><i class="fa fa-code" style="font-size: 14px; color: '. ($mycat['type'] ? 'gray' : 'green') . '"></i></a>
' . $autoassign_code . '
' . $type_code . ' ';
if ($num > 1)
{
if ($j == 1)
{
echo'<img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" /> <a href="manage_categories.php?a=order&amp;catid='.$mycat['id'].'&amp;move=15&amp;token='.hesk_token_echo(0).'"><i class="fa fa-arrow-down" style="font-size: 14px; color: green" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_dn'].'"></i></a>';
}
elseif ($j == $num)
{
echo'<a href="manage_categories.php?a=order&amp;catid='.$mycat['id'].'&amp;move=-15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_up'].'"><i class="fa fa-arrow-up" style="font-size: 14px; color: green"></i></a> <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
}
else
{
echo'
<a href="manage_categories.php?a=order&amp;catid='.$mycat['id'].'&amp;move=-15&amp;token='.hesk_token_echo(0).'"><i class="fa fa-arrow-up" style="font-size: 14px; color: green" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_up'].'"></i></a>
<a href="manage_categories.php?a=order&amp;catid='.$mycat['id'].'&amp;move=15&amp;token='.hesk_token_echo(0).'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['move_dn'].'"><i class="fa fa-arrow-down" style="font-size: 14px; color: green"></i></a>&nbsp;
';
}
}
echo $remove_code.'</td>
</tr>
';
} // End while
?>
</table>
</div>
} // End while
?>
</table>
</div>
</div>
<?php

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -263,7 +263,7 @@ if (!isset($_SESSION['hide']['treemenu']))
{
?>
<div class="col-md-10 col-md-offset-1">
<h3><?php echo $hesklang['kb']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['kb_intro']); ?>')"><i class="fa fa-question-circle" style="font-size:20px"></i></a></h3>
<h3><?php echo $hesklang['kb']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['kb_intro']); ?>')"><i class="fa fa-question-circle settingsquestionmark" style="font-size:20px"></i></a></h3>
<div class="footerWithBorder blankSpace"></div>
<!-- SUB NAVIGATION -->
@ -1582,14 +1582,11 @@ function manage_category() {
<div class="row">
<div align="left" class="col-md-4">
<div class="moreToLeft" style="margin-left:40px">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['catset']; ?></a></li>
<li><?php echo '<a href="manage_knowledgebase.php?a=add_category&amp;parent='.$catid.'">'.$hesklang['kb_i_cat2'].'</a>'; ?></li>
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<div class="col-md-4">
<div style="margin-left:25px">
<div class="panel panel-default">
<div class="panel-heading"><?php echo $hesklang['catset']; ?></div>
<div class="panel-body">
<form action="manage_knowledgebase.php" method="post" role="form" name="form1" onsubmit="Javascript:return hesk_deleteIfSelected('dodelete','<?php echo hesk_makeJsString($hesklang['kb_delcat']); ?>')">
<div class="form-group">
<label for="title" class="control-label"><?php echo $hesklang['kb_cat_title']; ?></label>
@ -1629,7 +1626,9 @@ function manage_category() {
<div class="form-group" style="text-align:center">
<input type="hidden" name="a" value="edit_category" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="hidden" name="catid" value="<?php echo $catid; ?>" /><input type="submit" value="<?php echo $hesklang['save_changes']; ?>" class="btn btn-default" />
<input type="hidden" name="catid" value="<?php echo $catid; ?>" />
<input type="submit" value="<?php echo $hesklang['save_changes']; ?>" class="btn btn-default" />
<a class="btn btn-default" href="manage_knowledgebase.php?a=add_category&amp;parent='.$catid.'"><?php echo $hesklang['kb_i_cat2']; ?></a>
</div>
</form>
</div>

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -61,7 +61,6 @@ $hesk_settings['features'] = array(
'can_man_users', /* User can create and edit staff accounts */
'can_man_cat', /* User can manage categories/departments */
'can_man_canned', /* User can manage canned responses */
'can_man_settings', /* User can manage help desk settings */
'can_add_archive', /* User can mark tickets as "Tagged" */
'can_assign_self', /* User can assign tickets to himself/herself */
'can_assign_others', /* User can assign tickets to other staff members */
@ -80,6 +79,7 @@ $default_userdata = array(
'user' => '',
'signature' => '',
'isadmin' => 1,
'active' => 1,
'categories' => array('1'),
'features' => array('can_view_tickets','can_reply_tickets','can_change_cat','can_assign_self','can_view_unassigned','can_view_online'),
'signature' => '',
@ -138,6 +138,7 @@ if ( $action = hesk_REQUEST('a') )
elseif ($action == 'save') {update_user();}
elseif ($action == 'remove') {remove();}
elseif ($action == 'autoassign') {toggle_autoassign();}
elseif ($action == 'active') {toggle_active();}
else {hesk_error($hesklang['invalid_action']);}
}
@ -164,149 +165,150 @@ require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?>
<div class="enclosingDashboard">
<div style="margin-top: 20px" class="row">
<div align="left" class="col-md-4">
<div class="moreToLeft">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['add_user']; ?></a></li>
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<h4><?php echo $hesklang['add_user']; ?></h4>
<h6><?php echo $hesklang['req_marked_with']; ?> <font class="important">*</font></h6>
<div class="footerWithBorder blankSpace"></div>
<form class="form-horizontal" name="form1" action="manage_users.php" method="post">
<div class="form-group">
<label for="name" class="col-sm-5 control-label"><?php echo $hesklang['real_name']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<input type="text" class="form-control" name="name" size="40" maxlength="50" value="<?php echo $_SESSION['userdata']['name']; ?>" placeholder="<?php echo $hesklang['real_name']; ?>" />
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading"><?php echo $hesklang['add_user']; ?></div>
<div class="panel-body">
<h6><?php echo $hesklang['req_marked_with']; ?> <font class="important">*</font></h6>
<div class="footerWithBorder blankSpace"></div>
<form class="form-horizontal" name="form1" action="manage_users.php" method="post">
<div class="form-group">
<label for="name" class="col-sm-5 control-label"><?php echo $hesklang['real_name']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<input type="text" class="form-control" name="name" size="40" maxlength="50" value="<?php echo $_SESSION['userdata']['name']; ?>" placeholder="<?php echo $hesklang['real_name']; ?>" />
</div>
</div>
<div class="form-group">
<label for="email" class="col-sm-5 control-label"><?php echo $hesklang['email']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<input type="text" class="form-control" name="email" size="40" maxlength="255" placeholder="<?php echo $hesklang['email']; ?>" value="<?php echo $_SESSION['userdata']['email']; ?>" />
</div>
<div class="form-group">
<label for="email" class="col-sm-5 control-label"><?php echo $hesklang['email']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<input type="text" class="form-control" name="email" size="40" maxlength="255" placeholder="<?php echo $hesklang['email']; ?>" value="<?php echo $_SESSION['userdata']['email']; ?>" />
</div>
</div>
<div class="form-group">
<label for="user" class="col-sm-5 control-label"><?php echo $hesklang['username']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<input type="text" class="form-control" name="user" size="40" maxlength="20" value="<?php echo $_SESSION['userdata']['user']; ?>" placeholder="<?php echo $hesklang['username']; ?>" />
</div>
<div class="form-group">
<label for="user" class="col-sm-5 control-label"><?php echo $hesklang['username']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<input type="text" class="form-control" name="user" size="40" maxlength="20" value="<?php echo $_SESSION['userdata']['user']; ?>" placeholder="<?php echo $hesklang['username']; ?>" />
</div>
</div>
<div class="form-group">
<label for="pass" class="col-sm-5 control-label"><?php echo $hesklang['pass']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<input type="password" class="form-control" name="newpass" autocomplete="off" size="40" placeholder="<?php echo $hesklang['pass']; ?>" value="<?php echo $_SESSION['userdata']['cleanpass']; ?>" onkeyup="javascript:hesk_checkPassword(this.value)" />
</div>
<div class="form-group">
<label for="pass" class="col-sm-5 control-label"><?php echo $hesklang['pass']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<input type="password" class="form-control" name="newpass" autocomplete="off" size="40" placeholder="<?php echo $hesklang['pass']; ?>" value="<?php echo $_SESSION['userdata']['cleanpass']; ?>" onkeyup="javascript:hesk_checkPassword(this.value)" />
</div>
</div>
<div class="form-group">
<label for="confirmPass" class="col-sm-5 control-label" style="font-size: .9em"><?php echo $hesklang['confirm_pass']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<input type="password" name="newpass2" class="form-control" autocomplete="off" placeholder="<?php echo $hesklang['confirm_pass']; ?>" size="40" value="<?php echo $_SESSION['userdata']['cleanpass']; ?>" />
</div>
<div class="form-group">
<label for="confirmPass" class="col-sm-5 control-label" style="font-size: .9em"><?php echo $hesklang['confirm_pass']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<input type="password" name="newpass2" class="form-control" autocomplete="off" placeholder="<?php echo $hesklang['confirm_pass']; ?>" size="40" value="<?php echo $_SESSION['userdata']['cleanpass']; ?>" />
</div>
</div>
<div class="form-group">
<label for="pwStrength" class="col-sm-5 control-label" style="font-size: .9em"><?php echo $hesklang['pwdst']; ?>:</label>
<div class="col-sm-7">
<div style="border: 1px solid gray; width: 100px;">
<div id="progressBar"
style="font-size: 1px; height: 22px; width: 0px; border: 1px solid white;">
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="administrator" class="col-sm-5 control-label"><?php echo $hesklang['administrator']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<?php
/* Only administrators can create new administrator accounts */
if ($_SESSION['isadmin'])
{
?>
<div class="radio"><label><input type="radio" name="isadmin" value="1" onchange="Javascript:hesk_toggleLayerDisplay('options')" <?php if ($_SESSION['userdata']['isadmin']) echo 'checked="checked"'; ?> /> <?php echo $hesklang['yes'].' '.$hesklang['admin_can']; ?></label></div>
<div class="radio"><label><input type="radio" name="isadmin" value="0" onchange="Javascript:hesk_toggleLayerDisplay('options')" <?php if (!$_SESSION['userdata']['isadmin']) echo 'checked="checked"'; ?> /> <?php echo $hesklang['no'].' '.$hesklang['staff_can']; ?></label></div>
<?php
}
else
{
echo $hesklang['no'].' '.$hesklang['staff_can'];
}
?>
</div>
</div>
<div id="options" style="display: <?php echo ($_SESSION['isadmin'] && $_SESSION['userdata']['isadmin']) ? 'none' : 'block'; ?>">
<div class="form-group">
<label for="pwStrength" class="col-sm-5 control-label" style="font-size: .9em"><?php echo $hesklang['pwdst']; ?>:</label>
<label for="categories" class="col-sm-5 control-label"><?php echo $hesklang['allowed_cat']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<div style="border: 1px solid gray; width: 100px;">
<div id="progressBar"
style="font-size: 1px; height: 22px; width: 0px; border: 1px solid white;">
</div>
</div>
<?php
foreach ($hesk_settings['categories'] as $catid => $catname)
{
echo '<div class="checkbox"><label><input type="checkbox" name="categories[]" value="' . $catid . '" ';
if ( in_array($catid,$_SESSION['userdata']['categories']) )
{
echo ' checked="checked" ';
}
echo ' />' . $catname . '</label></div> ';
}
?>
</div>
</div>
<div class="form-group">
<label for="administrator" class="col-sm-5 control-label"><?php echo $hesklang['administrator']; ?>: <font class="important">*</font></label>
<label for="permissions" class="col-sm-5 control-label"><?php echo $hesklang['allow_feat']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<?php
/* Only administrators can create new administrator accounts */
if ($_SESSION['isadmin'])
{
?>
<div class="radio"><label><input type="radio" name="isadmin" value="1" onchange="Javascript:hesk_toggleLayerDisplay('options')" <?php if ($_SESSION['userdata']['isadmin']) echo 'checked="checked"'; ?> /> <?php echo $hesklang['yes'].' '.$hesklang['admin_can']; ?></label></div>
<div class="radio"><label><input type="radio" name="isadmin" value="0" onchange="Javascript:hesk_toggleLayerDisplay('options')" <?php if (!$_SESSION['userdata']['isadmin']) echo 'checked="checked"'; ?> /> <?php echo $hesklang['no'].' '.$hesklang['staff_can']; ?></label></div>
<?php
}
else
{
echo $hesklang['no'].' '.$hesklang['staff_can'];
}
?>
</div>
</div>
<div id="options" style="display: <?php echo ($_SESSION['isadmin'] && $_SESSION['userdata']['isadmin']) ? 'none' : 'block'; ?>">
<div class="form-group">
<label for="categories" class="col-sm-5 control-label"><?php echo $hesklang['allowed_cat']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<?php
foreach ($hesk_settings['categories'] as $catid => $catname)
{
echo '<div class="checkbox"><label><input type="checkbox" name="categories[]" value="' . $catid . '" ';
if ( in_array($catid,$_SESSION['userdata']['categories']) )
{
echo ' checked="checked" ';
}
echo ' />' . $catname . '</label></div> ';
}
?>
</div>
</div>
<div class="form-group">
<label for="permissions" class="col-sm-5 control-label"><?php echo $hesklang['allow_feat']; ?>: <font class="important">*</font></label>
<div class="col-sm-7">
<?php
foreach ($hesk_settings['features'] as $k)
<?php
foreach ($hesk_settings['features'] as $k)
{
echo '<div class="checkbox"><label><input type="checkbox" name="features[]" value="' . $k . '" ';
if (in_array($k,$_SESSION['userdata']['features']))
{
echo '<div class="checkbox"><label><input type="checkbox" name="features[]" value="' . $k . '" ';
if (in_array($k,$_SESSION['userdata']['features']))
{
echo ' checked="checked" ';
}
echo ' />' . $hesklang[$k] . '</label></div> ';
echo ' checked="checked" ';
}
?>
</div>
</div>
</div>
<?php
if ($hesk_settings['autoassign'])
{
?>
<div class="form-group">
<label for="auto-assign" class="col-sm-5 control-label"><?php echo $hesklang['opt']; ?>:</label>
<div class="col-sm-7">
echo ' />' . $hesklang[$k] . '</label></div> ';
}
?>
<div class="checkbox">
<label><input type="checkbox" name="autoassign" value="Y" <?php if ( ! isset($_SESSION['userdata']['autoassign']) || $_SESSION['userdata']['autoassign'] == 1 ) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['user_aa']; ?></label>
<label><input type="checkbox" name="can_change_notification_settings" checked> <?php echo $hesklang['can_change_notification_settings']; ?> </label>
</div>
</div>
</div>
<?php } ?>
<div class="form-group">
<label for="signature" class="col-sm-5 control-label"><?php echo $hesklang['signature_max']; ?>:</label>
<div class="col-sm-7">
<textarea class="form-control" name="signature" rows="6" placeholder="<?php echo $hesklang['sig']; ?>" cols="40"><?php echo $_SESSION['userdata']['signature']; ?></textarea>
<?php echo $hesklang['sign_extra']; ?>
</div>
</div>
<div class="form-group">
<div class="col-sm-12" style="text-align: right">
<input type="hidden" name="a" value="new" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="submit" class="btn btn-default" value="<?php echo $hesklang['create_user']; ?>" />
<a class="btn btn-default" href="manage_users.php?a=reset_form"><?php echo $hesklang['refi']; ?></a>
</div>
</div>
</div>
<div class="form-group">
<label for="auto-assign" class="col-sm-5 control-label"><?php echo $hesklang['opt']; ?>:</label>
<div class="col-sm-7">
<?php
if ($hesk_settings['autoassign'])
{
?>
<div class="checkbox">
<label><input type="checkbox" name="autoassign" value="Y" <?php if ( ! isset($_SESSION['userdata']['autoassign']) || $_SESSION['userdata']['autoassign'] == 1 ) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['user_aa']; ?></label>
</div>
<?php } if ($_SESSION['can_manage_settings']) { ?>
<div class="checkbox">
<label><input type="checkbox" name="manage_settings"> <?php echo $hesklang['can_man_settings']; ?></label>
</div>
<?php } ?>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="signature" class="col-sm-5 control-label"><?php echo $hesklang['signature_max']; ?>:</label>
<div class="col-sm-7">
<textarea class="form-control" name="signature" rows="6" placeholder="<?php echo $hesklang['sig']; ?>" cols="40"><?php echo $_SESSION['userdata']['signature']; ?></textarea>
<?php echo $hesklang['sign_extra']; ?>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-right">
<input type="hidden" name="a" value="new" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="submit" class="btn btn-default" value="<?php echo $hesklang['create_user']; ?>" />
<a class="btn btn-default" href="manage_users.php?a=reset_form"><?php echo $hesklang['refi']; ?></a>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-7">
<div class="col-md-8">
<script language="Javascript" type="text/javascript"><!--
function confirm_delete()
{
@ -321,7 +323,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
hesk_handle_messages();
?>
<h3 style="padding-bottom:5px"><?php echo $hesklang['manage_users']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['users_intro']); ?>')"><i class="fa fa-question-circle" style="color:black"></i></a></h3>
<h3 style="padding-bottom:5px"><?php echo $hesklang['manage_users']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['users_intro']); ?>')"><i class="fa fa-question-circle settingsquestionmark"></i></a></h3>
<div class="footerWithBorder blankSpace"></div>
<table class="table table-hover">
@ -388,8 +390,10 @@ while ($myuser = hesk_dbFetchAssoc($res))
if ($myuser['id'] == $_SESSION['id'])
{
$edit_code = '<a href="profile.php"><i style="font-size: 16px" class="fa fa-pencil" data-toggle="tooltip" data-placement="top" title="'.$hesklang['edit'].'"></i></a>';
}
else
} elseif ($myuser['id'] == 1)
{
$edit_code = ' <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
} else
{
$edit_code = '<a href="manage_users.php?a=edit&amp;id='.$myuser['id'].'" data-toggle="tooltip" data-placement="top" title="'.$hesklang['edit'].'"><i style="font-size: 16px" class="fa fa-pencil"></i></a>';
}
@ -403,12 +407,11 @@ while ($myuser = hesk_dbFetchAssoc($res))
$myuser['isadmin'] = '<font class="resolved">'.$hesklang['no'].'</font>';
}
/* Deleting user with ID 1 (default administrator) is not allowed */
if ($myuser['id'] == 1)
/* Deleting user with ID 1 (default administrator) is not allowed. Also don't allow the logged in user to be deleted or inactivated */
if ($myuser['id'] == 1 || $myuser['id'] == $_SESSION['id'])
{
$remove_code = ' <img src="../img/blank.gif" width="16" height="16" alt="" style="padding:3px;border:none;" />';
}
else
} else
{
$remove_code = ' <a href="manage_users.php?a=remove&amp;id='.$myuser['id'].'&amp;token='.hesk_token_echo(0).'" onclick="return confirm_delete();" data-toggle="tooltip" data-placement="top" title="'.$hesklang['delete'].'"><i style="font-size: 16px; color: red" class="fa fa-times"></i></a>';
}
@ -430,6 +433,16 @@ while ($myuser = hesk_dbFetchAssoc($res))
$autoassign_code = '';
}
$activeMarkup = '';
if ($myuser['id'] != $_SESSION['id'] && $myuser['id'] != 1) {
/* Is the user active? */
if ($myuser['active']) {
$activeMarkup = '<a href="manage_users.php?a=active&amp;s=0&amp;id=' . $myuser['id'] . '&amp;token=' . hesk_token_echo(0) . '" data-toggle="tooltip" data-placement="top" title="' . $hesklang['disable_user'] . '"><i style="color: green; font-size: 16px" class="fa fa-user"></i></a>';
} else {
$activeMarkup = '<a href="manage_users.php?a=active&amp;s=1&amp;id=' . $myuser['id'] . '&amp;token=' . hesk_token_echo(0) . '" data-toggle="tooltip" data-placement="top" title="' . $hesklang['enable_user'] . '"><i style="color: gray; font-size: 16px" class="fa fa-user"></i></a>';
}
}
echo <<<EOC
<tr>
<td>$myuser[name]</td>
@ -446,7 +459,7 @@ if ($hesk_settings['rating'])
}
echo <<<EOC
<td>$autoassign_code $edit_code $remove_code</td>
<td>$autoassign_code $edit_code $remove_code $activeMarkup</td>
</tr>
EOC;
@ -532,11 +545,17 @@ function edit_user()
hesk_process_messages($hesklang['eyou'],'profile.php','NOTICE');
}
if ($id == 1)
{
hesk_process_messages($hesklang['cant_edit_admin'],'./manage_users.php');
}
$_SESSION['edit_userdata'] = TRUE;
if ( ! isset($_SESSION['save_userdata']))
{
$res = hesk_dbQuery("SELECT `user`,`pass`,`isadmin`,`name`,`email`,`signature`,`categories`,`autoassign`,`heskprivileges` AS `features` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `id`='".intval($id)."' LIMIT 1");
$res = hesk_dbQuery("SELECT `user`,`pass`,`isadmin`,`name`,`email`,`signature`,`categories`,`autoassign`,`heskprivileges` AS `features`, `can_manage_settings`, `active`, `can_change_notification_settings`
FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `id`='".intval($id)."' LIMIT 1");
$_SESSION['userdata'] = hesk_dbFetchAssoc($res);
/* Store original username for display until changes are saved successfully */
@ -676,21 +695,51 @@ function edit_user()
}
echo ' />' . $hesklang[$k] . '</label></div> ';
}
?>
$manageNotificationCheckboxState = '';
if (
isset($_SESSION['userdata']['can_change_notification_settings'])
&& $_SESSION['userdata']['can_change_notification_settings'] == 1)
{
$manageNotificationCheckboxState = 'checked';
}
?>
<div class="checkbox">
<label><input type="checkbox" name="can_change_notification_settings" <?php echo $manageNotificationCheckboxState; ?>>
<?php echo $hesklang['can_change_notification_settings']; ?>
</label>
</div>
</div>
</div>
</div>
<?php if ($hesk_settings['autoassign'])
{ ?>
<div class="form-group">
<label for="autoassign" class="col-sm-3 control-label"><?php echo $hesklang['opt']; ?>:</label>
<div class="col-sm-9">
<?php if ($hesk_settings['autoassign'])
{ ?>
<div class="checkbox">
<label><input type="checkbox" name="autoassign" value="Y" <?php if ( isset($_SESSION['userdata']['autoassign']) && $_SESSION['userdata']['autoassign'] == 1 ) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['user_aa']; ?></label>
</div>
</div>
<?php } if ($_GET['id'] != 1) { ?>
<div class="checkbox">
<?php if (isset($_SESSION['userdata']['can_manage_settings'])) { ?>
<label><input type="checkbox" name="manage_settings"
<?php if ($_SESSION['userdata']['can_manage_settings']) { echo 'checked="checked"';} ?>
<?php if (!$_SESSION['can_manage_settings']) { echo 'disabled'; } ?>> <?php echo $hesklang['can_man_settings']; ?></label>
<?php if (!$_SESSION['can_manage_settings'] && $_SESSION['userdata']['can_manage_settings']) {
echo '<input type="hidden" name="manage_settings" value="1">';
} ?>
<?php } ?>
</div>
<?php } else { ?>
<input type="hidden" name="manage_settings" value="1">
<?php } ?>
<div class="checkbox">
<label><input type="checkbox" name="active" <?php if ($_SESSION['userdata']['active']) { echo 'checked';} ?>> <?php echo $hesklang['active_user']; ?></label>
</div>
</div>
</div>
<?php } ?>
</div>
<div class="form-group">
<label for="signature" class="col-sm-3 control-label"><?php echo $hesklang['signature_max']; ?>:</label>
<div class="col-sm-9">
@ -760,7 +809,8 @@ function new_user()
$myuser['features'] = '';
}
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."users` (`user`,`pass`,`isadmin`,`name`,`email`,`signature`,`categories`,`autoassign`,`heskprivileges` $sql_where) VALUES (
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."users` (
`user`,`pass`,`isadmin`,`name`,`email`,`signature`,`categories`,`autoassign`,`heskprivileges`, `can_manage_settings`, `can_change_notification_settings` $sql_where) VALUES (
'".hesk_dbEscape($myuser['user'])."',
'".hesk_dbEscape($myuser['pass'])."',
'".intval($myuser['isadmin'])."',
@ -769,7 +819,9 @@ function new_user()
'".hesk_dbEscape($myuser['signature'])."',
'".hesk_dbEscape($myuser['categories'])."',
'".intval($myuser['autoassign'])."',
'".hesk_dbEscape($myuser['features'])."'
'".hesk_dbEscape($myuser['features'])."',
'".hesk_dbEscape($myuser['can_manage_settings'])."',
'".hesk_dbEscape($myuser['can_change_notification_settings'])."'
$sql_what )" );
$_SESSION['seluser'] = hesk_dbInsertID();
@ -801,15 +853,18 @@ function update_user()
$myuser = hesk_validateUserInfo(0,$_SERVER['PHP_SELF']);
$myuser['id'] = $tmp;
/* If can't view assigned changes this */
if (in_array('can_view_unassigned',$myuser['features']))
{
$sql_where = "";
}
else
{
$sql_where = " , `notify_new_unassigned`='0', `notify_reply_unassigned`='0' ";
}
/* Only active users can be assigned tickets */
if ($myuser['active']) {
/* If can't view assigned changes this */
if (in_array('can_view_unassigned', $myuser['features'])) {
$sql_where = "";
} else {
$sql_where = " , `notify_new_unassigned`='0', `notify_reply_unassigned`='0' ";
}
} else {
$myuser['autoassign'] = 0;
$sql_where = " , `notify_new_unassigned`='0', `notify_new_my`='0', `notify_reply_unassigned`='0', `notify_reply_my`='0', `notify_assigned`='0', `notify_pm`='0', `notify_note`='0' ";
}
/* Check for duplicate usernames */
$res = hesk_dbQuery("SELECT `id`,`isadmin`,`categories`,`heskprivileges` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `user` = '".hesk_dbEscape($myuser['user'])."' LIMIT 1");
@ -855,8 +910,11 @@ function update_user()
`signature`='".hesk_dbEscape($myuser['signature'])."'," . ( isset($myuser['pass']) ? "`pass`='".hesk_dbEscape($myuser['pass'])."'," : '' ) . "
`categories`='".hesk_dbEscape($myuser['categories'])."',
`isadmin`='".intval($myuser['isadmin'])."',
`active`='".intval($myuser['active'])."',
`autoassign`='".intval($myuser['autoassign'])."',
`heskprivileges`='".hesk_dbEscape($myuser['features'])."'
`heskprivileges`='".hesk_dbEscape($myuser['features'])."',
`can_manage_settings`='".hesk_dbEscape($myuser['can_manage_settings'])."',
`can_change_notification_settings`='".hesk_dbEscape($myuser['can_change_notification_settings'])."'
$sql_where
WHERE `id`='".intval($myuser['id'])."' LIMIT 1");
@ -877,8 +935,15 @@ function hesk_validateUserInfo($pass_required = 1, $redirect_to = './manage_user
$myuser['email'] = hesk_validateEmail( hesk_POST('email'), 'ERR', 0) or $hesk_error_buffer .= '<li>' . $hesklang['enter_valid_email'] . '</li>';
$myuser['user'] = hesk_input( hesk_POST('user') ) or $hesk_error_buffer .= '<li>' . $hesklang['enter_username'] . '</li>';
$myuser['isadmin'] = empty($_POST['isadmin']) ? 0 : 1;
$myuser['can_manage_settings'] = isset($_POST['manage_settings']) ? 1 : 0;
$myuser['signature'] = hesk_input( hesk_POST('signature') );
$myuser['autoassign'] = hesk_POST('autoassign') == 'Y' ? 1 : 0;
$myuser['active'] = empty($_POST['active']) ? 0 : 1;
$myuser['can_change_notification_settings'] = empty($_POST['can_change_notification_settings']) ? 0 : 1;
if ($myuser['isadmin'])
{
$myuser['can_change_notification_settings'] = 1;
}
/* If it's not admin at least one category and fature is required */
$myuser['categories'] = array();
@ -1037,4 +1102,38 @@ function toggle_autoassign()
hesk_process_messages($tmp,'./manage_users.php','SUCCESS');
} // End toggle_autoassign()
function toggle_active()
{
global $hesk_settings, $hesklang;
/* Security check */
hesk_token_check();
$myuser = intval(hesk_GET('id')) or hesk_error($hesklang['no_valid_id']);
$_SESSION['seluser'] = $myuser;
if (intval($myuser) == $_SESSION['id'])
{
//-- You can't deactivate yourself!
hesk_process_messages($hesklang['self_deactivation'], './manage_users.php');
}
if (intval(hesk_GET('s')))
{
$active = 1;
$tmp = $hesklang['user_activated'];
} else
{
$active = 0;
$tmp = $hesklang['user_deactivated'];
}
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` SET `active` = '".$active."' WHERE `id` = '".intval($myuser)."'");
if (hesk_dbAffectedRows() != 1) {
hesk_process_messages($hesklang['int_error'].': '.$hesklang['user_not_found'],'./manage_users.php');
}
hesk_process_messages($tmp,'./manage_users.php','SUCCESS');
}
?>

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -61,7 +61,7 @@ if (!isset($_SESSION['isnotice']))
/* List of users */
$admins = array();
$result = hesk_dbQuery("SELECT `id`,`name`,`isadmin`,`categories`,`heskprivileges` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` ORDER BY `id` ASC");
$result = hesk_dbQuery("SELECT `id`,`name`,`isadmin`,`categories`,`heskprivileges` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `active` = '1' ORDER BY `id` ASC");
while ($row=hesk_dbFetchAssoc($result))
{
/* Is this an administrator? */
@ -91,24 +91,18 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<li><a href="admin_main.php"><?php echo $hesk_settings['hesk_title']; ?></a></li>
<li class="active"><?php echo $hesklang['nti2']; ?></li>
</ol>
<div class="enclosingDashboard">
<div class="row">
<div align="left" class="col-md-4">
<div class="moreToLeft">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['quick_help']; ?></a></li>
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<p><?php echo $hesklang['nti3']; ?></p>
<br/>
<p><?php echo $hesklang['req_marked_with']; ?> <font class="important">*</font></p>
</div>
</div>
</div>
<div class="row" style="margin-top: 20px">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
<div class="panel-body">
<p><?php echo $hesklang['nti3']; ?></p>
<br/>
<p><?php echo $hesklang['req_marked_with']; ?> <font class="important">*</font></p>
</div>
</div>
</div>
<div class="col-md-7">
<div class="col-md-8">
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
@ -122,13 +116,19 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<?php if (in_array('name',$_SESSION['iserror'])) {echo '<div class="form-group has-error">';} else {echo '<div class="form-group">';} ?>
<label for="name" class="col-sm-3 control-label"><?php echo $hesklang['name']; ?>: <font class="important">*</font></label>
<div class="col-sm-9">
<input type="text" class="form-control" name="name" size="40" maxlength="30" value="<?php if (isset($_SESSION['as_name'])) {echo stripslashes(hesk_input($_SESSION['as_name']));} ?>" placeholder="<?php echo $hesklang['name']; ?>"/>
<input type="text" class="form-control" name="name" size="40" maxlength="30"
value="<?php if (isset($_SESSION['as_name'])) {echo stripslashes(hesk_input($_SESSION['as_name']));}
else if (isset($_GET['name'])) {echo hesk_GET('name');} ?>"
placeholder="<?php echo $hesklang['name']; ?>">
</div>
</div>
<?php if (in_array('email',$_SESSION['iserror'])) {echo '<div class="form-group has-error">';} elseif (in_array('email',$_SESSION['isnotice'])) {echo '<div class="form-group has-warning">';} else {echo '<div class="form-group">';} ?>
<label for="email" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?>: <font class="important">*</font></label>
<div class="form-group">
<label for="email" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?>: </label>
<div class="col-sm-9">
<input type="text" class="form-control" name="email" size="40" maxlength="255" value="<?php if (isset($_SESSION['as_email'])) {echo stripslashes(hesk_input($_SESSION['as_email']));} ?>" <?php if($hesk_settings['detect_typos']) { echo ' onblur="Javascript:hesk_suggestEmail(1)"'; } ?> placeholder="<?php echo $hesklang['email']; ?>"/>
<input type="text" class="form-control" name="email" size="40" maxlength="255"
value="<?php if (isset($_SESSION['as_email'])) {echo stripslashes(hesk_input($_SESSION['as_email']));}
else if (isset($_GET['email'])) {echo hesk_GET('email');} ?>" <?php if($hesk_settings['detect_typos']) { echo ' onblur="Javascript:hesk_suggestEmail(1)"'; } ?>
placeholder="<?php echo $hesklang['email']; ?>">
</div>
</div>
@ -160,10 +160,18 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<label for="priority" class="col-sm-3 control-label"><?php echo $hesklang['priority']; ?>: <font class="important">*</font></label>
<div class="col-sm-9">
<select name="priority" class="form-control">
<option value="3" <?php if(isset($_SESSION['as_priority']) && $_SESSION['as_priority']==3) {echo 'selected="selected"';} ?>><?php echo $hesklang['low']; ?></option>
<option value="2" <?php if(isset($_SESSION['as_priority']) && $_SESSION['as_priority']==2) {echo 'selected="selected"';} ?>><?php echo $hesklang['medium']; ?></option>
<option value="1" <?php if(isset($_SESSION['as_priority']) && $_SESSION['as_priority']==1) {echo 'selected="selected"';} ?>><?php echo $hesklang['high']; ?></option>
<option value="0" <?php if(isset($_SESSION['as_priority']) && $_SESSION['as_priority']==0) {echo 'selected="selected"';} ?>><?php echo $hesklang['critical']; ?></option>
<option value="3" <?php
if((isset($_SESSION['as_priority']) && $_SESSION['as_priority']==3)
|| (isset($_GET['priority']) && $_GET['priority']==3)) {echo 'selected="selected"';} ?>><?php echo $hesklang['low']; ?></option>
<option value="2" <?php
if((isset($_SESSION['as_priority']) && $_SESSION['as_priority']==2)
|| (isset($_GET['priority']) && $_GET['priority']==2)) {echo 'selected="selected"';} ?>><?php echo $hesklang['medium']; ?></option>
<option value="1" <?php
if((isset($_SESSION['as_priority']) && $_SESSION['as_priority']==1)
|| (isset($_GET['priority']) && $_GET['priority']==1)) {echo 'selected="selected"';} ?>><?php echo $hesklang['high']; ?></option>
<option value="0" <?php
if((isset($_SESSION['as_priority']) && $_SESSION['as_priority']==0)
|| (isset($_GET['priority']) && $_GET['priority']==0)) {echo 'selected="selected"';} ?>><?php echo $hesklang['critical']; ?></option>
</select>
</div>
</div>
@ -176,11 +184,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
if ($v['use'] && $v['place']==0)
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
// $v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
// Staff doesn't need to fill in required custom fields
$v['req'] = '';
if ($v['type'] == 'checkbox')
if ($v['type'] == 'checkbox' && !isset($_GET["c_$k"]))
{
$k_value = array();
if (isset($_SESSION["c_$k"]) && is_array($_SESSION["c_$k"]))
@ -195,6 +208,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
$k_value = stripslashes(hesk_input($_SESSION["c_$k"]));
}
elseif (isset($_GET["c_$k"]))
{
if ($v['type'] == 'checkbox')
{
$k_value = explode('-CHECKBOX-', $_GET["c_$k"]);
} else
{
$k_value = stripslashes(hesk_GET("c_$k"));
}
}
else
{
$k_value = '';
@ -257,11 +280,41 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
echo '</select></div></div>';
break;
case 'multiselect':
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
echo '<div class="form-group"><label for="'.$v['name'].'[]" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
<div class="col-sm-9"><select class="form-control" id="'.$v['name'].'" name="'.$k.'[]" '.$cls.' multiple>';
$options = explode('#HESK#',$v['value']);
foreach ($options as $option)
{
if (strlen($k_value) == 0 || $k_value == $option)
{
$k_value = $option;
$selected = 'selected="selected"';
}
else
{
$selected = '';
}
echo '<option '.$selected.'>'.$option.'</option>';
}
echo '</select>
<div class="btn-group" role="group">
<button type="button" class="btn btn-default" onclick="selectAll(\''.$v['name'].'\')">Select All</button>
<button type="button" class="btn btn-default" onclick="deselectAll(\''.$v['name'].'\')">Deselect All</button>
</div></div></div>';
break;
/* Checkbox */
case 'checkbox':
echo '<div class="form-group"><label class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label><div align="left" class="col-sm-9">';
$options = explode('#HESK#',$v['value']);
$options = explode('#HESK#',$v['value']);
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
foreach ($options as $option)
@ -295,6 +348,25 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div>';
break;
case 'date':
if (strlen($k_value) != 0)
{
$v['value'] = $k_value;
}
$cls = in_array($k,$_SESSION['iserror']) ? ' isError ' : '';
echo '
<div class="form-group">
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
<div class="col-sm-9">
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.$v['name'].'" id="'.$v['name'].'" name="'.$k.'" size="40"
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
<span class="help-block">'.$hesklang['date_format'].'</span>
</div>
</div>';
break;
/* Default text input */
default:
if (strlen($k_value) != 0)
@ -317,7 +389,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<?php if (in_array('subject',$_SESSION['iserror'])) {echo '<div class="form-group has-error">';} else {echo '<div class="form-group">';} ?>
<label for="subject" class="col-sm-3 control-label"><?php echo $hesklang['subject']; ?>: <font class="important">*</font></label>
<div class="col-sm-9">
<input class="form-control" type="text" name="subject" size="40" maxlength="40" value="<?php if (isset($_SESSION['as_subject'])) {echo stripslashes(hesk_input($_SESSION['as_subject']));} ?>" placeholder="<?php echo $hesklang['subject']; ?>" />
<input class="form-control" type="text" name="subject" size="40" maxlength="40" value="<?php if (isset($_SESSION['as_subject']) || isset($_GET['subject'])) {echo stripslashes(hesk_input($_SESSION['as_subject']));} ?>" placeholder="<?php echo $hesklang['subject']; ?>" />
</div>
</div>
<?php if (in_array('message',$_SESSION['iserror'])) {echo '<div class="form-group has-error">';} else {echo '<div class="form-group">';} ?>
@ -335,6 +407,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
if ($v['use'] && $v['place'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
// $v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
// Staff doesn't need to fill in required custom fields
$v['req'] = '';
@ -454,6 +531,56 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div>';
break;
case 'date':
if (strlen($k_value) != 0)
{
$v['value'] = $k_value;
}
$cls = in_array($k,$_SESSION['iserror']) ? ' isError ' : '';
echo '
<div class="form-group">
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
<div class="col-sm-9">
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.$v['name'].'" id="'.$v['name'].'" name="'.$k.'" size="40"
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
<span class="help-block">'.$hesklang['date_format'].'</span>
</div>
</div>';
break;
case 'multiselect':
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
echo '<div class="form-group"><label for="'.$v['name'].'[]" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
<div class="col-sm-9"><select class="form-control" id="'.$v['name'].'" name="'.$k.'[]" '.$cls.' multiple>';
$options = explode('#HESK#',$v['value']);
foreach ($options as $option)
{
if (strlen($k_value) == 0 || $k_value == $option)
{
$k_value = $option;
$selected = 'selected="selected"';
}
else
{
$selected = '';
}
echo '<option '.$selected.'>'.$option.'</option>';
}
echo '</select>
<div class="btn-group" role="group">
<button type="button" class="btn btn-default" onclick="selectAll(\''.$v['name'].'\')">Select All</button>
<button type="button" class="btn btn-default" onclick="deselectAll(\''.$v['name'].'\')">Deselect All</button>
</div></div></div>';
break;
/* Default text input */
default:
if (strlen($k_value) != 0)

@ -0,0 +1,323 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
* Copyright 2005-2014 Klemen Stirn. All Rights Reserved.
* HESK is a registered trademark of Klemen Stirn.
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden. To remove HESK copyright notice you must purchase
* a license for this script. For more information on how to obtain
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
define('IN_SCRIPT',1);
define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
$id = hesk_input( hesk_GET('i') );
$query = hesk_input( hesk_utf8_urldecode( hesk_GET('q') ) );
$type = hesk_input( hesk_GET('t', 'text') );
$maxlen = intval( hesk_GET('m', 255) );
$query = stripslashes($query);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML; 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title><?php echo $hesklang['opt']; ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=<?php echo $hesklang['ENCODING']; ?>" />
<style type="text/css">
body
{
margin:5px 5px;
padding:0;
background:#fff;
color: black;
font : 68.8%/1.5 Verdana, Geneva, Arial, Helvetica, sans-serif;
text-align:left;
}
p
{
color : black;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 1.0em;
}
h3
{
color : #AF0000;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 1.0em;
text-align:center;
}
.title
{
color : black;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 1.0em;
}
.wrong {color : red;}
.correct {color : green;}
</style>
</head>
<body>
<h3><?php echo $hesklang['opt']; ?></h3>
<p><i><?php echo $hesklang['ns']; ?></i></p>
<?php
switch ($type)
{
case 'text':
echo '
<script language="javascript">
function hesk_saveOptions()
{
window.opener.document.getElementById(\'s_'.$id.'_val\').value = document.getElementById(\'o2\').value;
window.opener.document.getElementById(\'s_'.$id.'_maxlen\').value = document.getElementById(\'o1\').value;
window.close();
}
</script>
<table border="0">
<tr>
<td>'.$hesklang['custom_l'].':<td>
<td><input type="text" name="o1" id="o1" value="'.$maxlen.'" size="30" /></td>
</tr>
<tr>
<td>'.$hesklang['defw'].':<td>
<td><input type="text" name="o2" id="o2" value="'.$query.'" size="30" /></td>
</tr>
</table>
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
';
break;
case 'textarea':
if (strpos($query,'#') !== false)
{
list($rows,$cols)=explode('#',$query);
}
else
{
$rows = '';
$cols = '';
}
echo '
<script language="javascript">
function hesk_saveOptions()
{
window.opener.document.getElementById(\'s_'.$id.'_val\').value = document.getElementById(\'o1\').value + "#" + document.getElementById(\'o2\').value;
window.close();
}
</script>
<table border="0">
<tr>
<td>'.$hesklang['rows'].':<td>
<td><input type="text" name="o1" id="o1" value="'.$rows.'" size="5" /></td>
</tr>
<tr>
<td>'.$hesklang['cols'].':<td>
<td><input type="text" name="o2" id="o2" value="'.$cols.'" size="5" /></td>
</tr>
</table>
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
';
break;
case 'radio':
$options=str_replace('#HESK#',"\n",$query);
echo '
<script language="javascript">
function hesk_saveOptions()
{
text = document.getElementById(\'o1\').value;
text = text.replace(/^\s\s*/, \'\').replace(/\s\s*$/, \'\');
text = escape(text);
if(text.indexOf(\'%0D%0A\') > -1)
{
re_nlchar = /%0D%0A/g ;
}
else if(text.indexOf(\'%0A\') > -1)
{
re_nlchar = /%0A/g ;
}
else if(text.indexOf(\'%0D\') > -1)
{
re_nlchar = /%0D/g ;
}
else
{
alert(\''.addslashes($hesklang['atl2']).'\');
return false;
}
text = unescape(text.replace(re_nlchar,\'#HESK#\'));
window.opener.document.getElementById(\'s_'.$id.'_val\').value = text;
window.close();
}
</script>
<p>'.$hesklang['opt2'].'</p>
<textarea name="o1" id="o1" rows="6" cols="40">'.$options.'</textarea>
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
';
break;
case 'select':
$options=str_replace('#HESK#',"\n",$query);
echo '
<script language="javascript">
function hesk_saveOptions()
{
text = document.getElementById(\'o1\').value;
text = text.replace(/^\s\s*/, \'\').replace(/\s\s*$/, \'\');
text = escape(text);
if(text.indexOf(\'%0D%0A\') > -1)
{
re_nlchar = /%0D%0A/g ;
}
else if(text.indexOf(\'%0A\') > -1)
{
re_nlchar = /%0A/g ;
}
else if(text.indexOf(\'%0D\') > -1)
{
re_nlchar = /%0D/g ;
}
else
{
alert(\''.addslashes($hesklang['atl2']).'\');
return false;
}
text = unescape(text.replace(re_nlchar,\'#HESK#\'));
window.opener.document.getElementById(\'s_'.$id.'_val\').value = text;
window.close();
}
</script>
<p>'.$hesklang['opt3'].'</p>
<textarea name="o1" id="o1" rows="6" cols="40">'.$options.'</textarea>
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
';
break;
case 'checkbox':
$options=str_replace('#HESK#',"\n",$query);
echo '
<script language="javascript">
function hesk_saveOptions()
{
text = document.getElementById(\'o1\').value;
text = text.replace(/^\s\s*/, \'\').replace(/\s\s*$/, \'\');
text = escape(text);
if(text.indexOf(\'%0D%0A\') > -1)
{
re_nlchar = /%0D%0A/g ;
}
else if(text.indexOf(\'%0A\') > -1)
{
re_nlchar = /%0A/g ;
}
else if(text.indexOf(\'%0D\') > -1)
{
re_nlchar = /%0D/g ;
}
else
{
alert(\''.addslashes($hesklang['atl2']).'\');
return false;
}
text = unescape(text.replace(re_nlchar,\'#HESK#\'));
window.opener.document.getElementById(\'s_'.$id.'_val\').value = text;
window.close();
}
</script>
<p>'.$hesklang['opt4'].'</p>
<textarea name="o1" id="o1" rows="6" cols="40">'.$options.'</textarea>
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
';
break;
case 'date':
echo '<p>'.$hesklang['date_custom_field_text'].'</p>';
break;
case 'multiselect':
$options=str_replace('#HESK#',"\n",$query);
echo '
<script language="javascript">
function hesk_saveOptions()
{
text = document.getElementById(\'o1\').value;
text = text.replace(/^\s\s*/, \'\').replace(/\s\s*$/, \'\');
text = escape(text);
if(text.indexOf(\'%0D%0A\') > -1)
{
re_nlchar = /%0D%0A/g ;
}
else if(text.indexOf(\'%0A\') > -1)
{
re_nlchar = /%0A/g ;
}
else if(text.indexOf(\'%0D\') > -1)
{
re_nlchar = /%0D/g ;
}
else
{
alert(\''.addslashes($hesklang['atl2']).'\');
return false;
}
text = unescape(text.replace(re_nlchar,\'#HESK#\'));
window.opener.document.getElementById(\'s_'.$id.'_val\').value = text;
window.close();
}
</script>
<p>'.$hesklang['multiple_select_custom_field_text'].'</p>
<textarea name="o1" id="o1" rows="6" cols="40">'.$options.'</textarea>
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
';
break;
default:
die('Invalid type');
}
?>
<p align="center"><a href="#" onclick="Javascript:window.close()"><?php echo $hesklang['cwin']; ?></a></p>
<p>&nbsp;</p>
</body>
</html>
<?php
exit();
?>

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -155,7 +155,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?>
<script language="javascript" type="text/javascript">
document.write('<?php echo str_replace(array('"','<','=','>'),array('\42','\74','\75','\76'),$str . '</form>'); ?>');
document.write('<?php echo str_replace(array('"','<','=','>',"'"),array('\42','\74','\75','\76','\47'),$str . '</form>'); ?>');
</script>
<noscript>
<?php
@ -228,11 +228,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
<?php echo $hesklang['sign_extra']; ?>
</div>
</div>
<h4><?php echo $hesklang['pref']; ?></h4>
<?php
if ($can_reply_tickets)
{
?>
<h4><?php echo $hesklang['pref']; ?></h4>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
<label for="afterreply" class="col-sm-3 control-label"><?php echo $hesklang['aftrep']; ?>:</label>
@ -256,54 +256,97 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div>
</div>
</div>
<div class="form-group">
<label for="default_notify_customer_email" class="col-sm-3 control-label"><?php echo $hesklang['notify_customer_email']; ?>:</label>
<div class="col-sm-9">
<div class="checkbox">
<label><input type="checkbox" name="default_notify_customer_email" value="1" <?php if (empty($_SESSION['new']['default_notify_customer_email'])) {echo 'checked="checked"';}?>> <?php echo $hesklang['notify_customer_email_text']; ?></label>
</div>
</div>
</div>
<?php } ?>
<div class="form-group">
<label for="autoRefresh" class="col-sm-3 control-label"><?php echo $hesklang['ticket_auto_refresh']; ?></label>
<div class="col-sm-9">
<input type="text" class="form-control" id="autorefresh" name="autorefresh" value="<?php echo $_SESSION['new']['autorefresh']; ?>">
<span class="help-block"><?php echo $hesklang['autorefresh_restrictions']; ?></span>
</div>
</div>
<h4><?php echo $hesklang['notn']; ?></h4>
<h6><?php echo $hesklang['nomw']; ?></h6>
<div class="footerWithBorder blankSpace"></div>
<?php $disabledText = isset($_SESSION['new']['can_change_notification_settings']) && $_SESSION['new']['can_change_notification_settings'] ? '' : 'disabled';
if ($disabledText == 'disabled') { ?>
<div class="alert alert-info"><?php echo $hesklang['notifications_disabled_info']; ?></div>
<?php }
?>
<div class="form-group">
<?php
if ($can_view_tickets)
{
if ($can_view_unassigned)
{
?>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_new_unassigned" value="1" <?php if (!empty($_SESSION['new']['notify_new_unassigned'])) {echo 'checked="checked"';}?> /> <?php echo $hesklang['nwts']; ?> <?php echo $hesklang['unas']; ?></label></div></div>
<?php
}
else
if ($can_view_unassigned)
{
?>
<input type="hidden" name="notify_new_unassigned" value="0" />
<?php
}
?>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_new_my" value="1" <?php if (!empty($_SESSION['new']['notify_new_my'])) {echo 'checked="checked"';}?> /> <?php echo $hesklang['nwts']; ?> <?php echo $hesklang['s_my']; ?></label></div></div>
<?php if ($can_view_unassigned)
{
?>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_reply_unassigned" value="1" <?php if (!empty($_SESSION['new']['notify_reply_unassigned'])) {echo 'checked="checked"';}?> /> <?php echo $hesklang['ncrt']; ?> <?php echo $hesklang['unas']; ?></label></div></div>
<?php
}
else
{
?>
<input type="hidden" name="notify_reply_unassigned" value="0" />
<?php
}
?>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_reply_my" value="1" <?php if (!empty($_SESSION['new']['notify_reply_my'])) {echo 'checked="checked"';}?> /> <?php echo $hesklang['ncrt']; ?> <?php echo $hesklang['s_my']; ?></label></div></div>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_assigned" value="1" <?php if (!empty($_SESSION['new']['notify_assigned'])) {echo 'checked="checked"';}?> /> <?php echo $hesklang['ntam']; ?></label></div></div>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_note" value="1" <?php if (!empty($_SESSION['new']['notify_note'])) {echo 'checked="checked"';}?> /> <?php echo $hesklang['ntnote']; ?></label></div></div>
<?php
} // END $can_view_tickets
?>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_new_unassigned" value="1" <?php if (!empty($_SESSION['new']['notify_new_unassigned'])) {echo 'checked="checked"';} echo ' '.$disabledText ?> /> <?php echo $hesklang['nwts']; ?> <?php echo $hesklang['unas']; ?></label></div></div>
<?php
if ($disabledText == 'disabled')
{ ?>
<input type="hidden" name="notify_new_unassigned" value="<?php echo !empty($_SESSION['new']['notify_new_unassigned']) ? '1' : '0'; ?>">
<?php }
}
else
{
?>
<input type="hidden" name="notify_new_unassigned" value="0" />
<?php
}
?>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_new_my" value="1" <?php if (!empty($_SESSION['new']['notify_new_my'])) {echo 'checked="checked"';} echo ' '.$disabledText ?> /> <?php echo $hesklang['nwts']; ?> <?php echo $hesklang['s_my']; ?></label></div></div>
<?php
if ($disabledText == 'disabled')
{ ?>
<input type="hidden" name="notify_new_my" value="<?php echo !empty($_SESSION['new']['notify_new_my']) ? '1' : '0'; ?>">
<?php }
if ($can_view_unassigned)
{
?>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_reply_unassigned" value="1" <?php if (!empty($_SESSION['new']['notify_reply_unassigned'])) {echo 'checked="checked"';} echo ' '.$disabledText ?> /> <?php echo $hesklang['ncrt']; ?> <?php echo $hesklang['unas']; ?></label></div></div>
<?php
if ($disabledText == 'disabled')
{ ?>
<input type="hidden" name="notify_reply_unassigned" value="<?php echo !empty($_SESSION['new']['notify_reply_unassigned']) ? '1' : '0'; ?>">
<?php }
}
else
{
?>
<input type="hidden" name="notify_reply_unassigned" value="0" />
<?php
}
?>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_reply_my" value="1" <?php if (!empty($_SESSION['new']['notify_reply_my'])) {echo 'checked="checked"';} echo ' '.$disabledText ?> /> <?php echo $hesklang['ncrt']; ?> <?php echo $hesklang['s_my']; ?></label></div></div>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_assigned" value="1" <?php if (!empty($_SESSION['new']['notify_assigned'])) {echo 'checked="checked"';} echo ' '.$disabledText ?> /> <?php echo $hesklang['ntam']; ?></label></div></div>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_note" value="1" <?php if (!empty($_SESSION['new']['notify_note'])) {echo 'checked="checked"';} echo ' '.$disabledText ?> /> <?php echo $hesklang['ntnote']; ?></label></div></div>
<?php
if ($disabledText == 'disabled')
{ ?>
<input type="hidden" name="notify_reply_my" value="<?php echo !empty($_SESSION['new']['notify_reply_my']) ? '1' : '0'; ?>">
<input type="hidden" name="notify_assigned" value="<?php echo !empty($_SESSION['new']['notify_assigned']) ? '1' : '0'; ?>">
<input type="hidden" name="notify_note" value="<?php echo !empty($_SESSION['new']['notify_note']) ? '1' : '0'; ?>">
<?php }
if ($_SESSION['isadmin']) { ?>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_note_unassigned" value="1" <?php if (!empty($_SESSION['new']['notify_note_unassigned'])) {echo 'checked="checked"';}?>> <?php echo $hesklang['notify_note_unassigned']; ?></label></div> </div>
<?php
}
}
?>
<div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_pm" value="1" <?php if (!empty($_SESSION['new']['notify_pm'])) {echo 'checked="checked"';}?> /> <?php echo $hesklang['npms']; ?></label></div></div>
</div>
<input type="hidden" name="action" value="update" />
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<div style="text-align: center"><input type="submit" class="btn btn-default" value="<?php echo $hesklang['update_profile']; ?>" class="orangebutton" /></div>
<div style="text-align: center"><input type="submit" class="btn btn-default" value="<?php echo $hesklang['update_profile']; ?>" /></div>
</form>
</div>
</div>
@ -394,6 +437,9 @@ function update_profile() {
/* Auto-start ticket timer */
$_SESSION['new']['autostart'] = isset($_POST['autostart']) ? 1 : 0;
/* Update auto-refresh time */
$_SESSION['new']['autorefresh'] = isset($_POST['autorefresh']) ? $_POST['autorefresh'] : 0;
/* Notifications */
$_SESSION['new']['notify_new_unassigned'] = empty($_POST['notify_new_unassigned']) || ! $can_view_unassigned ? 0 : 1;
$_SESSION['new']['notify_new_my'] = empty($_POST['notify_new_my']) ? 0 : 1;
@ -401,7 +447,9 @@ function update_profile() {
$_SESSION['new']['notify_reply_my'] = empty($_POST['notify_reply_my']) ? 0 : 1;
$_SESSION['new']['notify_assigned'] = empty($_POST['notify_assigned']) ? 0 : 1;
$_SESSION['new']['notify_note'] = empty($_POST['notify_note']) ? 0 : 1;
$_SESSION['new']['notify_note_unassigned'] = empty($_POST['notify_note_unassigned']) ? 0 : 1;
$_SESSION['new']['notify_pm'] = empty($_POST['notify_pm']) ? 0 : 1;
$_SESSION['new']['default_notify_customer_email'] = empty($_POST['default_notify_customer_email']) ? 1 : 0;
/* Any errors? */
if (strlen($hesk_error_buffer))
@ -424,13 +472,16 @@ function update_profile() {
$sql_pass ,
`afterreply`='".intval($_SESSION['new']['afterreply'])."' ,
`autostart`='".intval($_SESSION['new']['autostart'])."' ,
`autorefresh`='".intval($_SESSION['new']['autorefresh'])."' ,
`notify_new_unassigned`='".intval($_SESSION['new']['notify_new_unassigned'])."' ,
`notify_new_my`='".intval($_SESSION['new']['notify_new_my'])."' ,
`notify_reply_unassigned`='".intval($_SESSION['new']['notify_reply_unassigned'])."' ,
`notify_reply_my`='".intval($_SESSION['new']['notify_reply_my'])."' ,
`notify_assigned`='".intval($_SESSION['new']['notify_assigned'])."' ,
`notify_pm`='".intval($_SESSION['new']['notify_pm'])."',
`notify_note`='".intval($_SESSION['new']['notify_note'])."'
`notify_note`='".intval($_SESSION['new']['notify_note'])."',
`notify_note_unassigned`='".intval($_SESSION['new']['notify_note_unassigned'])."',
`default_notify_customer_email`='".intval($_SESSION['new']['default_notify_customer_email'])."'
WHERE `id`='".intval($_SESSION['id'])."' LIMIT 1"
);

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -58,12 +58,15 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?>
<div class="col-md-8 col-md-offset-2">
<div class="col-md-10 col-md-offset-1" style="margin-top: 20px">
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
?>
<h3 style="text-align: center"><?php echo $hesklang['tickets']; ?></h3>
<div class="panel panel-default">
<div class="panel-heading">
<h4><?php echo $hesklang['tickets']; ?> <span style="float: right; margin-top: -7px;"><a href="new_ticket.php" class="btn btn-success"><span class="glyphicon glyphicon-plus-sign"></span> New ticket</a></span></h4>
</div>
<?php
/* Print the list of tickets */
$is_search = 1;

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************

File diff suppressed because one or more lines are too long

@ -0,0 +1,510 @@
/*!
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
.datepicker {
padding: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
direction: ltr;
}
.datepicker-inline {
width: 220px;
}
.datepicker.datepicker-rtl {
direction: rtl;
}
.datepicker.datepicker-rtl table tr td span {
float: right;
}
.datepicker-dropdown {
top: 0;
left: 0;
}
.datepicker-dropdown:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-top: 0;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
}
.datepicker-dropdown:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
border-top: 0;
position: absolute;
}
.datepicker-dropdown.datepicker-orient-left:before {
left: 6px;
}
.datepicker-dropdown.datepicker-orient-left:after {
left: 7px;
}
.datepicker-dropdown.datepicker-orient-right:before {
right: 6px;
}
.datepicker-dropdown.datepicker-orient-right:after {
right: 7px;
}
.datepicker-dropdown.datepicker-orient-top:before {
top: -7px;
}
.datepicker-dropdown.datepicker-orient-top:after {
top: -6px;
}
.datepicker-dropdown.datepicker-orient-bottom:before {
bottom: -7px;
border-bottom: 0;
border-top: 7px solid #999;
}
.datepicker-dropdown.datepicker-orient-bottom:after {
bottom: -6px;
border-bottom: 0;
border-top: 6px solid #ffffff;
}
.datepicker > div {
display: none;
}
.datepicker.days div.datepicker-days {
display: block;
}
.datepicker.months div.datepicker-months {
display: block;
}
.datepicker.years div.datepicker-years {
display: block;
}
.datepicker table {
margin: 0;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.datepicker td,
.datepicker th {
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border: none;
}
.table-striped .datepicker table tr td,
.table-striped .datepicker table tr th {
background-color: transparent;
}
.datepicker table tr td.day:hover,
.datepicker table tr td.day.focused {
background: #eeeeee;
cursor: pointer;
}
.datepicker table tr td.old,
.datepicker table tr td.new {
color: #999999;
}
.datepicker table tr td.disabled,
.datepicker table tr td.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td.today,
.datepicker table tr td.today:hover,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today.disabled:hover {
background-color: #fde19a;
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
background-image: linear-gradient(top, #fdd49a, #fdf59a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
border-color: #fdf59a #fdf59a #fbed50;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #000;
}
.datepicker table tr td.today:hover,
.datepicker table tr td.today:hover:hover,
.datepicker table tr td.today.disabled:hover,
.datepicker table tr td.today.disabled:hover:hover,
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today:hover.disabled,
.datepicker table tr td.today.disabled.disabled,
.datepicker table tr td.today.disabled:hover.disabled,
.datepicker table tr td.today[disabled],
.datepicker table tr td.today:hover[disabled],
.datepicker table tr td.today.disabled[disabled],
.datepicker table tr td.today.disabled:hover[disabled] {
background-color: #fdf59a;
}
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active {
background-color: #fbf069 \9;
}
.datepicker table tr td.today:hover:hover {
color: #000;
}
.datepicker table tr td.today.active:hover {
color: #fff;
}
.datepicker table tr td.range,
.datepicker table tr td.range:hover,
.datepicker table tr td.range.disabled,
.datepicker table tr td.range.disabled:hover {
background: #eeeeee;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today,
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today.disabled:hover {
background-color: #f3d17a;
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
background-image: linear-gradient(top, #f3c17a, #f3e97a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
border-color: #f3e97a #f3e97a #edde34;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today:hover:hover,
.datepicker table tr td.range.today.disabled:hover,
.datepicker table tr td.range.today.disabled:hover:hover,
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today:hover.disabled,
.datepicker table tr td.range.today.disabled.disabled,
.datepicker table tr td.range.today.disabled:hover.disabled,
.datepicker table tr td.range.today[disabled],
.datepicker table tr td.range.today:hover[disabled],
.datepicker table tr td.range.today.disabled[disabled],
.datepicker table tr td.range.today.disabled:hover[disabled] {
background-color: #f3e97a;
}
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active {
background-color: #efe24b \9;
}
.datepicker table tr td.selected,
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected.disabled:hover {
background-color: #9e9e9e;
background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
background-image: -o-linear-gradient(top, #b3b3b3, #808080);
background-image: linear-gradient(top, #b3b3b3, #808080);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
border-color: #808080 #808080 #595959;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected:hover:hover,
.datepicker table tr td.selected.disabled:hover,
.datepicker table tr td.selected.disabled:hover:hover,
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected:hover.disabled,
.datepicker table tr td.selected.disabled.disabled,
.datepicker table tr td.selected.disabled:hover.disabled,
.datepicker table tr td.selected[disabled],
.datepicker table tr td.selected:hover[disabled],
.datepicker table tr td.selected.disabled[disabled],
.datepicker table tr td.selected.disabled:hover[disabled] {
background-color: #808080;
}
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active {
background-color: #666666 \9;
}
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.active:hover,
.datepicker table tr td.active:hover:hover,
.datepicker table tr td.active.disabled:hover,
.datepicker table tr td.active.disabled:hover:hover,
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active:hover.disabled,
.datepicker table tr td.active.disabled.disabled,
.datepicker table tr td.active.disabled:hover.disabled,
.datepicker table tr td.active[disabled],
.datepicker table tr td.active:hover[disabled],
.datepicker table tr td.active.disabled[disabled],
.datepicker table tr td.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span {
display: block;
width: 23%;
height: 54px;
line-height: 54px;
float: left;
margin: 1%;
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.datepicker table tr td span:hover {
background: #eeeeee;
}
.datepicker table tr td span.disabled,
.datepicker table tr td span.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td span.active,
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active:hover:hover,
.datepicker table tr td span.active.disabled:hover,
.datepicker table tr td span.active.disabled:hover:hover,
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active:hover.disabled,
.datepicker table tr td span.active.disabled.disabled,
.datepicker table tr td span.active.disabled:hover.disabled,
.datepicker table tr td span.active[disabled],
.datepicker table tr td span.active:hover[disabled],
.datepicker table tr td span.active.disabled[disabled],
.datepicker table tr td span.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span.old,
.datepicker table tr td span.new {
color: #999999;
}
.datepicker th.datepicker-switch {
width: 145px;
}
.datepicker thead tr:first-child th,
.datepicker tfoot tr th {
cursor: pointer;
}
.datepicker thead tr:first-child th:hover,
.datepicker tfoot tr th:hover {
background: #eeeeee;
}
.datepicker .cw {
font-size: 10px;
width: 12px;
padding: 0 2px 0 5px;
vertical-align: middle;
}
.datepicker thead tr:first-child th.cw {
cursor: default;
background-color: transparent;
}
.input-append.date .add-on i,
.input-prepend.date .add-on i {
cursor: pointer;
width: 16px;
height: 16px;
}
.input-daterange input {
text-align: center;
}
.input-daterange input:first-child {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.input-daterange input:last-child {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.input-daterange .add-on {
display: inline-block;
width: auto;
min-width: 16px;
height: 20px;
padding: 4px 5px;
font-weight: normal;
line-height: 20px;
text-align: center;
text-shadow: 0 1px 0 #ffffff;
vertical-align: middle;
background-color: #eeeeee;
border: 1px solid #ccc;
margin-left: -5px;
margin-right: -5px;
}
.datepicker.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
list-style: none;
background-color: #ffffff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
*border-right-width: 2px;
*border-bottom-width: 2px;
color: #333333;
font-size: 13px;
line-height: 20px;
}
.datepicker.dropdown-menu th,
.datepicker.datepicker-inline th,
.datepicker.dropdown-menu td,
.datepicker.datepicker-inline td {
padding: 4px 5px;
}

@ -1,23 +1,86 @@
<?php
header("Content-type: text/css; charset: UTF-8");
require_once('../nuMods_settings.inc.php');
require_once('../modsForHesk_settings.inc.php');
$navbarBackgroundColor = $nuMods_settings['navbarBackgroundColor'];
$navbarBrandColor = $nuMods_settings['navbarBrandColor'];
$navbarBrandHoverColor = $nuMods_settings['navbarBrandHoverColor'];
$navbarBackgroundColor = $modsForHesk_settings['navbarBackgroundColor'];
$navbarBrandColor = $modsForHesk_settings['navbarBrandColor'];
$navbarBrandHoverColor = $modsForHesk_settings['navbarBrandHoverColor'];
$navbarItemTextColor = $nuMods_settings['navbarItemTextColor'];
$navbarItemTextHoverColor = $nuMods_settings['navbarItemTextHoverColor'];
$navbarItemTextSelectedColor = $nuMods_settings['navbarItemTextSelectedColor'];
$navbarItemSelectedBackgroundColor = $nuMods_settings['navbarItemSelectedBackgroundColor'];
$navbarItemTextColor = $modsForHesk_settings['navbarItemTextColor'];
$navbarItemTextHoverColor = $modsForHesk_settings['navbarItemTextHoverColor'];
$navbarItemTextSelectedColor = $modsForHesk_settings['navbarItemTextSelectedColor'];
$navbarItemSelectedBackgroundColor = $modsForHesk_settings['navbarItemSelectedBackgroundColor'];
$dropdownItemTextColor = $nuMods_settings['dropdownItemTextColor'];
$dropdownItemTextHoverColor = $nuMods_settings['dropdownItemTextHoverColor'];
$dropdownItemTextHoverBackgroundColor = $nuMods_settings['dropdownItemTextHoverBackgroundColor'];
$dropdownItemTextColor = $modsForHesk_settings['dropdownItemTextColor'];
$dropdownItemTextHoverColor = $modsForHesk_settings['dropdownItemTextHoverColor'];
$dropdownItemTextHoverBackgroundColor = $modsForHesk_settings['dropdownItemTextHoverBackgroundColor'];
$questionMarkColor = $nuMods_settings['questionMarkColor'];
$questionMarkColor = $modsForHesk_settings['questionMarkColor'];
?>
.nu-rtlFloatLeft {
/* Don't do anything; the pager looks good already */
}
.nu-floatRight {
float: right;
}
.tabPadding {
padding: 10px;
}
@media (max-width:991px) {
.close-ticket {
text-align: left;
}
}
@media (min-width:992px) {
.close-ticket {
text-align: right;
padding-bottom: 5px;
}
}
@media (max-width:991px) {
.ticket-cell {
border-bottom: solid 1px #ddd;
border-right: 0;
padding-top: 5px;
}
}
@media (max-width:991px) {
.ticket-cell-admin {
border-bottom: solid 1px #ddd;
border-right: 0;
padding-top: 5px;
height: 100px;
}
}
@media (min-width:992px) {
.ticket-cell {
border-bottom: 0;
border-right: solid 1px #ddd;
margin-top: 1px;
min-height: 70px;
padding-top: 10px;
}
}
@media (min-width:992px) {
.ticket-cell-admin {
border-bottom: 0;
border-right: solid 1px #ddd;
margin-top: 1px;
height: 100px;
padding-top: 10px;
}
}
.row {
margin-left: 0px;
margin-right: 0px;
@ -61,9 +124,6 @@
color: <?php echo $questionMarkColor; ?>;
font-size: 14px;
}
.settingsquestionmark:hover {
text-decoration: underline;
}
.h3questionmark {
color: <?php echo $questionMarkColor; ?>;
font-size: 14px;
@ -148,11 +208,27 @@
font-size: 11px;
text-transform: uppercase;
}
@media (min-width: 992px) {
.ticketPropertyText {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ticketPropertyText:hover {
white-space: normal;
overflow: none;
}
}
.ticketPropertyText {
font-size: 16px;
line-height: 1em;
color: #fff;
padding-bottom: 2px;
}
.criticalPriority {
background-color: red;
}
@ -212,16 +288,6 @@ div.rightSideDash {
padding-left: 18px;
padding-right: 18px;
}
div.enclosingDashboard {
margin-left: 50px;
margin-right: 50px;
}
.moreToLeft {
margin-right: 25px;
}
.viewTicketSidebar {
padding: 25px;
}
div.enclosing {
background-color: #fff;
color: #4a5571;
@ -292,3 +358,14 @@ div.setupButtons {
margin-right: auto;
width: 90%;
}
@media (min-width: 768px) {
.float-right-sm {
float: right;
}
}
.white-readonly {
cursor: text !important;
background-color: #fff !important;
}

@ -0,0 +1,365 @@
<?php
header("Content-type: text/css; charset: UTF-8");
require_once('../modsForHesk_settings.inc.php');
$navbarBackgroundColor = $modsForHesk_settings['navbarBackgroundColor'];
$navbarBrandColor = $modsForHesk_settings['navbarBrandColor'];
$navbarBrandHoverColor = $modsForHesk_settings['navbarBrandHoverColor'];
$navbarItemTextColor = $modsForHesk_settings['navbarItemTextColor'];
$navbarItemTextHoverColor = $modsForHesk_settings['navbarItemTextHoverColor'];
$navbarItemTextSelectedColor = $modsForHesk_settings['navbarItemTextSelectedColor'];
$navbarItemSelectedBackgroundColor = $modsForHesk_settings['navbarItemSelectedBackgroundColor'];
$dropdownItemTextColor = $modsForHesk_settings['dropdownItemTextColor'];
$dropdownItemTextHoverColor = $modsForHesk_settings['dropdownItemTextHoverColor'];
$dropdownItemTextHoverBackgroundColor = $modsForHesk_settings['dropdownItemTextHoverBackgroundColor'];
$questionMarkColor = $modsForHesk_settings['questionMarkColor'];
?>
.nu-rtlFloatLeft {
float: left;
}
.nu-floatRight {
float: left;
}
.tabPadding {
padding: 10px;
}
@media (max-width:991px) {
.close-ticket {
text-align: right;
}
}
@media (min-width:992px) {
.close-ticket {
text-align: left;
padding-bottom: 5px;
}
}
@media (max-width:991px) {
.ticket-cell {
border-bottom: solid 1px #ddd;
border-left: 0;
padding-top: 5px;
}
}
@media (max-width:991px) {
.ticket-cell-admin {
border-bottom: solid 1px #ddd;
border-left: 0;
padding-top: 5px;
height: 100px;
}
}
@media (min-width:992px) {
.ticket-cell {
border-bottom: 0;
border-left: solid 1px #ddd;
margin-top: 1px;
min-height: 70px;
padding-top: 10px;
}
}
@media (min-width:992px) {
.ticket-cell-admin {
border-bottom: 0;
border-left: solid 1px #ddd;
margin-top: 1px;
height: 100px;
padding-top: 10px;
}
}
.row {
margin-right: 0px;
margin-left: 0px;
}
.navbar {
margin-bottom: 0;
}
.navbar-default {
background-color: <?php echo $navbarBackgroundColor; ?>;
background-image: none;
filter: none;
}
.navbar-default .navbar-brand {
color: <?php echo $navbarBrandColor; ?>;
}
.navbar-default .navbar-brand:focus, .navbar-default .navbar-brand:hover {
color: <?php echo $navbarBrandHoverColor; ?>;
background-color: transparent;
}
.navbar-default .navbar-nav>li>a {
color: <?php echo $navbarItemTextColor; ?>;
}
.navbar-default .navbar-nav>li>a:focus, .navbar-default .navbar-nav>li>a:hover {
color: <?php echo $navbarItemTextHoverColor; ?>;
background-color: transparent;
}
.dropdown-menu>li>a {
color: <?php echo $dropdownItemTextColor; ?>;
}
.dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover {
color: <?php echo $dropdownItemTextHoverColor; ?>;
text-decoration: none;
background-color: <?php echo $dropdownItemTextHoverBackgroundColor; ?>;
}
.navbar-default .navbar-nav>.open>a, .navbar-default .navbar-nav>.open>a:focus, .navbar-default .navbar-nav>.open>a:hover {
color: <?php echo $navbarItemTextSelectedColor; ?>;
background-color: <?php echo $navbarItemSelectedBackgroundColor; ?>;
}
.settingsquestionmark {
color: <?php echo $questionMarkColor; ?>;
font-size: 14px;
}
.settingsquestionmark:hover {
text-decoration: underline;
}
.h3questionmark {
color: <?php echo $questionMarkColor; ?>;
font-size: 14px;
}
.h3questionmark:hover {
text-decoration: underline;
}
.form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.loginError {
width: 40%;
padding: 20px;
margin-right: auto;
margin-left: auto;
}
.kbContent {
padding-top: 10px;
text-align: right;
}
.withBorder {
border-bottom: 1px solid #ddd;
}
.ticketMessageContainer {
background-color: #ededef;
border: 1px solid #ddd;
margin-bottom: 20px;
}
.ticketName {
font-size: 20px;
font-weight: 300;
color: #000;
margin-top: 5px;
}
.ticketEmail {
font-size: 14px;
color: #888;
}
.ticketMessageTop {
padding-top: 10px;
padding-right: 10px;
padding-left: 10px;
margin-left: -15px;
color: #888;
background-color: #fff;
}
.pushMargin {
margin-top: -10px;
margin-bottom: -10px;
}
.pushMarginLeft {
margin-right: -15px;
margin-left: -15px;
padding-left: 0;
}
.ticketMessageBottom {
padding-right: 10px;
padding-left: 10px;
margin-left: -15px;
word-wrap: break-word;
font-size: 15px;
background-color: #fff;
}
.ticketMessageBottom > p.message {
margin-bottom: 0px;
}
.ticketMessage {
margin-right: 238px;
background: #fff;
height: 100%;
position: relative;
}
.ticketPropertyTitle {
color: rgba(255, 255, 255, .75);
font-size: 11px;
text-transform: uppercase;
}
@media (min-width: 992px) {
.ticketPropertyText {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ticketPropertyText:hover {
white-space: normal;
overflow: none;
}
}
.ticketPropertyText {
font-size: 16px;
line-height: 1em;
color: #fff;
}
.criticalPriority {
background-color: red;
}
.highPriority {
background-color: #ff6a00;
}
.medLowPriority {
background-color: #8BB467;
}
div.blankSpace {
padding-top: 20px;
}
div.footerWithBorder {
border-top: 1px solid #cfd4d6;
}
.blockRow > a:hover {
text-decoration: none;
}
.block {
height: 114px;
width: 114px;
display: inline-block;
border: 1px solid #c9cfd7;
background-color: #fff;
border-radius: 4px;
font-size: .83em;
margin-left: 5px;
vertical-align: top;
}
.block > .upper {
height:57px;
padding-top:10px;
}
.block > .upper > img {
padding-top:5px;
padding-bottom:5px;
padding-right:41px;
}
.block > .lower {
height:57px;
text-align:center;
}
.block > .lower > p:hover {
text-decoration: underline;
}
div.block:hover {
background-color: #e9ecef;
}
div.rightSideDash {
padding-right: 18px;
padding-left: 18px;
}
div.enclosing {
background-color: #fff;
color: #4a5571;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
width: 100%}
div.headersm {
width: 100%;
color: #fff;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
text-align: right;
background-color: #424b5c;
background-repeat: repeat-x;
padding: 12px 20px 8px;
margin: 0;
font-weight: 700;
padding-right: 20px;
}
div.installWarning {
width: 70%;
height: 52px;
margin-top: 10px;
margin-right: auto;
margin-left: auto;
}
div.setupContainer {
margin: 50px;
text-align: center;
}
div.setupLogo {
vertical-align: middle;
border: 0;
margin-top: -2px;
}
div.setupButtons {
text-decoration: none;
border: 4px solid #eee;
background: #fff;
border-radius: 5px;
color: #61718c;
-webkit-box-shadow: rgba(0, 0, 0, .1)0 0 3px;
-moz-box-shadow: rgba(0, 0, 0, .1)0 0 3px;
text-align: center;
margin: 20px 0;
padding: 10px 0;
}
.agreementBox {
position: relative;
background-color: #fff;
overflow: auto;
padding: 20px;
display: block;
height: 206px;
box-shadow: inset 0 0 4px #bbb, inset 0 0 20px #eee;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.summaryList {
border-style: solid;
border-width: 1px;
border-color: #ddd;
border-top-color: transparent;
}
.installRequirements {
margin-right: auto;
margin-left: auto;
width: 90%;
}
@media (min-width: 768px) {
.float-right-sm {
float: left;
}
}

235
css/octicons.css vendored

@ -0,0 +1,235 @@
@font-face {
font-family: 'octicons';
src: url('octicons.eot?#iefix') format('embedded-opentype'),
url('../fonts/octicons.woff') format('woff'),
url('../fonts/octicons.ttf') format('truetype'),
url('octicons.svg#octicons') format('svg');
font-weight: normal;
font-style: normal;
}
/*
.octicon is optimized for 16px.
.mega-octicon is optimized for 32px but can be used larger.
*/
.octicon, .mega-octicon {
font: normal normal normal 16px/1 octicons;
display: inline-block;
text-decoration: none;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.mega-octicon { font-size: 32px; }
.octicon-alert:before { content: '\f02d'} /*  */
.octicon-alignment-align:before { content: '\f08a'} /*  */
.octicon-alignment-aligned-to:before { content: '\f08e'} /*  */
.octicon-alignment-unalign:before { content: '\f08b'} /*  */
.octicon-arrow-down:before { content: '\f03f'} /*  */
.octicon-arrow-left:before { content: '\f040'} /*  */
.octicon-arrow-right:before { content: '\f03e'} /*  */
.octicon-arrow-small-down:before { content: '\f0a0'} /*  */
.octicon-arrow-small-left:before { content: '\f0a1'} /*  */
.octicon-arrow-small-right:before { content: '\f071'} /*  */
.octicon-arrow-small-up:before { content: '\f09f'} /*  */
.octicon-arrow-up:before { content: '\f03d'} /*  */
.octicon-beer:before { content: '\f069'} /*  */
.octicon-book:before { content: '\f007'} /*  */
.octicon-bookmark:before { content: '\f07b'} /*  */
.octicon-briefcase:before { content: '\f0d3'} /*  */
.octicon-broadcast:before { content: '\f048'} /*  */
.octicon-browser:before { content: '\f0c5'} /*  */
.octicon-bug:before { content: '\f091'} /*  */
.octicon-calendar:before { content: '\f068'} /*  */
.octicon-check:before { content: '\f03a'} /*  */
.octicon-checklist:before { content: '\f076'} /*  */
.octicon-chevron-down:before { content: '\f0a3'} /*  */
.octicon-chevron-left:before { content: '\f0a4'} /*  */
.octicon-chevron-right:before { content: '\f078'} /*  */
.octicon-chevron-up:before { content: '\f0a2'} /*  */
.octicon-circle-slash:before { content: '\f084'} /*  */
.octicon-circuit-board:before { content: '\f0d6'} /*  */
.octicon-clippy:before { content: '\f035'} /*  */
.octicon-clock:before { content: '\f046'} /*  */
.octicon-cloud-download:before { content: '\f00b'} /*  */
.octicon-cloud-upload:before { content: '\f00c'} /*  */
.octicon-code:before { content: '\f05f'} /*  */
.octicon-color-mode:before { content: '\f065'} /*  */
.octicon-comment-add:before,
.octicon-comment:before { content: '\f02b'} /*  */
.octicon-comment-discussion:before { content: '\f04f'} /*  */
.octicon-credit-card:before { content: '\f045'} /*  */
.octicon-dash:before { content: '\f0ca'} /*  */
.octicon-dashboard:before { content: '\f07d'} /*  */
.octicon-database:before { content: '\f096'} /*  */
.octicon-device-camera:before { content: '\f056'} /*  */
.octicon-device-camera-video:before { content: '\f057'} /*  */
.octicon-device-desktop:before { content: '\f27c'} /*  */
.octicon-device-mobile:before { content: '\f038'} /*  */
.octicon-diff:before { content: '\f04d'} /*  */
.octicon-diff-added:before { content: '\f06b'} /*  */
.octicon-diff-ignored:before { content: '\f099'} /*  */
.octicon-diff-modified:before { content: '\f06d'} /*  */
.octicon-diff-removed:before { content: '\f06c'} /*  */
.octicon-diff-renamed:before { content: '\f06e'} /*  */
.octicon-ellipsis:before { content: '\f09a'} /*  */
.octicon-eye-unwatch:before,
.octicon-eye-watch:before,
.octicon-eye:before { content: '\f04e'} /*  */
.octicon-file-binary:before { content: '\f094'} /*  */
.octicon-file-code:before { content: '\f010'} /*  */
.octicon-file-directory:before { content: '\f016'} /*  */
.octicon-file-media:before { content: '\f012'} /*  */
.octicon-file-pdf:before { content: '\f014'} /*  */
.octicon-file-submodule:before { content: '\f017'} /*  */
.octicon-file-symlink-directory:before { content: '\f0b1'} /*  */
.octicon-file-symlink-file:before { content: '\f0b0'} /*  */
.octicon-file-text:before { content: '\f011'} /*  */
.octicon-file-zip:before { content: '\f013'} /*  */
.octicon-flame:before { content: '\f0d2'} /*  */
.octicon-fold:before { content: '\f0cc'} /*  */
.octicon-gear:before { content: '\f02f'} /*  */
.octicon-gift:before { content: '\f042'} /*  */
.octicon-gist:before { content: '\f00e'} /*  */
.octicon-gist-secret:before { content: '\f08c'} /*  */
.octicon-git-branch-create:before,
.octicon-git-branch-delete:before,
.octicon-git-branch:before { content: '\f020'} /*  */
.octicon-git-commit:before { content: '\f01f'} /*  */
.octicon-git-compare:before { content: '\f0ac'} /*  */
.octicon-git-merge:before { content: '\f023'} /*  */
.octicon-git-pull-request-abandoned:before,
.octicon-git-pull-request:before { content: '\f009'} /*  */
.octicon-globe:before { content: '\f0b6'} /*  */
.octicon-graph:before { content: '\f043'} /*  */
.octicon-heart:before { content: '\2665'} /* ♥ */
.octicon-history:before { content: '\f07e'} /*  */
.octicon-home:before { content: '\f08d'} /*  */
.octicon-horizontal-rule:before { content: '\f070'} /*  */
.octicon-hourglass:before { content: '\f09e'} /*  */
.octicon-hubot:before { content: '\f09d'} /*  */
.octicon-inbox:before { content: '\f0cf'} /*  */
.octicon-info:before { content: '\f059'} /*  */
.octicon-issue-closed:before { content: '\f028'} /*  */
.octicon-issue-opened:before { content: '\f026'} /*  */
.octicon-issue-reopened:before { content: '\f027'} /*  */
.octicon-jersey:before { content: '\f019'} /*  */
.octicon-jump-down:before { content: '\f072'} /*  */
.octicon-jump-left:before { content: '\f0a5'} /*  */
.octicon-jump-right:before { content: '\f0a6'} /*  */
.octicon-jump-up:before { content: '\f073'} /*  */
.octicon-key:before { content: '\f049'} /*  */
.octicon-keyboard:before { content: '\f00d'} /*  */
.octicon-law:before { content: '\f0d8'} /* */
.octicon-light-bulb:before { content: '\f000'} /*  */
.octicon-link:before { content: '\f05c'} /*  */
.octicon-link-external:before { content: '\f07f'} /*  */
.octicon-list-ordered:before { content: '\f062'} /*  */
.octicon-list-unordered:before { content: '\f061'} /*  */
.octicon-location:before { content: '\f060'} /*  */
.octicon-gist-private:before,
.octicon-mirror-private:before,
.octicon-git-fork-private:before,
.octicon-lock:before { content: '\f06a'} /*  */
.octicon-logo-github:before { content: '\f092'} /*  */
.octicon-mail:before { content: '\f03b'} /*  */
.octicon-mail-read:before { content: '\f03c'} /*  */
.octicon-mail-reply:before { content: '\f051'} /*  */
.octicon-mark-github:before { content: '\f00a'} /*  */
.octicon-markdown:before { content: '\f0c9'} /*  */
.octicon-megaphone:before { content: '\f077'} /*  */
.octicon-mention:before { content: '\f0be'} /*  */
.octicon-microscope:before { content: '\f089'} /*  */
.octicon-milestone:before { content: '\f075'} /*  */
.octicon-mirror-public:before,
.octicon-mirror:before { content: '\f024'} /*  */
.octicon-mortar-board:before { content: '\f0d7'} /* */
.octicon-move-down:before { content: '\f0a8'} /*  */
.octicon-move-left:before { content: '\f074'} /*  */
.octicon-move-right:before { content: '\f0a9'} /*  */
.octicon-move-up:before { content: '\f0a7'} /*  */
.octicon-mute:before { content: '\f080'} /*  */
.octicon-no-newline:before { content: '\f09c'} /*  */
.octicon-octoface:before { content: '\f008'} /*  */
.octicon-organization:before { content: '\f037'} /*  */
.octicon-package:before { content: '\f0c4'} /*  */
.octicon-paintcan:before { content: '\f0d1'} /*  */
.octicon-pencil:before { content: '\f058'} /*  */
.octicon-person-add:before,
.octicon-person-follow:before,
.octicon-person:before { content: '\f018'} /*  */
.octicon-pin:before { content: '\f041'} /*  */
.octicon-playback-fast-forward:before { content: '\f0bd'} /*  */
.octicon-playback-pause:before { content: '\f0bb'} /*  */
.octicon-playback-play:before { content: '\f0bf'} /*  */
.octicon-playback-rewind:before { content: '\f0bc'} /*  */
.octicon-plug:before { content: '\f0d4'} /*  */
.octicon-repo-create:before,
.octicon-gist-new:before,
.octicon-file-directory-create:before,
.octicon-file-add:before,
.octicon-plus:before { content: '\f05d'} /*  */
.octicon-podium:before { content: '\f0af'} /*  */
.octicon-primitive-dot:before { content: '\f052'} /*  */
.octicon-primitive-square:before { content: '\f053'} /*  */
.octicon-pulse:before { content: '\f085'} /*  */
.octicon-puzzle:before { content: '\f0c0'} /*  */
.octicon-question:before { content: '\f02c'} /*  */
.octicon-quote:before { content: '\f063'} /*  */
.octicon-radio-tower:before { content: '\f030'} /*  */
.octicon-repo-delete:before,
.octicon-repo:before { content: '\f001'} /*  */
.octicon-repo-clone:before { content: '\f04c'} /*  */
.octicon-repo-force-push:before { content: '\f04a'} /*  */
.octicon-gist-fork:before,
.octicon-repo-forked:before { content: '\f002'} /*  */
.octicon-repo-pull:before { content: '\f006'} /*  */
.octicon-repo-push:before { content: '\f005'} /*  */
.octicon-rocket:before { content: '\f033'} /*  */
.octicon-rss:before { content: '\f034'} /*  */
.octicon-ruby:before { content: '\f047'} /*  */
.octicon-screen-full:before { content: '\f066'} /*  */
.octicon-screen-normal:before { content: '\f067'} /*  */
.octicon-search-save:before,
.octicon-search:before { content: '\f02e'} /*  */
.octicon-server:before { content: '\f097'} /*  */
.octicon-settings:before { content: '\f07c'} /*  */
.octicon-log-in:before,
.octicon-sign-in:before { content: '\f036'} /*  */
.octicon-log-out:before,
.octicon-sign-out:before { content: '\f032'} /*  */
.octicon-split:before { content: '\f0c6'} /*  */
.octicon-squirrel:before { content: '\f0b2'} /*  */
.octicon-star-add:before,
.octicon-star-delete:before,
.octicon-star:before { content: '\f02a'} /*  */
.octicon-steps:before { content: '\f0c7'} /*  */
.octicon-stop:before { content: '\f08f'} /*  */
.octicon-repo-sync:before,
.octicon-sync:before { content: '\f087'} /*  */
.octicon-tag-remove:before,
.octicon-tag-add:before,
.octicon-tag:before { content: '\f015'} /*  */
.octicon-telescope:before { content: '\f088'} /*  */
.octicon-terminal:before { content: '\f0c8'} /*  */
.octicon-three-bars:before { content: '\f05e'} /*  */
.octicon-tools:before { content: '\f031'} /*  */
.octicon-trashcan:before { content: '\f0d0'} /*  */
.octicon-triangle-down:before { content: '\f05b'} /*  */
.octicon-triangle-left:before { content: '\f044'} /*  */
.octicon-triangle-right:before { content: '\f05a'} /*  */
.octicon-triangle-up:before { content: '\f0aa'} /*  */
.octicon-unfold:before { content: '\f039'} /*  */
.octicon-unmute:before { content: '\f0ba'} /*  */
.octicon-versions:before { content: '\f064'} /*  */
.octicon-remove-close:before,
.octicon-x:before { content: '\f081'} /*  */
.octicon-zap:before { content: '\26A1'} /* ⚡ */

Binary file not shown.

@ -0,0 +1,198 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
(c) 2012-2014 GitHub
When using the GitHub logos, be sure to follow the GitHub logo guidelines (https://github.com/logos)
Font License: SIL OFL 1.1 (http://scripts.sil.org/OFL)
Applies to all font files
Code License: MIT (http://choosealicense.com/licenses/mit/)
Applies to all other files
</metadata>
<defs>
<font id="octicons" horiz-adv-x="1024" >
<font-face font-family="octicons" font-weight="400" font-stretch="normal" units-per-em="1024" ascent="832" descent="-192" />
<missing-glyph d="M512 832C229.25 832 0 602.75 0 320c0-226.25 146.688-418.125 350.156-485.812 25.594-4.688 34.938 11.125 34.938 24.625 0 12.188-0.469 52.562-0.719 95.312C242-76.81200000000001 211.906 14.5 211.906 14.5c-23.312 59.125-56.844 74.875-56.844 74.875-46.531 31.75 3.53 31.125 3.53 31.125 51.406-3.562 78.47-52.75 78.47-52.75 45.688-78.25 119.875-55.625 149-42.5 4.654 33 17.904 55.625 32.5 68.375C304.906 106.56200000000001 185.344 150.5 185.344 346.688c0 55.938 19.969 101.562 52.656 137.406-5.219 13-22.844 65.094 5.062 135.562 0 0 42.938 13.75 140.812-52.5 40.812 11.406 84.594 17.031 128.125 17.219 43.5-0.188 87.312-5.875 128.188-17.281 97.688 66.312 140.688 52.5 140.688 52.5 28-70.531 10.375-122.562 5.125-135.5 32.812-35.844 52.625-81.469 52.625-137.406 0-196.688-119.75-240-233.812-252.688 18.438-15.875 34.75-47 34.75-94.75 0-68.438-0.688-123.625-0.688-140.5 0-13.625 9.312-29.562 35.25-24.562C877.438-98 1024 93.875 1024 320 1024 602.75 794.75 832 512 832z" horiz-adv-x="1024" />
<glyph glyph-name="alert" unicode="&#xf02d;" d="M1005.854 31.753000000000043l-438.286 767C556.173 818.694 534.967 831 512 831s-44.173-12.306-55.567-32.247l-438.286-767c-11.319-19.809-11.238-44.144 0.213-63.876C29.811-51.85500000000002 50.899-64 73.714-64h876.572c22.814 0 43.903 12.145 55.354 31.877S1017.173 11.94399999999996 1005.854 31.753000000000043zM576 64H448V192h128V64zM576 256H448V512h128V256z" horiz-adv-x="1024" />
<glyph glyph-name="alignment-align" unicode="&#xf08a;" d="M192 768C85.938 768 0 682.062 0 576s85.938-192 192-192c106.062 0 192 85.938 192 192S298.062 768 192 768zM672 224l160 160H384v-448l160 160 288-288 128 128L672 224z" horiz-adv-x="960" />
<glyph glyph-name="alignment-aligned-to" unicode="&#xf08e;" d="M384 256l128 128 288-288 160 160v-448H512l160 160L384 256zM192 384C85.938 384 0 469.938 0 576S85.938 768 192 768c106.062 0 192-85.938 192-192S298.062 384 192 384z" horiz-adv-x="960" />
<glyph glyph-name="alignment-unalign" unicode="&#xf08b;" d="M512 640L384 512 128 768 0 640l256-256L128 256l64-64 384 384L512 640zM640 256l128 128-64 64L320 64l64-64 128 128 256-256 128 128L640 256z" horiz-adv-x="896" />
<glyph glyph-name="arrow-down" unicode="&#xf03f;" d="M448 384V640H192v-256H0l320-384 320 384H448z" horiz-adv-x="640" />
<glyph glyph-name="arrow-left" unicode="&#xf040;" d="M384 448V640L0 320l384-320V192h256V448H384z" horiz-adv-x="640" />
<glyph glyph-name="arrow-right" unicode="&#xf03e;" d="M640 320L256 640v-192H0v-256h256v-192L640 320z" horiz-adv-x="640" />
<glyph glyph-name="arrow-small-down" unicode="&#xf0a0;" d="M256 384V512H128v-128H0l192-256 192 256H256z" horiz-adv-x="384" />
<glyph glyph-name="arrow-small-left" unicode="&#xf0a1;" d="M256 384V512L0 320l256-192V256h128V384H256z" horiz-adv-x="384" />
<glyph glyph-name="arrow-small-right" unicode="&#xf071;" d="M384 320L128 512v-128H0v-128h128v-128L384 320z" horiz-adv-x="384" />
<glyph glyph-name="arrow-small-up" unicode="&#xf09f;" d="M192 512L0 256h128v-128h128V256h128L192 512z" horiz-adv-x="384" />
<glyph glyph-name="arrow-up" unicode="&#xf03d;" d="M320 640L0 256h192v-256h256V256h192L320 640z" horiz-adv-x="640" />
<glyph glyph-name="beer" unicode="&#xf069;" d="M896 576c-31 0-192 0-192 0v128c0 71-158 128-352 128s-352-57-352-128v-768c0-71 158-128 352-128s352 57 352 128v128s160 0 192 0 64 30 64 64 0 350 0 384-29 64-64 64z m-704-576h-64v512h64v-512z m192-64h-64v512h64v-512z m192 64h-64v512h64v-512z m-224 640c-124 0-224 29-224 64s100 64 224 64 224-29 224-64-100-64-224-64z m480-448h-128v256h128v-256z" horiz-adv-x="1024" />
<glyph glyph-name="book" unicode="&#xf007;" d="M768 256h-128c-34 0-64-32-64-64h256c0 34-32 64-64 64z m-55 416c-167 0-209-32-233-56-24 24-66 56-233 56s-247-46-247-78v-586c29 16 119 48 214 56 115 9 234-9 234-32 0-16 8-31 31-32 0 0 0 0 1 0 0 0 0 0 1 0 23 1 31 16 31 32 0 23 119 41 234 32 94-7 185-40 214-56v586c0 32-80 78-247 78z m-265-572c-30 16-103 28-192 28s-170-12-192-27c0 0 0 411 0 443s64 59 192 59 192-27 192-59 0-444 0-444z m448 1c-22 15-103 27-192 27s-162-12-192-28c0 0 0 412 0 444s64 59 192 59 192-27 192-59 0-443 0-443z m-128 283h-128c-34 0-64-32-64-64h256c0 34-32 64-64 64z m0 128h-128c-34 0-64-32-64-64h256c0 34-32 64-64 64z m-448-128h-128c-32 0-64-30-64-64h256c0 32-30 64-64 64z m0-128h-128c-32 0-64-30-64-64h256c0 32-30 64-64 64z m0 256h-128c-32 0-64-30-64-64h256c0 32-30 64-64 64z" horiz-adv-x="1024" />
<glyph glyph-name="bookmark" unicode="&#xf07b;" d="M0 704v-768l192 128 192-128V704H0zM316.25 507.25l-71.875-51.938 27.188-83.406c2.75-8.375-0.688-11.062-7.562-6.594l-72 52.094-72-52.031c-6.844-4.469-10.312-1.781-7.562 6.594l27.219 83.406L67.783 507.25c-6.469 5.125-5 9.219 3.906 9.219l88 0.125 27.125 83.094c2.812 8.812 7.562 8.812 10.375 0l27.188-83.094 87.938-0.125C321.25 516.469 322.688 512.375 316.25 507.25z" horiz-adv-x="384" />
<glyph glyph-name="briefcase" unicode="&#xf0d3;" d="M896 640H640v66c0 34.2-27.8 62-62 62H446c-34.2 0-62-27.8-62-62v-66H128c-35.3 0-64-28.7-64-64v-512c0-35.3 28.7-64 64-64h768c35.3 0 64 28.7 64 64V576C960 611.3 931.3 640 896 640zM448 688c0 8.8 7.2 16 16 16h96c8.8 0 16-7.2 16-16v-48H448V688zM896 320H576v-64H448v64H128V576h64v-192h640V576h64V320z" horiz-adv-x="1024" />
<glyph glyph-name="broadcast" unicode="&#xf048;" d="M448 640c142 0 256-115 256-256 0-69-28-132-72-178l-16-93c91 56 152 156 152 271 0 177-143 320-320 320s-320-143-320-320c0-115 61-215 152-271l-16 93c-45 46-72 109-72 178 0 142 114 256 256 256z m-64-320c-36 0-64-29-64-64v-128c0-36 30-64 64-64v-256h128v256c34 0 64 28 64 64v128c0 35-28 64-64 64s-64 0-64 0-28 0-64 0z m192 128c0 71-57 128-128 128s-128-57-128-128 57-128 128-128 128 57 128 128z m-128 384c-247 0-448-201-448-448 0-197 128-363 305-423l-12 72c-135 60-229 194-229 351 0 212 172 384 384 384s384-172 384-384c0-157-94-291-229-351l-12-72c177 60 305 225 305 423 0 247-201 448-448 448z" horiz-adv-x="896" />
<glyph glyph-name="browser" unicode="&#xf0c5;" d="M320 640h64v-64h-64V640zM192 640h64v-64h-64V640zM64 640h64v-64H64V640zM832 0H64V512h768V0zM832 576H448v64h384V576zM896 640c0 35.35-28.65 64-64 64H64c-35.35 0-64-28.65-64-64v-640c0-35.35 28.65-64 64-64h768c35.35 0 64 28.65 64 64V640z" horiz-adv-x="896" />
<glyph glyph-name="bug" unicode="&#xf091;" d="M243.621 675.469C190.747 618.688 205.34 528 205.34 528s53.968-64 160-64c106.031 0 160.031 64 160.031 64s14.375 89.469-37.375 146.312c32.375 18.031 51.438 44.094 43.562 61.812-8.938 19.969-48.375 21.75-88.25 3.969-14.812-6.594-27.438-14.969-37.25-23.875-12.438 2.25-25.625 3.781-40.72 3.781-14.061 0-26.561-1.344-38.344-3.25-9.656 8.75-22.062 16.875-36.531 23.344-39.875 17.719-79.375 15.938-88.25-3.969C194.465 718.781 212.497 693.438 243.621 675.469zM644.746 262.25c-8.25 1.75-16.125 2.75-23.75 3.5 0 2.125 0.375 4.125 0.375 6.312 0 33.594-4.75 65.654-12.438 96.125 16.438-1.406 37.375 2.375 58.562 11.779 39.875 17.781 65 48.375 56.125 68.219-8.875 19.969-48.375 21.75-88.25 3.969-18.625-8.312-33.812-19.469-44-30.906-7.75 18.25-16.5 35.781-26.812 51.719-30.188-25.156-87.312-62.719-167.062-71.062v-321.781c0 0-0.25-32-32.031-32-31.75 0-32 32-32 32V401.781c-79.811 8.344-136.968 45.969-167.093 71.062-9.875-15.312-18.375-32-25.938-49.344-10.281 10.625-24.625 20.844-41.969 28.594-39.875 17.719-79.375 15.938-88.25-3.969-8.906-19.906 16.25-50.438 56.125-68.219 19.844-8.846 39.531-12.812 55.469-12.096-7.656-30.404-12.469-62.344-12.469-95.812 0-2.188 0.375-4.25 0.438-6.5-6.719-0.75-13.688-1.75-20.781-3.25-51.969-10.75-91.781-37.625-88.844-59.812 2.938-22.312 47.5-31.5 99.594-20.688 6.781 1.375 13.438 3.125 19.781 5.062C128.684 146 143.34 108.125 163.622 75.5c-12.031-6.062-24.531-15-36.031-26.625C95.715 17 82.779-21.75 98.715-37.68799999999999c15.938-15.937 54.656-3 86.531 28.812 9.344 9.375 16.844 19.25 22.656 29C251.434-22.5 305.965-48 365.465-48c60.343 0 115.781 26.25 159.531 69.938 5.875-10.312 13.75-20.812 23.625-30.688 31.812-31.875 70.625-44.812 86.562-28.875s3 54.625-28.875 86.5c-12.312 12.375-25.688 21.75-38.438 27.938 20.125 32.5 34.625 70.375 43.688 111.062 7.188-2.25 14.688-4.375 22.562-6.062 52.061-10.812 96.625-1.562 99.625 20.688C736.558 224.625 696.746 251.5 644.746 262.25z" horiz-adv-x="733.886" />
<glyph glyph-name="calendar" unicode="&#xf068;" d="M704 320h-64v-128h64V320zM576 320h-64v-128h64V320zM704 512h-64v-128h64V512zM832 320h-64v-128h64V320zM576 128h-64v-128h64V128zM768 832h-64v-128h64V832zM256 832h-64v-128h64V832zM832 512h-64v-128h64V512zM576 512h-64v-128h64V512zM320 128h-64v-128h64V128zM192 320h-64v-128h64V320zM320 320h-64v-128h64V320zM832 768v-128H640V768H320v-128H128V768H0v-896h960V768H832zM896-64H64V576h832V-64zM192 128h-64v-128h64V128zM448 512h-64v-128h64V512zM448 128h-64v-128h64V128zM320 512h-64v-128h64V512zM448 320h-64v-128h64V320zM704 128h-64v-128h64V128z" horiz-adv-x="1024" />
<glyph glyph-name="check" unicode="&#xf03a;" d="M640 640L256 256 128 384 0 256l256-256 512 512L640 640z" horiz-adv-x="768" />
<glyph glyph-name="checklist" unicode="&#xf076;" d="M760.688 315.78099999999995l-49.812 49.656c-6.438 6.529-16.938 6.594-23.375 0L582.5 260.5 462.375 140.125l-93.031 93.125c-6.531 6.562-17.031 6.562-23.5 0l-49.719-49.688c-6.531-6.562-6.531-17.062 0-23.562l104.781-104.875 17.969-17.875 31.688-31.812c6.562-6.562 17.188-6.562 23.562 0l49.625 49.688L760.625 292.22C767.25 298.688 767.25 309.188 760.688 315.78099999999995zM228.469 251.188L278.156 301c42.469 42.375 116.344 42.438 158.781-0.062l25.312-25.312L576 384V704H0v-704h320l-91.531 92.125C184.688 136.062 184.688 207.375 228.469 251.188zM192 640h320v-64H192V640zM192 512h320v-64H192V512zM128 320H64v64h64V320zM128 448H64v64h64V448zM128 576H64v64h64V576zM192 384h64v-64h-64V384z" horiz-adv-x="765.602" />
<glyph glyph-name="chevron-down" unicode="&#xf0a3;" d="M512 512L320 320 128 512 0 384l320-320 320 320L512 512z" horiz-adv-x="640" />
<glyph glyph-name="chevron-left" unicode="&#xf0a4;" d="M448 512L320 640 0 320l320-320 128 128L256 320 448 512z" horiz-adv-x="448" />
<glyph glyph-name="chevron-right" unicode="&#xf078;" d="M128 640L0 512l192-192L0 128l128-128 320 320L128 640z" horiz-adv-x="448" />
<glyph glyph-name="chevron-up" unicode="&#xf0a2;" d="M320 576L0 256l128-128 192 192 192-192 128 128L320 576z" horiz-adv-x="640" />
<glyph glyph-name="circle-slash" unicode="&#xf084;" d="M320 640C143.219 640 0 496.781 0 320c0-176.75 143.219-320 320-320 176.75 0 320 143.25 320 320C640 496.781 496.75 640 320 640zM320 512c27.656 0 53.688-6.094 77.438-16.562L144.562 242.562C134.094 266.312 128 292.34400000000005 128 320 128 426 213.938 512 320 512zM320 128c-28.031 0-54.531 6.375-78.594 17.125l253.906 252.5C505.875 373.812 512 347.719 512 320 512 213.938 426.062 128 320 128z" horiz-adv-x="640" />
<glyph glyph-name="circuit-board" unicode="&#xf0d6;" d="M320 576c35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64s-64 28.654-64 64C256 547.346 284.654 576 320 576zM960 64c0-106.039-85.961-192-192-192H320l192 192h81.128c22.132-38.258 63.494-64 110.872-64 70.692 0 128 57.308 128 128s-57.308 128-128 128c-47.377 0-88.74-25.742-110.872-64H448L156.044-99.95600000000002C100.845-66.23199999999997 64-5.419999999999959 64 64V576c0 106.039 85.961 192 192 192v-145.128C217.742 600.74 192 559.377 192 512c0-70.692 57.308-128 128-128 47.276 0 88.56 25.633 110.727 63.756l162.416 0.219C615.279 409.731 656.633 384 704 384c70.692 0 128 57.308 128 128s-57.308 128-128 128c-47.388 0-88.758-25.753-110.887-64.025l-162.097-0.219c-11.246 19.54-27.503 35.828-47.016 47.116V768h384c106.039 0 192-85.961 192-192V64zM640 128c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64S640 92.654 640 128zM640 512c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64S640 476.654 640 512z" horiz-adv-x="1024" />
<glyph glyph-name="clippy" unicode="&#xf035;" d="M704-64h-640v576h640v-192h64v320c0 35-29 64-64 64h-192c0 71-57 128-128 128s-128-57-128-128h-192c-35 0-64-29-64-64v-704c0-35 29-64 64-64h640c35 0 64 29 64 64v128h-64v-128z m-512 704c29 0 29 0 64 0s64 29 64 64 29 64 64 64 64-29 64-64 32-64 64-64 33 0 64 0 64-29 64-64h-512c0 39 28 64 64 64z m-64-512h128v64h-128v-64z m448 128v128l-256-192 256-192v128h320v128h-320z m-448-256h192v64h-192v-64z m320 448h-320v-64h320v64z m-192-128h-128v-64h128v64z" horiz-adv-x="896" />
<glyph glyph-name="clock" unicode="&#xf046;" d="M384 256h256l64 64-64 64H512V576l-64 64-64-64V256zM448 768C200.562 768 0 567.438 0 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448C896 567.438 695.438 768 448 768zM448 0c-176.25 0-320 143.75-320 320 0 175.938 144.188 319.5 320 320 175.812-0.5 320-144.062 320-320C768 143.75 624.25 0 448 0z" horiz-adv-x="896" />
<glyph glyph-name="cloud-download" unicode="&#xf00b;" d="M832 512c-8.75 0-17.125-1.406-25.625-2.562C757.625 623.75 644.125 704 512 704c-132.156 0-245.562-80.25-294.406-194.562C209.156 510.594 200.781 512 192 512 85.938 512 0 426.062 0 320s85.938-192 192-192c20.531 0 39.875 4.25 58.375 10.375C284.469 100.625 331.312 75.25 384 67.5v65.25c-49.844 10.375-91.594 42.812-112.625 87.875C249.531 203 222.219 192 192 192c-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 25.281 0 48.625-7.562 68.406-20.094C281.344 548.219 385.594 640 512 640c126.5 0 229.75-92.219 250.5-212.75 20 13 43.875 20.75 69.5 20.75 70.625 0 128-57.344 128-128 0-70.625-57.375-128-128-128-10.25 0-20 1.5-29.625 3.75C773.438 154.875 725.938 128 672 128c-11.062 0-21.625 1.625-32 4v-64.938c10.438-1.688 21.062-3.062 32-3.062 61.188 0 116.5 24.625 156.938 64.438C830 128.375 830.875 128 832 128c106.062 0 192 85.938 192 192S938.062 512 832 512zM576 320H448v-320H320l192-192 192 192H576V320z" horiz-adv-x="1024" />
<glyph glyph-name="cloud-upload" unicode="&#xf00c;" d="M512 448L320 256h128v-320h128V256h128L512 448zM832 512c-8.75 0-17.125-1.406-25.625-2.562C757.625 623.812 644.125 704 512 704c-132.156 0-245.562-80.188-294.406-194.562C209.156 510.594 200.781 512 192 512 85.938 512 0 426 0 320c0-106.062 85.938-192 192-192 20.531 0 39.875 4.25 58.375 10.438C284.469 100.625 331.312 75.25 384 67.5v65.25c-49.844 10.375-91.594 42.812-112.625 87.75C249.531 203 222.219 192 192 192c-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 25.281 0 48.625-7.562 68.406-20.156C281.344 548.219 385.594 640 512 640c126.5 0 229.75-92.219 250.5-212.75 20 13 43.875 20.75 69.5 20.75 70.625 0 128-57.344 128-128 0-70.625-57.375-128-128-128-10.25 0-20 1.5-29.625 3.75C773.438 154.875 725.938 128 672 128c-11.062 0-21.625 1.625-32 4v-64.938c10.438-1.688 21.062-3.062 32-3.062 61.188 0 116.5 24.688 157 64.438 1 0 1.875-0.438 3-0.438 106.062 0 192 85.938 192 192C1024 426 938.062 512 832 512z" horiz-adv-x="1024" />
<glyph glyph-name="code" unicode="&#xf05f;" d="M608 640l-96-96 224-224L512 96l96-96 288 320L608 640zM288 640L0 320l288-320 96 96L160 320l224 224L288 640z" horiz-adv-x="896" />
<glyph glyph-name="color-mode" unicode="&#xf065;" d="M0 704v-768h768V704H0zM64 0V640h640L64 0z" horiz-adv-x="768" />
<glyph glyph-name="comment" unicode="&#xf02b;" d="M768 704H128C66 704 0 640 0 576v-384c0-128 128-128 128-128h64v-256l256 256c0 0 258 0 320 0s128 68 128 128V576C896 638 832 704 768 704z" horiz-adv-x="896" />
<glyph glyph-name="comment-discussion" unicode="&#xf04f;" d="M256 320c0 64 0 192 0 192s-160 0-192 0-64-32-64-64 0-288 0-320 32-64 64-64 64 0 64 0v-192l194 192s162 0 192 0 62 32 62 64 0 64 0 64-128 0-192 0-128 64-128 128z m576 384c-32 0-416 0-448 0s-64-32-64-64 0-288 0-320 32-64 64-64 190 0 190 0l194-192v192s32 0 64 0 64 32 64 64 0 288 0 320-32 64-64 64z" horiz-adv-x="896" />
<glyph glyph-name="credit-card" unicode="&#xf045;" d="M128 128h128v64h-128v-64z m192 0h128v64h-128v-64z m64 192h-256v-64h256v64z m-128 64h64l128 128h-64l-128-128z m192-128h192v64h-192v-64z m512 384c-32 0-864 0-896 0s-64-32-64-64 0-480 0-512 32-64 64-64 864 0 896 0 64 32 64 64 0 480 0 512-32 64-64 64z m0-256v-288s0-32-32-32h-832c-32 0-32 32-32 32v288h64l128 128h-192v32s0 32 32 32h832c32 0 32-32 32-32v-32h-384l-128-128h512z" horiz-adv-x="1024" />
<glyph glyph-name="dash" unicode="&#xf0ca;" d="M0 384v-128h512V384H0z" horiz-adv-x="512" />
<glyph glyph-name="dashboard" unicode="&#xf07d;" d="M416 367.5c-61.562 0-111.5-49.938-111.5-111.5S354.438 144.5 416 144.5 527.5 194.438 527.5 256c0 8.5-1.125 16.75-3 24.688C606.125 375.625 732.5 523.656 800 608c23.125 28.875-2.312 56.188-32 32-85.188-69.375-232.312-194.688-326.906-275.594C433.031 366.281 424.625 367.5 416 367.5zM447.875 576.125c0 17.656-14.344 32-32 32s-32-14.344-32-32 14.344-32 32-32S447.875 558.469 447.875 576.125zM639.875 320.125c0-17.656 14.375-32 32-32s32 14.344 32 32-14.375 32-32 32S639.875 337.781 639.875 320.125zM287.875 576.125c-17.656 0-32-14.344-32-32s14.344-32 32-32 32 14.344 32 32S305.531 576.125 287.875 576.125zM223.875 448.125c0 17.656-14.344 32-32 32s-32-14.344-32-32 14.344-32 32-32S223.875 430.469 223.875 448.125zM127.875 320.125c0-17.656 14.344-32 32-32s32 14.344 32 32-14.344 32-32 32S127.875 337.781 127.875 320.125zM575.875 544.125c0 17.656-14.375 32-32 32s-32-14.344-32-32 14.375-32 32-32S575.875 526.469 575.875 544.125zM792.875 495.312l-68.75-89.938C731.625 378.188 736 349.625 736 320c0-176.75-143.312-320-320-320S96 143.25 96 320c0 176.688 143.312 320 320 320 65.875 0 127-19.969 177.875-54.094l79.25 60.625C602.375 702.406 513.25 736 416 736 186.25 736 0 549.75 0 320s186.25-416 416-416 416 186.25 416 416C832 382.719 817.75 442 792.875 495.312z" horiz-adv-x="832" />
<glyph glyph-name="database" unicode="&#xf096;" d="M384-128C171.969-128 0-70.625 0 0c0 38.625 0 80.875 0 128 0 11.125 5.562 21.688 13.562 32C56.375 104.875 205.25 64 384 64s327.625 40.875 370.438 96c8-10.312 13.562-20.875 13.562-32 0-37.062 0-76.375 0-128C768-70.625 596-128 384-128zM384 128C171.969 128 0 185.375 0 256c0 38.656 0 80.844 0 128 0 6.781 2.562 13.375 6 19.906l0 0C7.938 408 10.5 412.031 13.562 416 56.375 360.906 205.25 320 384 320s327.625 40.906 370.438 96c3.062-3.969 5.625-8 7.562-12.094l0 0c3.438-6.531 6-13.125 6-19.906 0-37.062 0-76.344 0-128C768 185.375 596 128 384 128zM384 384C171.969 384 0 441.344 0 512c0 20.219 0 41.594 0 64 0 20.344 0 41.469 0 64C0 710.656 171.969 768 384 768c212 0 384-57.344 384-128 0-19.969 0-41.156 0-64 0-19.594 0-40.25 0-64C768 441.344 596 384 384 384zM384 704c-141.375 0-256-28.594-256-64s114.625-64 256-64 256 28.594 256 64S525.375 704 384 704z" horiz-adv-x="768" />
<glyph glyph-name="device-camera" unicode="&#xf056;" d="M512 447.999c-70.691 0-127.999-57.308-127.999-127.999S441.309 192.00099999999998 512 192.00099999999998c5.713 0 11.337 0.38 16.852 1.105-46.344 7.058-81.851 47.079-81.851 95.394 0 53.295 43.204 96.499 96.499 96.499 48.314 0 88.336-35.507 95.394-81.851 0.726 5.515 1.105 11.139 1.105 16.852C639.999 390.691 582.691 447.999 512 447.999zM896 576H767.999L640 704H384L255.999 576H128c-35.348 0-64-28.652-64-64v-448c0-35.347 28.652-64 64-64h768c35.347 0 64 28.653 64 64V512C960 547.348 931.347 576 896 576zM416 640h192l64-64H352L416 640zM160.143 64C142.391 64 128 78.39099999999996 128 96.14300000000003V384h64v64h-64v31.857C128 497.609 142.391 512 160.143 512h182.526c-3.98-3.518-7.881-7.174-11.688-10.98-99.974-99.975-99.974-262.064 0-362.039l74.98-74.98H160.143zM512 128.00099999999998c-106.038 0-191.999 85.961-191.999 191.999S405.962 511.999 512 511.999 703.999 426.038 703.999 320 618.038 128.00099999999998 512 128.00099999999998zM832 352L681.327 512H832V352z" horiz-adv-x="1024" />
<glyph glyph-name="device-camera-video" unicode="&#xf057;" d="M576 640c-35.347 0-64-28.653-64-64s28.653-64 64-64 64 28.653 64 64S611.347 640 576 640zM896 448L768 320v64c0 30.625-21.515 56.21-50.25 62.503C748.958 480.646 768 526.097 768 575.998 768 682.038 682.039 768 576 768c-101.123 0-183.986-78.178-191.45-177.393C350.516 621.306 305.442 640 256 640c-106.038 0-192-85.962-192-192.002C64 341.961 149.962 256 256 256h-64v-128h64v-128c0-35.347 28.653-64 64-64h384c35.347 0 64 28.653 64 64v64l128-128h64V448H896zM256 512c-35.347 0-64-28.653-64-64s28.653-64 64-64v-64c-70.692 0-128 57.308-128 127.999C128 518.692 185.308 576 256 576s128-57.307 128-128h-64C320 483.347 291.347 512 256 512zM576 128H448V256h128V128zM704 237.21299999999997c-33.526 33.547-70.276 70.317-73.373 73.414C624.837 316.418 616.837 320 608 320H416c-17.674 0-32-14.326-32-32v-192c0-8.329 3.183-15.915 8.396-21.607 0.53-0.58 39.123-39.164 74.409-74.393H352c-17.674 0-32 14.326-32 32V352c0 17.674 14.326 32 32 32h320c17.674 0 32-14.326 32-32V237.21299999999997zM576 448c-70.692 0-128 57.308-128 127.999C448 646.692 505.308 704 576 704s128-57.308 128-128.001C704 505.308 646.692 448 576 448zM896 128l-64 64 0.082 128.084L896 384.002V128z" horiz-adv-x="1024" />
<glyph glyph-name="device-desktop" unicode="&#xf27c;" d="M960 768c-32 0-864 0-896 0s-64-32-64-64 0-544 0-576 32-64 64-64 320 0 320 0-192-64-192-128c0-32 32-64 64-64s480 0 512 0 64 32 64 64c0 64-192 128-192 128s288 0 320 0 64 32 64 64 0 544 0 576-32 64-64 64z m0-640h-896v576h896v-576z m-64 512h-192c-384-64-542-300-576-384v-64h768v448z" horiz-adv-x="1024" />
<glyph glyph-name="device-mobile" unicode="&#xf038;" d="M576 832H64C28.688 832 0 803.312 0 768v-896c0-35.375 28.688-64 64-64h512c35.375 0 64 28.625 64 64V768C640 803.312 611.375 832 576 832zM288 768h64c17.625 0 32-14.344 32-32s-14.375-32-32-32h-64c-17.656 0-32 14.344-32 32S270.344 768 288 768zM352-128h-64c-17.656 0-32 14.375-32 32s14.344 32 32 32h64c17.625 0 32-14.375 32-32S369.625-128 352-128zM576 0H64V640h512V0z" horiz-adv-x="640" />
<glyph glyph-name="diff" unicode="&#xf04d;" d="M448 576H320v-128H192v-128h128v-128h128V320h128V448H448V576zM192-64h384V64H192V-64zM640 832H128v-64h480l224-224v-608h64V576L640 832zM0 704v-896h768V512L576 704H0zM704-128H64V640h480l160-160V-128z" horiz-adv-x="896" />
<glyph glyph-name="diff-added" unicode="&#xf06b;" d="M512 512h-128v-128h-128v-128h128v-128h128v128h128v128h-128v128z m320 256c-32 0-736 0-768 0s-64-32-64-64 0-736 0-768 32-64 64-64 736 0 768 0 64 32 64 64 0 736 0 768-32 64-64 64z m-64-736c0-16-17-32-32-32s-558 0-576 0-32 12-32 32c0 16 0 560 0 576s16 32 32 32 561 0 576 0 32-16 32-32 0-560 0-576z" horiz-adv-x="896" />
<glyph glyph-name="diff-ignored" unicode="&#xf099;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-512 194v-98h98l286 286v98h-98l-286-286z" horiz-adv-x="896" />
<glyph glyph-name="diff-modified" unicode="&#xf06d;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-320 416c-71 0-128-57-128-128s57-128 128-128 128 57 128 128-57 128-128 128z" horiz-adv-x="896" />
<glyph glyph-name="diff-removed" unicode="&#xf06c;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-512 224h384v128h-384v-128z" horiz-adv-x="896" />
<glyph glyph-name="diff-renamed" unicode="&#xf06e;" d="M832 768h-768c-32 0-64-32-64-64v-768c0-32 32-64 64-64h768c32 0 64 32 64 64v768c0 32-32 64-64 64z m-64-736c0-16-17-32-32-32h-576c-18 0-32 12-32 32v576c0 16 16 32 32 32h576c15 0 32-16 32-32v-576z m-320 352h-192v-128h192v-128l256 192-256 192v-128z" horiz-adv-x="896" />
<glyph glyph-name="ellipsis" unicode="&#xf09a;" d="M640 512c-64 0-448 0-512 0s-128-64-128-128 0-64 0-128 64-128 128-128 448 0 512 0 128 64 128 128 0 64 0 128-64 128-128 128z m-384-256h-128v128h128v-128z m192 0h-128v128h128v-128z m192 0h-128v128h128v-128z" horiz-adv-x="768" />
<glyph glyph-name="eye" unicode="&#xf04e;" d="M512 704c-192 0-416-128-512-384 96-192 288-320 512-320s416 128 512 320c-96 256-320 384-512 384z m0-640c-192 0-352 128-384 256 32 128 192 256 384 256s352-128 384-256c-32-128-192-256-384-256z m0 448c-20 0-38-4-56-9 33-15 56-48 56-87 0-53-43-96-96-96-39 0-72 23-87 56-5-18-9-36-9-56 0-106 86-192 192-192s192 86 192 192-86 192-192 192z" horiz-adv-x="1024" />
<glyph glyph-name="file-binary" unicode="&#xf094;" d="M0-128V768h576l192-192v-704H0zM704 512L512 704H64v-768h640V512zM320 320H128V576h192V320zM256 512h-64v-128h64V512zM256 64h64v-64H128v64h64V192h-64v64h128V64zM512 384h64v-64H384v64h64V512h-64v64h128V384zM576 0H384V256h192V0zM512 192h-64v-128h64V192z" horiz-adv-x="768" />
<glyph glyph-name="file-code" unicode="&#xf010;" d="M288 448L128 288l160-160 64 64-96 96 96 96L288 448zM416 384l96-96-96-96 64-64 160 160L480 448 416 384zM576 768H0v-896h768V576L576 768zM704-64H64V704h448l192-192V-64z" horiz-adv-x="768" />
<glyph glyph-name="file-directory" unicode="&#xf016;" d="M832 640c-32 0-336 0-352 0s-32 16-32 32 0 0 0 32-32 64-64 64-288 0-320 0-64-32-64-64 0-704 0-704h896s0 544 0 576-32 64-64 64z m-448 0h-320s0 15 0 32 16 32 32 32 241 0 256 0 32-15 32-32 0-32 0-32z" horiz-adv-x="896" />
<glyph glyph-name="file-media" unicode="&#xf012;" d="M576 768H0v-896h768V576L576 768zM704-64H64V704h448l192-192V-64zM128 576v-512h128c0 70.625 57.344 128 128 128-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 70.625 0 128-57.344 128-128 0-70.625-57.375-128-128-128 70.625 0 128-57.375 128-128h128V448L512 576H128z" horiz-adv-x="768" />
<glyph glyph-name="file-pdf" unicode="&#xf014;" d="M576 768H0v-896h768V576L576 768zM64 704h255.812c-13.188-4.094-27.281-15.031-34.625-42.875-13.25-49.406-7.031-130.75 15.625-209.344C276.688 370.562 178.188 175.125 171.531 163.5c-15.625-4.875-65.344-23.625-107.531-59.812V704zM347.125 396.531c57.625-149.781 95-149.531 135.188-167.594C398.344 216 334.219 206.75 249.781 169.5 246.094 163.062 326.281 315.40599999999995 347.125 396.531zM704-64H65.844 64v0.375c0.781-0.062 1.094-0.375 1.844-0.375 33.812 0 84.75 21 180.562 182.375 38.188 15.438 72.062 26.875 78.469 28.938 58.812 14.875 125 26.625 187.562 33.375C566.875 153.5 639.125 135 680.25 132.375c9.625-0.5 16.062 1.188 23.75 2V-64zM704 246.625c-23.688 14.688-54 25-89.125 25-24.25 0-50.625-1.375-78.688-4.375-26.938 13-92.562 32.719-147.188 190.219 17.094 103.625 12.719 173.562 12.719 173.562 6.781 52.938-23.344 72.844-51.625 72.844 0 0-0.279 0.125-0.344 0.125H512l192-192V246.625z" horiz-adv-x="768" />
<glyph glyph-name="file-submodule" unicode="&#xf017;" d="M832 320c-32 0-192 0-192 0 0 32-32 64-64 64s-96 0-128 0-64-32-64-64 0-320 0-320h512s0 224 0 256-32 64-64 64z m-256-64h-128s0 17 0 32 15 32 32 32 48 0 64 0 32-15 32-32 0-32 0-32z m256 320c-32 0-336 0-352 0s-32 17-32 32 0 0 0 32-32 64-64 64-288 0-320 0-64-32-64-64 0-640 0-640h320s0 352 0 384 32 64 64 64 224 0 256 0 64-32 64-64h192s0 96 0 128-32 64-64 64z m-448 0h-320s0 16 0 32 16 32 32 32 240 0 256 0 32-17 32-32 0-32 0-32z" horiz-adv-x="896" />
<glyph glyph-name="file-symlink-directory" unicode="&#xf0b1;" d="M832 640h-352c-16 0-32 16-32 32s0 0 0 32-32 64-64 64h-320c-32 0-64-32-64-64s0-704 0-704h896s0 544 0 576-32 64-64 64z m-768 32c0 17 16 32 32 32h256c15 0 32-15 32-32s0-32 0-32h-320s0 15 0 32z m384-544v128c-125 0-224-56-256-192 0 209 107 320 256 320 0 49 0 128 0 128l256-192-256-192z" horiz-adv-x="896" />
<glyph glyph-name="file-symlink-file" unicode="&#xf0b0;" d="M576 768h-576v-896h768v704l-192 192z m128-832h-640v768h448l192-192v-576z m-320 448c-149 0-256-111-256-320 32 136 131 192 256 192v-128l256 192-256 192s0-79 0-128z" horiz-adv-x="768" />
<glyph glyph-name="file-text" unicode="&#xf011;" d="M448 576H128v-64h320V576zM576 768H0v-896h768V576L576 768zM704-64H64V704h448l192-192V-64zM128 64h512v64H128V64zM128 192h512v64H128V192zM128 320h512v64H128V320z" horiz-adv-x="768" />
<glyph glyph-name="file-zip" unicode="&#xf013;" d="M320 256v64h-64v-64H320zM320 384v64h-64v-64H320zM320 512v64h-64v-64H320zM192 448h64v64h-64V448zM576 768H0v-896h768V576L576 768zM704-64H64V704h192v-64h64v64h192l192-192V-64zM192 576h64v64h-64V576zM192 320h64v64h-64V320zM192 192l-64-64v-128h256V128l-64 64h-64v64h-64V192zM320 128v-64H192v64H320z" horiz-adv-x="768" />
<glyph glyph-name="flame" unicode="&#xf0d2;" d="M433 787c50-134 24-207-32-265-61-64-156-112-223-206-89-125-104-400 217-472-135 71-164 277-18 406-38-125 32-205 119-176 85 29 141-32 139-102-1-48-20-89-69-112 209 37 293 210 293 342 0 174-155 198-77 344-93-8-125-69-116-169 6-66-63-111-114-81-41 25-40 73-4 109 77 76 107 251-115 382z" horiz-adv-x="1024" />
<glyph glyph-name="fold" unicode="&#xf0cc;" d="M896 576H672l-64-64h192L672 384H224L96 512h192l-64 64H0v-63.999L160 352 0 192v-64h224l64 64H96l128 128h448l128-128H608l64-64h224v64L736 352l160 160.001V576zM640 640H512V832H384v-192H256l192-192L640 640zM256 64h128v-192h128V64h128L448 256 256 64z" horiz-adv-x="896" />
<glyph glyph-name="gear" unicode="&#xf02f;" d="M447.938 482C358.531 482 286 409.469 286 320c0-89.375 72.531-162.062 161.938-162.062 89.438 0 161.438 72.688 161.438 162.062C609.375 409.469 537.375 482 447.938 482zM772.625 226.938l-29.188-70.312 52.062-102.25 6.875-13.5-72.188-72.188L611.75 24.625l-70.312-28.875L505.75-113.5l-4.562-14.5H399.156L355-4.687999999999988l-70.312 29-102.404-51.938-13.5-6.75-72.156 72.125 55.875 118.5-28.969 70.25L14.469 262.125 0 266.812V368.781L123.406 413l28.969 70.188-51.906 102.469-6.844 13.438 72.062 72.062 118.594-55.844 70.219 29.031 35.656 109.188L394.75 768h102l44.188-123.469 70.125-29.031L713.5 667.469l13.625 6.844 72.125-72.062-55.875-118.406L772.25 413.5l109.375-35.656L896 373.25v-101.938L772.625 226.938z" horiz-adv-x="896" />
<glyph glyph-name="gift" unicode="&#xf042;" d="M448-128h320V192H448V-128zM64-128h320V192H64V-128zM447.75 455.812c31.469 3.5 66.875 7.406 87.375 9.719C619 474.875 694.5 550.406 703.812 634.25c9.312 83.75-51 144.125-134.688 134.719C503.688 761.656 443.844 714 416 653.625 388.156 714 328.312 761.656 262.906 769.031 179.188 778.375 118.781 718 128.188 634.25c9.344-83.844 84.875-159.312 168.656-168.719 20.531-2.312 55.938-6.281 87.406-9.719C383.75 451.594 384 448 384 448h64C448 448 448.25 451.594 447.75 455.812zM555.375 691.312c45.25 5.062 78-27.562 72.875-72.875-5-45.312-45.875-86.156-91.125-91.219-45.375-5.031-78 27.594-72.938 72.906C469.249 645.436 510.125 686.281 555.375 691.312zM294.906 527.219c-45.25 5.062-86.062 45.906-91.125 91.219-5.063 45.313 27.594 77.938 72.812 72.875 45.312-5.031 86.156-45.875 91.222-91.188C372.875 554.812 340.219 522.188 294.906 527.219zM448 448v-192h384V448H448zM0 256h384V448H0V256z" horiz-adv-x="896" />
<glyph glyph-name="gist" unicode="&#xf00e;" d="M416 448l96-96-96-96 64-64 160 160-160 160-64-64z m-416 320v-832h768v832h-768z m704-768h-640v704h640v-704z m-352 256l-96 96 96 96-64 64-160-160 160-160 64 64z" horiz-adv-x="768" />
<glyph glyph-name="gist-secret" unicode="&#xf08c;" d="M193 128l128-192h-256l-65 256 257 64-64-128z m448 128l64-128-128-192h256l64 256-256 64z m-84 0h-216l44-102-64-218h256l-64 218 44 102z m84 192h-384l-128-64h640l-128 64z m-64 256l-128-64-128 64-64-192h384l-64 192z" horiz-adv-x="896" />
<glyph glyph-name="git-branch" unicode="&#xf020;" d="M512 640c-71 0-128-57-128-128 0-47 26-88 64-110v-18c0-64-64-128-128-128-53 0-95-11-128-29v303c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 34-13 64-34 87 19 23 49 41 98 41 128 0 256 128 256 256v18c38 22 64 63 64 110 0 71-57 128-128 128z m-384 64c35 0 64-29 64-64s-29-64-64-64-64 29-64 64 29 64 64 64z m0-768c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m384 512c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="640" />
<glyph glyph-name="git-commit" unicode="&#xf01f;" d="M694.875 384C666.375 494.219 567.125 576 448 576c-119.094 0-218.375-81.781-246.906-192H0v-128h201.094C229.625 145.75 328.906 64 448 64c119.125 0 218.375 81.75 246.875 192H896V384H694.875zM448 192c-70.656 0-128 57.375-128 128 0 70.656 57.344 128 128 128 70.625 0 128-57.344 128-128C576 249.375 518.625 192 448 192z" horiz-adv-x="896" />
<glyph glyph-name="git-compare" unicode="&#xf0ac;" d="M832 110s0 306 0 402-96 192-192 192c-64 0-64 0-64 0v128l-192-192 192-192v128s32 0 64 0 64-32 64-64 0-402 0-402c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110z m-64-174c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m-448 128s-32 0-64 0-64 32-64 64 0 402 0 402c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110 0 0 0-306 0-402s96-192 192-192c64 0 64 0 64 0v-128l192 192-192 192v-128z m-192 512c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="896" />
<glyph glyph-name="git-merge" unicode="&#xf023;" d="M640 384c-47.625 0-88.625-26.312-110.625-64.906C523.625 319.5 518 320 512 320c-131.062 0-255.438 99.844-300.812 223.438C238.469 566.906 256 601.281 256 640c0 70.656-57.344 128-128 128S0 710.656 0 640c0-47.219 25.844-88.062 64-110.281V110.25C25.844 88.06200000000001 0 47.25 0 0c0-70.625 57.344-128 128-128s128 57.375 128 128c0 47.25-25.844 88.062-64 110.25V340.531C276.156 251.5 392.375 192 512 192c6.375 0 11.625 0.438 17.375 0.625C551.5 154.188 592.5 128 640 128c70.625 0 128 57.375 128 128C768 326.656 710.625 384 640 384zM128-64c-35.312 0-64 28.625-64 64 0 35.312 28.688 64 64 64 35.406 0 64-28.688 64-64C192-35.375 163.406-64 128-64zM128 576c-35.312 0-64 28.594-64 64s28.688 64 64 64c35.406 0 64-28.594 64-64S163.406 576 128 576zM640 192c-35.312 0-64 28.625-64 64 0 35.406 28.688 64 64 64 35.375 0 64-28.594 64-64C704 220.625 675.375 192 640 192z" horiz-adv-x="768" />
<glyph glyph-name="git-pull-request" unicode="&#xf009;" d="M704 110s0 306 0 402-96 192-192 192c-64 0-64 0-64 0v128l-192-192 192-192v128s32 0 64 0 64-32 64-64 0-402 0-402c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110z m-64-174c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m-512 832c-71 0-128-57-128-128 0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110v419c38 22 64 63 64 110 0 71-57 128-128 128z m0-832c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m0 640c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="768" />
<glyph glyph-name="globe" unicode="&#xf0b6;" d="M512 704c-212.077 0-384-171.923-384-384s171.923-384 384-384c25.953 0 51.303 2.582 75.812 7.49-9.879 4.725-10.957 40.174-1.188 60.385 10.875 22.5 45 79.5 11.25 98.625s-24.375 27.75-45 49.875-12.19 25.451-13.5 31.125c-4.5 19.5 19.875 48.75 21 51.75s1.125 14.25 0.75 17.625S545.75 265.25 542 265.625s-5.625-6-10.875-6.375-28.125 13.875-33 17.625-7.125 12.75-13.875 19.5-7.5 1.5-18 5.625-44.25 16.5-70.125 27-28.125 25.219-28.5 35.625-15.75 25.5-22.961 36.375c-7.209 10.875-8.539 25.875-11.164 22.5s13.5-42.75 10.875-43.875-8.25 10.875-15.75 20.625 7.875 4.5-16.125 51.75 7.5 71.344 9 96 20.25-9 10.5 6.75 0.75 48.75-6.75 60.75S275 602 275 602c1.125 11.625 37.5 31.5 63.75 49.875s42.281 4.125 63.375-2.625 22.5-4.5 15.375 2.25 3 10.125 19.5 7.5 21-22.5 46.125-20.625 2.625-4.875 6-11.25-3.75-5.625-20.25-16.875S469.25 599 498.5 577.625s20.25 14.25 17.25 30S537.125 611 537.125 611c18-12 14.674-0.66 27.799-4.785S613.625 572 613.625 572c-44.625-24.375-16.5-27-9-32.625s-15.375-16.5-15.375-16.5c-9.375 9.375-10.875-0.375-16.875-3.75s-0.375-12-0.375-12c-31.031-4.875-24-37.5-23.625-45.375s-19.875-19.875-25.125-31.125S536.75 395 527 393.5s-19.5 36.75-72 22.5c-15.828-4.297-51-22.5-32.25-59.625s49.875 10.5 60.375 5.25-3-28.875-0.75-29.25 29.625-1.031 31.125-33 41.625-29.25 50.25-30 37.5 23.625 41.625 24.75S626 309.125 662 288.5s54.375-17.625 66.75-26.25 3.75-25.875 15.375-31.5 58.125 1.875 69.75-17.25-48-115.125-66.75-125.625S719.75 53.375 701 38s-45-34.406-69.75-49.125c-21.908-13.027-25.85-36.365-35.609-43.732C767.496-16.67999999999995 896 136.64999999999998 896 320 896 532.077 724.077 704 512 704zM602 343.625c-5.25-1.5-16.125-11.25-42.75 4.5s-45 12.75-47.25 15.375c0 0-2.25 6.375 9.375 7.5 23.871 2.311 54-22.125 60.75-22.5s10.125 6.75 22.125 2.883C616.25 347.52 607.25 345.125 602 343.625zM476.375 665.75c-2.615 1.902 2.166 4.092 5.016 7.875 1.645 2.186 0.425 5.815 2.484 7.875 5.625 5.625 33.375 13.5 27.949-1.875C506.4 664.25 480.5 662.75 476.375 665.75zM543.5 617c-9.375 0.375-31.443 2.707-27.375 6.75 15.844 15.75-6 20.25-19.5 21.375S477.5 653.75 484.25 654.5s33.75-0.375 38.25-4.125 28.875-13.5 30.375-20.625S552.875 616.625 543.5 617zM624.875 619.625c-7.5-6-45.24 21.529-52.5 27.75-31.5 27-48.375 18-54.99 22.5-6.617 4.5-4.26 10.5 5.865 19.5s38.625-3 55.125-4.875 35.625-14.625 36-29.781C614.75 639.564 632.375 625.625 624.875 619.625z" horiz-adv-x="1024" />
<glyph glyph-name="graph" unicode="&#xf043;" d="M704 576H512v-640h192V576zM960 384H768v-448h192V384zM64-128V0h64v64H64V192h64v64H64V384h64v64H64V576h64v64H64V768h64V832H0v-1024h1024v64H64zM448 256H256v-320h192V256z" horiz-adv-x="1024" />
<glyph glyph-name="heart" unicode="&#x2665;" d="M384-32c399 314 384 425 384 512s-72 192-192 192-192-128-192-128-72 128-192 128-192-105-192-192-15-198 384-512z" horiz-adv-x="768.199" />
<glyph glyph-name="history" unicode="&#xf07e;" d="M448 768c-90.938 0-175.312-27.531-245.938-74.062L128 768v-256h256l-88 88c45.438 24.688 96.688 40 152 40 176.75 0 320-143.219 320-320 0-176.75-143.25-320-320-320-176.781 0-320 143.25-320 320 0 45.562 9.781 88.781 27 128H64v99.406C24.312 480.5 0 403.406 0 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448C896 567.438 695.438 768 448 768zM447.031 1L512 64V256h128l64 64-64 64H512l-64 64L320 320l64-64v-192L447.031 1z" horiz-adv-x="896" />
<glyph glyph-name="home" unicode="&#xf08d;" d="M192 256l64-384h192V192h128v-320h192l64 384L512 576 192 256zM832 448V704H704l0.312-128.312L512 768 0 256h128l384 384 384-384h128L832 448z" horiz-adv-x="1024" />
<glyph glyph-name="horizontal-rule" unicode="&#xf070;" d="M63.938 384h128v-128h64V639.938h-64V448h-128V639.938H0V256h63.938V384zM639.875 256V384h-63.938v-128H639.875zM639.875 448V575.938h-63.938V448H639.875zM447.938 448V575.938h128v64h-192V256h64V384h128v64H447.938zM0 0h639.875V128H0V0z" horiz-adv-x="639.875" />
<glyph glyph-name="hourglass" unicode="&#xf09e;" d="M571 320c118 85 197 240 197 384 0 71-172 128-384 128s-384-57-384-128c0-144 80-299 197-384-118-85-197-240-197-384 0-71 172-128 384-128s384 57 384 128c0 144-80 299-197 384z m-187 448c141 0 256-29 256-64s-115-64-256-64-256 29-256 64 115 64 256 64z m-64-706c-154-7-238-40-253-82 16 114 75 189 141 251 73 68 112 60 112 103v-273z m-105 352c-70 55-122 130-142 215 70-32 183-53 311-53s241 21 311 53c-20-85-72-160-142-215-24 17-70 34-169 34s-145-17-169-34z m233-352v273c0-43 39-35 112-103 66-62 125-138 141-251-14 41-99 75-253 82z" horiz-adv-x="768" />
<glyph glyph-name="hubot" unicode="&#xf09d;" d="M512 768c-283 0-512-229-512-512 0 0 0-192 0-256s64-128 128-128 704 0 768 0 128 64 128 128 0 256 0 256c0 283-229 512-512 512z m96-768h-192c-18 0-32 14-32 32s14 32 32 32h192c18 0 32-14 32-32s-14-32-32-32z m288 128c0-32-32-64-64-64s-128 0-128 0c0 32-32 64-64 64s-224 0-256 0-64-32-64-64c0 0-96 0-128 0s-64 32-64 64 0 360 0 360c78 129 220 216 384 216s306-87 384-216c0 0 0-328 0-360z m-128 384c-32 0-480 0-512 0s-64-32-64-64 0-96 0-128 32-64 64-64 480 0 512 0 64 32 64 64 0 96 0 128-32 64-64 64z m0-128l-64-64h-128l-64 64-64-64h-128l-64 64v64h64l64-64 64 64h128l64-64 64 64h64v-64z" horiz-adv-x="1024" />
<glyph glyph-name="inbox" unicode="&#xf0cf;" d="M704 640H64L0 256v-256h768V256L704 640zM576 256l-64-128H256l-64 128H79l49 320h512l49-320H576z" horiz-adv-x="768" />
<glyph glyph-name="info" unicode="&#xf059;" d="M448 448c35 0 64 29 64 64s-29 64-64 64-64-29-64-64 29-64 64-64z m0 320c-247 0-448-201-448-448s201-448 448-448 448 201 448 448-201 448-448 448z m0-768c-177 0-320 143-320 320s143 320 320 320 320-143 320-320-143-320-320-320z m64 320c0 32-32 64-64 64s-32 0-64 0-64-32-64-64h64s0-160 0-192 32-64 64-64 32 0 64 0 64 32 64 64h-64s0 160 0 192z" horiz-adv-x="896" />
<glyph glyph-name="issue-closed" unicode="&#xf028;" d="M704 515.969l-96-96L768 256l256 256-96 96L769.25 449.219 704 515.969zM512 0c-176.781 0-320 143.25-320 320 0 176.781 143.219 320 320 320 88.375 0 168.375-35.844 226.25-93.75l90.562 90.5C747.75 717.875 635.75 768 512 768 264.562 768 64 567.438 64 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448L759.75 119.75C768.688 130.75 684.75 0 512 0zM576 576H448v-320h128V576zM448 64h128V192H448V64z" horiz-adv-x="1024" />
<glyph glyph-name="issue-opened" unicode="&#xf026;" d="M448 768C200.562 768 0 567.438 0 320c0-247.438 200.562-448 448-448 247.438 0 448 200.562 448 448C896 567.438 695.438 768 448 768zM448 0c-176.781 0-320 143.25-320 320 0 176.781 143.219 320 320 320 176.75 0 320-143.219 320-320C768 143.25 624.75 0 448 0zM384 64h128V192H384V64zM384 256h128V576H384V256z" horiz-adv-x="896" />
<glyph glyph-name="issue-reopened" unicode="&#xf027;" d="M639.125 64.75C585.75 24.625 520 0 448 0c-176.781 0-320 143.25-320 320 0 45.562 9.781 88.781 27 128H64v99.469C24.312 480.562 0 403.406 0 320c0-247.438 200.562-448 448-448 107.375 0 204.5 39.312 281.75 102.25L768-64V128H576L639.125 64.75zM384 64h128V192H384V64zM512 576H384v-320h128V576zM896 320c0 247.438-200.562 448-448 448-107.406 0-204.531-39.312-281.656-102.344L128 704v-192h192l-63.156 63.156C310.281 615.312 376 640 448 640c176.75 0 320-143.219 320-320 0-45.562-9.75-88.75-27-128h91v-99.5C871.688 159.438 896 236.5 896 320z" horiz-adv-x="896" />
<glyph glyph-name="jersey" unicode="&#xf019;" d="M704 832h-192c0-32-33-64-97-64s-95 32-95 64h-192c0-128-2-384-128-384 0 0-1-544-1-576s32-64 64-64 672 0 704 0 64 32 64 64 0 576 0 576c-126 0-128 256-128 384z m-609-960c-16 0-31 10-31 32 0 32 0 480 0 480 119 64 128 192 128 384h64c0-96 32-191 160-192s160 96 160 192h64c0-186 32-276 64-339v-557s-593 0-609 0z m385 576l-32-32v-320l32-32h128l32 32v320l-32 32h-128z m96-320h-64v256h64v-256z m-352 320l-32-32v-320l32-32h128l32 32v320l-32 32h-128z m96-320h-64v256h64v-256z" horiz-adv-x="896" />
<glyph glyph-name="jump-down" unicode="&#xf072;" d="M767.75 640H0.25L384 256.25 767.75 640zM0 128v-128h768V128H0z" horiz-adv-x="768" />
<glyph glyph-name="jump-left" unicode="&#xf0a5;" d="M256.25 320L640-63.75v767.5L256.25 320zM0-64h128V704H0V-64z" horiz-adv-x="640" />
<glyph glyph-name="jump-right" unicode="&#xf0a6;" d="M0-63.75L383.75 320 0 703.812V-63.75zM512 704v-768h128V704H512z" horiz-adv-x="640" />
<glyph glyph-name="jump-up" unicode="&#xf073;" d="M0.188 0h767.5L384 383.75 0.188 0zM0 640v-128h768V640H0z" horiz-adv-x="768" />
<glyph glyph-name="key" unicode="&#xf049;" d="M640.9 768.1c-141.4 0-256-114.6-256-256 0-19.6 2.2-38.6 6.4-56.9L0 64v-64l64-64h128l64 64v64h64v64h64v64h128l70.8 70.8c18.7-4.3 38.1-6.6 58.1-6.6 141.4 0 256 114.6 256 256S782.2 768.1 640.9 768.1zM384 320L64 0v64l320 320V320zM704 512c-35.3 0-64 28.7-64 64 0 35.3 28.7 64 64 64s64-28.7 64-64C768 540.7 739.3 512 704 512z" horiz-adv-x="896.9" />
<glyph glyph-name="keyboard" unicode="&#xf00d;" d="M640 256h64V384h-64V256zM768 576h-64v-128h64V576zM640 576h-64v-128h64V576zM512 256h64V384h-64V256zM384 64h320V192H384V64zM768 256h128V576h-64v-192h-64V256zM256 64h64V192h-64V64zM768 64h128V192H768V64zM512 576h-64v-128h64V576zM192 384h-64v-128h64V384zM192 192h-64v-128h64V192zM0 704v-768h1024V704H0zM960 0H64V640h896V0zM384 256h64V384h-64V256zM256 576H128v-128h128V576zM384 576h-64v-128h64V576zM256 256h64V384h-64V256z" horiz-adv-x="1024" />
<glyph glyph-name="law" unicode="&#xf0d8;" d="M514 640c34 1 61 28 62 62 1 37-29 67-66 66-34-1-61-28-62-62-1-37 29-67 66-66z m464-384h-18l-127 246c18 2 36 9 52 16 24 11 29 43 11 62l-1 1c-11 11-28 15-43 8-14-6-34-13-53-13-56 0-81 64-287 64s-231-64-287-64c-20 0-39 6-53 13-15 6-32 3-43-8l-1-1c-18-19-13-50 11-62 16-8 34-14 52-16l-127-246h-18c-8 0-14-7-13-15 11-64 92-113 191-113s180 49 191 113c1 8-5 15-13 15h-18l-127 245c83 7 127 49 191 49v-486c-35 0-64-29-64-64h-71c-28 0-57-29-57-64h512c0 35-29 64-71 64h-57c0 35-29 64-64 64v486c64 0 108-42 191-49l-127-245h-18c-8 0-14-7-13-15 11-64 92-113 191-113s180 49 191 113c1 8-5 15-13 15z m-658 0h-192l96 180 96-180z m384 0l96 180 96-180h-192z" horiz-adv-x="1024" />
<glyph glyph-name="light-bulb" unicode="&#xf000;" d="M512 768c-176.731 0-320-143.269-320-320 0-104.69 50.278-197.633 128-256.015V0c0-35.346 28.653-64 64-64 0-35.346 28.653-64 64-64h128c35.347 0 64 28.654 64 64 35.347 0 64 28.654 64 64V191.985C781.722 250.36699999999996 832 343.31 832 448 832 624.731 688.731 768 512 768zM640 32c0-17.673-14.326-32-32-32H416c-17.674 0-32 14.327-32 32v32h256V32zM704 278.693c-33.234-33.03-64-42.389-64-124.041V128h-64V256l128 128v64l-64 64-64-64-64 64-64-64-64 64-64-64v-64l128-128v-128h-64v26.652c0 81.652-30.766 91.011-64 124.041C280.177 323.82 256 383.082 256 448c0 141.385 114.615 256 256 256s256-114.615 256-256C768 383.082 743.823 323.82 704 278.693zM512 256L384 384v64l64-64 64 64 64-64 64 64v-64L512 256z" horiz-adv-x="1024" />
<glyph glyph-name="link" unicode="&#xf05c;" d="M768 576h-138c48-32 93-89 107-128h30c65 0 128-64 128-128s-65-128-128-128h-192c-63 0-128 64-128 128 0 23 7 45 18 64h-137c-5-21-8-42-8-64 0-128 127-256 255-256s65 0 193 0 256 128 256 256-128 256-256 256z m-481-384h-30c-65 0-128 64-128 128s65 128 128 128h192c63 0 128-64 128-128 0-23-7-45-18-64h137c5 21 8 42 8 64 0 128-127 256-255 256s-65 0-193 0-256-128-256-256 128-256 256-256h138c-48 32-93 89-107 128z" horiz-adv-x="1024" />
<glyph glyph-name="link-external" unicode="&#xf07f;" d="M640 64H128V574.094L256 576V704H0v-768h768V256H640V64zM384 704l128-128L320 384l128-128 192 192 128-128V704H384z" horiz-adv-x="768" />
<glyph glyph-name="list-ordered" unicode="&#xf062;" d="M320 256h448v128h-448v-128z m0-256h448v128h-448v-128z m0 640v-128h448v128h-448z m-241-256h78v256h-36l-85-23v-50l43 2v-185z m110-206c0 36-12 78-96 78-33 0-64-6-83-16l1-66c21 10 42 15 67 15s32-11 32-28c0-26-30-58-110-112v-50h192v67l-91-2c49 30 87 66 87 113l1 1z" horiz-adv-x="768" />
<glyph glyph-name="list-unordered" unicode="&#xf061;" d="M0 256h128v128h-128v-128z m0 256h128v128h-128v-128z m0-512h128v128h-128v-128z m256 256h512v128h-512v-128z m0 256h512v128h-512v-128z m0-512h512v128h-512v-128z" horiz-adv-x="768" />
<glyph glyph-name="location" unicode="&#xf060;" d="M320 832c-177 0-320-143-320-320s160-416 320-704c160 288 320 527 320 704s-143 320-320 320z m0-448c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z" horiz-adv-x="640" />
<glyph glyph-name="lock" unicode="&#xf06a;" d="M704 384c-32 0-64 0-64 0s0 64 0 192-128 256-256 256-256-128-256-256 0-192 0-192-32 0-64 0-64-32-64-64 0-416 0-448 32-64 64-64 608 0 640 0 64 32 64 64 0 416 0 448-32 64-64 64z m-192-128h-384v-64h384v-64h-384v-64h384v-64h-384v-64h384v-64h-448v448h448v-64z m0 128h-256s0 128 0 192 64 128 128 128 128-64 128-128 0-192 0-192z" horiz-adv-x="768" />
<glyph glyph-name="logo-github" unicode="&#xf092;" d="M552.73 499.865H311.557c-6.205 0-11.25-5.045-11.25-11.297v-117.887c0-6.252 5.045-11.272 11.25-11.272h94.109v-146.542c0 0-21.145-7.057-79.496-7.057-68.914 0-165.156 25.244-165.156 236.795 0 211.642 100.197 239.491 194.307 239.491 81.465 0 116.514-14.304 138.869-21.241 7.01-2.203 13.404 4.831 13.404 11.105L534.543 785.87c0 2.912-1.041 6.417-4.262 8.785C521.186 801.048 465.865 832 326.168 832 165.133 832 0 763.513 0 434.243 0 105.02099999999996 189.051 56 348.381 56c131.883 0 212.021 56.314 212.021 56.314 3.268 1.801 3.6 6.395 3.6 8.479V488.568C563.955 494.773 558.887 499.865 552.73 499.865zM1772.381 803.866h-135.695c-6.252 0-11.271-5.044-11.271-11.296v-262.393h-211.619V792.57c0 6.252-5.068 11.296-11.178 11.296h-135.838c-6.111 0-11.084-5.044-11.084-11.296v-710.473c0-6.299 5.021-11.32 11.084-11.32h135.838c6.203 0 11.178 5.068 11.178 11.32V385.933h211.619l-0.475-303.883c0-6.3 5.021-11.272 11.084-11.272h135.885c6.252 0 11.131 5.068 11.131 11.272l0.473 710.521C1783.607 798.822 1778.539 803.866 1772.381 803.866zM714.949 787.763c-48.357 0-87.574-39.572-87.574-88.403 0-48.855 39.217-88.428 87.574-88.428s87.527 39.572 87.527 88.428C802.477 748.19 763.307 787.763 714.949 787.763zM792.861 559.874c0 6.205-5.02 11.344-11.131 11.344H646.32c-6.348 0-11.746-6.394-11.746-12.67 0 0 0-394.654 0-469.867 0-13.735 8.572-17.903 19.703-17.903 0 0 57.688 0 121.959 0 13.311 0 16.814 6.536 16.814 18.188-0.094 25.197-0.094 123.808-0.094 142.942C792.861 250.09500000000003 792.861 559.874 792.861 559.874zM2297.973 570.152h-134.701c-6.158 0-11.084-5.092-11.084-11.344v-348.31c0 0-34.244-25.197-82.934-25.197-48.547 0-61.525 22.024-61.525 69.719 0 47.553 0 303.835 0 303.835 0 6.252-5.068 11.345-11.131 11.345h-136.643c-6.252 0-11.178-5.093-11.178-11.345 0 0 0-185.521 0-326.807 0-141.284 78.766-175.906 186.99-175.906 88.854 0 160.609 49.115 160.609 49.115s3.363-25.766 5.068-28.844c1.422-3.078 5.447-6.158 9.852-6.158h86.58c6.158 0 11.178 5.069 11.178 11.321l0.379 477.278C2309.15 565.0609999999999 2304.129 570.152 2297.973 570.152zM2666.932 586.1610000000001c-76.539 0-128.592-34.148-128.592-34.148V792.57c0 6.252-5.068 11.296-11.131 11.296h-136.264c-6.109 0-11.131-5.044-11.131-11.296l-0.379-710.521c0-6.3 5.068-11.272 11.225-11.272 0 0 94.773 0 94.869 0 4.215 0 7.389 2.179 9.805 5.968 2.369 3.837 5.73 32.775 5.73 32.775s55.557-52.763 161.035-52.763c123.807 0 194.758 62.804 194.758 281.906C2856.859 557.482 2743.471 586.1610000000001 2666.932 586.1610000000001zM2613.791 185.77499999999998c-46.701 1.421-78.34 22.64-78.34 22.64v225.07c0 0 31.307 19.206 69.672 22.593 48.547 4.31 95.438-10.326 95.438-126.13C2700.322 207.94100000000003 2679.199 183.83399999999995 2613.791 185.77499999999998zM1185.125 188.33299999999997c-5.969 0-21.219-2.368-36.85-2.368-49.92 0-66.971 23.256-66.971 53.331 0 30.218 0 199.85 0 199.85h101.926c6.252 0 11.178 5.044 11.178 11.343v109.48c0.094 6.299-4.926 11.344-11.178 11.344h-101.926l-0.143 134.535c0 5.092-2.699 7.625-8.572 7.625H933.861c-5.352 0-8.336-2.391-8.336-7.578v-139.035c0 0-69.576-16.79-74.266-18.188-4.641-1.326-8.051-5.684-8.051-10.822v-87.408c0-6.252 5.068-11.344 11.178-11.344h71.139c0 0 0-91.34 0-210.222 0-156.109 109.553-171.455 183.439-171.455 33.723 0 74.076 10.988 80.848 13.356 4.074 1.421 6.395 5.637 6.395 10.136l0.047 96.101C1196.254 183.312 1190.998 188.428 1185.125 188.33299999999997z" horiz-adv-x="2856.857" />
<glyph glyph-name="mail" unicode="&#xf03b;" d="M0 640v-640h896V640H0zM768 576L448 312 128 576H768zM64 512l252.031-191.625L64 128V512zM128 64l254 206.25L448 220l65.875 50.125L768 64H128zM832 128L579.625 320.062 832 512V128z" horiz-adv-x="896" />
<glyph glyph-name="mail-read" unicode="&#xf03c;" d="M576 448H256v-64h320V448zM384 576H256v-64h128V576zM768 603.469V704H627.188L448 832 268.812 704H128v-100.531L0 512v-640h896V512L768 603.469zM192 640h512v-244.812L448 184 192 395.188V640zM64 384l252.031-191.625L64 0V384zM128-64l254 206.25L448 92l65.875 50.125L768-64H128zM832 0L579.625 192.062 832 384V0z" horiz-adv-x="896" />
<glyph glyph-name="mail-reply" unicode="&#xf051;" d="M384 672l-384-288 384-288v192c111 0 329-61 384-280 0 291-196 451-384 472v192z" horiz-adv-x="768" />
<glyph glyph-name="mark-github" unicode="&#xf00a;" d="M512 832C229.25 832 0 602.75 0 320c0-226.25 146.688-418.125 350.156-485.812 25.594-4.688 34.938 11.125 34.938 24.625 0 12.188-0.469 52.562-0.719 95.312C242-76.81200000000001 211.906 14.5 211.906 14.5c-23.312 59.125-56.844 74.875-56.844 74.875-46.531 31.75 3.53 31.125 3.53 31.125 51.406-3.562 78.47-52.75 78.47-52.75 45.688-78.25 119.875-55.625 149-42.5 4.654 33 17.904 55.625 32.5 68.375C304.906 106.56200000000001 185.344 150.5 185.344 346.688c0 55.938 19.969 101.562 52.656 137.406-5.219 13-22.844 65.094 5.062 135.562 0 0 42.938 13.75 140.812-52.5 40.812 11.406 84.594 17.031 128.125 17.219 43.5-0.188 87.312-5.875 128.188-17.281 97.688 66.312 140.688 52.5 140.688 52.5 28-70.531 10.375-122.562 5.125-135.5 32.812-35.844 52.625-81.469 52.625-137.406 0-196.688-119.75-240-233.812-252.688 18.438-15.875 34.75-47 34.75-94.75 0-68.438-0.688-123.625-0.688-140.5 0-13.625 9.312-29.562 35.25-24.562C877.438-98 1024 93.875 1024 320 1024 602.75 794.75 832 512 832z" horiz-adv-x="1024" />
<glyph glyph-name="markdown" unicode="&#xf0c9;" d="M950.154 640H73.846C33.127 640 0 606.873 0 566.154v-492.308C0 33.125 33.127 0 73.846 0h876.308c40.721 0 73.846 33.125 73.846 73.846V566.154C1024 606.873 990.875 640 950.154 640zM576 128.125L448 128V320l-96-123.077L256 320v-192H128V512h128l96-128 96 128 128 0.125V128.125zM767.091 96.125L608 320h96V512h128v-192h96L767.091 96.125z" horiz-adv-x="1024" />
<glyph glyph-name="megaphone" unicode="&#xf077;" d="M832 800c-130 0-124-130-704-128C57.344 672 0 557.375 0 416s57.344-256 128-256c22.781 0 43.188-0.5 64.188-0.875L256-128l192-32 64 96-45.125 203.125C709.375 102.875 733.75 32 832 32c106 0 192 172 192 384C1024 628.031 938 800 832 800zM197 349.062c-39.188 1.469-82.188 2.25-127.562 2.625C66 371.406 64 393.094 64 416c0 88.375 28.688 192 64 192 39.031-0.125 75 0.438 109 1.406C209.656 562.438 192 493.688 192 416 192 392.688 194.062 370.562 197 349.062zM261.312 346.062C258.125 368.312 256 391.625 256 416c0 79.5 18.438 149.5 46.906 196.219 155.156 8.312 251.906 28.469 319.031 50.188C593.625 595.531 576 510.344 576 416c0-40 3.875-78 9.5-114.312C513.344 320.375 412.812 337.406 261.312 346.062zM832 128c-12.125 0-23.688 5.062-34.812 12.125-15.25 67.312-83.438 418.344 117.438 494.188C942.125 581.5 960 503.812 960 416 960 257 902.625 128 832 128z" horiz-adv-x="1024" />
<glyph glyph-name="mention" unicode="&#xf0be;" d="M466.697 732.899C238.66 760.898 31.1 598.735 3.102 370.698c-28-228.038 134.163-435.598 362.2-463.597 71.429-8.756 145.115 0.913 213.325 29.946l-0.016 0.032c24.404 10.357 35.788 38.538 25.431 62.939-10.359 24.403-38.538 35.787-62.94 25.43l-0.001 0.004c-52.472-22.339-109.15-29.799-164.1-23.067-175.413 21.538-300.153 181.2-278.616 356.613 21.538 175.413 181.199 300.154 356.613 278.616 175.412-21.538 300.154-181.199 278.617-356.612-4.309-35.083-21.542-55.725-61.6-55.725-42.5 0-64 45.889-64 81.222V432c0 26.51-21.49 48-48 48-9.699 0-18.72-2.887-26.269-7.833-25.684 20.259-57.437 33.87-94.349 38.402-105.246 12.923-201.045-61.924-213.967-167.17C212.508 238.15200000000004 287.354 142.35400000000004 392.6 129.43200000000002c57.379-7.045 116.216 14.707 157.871 53.13 24.959-28.124 59.866-47.624 100.121-52.567 87.707-10.769 167.537 51.602 178.307 139.309C856.898 497.34 694.734 704.899 466.697 732.899zM511.285 308.30100000000004c-6.462-52.623-54.361-90.047-106.985-83.585-52.623 6.461-90.046 54.36-83.585 106.984 6.461 52.623 54.361 90.046 106.984 83.585C480.322 408.823 517.746 360.924 511.285 308.30100000000004z" horiz-adv-x="832" />
<glyph glyph-name="microscope" unicode="&#xf089;" d="M617-64c86.312 18.75 151 100 151 192 0 58.438-26.625 110.125-67.875 145.375C702.5 288.625 704 304.125 704 320c0 104.844-49.875 197.875-128 256l64 64v64l64 64L640 832l-64-64h-64L256 512l-128-64v-128l64-64h128l64 128 96 96c55.5-33.406 96-90.438 96-160-106.062 0-192-85.938-192-192H0v-64h192c19.125-14.25 42.062-22.125 64-32v-96H128L0-192h768L640-64H617zM512 128c0 35.375 28.625 64 64 64s64-28.625 64-64c0-35.312-28.625-64-64-64S512 92.68799999999999 512 128z" horiz-adv-x="768" />
<glyph glyph-name="milestone" unicode="&#xf075;" d="M704 640H0v-256h704l128 128L704 640zM448 448H320V576h128V448zM448 832H320v-128h128V832zM320-192h128V320H320V-192z" horiz-adv-x="832" />
<glyph glyph-name="mirror" unicode="&#xf024;" d="M320 512L128 320l192-192V256h384v-128l192 192L704 512v-128H320V512zM512 832L0 512v-704l512 256 512-256V512L512 832zM960-64L576 128v64H448v-64L64-64V448l384 256v-256h128V704l384-256V-64z" horiz-adv-x="1024" />
<glyph glyph-name="mortar-board" unicode="&#xf0d7;" d="M501 244l-245 76s0-96 0-160 115-96 256-96 256 32 256 96 0 160 0 160l-245-76c-7-2-15-2-23 0h1z m18 409c-4 1-9 1-13 0l-489-152c-21-7-21-36 0-43l111-35v-113c-19-11-32-32-32-55 0-12 3-23 9-32-5-9-9-20-9-32v-165c0-35 128-35 128 0v165c0 12-3 23-9 32 5 9 9 20 9 32 0 24-13 44-32 55v93l313-98c4-1 9-1 13 0l489 152c21 7 21 36 0 43l-488 153z m-6-205c-35 0-64 14-64 32s29 32 64 32 64-14 64-32-29-32-64-32z" horiz-adv-x="1024" />
<glyph glyph-name="move-down" unicode="&#xf0a8;" d="M640 512H448V832H192v-320H0l320-384L640 512zM0-192h640V0H0V-192z" horiz-adv-x="640" />
<glyph glyph-name="move-left" unicode="&#xf074;" d="M0 0h192V640H0V0zM704 448V640L320 320l384-320V192h320V448H704z" horiz-adv-x="1024" />
<glyph glyph-name="move-right" unicode="&#xf0a9;" d="M832 640v-640h192V640H832zM320 448H0v-256h320v-192l384 320L320 640V448z" horiz-adv-x="1024" />
<glyph glyph-name="move-up" unicode="&#xf0a7;" d="M0 128h192v-320h256V128h192L320 512 0 128zM0 832v-192h640V832H0z" horiz-adv-x="640" />
<glyph glyph-name="mute" unicode="&#xf080;" d="M128 448H0v-256h128l256-192h64V640h-64L128 448zM864 416l-64 64-96-96-96 96-63-63.5 95-96.5-96-96 64-64 96 96 96-96 64 64-96 96L864 416z" horiz-adv-x="896" />
<glyph glyph-name="no-newline" unicode="&#xf09c;" d="M896 512v-128H768V512L576 320l192-192V256h192c0 0 64 0.375 64 64s0 192 0 192H896zM224 544C100.281 544 0 443.719 0 320c0-123.75 100.281-224 224-224s224 100.25 224 224C448 443.719 347.719 544 224 544zM96 320c0 70.656 57.344 128 128 128 18.75 0 36.406-4.219 52.469-11.531L107.531 267.5C100.219 283.625 96 301.25 96 320zM224 192c-18.75 0-36.406 4.25-52.469 11.5l168.938 168.969C347.781 356.406 352 338.75 352 320 352 249.375 294.656 192 224 192z" horiz-adv-x="1024" />
<glyph glyph-name="octoface" unicode="&#xf008;" d="M940.812 554.312c8.25 20.219 35.375 101.75-8.562 211.906 0 0-67.375 21.312-219.875-82.906C648.5 700.875 579.875 703.5 512 703.5c-67.906 0-136.438-2.625-200.5-20.25C159.031 787.531 91.719 766.219 91.719 766.219 47.812 656 74.938 574.531 83.188 554.312 31.5 498.438 0 427.125 0 339.656 0 10.437999999999988 213.25-64 510.844-64 808.562-64 1024 10.437999999999988 1024 339.656 1024 427.125 992.5 498.438 940.812 554.312zM512-1c-211.406 0-382.781 9.875-382.781 214.688 0 48.938 24.062 94.595 65.344 132.312 68.75 62.969 185.281 29.688 317.438 29.688 132.25 0 248.625 33.281 317.438-29.625 41.312-37.78 65.438-83.312 65.438-132.312C894.875 8.875 723.375-1 512-1zM351.156 319.562c-42.469 0-76.906-51.062-76.906-114.188s34.438-114.312 76.906-114.312c42.375 0 76.812 51.188 76.812 114.312S393.531 319.562 351.156 319.562zM672.875 319.562C630.5 319.562 596 268.5 596 205.375s34.5-114.312 76.875-114.312 76.812 51.188 76.812 114.312C749.75 268.5 715.312 319.562 672.875 319.562z" horiz-adv-x="1024" />
<glyph glyph-name="organization" unicode="&#xf037;" d="M768 448h-64H576h-64-64-64-64H192h-64C57.344 448 0 390.656 0 320v-64c0-47.25 25.844-88.062 64-110.25V-64h256v-128h256V-64h256V145.75c38.125 22.188 64 62.938 64 110.25v64C896 390.656 838.625 448 768 448zM256 0H128V256H64v64c0 35.312 28.688 64 64 64h81.719c-11-18.875-17.719-40.562-17.719-64v-128c0-47.25 25.844-88.062 64-110.25V0zM576 128V256h-64v-384H384V256h-64v-128c-35.312 0-64 28.625-64 64V320c0 35.312 28.688 64 64 64h256c35.375 0 64-28.688 64-64v-128C640 156.625 611.375 128 576 128zM832 256h-64v-256H640v81.75c38.125 22.188 64 62.938 64 110.25V320c0 23.438-6.75 45.125-17.75 64H768c35.375 0 64-28.688 64-64V256zM303.688 514.625C338.875 474.125 390.156 448 448 448c57.875 0 109.125 26.125 144.312 66.625C614.125 475.062 655.688 448 704 448c70.625 0 128 57.344 128 128s-57.375 128-128 128c-25.625 0-49.375-7.688-69.375-20.688C614.875 768.438 539.062 832 448 832S281.094 768.438 261.375 683.312C241.344 696.312 217.594 704 192 704c-70.656 0-128-57.344-128-128s57.344-128 128-128C240.312 448 281.844 475.062 303.688 514.625zM704 640c35.375 0 64-28.594 64-64s-28.625-64-64-64c-35.312 0-64 28.594-64 64S668.688 640 704 640zM448 768c70.625 0 128-57.344 128-128s-57.375-128-128-128c-70.656 0-128 57.344-128 128S377.344 768 448 768zM192 512c-35.312 0-64 28.594-64 64s28.688 64 64 64c35.406 0 64-28.594 64-64S227.406 512 192 512z" horiz-adv-x="896" />
<glyph glyph-name="package" unicode="&#xf0c4;" d="M480 768L0 640v-576l480-128 480 128V640L480 768zM63.875 111.06600000000003L63.5 544l384.498-102.533 0.001-432.833L63.875 111.06600000000003zM63.5 608l160.254 42.734L640 539.735v-0.135l-160-42.667L63.5 608zM896.125 111.06600000000003L512.001 8.634000000000015l0.001 432.833L640 475.6v-156l128 34.135V509.733L896.5 544 896.125 111.06600000000003zM768 573.733v0.125L351.734 684.862 480 719.066 896.5 608 768 573.733z" horiz-adv-x="1024" />
<glyph glyph-name="paintcan" unicode="&#xf0d1;" d="M384 832C171.923 832 0 660.077 0 448v-64c0-35.346 28.654-64 64-64v-320c0-70.692 143.269-128 320-128s320 57.308 320 128V320c35.346 0 64 28.654 64 64v64C768 660.077 596.077 832 384 832zM576 192v-32c0-17.673-14.327-32-32-32s-32 14.327-32 32v32c0 17.673-14.327 32-32 32s-32-14.327-32-32v-160c0-17.673-14.327-32-32-32s-32 14.327-32 32V160c0 17.673-14.327 32-32 32s-32-14.327-32-32v-32c0-35.346-28.654-64-64-64s-64 28.654-64 64v64c-35.346 0-64 28.654-64 64V371.193C186.382 340.108 279.318 320 384 320s197.618 20.108 256 51.193V256C640 220.654 611.346 192 576 192zM384 384c-107.433 0-199.393 26.474-237.372 64 37.979 37.526 129.939 64 237.372 64s199.393-26.474 237.372-64C583.393 410.474 491.433 384 384 384zM384 576c-176.62 0-319.816-57.236-319.996-127.867-0.001 0.001-0.002 0.001-0.003 0.002C64.075 624.804 207.314 768 384 768c176.731 0 320-143.269 320-320C704 518.692 560.731 576 384 576z" horiz-adv-x="768" />
<glyph glyph-name="pencil" unicode="&#xf058;" d="M704 768L576 640l192-192 128 128L704 768zM0 64l0.688-192.562L192-128l512 512L512 576 0 64zM192-64H64V64h64v-64h64V-64z" horiz-adv-x="896" />
<glyph glyph-name="person" unicode="&#xf018;" d="M448 640C448 746 362.062 832 256 832S64 746 64 640c0-106.062 85.938-192 192-192S448 533.938 448 640zM256 512c-70.656 0-128 57.344-128 128S185.344 768 256 768c70.625 0 128-57.344 128-128S326.625 512 256 512zM384 448H256 128C57.344 448 0 390.656 0 320v-128c0-70.625 57.344-128 128-128v-256h256V64c70.625 0 128 57.375 128 128V320C512 390.656 454.625 448 384 448zM448 192c0-35.375-28.625-64-64-64V256h-64v-384H192V256h-64v-128c-35.312 0-64 28.625-64 64V320c0 35.312 28.688 64 64 64h256c35.375 0 64-28.688 64-64V192z" horiz-adv-x="512" />
<glyph glyph-name="pin" unicode="&#xf041;" d="M196 128l64-320 64 320c-20-2-43-3-64-3s-44 1-64 3z m254 299c-33 17-62 59-62 85v64c0 22 12 39 23 52 15 13 24 29 24 45 0 53-61 95-175 95s-175-42-175-95c0-16 9-32 24-45 11-13 23-30 23-52v-64c0-26-29-68-62-85-38-19-70-54-70-88 0-74 101-148 260-148s260 73 260 148c0 33-31 68-70 88z" horiz-adv-x="519.657" />
<glyph glyph-name="playback-fast-forward" unicode="&#xf0bd;" d="M0 64l384 256L0 576V64zM768 320L384 576v-256-256L768 320z" horiz-adv-x="768" />
<glyph glyph-name="playback-pause" unicode="&#xf0bb;" d="M0 0h192V640H0V0zM320 640v-640h192V640H320z" horiz-adv-x="512" />
<glyph glyph-name="playback-play" unicode="&#xf0bf;" d="M0 640l512-320L0 0V640z" horiz-adv-x="512" />
<glyph glyph-name="playback-rewind" unicode="&#xf0bc;" d="M384 320l384-256V576L384 320zM0 320l384-256V320 576L0 320z" horiz-adv-x="768" />
<glyph glyph-name="plug" unicode="&#xf0d4;" d="M1003.386 627.336l-0.905 0.905c-24.744 24.744-64.861 24.744-89.605 0l-45.707-45.707-90.51 90.51 45.707 45.707c24.744 24.744 24.744 64.861 0 89.605l-0.905 0.905c-24.744 24.744-64.861 24.744-89.605 0l-47.973-47.973C621.76 802.446 537.237 795.66 482.502 740.926l-24.89-24.89c-109.011-109.011-121.948-277.692-38.854-400.892l-4.138-4.138c-62.392-62.392-62.484-163.493-0.275-225.999 12.41-12.469 12.642-33.327 0.121-45.683-12.509-12.343-32.655-12.292-45.101 0.153l-89.427 89.427c-62.637 62.638-164.63 63.747-227.299 1.141-62.542-62.479-62.562-163.829-0.058-226.332l8.763-8.763c24.744-24.744 64.861-24.744 89.605 0l0.905 0.905c24.744 24.744 24.744 64.861 0 89.605l-8.292 8.292c-12.329 12.329-13.085 32.418-1.098 45.081 12.437 13.138 33.174 13.353 45.882 0.645l89.328-89.328c62.92-62.92 165.504-63.814 228.081-0.553 61.793 62.468 61.65 163.161-0.431 225.451-12.55 12.592-12.777 32.866-0.207 45.437l4.151 4.151c123.2-83.095 291.881-70.158 400.892 38.854l24.89 24.89c54.734 54.735 61.52 139.258 20.362 201.382l47.973 47.973C1028.129 562.475 1028.129 602.593 1003.386 627.336zM889.796 333.632c-37.49-37.49-98.274-37.49-135.765 0L527.757 559.906c-37.49 37.49-37.49 98.274 0 135.765 29.556 29.556 73.585 35.804 109.269 18.759l-41.839-41.839c-24.744-24.744-24.744-64.861 0-89.604l0.905-0.905c24.744-24.744 64.861-24.744 89.605 0l45.707 45.707 90.51-90.51-45.707-45.707c-24.744-24.744-24.744-64.861 0-89.605l0.905-0.905c24.744-24.744 64.861-24.744 89.604 0l41.839 41.839C925.6 407.218 919.351 363.188 889.796 333.632z" horiz-adv-x="1024" />
<glyph glyph-name="plus" unicode="&#xf05d;" d="M384 384V640H256v-256H0v-128h256v-256h128V256h256V384H384z" horiz-adv-x="640" />
<glyph glyph-name="podium" unicode="&#xf0af;" d="M320 832c-32 0-64-32-64-64s0-64 0-64h-64l-192-192v-128h192l64-384-128-64v-64h512v64l-128 64 64 384h192v128l-192 192h-256v64s14 0 32 0 32 17 32 32-16 32-32 32 0 0-32 0z m0-832l-53 320h118l-1-320h-64z m-224 512l128 128h32v-64h64v64h224l128-128h-576z" horiz-adv-x="768" />
<glyph glyph-name="primitive-dot" unicode="&#xf052;" d="M-0.088 320c0 141.5 114.5 256 256 256 141.438 0 256-114.5 256-256s-114.562-256-256-256C114.413 64-0.088 178.5-0.088 320z" horiz-adv-x="511.825" />
<glyph glyph-name="primitive-square" unicode="&#xf053;" d="M512 64H0V576h512V64z" horiz-adv-x="512" />
<glyph glyph-name="pulse" unicode="&#xf085;" d="M736 320.062L563.188 486.406 422.406 288 352 729.594 152.438 320.062H0V192h230.406L288 307.188l57.594-345.562L576 288l102.375-96H896V320.062H736z" horiz-adv-x="896" />
<glyph glyph-name="puzzle" unicode="&#xf0c0;" d="M755.75 256.85c-13.95 9.96-28.52 16.59-43.47 19.92-8.84 1.69-18.06 2.33-27.57 1.81-8.99-0.5-17.56-1.68-25.69-3.52-6.1-1.69-12.22-3.89-18.35-6.59-18.18-8.02-33.89-18.12-46.79-30.33-12.22-12.9-22.32-28.62-30.34-46.79-2.7-6.12-4.9-12.24-6.59-18.34-1.84-8.14-3.03-16.7-3.52-25.69-0.52-9.51 0.12-18.73 1.81-27.57 3.33-14.95 9.96-29.52 19.92-43.47 3.89-5.44 8.08-10.4 12.56-14.88 20.06-20.03 45.83-30.7 75.42-34.11 8.92-1.02 18.12-1.68 26.53-4.48 5.12-1.7 9.16-4.08 12.08-7.02 6.65-6.6 7.63-16.1 2.5-27.24-3.15-6.84-7.7-13.45-12.96-18.84l-2.79-2.86c-3.93-3.92-6.41-6.4-7.05-7.04-3.13-3.16-6.1-6.15-9.06-9.15l-2.96-2.92c-10.52-10.58-21.09-21.12-31.66-31.65-22.76-22.82-45.57-45.58-68.38-68.36-7.5-7.5-15-15-22.5-22.49-3.46-3.45-7.07-6.38-10.78-8.79-1.8-1.22-3.49-2.24-5.18-3.16-19.6-9.89-41.43-5.92-59.24 11.88-5.4 5.4-10.62 10.62-15.85 15.84-30.25 30.25-60.48 60.52-90.77 90.73-8.59 8.57-17.13 17.08-25.68 25.59-6.12 6.09-12.67 11.85-19.56 17.06-5.72 4.33-11.59 7.56-17.46 9.73-21.16 7.32-41.41 2.01-54.67-13.26-3.81-4.8-7-10.47-9.39-16.94-3.43-9.26-4.6-19.47-5.9-29.36-4.9-37.53-25.8-68.43-55.98-82.65-7.48-3.65-15.49-6.29-23.9-7.78-7.95-1.41-15.95-1.71-23.85-1.04-26.61 1.35-49.48 13.09-68.51 32.57-1.68 1.67-2.1 2.09-2.51 2.51-19.48 19.02-31.22 41.9-32.57 68.5-0.68 7.9-0.37 15.9 1.04 23.85 1.49 8.41 4.13 16.43 7.78 23.9 14.22 30.18 45.13 51.07 82.65 55.97 9.89 1.29 20.1 2.47 29.36 5.9 6.94 2.56 12.96 6.05 17.97 10.23 14.54 13.15 19.59 32.63 12.84 52.34-2.78 7.35-6 13.22-10.33 18.94-5.21 6.88-10.97 13.43-17.06 19.55-8.51 8.55-17.03 17.09-25.55 25.63-26.92 26.98-53.84 53.88-80.75 80.78l-10.03 10.03c-5.22 5.22-10.45 10.45-15.26 15.27-18.39 18.4-22.35 40.22-12.46 59.82 0.92 1.69 1.94 3.37 3.08 5.05 2.49 3.84 5.42 7.45 8.87 10.91 7.49 7.5 14.99 15 22.49 22.5 22.77 22.81 45.54 45.62 68.36 68.38 10.53 10.57 21.06 21.14 31.65 31.66l2.92 2.96c2.99 2.97 5.99 5.93 8.98 8.9 0.8 0.81 3.28 3.29 7.2 7.22l2.86 2.79c5.39 5.26 12 9.8 18.84 12.96 11.14 5.13 20.63 4.15 27.24-2.5 2.94-2.92 5.32-6.96 7.02-12.08 2.79-8.41 3.45-17.61 4.48-26.53 3.41-29.59 14.08-55.35 34.11-75.41 4.49-4.48 9.44-8.67 14.88-12.56 13.95-9.96 28.52-16.59 43.47-19.92 8.84-1.69 18.06-2.33 27.57-1.81 8.99 0.5 17.56 1.68 25.69 3.52 6.1 1.69 12.22 3.89 18.35 6.59 18.18 8.02 33.89 18.12 46.79 30.33 12.22 12.9 22.32 28.62 30.34 46.79 2.7 6.12 4.9 12.24 6.59 18.34 1.84 8.14 3.03 16.7 3.52 25.69 0.52 9.51-0.12 18.73-1.81 27.57-3.33 14.95-9.96 29.52-19.92 43.47-3.89 5.44-8.08 10.4-12.56 14.88-20.06 20.03-45.83 30.7-75.42 34.11-8.92 1.02-18.12 1.68-26.53 4.48-5.12 1.7-9.16 4.08-12.08 7.02-6.65 6.6-7.63 16.1-2.5 27.24 3.15 6.84 7.7 13.45 12.96 18.84l2.79 2.86c3.93 3.92 6.41 6.4 7.05 7.04 3.13 3.16 6.1 6.15 9.06 9.15l2.96 2.92c10.52 10.58 21.09 21.12 31.66 31.65 22.76 22.82 45.57 45.58 68.38 68.35 7.5 7.5 15 15 22.5 22.49 3.46 3.45 7.07 6.38 10.78 8.79 1.8 1.22 3.49 2.24 5.18 3.16 19.6 9.89 41.43 5.92 59.24-11.88 5.4-5.4 10.62-10.62 15.85-15.84 30.25-30.25 60.48-60.52 90.77-90.73 8.59-8.57 17.13-17.08 25.68-25.59 6.12-6.09 12.67-11.85 19.56-17.06 5.72-4.33 11.59-7.56 17.46-9.73 21.16-7.32 41.41-2.01 54.67 13.26 3.81 4.8 7 10.47 9.39 16.94 3.43 9.26 4.6 19.47 5.9 29.36 4.9 37.53 25.8 68.43 55.98 82.65 7.48 3.65 15.49 6.28 23.9 7.78 7.95 1.41 15.95 1.71 23.85 1.04 26.61-1.35 49.48-13.09 68.51-32.57 1.68-1.67 2.1-2.09 2.51-2.51 19.48-19.02 31.22-41.9 32.57-68.5 0.68-7.9 0.37-15.9-1.04-23.85-1.49-8.41-4.13-16.43-7.78-23.9-14.22-30.18-45.13-51.07-82.65-55.97-9.89-1.29-20.1-2.47-29.36-5.9-6.94-2.56-12.96-6.05-17.97-10.23-14.54-13.15-19.59-32.63-12.84-52.34 2.78-7.35 6-13.22 10.33-18.94 5.21-6.88 10.97-13.43 17.06-19.55 8.51-8.55 17.03-17.09 25.55-25.63 30.26-30.33 60.54-60.56 90.78-90.81 5.22-5.22 10.45-10.45 15.26-15.27 18.39-18.4 22.35-40.22 12.46-59.82-0.92-1.69-1.94-3.37-3.08-5.05-2.49-3.84-5.42-7.45-8.87-10.91-7.49-7.5-14.99-15-22.49-22.5-22.77-22.81-45.54-45.62-68.36-68.38-10.53-10.57-21.06-21.14-31.65-31.66l-2.92-2.96c-2.99-2.97-5.99-5.93-8.98-8.9-0.8-0.81-3.28-3.29-7.2-7.22l-2.86-2.79c-5.39-5.26-12-9.8-18.84-12.96-11.14-5.13-20.63-4.15-27.24 2.5-2.94 2.92-5.32 6.96-7.02 12.08-2.79 8.41-3.45 17.61-4.48 26.53-3.41 29.59-14.08 55.35-34.11 75.41C766.15 248.76999999999998 761.19 252.97000000000003 755.75 256.85z" horiz-adv-x="1024" />
<glyph glyph-name="question" unicode="&#xf02c;" d="M448 64h128v128h-128v-128z m64 512c-96 0-192-96-192-192h128c0 32 32 64 64 64s64-32 64-64c0-64-128-64-128-128h128c64 22 128 64 128 160s-96 160-192 160z m0 256c-283 0-512-229-512-512s229-512 512-512 512 229 512 512-229 512-512 512z m0-896c-212 0-384 172-384 384s172 384 384 384 384-172 384-384-172-384-384-384z" horiz-adv-x="1024" />
<glyph glyph-name="quote" unicode="&#xf063;" d="M0 320v-256h256V320H128c0 0 0 128 128 128V576C256 576 0 576 0 320zM640 448V576c0 0-256 0-256-256v-256h256V320H512C512 320 512 448 640 448z" horiz-adv-x="640" />
<glyph glyph-name="radio-tower" unicode="&#xf030;" d="M306.838 441.261c15.868 16.306 15.868 42.731 0 59.037-20.521 21.116-30.643 48.417-30.705 76.124 0.062 27.77 10.183 55.039 30.705 76.186 15.868 16.337 15.868 42.764 0 59.069-7.934 8.184-18.272 12.275-28.706 12.275-10.371 0-20.804-4.029-28.738-12.213-36.266-37.297-54.633-86.433-54.57-135.317-0.062-48.792 18.305-97.927 54.57-135.161C265.262 424.955 290.97 424.955 306.838 441.261zM149.093 798.858c-8.121 8.309-18.68 12.463-29.3 12.463-10.558 0-21.179-4.154-29.237-12.463C30.8 737.509 0.751 656.856 0.813 576.422 0.751 496.081 30.8 415.272 90.494 353.985c16.181-16.618 42.356-16.618 58.537 0 16.118 16.587 16.118 43.513 0 60.067-43.7 44.98-65.44 103.456-65.44 162.368s21.74 117.449 65.44 162.368C165.149 755.439 165.149 782.365 149.093 798.858zM513.031 472.153c57.351 0 103.956 46.574 103.956 103.956 0 57.382-46.605 103.955-103.956 103.955-57.381 0-103.956-46.573-103.956-103.955C409.076 518.727 455.65 472.153 513.031 472.153zM933.539 798.233c-16.181 16.618-42.355 16.618-58.475 0-16.181-16.587-16.181-43.513 0-60.068 43.668-44.918 65.409-103.456 65.409-162.368 0-58.85-21.805-117.387-65.473-162.306-16.117-16.618-16.117-43.575 0.062-60.068 8.059-8.309 18.616-12.463 29.237-12.463 10.558 0 21.178 4.154 29.236 12.463 59.726 61.287 89.774 142.096 89.649 222.437C1023.313 656.138 993.264 736.947 933.539 798.233zM513.281 389.127L513.281 389.127c-26.489-0.062-53.04 6.466-77.091 19.429L235.057-127.59000000000003h95.209l54.819 63.973h255.891l53.977-63.973h95.272L589.124 408.431C565.384 395.655 539.395 389.127 513.281 389.127zM512.656 358.483L577.004 128.29999999999995H449.059L512.656 358.483zM385.086 0.3550000000000182l63.974 63.973h127.944l63.974-63.973H385.086zM717.194 710.958c-15.868-16.306-15.868-42.731 0-59.037 20.491-21.116 30.611-48.511 30.674-76.124-0.062-27.77-10.183-55.102-30.674-76.187-15.868-16.336-15.868-42.763 0-59.068 7.871-8.184 18.242-12.213 28.737-12.213 10.309 0 20.741 4.029 28.675 12.213 36.298 37.234 54.665 86.433 54.54 135.255 0.125 48.792-18.181 97.927-54.54 135.161C758.801 727.264 733.062 727.264 717.194 710.958z" horiz-adv-x="1024" />
<glyph glyph-name="repo" unicode="&#xf001;" d="M320 576h-64v-64h64v64z m0 128h-64v-64h64v64z m384 128c-32 0-608 0-640 0s-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l96 96 96-96v128s288 0 320 0 64 32 64 64 0 736 0 768-32 64-64 64z m0-800c0-16-15-32-32-32s-288 0-288 0v64h-192v-64s-79 0-96 0-32 17-32 32 0 96 0 96h640s0-80 0-96z m0 160h-512v576h513l-1-576z m-384 128h-64v-64h64v64z m0 128h-64v-64h64v64z" horiz-adv-x="768" />
<glyph glyph-name="repo-clone" unicode="&#xf04c;" d="M320 448h-64v-64h64v64z m-128 320h256v64s-352 0-384 0-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l96 96 96-96v128s286 0 320 0 64 32 64 64 0 192 0 192h-576v576z m512-640s0-79 0-96-14-32-32-32-288 0-288 0v64h-192v-64s-80 0-96 0-32 16-32 32 0 96 0 96h640z m-384 448h-64v-64h64v64z m-64-320h64v64h-64v-64z m704 576c-32 0-288 0-320 0s-64-32-64-64 0-352 0-384 32-64 64-64 64 0 64 0v-64l32 32 32-32v64s160 0 192 0 64 32 64 64 0 352 0 384-32 64-64 64z m-256-448s-15 0-32 0-32 15-32 32 0 32 0 32h64v-64z m256 32c0-16-15-32-32-32s-160 0-160 0v64h192s0-16 0-32z m0 96h-256v256h224s32 0 32-32 0-224 0-224z m-640 192h-64v-64h64v64z" horiz-adv-x="1024" />
<glyph glyph-name="repo-force-push" unicode="&#xf04a;" d="M768 768c0 32-32 64-64 64s-608 0-640 0-64-32-64-64 0-768 0-768 0 32 0 0 32-64 64-64 128 0 128 0v-128l128 128v128h-128v-64s-79 0-96 0-32 15-32 32 0 96 0 96h256v64h-128v576h512v-576h-128v-64h128s0-80 0-96-15-32-32-32-96 0-96 0v-64s96 0 128 0 64 32 64 64 0 736 0 768z m-272-320h144l-192 256-192-256h144l-144-192h128v-448h128v448h128l-144 192z" horiz-adv-x="767.896" />
<glyph glyph-name="repo-forked" unicode="&#xf002;" d="M768 704c0 71-57 128-128 128s-128-57-128-128c0-47 26-89 64-111v-106l-192-212-192 212v106c38 22 64 63 64 111 0 71-57 128-128 128s-128-57-128-128c0-47 26-89 64-111v-156l256-282v-109c-38-22-64-63-64-111 0-71 57-128 128-128s128 57 128 128c0 47-26 89-64 111v109l256 282v156c38 22 64 63 64 111z m-640 63c34 0 62-28 62-62s-28-62-62-62-62 28-62 62 28 62 62 62z m256-891c-34 0-62 28-62 62s28 62 62 62 62-28 62-62-28-62-62-62z m256 891c34 0 62-28 62-62s-28-62-62-62-62 28-62 62 28 62 62 62z" horiz-adv-x="768" />
<glyph glyph-name="repo-pull" unicode="&#xf006;" d="M1024 512l-192 192v-128h-384v-128h384v-128l192 192z m-320-320h-512v576h512v-128h64s0 96 0 128-32 64-64 64-608 0-640 0-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l96 96 96-96v128s288 0 320 0 64 32 64 64 0 384 0 384h-64v-192z m0-160c0-15-15-32-32-32s-288 0-288 0v64h-192v-64s-79 0-96 0-32 16-32 32 0 96 0 96h640s0-81 0-96z m-384 544h-64v-64h64v64z m0 128h-64v-64h64v64z m0-256h-64v-64h64v64z m-64-192h64v64h-64v-64z" horiz-adv-x="1024" />
<glyph glyph-name="repo-push" unicode="&#xf005;" d="M448 512l-192-256h128v-448h128v448h128l-192 256z m-192 0h64v64h-64v-64z m64 192h-64v-64h64v64z m384 128c-32 0-608 0-640 0s-64-32-64-64 0-736 0-768 32-64 64-64 128 0 128 0v-128l128 128v128h-128v-64s-79 0-96 0-32 14-32 32 0 96 0 96h256v64h-128v576h513l-1-576h-128v-64h128s0-79 0-96-15-32-32-32-96 0-96 0v-64s96 0 128 0 64 32 64 64 0 736 0 768-32 64-64 64z" horiz-adv-x="768" />
<glyph glyph-name="rocket" unicode="&#xf033;" d="M716.737 707.944c-71.926-41.686-148.041-96.13-218.436-166.555-45-45.031-81.213-88.78-110.39-129.778L209.538 378.65 0.047 169.00300000000004l186.818-5.815 131.562 131.562c-46.439-96.224-50.536-160.019-50.536-160.019l58.854-58.792c0 0 65.827 6.255 162.737 53.163L355.107-5.119000000000028l5.88-186.881 209.585 209.521 33.086 179.252c41.403 29.02 85.185 65.046 129.716 109.545 70.425 70.455 124.837 146.541 166.555 218.466-45.97 9.351-88.125 28.488-121.397 61.668C745.257 619.819 725.994 661.975 716.737 707.944zM786.161 745.157c5.004-45 19.952-81.274 44.78-105.98 24.769-24.985 60.98-39.902 106.138-44.844C1003.063 727.677 1023.953 832 1023.953 832S919.63 811.142 786.161 745.157z" horiz-adv-x="1024" />
<glyph glyph-name="rss" unicode="&#xf034;" d="M128 192C57.344 192 0 134.625 0 64s57.344-128 128-128 128 57.375 128 128S198.656 192 128 192zM128 448c0 0-64-2-64-64s64-64 64-64c141.375 0 256-114.625 256-256 0 0 0-64 64-64s64 64 64 64C512 276 340.031 448 128 448zM128 704c0 0-64 0-64-64s64-64 64-64c282.75 0 512-229.25 512-512 0 0 0-64 64-64s64 64 64 64C768 417.406 481.5 704 128 704z" horiz-adv-x="768" />
<glyph glyph-name="ruby" unicode="&#xf047;" d="M768 704H256L0 448l512-512 512 512L768 704zM128 448l192 192h384l192-192L512 64 128 448zM704 576H512v-448l320 320L704 576z" horiz-adv-x="1024" />
<glyph glyph-name="screen-full" unicode="&#xf066;" d="M128 64h639.875V576H128V64zM255.938 448h384v-256h-384V448zM64 639.938h191.938v64H0V448h64V639.938zM64 192H0v-255.938h255.938V0H64V192zM639.938 703.938v-64h191.938V448h64V703.938H639.938zM831.875 0H639.938v-63.938h255.938V192h-64V0z" horiz-adv-x="895.875" />
<glyph glyph-name="screen-normal" unicode="&#xf067;" d="M127.938 640.062H0v-64h191.938V768h-64V640.062zM0-0.06200000000001182h127.938V-128h64V63.93799999999999H0V-0.06200000000001182zM768.062 640.062V768h-64v-191.938H896v64H768.062zM704.062-128h64V-0.06200000000001182H896v64H704.062V-128zM192.062 128H704V512H192.062V128zM320 384h256v-128H320V384z" horiz-adv-x="896" />
<glyph glyph-name="search" unicode="&#xf02e;" d="M960 0L710.875 249.125C746.438 307.188 768 374.844 768 448 768 660.031 596 832 384 832 171.969 832 0 660.031 0 448c0-212 171.969-384 384-384 73.156 0 140.812 21.562 198.875 57L832-128c17.5-17.5 46.5-17.375 64 0l64 64C977.5-46.5 977.5-17.5 960 0zM384 192c-141.375 0-256 114.625-256 256s114.625 256 256 256 256-114.625 256-256S525.375 192 384 192z" horiz-adv-x="973.125" />
<glyph glyph-name="server" unicode="&#xf097;" d="M704 448h-640c-35 0-64-32-64-64v-128c0-32 32-64 64-64h640c32 0 64 32 64 64v128c0 32-32 64-64 64z m-576-192h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m192-128h-640c-35 0-64-32-64-64v-128c0-32 32-64 64-64h640c32 0 64 32 64 64v128c0 32-32 64-64 64z m-576-192h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m192 832h-640c-35 0-64-32-64-64v-128c0-32 32-64 64-64h640c32 0 64 32 64 64v128c0 32-32 64-64 64z m-576-192h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m128 0h-64v128h64v-128z m192 64h-64v64h64v-64z" horiz-adv-x="768" />
<glyph glyph-name="settings" unicode="&#xf07c;" d="M64-64h128V128H64V-64zM192 704H64v-320h128V704zM512 704H384v-128h128V704zM0 192h256V320H0V192zM384-64h128V320H384V-64zM320 384h256V512H320V384zM832 704H704v-384h128V704zM640 256v-128h256V256H640zM704-64h128V64H704V-64z" horiz-adv-x="896" />
<glyph glyph-name="sign-in" unicode="&#xf036;" d="M640 256L640 384 896 384 896 512 640 512 640 640 448 496 448 640 192 768 704 768 704 576 768 576 768 832 64 832 64 0 448-192 448 0 768 0 768 320 704 320 704 64 448 64 448 400z" horiz-adv-x="896" />
<glyph glyph-name="sign-out" unicode="&#xf032;" d="M640 64H384V640L128 768h512v-192h64V832H0v-832l384-192V0h320V320h-64V64zM1024 448L768 640v-128H512v-128h256v-128L1024 448z" horiz-adv-x="1024" />
<glyph glyph-name="split" unicode="&#xf0c6;" d="M448 576l-256 256-192-192 311-300c15 81 43 136 133 230l5 6z m128 256l133-133-197-197c-99-99-128-162-128-309v-384h256v384c0 52 19 94 53 128l197 197 133-133v448h-448z" horiz-adv-x="1024" />
<glyph glyph-name="squirrel" unicode="&#xf0b2;" d="M768 768c-141.385 0-256-83.75-256-186.875C512 457.25 544 387 512 192c0 288-177 405.783-256 405.783 3.266 32.17-30.955 42.217-30.955 42.217s-14-7.124-19.354-21.583c-17.231 20.053-36.154 17.54-36.154 17.54l-8.491-37.081c0 0-117.045-40.876-118.635-206.292C56 371 141.311 353.898 201.887 364.882c57.157-2.956 42.991-50.648 30.193-63.446C178.083 247.438 128 320 64 320s-64-64 0-64 64-64 192-64c-198-77 0-256 0-256h-64c-64 0-64-64-64-64s256 0 384 0c192 0 320 64 320 222.182 0 54.34-27.699 114.629-64 162.228C697.057 349.433 782.453 427.566 832 384s192-64 192 128C1024 653.385 909.385 768 768 768zM160 448c-17.674 0-32 14.327-32 32 0 17.674 14.326 32 32 32 17.673 0 32-14.326 32-32C192 462.327 177.673 448 160 448z" horiz-adv-x="1024" />
<glyph glyph-name="star" unicode="&#xf02a;" d="M896 448l-313.5 40.781L448 768 313.469 488.781 0 448l230.469-208.875L171-63.93799999999999l277 148.812 277.062-148.812L665.5 239.125 896 448z" horiz-adv-x="896" />
<glyph glyph-name="steps" unicode="&#xf0c7;" d="M136 768C60.89 768 0 667.71 0 544c0-68.83 17.02-141.84 34-254.54C47.3 201.16999999999996 79.67 128 136 128s94.08 48.79 94.08 137.97c0 30.37-24.97 78.75-26.08 120.03-2.02 74.46 49.93 104.17 49.93 173C253.93 682.71 211.1 768 136 768zM502.97 512c-75.1 0-117.93-85.29-117.93-209 0-68.83 51.95-98.54 49.93-173-1.109-41.28-26.08-89.66-26.08-120.03 0-89.18 37.75-137.97 94.08-137.97s88.7 73.17 102 161.46c16.98 112.7 34 185.71 34 254.54C638.97 411.71 578.08 512 502.97 512z" horiz-adv-x="640" />
<glyph glyph-name="stop" unicode="&#xf08f;" d="M704 832H320L0 512v-384l320-320h384l320 320V512L704 832zM896 192L640-64H384L128 192V448l256 256h256l256-256V192zM448 256h128V576H448V256zM448 64h128V192H448V64z" horiz-adv-x="1024" />
<glyph glyph-name="sync" unicode="&#xf087;" d="M655.461 358.531c11.875-81.719-13.062-167.781-76.812-230.594-94.188-92.938-239.5-104.375-346.375-34.562l74.875 73L31.96 204.75 70.367-64l84.031 80.5c150.907-111.25 364.938-100.75 502.063 34.562 79.5 78.438 115.75 182.562 111.25 285.312L655.461 358.531zM189.46 511.938c94.156 92.938 239.438 104.438 346.313 34.562l-75-72.969 275.188-38.406L697.586 704l-83.938-80.688C462.711 734.656 248.742 724.031 111.585 588.75 32.085 510.344-4.133 406.219 0.335 303.5l112.25-22.125C100.71 363.125 125.71 449.094 189.46 511.938z" horiz-adv-x="768.051" />
<glyph glyph-name="tag" unicode="&#xf015;" d="M384 768H128L0 640v-256l512-512 384 384L384 768zM64 416V608l96 96h192l448-448L512-32 64 416zM448 512L256 320l256-256 192 192L448 512zM352 320l96 96 160-160-96-96L352 320zM320 544c0 53-43 96-96 96s-96-43-96-96 43-96 96-96S320 491 320 544zM224 512c-17.656 0-32 14.344-32 32s14.344 32 32 32 32-14.344 32-32S241.656 512 224 512z" horiz-adv-x="896" />
<glyph glyph-name="telescope" unicode="&#xf088;" d="M76 409c32 8 229 59 229 59-1-6-2-19-2-19 0-71 49-128 128-128s128 59 128 128c0 11-8 22-19 32l49-3s7 2 31 8c-51-14-108 31-126 99s8 135 60 149c-24-6-31-8-31-8l-168-110c-34-9-55-46-46-80 2-9 7-17 12-23-7-12-12-26-15-40-27 1-51 19-59 46-9 34 11 69 45 78l-245-65c-34-9-54-43-45-77s41-54 73-46z m419-153h-128v-64l-320-320h128l192 128v-128h128v128l192-128h128l-320 320v64z m429 448c-18 68-70 110-122 96-69-18-98-28-186-51-51-14-79-80-61-148s74-115 125-102c87 23 117 33 186 51 51 14 76 85 58 154z m-70-90c-17-5-42 17-51 51s-4 66 13 70 42-17 51-51 4-66-13-70z" horiz-adv-x="929.875" />
<glyph glyph-name="terminal" unicode="&#xf0c8;" d="M831 705H63c-35.35 0-64-28.65-64-64v-640c0-35.35 28.65-64 64-64h768c35.35 0 64 28.65 64 64V641C895 676.35 866.35 705 831 705zM127 257l128 128L127 513l64 64 192-192L191 193 127 257zM639 193H383v64h256V193z" horiz-adv-x="896" />
<glyph glyph-name="three-bars" unicode="&#xf05e;" d="M0 640v-128h768v128h-768z m0-384h768v128h-768v-128z m0-256h768v128h-768v-128z" horiz-adv-x="768" />
<glyph glyph-name="tools" unicode="&#xf031;" d="M286.547 366.984c16.843-16.812 81.716-85.279 81.716-85.279l35.968 37.093-56.373 58.248L456.072 491.98c0 0-48.842 47.623-27.468 28.655 20.438 75.903 1.812 160.589-55.842 220.243C315.608 800.064 234.392 819.47 161.425 799.096l123.653-127.715-32.53-125.309-121.06-33.438L7.898 640.3820000000001c-19.718-75.436-0.969-159.339 56.311-218.556C124.302 359.703 210.83 341.453 286.547 366.984zM698.815 242.769L549.694 95.46100000000001l245.932-254.805c20.062-20.812 46.498-31.188 72.872-31.188 26.25 0 52.624 10.375 72.811 31.188 40.249 41.624 40.249 108.997 0 150.62L698.815 242.769zM1023.681 670.162L867.06 832.001 405.387 354.703l56.373-58.248L185.425 10.839000000000055l-63.154-33.749-89.217-145.559 22.719-23.562 140.839 92.247 32.655 65.312 276.336 285.554 56.404-58.248L1023.681 670.162z" horiz-adv-x="1024" />
<glyph glyph-name="trashcan" unicode="&#xf0d0;" d="M704 704H448c0 0 0 24.057 0 32 0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 0-32 0-32H128c-35.346 0-64-28.654-64-64v-64c0-35.346 28.654-64 64-64v-576c0-35.346 28.654-64 64-64h448c35.346 0 64 28.654 64 64V512c35.346 0 64 28.654 64 64v64C768 675.346 739.346 704 704 704zM640-32c0-17.673-14.327-32-32-32H224c-17.673 0-32 14.327-32 32V512h64v-480c0-17.673 14.327-32 32-32s32 14.327 32 32l0.387 480H384v-480c0-17.673 14.327-32 32-32s32 14.327 32 32l0.387 480h64L512 32c0-17.673 14.327-32 32-32s32 14.327 32 32V512h64V-32zM704 592c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h544c8.837 0 16-7.163 16-16V592z" horiz-adv-x="768" />
<glyph glyph-name="triangle-down" unicode="&#xf05b;" d="M0 448l383.75-383.75L767.5 448H0z" horiz-adv-x="767.5" />
<glyph glyph-name="triangle-left" unicode="&#xf044;" d="M0 320.125l383.75-383.75v767.5L0 320.125z" horiz-adv-x="383.75" />
<glyph glyph-name="triangle-right" unicode="&#xf05a;" d="M0.062 703.75L383.812 320 0.062-63.75V703.75z" horiz-adv-x="383.875" />
<glyph glyph-name="triangle-up" unicode="&#xf0aa;" d="M383.75 576L0 192.25h767.5L383.75 576z" horiz-adv-x="767.5" />
<glyph glyph-name="unfold" unicode="&#xf039;" d="M384 448h128V640h128L448 832 256 640h128V448zM576 576v-64h224L672 384H224L96 512h224v64H0v-63.999L160 352 0 192v-64h320v64H96l128 128h448l128-128H576v-64h320v64L736 352l160 160.001V576H576zM512 256H384v-192H256l192-192 192 192H512V256z" horiz-adv-x="896" />
<glyph glyph-name="unmute" unicode="&#xf0ba;" d="M128 448H0v-256h128l256-192h64V640h-64L128 448zM538.51 410.51c-12.496 12.497-32.758 12.497-45.255 0-12.496-12.496-12.496-32.758 0-45.255 24.994-24.993 24.994-65.516 0-90.51-12.496-12.496-12.496-32.758 0-45.255 12.497-12.496 32.759-12.496 45.255 0C588.497 279.47900000000004 588.497 360.523 538.51 410.51zM629.02 501.019c-12.495 12.497-32.758 12.497-45.255 0-12.495-12.496-12.495-32.758 0-45.255 74.981-74.98 74.981-196.548 0-271.528-12.495-12.497-12.495-32.76 0-45.256 12.497-12.496 32.76-12.496 45.255 0C728.994 238.95399999999995 728.994 401.045 629.02 501.019zM719.529 591.529c-12.497 12.497-32.76 12.497-45.255 0-12.496-12.496-12.496-32.758 0-45.255 124.968-124.968 124.968-327.58 0-452.548-12.496-12.497-12.496-32.759 0-45.255 12.495-12.497 32.758-12.497 45.255 0C869.49 198.433 869.49 441.568 719.529 591.529z" horiz-adv-x="896" />
<glyph glyph-name="versions" unicode="&#xf064;" d="M0 128h128v64H64V448h64v64H0V128zM384 640v-640h512V640H384zM768 128H512V512h256V128zM192 64h128v64h-64V512h64v64H192V64z" horiz-adv-x="896" />
<glyph glyph-name="x" unicode="&#xf081;" d="M640 512L512 640 320 448 128 640 0 512l192-192L0 128l128-128 192 192 192-192 128 128L448 320 640 512z" horiz-adv-x="640" />
<glyph glyph-name="zap" unicode="&#x26A1;" d="M640 384H384L576 832 0 256h256L64-192 640 384z" horiz-adv-x="640" />
</font>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 85 KiB

@ -0,0 +1,174 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
* Copyright 2005-2014 Klemen Stirn. All Rights Reserved.
* HESK is a registered trademark of Klemen Stirn.
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden. To remove HESK copyright notice you must purchase
* a license for this script. For more information on how to obtain
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
define('IN_SCRIPT',1);
define('HESK_PATH','./');
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
hesk_load_database_functions();
hesk_session_start();
// Knowledgebase attachments
if ( isset($_GET['kb_att']) )
{
// Attachment ID
$att_id = intval( hesk_GET('kb_att') ) or hesk_error($hesklang['id_not_valid']);
// Connect to database
hesk_dbConnect();
// Get attachment info
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_attachments` WHERE `att_id`='{$att_id}' LIMIT 1");
if (hesk_dbNumRows($res) != 1)
{
hesk_error($hesklang['id_not_valid'].' (att_id)');
}
$file = hesk_dbFetchAssoc($res);
// Is this person allowed access to this attachment?
$res = hesk_dbQuery("SELECT `t1`.`type` as `cat_type`, `t2`.`type` as `art_type`
FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t2`
JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` AS `t1`
ON `t2`.`catid` = `t1`.`id`
WHERE (`t2`.`attachments` LIKE '{$att_id}#%' OR `t2`.`attachments` LIKE '%,{$att_id}#%' )
LIMIT 1");
// If no attachment found, throw an error
if (hesk_dbNumRows($res) != 1)
{
hesk_error($hesklang['id_not_valid'].' (no_art)');
}
$row = hesk_dbFetchAssoc($res);
// Private or draft article or category?
if ($row['cat_type'] || $row['art_type'])
{
if ( empty($_SESSION['id']) )
{
// This is a staff-only attachment
hesk_error($hesklang['attpri']);
}
elseif ($row['art_type'] == 2)
{
// Need permission to manage KB to access draft attachments
require(HESK_PATH . 'inc/admin_functions.inc.php');
hesk_checkPermission('can_man_kb');
}
}
}
// Ticket attachments
else
{
// Attachmend ID and ticket tracking ID
$att_id = intval( hesk_GET('att_id', 0) ) or die($hesklang['id_not_valid']);
$type = '';
if (isset($_GET['track'])) {
$tic_id = hesk_cleanID() or die("$hesklang[int_error]: $hesklang[no_trackID]");
$type = 'ticket';
} elseif (isset($_GET['note'])) {
$tic_id = intval($_GET['note']) || die ("$hesklang[int_error]: $hesklang[no_noteID]");
$type = 'note';
}
// Connect to database
hesk_dbConnect();
// Get attachment info
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` WHERE `att_id`='{$att_id}' LIMIT 1");
if (hesk_dbNumRows($res) != 1)
{
hesk_error($hesklang['id_not_valid'].' (att_id)');
}
$file = hesk_dbFetchAssoc($res);
// Is ticket/note ID valid for this attachment?
if ($type == 'ticket' && $file['ticket_id'] != $tic_id)
{
hesk_error($hesklang['trackID_not_found']);
} elseif ($type == 'note' && $file['note_id'] != $tic_id)
{
hesk_error($hesklang['note_id_not_found']);
}
// Verify email address match if needed
if ( empty($_SESSION['id']) )
{
hesk_verifyEmailMatch($tic_id);
}
}
// Path of the file on the server
$realpath = $hesk_settings['attach_dir'] . '/' . $file['saved_name'];
// Perhaps the file has been deleted?
if ( ! file_exists($realpath))
{
hesk_error($hesklang['attdel']);
}
// Send the file as an attachment to prevent malicious code from executing
header("Pragma: "); # To fix a bug in IE when running https
header("Cache-Control: "); # To fix a bug in IE when running https
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Length: ' . $file['size']);
header('Content-Disposition: attachment; filename=' . $file['real_name']);
// For larger files use chunks, smaller ones can be read all at once
$chunksize = 1048576; // = 1024 * 1024 (1 Mb)
if ($file['size'] > $chunksize)
{
$handle = fopen($realpath, 'rb');
$buffer = '';
while ( ! feof($handle))
{
set_time_limit(300);
$buffer = fread($handle, $chunksize);
echo $buffer;
flush();
}
fclose($handle);
}
else
{
readfile($realpath);
}
exit();
?>

Binary file not shown.

Binary file not shown.

@ -0,0 +1,745 @@
body {
background-color: #f3fef4;
color: black;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
margin-right:0;
margin-left:0;
margin-top:0;
margin-bottom:0;
}
table.enclosing {
background-color:#FFFFFF;
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
width: 770px;
}
td {
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
text-align: right;
}
a img {
vertical-align: bottom;
border : none;
}
td.white {
background-color: #FFFFFF;
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
}
td.admin_white {
background-color: #FFFFFF;
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
border: #d1dceb 1px solid;
padding: 1px;
}
td.admin_gray {
background-color: #f5fffa;
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
border: #d1dceb 1px solid;
padding: 1px;
}
td.notes {
background-color: #fffbf2;
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
border: #ffe6b8 1px solid;
}
th.tDetailsHead {
background-color: #F7F7F7;
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
text-align: center;
}
td.tDetailsBody {
background-color: #FFFFFF;
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
border: #F7F7F7 1px solid;
text-align: center;
}
.small {
font-size: 11px;
}
.smaller {
font-size: 10px;
}
a {
color : Blue;
text-decoration : underline;
}
a:hover {
color : Red;
text-decoration : none;
}
table.white {
background-color: #ffffff ;
color : #23559C;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
border-collapse: collapse;
}
table.white th {
background-color: #ffffff;
color : #23559C;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
border: #b2babd 1px solid;
border-collapse: collapse;
background-image: url(img/tableheader.jpg);
background-repeat: no-repeat;
background-position: right top;
}
table.white th a {
color : #23559C;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
}
table.white td {
height: 25px;
padding-right: 5px;
}
.noborder {
border: none;
}
h3 {
color : #74804e;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
margin: 0px;
}
.important {
color: Red;
}
.medium {
color: #FF9900;
}
input {
font-size: 12px;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
color:#000000;
}
input.button {
font-size: 12px;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
color:#000000;
background-color:#FFFFFF;
}
select {
font-size: 12px;
height: 20px;
}
header a img {border: none; text-decoration: none !important;}
.open {color : #FF0000;}
.waitingreply {color : #FF9933;}
.replied {color : #0000FF;}
.resolved {color : #008000;}
.allbutresolved {color : #000000;}
.success {color : #008000;}
.error {color : #FF0000;}
.notice {color : #FF9900}
#ok {
border: 1px solid #679800;
}
#error {
border: 1px solid #ba3225;
}
.rate {
color: #666666;
text-align: left;
font-style: italic;
}
a.article {
color : Black;
text-decoration: none;
font-size: 11px;
}
a.article:hover {
color : Red;
text-decoration : none;
}
.article_list {
font-size: 11px;
}
fieldset {
margin-bottom: 6px;
border: 1px SOLID #267DDC;
padding: 4px;
background-color:white;
position:relative;
display:block;
padding: 0px 10px 10px 10px;
margin:20px 0px 20px 0px;
}
legend {
background-image: url(img/bluebtn.png);
background-repeat: no-repeat;
color: #172901;
border: 1px solid #267DDC;
height: 10px;
font-size: 10px;
font-weight:bold;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
background-position: right top;
display:block;
width: auto;
padding:4px 5px;
margin:0px 0px 10px 0px;
position:relative;
top: -12px;
width:130px;
}
/*newly introduced styles (version 2.0)*/
.header {
width: 100%;
background-color: #74a62b;
color : #ffffff;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
text-align: center;
background-image: url(img/header.png);
background-repeat: repeat-x;
height: 57px;
padding: 0px;
margin: 0px;
}
.header td {
text-align: center;
vertical-align: middle;
color:#FFFFFF;
}
.header a, .header a:link, .header a:active, .header a:visited {
color : #ffffff;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
text-align: center;
}
.header a:hover {}
.headersm {
width: 100%;
background-color: #669933;
color : #ffffff;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
text-align: right;
background-image: url(img/headerbgsm.jpg);
background-repeat: repeat-x;
height: 25px;
padding: 0px;
margin: 0px;
font-weight:bold;
padding-right: 20px;
}
hr {
border: none;
border-bottom: 1px dotted #adbac3;
width: 100%;
padding-top: 10px;
margin-bottom: 10px;
height: 1px;
}
.greenbutton {
background-image: url(img/greenbtn.jpg);
background-repeat: no-repeat;
text-align: center;
color: #FFFFFF;
border: 1px solid #527234;
font-size: 10px;
font-weight:bold;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
background-position: right top;
height: 19px;
padding-right: 6px;
padding-left: 6px;
margin-right: 2px;
margin-left: 2px
}
.greenbuttonover {
background-image: url(img/greenbtnover.gif);
background-repeat: no-repeat;
text-align: center;
color: #FFFFFF;
border: 1px solid #527234;
font-size: 10px;
font-weight:bold;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
background-position: right top;
height: 19px;
padding-right: 6px;
padding-left: 6px;
margin-right: 2px;
margin-left: 2px
}
.orangebutton {
background-image: url(img/orangebtn.jpg);
background-repeat: no-repeat;
text-align: center;
color: #660000;
border: 1px solid #bf6628;
height: 20px;
font-size: 10px;
font-weight:bold;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
background-position: right top;
padding-right: 6px;
padding-left: 6px;
margin-right: 2px;
margin-left: 2px;
text-decoration: none;
margin-top: 0px;
}
.orangebuttonover {
background-image: url(img/orangebtnover.gif);
background-repeat: no-repeat;
text-align: center;
color: #660000;
border: 1px solid #bf6628;
height: 20px;
font-size: 10px;
font-weight:bold;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
background-position: right top;
padding-right: 6px;
padding-left: 6px;
margin-right: 2px;
margin-left: 2px;
text-decoration: none;
margin-top: 0px;
}
.bluebutton {
background-image: url(img/bluebtn.png);
background-repeat: no-repeat;
text-align: center;
color: #660000;
border: 1px solid #5b79a3;
height: 20px;
font-size: 10px;
font-weight:bold;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
background-position: right top;
padding-right: 6px;
padding-left: 6px;
margin-right: 2px;
text-decoration: none;
margin-left: 2px;
padding-top: 2px;
}
/*styles for roundcorners tables*/
.roundcornersleft {
width: 7px;
background-image: url(img/roundcornerslm.jpg);
background-repeat: repeat-y;
background-position: right;
}
.roundcornersright {
width: 7px;
background-image: url(img/roundcornersrm.jpg);
background-repeat: repeat-y;
background-position: left;
}
.roundcornerstop {
height: 7px;
background-image: url(img/roundcornerst.jpg);
background-repeat: repeat-x;
background-position: top;
}
.roundcornersbottom {
height: 7px;
background-image: url(img/roundcornersb.jpg);
background-repeat: repeat-x;
background-position: bottom;
}
.ticketrow {
background-color: #f5fffa;
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
border: #748aaf 1px dotted;
padding: 6px;
}
.ticketalt {
background-color: #ffffff;
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
padding: 6px;
}
.tickettd {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
}
.subheaderrow {
background-color: #ffffff;
color : #23559C;
border: #23559C solid 1px;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
border-collapse: collapse;
background-image: url(img/tableheader.jpg);
background-repeat: no-repeat;
background-position: right top;
height: 25px;
padding-right: 20px;
padding-left: 20px;
padding-top: 5px;
}
.homepageh3, .section {
color: #74804e;
font-weight: bold;
}
/*newly introduced styles (version 2.2)*/
.large {
font-size:14px;
}
.largebold {
font-size:14px;
font-weight:bold;
}
.assignedyou {
color: red;
}
.assignedother {
color: green;
}
div.error {
border: 1px solid #cd0a0a;
background: #fef1ec;
color: #cd0a0a;
padding: 10px;
}
div.success {
border: 1px solid #18760f;
background: #e9ffdb;
color: #363636;
padding: 10px;
}
div.notice {
border: 1px solid #fcefa1;
background: #fbf9ee;
color: #363636;
padding: 10px;
vertical-align: middle;
}
.admin_green {
background-color: #e3ffd0;
font-weight: bold;
}
.admin_red {
background-color: #fef1ec;
font-weight: bold;
}
.borderBottom {
border-bottom: silver 1px dashed;
}
.borderTop {
border-top: silver 1px dashed;
}
.alignTop {
vertical-align: top;
}
.alignMiddle {
vertical-align: middle;
}
.alignBottom {
vertical-align: bottom;
}
hr.dashed {
border: none 0;
border-top: 1px dashed silver;
height: 1px;
}
/* newly introduced styles (version 2.3) */
h1 {
color : #74804e;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
margin: 0px;
}
.critical {
color: #9400d3;
font-weight: bold;
}
td.admin_critical {
background-color: #fff0ff;
color : #000000;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
border: 1px solid #ff66ff;
border-top: 2px dashed #ff66ff;
padding: 1px;
}
.isError {
color: black;
background-color: #fff9f7;
border: 1px solid red;
}
.isNotice {
color: black;
border: 1px solid orange;
background: #fbf9ee;
}
.optionWhiteON{
padding:2px;
border:1px dotted silver;
background-color: #b0e0e6;
}
.optionWhiteOFF {
padding:2px;
border:1px dotted silver;
background-color: white;
}
.optionBlueON {
padding:2px;
border:1px dotted gray;
background-color: #b0e0e6;
}
.optionBlueOFF {
padding:2px;
border:1px dotted gray;
background-color: #f5fffa;
}
.optionWhiteNbON{
border: none;
background-color: #b0e0e6;
vertical-align: text-bottom;
}
.optionWhiteNbOFF {
border: none;
background-color: white;
vertical-align: text-bottom;
}
.kbCatListON {
background-color: #fcefa1;
}
.kbCatListOFF {
background-color: white;
}
div.progress-container {
border: 1px solid #ccc;
width: 100px;
margin: 2px 0 2px 5px;
padding: 1px;
float: right;
background: white;
}
div.progress-container > div {
background-color: #ACE97C;
height: 12px
}
.black {color: black;}
.inprogress {color : #006400;}
.onhold {color : #000000;}
div.online {
border: 1px solid #e5e8ff;
background: #ffffff;
color: #000000;
padding: 0px;
vertical-align: middle;
}
span.online {
font-size: 10px;
white-space:nowrap;
}
/* newly introduced styles (version 2.4) */
.orangebuttonsec {
background-image: url(img/orangebtnsec.jpg);
background-repeat: no-repeat;
text-align: center;
color: #660000;
border: 1px solid #bf6628;
height: 20px;
font-size: 10px;
font-weight:normal;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
background-position: right top;
padding-right: 6px;
padding-left: 6px;
margin-right: 2px;
margin-left: 2px;
text-decoration: none;
margin-top: 0px;
}
.orangebuttonsecover {
background-image: url(img/orangebtnover.gif);
background-repeat: no-repeat;
text-align: center;
color: #660000;
border: 1px solid #bf6628;
height: 20px;
font-size: 10px;
font-weight:normal;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
background-position: right top;
padding-right: 6px;
padding-left: 6px;
margin-right: 2px;
margin-left: 2px;
text-decoration: none;
margin-top: 0px;
}
td.admin_yellow {
background-color: #ffffe0;
color : #4a5571;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
border: #d1dceb 1px solid;
padding: 1px;
}
/* New styles in HESK version 2.5 */
.kb_published {
color: #009900;
}
.kb_private {
color: #4a5571;
}
.kb_draft {
color: #cc9933;
}
.searchbutton {
cursor:pointer;
width:70px;
height:27px;
text-indent:-999px;
text-transform: capitalize;
color: transparent;
background: url(img/ico-search.png) no-repeat #4d90fe center;
border: 1px solid #3079ED;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
}
.searchbutton:hover {
background: url(img/ico-search.png) no-repeat center #357AE8;
border: 1px solid #2F5BB7;
}
.searchfield {
width:400px;
height:21px;
font-size:14px;
text-indent:2px;
vertical-align: bottom;
}
.sbsmall {
width:50px;
height:22px;
margin-top:2px;
}
.sfsmall {
width:200px;
height:16px;
font-size:12px;
margin-top:2px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

@ -0,0 +1,694 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.4 from 4th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
* Copyright 2005-2014 Klemen Stirn. All Rights Reserved.
* HESK is a registered trademark of Klemen Stirn.
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden. To remove HESK copyright notice you must purchase
* a license for this script. For more information on how to obtain
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
/*** FUNCTIONS ***/
function hesk_getHHMMSS($in)
{
$in = hesk_getTime($in);
return explode(':', $in);
} // END hesk_getHHMMSS();
function hesk_getTime($in)
{
$in = trim($in);
/* If everything is OK this simple check should return true */
if ( preg_match('/^([0-9]{2,3}):([0-5][0-9]):([0-5][0-9])$/', $in) )
{
return $in;
}
/* No joy, let's try to figure out the correct values to use... */
$h = 0;
$m = 0;
$s = 0;
/* How many parts do we have? */
$parts = substr_count($in, ':');
switch ($parts)
{
/* Only two parts, let's assume minutes and seconds */
case 1:
list($m, $s) = explode(':', $in);
break;
/* Three parts, so explode to hours, minutes and seconds */
case 2:
list($h, $m, $s) = explode(':', $in);
break;
/* Something other was entered, let's assume just minutes */
default:
$m = $in;
}
/* Make sure all inputs are integers */
$h = intval($h);
$m = intval($m);
$s = intval($s);
/* Convert seconds to minutes if 60 or more seconds */
if ($s > 59)
{
$m = floor($s / 60) + $m;
$s = intval($s % 60);
}
/* Convert minutes to hours if 60 or more minutes */
if ($m > 59)
{
$h = floor($m / 60) + $h;
$m = intval($m % 60);
}
/* MySQL accepts max time value of 838:59:59 */
if ($h > 838)
{
return '838:59:59';
}
/* That's it, let's send out formatted time string */
return str_pad($h, 2, "0", STR_PAD_LEFT) . ':' . str_pad($m, 2, "0", STR_PAD_LEFT) . ':' . str_pad($s, 2, "0", STR_PAD_LEFT);
} // END hesk_getTime();
function hesk_mergeTickets($merge_these, $merge_into)
{
global $hesk_settings, $hesklang, $hesk_db_link;
/* Target ticket must not be in the "merge these" list */
if ( in_array($merge_into, $merge_these) )
{
$merge_these = array_diff($merge_these, array( $merge_into ) );
}
/* At least 1 ticket needs to be merged with target ticket */
if ( count($merge_these) < 1 )
{
$_SESSION['error'] = $hesklang['merr1'];
return false;
}
/* Make sure target ticket exists */
$res = hesk_dbQuery("SELECT `id`,`trackid`,`category` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `id`='".intval($merge_into)."' LIMIT 1");
if (hesk_dbNumRows($res) != 1)
{
$_SESSION['error'] = $hesklang['merr2'];
return false;
}
$ticket = hesk_dbFetchAssoc($res);
/* Make sure user has access to ticket category */
if ( ! hesk_okCategory($ticket['category'], 0) )
{
$_SESSION['error'] = $hesklang['merr3'];
return false;
}
/* Set some variables for later */
$merge['attachments'] = '';
$merge['replies'] = array();
$merge['notes'] = array();
$sec_worked = 0;
$history = '';
$merged = '';
/* Get messages, replies, notes and attachments of tickets that will be merged */
foreach ($merge_these as $this_id)
{
/* Validate ID */
if ( is_array($this_id) )
{
continue;
}
$this_id = intval($this_id) or hesk_error($hesklang['id_not_valid']);
/* Get required ticket information */
$res = hesk_dbQuery("SELECT `id`,`trackid`,`category`,`name`,`message`,`dt`,`time_worked`,`attachments` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `id`='".intval($this_id)."' LIMIT 1");
if (hesk_dbNumRows($res) != 1)
{
continue;
}
$row = hesk_dbFetchAssoc($res);
/* Has this user access to the ticket category? */
if ( ! hesk_okCategory($row['category'], 0) )
{
continue;
}
/* Insert ticket message as a new reply to target ticket */
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` (`replyto`,`name`,`message`,`dt`,`attachments`) VALUES ('".intval($ticket['id'])."','".hesk_dbEscape($row['name'])."','".hesk_dbEscape($row['message'])."','".hesk_dbEscape($row['dt'])."','".hesk_dbEscape($row['attachments'])."')");
/* Update attachments */
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` SET `ticket_id`='".hesk_dbEscape($ticket['trackid'])."' WHERE `ticket_id`='".hesk_dbEscape($row['trackid'])."'");
/* Get old ticket replies and insert them as new replies */
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` WHERE `replyto`='".intval($row['id'])."'");
while ( $reply = hesk_dbFetchAssoc($res) )
{
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` (`replyto`,`name`,`message`,`dt`,`attachments`,`staffid`,`rating`,`read`) VALUES ('".intval($ticket['id'])."','".hesk_dbEscape($reply['name'])."','".hesk_dbEscape($reply['message'])."','".hesk_dbEscape($reply['dt'])."','".hesk_dbEscape($reply['attachments'])."','".intval($reply['staffid'])."','".intval($reply['rating'])."','".intval($reply['read'])."')");
}
/* Delete replies to the old ticket */
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` WHERE `replyto`='".intval($row['id'])."'");
/* Get old ticket notes and insert them as new notes */
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` WHERE `ticket`='".intval($row['id'])."'");
while ( $note = hesk_dbFetchAssoc($res) )
{
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` (`ticket`,`who`,`dt`,`message`) VALUES ('".intval($ticket['id'])."','".intval($note['who'])."','".hesk_dbEscape($note['dt'])."','".hesk_dbEscape($note['message'])."')");
}
/* Delete replies to the old ticket */
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` WHERE `ticket`='".intval($row['id'])."'");
/* Delete old ticket */
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `id`='".intval($row['id'])."'");
/* Log that ticket has been merged */
$history .= sprintf($hesklang['thist13'],hesk_date(),$row['trackid'],$_SESSION['name'].' ('.$_SESSION['user'].')');
/* Add old ticket ID to target ticket "merged" field */
$merged .= '#' . $row['trackid'];
/* Convert old ticket "time worked" to seconds and add to $sec_worked variable */
list ($hr, $min, $sec) = explode(':', $row['time_worked']);
$sec_worked += (((int)$hr) * 3600) + (((int)$min) * 60) + ((int)$sec);
}
/* Convert seconds to HHH:MM:SS */
$sec_worked = hesk_getTime('0:'.$sec_worked);
/* Update history (log) and merged IDs of target ticket */
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `time_worked`=ADDTIME(`time_worked`, '".hesk_dbEscape($sec_worked)."'), `merged`=CONCAT(`merged`,'".hesk_dbEscape($merged . '#')."'), `history`=CONCAT(`history`,'".hesk_dbEscape($history)."') WHERE `id`='".intval($merge_into)."' LIMIT 1");
return true;
} // END hesk_mergeTickets()
function hesk_updateStaffDefaults()
{
global $hesk_settings, $hesklang;
// Demo mode
if ( defined('HESK_DEMO') )
{
return true;
}
// Remove the part that forces saving as default - we don't need it every time
$default_list = str_replace('&def=1','',$_SERVER['QUERY_STRING']);
// Update database
$res = hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` SET `default_list`='".hesk_dbEscape($default_list)."' WHERE `id`='".intval($_SESSION['id'])."'");
// Update session values so the changes take effect immediately
$_SESSION['default_list'] = $default_list;
return true;
} // END hesk_updateStaffDefaults()
function hesk_makeJsString($in)
{
return addslashes(preg_replace("/\s+/",' ',$in));
} // END hesk_makeJsString()
function hesk_checkNewMail()
{
global $hesk_settings, $hesklang;
$res = hesk_dbQuery("SELECT COUNT(*) FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."mail` WHERE `to`='".intval($_SESSION['id'])."' AND `read`='0' AND `deletedby`!='".intval($_SESSION['id'])."' ");
$num = hesk_dbResult($res,0,0);
return $num;
} // END hesk_checkNewMail()
function hesk_dateToString($dt, $returnName=1, $returnTime=0, $returnMonth=0, $from_database=false)
{
global $hesk_settings, $hesklang;
$dt = strtotime($dt);
// Adjust MySQL time if different from PHP time
if ($from_database)
{
if ( ! defined('MYSQL_TIME_DIFF') )
{
define('MYSQL_TIME_DIFF', time()-hesk_dbTime() );
}
if (MYSQL_TIME_DIFF != 0)
{
$dt += MYSQL_TIME_DIFF;
}
// Add HESK set time difference
$dt += 3600*$hesk_settings['diff_hours'] + 60*$hesk_settings['diff_minutes'];
// Daylight saving?
if ($hesk_settings['daylight'] && date('I', $dt))
{
$dt += 3600;
}
}
list($y,$m,$n,$d,$G,$i,$s) = explode('-', date('Y-n-j-w-G-i-s', $dt) );
$m = $hesklang['m'.$m];
$d = $hesklang['d'.$d];
if ($returnName)
{
return "$d, $m $n, $y";
}
if ($returnTime)
{
return "$d, $m $n, $y $G:$i:$s";
}
if ($returnMonth)
{
return "$m $y";
}
return "$m $n, $y";
} // End hesk_dateToString()
function hesk_getCategoriesArray($kb = 0) {
global $hesk_settings, $hesklang, $hesk_db_link;
$categories = array();
if ($kb)
{
$result = hesk_dbQuery('SELECT `id`, `name` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'kb_categories` ORDER BY `cat_order` ASC');
}
else
{
$result = hesk_dbQuery('SELECT `id`, `name` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'categories` ORDER BY `cat_order` ASC');
}
while ($row=hesk_dbFetchAssoc($result))
{
$categories[$row['id']] = $row['name'];
}
return $categories;
} // END hesk_getCategoriesArray()
function hesk_getHTML($in)
{
global $hesk_settings, $hesklang;
$replace_from = array("\t","<?","?>","$","<%","%>");
$replace_to = array("","&lt;?","?&gt;","\$","&lt;%","%&gt;");
$in = trim($in);
$in = str_replace($replace_from,$replace_to,$in);
$in = preg_replace('/\<script(.*)\>(.*)\<\/script\>/Uis',"<script$1></script>",$in);
$in = preg_replace('/\<\!\-\-(.*)\-\-\>/Uis',"<!-- comments have been removed -->",$in);
if (HESK_SLASH === true)
{
$in = addslashes($in);
}
$in = str_replace('\"','"',$in);
return $in;
} // END hesk_getHTML()
function hesk_autoLogin($noredirect=0)
{
global $hesk_settings, $hesklang, $hesk_db_link;
if (!$hesk_settings['autologin'])
{
return false;
}
$user = hesk_htmlspecialchars( hesk_COOKIE('hesk_username') );
$hash = hesk_htmlspecialchars( hesk_COOKIE('hesk_p') );
define('HESK_USER', $user);
if (empty($user) || empty($hash))
{
return false;
}
/* Login cookies exist, now lets limit brute force attempts */
hesk_limitBfAttempts();
/* Check username */
$result = hesk_dbQuery('SELECT * FROM `'.$hesk_settings['db_pfix']."users` WHERE `user` = '".hesk_dbEscape($user)."' LIMIT 1");
if (hesk_dbNumRows($result) != 1)
{
setcookie('hesk_username', '');
setcookie('hesk_p', '');
header('Location: index.php?a=login&notice=1');
exit();
}
$res=hesk_dbFetchAssoc($result);
foreach ($res as $k=>$v)
{
$_SESSION[$k]=$v;
}
/* Check password */
if ($hash != hesk_Pass2Hash($_SESSION['pass'] . strtolower($user) . $_SESSION['pass']) )
{
setcookie('hesk_username', '');
setcookie('hesk_p', '');
header('Location: index.php?a=login&notice=1');
exit();
}
/* Check if default password */
if ($_SESSION['pass'] == '499d74967b28a841c98bb4baaabaad699ff3c079')
{
hesk_process_messages($hesklang['chdp'],'NOREDIRECT','NOTICE');
}
unset($_SESSION['pass']);
/* Login successful, clean brute force attempts */
hesk_cleanBfAttempts();
/* Regenerate session ID (security) */
hesk_session_regenerate_id();
/* Get allowed categories */
if (empty($_SESSION['isadmin']))
{
$_SESSION['categories']=explode(',',$_SESSION['categories']);
}
/* Renew cookies */
setcookie('hesk_username', "$user", strtotime('+1 year'));
setcookie('hesk_p', "$hash", strtotime('+1 year'));
/* Close any old tickets here so Cron jobs aren't necessary */
if ($hesk_settings['autoclose'])
{
$dt = date('Y-m-d H:i:s',time() - $hesk_settings['autoclose']*86400);
$waitingForCustomerRS = hesk_dbQuery("SELECT `ID` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `IsDefaultStaffReplyStatus` = 1");
$waitingForCustomerStatus = hesk_dbFetchAssoc($waitingForCustomerRS);
$result = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `status` = ".$waitingForCustomerStatus['ID']." AND `lastchange` <= '".hesk_dbEscape($dt)."' ");
if (hesk_dbNumRows($result) > 0)
{
require(HESK_PATH . 'inc/email_functions.inc.php');
global $ticket;
while ($ticket = hesk_dbFetchAssoc($result)) {
hesk_notifyCustomer('ticket_closed');
}
$revision = sprintf($hesklang['thist3'],hesk_date(),$hesklang['auto']);
$closedStatusRS = hesk_dbQuery("SELECT `ID` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `IsStaffClosedOption` = 1");
$closedStatus = hesk_dbFetchAssoc($closedStatusRS);
$sql = "UPDATE `".$hesk_settings['db_pfix']."tickets` SET `status`=".$closedStatus['ID'].", `history`=CONCAT(`history`,'".hesk_dbEscape($revision)."') WHERE `status` = ".$waitingForCustomerStatus['ID']." AND `lastchange` <= '".hesk_dbEscape($dt)."' ";
hesk_dbQuery($sql);
}
}
/* If session expired while a HESK page is open just continue using it, don't redirect */
if ($noredirect)
{
return true;
}
/* Redirect to the destination page */
if ( hesk_isREQUEST('goto') && $url=hesk_REQUEST('goto') )
{
$url = str_replace('&amp;','&',$url);
header('Location: '.$url);
}
else
{
header('Location: admin_main.php');
}
exit();
} // END hesk_autoLogin()
function hesk_isLoggedIn()
{
global $hesk_settings;
$referer = hesk_input($_SERVER['REQUEST_URI']);
$referer = str_replace('&amp;','&',$referer);
if (empty($_SESSION['id']))
{
if ($hesk_settings['autologin'] && hesk_autoLogin(1) )
{
// Users online
if ($hesk_settings['online'])
{
require(HESK_PATH . 'inc/users_online.inc.php');
hesk_initOnline($_SESSION['id']);
}
return true;
}
// Some pages cannot be redirected to
$modify_redirect = array(
'admin_reply_ticket.php' => 'admin_main.php',
'admin_settings_save.php' => 'admin_settings.php',
'delete_tickets.php' => 'admin_main.php',
'move_category.php' => 'admin_main.php',
'priority.php' => 'admin_main.php',
);
foreach ($modify_redirect as $from => $to)
{
if ( strpos($referer,$from) !== false )
{
$referer = $to;
}
}
$url = 'index.php?a=login&notice=1&goto='.urlencode($referer);
header('Location: '.$url);
exit();
}
else
{
hesk_session_regenerate_id();
// Need to update permissions?
if ( empty($_SESSION['isadmin']) )
{
$res = hesk_dbQuery("SELECT `isadmin`, `categories`, `heskprivileges` FROM `".$hesk_settings['db_pfix']."users` WHERE `id` = '".intval($_SESSION['id'])."' LIMIT 1");
if (hesk_dbNumRows($res) == 1)
{
$me = hesk_dbFetchAssoc($res);
foreach ($me as $k => $v)
{
$_SESSION[$k]=$v;
}
// Get allowed categories
if (empty($_SESSION['isadmin']) )
{
$_SESSION['categories']=explode(',',$_SESSION['categories']);
}
}
else
{
hesk_session_stop();
$url = 'index.php?a=login&notice=1&goto='.urlencode($referer);
header('Location: '.$url);
exit();
}
}
// Users online
if ($hesk_settings['online'])
{
require(HESK_PATH . 'inc/users_online.inc.php');
hesk_initOnline($_SESSION['id']);
}
return true;
}
} // END hesk_isLoggedIn()
function hesk_Pass2Hash($plaintext) {
$majorsalt = '';
$len = strlen($plaintext);
for ($i=0;$i<$len;$i++)
{
$majorsalt .= sha1(substr($plaintext,$i,1));
}
$corehash = sha1($majorsalt);
return $corehash;
} // END hesk_Pass2Hash()
function hesk_formatDate($dt)
{
$dt=hesk_date($dt);
$dt=str_replace(' ','<br />',$dt);
return $dt;
} // End hesk_formatDate()
function hesk_jsString($str)
{
$str = str_replace( array('\'','<br />') , array('\\\'','') ,$str);
$from = array("/\r\n|\n|\r/", '/\<a href="mailto\:([^"]*)"\>([^\<]*)\<\/a\>/i', '/\<a href="([^"]*)" target="_blank"\>([^\<]*)\<\/a\>/i');
$to = array("\\r\\n' + \r\n'", "$1", "$1");
return preg_replace($from,$to,$str);
} // END hesk_jsString()
function hesk_myCategories($what='category')
{
if ( ! empty($_SESSION['isadmin']) )
{
return '1';
}
else
{
return " `".hesk_dbEscape($what)."` IN ('" . implode("','", array_map('intval', $_SESSION['categories']) ) . "')";
}
} // END hesk_myCategories()
function hesk_okCategory($cat,$error=1,$user_isadmin=false,$user_cat=false)
{
global $hesklang;
/* Checking for current user or someone else? */
if ($user_isadmin === false)
{
$user_isadmin = $_SESSION['isadmin'];
}
if ($user_cat === false)
{
$user_cat = $_SESSION['categories'];
}
/* Is admin? */
if ($user_isadmin)
{
return true;
}
/* Staff with access? */
elseif (in_array($cat,$user_cat))
{
return true;
}
/* No access */
else
{
if ($error)
{
hesk_error($hesklang['not_authorized_tickets']);
}
else
{
return false;
}
}
} // END hesk_okCategory()
function hesk_checkPermission($feature,$showerror=1) {
global $hesklang;
/* Check if this is for managing settings */
if ($feature == 'can_manage_settings')
{
if ($_SESSION['can_manage_settings']) {
return true;
} else {
if ($showerror) {
hesk_error($hesklang['no_permission'].'<p>&nbsp;</p><p align="center"><a href="index.php">'.$hesklang['click_login'].'</a>');
} else {
return false;
}
}
}
/* Admins have full access to all features, besides possibly settings */
if ($_SESSION['isadmin'])
{
return true;
}
/* Check other staff for permissions */
if (strpos($_SESSION['heskprivileges'], $feature) === false)
{
if ($showerror)
{
hesk_error($hesklang['no_permission'].'<p>&nbsp;</p><p align="center"><a href="index.php">'.$hesklang['click_login'].'</a>');
}
else
{
return false;
}
}
else
{
return true;
}
} // END hesk_checkPermission()

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -936,7 +936,7 @@ function hesk_getLanguagesAsFormIfNecessary()
?>
<script language="javascript" type="text/javascript">
document.write('<?php echo str_replace(array('"','<','=','>'),array('\42','\74','\75','\76'),$str . '</form>'); ?>');
document.write('<?php echo str_replace(array('"','<','=','>',"'"),array('\42','\74','\75','\76','\47'),$str . '</form>'); ?>');
</script>
<noscript>
<?php
@ -1072,11 +1072,15 @@ function hesk_returnLanguage()
{
global $hesk_settings, $hesklang;
require(HESK_PATH . 'language/' . $hesk_settings['languages'][$hesk_settings['language']]['folder'] . '/text.php');
$customLanguagePath = HESK_PATH . 'language/' . $hesk_settings['languages'][$hesk_settings['language']]['folder'] . '/custom-text.php';
if (file_exists($customLanguagePath)) {
include($customLanguagePath);
}
return true;
} // END hesk_returnLanguage()
function hesk_date($dt='')
function hesk_date($dt='', $from_database=false)
{
global $hesk_settings;
@ -1089,14 +1093,32 @@ function hesk_date($dt='')
$dt = strtotime($dt);
}
// Adjust MySQL time if different from PHP time
if ($from_database)
{
if ( ! defined('MYSQL_TIME_DIFF') )
{
define('MYSQL_TIME_DIFF', time()-hesk_dbTime() );
}
if (MYSQL_TIME_DIFF != 0)
{
$dt += MYSQL_TIME_DIFF;
}
}
// Add HESK set time difference
$dt += 3600*$hesk_settings['diff_hours'] + 60*$hesk_settings['diff_minutes'];
// Daylight savings?
if ($hesk_settings['daylight'] && date('I', $dt))
{
$dt += 3600;
}
// Return formatted date
return date($hesk_settings['timeformat'], $dt);
} // End hesk_date()
@ -1288,7 +1310,7 @@ function make_clickable_callback($type, $whitespace, $url, $relative_url, $class
$text = htmlspecialchars($text);
$append = htmlspecialchars($append);
$html = "$whitespace<a href=\"$url\"$class>$text</a>$append";
$html = "$whitespace<a href=\"$url\" target=\"blank\" $class>$text</a>$append";
return $html;
} // END make_clickable_callback()

@ -0,0 +1,642 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
* Copyright 2005-2014 Klemen Stirn. All Rights Reserved.
* HESK is a registered trademark of Klemen Stirn.
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden. To remove HESK copyright notice you must purchase
* a license for this script. For more information on how to obtain
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
/* Get includes for SMTP */
if ($hesk_settings['smtp'])
{
require(HESK_PATH . 'inc/mail/smtp.php');
if (strlen($hesk_settings['smtp_user']) || strlen($hesk_settings['smtp_password']))
{
require_once(HESK_PATH . 'inc/mail/sasl/sasl.php');
}
}
function hesk_notifyCustomerForVerifyEmail($email_template = 'verify_email', $activationKey)
{
global $hesk_settings, $ticket;
if (defined('HESK_DEMO'))
{
return true;
}
// Format email subject and message
$subject = hesk_getEmailSubject($email_template, $ticket);
$message = hesk_getEmailMessage($email_template, $ticket);
$activationUrl = $hesk_settings['hesk_url'] . '/verifyemail.php?key=%%ACTIVATIONKEY%%';
$message = str_replace('%%VERIFYURL%%', $activationUrl, $message);
$message = str_replace('%%ACTIVATIONKEY%%', $activationKey, $message);
hesk_mail($ticket['email'], $subject, $message);
}
function hesk_notifyCustomer($email_template = 'new_ticket')
{
global $hesk_settings, $hesklang, $ticket;
// Demo mode
if ( defined('HESK_DEMO') )
{
return true;
}
// Format email subject and message
$subject = hesk_getEmailSubject($email_template,$ticket);
$message = hesk_getEmailMessage($email_template,$ticket);
// Send e-mail
hesk_mail($ticket['email'], $subject, $message);
return true;
} // END hesk_notifyCustomer()
function hesk_notifyAssignedStaff($autoassign_owner, $email_template, $type = 'notify_assigned')
{
global $hesk_settings, $hesklang, $ticket;
// Demo mode
if ( defined('HESK_DEMO') )
{
return true;
}
$ticket['owner'] = intval($ticket['owner']);
/* Need to lookup owner info from the database? */
if ($autoassign_owner === false)
{
$res = hesk_dbQuery("SELECT `name`, `email`,`language`,`notify_assigned`,`notify_reply_my` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `id`='" . $ticket['owner'] . "' LIMIT 1");
$autoassign_owner = hesk_dbFetchAssoc($res);
$hesk_settings['user_data'][$ticket['owner']] = $autoassign_owner;
/* If owner selected not to be notified or invalid stop here */
if ( empty($autoassign_owner[$type]) )
{
return false;
}
}
/* Set new language if required */
hesk_setLanguage($autoassign_owner['language']);
/* Format email subject and message for staff */
$subject = hesk_getEmailSubject($email_template,$ticket);
$message = hesk_getEmailMessage($email_template,$ticket,1);
/* Send email to staff */
hesk_mail($autoassign_owner['email'], $subject, $message);
/* Reset language to original one */
hesk_resetLanguage();
return true;
} // END hesk_notifyAssignedStaff()
function hesk_notifyStaff($email_template,$sql_where,$is_ticket=1)
{
global $hesk_settings, $hesklang, $ticket;
// Demo mode
if ( defined('HESK_DEMO') )
{
return true;
}
$admins = array();
$res = hesk_dbQuery("SELECT `email`,`language`,`isadmin`,`categories` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE $sql_where ORDER BY `language`");
while ($myuser = hesk_dbFetchAssoc($res))
{
/* Is this an administrator? */
if ($myuser['isadmin'])
{
$admins[] = array('email' => $myuser['email'], 'language' => $myuser['language']);
continue;
}
/* Not admin, is he/she allowed this category? */
$myuser['categories']=explode(',',$myuser['categories']);
if (in_array($ticket['category'],$myuser['categories']))
{
$admins[] = array('email' => $myuser['email'], 'language' => $myuser['language']);
continue;
}
}
if (count($admins) > 0)
{
/* Make sure each user gets email in his/her preferred language */
$current_language = 'NONE';
$recipients = array();
/* Loop through staff */
foreach ($admins as $admin)
{
/* If admin language is NULL force default HESK language */
if ( ! $admin['language'] || ! isset($hesk_settings['languages'][$admin['language']]) )
{
$admin['language'] = HESK_DEFAULT_LANGUAGE;
}
/* Generate message or add email to the list of recepients */
if ($admin['language'] == $current_language)
{
/* We already have the message, just add email to the recipients list */
$recipients[] = $admin['email'];
}
else
{
/* Send email messages in previous languages (if required) */
if ($current_language != 'NONE')
{
/* Send e-mail to staff */
hesk_mail(implode(',',$recipients), $subject, $message );
/* Reset list of email addresses */
$recipients = array();
}
/* Set new language */
hesk_setLanguage($admin['language']);
/* Format staff email subject and message for this language */
$subject = hesk_getEmailSubject($email_template,$ticket);
$message = hesk_getEmailMessage($email_template,$ticket,$is_ticket);
/* Add email to the recipients list */
$recipients[] = $admin['email'];
/* Remember the last processed language */
$current_language = $admin['language'];
}
}
/* Send email messages to the remaining staff */
hesk_mail(implode(',',$recipients), $subject, $message );
/* Reset language to original one */
hesk_resetLanguage();
}
return true;
} // END hesk_notifyStaff()
function hesk_validEmails()
{
global $hesklang;
return array(
/*** Emails sent to CLIENT ***/
// --> Send reminder about existing tickets
'forgot_ticket_id' => $hesklang['forgot_ticket_id'],
// --> Staff replied to a ticket
'new_reply_by_staff' => $hesklang['new_reply_by_staff'],
// --> New ticket submitted
'new_ticket' => $hesklang['ticket_received'],
// --> Ticket closed
'ticket_closed' => $hesklang['ticket_closed'],
// --> Verify email
'verify_email' => $hesklang['verify_email'],
/*** Emails sent to STAFF ***/
// --> Ticket moved to a new category
'category_moved' => $hesklang['category_moved'],
// --> Client replied to a ticket
'new_reply_by_customer' => $hesklang['new_reply_by_customer'],
// --> New ticket submitted
'new_ticket_staff' => $hesklang['new_ticket_staff'],
// --> New ticket assigned to staff
'ticket_assigned_to_you'=> $hesklang['ticket_assigned_to_you'],
// --> New private message
'new_pm' => $hesklang['new_pm'],
// --> New note by someone to a ticket assigned to you
'new_note' => $hesklang['new_note'],
// --> Assigned ticket reopened
'ticket_reopen_assigned' => $hesklang['ticket_reopen_assigned'],
);
} // END hesk_validEmails()
function hesk_mail($to,$subject,$message)
{
global $hesk_settings, $hesklang;
// Demo mode
if ( defined('HESK_DEMO') )
{
return true;
}
// Encode subject to UTF-8
$subject = "=?UTF-8?B?" . base64_encode( hesk_html_entity_decode($subject) ) . "?=";
// Setup "name <email>" for headers
if ($hesk_settings['noreply_name'])
{
$hesk_settings['from_header'] = "=?UTF-8?B?" . base64_encode( hesk_html_entity_decode($hesk_settings['noreply_name']) ) . "?= <" . $hesk_settings['noreply_mail'] . ">";
}
else
{
$hesk_settings['from_header'] = $hesk_settings['noreply_mail'];
}
// Uncomment for debugging
# echo "<p>TO: $to<br >SUBJECT: $subject<br >MSG: $message</p>";
# return true;
// Use PHP's mail function
if ( ! $hesk_settings['smtp'])
{
// Set additional headers
$headers = "From: $hesk_settings[from_header]\n";
$headers.= "Reply-To: $hesk_settings[from_header]\n";
$headers.= "Return-Path: $hesk_settings[webmaster_mail]\n";
$headers.= "Date: " . date(DATE_RFC2822) . "\n";
$headers.= "Content-Type: text/plain; charset=" . $hesklang['ENCODING'];
// Send using PHP mail() function
ob_start();
mail($to,$subject,$message,$headers);
$tmp = trim(ob_get_contents());
ob_end_clean();
return (strlen($tmp)) ? $tmp : true;
}
// Use a SMTP server directly instead
$smtp = new smtp_class;
$smtp->host_name = $hesk_settings['smtp_host_name'];
$smtp->host_port = $hesk_settings['smtp_host_port'];
$smtp->timeout = $hesk_settings['smtp_timeout'];
$smtp->ssl = $hesk_settings['smtp_ssl'];
$smtp->start_tls = $hesk_settings['smtp_tls'];
$smtp->user = $hesk_settings['smtp_user'];
$smtp->password = hesk_htmlspecialchars_decode($hesk_settings['smtp_password']);
$smtp->debug = 1;
// Start output buffering so that any errors don't break headers
ob_start();
// Send the e-mail using SMTP
$to_arr = explode(',',$to);
if ( ! $smtp->SendMessage($hesk_settings['noreply_mail'], $to_arr, array(
"From: $hesk_settings[from_header]",
"To: $to",
"Reply-To: $hesk_settings[from_header]",
"Return-Path: $hesk_settings[webmaster_mail]",
"Subject: " . $subject,
"Date: " . date(DATE_RFC2822),
"Content-Type: text/plain; charset=" . $hesklang['ENCODING']
), $message))
{
// Suppress errors unless we are in debug mode
if ($hesk_settings['debug_mode'])
{
$error = $hesklang['cnsm'] . ' ' . $to . '<br /><br />' .
$hesklang['error'] . ': ' . htmlspecialchars($smtp->error). '<br /><br />' .
'<textarea name="smtp_log" rows="10" cols="60">' . ob_get_contents() . '</textarea>';
ob_end_clean();
hesk_error($error);
}
else
{
$_SESSION['HESK_2ND_NOTICE'] = true;
$_SESSION['HESK_2ND_MESSAGE'] = $hesklang['esf'] . ' ' . $hesklang['contact_webmsater'] . ' <a href="mailto:' . $hesk_settings['webmaster_mail'] . '">' . $hesk_settings['webmaster_mail'] . '</a>';
}
}
ob_end_clean();
return true;
} // END hesk_mail()
function hesk_getEmailSubject($eml_file, $ticket='', $is_ticket=1, $strip=0)
{
global $hesk_settings, $hesklang;
// Demo mode
if ( defined('HESK_DEMO') )
{
return '';
}
/* Get list of valid emails */
$valid_emails = hesk_validEmails();
/* Verify this is a valid email include */
if ( ! isset($valid_emails[$eml_file]))
{
hesk_error($hesklang['inve']);
}
else
{
$msg = $valid_emails[$eml_file];
}
/* If not a ticket-related email return subject as is */
if ( ! $ticket )
{
return $msg;
}
/* Strip slashes from the subject only if it's a new ticket */
if ($strip)
{
$ticket['subject'] = stripslashes($ticket['subject']);
}
/* Not a ticket, but has some info in the $ticket array */
if ( ! $is_ticket)
{
return str_replace('%%SUBJECT%%', $ticket['subject'], $msg);
}
/* Set category title */
$ticket['category'] = hesk_msgToPlain(hesk_getCategoryName($ticket['category']), 1);
/* Get priority */
switch ($ticket['priority'])
{
case 0:
$ticket['priority'] = $hesklang['critical'];
break;
case 1:
$ticket['priority'] = $hesklang['high'];
break;
case 2:
$ticket['priority'] = $hesklang['medium'];
break;
default:
$ticket['priority'] = $hesklang['low'];
}
/* Set status */
switch ($ticket['status'])
{
case 1:
$ticket['status'] = $hesklang['wait_reply'];
break;
case 2:
$ticket['status'] = $hesklang['replied'];
break;
case 3:
$ticket['status'] = $hesklang['closed'];
break;
case 4:
$ticket['status'] = $hesklang['in_progress'];
break;
case 5:
$ticket['status'] = $hesklang['on_hold'];
break;
default:
$ticket['status'] = $hesklang['open'];
}
/* Replace all special tags */
$msg = str_replace('%%SUBJECT%%', $ticket['subject'], $msg);
$msg = str_replace('%%TRACK_ID%%', $ticket['trackid'], $msg);
$msg = str_replace('%%CATEGORY%%', $ticket['category'], $msg);
$msg = str_replace('%%PRIORITY%%', $ticket['priority'], $msg);
$msg = str_replace('%%STATUS%%', $ticket['status'], $msg);
return $msg;
} // hesk_getEmailSubject()
function hesk_getEmailMessage($eml_file, $ticket, $is_admin=0, $is_ticket=1, $just_message=0)
{
global $hesk_settings, $hesklang;
// Demo mode
if ( defined('HESK_DEMO') )
{
return '';
}
/* Get list of valid emails */
$valid_emails = hesk_validEmails();
/* Verify this is a valid email include */
if ( ! isset($valid_emails[$eml_file]))
{
hesk_error($hesklang['inve']);
}
/* Get email template */
$eml_file = 'language/' . $hesk_settings['languages'][$hesk_settings['language']]['folder'] . '/emails/' . $eml_file . '.txt';
if (file_exists(HESK_PATH . $eml_file))
{
$msg = file_get_contents(HESK_PATH . $eml_file);
}
else
{
hesk_error($hesklang['emfm'].': '.$eml_file);
}
/* Return just the message without any processing? */
if ($just_message)
{
return $msg;
}
// Convert any entities in site title to plain text
$hesk_settings['site_title'] = hesk_msgToPlain($hesk_settings['site_title'], 1);
/* If it's not a ticket-related mail (like "a new PM") just process quickly */
if ( ! $is_ticket)
{
$trackingURL = $hesk_settings['hesk_url'] . '/' . $hesk_settings['admin_dir'] . '/mail.php?a=read&id=' . intval($ticket['id']);
$msg = str_replace('%%NAME%%', $ticket['name'] ,$msg);
$msg = str_replace('%%SUBJECT%%', $ticket['subject'] ,$msg);
$msg = str_replace('%%TRACK_URL%%', $trackingURL ,$msg);
$msg = str_replace('%%SITE_TITLE%%',$hesk_settings['site_title'] ,$msg);
$msg = str_replace('%%SITE_URL%%', $hesk_settings['site_url'] ,$msg);
if ( isset($ticket['message']) )
{
return str_replace('%%MESSAGE%%', $ticket['message'], $msg);
}
else
{
return $msg;
}
}
// Is email required to view ticket (for customers only)?
$hesk_settings['e_param'] = $hesk_settings['email_view_ticket'] ? '&e=' . rawurlencode($ticket['email']) : '';
/* Generate the ticket URLs */
$trackingURL = $hesk_settings['hesk_url'];
$trackingURL.= $is_admin ? '/' . $hesk_settings['admin_dir'] . '/admin_ticket.php' : '/ticket.php';
$trackingURL.= '?track='.$ticket['trackid'].($is_admin ? '' : $hesk_settings['e_param']).'&Refresh='.rand(10000,99999);
/* Set category title */
$ticket['category'] = hesk_msgToPlain(hesk_getCategoryName($ticket['category']), 1);
/* Set priority title */
switch ($ticket['priority'])
{
case 0:
$ticket['priority'] = $hesklang['critical'];
break;
case 1:
$ticket['priority'] = $hesklang['high'];
break;
case 2:
$ticket['priority'] = $hesklang['medium'];
break;
default:
$ticket['priority'] = $hesklang['low'];
}
/* Get owner name */
$ticket['owner'] = hesk_msgToPlain( hesk_getOwnerName($ticket['owner']), 1);
/* Set status */
switch ($ticket['status'])
{
case 1:
$ticket['status'] = $hesklang['wait_reply'];
break;
case 2:
$ticket['status'] = $hesklang['replied'];
break;
case 3:
$ticket['status'] = $hesklang['closed'];
break;
case 4:
$ticket['status'] = $hesklang['in_progress'];
break;
case 5:
$ticket['status'] = $hesklang['on_hold'];
break;
default:
$ticket['status'] = $hesklang['open'];
}
/* Replace all special tags */
$msg = str_replace('%%NAME%%', $ticket['name'] ,$msg);
$msg = str_replace('%%SUBJECT%%', $ticket['subject'] ,$msg);
$msg = str_replace('%%TRACK_ID%%', $ticket['trackid'] ,$msg);
$msg = str_replace('%%TRACK_URL%%', $trackingURL ,$msg);
$msg = str_replace('%%SITE_TITLE%%',$hesk_settings['site_title'],$msg);
$msg = str_replace('%%SITE_URL%%', $hesk_settings['site_url'] ,$msg);
$msg = str_replace('%%CATEGORY%%', $ticket['category'] ,$msg);
$msg = str_replace('%%PRIORITY%%', $ticket['priority'] ,$msg);
$msg = str_replace('%%OWNER%%', $ticket['owner'] ,$msg);
$msg = str_replace('%%STATUS%%', $ticket['status'] ,$msg);
$msg = str_replace('%%EMAIL%%', $ticket['email'] ,$msg);
$msg = str_replace('%%CREATED%%', $ticket['dt'] ,$msg);
$msg = str_replace('%%UPDATED%%', $ticket['lastchange'] ,$msg);
/* All custom fields */
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'])
{
if ($v['type'] == 'checkbox')
{
$ticket[$k] = str_replace("<br />","\n",$ticket[$k]);
}
$msg = str_replace('%%'.strtoupper($k).'%%',stripslashes($ticket[$k]),$msg);
}
else
{
$msg = str_replace('%%'.strtoupper($k).'%%','',$msg);
}
}
// Is message tag in email template?
if (strpos($msg, '%%MESSAGE%%') !== false)
{
// Replace message
$msg = str_replace('%%MESSAGE%%',$ticket['message'],$msg);
// Add direct links to any attachments at the bottom of the email message
if ($hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']) )
{
$msg .= "\n\n\n" . $hesklang['fatt'];
$att = explode(',', substr($ticket['attachments'], 0, -1));
foreach ($att as $myatt)
{
list($att_id, $att_name) = explode('#', $myatt);
$msg .= "\n\n" . $att_name . "\n" . $hesk_settings['hesk_url'] . '/download_attachment.php?att_id='.$att_id.'&track='.$ticket['trackid'].$hesk_settings['e_param'];
}
}
// For customer notifications: if we allow email piping/pop 3 fetching and
// stripping quoted replies add an "reply above this line" tag
if ( ! $is_admin && ($hesk_settings['email_piping'] || $hesk_settings['pop3']) && $hesk_settings['strip_quoted'])
{
$msg = $hesklang['EMAIL_HR'] . "\n\n" . $msg;
}
}
return $msg;
} // END hesk_getEmailMessage

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -34,6 +34,11 @@
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
require(HESK_PATH . 'modsForHesk_settings.inc.php');
// Check to see if we're in maintenance mode before sending anything to the DOM
if ($modsForHesk_settings['maintenance_mode'] && !defined('ON_MAINTENANCE_PAGE') && !defined('ON_LOGIN_PAGE')) {
header('Location: '.HESK_PATH.'maintenance.php');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@ -41,16 +46,30 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
<title><?php echo (isset($hesk_settings['tmp_title']) ? $hesk_settings['tmp_title'] : $hesk_settings['hesk_title']); ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=<?php echo $hesklang['ENCODING']; ?>" />
<meta name="viewport" content="width=device-width, user-scalable=no">
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>hesk_style_v25RTL.css" type="text/css" rel="stylesheet" />
<?php } else { ?>
<link href="<?php echo HESK_PATH; ?>hesk_style_v25.css" type="text/css" rel="stylesheet" />
<?php } ?>
<link href="<?php echo HESK_PATH; ?>css/datepicker.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyle.php" type="text/css" rel="stylesheet" />
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>css/bootstrap-rtl.min.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyleRTL.php" type="text/css" rel="stylesheet" />
<?php } else { ?>
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyle.php" type="text/css" rel="stylesheet" />
<?php } ?>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="<?php echo HESK_PATH; ?>css/octicons.css" type="text/css">
<script src="<?php echo HESK_PATH; ?>js/jquery-1.10.2.min.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>hesk_javascript_v25.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap.min.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/modsForHesk-javascript.js"></script>
<script language="JavaScript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap-datepicker.js"></script>
<?php
/* Prepare Javascript that browser should load on page load */
$onload = "javascript:var i=new Image();i.src='" . HESK_PATH . "img/orangebtnover.gif';var i2=new Image();i2.src='" . HESK_PATH . "img/greenbtnover.gif';";
@ -119,6 +138,10 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
<?php
include(HESK_PATH . 'header.txt');
$iconDisplay = 'style="display: none"';
if ($modsForHesk_settings['show_icons']) {
$iconDisplay = '';
}
?>
<div class="enclosing">
@ -134,19 +157,25 @@ include(HESK_PATH . 'header.txt');
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="<?php echo HESK_PATH; ?>">Home</a></li>
<li><a href="<?php echo HESK_PATH; ?>"><i class="fa fa-home" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['main_page']; ?></a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $hesklang['ticket'] ?><b class="caret"></b></a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ticket" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['ticket'] ?><b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="<?php echo HESK_PATH; ?>index.php?a=add"><?php echo $hesklang['sub_ticket'] ?></a></li>
<li><a href="<?php echo HESK_PATH; ?>ticket.php"><?php echo $hesklang['view_ticket_nav'] ?></a></li>
<li><a href="<?php echo HESK_PATH; ?>index.php?a=add"><i class="fa fa-plus-circle" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['sub_ticket'] ?></a></li>
<li><a href="<?php echo HESK_PATH; ?>ticket.php"><i class="fa fa-search" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['view_ticket_nav'] ?></a></li>
</ul>
</li>
<?php if ($hesk_settings['kb_enable'])
{ ?>
<li><a href="<?php echo HESK_PATH; ?>knowledgebase.php"><?php echo $hesklang['kb_text'] ?></a></li> <?php } ?>
<li><a href="<?php echo HESK_PATH; ?>knowledgebase.php"><i class="fa fa-book" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['kb_text'] ?></a></li> <?php } ?>
<?php include ('custom/header-custom.inc.php'); ?>
</ul>
<?php if ($hesk_settings['can_sel_lang']) { ?>
<div class="navbar-form navbar-right" role="search" style="margin-right: 20px; min-width: 80px;">
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
</div>
<?php } ?>
</div><!-- /.navbar-collapse -->
</nav>

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -34,6 +34,7 @@
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
require(HESK_PATH . 'modsForHesk_settings.inc.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@ -41,15 +42,27 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
<title><?php echo (isset($hesk_settings['tmp_title']) ? $hesk_settings['tmp_title'] : $hesk_settings['hesk_title']); ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=<?php echo $hesklang['ENCODING']; ?>" />
<meta name="viewport" content="width=device-width, user-scalable=no">
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>hesk_style_v25RTL.css" type="text/css" rel="stylesheet" />
<?php } else { ?>
<link href="<?php echo HESK_PATH; ?>hesk_style_v25.css" type="text/css" rel="stylesheet" />
<?php } ?>
<link href="<?php echo HESK_PATH; ?>css/datepicker.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyle.php" type="text/css" rel="stylesheet" />
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>css/bootstrap-rtl.min.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyleRTL.php" type="text/css" rel="stylesheet" />
<?php } else { ?>
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyle.php" type="text/css" rel="stylesheet" />
<?php } ?>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="<?php echo HESK_PATH; ?>css/octicons.css" type="text/css">
<script src="<?php echo HESK_PATH; ?>js/jquery-1.10.2.min.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>hesk_javascript_v25.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/nuMods-javascript.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/modsForHesk-javascript.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap.min.js"></script>
<script language="JavaScript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap-datepicker.js"></script>
<?php
/* Prepare Javascript that browser should load on page load */
@ -76,7 +89,7 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
if (defined('WYSIWYG') && $hesk_settings['kb_wysiwyg'])
{
?>
<script type="text/javascript" src="<?php echo HESK_PATH; ?>inc/tiny_mce/3.5.10/tiny_mce.js"></script>
<script type="text/javascript" src="<?php echo HESK_PATH; ?>inc/tiny_mce/3.5.11/tiny_mce.js"></script>
<?php
}
@ -120,4 +133,8 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
<?php
include(HESK_PATH . 'header.txt');
$iconDisplay = 'style="display: none"';
if ($modsForHesk_settings['show_icons']) {
$iconDisplay = '';
}
?>

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -91,7 +91,7 @@ function hesk_kbTopArticles($how_many, $index = 1)
?>
<h4 style="text-align: left"><?php echo $hesklang['popart']; ?></h4>
<h4 class="text-left"><?php echo $hesklang['popart']; ?></h4>
<div class="footerWithBorder blankSpace"></div>
<table border="0" width="100%">
@ -107,7 +107,7 @@ function hesk_kbTopArticles($how_many, $index = 1)
/* Show number of views? */
if ($hesk_settings['kb_views'] && hesk_dbNumRows($res) != 0)
{
echo '<td style="text-align:right"><i>' . $hesklang['views'] . '</i></td>';
echo '<td class="text-right"><i>' . $hesklang['views'] . '</i></td>';
}
?>
@ -124,7 +124,7 @@ function hesk_kbTopArticles($how_many, $index = 1)
/* If no results found end here */
if (hesk_dbNumRows($res) == 0)
{
echo '<p style="text-align: left;"><i>'.$hesklang['noa'].'</i><br />&nbsp;</p>';
echo '<p class="text-left"><i>'.$hesklang['noa'].'</i><br />&nbsp;</p>';
return true;
}
@ -147,7 +147,7 @@ function hesk_kbTopArticles($how_many, $index = 1)
if ($hesk_settings['kb_views'])
{
echo '<td valign="top" style="text-align:right" width="200">' . $article['views'] . '</td>';
echo '<td valign="top" class="text-right" width="200">' . $article['views'] . '</td>';
}
echo '
@ -201,7 +201,7 @@ function hesk_kbLatestArticles($how_many, $index = 1)
}
?>
<h4 style="text-align: left"><?php echo $hesklang['latart']; ?></h4>
<h4 class="text-left"><?php echo $hesklang['latart']; ?></h4>
<div class="footerWithBorder blankSpace"></div>
<table border="0" width="100%">
@ -216,7 +216,7 @@ function hesk_kbLatestArticles($how_many, $index = 1)
/* Show number of views? */
if ($hesk_settings['kb_date'] && hesk_dbNumRows($res) != 0)
{
echo '<td style="text-align:right"><i>' . $hesklang['dta'] . '</i></td>';
echo '<td class="text-right"><i>' . $hesklang['dta'] . '</i></td>';
}
?>
@ -233,7 +233,7 @@ function hesk_kbLatestArticles($how_many, $index = 1)
/* If no results found end here */
if (hesk_dbNumRows($res) == 0)
{
echo '<p style="text-align: left"><i>'.$hesklang['noa'].'</i><br />&nbsp;</p>';
echo '<p class="text-left"><i>'.$hesklang['noa'].'</i><br />&nbsp;</p>';
return true;
}
@ -256,7 +256,7 @@ function hesk_kbLatestArticles($how_many, $index = 1)
if ($hesk_settings['kb_date'])
{
echo '<td valign="top" style="text-align:right" width="200">' . hesk_date($article['dt']) . '</td>';
echo '<td valign="top" class="text-right" width="200">' . hesk_date($article['dt'], true) . '</td>';
}
echo '
@ -289,7 +289,6 @@ function hesk_kbSearchLarge($admin = '')
$action = $admin ? 'knowledgebase_private.php' : 'knowledgebase.php';
?>
<br />
<div style="text-align:center">
<form role="form" action="<?php echo $action; ?>" method="get" style="display: inline; margin: 0;" name="searchform">
@ -334,7 +333,7 @@ function hesk_kbSearchSmall()
}
?>
<td style="text-align:right" valign="top" width="300">
<td class="text-right" valign="top" width="300">
<div style="display:inline;margin-left:auto;margin-right:auto">
<form action="knowledgebase.php" method="get" class="form-inline" style="display: inline; margin: 0;">
<input type="text" name="search" class="form-control" />

@ -0,0 +1,505 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
* Copyright 2005-2014 Klemen Stirn. All Rights Reserved.
* HESK is a registered trademark of Klemen Stirn.
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden. To remove HESK copyright notice you must purchase
* a license for this script. For more information on how to obtain
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
// Include all functions needed for email piping
hesk_load_database_functions();
require(HESK_PATH . 'inc/email_functions.inc.php');
require(HESK_PATH . 'inc/posting_functions.inc.php');
require(HESK_PATH . 'inc/mail/rfc822_addresses.php');
require(HESK_PATH . 'inc/mail/mime_parser.php');
require(HESK_PATH . 'inc/mail/email_parser.php');
/*** FUNCTIONS ***/
function hesk_email2ticket($results, $pop3 = 0)
{
global $hesk_settings, $hesklang, $hesk_db_link, $ticket;
// Process "From:" email
$tmpvar['email'] = hesk_validateEmail($results['from'][0]['address'],'ERR',0);
// "From:" email missing or invalid?
if ( ! $tmpvar['email'] )
{
return hesk_cleanExit();
}
// Make sure the email isn't banned. If it is, just exit.
$emailSql = 'SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_emails` WHERE Email = \''.hesk_dbEscape($tmpvar['email']).'\'';
if ($emailSql->num_rows > 0) {
return hesk_cleanExit();
}
// Process "From:" name, convert to UTF-8, set to "[Customer]" if not set
$tmpvar['name'] = isset($results['from'][0]['name']) ? $results['from'][0]['name'] : $hesklang['pde'];
if ( ! empty($results['from'][0]['encoding']) )
{
$tmpvar['name'] = hesk_encodeUTF8($tmpvar['name'], $results['from'][0]['encoding']);
}
$tmpvar['name'] = hesk_input($tmpvar['name'],'','',1,50) or $tmpvar['name'] = $hesklang['pde'];
// Process "To:" email (not yet implemented, for future use)
// $tmpvar['to_email'] = hesk_validateEmail($results['to'][0]['address'],'ERR',0);
// Process email subject, convert to UTF-8, set to "[Piped email]" if none set
$tmpvar['subject'] = isset($results['subject']) ? $results['subject'] : $hesklang['pem'];
if ( ! empty($results['subject_encoding']) )
{
$tmpvar['subject'] = hesk_encodeUTF8($tmpvar['subject'], $results['subject_encoding']);
}
$tmpvar['subject'] = hesk_input($tmpvar['subject'],'','',1,70) or $tmpvar['subject'] = $hesklang['pem'];
// Process email message, convert to UTF-8
$tmpvar['message'] = isset($results['message']) ? $results['message'] : '';
if ( ! empty($results['encoding']) )
{
$tmpvar['message'] = hesk_encodeUTF8($tmpvar['message'], $results['encoding']);
}
$tmpvar['message'] = hesk_input($tmpvar['message'],'','',1);
// Message missing? We require it!
if ( ! $tmpvar['message'])
{
return hesk_cleanExit();
}
// Strip quoted reply from email
$tmpvar['message'] = hesk_stripQuotedText($tmpvar['message']);
// Convert URLs to links, change newlines to <br />
$tmpvar['message'] = hesk_makeURL($tmpvar['message']);
$tmpvar['message'] = nl2br($tmpvar['message']);
# For debugging purposes
# die( bin2hex($tmpvar['message']) );
# die($tmpvar['message']);
// Try to detect "delivery failed" and "noreply" emails - ignore if detected
if ( hesk_isReturnedEmail($tmpvar) )
{
return hesk_cleanExit();
}
// Check for email loops
if ( hesk_isEmailLoop($tmpvar['email'], md5($tmpvar['message']) ) )
{
return hesk_cleanExit();
}
// OK, everything seems OK. Now determine if this is a reply to a ticket or a new ticket
if ( preg_match('/\[#([A-Z0-9]{3}\-[A-Z0-9]{3}\-[A-Z0-9]{4})\]/', str_replace(' ', '', $tmpvar['subject']), $matches) )
{
// We found a possible tracking ID
$tmpvar['trackid'] = $matches[1];
// Does it match one in the database?
$res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `trackid`='".hesk_dbEscape($tmpvar['trackid'])."' LIMIT 1");
if (hesk_dbNumRows($res))
{
$ticket = hesk_dbFetchAssoc($res);
// Do email addresses match?
if ( strpos( strtolower($ticket['email']), strtolower($tmpvar['email']) ) === false )
{
$tmpvar['trackid'] = '';
}
// Is this ticket locked? Force create a new one if it is
if ($ticket['locked'])
{
$tmpvar['trackid'] = '';
}
}
else
{
$tmpvar['trackid'] = '';
}
}
// If tracking ID is empty, generate a new one
if ( empty($tmpvar['trackid']) )
{
$tmpvar['trackid'] = hesk_createID();
$is_reply = 0;
}
else
{
$is_reply = 1;
}
// Process attachments
$tmpvar['attachmment_notices'] = '';
$tmpvar['attachments'] = '';
$num = 0;
if ($hesk_settings['attachments']['use'] && isset($results['attachments'][0]))
{
#print_r($results['attachments']);
foreach ($results['attachments'] as $k => $v)
{
// Clean attachment names
$myatt['real_name'] = hesk_cleanFileName($v['orig_name']);
// Check number of attachments, delete any over max number
if ($num >= $hesk_settings['attachments']['max_number'])
{
$tmpvar['attachmment_notices'] .= sprintf($hesklang['attnum'], $myatt['real_name']) . "\n";
continue;
}
// Check file extension
$ext = strtolower(strrchr($myatt['real_name'], "."));
if (!in_array($ext,$hesk_settings['attachments']['allowed_types']))
{
$tmpvar['attachmment_notices'] .= sprintf($hesklang['atttyp'], $myatt['real_name']) . "\n";
continue;
}
// Check file size
$myatt['size'] = $v['size'];
if ($myatt['size'] > ($hesk_settings['attachments']['max_size']))
{
$tmpvar['attachmment_notices'] .= sprintf($hesklang['attsiz'], $myatt['real_name']) . "\n";
continue;
}
// Generate a random file name
$useChars='AEUYBDGHJLMNPQRSTVWXZ123456789';
$tmp = $useChars{mt_rand(0,29)};
for($j=1;$j<10;$j++)
{
$tmp .= $useChars{mt_rand(0,29)};
}
$myatt['saved_name'] = substr($tmpvar['trackid'] . '_' . md5($tmp . $myatt['real_name']), 0, 200) . $ext;
// Rename the temporary file
rename($v['stored_name'],HESK_PATH.$hesk_settings['attach_dir'].'/'.$myatt['saved_name']);
// Insert into database
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` (`ticket_id`,`saved_name`,`real_name`,`size`) VALUES ('".hesk_dbEscape($tmpvar['trackid'])."','".hesk_dbEscape($myatt['saved_name'])."','".hesk_dbEscape($myatt['real_name'])."','".intval($myatt['size'])."')");
$tmpvar['attachments'] .= hesk_dbInsertID() . '#' . $myatt['real_name'] .',';
$num++;
}
if (strlen($tmpvar['attachmment_notices']))
{
$tmpvar['message'] .= "<br /><br />" . hesk_input($hesklang['attrem'],'','',1) . "<br />" . nl2br(hesk_input($tmpvar['attachmment_notices'],'','',1));
}
}
// Delete the temporary files
deleteAll($results['tempdir']);
// If this is a reply add a new reply
if ($is_reply)
{
// Set last replier name to customer name
$ticket['lastreplier'] = ($tmpvar['name'] == $hesklang['pde']) ? $tmpvar['email'] : $tmpvar['name'];;
// If staff hasn't replied yet, keep ticket status "New", otherwise set it to "Waiting reply from staff"
$ticket['status'] = $ticket['status'] ? 1 : 0;
// Update ticket as necessary
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `lastchange`=NOW(),`status`='{$ticket['status']}',`lastreplier`='0' WHERE `id`='".intval($ticket['id'])."' LIMIT 1");
// Insert reply into database
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` (`replyto`,`name`,`message`,`dt`,`attachments`) VALUES ('".intval($ticket['id'])."','".hesk_dbEscape($ticket['lastreplier'])."','".hesk_dbEscape($tmpvar['message'])."',NOW(),'".hesk_dbEscape($tmpvar['attachments'])."')");
// --> Prepare reply message
// 1. Generate the array with ticket info that can be used in emails
$info = array(
'email' => $ticket['email'],
'category' => $ticket['category'],
'priority' => $ticket['priority'],
'owner' => $ticket['owner'],
'trackid' => $ticket['trackid'],
'status' => $ticket['status'],
'name' => $ticket['name'],
'lastreplier' => $ticket['lastreplier'],
'subject' => $ticket['subject'],
'message' => stripslashes($tmpvar['message']),
'attachments' => $tmpvar['attachments'],
'dt' => hesk_date($ticket['dt'], true),
'lastchange' => hesk_date($ticket['lastchange'], true),
);
// 2. Add custom fields to the array
foreach ($hesk_settings['custom_fields'] as $k => $v)
{
$info[$k] = $v['use'] ? $ticket[$k] : '';
}
// 3. Make sure all values are properly formatted for email
$ticket = hesk_ticketToPlain($info, 1, 0);
// --> Process custom fields before sending
foreach ($hesk_settings['custom_fields'] as $k => $v)
{
$ticket[$k] = $v['use'] ? hesk_msgToPlain($ticket[$k], 1) : '';
}
// --> If ticket is assigned just notify the owner
if ($ticket['owner'])
{
hesk_notifyAssignedStaff(false, 'new_reply_by_customer', 'notify_reply_my');
}
// --> No owner assigned, find and notify appropriate staff
else
{
hesk_notifyStaff('new_reply_by_customer',"`notify_reply_unassigned`='1'");
}
return $ticket['trackid'];
} // END REPLY
// Not a reply, but a new ticket. Add it to the database
$tmpvar['category'] = 1;
$tmpvar['priority'] = 3;
$_SERVER['REMOTE_ADDR'] = $hesklang['unknown'];
// Auto assign tickets if aplicable
$tmpvar['owner'] = 0;
$tmpvar['history'] = $pop3 ? sprintf($hesklang['thist16'], hesk_date()) : sprintf($hesklang['thist11'], hesk_date());
$autoassign_owner = hesk_autoAssignTicket($tmpvar['category']);
#print_r($autoassign_owner);
if ($autoassign_owner)
{
$tmpvar['owner'] = $autoassign_owner['id'];
$tmpvar['history'] .= sprintf($hesklang['thist10'],hesk_date(),$autoassign_owner['name'].' ('.$autoassign_owner['user'].')');
}
// Custom fields will be empty as there is no reliable way of detecting them
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
$tmpvar[$k] = '';
}
// Insert ticket to database
$ticket = hesk_newTicket($tmpvar);
// Notify the customer
hesk_notifyCustomer();
// Need to notify staff?
// --> From autoassign?
if ($tmpvar['owner'] && $autoassign_owner['notify_assigned'])
{
hesk_notifyAssignedStaff($autoassign_owner, 'ticket_assigned_to_you');
}
// --> No autoassign, find and notify appropriate staff
elseif ( ! $tmpvar['owner'] )
{
hesk_notifyStaff('new_ticket_staff', " `notify_new_unassigned` = '1' ");
}
return $ticket['trackid'];
} // END hesk_email2ticket()
function hesk_encodeUTF8($in, $encoding)
{
$encoding = strtoupper($encoding);
switch($encoding)
{
case 'UTF-8':
return $in;
break;
case 'ISO-8859-1':
return utf8_encode($in);
break;
default:
return iconv($encoding, 'UTF-8', $in);
break;
}
} // END hesk_encodeUTF8()
function hesk_stripQuotedText($message)
{
global $hesk_settings, $hesklang;
// Stripping quoted text disabled?
if ( ! $hesk_settings['strip_quoted'])
{
return $message;
}
// Loop through available languages and ty to find the tag
foreach ($hesk_settings['languages'] as $language => $settings)
{
if ( ($found = strpos($message, $settings['hr']) ) !== false )
{
// "Reply above this line" tag found, strip quoted reply
$message = substr($message, 0, $found);
$message .= "\n" . $hesklang['qrr'];
// Set language to the detected language
hesk_setLanguage($language);
break;
}
}
return $message;
} // END hesk_stripQuotedText()
function hesk_isReturnedEmail($tmpvar)
{
// Check noreply email addresses
if ( preg_match('/not?[\-_]reply@/i', $tmpvar['email']) )
{
return true;
}
// Check mailer daemon email addresses
if ( preg_match('/mail(er)?[\-_]daemon@/i', $tmpvar['email']) )
{
return true;
}
// Check autoreply subjects
if ( preg_match('/^[\[\(]?Auto(mat(ic|ed))?[ \-]?reply/i', $tmpvar['subject']) )
{
return true;
}
// Check out of office subjects
if ( preg_match('/^Out of Office/i', $tmpvar['subject']) )
{
return true;
}
// Check delivery failed email subjects
if (
preg_match('/DELIVERY FAILURE/i', $tmpvar['subject']) ||
preg_match('/Undelivered Mail Returned to Sender/i', $tmpvar['subject']) ||
preg_match('/Delivery Status Notification \(Failure\)/i', $tmpvar['subject']) ||
preg_match('/Returned mail\: see transcript for details/i', $tmpvar['subject'])
)
{
return true;
}
// Check Mail Delivery sender name
if ( preg_match('/Mail[ \-_]?Delivery/i', $tmpvar['name']) )
{
return true;
}
// Check Delivery failed message
if ( preg_match('/postmaster@/i', $tmpvar['email']) && preg_match('/Delivery has failed to these recipients/i', $tmpvar['message']) )
{
return true;
}
// No pattern detected, seems like this is not a returned email
return false;
} // END hesk_isReturnedEmail()
function hesk_isEmailLoop($email, $message_hash)
{
global $hesk_settings, $hesklang, $hesk_db_link;
// If $hesk_settings['loop_hits'] is set to 0 this function is disabled
if ( ! $hesk_settings['loop_hits'])
{
return false;
}
// Escape wildcards in email
$email_like = hesk_dbEscape(hesk_dbLike($email));
// Delete expired DB entries
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."pipe_loops` WHERE `dt` < (NOW() - INTERVAL ".intval($hesk_settings['loop_time'])." SECOND) ");
// Check current entry
$res = hesk_dbQuery("SELECT `hits`, `message_hash` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."pipe_loops` WHERE `email` LIKE '{$email_like}' LIMIT 1");
// Any active entry*
if (hesk_dbNumRows($res))
{
list($num, $md5) = hesk_dbFetchRow($res);
$num++;
// Number of emails in a time period reached?
if ($num >= $hesk_settings['loop_hits'])
{
return true;
}
// Message exactly the same as in previous email?
if ($message_hash == $md5)
{
return true;
}
// Update DB entry
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."pipe_loops` SET `hits` = `hits` + 1, `message_hash` = '".hesk_dbEscape($message_hash)."' WHERE `email` LIKE '{$email_like}' LIMIT 1");
}
else
{
// First instance, insert a new database row
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."pipe_loops` (`email`, `message_hash`) VALUES ('".hesk_dbEscape($email)."', '".hesk_dbEscape($message_hash)."')");
}
// No loop rule trigered
return false;
} // END hesk_isEmailLoop()
function hesk_cleanExit()
{
global $results;
// Delete the temporary files
deleteAll($results['tempdir']);
// Return NULL
return NULL;
} // END hesk_cleanExit()

@ -0,0 +1,177 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
* Copyright 2005-2014 Klemen Stirn. All Rights Reserved.
* HESK is a registered trademark of Klemen Stirn.
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden. To remove HESK copyright notice you must purchase
* a license for this script. For more information on how to obtain
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
$tmp = intval( hesk_GET('limit') );
$maxresults = ($tmp > 0) ? $tmp : $hesk_settings['max_listings'];
$tmp = intval( hesk_GET('page', 1) );
$page = ($tmp > 1) ? $tmp : 1;
/* Acceptable $sort values and default asc(1)/desc(0) setting */
$sort_possible = array(
'trackid' => 1,
'lastchange' => 0,
'name' => 1,
'subject' => 1,
'status' => 1,
'lastreplier' => 1,
'priority' => 1,
'category' => 1,
'dt' => 0,
'id' => 1,
'owner' => 1,
'custom1' => 1,
'custom2' => 1,
'custom3' => 1,
'custom4' => 1,
'custom5' => 1,
'custom6' => 1,
'custom7' => 1,
'custom8' => 1,
'custom9' => 1,
'custom10' => 1,
'custom11' => 1,
'custom12' => 1,
'custom13' => 1,
'custom14' => 1,
'custom15' => 1,
'custom16' => 1,
'custom17' => 1,
'custom18' => 1,
'custom19' => 1,
'custom20' => 1
);
/* These values should have collate appended in SQL */
$sort_collation = array(
'name',
'subject',
);
/* Acceptable $group values and default asc(1)/desc(0) setting */
$group_possible = array(
'owner' => 1,
'priority' => 1,
'category' => 1,
);
/* Start the order by part of the SQL query */
$sql .= " ORDER BY ";
/* Group tickets? Default: no */
if (isset($_GET['g']) && ! is_array($_GET['g']) && isset($group_possible[$_GET['g']]))
{
$group = hesk_input($_GET['g']);
if ($group == 'priority' && isset($_GET['sort']) && ! is_array($_GET['sort']) && $_GET['sort'] == 'priority')
{
// No need to group by priority if we are already sorting by priority
}
elseif ($group == 'owner')
{
// If group by owner place own tickets on top
$sql .= " CASE WHEN `owner` = '".intval($_SESSION['id'])."' THEN 1 ELSE 0 END DESC, `owner` ASC, ";
}
else
{
$sql .= ' `'.hesk_dbEscape($group).'` ';
$sql .= $group_possible[$group] ? 'ASC, ' : 'DESC, ';
}
}
else
{
$group = '';
}
/* Show critical tickets always on top? Default: yes */
$cot = (isset($_GET['cot']) && intval($_GET['cot']) == 1) ? 1 : 0;
if (!$cot)
{
$sql .= " CASE WHEN `priority` = '0' THEN 1 ELSE 0 END DESC , ";
}
/* Sort by which field? */
if (isset($_GET['sort']) && ! is_array($_GET['sort']) && isset($sort_possible[$_GET['sort']]))
{
$sort = hesk_input($_GET['sort']);
$sql .= $sort == 'lastreplier' ? " CASE WHEN `lastreplier` = '0' THEN 0 ELSE 1 END DESC, COALESCE(`replierid`, NULLIF(`lastreplier`, '0'), `name`) " : ' `'.hesk_dbEscape($sort).'` ';
// Need to set MySQL collation?
if ( in_array($_GET['sort'], $sort_collation) )
{
$sql .= " COLLATE '" . hesk_dbEscape($hesklang['_COLLATE']) . "' ";
}
}
else
{
/* Default sorting by ticket status */
$sql .= ' `status` ';
$sort = 'status';
}
/* Ascending or Descending? */
if (isset($_GET['asc']) && intval($_GET['asc'])==0)
{
$sql .= ' DESC ';
$asc = 0;
$asc_rev = 1;
$sort_possible[$sort] = 1;
}
else
{
$sql .= ' ASC ';
$asc = 1;
$asc_rev = 0;
if (!isset($_GET['asc']))
{
$is_default = 1;
}
$sort_possible[$sort] = 0;
}
/* In the end same results should always be sorted by priority */
if ($sort != 'priority')
{
$sql .= ' , `priority` ASC ';
}
# Uncomment for debugging purposes
# echo "SQL: $sql<br>";

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -51,17 +51,17 @@ $num_mail = hesk_checkNewMail();
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="admin_main.php"><?php echo $hesklang['main_page']; ?></a></li>
<?php if (hesk_checkPermission('can_man_users',0)){echo '<li><a href="manage_users.php">'.$hesklang['menu_users'].'</a></li>';}
if (hesk_checkPermission('can_man_cat',0)) {echo '<li><a href="manage_categories.php">'.$hesklang['menu_cat'].'</a></li>';}
if (hesk_checkPermission('can_man_canned',0)) {echo '<li><a href="manage_canned.php">'.$hesklang['menu_can'].'</a></li>';}
if (hesk_checkPermission('can_man_kb',0)) {echo '<li><a href="manage_knowledgebase.php">'.$hesklang['menu_kb'].'</a></li>';}
else {echo '<li><a href="knowledgebase_private.php">'.$hesklang['menu_kb'].'</a></li>';}
if (hesk_checkPermission('can_run_reports',0)) {echo '<li><a href="reports.php">'.$hesklang['reports'].'</a></li>';}
elseif (hesk_checkPermission('can_export',0)) {echo '<li><a href="export.php">'.$hesklang['reports'].'</a></li>';}
if (hesk_checkPermission('can_man_settings',0)) {echo '<li><a href="admin_settings.php">'.$hesklang['settings'].'</a></li>';} ?>
<li><a href="profile.php"><?php echo $hesklang['menu_profile']; ?></a></li>
<li><a href="mail.php"><?php echo $hesklang['menu_msg']; ?>
<li><a href="admin_main.php"><i class="fa fa-home" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['main_page']; ?></a></li>
<?php if (hesk_checkPermission('can_man_users',0)){echo '<li><a href="manage_users.php"><i class="fa fa-users" '.$iconDisplay.'></i>&nbsp;'.$hesklang['menu_users'].'</a></li>';}
if (hesk_checkPermission('can_man_cat',0)) {echo '<li><a href="manage_categories.php"><i class="fa fa-pie-chart" '.$iconDisplay.'></i>&nbsp;'.$hesklang['menu_cat'].'</a></li>';}
if (hesk_checkPermission('can_man_canned',0)) {echo '<li><a href="manage_canned.php"><i class="fa fa-file-text-o" '.$iconDisplay.'></i>&nbsp;'.$hesklang['menu_can'].'</a></li>';}
if (hesk_checkPermission('can_man_kb',0)) {echo '<li><a href="manage_knowledgebase.php"><i class="fa fa-book" '.$iconDisplay.'></i>&nbsp;'.$hesklang['menu_kb'].'</a></li>';}
else {echo '<li><a href="knowledgebase_private.php"><i class="fa fa-book" '.$iconDisplay.'></i>&nbsp;'.$hesklang['menu_kb'].'</a></li>';}
if (hesk_checkPermission('can_run_reports',0)) {echo '<li><a href="reports.php"><i class="fa fa-line-chart" '.$iconDisplay.'></i>&nbsp;'.$hesklang['reports'].'</a></li>';}
elseif (hesk_checkPermission('can_export',0)) {echo '<li><a href="export.php"><i class="fa fa-line-chart" '.$iconDisplay.'></i>&nbsp;'.$hesklang['reports'].'</a></li>';}
if (hesk_checkPermission('can_manage_settings',0)) {echo '<li><a href="admin_settings.php"><i class="fa fa-cog" '.$iconDisplay.'></i>&nbsp;'.$hesklang['settings'].'</a></li>';} ?>
<li><a href="profile.php"><i class="fa fa-user" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['menu_profile']; ?></a></li>
<li><a href="mail.php"><i class="fa fa-envelope-o" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['menu_msg']; ?>
<?php if ($num_mail != 0)
{
echo '<span class="badge">';
@ -70,8 +70,10 @@ $num_mail = hesk_checkNewMail();
echo '</span>';
} ?>
</a></li>
<?php include('custom/show_admin_nav-custom.inc.php'); ?>
<li><a href="index.php?a=logout&amp;token=<?php echo hesk_token_echo(); ?>"><?php echo $hesklang['logout']; ?></a></li>
<?php include('custom/show_admin_nav-custom.inc.php');
$iconDisplay = ($iconDisplay == '') ? 'style="font-size: 14px"' : $iconDisplay;
?>
<li><a href="index.php?a=logout&amp;token=<?php echo hesk_token_echo(); ?>"><span class="octicon octicon-sign-out" <?php echo $iconDisplay; ?>></span>&nbsp;<?php echo $hesklang['logout']; ?></a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>

@ -1,36 +1,36 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
* Copyright 2005-2013 Klemen Stirn. All Rights Reserved.
* HESK is a registered trademark of Klemen Stirn.
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden. To remove HESK copyright notice you must purchase
* a license for this script. For more information on how to obtain
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
* Title: Help Desk Software HESK
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
* COPYRIGHT AND TRADEMARK NOTICE
* Copyright 2005-2013 Klemen Stirn. All Rights Reserved.
* HESK is a registered trademark of Klemen Stirn.
* The HESK may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
* Removing any of the copyright notices without purchasing a license
* is expressly forbidden. To remove HESK copyright notice you must purchase
* a license for this script. For more information on how to obtain
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
@ -47,22 +47,22 @@ if ( ! isset($status) )
if ( ! isset($priority) )
{
$priority = array(
0 => 'CRITICAL',
1 => 'HIGH',
2 => 'MEDIUM',
3 => 'LOW',
);
$priority = array(
0 => 'CRITICAL',
1 => 'HIGH',
2 => 'MEDIUM',
3 => 'LOW',
);
}
if ( ! isset($what) )
{
$what = 'trackid';
$what = 'trackid';
}
if ( ! isset($date_input) )
{
$date_input = '';
$date_input = '';
}
/* Can view tickets that are unassigned or assigned to others? */
@ -73,22 +73,22 @@ $can_view_unassigned = hesk_checkPermission('can_view_unassigned',0);
$category_options = '';
if ( isset($hesk_settings['categories']) && count($hesk_settings['categories']) )
{
foreach ($hesk_settings['categories'] as $row['id'] => $row['name'])
{
$row['name'] = (strlen($row['name']) > 30) ? substr($row['name'],0,30) . '...' : $row['name'];
$selected = ($row['id'] == $category) ? 'selected="selected"' : '';
$category_options .= '<option value="'.$row['id'].'" '.$selected.'>'.$row['name'].'</option>';
}
foreach ($hesk_settings['categories'] as $row['id'] => $row['name'])
{
$row['name'] = (strlen($row['name']) > 30) ? substr($row['name'],0,30) . '...' : $row['name'];
$selected = ($row['id'] == $category) ? 'selected="selected"' : '';
$category_options .= '<option value="'.$row['id'].'" '.$selected.'>'.$row['name'].'</option>';
}
}
else
{
$res2 = hesk_dbQuery('SELECT `id`, `name` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'categories` WHERE ' . hesk_myCategories('id') . ' ORDER BY `cat_order` ASC');
while ($row=hesk_dbFetchAssoc($res2))
{
$row['name'] = (strlen($row['name']) > 30) ? substr($row['name'],0,30) . '...' : $row['name'];
$selected = ($row['id'] == $category) ? 'selected="selected"' : '';
$category_options .= '<option value="'.$row['id'].'" '.$selected.'>'.$row['name'].'</option>';
}
$res2 = hesk_dbQuery('SELECT `id`, `name` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'categories` WHERE ' . hesk_myCategories('id') . ' ORDER BY `cat_order` ASC');
while ($row=hesk_dbFetchAssoc($res2))
{
$row['name'] = (strlen($row['name']) > 30) ? substr($row['name'],0,30) . '...' : $row['name'];
$selected = ($row['id'] == $category) ? 'selected="selected"' : '';
$category_options .= '<option value="'.$row['id'].'" '.$selected.'>'.$row['name'].'</option>';
}
}
$more = empty($_GET['more']) ? 0 : 1;
@ -98,331 +98,342 @@ $more2 = empty($_GET['more2']) ? 0 : 1;
?>
<!-- ** START SHOW TICKET FORM ** -->
<div class="panel panel-default">
<div class="panel-heading">
<h4><?php echo $hesklang['show_tickets']; ?></h4>
</div>
<div class="panel-body">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<form name="showt" action="show_tickets.php" method="get">
<h3 style="margin-bottom:5px"><?php echo $hesklang['show_tickets']; ?></h3>
<div class="footerWithBorder blankSpace"></div>
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td width="20%" class="alignTop"><b><?php echo $hesklang['status']; ?></b>: &nbsp; </td>
<td width="80%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<?php
$rowCounter = 1;
$statusRS = hesk_dbQuery('SELECT `ID`, `ShortNameContentKey`, `TextColor` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses`');
while ($row = $statusRS->fetch_assoc())
{
if ($rowCounter > 3)
{
echo '</tr><tr>';
$rowCounter = 1;
}
echo '<td width=';
if ($rowCounter != 3)
{
echo '"33%"';
} else
{
echo '"34%"';
}
echo '<label><input type="checkbox" name="s'.$row['ID'].'" value="1"';
if (isset($status[$row['ID']])) {echo 'checked="checked"';}
echo '/> <span style="color: '.$row['TextColor'].';">'.$hesklang[$row['ShortNameContentKey']].'</span></label></td>';
$rowCounter++;
}
?>
</tr>
<tr>
<td valign="top">
<form name="showt" action="show_tickets.php" method="get">
<table class="table" style="border-top: 0 !important" border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td style="border-top: 0px" width="20%" class="alignTop"><b><?php echo $hesklang['status']; ?></b>: &nbsp; </td>
<td style="border-top: 0px" width="80%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<?php
$rowCounter = 1;
$statusRS = hesk_dbQuery('SELECT `ID`, `ShortNameContentKey`, `TextColor` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses`');
while ($row = $statusRS->fetch_assoc())
{
if ($rowCounter > 3)
{
echo '</tr><tr>';
$rowCounter = 1;
}
echo '<td width=';
if ($rowCounter != 3)
{
echo '"33%"';
} else
{
echo '"34%"';
}
echo '<label><input type="checkbox" name="s'.$row['ID'].'" value="1"';
if (isset($status[$row['ID']])) {echo 'checked="checked"';}
echo '/> <span style="font-weight: bold;color: '.$row['TextColor'].';">'.$hesklang[$row['ShortNameContentKey']].'</span></label></td>';
$rowCounter++;
}
?>
</tr>
</table>
</td>
</tr>
</table>
<div id="topSubmit" style="display:<?php echo $more ? 'none' : 'block' ; ?>">
&nbsp;<br />
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['show_tickets']; ?>" />
<a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow');Javascript:hesk_toggleLayerDisplay('topSubmit');document.showt.more.value='1';"><?php echo $hesklang['mopt']; ?></a>
<br />&nbsp;<br />
</div>
<div id="divShow" style="display:<?php echo $more ? 'block' : 'none' ; ?>">
<table class="table table-striped" border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td width="20%" class="borderTop alignTop"><b><?php echo $hesklang['priority']; ?></b>: &nbsp; </td>
<td width="80%" class="borderTop alignTop">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="33%"><label><input type="checkbox" name="p0" value="1" <?php if (isset($priority[0])) {echo 'checked="checked"';} ?> /> <span class="critical"><?php echo $hesklang['critical']; ?></span></label></td>
<td width="33%"><label><input type="checkbox" name="p2" value="1" <?php if (isset($priority[2])) {echo 'checked="checked"';} ?> /> <span class="medium"><?php echo $hesklang['medium']; ?></span></label></td>
<td width="34%">&nbsp;</td>
</tr>
<tr>
<td width="33%"><label><input type="checkbox" name="p1" value="1" <?php if (isset($priority[1])) {echo 'checked="checked"';} ?> /> <span class="important"><?php echo $hesklang['high']; ?></span></label></td>
<td width="33%"><label><input type="checkbox" name="p3" value="1" <?php if (isset($priority[3])) {echo 'checked="checked"';} ?> /> <span class="normal"><?php echo $hesklang['low']; ?></span></label></td>
<td width="34%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="borderTop alignTop"><b><?php echo $hesklang['show']; ?></b>: &nbsp; </td>
<td class="borderTop">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="33%" class="alignTop">
<label><input type="checkbox" name="s_my" value="1" <?php if ($s_my[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_my']; ?></label>
<?php
if ($can_view_unassigned)
{
?>
<br />
<label><input type="checkbox" name="s_un" value="1" <?php if ($s_un[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_un']; ?></label>
<?php
}
?>
</td>
<td width="33%" class="alignTop">
<?php
if ($can_view_ass_others)
{
?>
<label><input type="checkbox" name="s_ot" value="1" <?php if ($s_ot[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_ot']; ?></label>
<br />
<?php
}
?>
<label><input type="checkbox" name="archive" value="1" <?php if ($archive[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['disp_only_archived']; ?></label></td>
<td width="34%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="borderTop alignTop"><b><?php echo $hesklang['sort_by']; ?></b>: &nbsp; </td>
<td class="borderTop">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="33%"><label><input type="radio" name="sort" value="priority" <?php if ($sort == 'priority') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['priority']; ?></label></td>
<td width="33%"><label><input type="radio" name="sort" value="lastchange" <?php if ($sort == 'lastchange') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['last_update']; ?></label></td>
<td width="34%"><label><input type="radio" name="sort" value="name" <?php if ($sort == 'name') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['name']; ?></label></td>
</tr>
<tr>
<td width="33%"><label><input type="radio" name="sort" value="subject" <?php if ($sort == 'subject') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['subject']; ?></label></td>
<td width="33%"><label><input type="radio" name="sort" value="status" <?php if ($sort == 'status') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['status']; ?></label></td>
<td width="34%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="borderTop alignTop"><b><?php echo $hesklang['gb']; ?></b>: &nbsp; </td>
<td class="borderTop">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="33%"><label><input type="radio" name="g" value="" <?php if ( ! $group) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['dg']; ?></label></td>
<td width="33%"><?php
if ($can_view_unassigned || $can_view_ass_others)
{
?>
<label><input type="radio" name="g" value="owner" <?php if ($group == 'owner') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['owner']; ?></label>
<?php
}
else
{
echo '&nbsp;';
}
?>
</td>
<td width="34%">&nbsp;</td>
</tr>
<tr>
<td width="33%"><label><input type="radio" name="g" value="category" <?php if ($group == 'category') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['category']; ?></label></td>
<td width="33%"><label><input type="radio" name="g" value="priority" <?php if ($group == 'priority') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['priority']; ?></label></td>
<td width="34%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="borderTop alignMiddle"><b><?php echo $hesklang['category']; ?></b>: &nbsp; </td>
<td class="borderTop alignMiddle">
<div class="col-md-4" style="padding-left: 0px"><select class="form-control" name="category">
<option value="0" ><?php echo $hesklang['any_cat']; ?></option>
<?php echo $category_options; ?>
</select></div>
</td>
</tr>
<tr>
<td class="borderTop"><b><?php echo $hesklang['display']; ?></b>: &nbsp; </td>
<td class="borderTop"><div class="col-md-2" style="padding-left: 0px; padding-right:0px"><input type="text" class="form-control" name="limit" value="<?php echo $maxresults; ?>" size="4" /></div><div class="col-md-3" style="line-height: 40px"><?php echo $hesklang['tickets_page']; ?></div></td>
</tr>
<tr>
<td class="borderTop alignMiddle"><b><?php echo $hesklang['order']; ?></b>: &nbsp; </td>
<td class="borderTop alignMiddle">
<label><input type="radio" name="asc" value="1" <?php if ($asc) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['ascending']; ?></label>
|
<label><input type="radio" name="asc" value="0" <?php if (!$asc) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['descending']; ?></label></td>
</tr>
<tr>
<td class="borderTop alignTop"><b><?php echo $hesklang['opt']; ?></b>: &nbsp; </td>
<td class="borderTop">
<label><input type="checkbox" name="cot" value="1" <?php if ($cot) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['cot']; ?></label><br />
<label><input type="checkbox" name="def" value="1" /> <?php echo $hesklang['def']; ?></label> (<a href="admin_main.php?reset=1&amp;token=<?php echo hesk_token_echo(0); ?>"><?php echo $hesklang['redv']; ?></a>)
</td>
</table>
<p><input class="btn btn-default" type="submit" value="<?php echo $hesklang['show_tickets']; ?>" />
<input type="hidden" name="more" value="<?php echo $more ? 1 : 0 ; ?>" /><a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow');Javascript:hesk_toggleLayerDisplay('topSubmit');document.showt.more.value='0';"><?php echo $hesklang['lopt']; ?></a></p>
</div>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div id="topSubmit" style="display:<?php echo $more ? 'none' : 'block' ; ?>">
&nbsp;<br />
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['show_tickets']; ?>" />
<a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow');Javascript:hesk_toggleLayerDisplay('topSubmit');document.showt.more.value='1';"><?php echo $hesklang['mopt']; ?></a>
<br />&nbsp;<br />
</div>
<div id="divShow" style="display:<?php echo $more ? 'block' : 'none' ; ?>">
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td width="20%" class="borderTop alignTop"><b><?php echo $hesklang['priority']; ?></b>: &nbsp; </td>
<td width="80%" class="borderTop alignTop">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="34%"><label><input type="checkbox" name="p0" value="1" <?php if (isset($priority[0])) {echo 'checked="checked"';} ?> /> <span class="critical"><?php echo $hesklang['critical']; ?></span></label></td>
<td width="33%"><label><input type="checkbox" name="p2" value="1" <?php if (isset($priority[2])) {echo 'checked="checked"';} ?> /> <span class="medium"><?php echo $hesklang['medium']; ?></span></label></td>
<td width="33%">&nbsp;</td>
</tr>
<tr>
<td width="34%"><label><input type="checkbox" name="p1" value="1" <?php if (isset($priority[1])) {echo 'checked="checked"';} ?> /> <span class="important"><?php echo $hesklang['high']; ?></span></label></td>
<td width="33%"><label><input type="checkbox" name="p3" value="1" <?php if (isset($priority[3])) {echo 'checked="checked"';} ?> /> <span class="normal"><?php echo $hesklang['low']; ?></span></label></td>
<td width="33%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="borderTop alignTop"><b><?php echo $hesklang['show']; ?></b>: &nbsp; </td>
<td class="borderTop">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="34%" class="alignTop">
<label><input type="checkbox" name="s_my" value="1" <?php if ($s_my[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_my']; ?></label>
<?php
if ($can_view_unassigned)
{
?>
<br />
<label><input type="checkbox" name="s_un" value="1" <?php if ($s_un[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_un']; ?></label>
<?php
}
?>
</td>
<td width="33%" class="alignTop">
<?php
if ($can_view_ass_others)
{
?>
<label><input type="checkbox" name="s_ot" value="1" <?php if ($s_ot[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_ot']; ?></label>
<br />
<?php
}
?>
<label><input type="checkbox" name="archive" value="1" <?php if ($archive[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['disp_only_archived']; ?></label></td>
<td width="33%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="borderTop alignTop"><b><?php echo $hesklang['sort_by']; ?></b>: &nbsp; </td>
<td class="borderTop">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="34%"><label><input type="radio" name="sort" value="priority" <?php if ($sort == 'priority') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['priority']; ?></label></td>
<td width="33%"><label><input type="radio" name="sort" value="lastchange" <?php if ($sort == 'lastchange') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['last_update']; ?></label></td>
<td width="33%"><label><input type="radio" name="sort" value="name" <?php if ($sort == 'name') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['name']; ?></label></td>
</tr>
<tr>
<td width="34%"><label><input type="radio" name="sort" value="subject" <?php if ($sort == 'subject') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['subject']; ?></label></td>
<td width="33%"><label><input type="radio" name="sort" value="status" <?php if ($sort == 'status') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['status']; ?></label></td>
<td width="33%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="borderTop alignTop"><b><?php echo $hesklang['gb']; ?></b>: &nbsp; </td>
<td class="borderTop">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="34%"><label><input type="radio" name="g" value="" <?php if ( ! $group) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['dg']; ?></label></td>
<td width="33%"><?php
if ($can_view_unassigned || $can_view_ass_others)
{
?>
<label><input type="radio" name="g" value="owner" <?php if ($group == 'owner') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['owner']; ?></label>
<?php
}
else
{
echo '&nbsp;';
}
?>
</td>
<td width="33%">&nbsp;</td>
</tr>
<tr>
<td width="34%"><label><input type="radio" name="g" value="category" <?php if ($group == 'category') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['category']; ?></label></td>
<td width="33%"><label><input type="radio" name="g" value="priority" <?php if ($group == 'priority') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['priority']; ?></label></td>
<td width="33%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="borderTop alignMiddle"><b><?php echo $hesklang['category']; ?></b>: &nbsp; </td>
<td class="borderTop alignMiddle">
<div class="col-md-4" style="padding-left: 0px"><select class="form-control" name="category">
<option value="0" ><?php echo $hesklang['any_cat']; ?></option>
<?php echo $category_options; ?>
</select></div>
</td>
</tr>
<tr>
<td class="borderTop"><b><?php echo $hesklang['display']; ?></b>: &nbsp; </td>
<td class="borderTop"><div class="col-md-2" style="padding-left: 0px; padding-right:0px"><input type="text" class="form-control" name="limit" value="<?php echo $maxresults; ?>" size="4" /></div><div class="col-md-3" style="line-height: 40px"><?php echo $hesklang['tickets_page']; ?></div></td>
</tr>
<tr>
<td class="borderTop alignMiddle"><b><?php echo $hesklang['order']; ?></b>: &nbsp; </td>
<td class="borderTop alignMiddle">
<label><input type="radio" name="asc" value="1" <?php if ($asc) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['ascending']; ?></label>
|
<label><input type="radio" name="asc" value="0" <?php if (!$asc) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['descending']; ?></label></td>
</tr>
<tr>
<td class="borderTop alignTop"><b><?php echo $hesklang['opt']; ?></b>: &nbsp; </td>
<td class="borderTop">
<label><input type="checkbox" name="cot" value="1" <?php if ($cot) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['cot']; ?></label><br />
<label><input type="checkbox" name="def" value="1" /> <?php echo $hesklang['def']; ?></label> (<a href="admin_main.php?reset=1&amp;token=<?php echo hesk_token_echo(0); ?>"><?php echo $hesklang['redv']; ?></a>)
</td>
</table>
<p><input class="btn btn-default" type="submit" value="<?php echo $hesklang['show_tickets']; ?>" />
<input type="hidden" name="more" value="<?php echo $more ? 1 : 0 ; ?>" /><a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow');Javascript:hesk_toggleLayerDisplay('topSubmit');document.showt.more.value='0';"><?php echo $hesklang['lopt']; ?></a></p>
</div>
</form>
</td>
</tr>
</table>
<!-- ** END SHOW TICKET FORM ** -->
<div class="blankSpace"></div>
<!-- ** START SEARCH TICKETS FORM ** -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<form class="form-inline" action="find_tickets.php" method="get" name="findby" id="findby">
<h3 style="margin-bottom:5px"><?php echo $hesklang['find_ticket_by']; ?></h3>
<div class="footerWithBorder blankSpace"></div>
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td style="text-align:left">
<b style="color: #000"><?php echo $hesklang['s_for']; ?></b><br />
<input class="form-control" type="text" name="q" size="30" <?php if (isset($q)) {echo 'value="'.$q.'"';} ?> />
</td>
<td style="text-align:left">
<b style="color: #000"><?php echo $hesklang['s_in']; ?></b><br />
<select class="form-control" name="what">
<option value="trackid" <?php if ($what=='trackid') {echo 'selected="selected"';} ?> ><?php echo $hesklang['trackID']; ?></option>
<?php
if ($hesk_settings['sequential'])
{
?>
<option value="seqid" <?php if ($what=='seqid') {echo 'selected="selected"';} ?> ><?php echo $hesklang['seqid']; ?></option>
<?php
}
?>
<option value="name" <?php if ($what=='name') {echo 'selected="selected"';} ?> ><?php echo $hesklang['name']; ?></option>
<option value="email" <?php if ($what=='email') {echo 'selected="selected"';} ?> ><?php echo $hesklang['email']; ?></option>
<option value="subject" <?php if ($what=='subject') {echo 'selected="selected"';} ?> ><?php echo $hesklang['subject']; ?></option>
<option value="message" <?php if ($what=='message') {echo 'selected="selected"';} ?> ><?php echo $hesklang['message']; ?></option>
<?php
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
$selected = ($what == $k) ? 'selected="selected"' : '';
if ($v['use'])
{
$v['name'] = (strlen($v['name']) > 30) ? substr($v['name'],0,30) . '...' : $v['name'];
echo '<option value="'.$k.'" '.$selected.'>'.$v['name'].'</option>';
}
}
?>
<option value="notes" <?php if ($what=='notes') {echo 'selected="selected"';} ?> ><?php echo $hesklang['notes']; ?></option>
</select>
</td>
</tr>
</table>
<div id="topSubmit2" style="display:<?php echo $more2 ? 'none' : 'block' ; ?>">
&nbsp;<br />
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['find_ticket']; ?>" />
<a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow2');Javascript:hesk_toggleLayerDisplay('topSubmit2');document.findby.more2.value='1';"><?php echo $hesklang['mopt']; ?></a>
<br />&nbsp;<br />
</div>
<div id="divShow2" style="display:<?php echo $more2 ? 'block' : 'none' ; ?>">
&nbsp;<br />
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td class="borderTop alignMiddle" width="20%"><b><?php echo $hesklang['category']; ?></b>: &nbsp; </td>
<td class="borderTop alignMiddle" width="80%">
<select class="form-control" name="category">
<option value="0" ><?php echo $hesklang['any_cat']; ?></option>
<?php echo $category_options; ?>
</select>
</td>
</tr>
<tr>
<td class="borderTop alignMiddle"><b><?php echo $hesklang['date']; ?></b>: &nbsp; </td>
<td class="borderTop alignMiddle">
<div class="col-md-3" style="padding-left: 0px"><input class="form-control tcal" type="text" name="dt" id="dt" size="10" <?php if ($date_input) {echo 'value="'.$date_input.'"';} ?> /></div>
</td>
</tr>
<tr>
<td class="borderTop alignTop"><b><?php echo $hesklang['s_incl']; ?></b>: &nbsp; </td>
<td class="borderTop">
<label><input type="checkbox" name="s_my" value="1" <?php if ($s_my[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_my']; ?></label>
<?php
if ($can_view_ass_others)
{
?>
<br />
<label><input type="checkbox" name="s_ot" value="1" <?php if ($s_ot[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_ot']; ?></label>
<?php
}
if ($can_view_unassigned)
{
?>
<br />
<label><input type="checkbox" name="s_un" value="1" <?php if ($s_un[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_un']; ?></label>
<?php
}
?>
<br />
<label><input type="checkbox" name="archive" value="1" <?php if ($archive[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['disp_only_archived']; ?></label>
</td>
</tr>
<tr>
<td class="borderTop"><b><?php echo $hesklang['display']; ?></b>: &nbsp; </td>
<td class="borderTop"><div class="col-md-2" style="padding-left: 0px; padding-right: 0px"><input class="form-control" type="text" name="limit" value="<?php echo $maxresults; ?>" size="4" /></div><div class="col-md-10" style="line-height: 40px"><?php echo $hesklang['results_page']; ?></div></td>
</tr>
</table>
<p><input class="btn btn-default" type="submit" value="<?php echo $hesklang['find_ticket']; ?>" />
<input type="hidden" name="more2" value="<?php echo $more2 ? 1 : 0 ; ?>" /><a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow2');Javascript:hesk_toggleLayerDisplay('topSubmit2');document.findby.more2.value='0';"><?php echo $hesklang['lopt']; ?></a></p>
<div class="panel panel-default">
<div class="panel-heading">
<h4><?php echo $hesklang['find_ticket_by']; ?></h4>
</div>
<div class="panel-body">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<form class="form-inline" action="find_tickets.php" method="get" name="findby" id="findby">
<table class="table" style="width: auto" border="0" cellpadding="3" cellspacing="0">
<tr>
<td class="text-left" style="border-top: 0px">
<b style="color: #000"><?php echo $hesklang['s_for']; ?></b><br />
<input class="form-control" type="text" name="q" size="30" <?php if (isset($q)) {echo 'value="'.$q.'"';} ?> />
</td>
<td class="text-left" style="border-top: 0px">
<b style="color: #000"><?php echo $hesklang['s_in']; ?></b><br />
<select class="form-control" name="what">
<option value="trackid" <?php if ($what=='trackid') {echo 'selected="selected"';} ?> ><?php echo $hesklang['trackID']; ?></option>
<?php
if ($hesk_settings['sequential'])
{
?>
<option value="seqid" <?php if ($what=='seqid') {echo 'selected="selected"';} ?> ><?php echo $hesklang['seqid']; ?></option>
<?php
}
?>
<option value="name" <?php if ($what=='name') {echo 'selected="selected"';} ?> ><?php echo $hesklang['name']; ?></option>
<option value="email" <?php if ($what=='email') {echo 'selected="selected"';} ?> ><?php echo $hesklang['email']; ?></option>
<option value="subject" <?php if ($what=='subject') {echo 'selected="selected"';} ?> ><?php echo $hesklang['subject']; ?></option>
<option value="message" <?php if ($what=='message') {echo 'selected="selected"';} ?> ><?php echo $hesklang['message']; ?></option>
<?php
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
$selected = ($what == $k) ? 'selected="selected"' : '';
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
$v['name'] = (strlen($v['name']) > 30) ? substr($v['name'],0,30) . '...' : $v['name'];
echo '<option value="'.$k.'" '.$selected.'>'.$v['name'].'</option>';
}
}
?>
<option value="notes" <?php if ($what=='notes') {echo 'selected="selected"';} ?> ><?php echo $hesklang['notes']; ?></option>
</select>
</td>
</tr>
</table>
<div id="topSubmit2" style="display:<?php echo $more2 ? 'none' : 'block' ; ?>">
&nbsp;<br />
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['find_ticket']; ?>" />
<a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow2');Javascript:hesk_toggleLayerDisplay('topSubmit2');document.findby.more2.value='1';"><?php echo $hesklang['mopt']; ?></a>
<br />&nbsp;<br />
</div>
<div id="divShow2" style="display:<?php echo $more2 ? 'block' : 'none' ; ?>">
&nbsp;<br />
<table class="table table-striped" border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td class="alignMiddle" width="20%"><b><?php echo $hesklang['category']; ?></b>: &nbsp; </td>
<td class="alignMiddle" width="80%">
<select class="form-control" name="category">
<option value="0" ><?php echo $hesklang['any_cat']; ?></option>
<?php echo $category_options; ?>
</select>
</td>
</tr>
<tr>
<td class="alignMiddle"><b><?php echo $hesklang['date']; ?></b>: &nbsp; </td>
<td class="alignMiddle">
<div class="col-md-3" style="padding-left: 0px"><input class="form-control tcal" type="text" name="dt" id="dt" size="10" <?php if ($date_input) {echo 'value="'.$date_input.'"';} ?> /></div>
</td>
</tr>
<tr>
<td class="alignTop"><b><?php echo $hesklang['s_incl']; ?></b>: &nbsp; </td>
<td>
<label><input type="checkbox" name="s_my" value="1" <?php if ($s_my[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_my']; ?></label>
<?php
if ($can_view_ass_others)
{
?>
<br />
<label><input type="checkbox" name="s_ot" value="1" <?php if ($s_ot[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_ot']; ?></label>
<?php
}
if ($can_view_unassigned)
{
?>
<br />
<label><input type="checkbox" name="s_un" value="1" <?php if ($s_un[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_un']; ?></label>
<?php
}
?>
<br />
<label><input type="checkbox" name="archive" value="1" <?php if ($archive[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['disp_only_archived']; ?></label>
</td>
</tr>
<tr>
<td><b><?php echo $hesklang['display']; ?></b>: &nbsp; </td>
<td><div class="col-md-2 text-right" style="padding-left: 0px; padding-right: 0px;"><input class="form-control" type="text" name="limit" value="<?php echo $maxresults; ?>" size="4" /></div><div class="col-md-10" style="line-height: 40px"><?php echo $hesklang['results_page']; ?></div></td>
</tr>
</table>
<p><input class="btn btn-default" type="submit" value="<?php echo $hesklang['find_ticket']; ?>" />
<input type="hidden" name="more2" value="<?php echo $more2 ? 1 : 0 ; ?>" /><a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow2');Javascript:hesk_toggleLayerDisplay('topSubmit2');document.findby.more2.value='0';"><?php echo $hesklang['lopt']; ?></a></p>
</div>
</form>
</td>
</tr>
</table>
</div>
</div>
</form>
</td>
</tr>
</table>
<!-- ** END SEARCH TICKETS FORM ** -->

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -31,7 +31,7 @@
* a license please visit the page below:
* https://www.hesk.com/buy.php
*******************************************************************************/
define('MINIMUM_REFRESH_THRESHOLD_IN_SECONDS', 1);
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
@ -61,6 +61,8 @@ $mysql_time = hesk_dbTime();
$result = hesk_dbQuery($sql_count);
$total = hesk_dbResult($result);
//-- Precondition: The panel has already been created, and there is NO open <div class="panel-body"> tag yet.
echo '<div class="panel-body">';
if ($total > 0)
{
@ -112,36 +114,36 @@ if ($total > 0)
$prev_page = ($page - 1 <= 0) ? 0 : $page - 1;
$next_page = ($page + 1 > $pages) ? 0 : $page + 1;
if ($pages > 1)
$autorefreshInSeconds = $_SESSION['autorefresh']/1000;
$autorefresh = '';
if ($autorefreshInSeconds >= MINIMUM_REFRESH_THRESHOLD_IN_SECONDS) {
$autorefresh = ' | '.$hesklang['autorefresh'].' '.$autorefreshInSeconds.' '.$hesklang['abbr']['second'];
?>
<script>
(function(){
setTimeout("location.reload(true);",<?php echo $_SESSION['autorefresh']; ?>);
})();
</script>
<?php }
echo sprintf($hesklang['tickets_on_pages'],$total,$pages).$autorefresh.' <br />';
if ($pages > 1)
{
echo '
<div>
<div align="center" style="float: left">
'.sprintf($hesklang['tickets_on_pages'],$total,$pages).' '.$hesklang['jump_page'].' <select name="myHpage" id="myHpage">
</div>
<div align="right" style="text-align: right">
<a href="new_ticket.php">'.$hesklang['nti'].'</a>
</div>
</div>';
for ($i=1;$i<=$pages;$i++)
{
$tmp = ($page == $i) ? ' selected="selected"' : '';
echo '<option value="'.$i.'"'.$tmp.'>'.$i.'</option>';
}
echo'</select> <input type="button" value="'.$hesklang['go'].'" onclick="javascript:window.location=\''.$href.'?'.$query.'\'+document.getElementById(\'myHpage\').value" class="btn btn-default btn-xs" /><br />';
/* List pages */
echo '<div class="row">
<div class="col-md-6 col-sm-12 text-right nu-rtlFloatLeft">
<ul class="pagination" style="margin: 0">';
if ($pages > 7)
{
if ($page > 2)
{
echo '<a href="'.$href.'?'.$query.'1"><b>&laquo;</b></a> &nbsp; ';
echo '<li><a href="'.$href.'?'.$query.'1">&laquo;</a></li>'; // <<
}
if ($prev_page)
{
echo '<a href="'.$href.'?'.$query.$prev_page.'"><b>&lsaquo;</b></a> &nbsp; ';
echo '<li><a href="'.$href.'?'.$query.$prev_page.'">&lsaquo;</a></li>'; // <
}
}
@ -151,11 +153,11 @@ if ($total > 0)
{
if ($i == $page)
{
echo ' <b>'.$i.'</b> ';
echo '<li class="active"><a href="#">'.$i.'</a></li> ';
}
else
{
echo ' <a href="'.$href.'?'.$query.$i.'">'.$i.'</a> ';
echo '<li><a href="'.$href.'?'.$query.$i.'">'.$i.'</a></li>';
}
}
}
@ -164,29 +166,29 @@ if ($total > 0)
{
if ($next_page)
{
echo ' &nbsp; <a href="'.$href.'?'.$query.$next_page.'"><b>&rsaquo;</b></a> ';
echo '<li><a href="'.$href.'?'.$query.$next_page.'">&rsaquo;</a></li>'; // >
}
if ($page < ($pages - 1))
{
echo ' &nbsp; <a href="'.$href.'?'.$query.$pages.'"><b>&raquo;</b></a>';
echo '<li><a href="'.$href.'?'.$query.$pages.'">&raquo;</a></li>'; // >>
}
}
echo ' </ul>
</div>
<div class="col-md-6 col-sm-12 text-left">
<div class="form-inline">'.$hesklang['jump_page'].'
<select class="form-control" name="myHpage" id="myHpage" onchange="javascript:window.location=\''.$href.'?'.$query.'\'+document.getElementById(\'myHpage\').value">';
for ($i=1;$i<=$pages;$i++)
{
$tmp = ($page == $i) ? ' selected="selected"' : '';
echo '<option value="'.$i.'"'.$tmp.'>'.$i.'</option>';
}
echo'</select>
</div>
</div>
</div>';
echo '</p>';
} // end PAGES > 1
else
{
echo '
<div>
<div align="center" style="float: left">
'.sprintf($hesklang['tickets_on_pages'],$total,$pages).'
</div>
<div align="right" style="text-align: right">
<a href="new_ticket.php">'.$hesklang['nti'].'</a>
</div>
</div>';
}
/* We have the full SQL query now, get tickets */
@ -250,7 +252,6 @@ if ($total > 0)
}
$i = 0;
$checkall = '<input type="checkbox" name="checkall" value="2" onclick="hesk_changeAll()" />';
$group_tmp = '';
$is_table = 0;
@ -270,7 +271,7 @@ if ($total > 0)
$first_line = '(' . $hesklang['unas'] . ')'." \n\n";
if ($ticket['owner'] == $_SESSION['id'])
{
$owner = '<span class="assignedyou" title="'.$hesklang['tasy2'].'"><span class="glyphicon glyphicon-user"></span></span> ';
$owner = '<span class="assignedyou" title="'.$hesklang['tasy2'].'"><span class="glyphicon glyphicon-user" data-toggle="tooltip" data-placement="top" title="'.$hesklang['tasy2'].'"></span></span> ';
$first_line = $hesklang['tasy2'] . " \n\n";
}
elseif ($ticket['owner'])
@ -279,14 +280,14 @@ if ($total > 0)
{
$admins[$ticket['owner']] = $hesklang['e_udel'];
}
$owner = '<span class="assignedother" title="'.$hesklang['taso3'] . ' ' . $admins[$ticket['owner']] .'"><span class="glyphicon glyphicon-user"></span></span> ';
$owner = '<span class="assignedother" title="'.$hesklang['taso3'] . ' ' . $admins[$ticket['owner']] .'"><span class="glyphicon glyphicon-user" data-toggle="tooltip" data-placement="top" title="'.$hesklang['taso3'].' '.$admins[$ticket['owner']].'"></span></span> ';
$first_line = $hesklang['taso3'] . ' ' . $admins[$ticket['owner']] . " \n\n";
}
$tagged = '';
if ($ticket['archive'])
{
$tagged = '<i class="fa fa-tag"></i> ';
$tagged = '<i class="fa fa-tag" data-toggle="tooltip" data-placement="top" title="'.$hesklang['archived2'].'"></i> ';
}
$statusName = hesk_dbFetchAssoc(hesk_dbQuery("SELECT `ShortNameContentKey`, `TextColor` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE ID = ".$ticket['status']));
@ -303,7 +304,7 @@ if ($total > 0)
$color = 'warning';
break;
case 2:
$ticket['priority']='<span style="color: green; font-size:1.3em" class="glyphicon glyphicon-flag" data-toggle="tooltip" data-placement="top" title="'.$hesklang['medium '].'"></span>';
$ticket['priority']='<span style="color: green; font-size:1.3em" class="glyphicon glyphicon-flag" data-toggle="tooltip" data-placement="top" title="'.$hesklang['medium'].'"></span>';
break;
default:
$ticket['priority']='<span style="color: blue; font-size:1.3em" class="glyphicon glyphicon-flag" data-toggle="tooltip" data-placement="top" title="'.$hesklang['low'].'"></span>';
@ -323,17 +324,32 @@ if ($total > 0)
$ticket['archive'] = !($ticket['archive']) ? $hesklang['no'] : $hesklang['yes'];
$ticket['message'] = $first_line . substr(strip_tags($ticket['message']),0,200).'...';
$ownerColumn = $ticket['owner'] != 0 ? $admins[$ticket['owner']] : '('.$hesklang['unas'].')';
$customFieldsHtml = '';
for ($i = 1; $i <= 20; $i++) {
if ($hesk_settings['custom_fields']['custom'.$i]['use']) {
$display = 'display: none';
if ((isset($_GET['sort']) && $_GET['sort'] == 'custom'.$i) || (isset($_GET['what']) && $_GET['what'] == 'custom'.$i)) {
$display = '';
}
$customFieldsHtml .= '<td style="'.$display.'" class="column_columnCustom'.$i.'">'.$ticket['custom'.$i].'</td>';
}
}
echo <<<EOC
<tr class="$color" title="$ticket[message]">
<td><input type="checkbox" name="id[]" value="$ticket[id]" />&nbsp;</td>
<td><a href="admin_ticket.php?track=$ticket[trackid]&amp;Refresh=$random">$ticket[trackid]</a></td>
<td>$ticket[lastchange]</td>
<td>$ticket[name]</td>
<td>$tagged$owner<a href="admin_ticket.php?track=$ticket[trackid]&amp;Refresh=$random">$ticket[subject]</a></td>
<td>$ticket[status]&nbsp;</td>
<td>$ticket[repliername]</td>
<td>$ticket[priority]&nbsp;</td>
<tr class="$color" id="$ticket[id]" title="$ticket[message]">
<td><input type="checkbox" id="check$ticket[id]" name="id[]" value="$ticket[id]" />&nbsp;</td>
<td class="column_trackID"><a href="admin_ticket.php?track=$ticket[trackid]&amp;Refresh=$random">$ticket[trackid]</a></td>
<td class="column_last_update">$ticket[lastchange]</td>
<td class="column_name">$ticket[name]</td>
<td class="column_subject">$tagged$owner<a href="admin_ticket.php?track=$ticket[trackid]&amp;Refresh=$random">$ticket[subject]</a></td>
<td class="column_status">$ticket[status]&nbsp;</td>
<td class="column_lastreplier">$ticket[repliername]</td>
<td class="column_priority">$ticket[priority]</td>
<td class="column_owner" style="display: none">$ownerColumn</td>
$customFieldsHtml
</tr>
EOC;
@ -343,32 +359,99 @@ EOC;
</div>
&nbsp;<br />
<?php
$columnOneCheckboxes = array();
$columnTwoCheckboxes = array();
$columnThreeCheckboxes = array();
$currentColumn = 3;
for ($i = 1; $i <= 20; $i++) {
if ($hesk_settings['custom_fields']['custom'.$i]['use']) {
if ($currentColumn == 1) {
array_push($columnOneCheckboxes, $i);
$currentColumn = 2;
} elseif ($currentColumn == 2) {
array_push($columnTwoCheckboxes, $i);
$currentColumn = 3;
} else {
array_push($columnThreeCheckboxes, $i);
$currentColumn = 1;
}
}
}
?>
<table border="0" width="100%">
<tr>
<td width="50%" style="text-align:left;vertical-align:top">
<?php
if (hesk_checkPermission('can_add_archive',0))
{
?>
<i class="fa fa-tag"></i> <?php echo $hesklang['archived2']; ?>&nbsp;&nbsp;
<?php
}
?>
<span class="assignedyou"><span class="glyphicon glyphicon-user"></span></span> <?php echo $hesklang['tasy2']; ?>&nbsp;&nbsp;
<?php
if (hesk_checkPermission('can_view_ass_others',0))
{
?>
<span class="assignedother"><span class="glyphicon glyphicon-user"></span></span> <?php echo $hesklang['taso2']; ?>
<?php
}
?>
&nbsp;
<td width="50%" style="vertical-align:top">
<h6 id="showFiltersText" style="font-weight: bold"><a href="javascript:void(0)" onclick="toggleFilterCheckboxes(true)"><?php echo $hesklang['show_filters']; ?></a></h6>
<h6 id="hideFiltersText" style="font-weight: bold; display: none"><a href="javascript:void(0)" onclick="toggleFilterCheckboxes(false)"><?php echo $hesklang['hide_filters']; ?></a></h6>
<div id="filterCheckboxes" style="display: none" class="row">
<div class="col-md-4 col-sm-12">
<div class="checkbox">
<input type="checkbox" onclick="toggleColumn('column_trackID')" checked> <?php echo $hesklang['trackID']; ?>
</div><br>
<div class="checkbox">
<input type="checkbox" onclick="toggleColumn('column_subject')" checked> <?php echo $hesklang['subject']; ?>
</div><br>
<div class="checkbox">
<input type="checkbox" onclick="toggleColumn('column_priority')" checked> <?php echo $hesklang['priority']; ?>
</div>
<?php
foreach ($columnOneCheckboxes as $i) {
$checked = '';
if ((isset($_GET['sort']) && $_GET['sort'] == 'custom'.$i) || (isset($_GET['what']) && $_GET['what'] == 'custom'.$i)) {
$checked = 'checked';
}
echo '<br><div class="checkbox">
<input type="checkbox" onclick="toggleColumn(\'column_columnCustom'.$i.'\')" '.$checked.'>
'.$hesk_settings['custom_fields']['custom'.$i]['name'].'</div>';
}
?>
</div>
<div class="col-md-4 col-sm-12">
<div class="checkbox">
<input type="checkbox" onclick="toggleColumn('column_last_update')" checked> <?php echo $hesklang['last_update']; ?>
</div><br>
<div class="checkbox">
<input type="checkbox" onclick="toggleColumn('column_status')" checked> <?php echo $hesklang['status']; ?>
</div><br>
<div class="checkbox">
<input type="checkbox" onclick="toggleColumn('column_owner')"> <?php echo $hesklang['owner']; ?>
</div>
<?php
foreach ($columnTwoCheckboxes as $i) {
$checked = '';
if ((isset($_GET['sort']) && $_GET['sort'] == 'custom'.$i) || (isset($_GET['what']) && $_GET['what'] == 'custom'.$i)) {
$checked = 'checked';
}
echo '<br><div class="checkbox">
<input type="checkbox" onclick="toggleColumn(\'column_columnCustom'.$i.'\')" '.$checked.'>
'.$hesk_settings['custom_fields']['custom'.$i]['name'].'</div>';
}
?>
</div>
<div class="col-md-4 col-sm-12">
<div class="checkbox">
<input type="checkbox" onclick="toggleColumn('column_name')" checked> <?php echo $hesklang['name']; ?>
</div><br>
<div class="checkbox">
<input type="checkbox" onclick="toggleColumn('column_lastreplier')" checked> <?php echo $hesklang['last_replier']; ?>
</div>
<?php
foreach ($columnThreeCheckboxes as $i) {
$checked = '';
if ((isset($_GET['sort']) && $_GET['sort'] == 'custom'.$i) || (isset($_GET['what']) && $_GET['what'] == 'custom'.$i)) {
$checked = 'checked';
}
echo '<br><div class="checkbox">
<input type="checkbox" onclick="toggleColumn(\'column_columnCustom'.$i.'\')" '.$checked.'>
'.$hesk_settings['custom_fields']['custom'.$i]['name'].'</div>';
}
?>
</div>
</div>
</td>
<td width="50%" style="text-align:right;vertical-align:top">
<td width="50%" class="text-right" style="vertical-align:top">
<select class="form-control" name="a">
<option value="close" selected="selected"><?php echo $hesklang['close_selected']; ?></option>
<?php
@ -412,6 +495,18 @@ EOC;
else
{
echo '<div class="row"><div class="col-sm-12">';
$autorefreshInSeconds = $_SESSION['autorefresh']/1000;
if ($autorefreshInSeconds >= MINIMUM_REFRESH_THRESHOLD_IN_SECONDS) {
echo $hesklang['autorefresh'].' '.$autorefreshInSeconds.' '.$hesklang['abbr']['second'];
?>
<script>
(function(){
setTimeout("location.reload(true);",<?php echo $_SESSION['autorefresh']; ?>);
})();
</script>
<?php
}
if (isset($is_search) || $href == 'find_tickets.php')
{
@ -424,24 +519,39 @@ else
echo '</div></div>';
}
echo '</div>
</div>';
function hesk_print_list_head()
{
global $href, $query, $sort_possible, $hesklang;
global $href, $query, $sort_possible, $hesklang, $hesk_settings;
?>
<div align="center">
<table class="table table-hover">
<div class="table-responsive">
<table id="ticket-table" class="table table-hover">
<thead>
<tr>
<th><input type="checkbox" name="checkall" value="2" onclick="hesk_changeAll(this)" /></th>
<th><a href="<?php echo $href . '?' . $query . $sort_possible['trackid'] . '&amp;sort='; ?>trackid"><?php echo $hesklang['trackID']; ?></a></th>
<th><a href="<?php echo $href . '?' . $query . $sort_possible['lastchange'] . '&amp;sort='; ?>lastchange"><?php echo $hesklang['last_update']; ?></a></th>
<th><a href="<?php echo $href . '?' . $query . $sort_possible['name'] . '&amp;sort='; ?>name"><?php echo $hesklang['name']; ?></a></th>
<th><a href="<?php echo $href . '?' . $query . $sort_possible['subject'] . '&amp;sort='; ?>subject"><?php echo $hesklang['subject']; ?></a></th>
<th><a href="<?php echo $href . '?' . $query . $sort_possible['status'] . '&amp;sort='; ?>status"><?php echo $hesklang['status']; ?></a></th>
<th><a href="<?php echo $href . '?' . $query . $sort_possible['lastreplier'] . '&amp;sort='; ?>lastreplier"><?php echo $hesklang['last_replier']; ?></a></th>
<th><a href="<?php echo $href . '?' . $query . $sort_possible['priority'] . '&amp;sort='; ?>priority"><i class="fa fa-sort-<?php echo (($sort_possible['priority']) ? 'asc' : 'desc'); ?>"></i></a></th>
<th><input type="checkbox" id="checkall" name="checkall" value="2" onclick="hesk_changeAll(this)" /></th>
<th class="column_trackID"><a href="<?php echo $href . '?' . $query . $sort_possible['trackid'] . '&amp;sort='; ?>trackid"><?php echo $hesklang['trackID']; ?></a></th>
<th class="column_last_update"><a href="<?php echo $href . '?' . $query . $sort_possible['lastchange'] . '&amp;sort='; ?>lastchange"><?php echo $hesklang['last_update']; ?></a></th>
<th class="column_name"><a href="<?php echo $href . '?' . $query . $sort_possible['name'] . '&amp;sort='; ?>name"><?php echo $hesklang['name']; ?></a></th>
<th class="column_subject"><a href="<?php echo $href . '?' . $query . $sort_possible['subject'] . '&amp;sort='; ?>subject"><?php echo $hesklang['subject']; ?></a></th>
<th class="column_status"><a href="<?php echo $href . '?' . $query . $sort_possible['status'] . '&amp;sort='; ?>status"><?php echo $hesklang['status']; ?></a></th>
<th class="column_lastreplier"><a href="<?php echo $href . '?' . $query . $sort_possible['lastreplier'] . '&amp;sort='; ?>lastreplier"><?php echo $hesklang['last_replier']; ?></a></th>
<th class="column_priority"><a href="<?php echo $href . '?' . $query . $sort_possible['priority'] . '&amp;sort='; ?>priority"><i class="fa fa-sort-<?php echo (($sort_possible['priority']) ? 'asc' : 'desc'); ?>"></i></a></th>
<!-- All other fields, hidden by default. -->
<th class="column_owner" style="display: none"><a href="<?php echo $href . '?' . $query . $sort_possible['priority'] . '&amp;sort='; ?>owner"><?php echo $hesklang['owner']; ?></a></th>
<?php
for ($i = 1; $i <= 20; $i++) {
if ($hesk_settings['custom_fields']['custom'.$i]['use']) {
$display = 'display: none';
if ((isset($_GET['sort']) && $_GET['sort'] == 'custom'.$i) || (isset($_GET['what']) && $_GET['what'] == 'custom'.$i)) {
$display = '';
}
echo '<th style="'.$display.'" class="column_columnCustom'.$i.'"><a href="'.$href . '?' . $query . $sort_possible['priority'] . '&amp;sort=custom'.$i.'">'.$hesk_settings['custom_fields']['custom'.$i]['name'].'</a></th>';
}
}
?>
</tr>
</thead>
<?php

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -66,7 +66,7 @@ exit();
function print_add_ticket()
{
global $hesk_settings, $hesklang;
global $hesk_settings, $hesklang, $modsForHesk_settings;
// Auto-focus first empty or error field
define('AUTOFOCUS', true);
@ -101,29 +101,16 @@ function print_add_ticket()
</ol>
<!-- START MAIN LAYOUT -->
<div class="enclosingDashboard">
<div class="row">
<div align="left" class="col-md-4">
<div class="moreToLeft">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['quick_help']; ?></a></li>
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<div class="row">
<div class="col-md-6 col-xs-12">
<label class="control-label" style="margin-top:8px;"><?php echo $hesklang['changeLanguage']; ?></label>
</div>
<div class="col-md-6 col-xs-12">
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
</div>
</div>
<p><?php echo $hesklang['quick_help_submit_ticket']; ?></p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
<div class="panel-body">
<p><?php echo $hesklang['quick_help_submit_ticket']; ?></p>
</div>
</div>
</div>
<div class="col-md-7">
<div class="col-md-8">
<?php
// This will handle error, success and notice messages
hesk_handle_messages();
@ -235,8 +222,14 @@ function print_add_ticket()
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'] && $v['place']==0)
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
$v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
if ($v['type'] == 'checkbox')
@ -354,6 +347,57 @@ function print_add_ticket()
</div>';
break;
case 'multiselect':
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
echo '<div class="form-group"><label for="'.$v['name'].'[]" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
<div class="col-sm-9"><select class="form-control" id="'.$v['name'].'" name="'.$k.'[]" '.$cls.' multiple>';
$options = explode('#HESK#',$v['value']);
foreach ($options as $option)
{
if (strlen($k_value) == 0 || $k_value == $option)
{
$k_value = $option;
$selected = 'selected="selected"';
}
else
{
$selected = '';
}
echo '<option '.$selected.'>'.$option.'</option>';
}
echo '</select>
<div class="btn-group" role="group">
<button type="button" class="btn btn-default" onclick="selectAll(\''.$v['name'].'\')">Select All</button>
<button type="button" class="btn btn-default" onclick="deselectAll(\''.$v['name'].'\')">Deselect All</button>
</div>
</div></div>';
break;
case 'date':
if (strlen($k_value) != 0)
{
$v['value'] = $k_value;
}
$cls = in_array($k,$_SESSION['iserror']) ? ' isError ' : '';
echo '
<div class="form-group">
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
<div class="col-sm-9">
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.$v['name'].'" id="'.$v['name'].'" name="'.$k.'" size="40"
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
<span class="help-block">'.$hesklang['date_format'].'</span>
</div>
</div>';
break;
/* Default text input */
default:
if (strlen($k_value) != 0)
@ -414,12 +458,18 @@ function print_add_ticket()
<!-- START CUSTOM AFTER -->
<?php
/* custom fields BEFORE comments */
/* custom fields AFTER comments */
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'] && $v['place'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
$v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
if ($v['type'] == 'checkbox')
@ -537,6 +587,56 @@ function print_add_ticket()
</div>';
break;
case 'multiselect':
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
echo '<div class="form-group"><label for="'.$v['name'].'[]" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
<div class="col-sm-9"><select class="form-control" id="'.$v['name'].'" name="'.$k.'[]" '.$cls.' multiple>';
$options = explode('#HESK#',$v['value']);
foreach ($options as $option)
{
if (strlen($k_value) == 0 || $k_value == $option)
{
$k_value = $option;
$selected = 'selected="selected"';
}
else
{
$selected = '';
}
echo '<option '.$selected.'>'.$option.'</option>';
}
echo '</select>
<div class="btn-group" role="group">
<button type="button" class="btn btn-default" onclick="selectAll(\''.$v['name'].'\')">Select All</button>
<button type="button" class="btn btn-default" onclick="deselectAll(\''.$v['name'].'\')">Deselect All</button>
</div></div></div>';
break;
case 'date':
if (strlen($k_value) != 0)
{
$v['value'] = $k_value;
}
$cls = in_array($k,$_SESSION['iserror']) ? ' isError ' : '';
echo '
<div class="form-group">
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
<div class="col-sm-9">
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.$v['name'].'" id="'.$v['name'].'" name="'.$k.'" size="40"
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
<span class="help-block">'.$hesklang['date_format'].'</span>
</div>
</div>';
break;
/* Default text input */
default:
if (strlen($k_value) != 0)
@ -727,43 +827,39 @@ function print_start()
<li><a href="<?php echo $hesk_settings['site_url']; ?>"><?php echo $hesk_settings['site_title']; ?></a></li>
<li class="active"><?php echo $hesk_settings['hesk_title']; ?></li>
</ol>
<div class="enclosingDashboard">
<div class="row">
<div align="left" class="col-md-4">
<div class="moreToLeft">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['view_ticket']; ?></a></li>
</ul>
<div class="summaryList">
<form role="form" class="viewTicketSidebar" action="ticket.php" method="get" name="form2">
<div class="form-group">
<br/>
<label for="ticketID"><?php echo $hesklang['ticket_trackID']; ?>:</label>
<input type="text" class="form-control" name="track" id="ticketID" maxlength="20" size="35" value="" placeholder="<?php echo $hesklang['ticket_trackID']; ?>">
</div>
<?php
$tmp = '';
if ($hesk_settings['email_view_ticket'])
{
$tmp = 'document.form1.email.value=document.form2.e.value;';
?>
<div class="form-group">
<label for="emailAddress"><?php echo $hesklang['email']; ?>:</label>
<input type="text" class="form-control" name="e" id="emailAddress" size="35" value="<?php echo $my_email; ?>" placeholder="<?php echo $hesklang['email']; ?>"/>
</div>
<div class="checkbox">
<input type="checkbox" name="r" value="Y" <?php echo $do_remember; ?> /> <?php echo $hesklang['rem_email']; ?></label>
</div>
<?php
}
?>
<input type="submit" value="<?php echo $hesklang['view_ticket']; ?>" class="btn btn-default" /><input type="hidden" name="Refresh" value="<?php echo rand(10000,99999); ?>"><input type="hidden" name="f" value="1">
</form>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading"><?php echo $hesklang['view_ticket']; ?></div>
<div class="panel-body">
<form role="form" class="viewTicketSidebar" action="ticket.php" method="get" name="form2">
<div class="form-group">
<br/>
<label for="ticketID"><?php echo $hesklang['ticket_trackID']; ?>:</label>
<input type="text" class="form-control" name="track" id="ticketID" maxlength="20" size="35" value="" placeholder="<?php echo $hesklang['ticket_trackID']; ?>">
</div>
<?php
$tmp = '';
if ($hesk_settings['email_view_ticket'])
{
$tmp = 'document.form1.email.value=document.form2.e.value;';
?>
<div class="form-group">
<label for="emailAddress"><?php echo $hesklang['email']; ?>:</label>
<input type="text" class="form-control" name="e" id="emailAddress" size="35" value="<?php echo $my_email; ?>" placeholder="<?php echo $hesklang['email']; ?>"/>
</div>
<div class="checkbox">
<input type="checkbox" name="r" value="Y" <?php echo $do_remember; ?> /> <?php echo $hesklang['rem_email']; ?></label>
</div>
<?php
}
?>
<input type="submit" value="<?php echo $hesklang['view_ticket']; ?>" class="btn btn-default" /><input type="hidden" name="Refresh" value="<?php echo rand(10000,99999); ?>"><input type="hidden" name="f" value="1">
</form>
</div>
</div>
</div>
<div align="left" class="col-md-7">
<div class="col-md-8">
<?php
// Print small search box
if ($hesk_settings['kb_enable'])

@ -0,0 +1,51 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
hesk_dbConnect();
//-- Need to do this since we are no longer restricted on IDs and we want an INT for proper INNER JOINs
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` ADD COLUMN `status_int` INT NOT NULL DEFAULT 0 AFTER `status`");
$ticketsRS = hesk_dbQuery("SELECT `id`, `status` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets`");
while ($currentResult = $ticketsRS->fetch_assoc())
{
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `status_int` = ".$currentResult['status']." WHERE `id` = ".$currentResult['id']);
}
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` DROP COLUMN `status`");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` CHANGE COLUMN `status_int` `status` INT NOT NULL");
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (
`ID` INT NOT NULL,
`ShortNameContentKey` TEXT NOT NULL,
`TicketViewContentKey` TEXT NOT NULL,
`TextColor` TEXT NOT NULL,
`IsNewTicketStatus` BIT NOT NULL DEFAULT 0,
`IsClosed` BIT NOT NULL DEFAULT 0,
`IsClosedByClient` BIT NOT NULL DEFAULT 0,
`IsCustomerReplyStatus` BIT NOT NULL DEFAULT 0,
`IsStaffClosedOption` BIT NOT NULL DEFAULT 0,
`IsStaffReopenedStatus` BIT NOT NULL DEFAULT 0,
`IsDefaultStaffReplyStatus` BIT NOT NULL DEFAULT 0,
`LockedTicketStatus` BIT NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`))");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (0, 'open', 'open', '#FF0000', 1, 0, 0, 0, 0, 0, 0, 0);");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (1, 'wait_reply', 'wait_staff_reply', '#FF9933', 0, 0, 0, 1, 0, 1, 0, 0);");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (2, 'replied', 'wait_cust_reply', '#0000FF', 0, 0, 0, 0, 0, 0, 1, 0);");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (3, 'resolved', 'resolved', '#008000', 0, 1, 1, 0, 1, 0, 0, 1);");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (4, 'in_progress', 'in_progress', '#000000', 0, 0, 0, 0, 0, 0, 0, 0);");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (5, 'on_hold', 'on_hold', '#000000', 0, 0, 0, 0, 0, 0, 0, 0);");
header('Location: updateTo1-4-1.php');

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -54,8 +54,8 @@ hesk_iHeader();
<a class="btn btn-default btn-lg" href="update.php?" role="button">Upgrade</a>
<p><br/>Upgrade existing HESK installation to version <?php echo HESK_NEW_VERSION; ?></p>
<br/><br/>
<a class="btn btn-default btn-lg" href="updateNuMods.php?update=0" role="button">Install / Upgrade NuMods</a>
<p><br/>Install or upgrade existing NuMods installation to version <?php echo NUMODS_NEW_VERSION; ?></p>
<a class="btn btn-default btn-lg" href="updateModsForHesk.php" role="button">Install / Upgrade Mods for HESK</a>
<p><br/>Install or upgrade existing Mods for HESK installation to version <?php echo MODS_FOR_HESK_NEW_VERSION; ?></p>
</div>
<?php

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -156,19 +156,21 @@ function hesk_iFinish()
?>
<div class="row">
<div class="col-md-4">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;">Summary</a></li>
</ul>
<div class="summaryList">
<p>Congratulations, you have successfully completed HESK database setup!</p>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<p>Summary</p>
</div>
<div class="panel-body">
<p>Congratulations, you have successfully completed HESK database setup!</p>
</div>
</div>
</div>
<div class="col-md-7">
<div class="col-md-8">
<div class="alert alert-success"><strong>Success!</strong> HESK Successfully installed</div>
<div class="h3">Next Steps:<br/><br/></div>
<ol>
<li><span style="color:#ff0000">Don't forget to run the <a href="<?php echo HESK_PATH . 'install/updateNuHesk.php?update=0'; ?>">NuHesk Installation</a>!</li>
<li><span style="color:#ff0000">Don't forget to run the <a href="<?php echo HESK_PATH . 'install/updateModsForHesk.php'; ?>">Mods for HESK Installation</a>!</li>
<li>Remember your login details:<br />
<pre style="font-size: 1.17em">

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* 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.5.3');
define('NUMODS_NEW_VERSION','1.2.0');
define('HESK_NEW_VERSION','2.5.5');
define('MODS_FOR_HESK_NEW_VERSION','1.6.0');
// Other required files and settings
define('INSTALL',1);
@ -342,96 +342,92 @@ function hesk_iDatabase($problem=0)
<br />
<div class="col-md-4">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;">Summary</a></li>
</ul>
<div class="summaryList">
<?php
if ($problem == 1)
{
echo '<br /><br />Double-check all the information below. Contact your hosting company for the correct information to use!<br /><br /><b>MySQL said:</b> '.$mysql_log.'</p>', 'Database connection failed';
}
elseif ($problem == 2)
{
echo '<b>Database tables already exist!</b><br /><br />
HESK database tables with <b>'.$hesk_settings['db_pfix'].'</b> prefix already exist in this database!<br /><br />
To upgrade an existing HESK installation select <a href="index.php">Update existing install</a> instead.<br /><br />
To install a new copy of HESK in use a unique table prefix.';
}
elseif ($problem == 3)
{
echo '<b>Old database tables not found!</b><br /><br />
HESK database tables have not been found in this database!<br /><br />
To install HESK use the <a href="index.php">New install</a> option instead.';
}
elseif ($problem == 4)
{
echo '<b>Version '.HESK_NEW_VERSION.' tables already exist!</b><br /><br />
Your database seems to be compatible with HESK version '.HESK_NEW_VERSION.'<br /><br />
To install a new copy of HESK use the <a href="index.php">New install</a> option instead.';
}
else
{
echo '<p style="padding: 10px;">To complete setup HESK needs to connect to your database. You can get this information from your hosting control panel.</p>';
}
?>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<p>Summary</p>
</div>
<div class="panel-body">
<?php
if ($problem == 1)
{
echo '<br /><br />Double-check all the information below. Contact your hosting company for the correct information to use!<br /><br /><b>MySQL said:</b> '.$mysql_log.'</p>', 'Database connection failed';
}
elseif ($problem == 2)
{
echo '<b>Database tables already exist!</b><br /><br />
HESK database tables with <b>'.$hesk_settings['db_pfix'].'</b> prefix already exist in this database!<br /><br />
To upgrade an existing HESK installation select <a href="index.php">Update existing install</a> instead.<br /><br />
To install a new copy of HESK in use a unique table prefix.';
}
elseif ($problem == 3)
{
echo '<b>Old database tables not found!</b><br /><br />
HESK database tables have not been found in this database!<br /><br />
To install HESK use the <a href="index.php">New install</a> option instead.';
}
elseif ($problem == 4)
{
echo '<b>Version '.HESK_NEW_VERSION.' tables already exist!</b><br /><br />
Your database seems to be compatible with HESK version '.HESK_NEW_VERSION.'<br /><br />
To install a new copy of HESK use the <a href="index.php">New install</a> option instead.';
}
else
{
echo '<p style="padding: 10px;">To complete setup HESK needs to connect to your database. You can get this information from your hosting control panel.</p>';
}
?>
</div>
</div>
</div>
<div class="col-md-7">
<div class="alert alert-warning"><strong>3. Database Settings</strong></div>
<form role="form" action="<?php echo INSTALL_PAGE; ?>" method="post">
<div class="h3">Database Settings</div>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
<label for="host">Database Host</label>
<input type="text" class="form-control" name="host" id="host" placeholder="ex. localhost">
</div>
<div class="form-group">
<label for="name">Database Name</label>
<input type="text" class="form-control" name="name" id="name" placeholder="ex. hesk">
</div>
<div class="form-group">
<label for="user">Database User</label>
<input type="text" class="form-control" name="user" id="user" placeholder="ex. root">
</div>
<div class="form-group">
<label for="pass">Database User's Password</label>
<input type="password" class="form-control" name="pass" id="pass" placeholder="Password">
</div>
<?php
if (INSTALL_PAGE == 'install.php')
{
?>
<div class="form-group">
<label for="pfix">Table Prefix</label>
<input type="text" class="form-control" name="pfix" id="pfix" placeholder="ex. hesk_">
</div>
<br>
<div class="h3">HESK Login Details</div>
<div class="h6">Username and password you will use to login into HESK administration.</div>
<div class="footerWithBorder blankSpace"></div>
<div class="col-md-8">
<div class="alert alert-warning"><strong>3. Database Settings</strong></div>
<form role="form" action="<?php echo INSTALL_PAGE; ?>" method="post">
<div class="h3">Database Settings</div>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
<label for="admin_user">Choose a Username</label>
<input type="text" class="form-control" placeholder="Username" name="admin_user" value="<?php echo isset($_SESSION['admin_user']) ? stripslashes($_SESSION['admin_user']) : 'Administrator'; ?>" size="40" autocomplete="off" />
</div>
<div class="form-group">
<label for="admin_pass">Choose a Password</label>
<input type="text" class="form-control" placeholder="Password" name="admin_pass" id="admin_pass" value="<?php echo isset($_SESSION['admin_pass']) ? stripslashes($_SESSION['admin_pass']) : ''; ?>" size="40" autocomplete="off" />
</div>
<div class="form-group">
<label for="host">Database Host</label>
<input type="text" class="form-control" name="host" id="host" placeholder="ex. localhost">
</div>
<div class="form-group">
<label for="name">Database Name</label>
<input type="text" class="form-control" name="name" id="name" placeholder="ex. hesk">
</div>
<div class="form-group">
<label for="user">Database User</label>
<input type="text" class="form-control" name="user" id="user" placeholder="ex. root">
</div>
<div class="form-group">
<label for="pass">Database User's Password</label>
<input type="password" class="form-control" name="pass" id="pass" placeholder="Password">
</div>
<?php
if (INSTALL_PAGE == 'install.php')
{
?>
<div class="form-group">
<label for="pfix">Table Prefix</label>
<input type="text" class="form-control" name="pfix" id="pfix" placeholder="ex. hesk_">
</div>
<br>
<div class="h3">HESK Login Details</div>
<div class="h6">Username and password you will use to login into HESK administration.</div>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
<label for="admin_user">Choose a Username</label>
<input type="text" class="form-control" placeholder="Username" name="admin_user" value="<?php echo isset($_SESSION['admin_user']) ? stripslashes($_SESSION['admin_user']) : 'Administrator'; ?>" size="40" autocomplete="off" />
</div>
<div class="form-group">
<label for="admin_pass">Choose a Password</label>
<input type="text" class="form-control" placeholder="Password" name="admin_pass" id="admin_pass" value="<?php echo isset($_SESSION['admin_pass']) ? stripslashes($_SESSION['admin_pass']) : ''; ?>" size="40" autocomplete="off" />
</div>
<?php
}
?>
}
?>
<p align="center"><input type="hidden" name="dbtest" value="1" /><button type="submit" class="btn btn-default btn-lg">Continue</button></p>
</form>
<p align="center"><input type="hidden" name="dbtest" value="1" /><button type="submit" class="btn btn-default btn-lg">Continue</button></p>
</form>
<?php
hesk_iFooter();
@ -635,20 +631,22 @@ function hesk_iStart()
hesk_iHeader();
?>
<div class="row">
<div class="col-md-4">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;">Summary</a></li>
</ul>
<div class="summaryList">
<ul>
<li>The script is provided &quot;as is&quot;, without any warranty. Use at your own risk.<br />&nbsp;</li>
<li>HESK is a registered trademark, using the term HESK requires permission.<br />&nbsp;</li>
<li>Do not redistribute this script without express written permission<br />&nbsp;</li>
<li>If you wish to remove the &quot;Powered by&quot; links a <a href="https://www.hesk.com/buy.php" target="_blank">license is required</a>.</li>
</ul>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<p>Summary</p>
</div>
<div class="panel-body">
<ul>
<li>The script is provided &quot;as is&quot;, without any warranty. Use at your own risk.<br />&nbsp;</li>
<li>HESK is a registered trademark, using the term HESK requires permission.<br />&nbsp;</li>
<li>Do not redistribute this script without express written permission<br />&nbsp;</li>
<li>If you wish to remove the &quot;Powered by&quot; links a <a href="https://www.hesk.com/buy.php" target="_blank">license is required</a>.</li>
</ul>
</div>
</div>
</div>
<div class="col-md-7">
<div class="col-md-8">
<div class="alert alert-warning"><strong>1. License Agreement</strong></div>
<b>The entire agreement:</b>
<div class="agreementBox">

@ -0,0 +1,31 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
?>
<html>
<head>
<title>Mods For HESK 1.6.0 Install / Upgrade</title>
</head>
<body>
<h1>Mods for HESK 1.6.0 Install / Upgrade</h1>
<h3>Select your current Mods for HESK version number to upgrade.</h3>
<ul style="list-style-type: none">
<li><a href="updateTo1-6-1.php">v1.6.0</a></li>
<li><a href="updateTo1-6-0.php">v1.5.0</a></li>
<li><a href="updateTo1-5-0.php">v1.4.1</a></li>
<li><a href="updateTo1-4-1.php?ar=true">v1.4.0</a></li>
<li><a href="updateTo1-4-1.php">v1.2.4 or v1.3.0</a></li>
<li><a href="freshInstall.php">No previous version</a> (make sure you have installed/updated HESK first; otherwise installation will <b>fail</b>!)</li>
</ul>
<p>Please verify the database information below. Additionally, ensure that the database user has CREATE and ALTER permissions.</p>
<p><b>Database Host: </b> <?php echo $hesk_settings['db_host']; ?></p>
<p><b>Database Name: </b><?php echo $hesk_settings['db_name']; ?></p>
<p><b>Database User: </b><?php echo $hesk_settings['db_user']; ?></p>
<p><b>Database Password: </b><?php echo $hesk_settings['db_pass']; ?></p>
<p><b>Database Prefix: </b><?php echo $hesk_settings['db_pfix']; ?></p>
<p>By proceeding, you agree to the terms of the <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative Commons Attribution-ShareAlike 4.0 International License.</a></p>
</body>
</html>

@ -1,84 +0,0 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
$showFinished = 'none';
$showInstructions = 'block';
if ($_GET['update'] == 1)
{
hesk_dbConnect();
$somethingRS = hesk_dbQuery("SHOW TABLES LIKE '".$hesk_settings['db_pfix']."statuses'");
$shouldBuildTable = ($somethingRS->num_rows == 0);
$showInstructions = 'none';
$showFinished = 'block';
if ($shouldBuildTable)
{
$showInstructions = 'none';
$showFinished = 'block';
//-- Need to do this since we are no longer restricted on IDs and we want an INT for proper INNER JOINs
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` CHANGE COLUMN `status` `status` INT NOT NULL DEFAULT '0'");
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (
`ID` INT NOT NULL,
`ShortNameContentKey` TEXT NOT NULL,
`TicketViewContentKey` TEXT NOT NULL,
`TextColor` TEXT NOT NULL,
`IsNewTicketStatus` BIT NOT NULL DEFAULT 0,
`IsClosed` BIT NOT NULL DEFAULT 0,
`IsClosedByClient` BIT NOT NULL DEFAULT 0,
`IsCustomerReplyStatus` BIT NOT NULL DEFAULT 0,
`IsStaffClosedOption` BIT NOT NULL DEFAULT 0,
`IsStaffReopenedStatus` BIT NOT NULL DEFAULT 0,
`IsDefaultStaffReplyStatus` BIT NOT NULL DEFAULT 0,
`LockedTicketStatus` BIT NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`))");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (0, 'open', 'open', '#FF0000', 1, 0, 0, 0, 0, 0, 0, 0);");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (1, 'wait_reply', 'wait_staff_reply', '#FF9933', 0, 0, 0, 1, 0, 1, 0, 0);");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (2, 'replied', 'wait_cust_reply', '#0000FF', 0, 0, 0, 0, 0, 0, 1, 0);");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (3, 'resolved', 'resolved', '#008000', 0, 1, 1, 0, 1, 0, 0, 1);");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (4, 'in_progress', 'in_progress', '#000000', 0, 0, 0, 0, 0, 0, 0, 0);");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (ID, ShortNameContentKey, TicketViewContentKey, TextColor, IsNewTicketStatus, IsClosed, IsClosedByClient, IsCustomerReplyStatus,
IsStaffClosedOption, IsStaffReopenedStatus, IsDefaultStaffReplyStatus, LockedTicketStatus)
VALUES (5, 'on_hold', 'on_hold', '#000000', 0, 0, 0, 0, 0, 0, 0, 0);");
}
}
?>
<html>
<head>
<title>NuMods 1.2.0 Install / Upgrade</title>
</head>
<body>
<div style="display: <?php echo $showInstructions; ?>">
<h1>Install / Upgrade NuMods to 1.2.0</h1>
<h4><i>If you have not yet installed/updated HESK, please do so first before continuing; otherwise installation will <b>fail</b>!</i></h4>
<br/>
<p>Please verify the database information below. Addtionally, ensure that the database user has CREATE permissions.</p>
<p><b>Database Host: </b> <?php echo $hesk_settings['db_host']; ?></p>
<p><b>Database Name: </b><?php echo $hesk_settings['db_name']; ?></p>
<p><b>Database User: </b><?php echo $hesk_settings['db_user']; ?></p>
<p><b>Database Password: </b><?php echo $hesk_settings['db_pass']; ?></p>
<p><b>Database Prefix: </b><?php echo $hesk_settings['db_pfix']; ?></p>
<a href="?update=1">Proceed with installation/upgrade</a>
</div>
<div style="display: <?php echo $showFinished; ?>">
<h1>Installation / Upgrade Finished</h1>
<p>The installation / upgrade of NuMods has finished. You can now delete the <b>install</b> directory and access the <a href="<?php echo HESK_PATH . 'admin'; ?>">admin area</a></p>
</div>
</body>
</html>

@ -0,0 +1,18 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
hesk_dbConnect();
if (!isset($_GET['ar'])) {
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` ADD COLUMN `autorefresh` BIGINT NOT NULL DEFAULT 0 AFTER `replies`;");
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."denied_ips` (
`ID` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`RangeStart` VARCHAR(100) NOT NULL,
`RangeEnd` VARCHAR(100) NOT NULL)");
}
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."denied_emails` (ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, Email VARCHAR(100) NOT NULL);");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` ADD COLUMN `parent` MEDIUMINT(8) NULL AFTER `custom20`;");
header('Location: updateTo1-5-0.php');

@ -0,0 +1,12 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
hesk_dbConnect();
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` ADD COLUMN `active` ENUM('0', '1') NOT NULL DEFAULT '1'");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` ADD COLUMN `can_manage_settings` ENUM('0', '1') NOT NULL DEFAULT '1'");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` ADD COLUMN `default_notify_customer_email` ENUM ('0', '1') NOT NULL DEFAULT '1'");
header('Location: updateTo1-6-0.php');
?>

@ -0,0 +1,16 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
hesk_dbConnect();
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` ADD COLUMN `notify_note_unassigned` ENUM('0', '1') NOT NULL DEFAULT '0'");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` ADD COLUMN `can_change_notification_settings` ENUM('0', '1') NOT NULL DEFAULT '1'");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` ADD COLUMN `edit_date` DATETIME NULL");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` ADD COLUMN `number_of_edits` INT NOT NULL DEFAULT 0");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` ADD COLUMN `note_id` INT NULL AFTER `ticket_id`");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` MODIFY COLUMN `ticket_id` VARCHAR(13) NULL");
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` (`Key` NVARCHAR(200) NOT NULL, `Value` NVARCHAR(200) NOT NULL)");
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` (`Key`, `Value`) VALUES ('modsForHeskVersion', '1.6.0')");
header('Location: updateTo1-6-1.php');

@ -0,0 +1,9 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
hesk_dbConnect();
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '1.6.1' WHERE `Key` = 'modsForHeskVersion'");
header('Location: updateTo2-0-0.php');

@ -0,0 +1,105 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
$updateSuccess = true;
hesk_dbConnect();
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."verified_emails` (`Email` VARCHAR(255) NOT NULL)");
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails` (`Email` VARCHAR(255) NOT NULL, `ActivationKey` VARCHAR(500) NOT NULL)");
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`trackid` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`category` smallint(5) unsigned NOT NULL DEFAULT '1',
`priority` enum('0','1','2','3') COLLATE utf8_unicode_ci NOT NULL DEFAULT '3',
`subject` varchar(70) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`dt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`lastchange` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`ip` varchar(46) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`language` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`owner` smallint(5) unsigned NOT NULL DEFAULT '0',
`time_worked` time NOT NULL DEFAULT '00:00:00',
`lastreplier` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
`replierid` smallint(5) unsigned DEFAULT NULL,
`archive` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
`locked` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
`attachments` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`merged` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`history` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom1` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom2` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom3` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom4` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom5` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom6` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom7` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom8` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom9` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom10` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom11` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom12` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom13` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom14` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom15` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom16` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom17` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom18` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom19` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`custom20` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`parent` mediumint(8) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `trackid` (`trackid`),
KEY `archive` (`archive`),
KEY `categories` (`category`),
KEY `statuses` (`status`),
KEY `owner` (`owner`)
)");
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.0.0' WHERE `Key` = 'modsForHeskVersion'");
//-- Add the new custom field property to modsForHesk_settings.inc.php
$file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php');
//-- Only add the additional settings if they aren't already there.
if (strpos($file, 'custom_field_setting') !== true)
{
$file .= '
//-- Set this to 1 to enable custom field names as keys
$modsForHesk_settings[\'custom_field_setting\'] = 0;
//-- Set this to 1 to enable email verification for new customers
$modsForHesk_settings[\'customer_email_verification_required\'] = 0;';
}
if (!file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file))
{
$updateSuccess = false;
echo '<h1>Failure!</h1>
<p>An issue occurred when trying to update the modsForHesk_settings.inc.php file.</p>
<br>
<p>Add the following lines to your modsForHesk_settings.inc.php file:</p>
<br>
<code>//-- Set this to 1 to enable custom field names as keys
$modsForHesk_settings[\'custom_field_setting\'] = 0;</code><br><br>
<code>//-- Set this to 1 to enable email verification for new customers
$modsForHesk_settings[\'customer_email_verification_required\'] = 0;</code>
<br><br>
<p>Now you can delete the <b>install</b> folder for security reasons, and then proceed back to the <a href="../">Help Desk</a></p>';
}
if ($updateSuccess) {
?>
<h1>Installation / Update complete!</h1>
<p>Please delete the <b>install</b> folder for security reasons, and then proceed back to the <a href="../">Help Desk</a></p>
<?php } ?>

@ -0,0 +1,7 @@
<?php
define('MINIMUM_REFRESH_THRESHOLD_IN_MILLISECONDS', 1000);
if ($_SESSION['autorefresh'] > MINIMUM_REFRESH_THRESHOLD_IN_MILLISECONDS) { ?>
(function(){
setTimeout("location.reload(true);",<?php echo $_SESSION['autorefresh']/1000; ?>);
})();
<?php } ?>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,91 @@
//-- Activate anything Hesk UI needs, such as tooltips.
var loadJquery = function()
{
//-- Activate tooltips
$('[data-toggle="tooltip"]').tooltip();
//-- Activate popovers
$('[data-toggle="popover"]').popover({
trigger: 'hover',
container: 'body'
});
//-- Activate HTML popovers
$('[data-toggle="htmlpopover"]').popover({
trigger: 'hover',
container: 'body',
html: 'true'
});
//-- Activate jQuery's date picker
$(function() {
$('.datepicker').datepicker({
todayBtn: "linked",
clearBtn: true,
autoclose: true,
todayHighlight: true,
format: "yyyy-mm-dd"
});
});
};
function selectAll(id) {
$('#' + id + ' option').prop('selected', true);
}
function deselectAll(id) {
$('#' + id + ' option').prop('selected', false);
}
function toggleRow(id) {
if ($('#' + id).hasClass('danger'))
{
$('#' + id).removeClass('danger');
} else
{
$('#' + id).addClass('danger');
}
}
function toggleColumn(className) {
if ($('.' + className).css('display') == 'none') {
$('.' + className).show();
} else {
$('.' + className).hide();
}
}
function toggleFilterCheckboxes(show) {
if (show) {
$('#filterCheckboxes').show();
$('#showFiltersText').hide();
$('#hideFiltersText').show();
} else {
$('#filterCheckboxes').hide();
$('#showFiltersText').show();
$('#hideFiltersText').hide();
}
}
function toggleChildrenForm(show) {
if (show) {
$('#childrenForm').show();
$('#addChildText').hide();
} else {
$('#childrenForm').hide();
$('#addChildText').show();
}
}
function toggleNote(noteId, showForm) {
if (showForm) {
$('#note-' + noteId + '-p').hide();
$('#note-' + noteId + '-form').show();
} else {
$('#note-' + noteId + '-p').show();
$('#note-' + noteId + '-form').hide();
$('#note-' + noteId + '-textarea').val($('#note-' + noteId + '-p').text())
}
}
jQuery(document).ready(loadJquery);

@ -1,24 +0,0 @@
//-- Activate anything Hesk UI needs, such as tooltips.
var loadJquery = function()
{
//-- Activate tooltips
$('[data-toggle="tooltip"]').tooltip();
//-- Active popovers
$('[data-toggle="popover"]').popover({
trigger: 'hover'
})
};
function toggleRow(id) {
if ($('#' + id).hasClass('danger'))
{
$('#' + id).removeClass('danger');
} else
{
$('#' + id).addClass('danger');
}
}
jQuery(document).ready(loadJquery);

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -150,27 +150,24 @@ function hesk_kb_header($kb_link) {
<li class="active"><?php echo $hesklang['kb_text']; ?></li>
</ol>
<div class="enclosingDashboard">
<div class="row">
<div class="col-md-4">
<div class="moreToLeft">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['quick_help']; ?></a></li>
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<p style="text-align: justify;"><?php echo $hesklang['kb_is']; ?></p>
</div>
</div>
</div>
</div>
<div class="col-md-7">
<?php
/* Print small search box */
hesk_kbSearchSmall();
/* Print large search box */
hesk_kbSearchLarge();
<div class="row">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<?php echo $hesklang['quick_help']; ?>
</div>
<div class="panel-body">
<p style="text-align: justify;"><?php echo $hesklang['kb_is']; ?></p>
</div>
</div>
</div>
<div class="col-md-8">
<?php
/* Print small search box */
hesk_kbSearchSmall();
/* Print large search box */
hesk_kbSearchLarge();
} // END hesk_kb_header()
@ -275,9 +272,9 @@ function hesk_show_kb_article($artid)
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` SET `views`=`views`+1 WHERE `id`='".intval($artid)."' LIMIT 1");
}
echo '<h3 style="text-align: left">'.$article['subject'].'</h3>
echo '<h3 class="text-left">'.$article['subject'].'</h3>
<div class="footerWithBorder blankSpace"></div>
<h4 style="text-align: left">'.$hesklang['as'].'</h4>
<h4 class="text-left">'.$hesklang['as'].'</h4>
<div class="kbContent">'
. $article['content'].'</div>';
@ -314,8 +311,8 @@ function hesk_show_kb_article($artid)
?>
<h4 style="text-align: left"><?php echo $hesklang['ad']; ?></h4>
<div style="text-align: left">
<h4 class="text-left"><?php echo $hesklang['ad']; ?></h4>
<div class="text-left">
<p><?php echo $hesklang['aid']; ?>: <?php echo $article['id']; ?></p>
<p><?php echo $hesklang['category']; ?>: <a href="<?php echo $link; ?>"><?php echo $article['cat_name']; ?></a></p>
@ -323,7 +320,7 @@ function hesk_show_kb_article($artid)
if ($hesk_settings['kb_date'])
{
?>
<p><?php echo $hesklang['dta']; ?>: <?php echo hesk_date($article['dt']); ?></p>
<p><?php echo $hesklang['dta']; ?>: <?php echo hesk_date($article['dt'], true); ?></p>
<?php
}
@ -378,8 +375,8 @@ function hesk_show_kb_category($catid, $is_search = 0) {
if ($thiscat['parent'])
{
$link = ($thiscat['parent'] == 1) ? 'knowledgebase.php' : 'knowledgebase.php?category='.$thiscat['parent'];
echo '<h3 style="text-align: left">'.$hesklang['kb_cat'].': '.$thiscat['name'].' </h3>
<p align="left"><a href="javascript:history.go(-1)" title="'.$hesklang['back'].'"><span class="glyphicon glyphicon-circle-arrow-left"></span> Go back</a></p>
echo '<h3 class="text-left">'.$hesklang['kb_cat'].': '.$thiscat['name'].' </h3>
<p class="text-left"><a href="javascript:history.go(-1)" title="'.$hesklang['back'].'"><span class="glyphicon glyphicon-circle-arrow-left"></span> Go back</a></p>
<div class="footerWithBorder blankSpace"></div>
<div class="blankSpace"></div>
';
@ -390,7 +387,7 @@ function hesk_show_kb_category($catid, $is_search = 0) {
{
?>
<h4 style="text-align: left"><?php echo $hesklang['kb_cat_sub']; ?></h4>
<h4 class="text-left"><?php echo $hesklang['kb_cat_sub']; ?></h4>
<div class="footerWithBorder blankSpace"></div>
<table border="0" cellspacing="1" cellpadding="3" width="100%">
@ -480,7 +477,7 @@ function hesk_show_kb_category($catid, $is_search = 0) {
} // END if NumRows > 0
?>
<h4 style="text-align: left"><?php echo $hesklang['ac']; ?></h4>
<h4 class="text-left"><?php echo $hesklang['ac']; ?></h4>
<div class="footerWithBorder blankSpace"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">

@ -0,0 +1,17 @@
Hello,
A new note has been added to ticket "%%SUBJECT%%".
Note by %%NAME%%:
%%MESSAGE%%
You can manage this ticket here:
%%TRACK_URL%%
Regards,
%%SITE_TITLE%%
%%SITE_URL%%

@ -0,0 +1,14 @@
Dear %%NAME%%,
Your support ticket "%%SUBJECT%%" has been updated to a closed/resolved status.
Ticket tracking ID: %%TRACK_ID%%
You can view the status of your ticket here:
%%TRACK_URL%%
Sincerely,
%%SITE_TITLE%%
%%SITE_URL%%

@ -0,0 +1,16 @@
Hello,
A support ticket assigned to you has been re-opened.
%%NAME%% has just re-opened the ticket "%%SUBJECT%%".
Tracking ID: %%TRACK_ID%%
You can manage this ticket here:
%%TRACK_URL%%
Regards,
%%SITE_TITLE%%
%%SITE_URL%%

@ -0,0 +1,10 @@
Dear %%NAME%%,
Your email needs to be verified before your ticket can be submitted. Please click the link below to verify your email.
%%VERIFYURL%%
Sincerely,
%%SITE_TITLE%%
%%SITE_URL%%

@ -2,7 +2,7 @@
/*
* Language file for Help Desk Software HESK (www.hesk.com)
* Language: ENGLISH
* Version: 2.5.3
* Version: 2.5.5
* Author: Klemen Stirn (http://www.hesk.com)
*
* !!! This file must be saved in UTF-8 encoding without byte order mark (BOM) !!!
@ -21,10 +21,126 @@ $hesklang['_COLLATE']='utf8_unicode_ci';
// This is the email break line that will be used in email piping
$hesklang['EMAIL_HR']='------ Reply above this line ------';
// ADDED OR MODIFIED IN NuMods 1.2.2
// ADDED OR MODIFIED IN Mods For HESK 2.0.0
$hesklang['date_custom_field'] = 'Date';
$hesklang['date_custom_field_text'] = 'No options for this custom field type.';
$hesklang['multiple_select_custom_field'] = 'Multiple Select box';
$hesklang['multiple_select_custom_field_text'] = 'Options for this multi-select box, enter one option per line (each line will be a choice your customers can choose from). You need to enter at least two options!';
$hesklang['date_format'] = 'Date must be in YYYY-MM-DD format.';
$hesklang['custom_field_setting'] = 'Multilanguage support';
$hesklang['custom_field_setting_help'] = 'Enabling this setting will use the name of the custom field as the language
file\'s key, rather than the direct name itself. This allows the custom field to be translated into different languages.';
$hesklang['enable_custom_field_language'] = 'Enable multilanguage support';
$hesklang['custom_language_key'] = 'Field language file key';
$hesklang['ticket_reopen_assigned'] = '[#%%TRACK_ID%%] Assigned ticket reopened';
$hesklang['verify_email'] = 'Verify Email';
$hesklang['email_verified'] = 'The email address <b>%s</b> has been verified. Additionally, the following tickets have been created:'; //%s: email address
$hesklang['verify_no_records'] = 'No records were found for this activation key. Has this activation key already been used?';
$hesklang['activation_key'] = 'Activation Key';
$hesklang['no_tickets_created'] = 'No tickets created';
$hesklang['customer_email_verification'] = 'Customer Email Verifications';
$hesklang['customer_email_verification_help'] = 'Require customers to verify their email address via email. Once their
address has been verified, it does not need to be re-verified in the future. <br><br> <b>NOTE:</b> Enabling this will disable the
ability for the customer to provide multiple emails, as HESK will be unable to determine which email needs to be verified.';
$hesklang['require_customer_validate_email'] = 'Require customers to verify email';
$hesklang['multi_eml_disabled'] = 'This feature has been disabled because this help desk has been configured to require
customers to verify their email address';
$hesklang['feature_disabled'] = 'Feature Disabled';
$hesklang['verify_your_email'] = 'Your ticket has been created; however your email needs to be verified before your ticket can be addressed. An email has been sent to the email provided for verification.';
// ADDED OR MODIFIED IN Mods For HESK 1.6.0
$hesklang['ticket_closed'] = '[#%%TRACK_ID%%] Ticket closed/resolved';
$hesklang['ticket_reopen'] = '[#%%TRACK_ID%%] Ticket reopened';
$hesklang['ticket_reopen_assigned'] = '[#%%TRACK_ID%%] Assigned ticket reopened';
$hesklang['create_based_on_contact'] = 'Create Ticket For Same Contact';
$hesklang['notify_note_unassigned'] = 'Someone adds a note to a ticket not assigned to me';
$hesklang['can_change_notification_settings'] = 'Can change notification settings';
$hesklang['note_edit_successful'] = 'Note edited';
$hesklang['note_last_edit'] = 'Note last edited on: %s'; // %s: timestamp of last edit
$hesklang['total_number_of_edits'] = 'Total number of edits: %s'; // %s: total number of edits
$hesklang['add_row'] = 'Add row';
$hesklang['addnote'] = 'Add note';
$hesklang['no_noteID'] = 'No Note ID';
$hesklang['note_id_not_found'] = 'Note ID not found';
$hesklang['mods_for_hesk'] = 'Mods for HESK';
$hesklang['err_modsForHesk_settings'] = 'Can\'t open file <b>modsForHesk_settings.inc.php</b> for writing. Please CHMOD this file to 666 (rw-rw-rw-)';
$hesklang['mods_for_hesk_version'] = 'Mods for HESK Version';
// ADDED OR MODIFIED IN Mods For HESK 1.5.0
$hesklang['ticket_auto_refresh'] = 'Ticket Table Auto-Refresh:';
$hesklang['display_rtl'] = 'Display site right-to-left';
$hesklang['show_icons_navigation'] = 'Show icons on navigation bar';
$hesklang['enable_maintenance'] = 'Enable maintenance mode';
$hesklang['can_man_settings']='Can manage help desk settings';
$hesklang['disable_user'] = 'User is active (click to deactivate)';
$hesklang['enable_user'] = 'User is inactive (click to activate)';
$hesklang['user_activated'] = 'User has been activated';
$hesklang['user_deactivated'] = 'User has been deactivated';
$hesklang['active_user'] = 'Is active user';
$hesklang['self_deactivation'] = 'You cannot deactivate yourself!';
$hesklang['inactive_user'] = 'Your account is currently inactive. Contact an administrator for more information.';
$hesklang['notify_customer_email'] = 'Emails to customer on reply';
$hesklang['notify_customer_email_text'] = 'Don\'t send email notifications of replies to the customer by default';
$hesklang['cant_edit_admin'] = 'You cannot edit the God Admin (User ID = 1)';
$hesklang['notifications_disabled_info'] = 'Changing notifications settings has been disabled by your administrator.';
// ADDED OR MODIFIED IN Mods For HESK 1.4.0
$hesklang['navbarBackgroundColor'] = 'Navbar Background Color';
$hesklang['navbarBackgroundColorHelp'] = 'The main color of the top navigation bar. This applies to both the client and staff-side.';
$hesklang['navbarBrandColor'] = 'Navbar Brand Color';
$hesklang['navbarBrandColorHelp'] = 'The text color of the \'brand\' on the left (also the name of the Help Desk).';
$hesklang['navbarBrandHoverColor'] = 'Navbar Brand Hover Color';
$hesklang['navbarBrandHoverColorHelp'] = 'The text color of the \'brand\' on the left when the use moves their mouse over the text.';
$hesklang['navbarItemTextColor'] = 'Navbar Item Text Color';
$hesklang['navbarItemTextColorHelp'] = 'The text color of the navigation items on the navigation bar (by default \'Home\', \'Ticket\', and \'Knowledgebase\' are the three items on the client-side).';
$hesklang['navbarItemTextHoverColor'] = 'Navbar Item Text Hover Color';
$hesklang['navbarItemTextHoverColorHelp'] = 'The text color of the navigation items on the navigation bar when the user hovers over one of the items.';
$hesklang['navbarItemTextSelectedColor'] = 'Navbar Item Text Selected Color';
$hesklang['navbarItemTextSelectedColorHelp'] = 'The text color of the navigation items on the navigation bar when the user clicks on an item, and a dropdown menu appears (such as \'Ticket\').';
$hesklang['navbarItemSelectedBackgroundColor'] = 'Navbar Item Selected Background Color';
$hesklang['navbarItemSelectedBackgroundColorHelp'] = 'The background color of the navigation items on the navigation bar when the user clicks on an item, and a dropdown menu appears (such as \'Ticket\').';
$hesklang['dropdownItemTextColor'] = 'Dropdown Item Text Color';
$hesklang['dropdownItemTextColorHelp'] = 'The text color of a dropdown item.';
$hesklang['dropdownItemTextHoverColor'] = 'Dropdown Item Text Hover Color';
$hesklang['dropdownItemTextHoverColorHelp'] = 'The text color of a dropdown item when the mouse hovers over it.';
$hesklang['questionMarkColor'] = 'Question Mark Color';
$hesklang['questionMarkColorHelp'] = 'The text color for the question mark circle, as seen on the \'Settings\' page and on other various pages.';
$hesklang['dropdownItemTextHoverBackgroundColor'] = 'Dropdown Item Text Hover Background Color';
$hesklang['dropdownItemTextHoverBackgroundColorHelp'] = 'The background color of a dropdown item when the mouse hovers over it.';
$hesklang['uiColors'] = 'UI Colors';
$hesklang['displayRtl'] = 'Display site right-to-left';
$hesklang['displayRtlHelp'] = 'Check this to set the text direction to right-to-left.';
$hesklang['showIcons'] = 'Show Icons';
$hesklang['showIconsHelp'] = 'Check this box to show icons next to navigation bar items';
$hesklang['maintenanceMode'] = 'Maintenance Mode';
$hesklang['maintenanceModeHelp'] = 'Check this box to put the Help Desk in maintenance mode. Staff can still log into the backend, but the front end will be inaccessible.';
$hesklang['ip_to'] = 'To';
$hesklang['ip_bans'] = 'IP Bans';
$hesklang['email_bans'] = 'Email Bans';
$hesklang['ip_email_bans'] = 'IP / Email Bans';
$hesklang['ip_banned'] = 'Your IP has been banned by the help desk. You will be unable to submit a ticket until your IP ban has been removed.';
$hesklang['email_banned'] = 'The email address you have entered has been banned by the help desk. You will be unable to submit a ticket until your email ban has been removed.';
$hesklang['none'] = 'None';
$hesklang['parent'] = 'Parent';
$hesklang['children'] = 'Children';
$hesklang['add_child'] = 'Add Child';
$hesklang['child_added'] = 'Successfully added <strong>%s</strong> as a child to this ticket.'; //%s: the child tracking ID
$hesklang['is_child_already'] = '<strong>%s</strong> is already a child of this ticket.'; //%s: the child tracking ID
$hesklang['child_does_not_exist'] = '<strong>%s</strong> is not a valid Tracking ID!'; //%s: the child tracking ID
$hesklang['child_is_itself'] = 'You cannot set a ticket as a child of itself.';
$hesklang['delete_relationship'] = 'Delete Relationship';
$hesklang['relationship_deleted'] = 'Parent/Child relationship deleted.';
$hesklang['autorefresh'] = 'Autorefresh:';
$hesklang['autorefresh_restrictions'] = 'Enter value in milliseconds. Value must be greater than 1000 to use this feature. No fractional values.';
// ADDED OR MODIFIED IN Mods For HESK 1.3.0
$hesklang['show_filters'] = 'Show Column Filters';
$hesklang['hide_filters'] = 'Hide Column Filters';
// ADDED OR MODIFIED IN Mods For HESK 1.2.2
$hesklang['changeLanguage'] = 'Change language to';
// ADDED OR MODIFIED IN NuMods 1.2
// ADDED OR MODIFIED IN Mods For HESK 1.2
$hesklang['statuses'] = 'Statuses';
$hesklang['basicProperties'] = 'Basic Properties';
$hesklang['shortNameKey'] = 'Short Name Key';
@ -42,7 +158,6 @@ $hesklang['isStaffClosedOptionMsg'] = 'When a staff member clicks the "Close tic
$hesklang['isStaffReopenedStatusMsg'] = 'When a staff member clicks the "Open ticket" link, change the status to';
$hesklang['isDefaultStaffReplyStatusMsg'] = 'When a staff member replies to a ticket, change the status to';
$hesklang['lockedTicketStatusMsg'] = 'When a ticket is locked, change the status to';
$hesklang['nuModsVersion'] = 'NuMods Version';
$hesklang['shortNameRequired'] = 'Short Name Key is required.';
$hesklang['longNameRequired'] = 'Long Name Key is required.';
$hesklang['textColorRequired'] = 'Text Color is required.';
@ -58,7 +173,7 @@ $hesklang['resolved']='Resolved'; // Ticket has been RESOLVED
$hesklang['quick_help_ticket']='Here is the information on your ticket. You can add a reply to this ticket, close it, or re-open the ticket if applicable.';
// ADDED OR MODIFIED IN HESK UI
// ADDED OR MODIFIED IN Mods For HESK pre-1.2
$hesklang['search_the_knowledgebase'] = 'Search the Knowledgebase';
$hesklang['view_ticket_nav']='View Ticket';
$hesklang['quick_help']='Quick Help';
@ -410,7 +525,7 @@ $hesklang['remember_user']='Remember my username';
$hesklang['wrong_user']='Wrong username';
$hesklang['no_permission']='You don\'t have permission to perform this task, please login with an account that has.';
$hesklang['tickets_on_pages']='Number of tickets: %d | Number of pages: %d'; // First %d is replaced with number of tickets, second %d with number of pages
$hesklang['jump_page']=' | Jump to page:';
$hesklang['jump_page']='Jump to page:';
$hesklang['no_tickets_open']='No unresolved tickets found';
$hesklang['no_tickets_crit']='No tickets found matching your criteria';
$hesklang['confirm_execute']='Are you sure you want to continue?';
@ -503,7 +618,6 @@ $hesklang['can_man_kb']='Manage knowledgebase';
$hesklang['can_man_users']='Manage users';
$hesklang['can_man_cat']='Manage categories';
$hesklang['can_man_canned']='Manage canned responses';
$hesklang['can_man_settings']='Manage help desk settings';
$hesklang['can_del_notes']='Delete any ticket notes';
$hesklang['dan']='users can delete their own ticket notes, select this only if you wish to allow this user to also be able to delete notes from other users';
$hesklang['in_all_cat']='in allowed categories only';
@ -595,7 +709,6 @@ $hesklang['opt2']='Options for this radio button, enter one option per line (eac
$hesklang['opt3']='Options for this select box, enter one option per line (each line will be a choice your customers can choose from). You need to enter at least two options!';
$hesklang['atl2']='Enter at least two options (one per line)!';
$hesklang['notes']='Notes';
$hesklang['addnote']='+ Add note';
$hesklang['noteby']='Note by';
$hesklang['delnote']='Delete note';
$hesklang['noteerr']='Note already deleted or wrong parameters';

@ -0,0 +1,24 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','./');
define('ON_MAINTENANCE_PAGE', 1);
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require_once(HESK_PATH . 'inc/header.inc.php');
if (!$modsForHesk_settings['maintenance_mode']) {
//-- The user refreshed the maintenance page, but maintenance mode is off. Redirect them back to the index page.
header('Location: '.HESK_PATH);
}
?>
<div class="row">
<div class="col-md-6 col-md-offset-3" style="padding-top: 30px; text-align: center;">
<i class="fa fa-exclamation-triangle fa-5x" style="color: orange"></i><br>
<p>The helpdesk is currently undergoing maintenance. Please come back later.</p>
</div>
</div>
<?php
require_once(HESK_PATH . 'inc/footer.inc.php');
?>

@ -0,0 +1,29 @@
<?php
//-- Mods For Hesk Theme Color Settings
$modsForHesk_settings['navbarBackgroundColor'] = '#414a5c';
$modsForHesk_settings['navbarBrandColor'] = '#d4dee7';
$modsForHesk_settings['navbarBrandHoverColor'] = '#ffffff';
$modsForHesk_settings['navbarItemTextColor'] = '#d4dee7';
$modsForHesk_settings['navbarItemTextHoverColor'] = '#ffffff';
$modsForHesk_settings['navbarItemTextSelectedColor'] = '#ffffff';
$modsForHesk_settings['navbarItemSelectedBackgroundColor'] = '#2d3646';
$modsForHesk_settings['dropdownItemTextColor'] = '#333333';
$modsForHesk_settings['dropdownItemTextHoverColor'] = '#262626';
$modsForHesk_settings['dropdownItemTextHoverBackgroundColor'] = '#f5f5f5';
$modsForHesk_settings['questionMarkColor'] = '#000000';
//-- Set this to 1 for right-to-left text.
$modsForHesk_settings['rtl'] = 0;
//-- Set this to 1 to show icons next to navigation menu items
$modsForHesk_settings['show_icons'] = 0;
//-- Set this to 1 to enable maintenance mode
$modsForHesk_settings['maintenance_mode'] = 0;
//-- Set this to 1 to enable custom field names as keys
$modsForHesk_settings['custom_field_setting'] = 0;
//-- Set this to 1 to enable email verification for new customers
$modsForHesk_settings['customer_email_verification_required'] = 0;

@ -1,17 +0,0 @@
<?php
//-- NuMods Theme Color Settings
$nuMods_settings['navbarBackgroundColor'] = '#414a5c';
$nuMods_settings['navbarBrandColor'] = '#d4dee7';
$nuMods_settings['navbarBrandHoverColor'] = '#ffffff';
$nuMods_settings['navbarItemTextColor'] = '#d4dee7';
$nuMods_settings['navbarItemTextHoverColor'] = '#ffffff';
$nuMods_settings['navbarItemTextSelectedColor'] = '#ffffff';
$nuMods_settings['navbarItemSelectedBackgroundColor'] = '#2d3646';
$nuMods_settings['dropdownItemTextColor'] = '#333333';
$nuMods_settings['dropdownItemTextHoverColor'] = '#262626';
$nuMods_settings['dropdownItemTextHoverBackgroundColor'] = '#f5f5f5';
$nuMods_settings['questionMarkColor'] = '#000000';
/* DO NOT EDIT ANYTHING BELOW THIS LINE */
$nuMods_settings['version']='1.2.2';

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -37,6 +37,7 @@ define('HESK_PATH','./');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
hesk_load_database_functions();
@ -110,7 +111,7 @@ hr
background-color: #9e9e9e;
height: 1px;
width: 100%;
text-align: left;
text-align: <?php if ($modsForHesk_settings['rtl']) {echo 'right';} else {echo 'left';} ?>;
}
</style>
</head>
@ -148,8 +149,8 @@ else
}
/* Other variables that need processing */
$ticket['dt'] = hesk_date($ticket['dt']);
$ticket['lastchange'] = hesk_date($ticket['lastchange']);
$ticket['dt'] = hesk_date($ticket['dt'], true);
$ticket['lastchange'] = hesk_date($ticket['lastchange'], true);
$random=mt_rand(10000,99999);
// Print ticket head
@ -205,17 +206,23 @@ $num_cols = 0;
echo '<tr>';
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'])
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
if ($num_cols == 3)
{
echo '</tr><tr>';
$num_cols = 0;
}
?>
<td><?php echo $v['name']; ?>:</td>
<td><?php echo hesk_unhortenUrl($ticket[$k]); ?></td>
<td bgcolor="#EEE"><b><?php echo $v['name']; ?>:</b></td>
<td bgcolor="#DDD"><?php echo hesk_unhortenUrl($ticket[$k]); ?></td>
<?php
$num_cols++;
}
}
@ -228,7 +235,7 @@ echo '<p>' . hesk_unhortenUrl($ticket['message']) . '</p>';
// Print replies
while ($reply = hesk_dbFetchAssoc($res))
{
$reply['dt'] = hesk_date($reply['dt']);
$reply['dt'] = hesk_date($reply['dt'], true);
echo '
<hr />

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -192,8 +192,8 @@ $info = array(
'subject' => $ticket['subject'],
'message' => stripslashes($message),
'attachments' => $myattachments,
'dt' => hesk_date($ticket['dt']),
'lastchange' => hesk_date($ticket['lastchange']),
'dt' => hesk_date($ticket['dt'], true),
'lastchange' => hesk_date($ticket['lastchange'], true),
);
// 2. Add custom fields to the array

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -37,6 +37,7 @@ define('HESK_PATH','./');
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
hesk_load_database_functions();
require(HESK_PATH . 'inc/email_functions.inc.php');
@ -78,6 +79,19 @@ hesk_dbConnect();
$hesk_error_buffer = array();
// Check to see if the user's IP address or email they submitted is banned.
$ipAddress = ip2long($_SERVER['REMOTE_ADDR']);
$ipSql = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_ips` WHERE `RangeStart` <= \''.hesk_dbEscape($ipAddress)
.'\' AND `RangeEnd` >= \''.hesk_dbEscape($ipAddress).'\'');
if ($ipSql->num_rows > 0) {
$hesk_error_buffer['ip_ban'] = $hesklang['ip_banned'];
}
$emailSql = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_emails` WHERE Email = \''.hesk_dbEscape(hesk_POST('email')).'\'');
if ($emailSql->num_rows > 0) {
$hesk_error_buffer['email_ban'] = $hesklang['email_banned'];
}
// Check anti-SPAM question
if ($hesk_settings['question_use'])
{
@ -194,7 +208,12 @@ foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'])
{
if ($v['type'] == 'checkbox')
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
if ($v['type'] == 'checkbox' || $v['type'] == 'multiselect')
{
$tmpvar[$k]='';
@ -225,10 +244,21 @@ foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
$hesk_error_buffer[$k]=$hesklang['fill_all'].': '.$v['name'];
}
if ($v['type'] == 'date')
{
$tmpvar[$k] = strtotime($_POST[$k]);
}
}
else
{
$tmpvar[$k]=hesk_makeURL(nl2br(hesk_input( hesk_POST($k) )));
if ($v['type'] == 'date' && $_POST[$k] != '')
{
$tmpvar[$k] = strtotime($_POST[$k]);
} else
{
$tmpvar[$k] = hesk_makeURL(nl2br(hesk_input(hesk_POST($k))));
}
}
$_SESSION["c_$k"]=hesk_POST($k);
}
@ -331,22 +361,49 @@ if ($hesk_settings['attachments']['use'] && ! empty($attachments) )
}
}
// Insert ticket to database
$ticket = hesk_newTicket($tmpvar);
// Should the helpdesk validate emails?
$createTicket = true;
if ($modsForHesk_settings['customer_email_verification_required'])
{
$verifiedEmailSql = "SELECT `Email` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."verified_emails` WHERE `Email` = '".hesk_dbEscape($tmpvar['email'])."'";
$verifiedEmailRS = hesk_dbQuery($verifiedEmailSql);
if ($verifiedEmailRS->num_rows == 0)
{
//-- email has not yet been verified.
$ticket = hesk_newTicket($tmpvar, false);
// Notify the customer
hesk_notifyCustomer();
//-- generate the activation key, which is a hash of their email address along with the current time.
$unhashedKey = $tmpvar['email'].time();
$key = hash('sha512', $unhashedKey);
// Need to notify staff?
// --> From autoassign?
if ($tmpvar['owner'] && $autoassign_owner['notify_assigned'])
{
hesk_notifyAssignedStaff($autoassign_owner, 'ticket_assigned_to_you');
$escapedEmail = hesk_dbEscape($tmpvar['email']);
$escapedKey = hesk_dbEscape($key);
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails` (`Email`, `ActivationKey`)
VALUES ('".$escapedEmail."', '".$escapedKey."')");
hesk_notifyCustomerForVerifyEmail('verify_email', $key);
$createTicket = false;
}
}
// --> No autoassign, find and notify appropriate staff
elseif ( ! $tmpvar['owner'] )
if ($createTicket)
{
hesk_notifyStaff('new_ticket_staff', " `notify_new_unassigned` = '1' ");
//-- email has been verified, and a ticket can be created
$ticket = hesk_newTicket($tmpvar);
// Notify the customer
hesk_notifyCustomer();
// Need to notify staff?
// --> From autoassign?
if ($tmpvar['owner'] && $autoassign_owner['notify_assigned'])
{
hesk_notifyAssignedStaff($autoassign_owner, 'ticket_assigned_to_you');
}
// --> No autoassign, find and notify appropriate staff
elseif ( ! $tmpvar['owner'] )
{
hesk_notifyStaff('new_ticket_staff', " `notify_new_unassigned` = '1' ");
}
}
// Next ticket show suggested articles again
@ -382,14 +439,19 @@ require_once(HESK_PATH . 'inc/header.inc.php');
<div style="width: 80%; margin-left: auto; margin-right: auto;">
<?php
// Show success message with link to ticket
hesk_show_success(
if ($createTicket) {
// Show success message with link to ticket
hesk_show_success(
$hesklang['ticket_submitted'] . '<br /><br />' .
$hesklang['ticket_submitted_success'] . ': <b>' . $ticket['trackid'] . '</b><br /><br />
$hesklang['ticket_submitted'] . '<br /><br />' .
$hesklang['ticket_submitted_success'] . ': <b>' . $ticket['trackid'] . '</b><br /><br />
<a href="' . $hesk_settings['hesk_url'] . '/ticket.php?track=' . $ticket['trackid'] . '">' . $hesklang['view_your_ticket'] . '</a>'
);
);
} else
{
hesk_show_notice($hesklang['verify_your_email'].'<br><br>'.$hesklang['check_spambox']);
}
// Any other messages to display?
hesk_handle_messages();

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************

@ -1,7 +1,7 @@
<?php
/*******************************************************************************
* Title: Help Desk Software HESK
* Version: 2.5.3 from 16th March 2014
* Version: 2.5.5 from 5th August 2014
* Author: Klemen Stirn
* Website: http://www.hesk.com
********************************************************************************
@ -207,200 +207,213 @@ require_once(HESK_PATH . 'inc/header.inc.php');
<li class="active"><?php hesk_showTopBar($hesklang['cid'].': '.$trackingID); ?></li>
</ol>
<div class="enclosingDashboard">
<div class="row">
<div align="left" class="col-md-4">
<div class="moreToLeft">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['quick_help']; ?></a></li>
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<div class="row">
<div class="col-md-6 col-xs-12">
<label class="control-label" style="margin-top:8px;"><?php echo $hesklang['changeLanguage']; ?></label>
</div>
<div class="col-md-6 col-xs-12">
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
</div>
</div>
<p><?php echo $hesklang['quick_help_ticket']; ?></p>
</div>
</div>
</div>
<div class="row">
<div align="left" class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
<div class="panel-body">
<p><?php echo $hesklang['quick_help_ticket']; ?></p>
</div>
</div>
<div class="col-md-7">
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
/*
* If the ticket has been reopened by customer:
* - show the "Add a reply" form on top
* - and ask them why the form has been reopened
*/
if (isset($_SESSION['force_form_top']))
{
hesk_printCustomerReplyForm(1);
echo ' <p>&nbsp;</p> ';
</div>
<div class="col-md-8">
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
/*
* If the ticket has been reopened by customer:
* - show the "Add a reply" form on top
* - and ask them why the form has been reopened
*/
if (isset($_SESSION['force_form_top']))
{
hesk_printCustomerReplyForm(1);
echo ' <p>&nbsp;</p> ';
unset($_SESSION['force_form_top']);
unset($_SESSION['force_form_top']);
}
?>
<h3 align="left"><?php echo $hesklang['view_ticket']; ?>: <?php
if ($hesk_settings['sequential'])
{
echo $trackingID.' ('.$hesklang['seqid'].': '.$ticket['id'].')';
}
else
{
echo $trackingID;
}
?></h3>
<div class="footerWithBorder"></div>
<div class="blankSpace"></div>
<div class="table-bordered">
<div class="row">
<div class="col-md-12">
<h2><?php echo $ticket['subject']; ?></h2>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-12">
<p><?php echo $hesklang['created_on']; ?>: <?php echo hesk_date($ticket['dt'], true); ?></p>
</div>
<div class="col-md-3 col-sm-12">
<p><?php echo $hesklang['last_update']; ?>: <?php echo hesk_date($ticket['lastchange'], true); ?></p>
</div>
<div class="col-md-2 col-md-offset-4 col-sm-12 close-ticket">
<p><?php $random=rand(10000,99999);
if ($ticket['isClosed'] == true && $ticket['locked'] != 1 && $hesk_settings['custopen']) {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&amp;s=2&amp;Refresh='.$random.'&amp;token='.hesk_token_echo(0).'" title="'.$hesklang['open_action'].'">'.$hesklang['open_action'].'</a>';}
else {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&amp;s=3&amp;Refresh='.$random.'&amp;token='.hesk_token_echo(0).'" title="'.$hesklang['close_action'].'">'.$hesklang['close_action'].'</a>';} ?></p>
</div>
</div>
<div class="row medLowPriority">
<?php //This entire conditional is all just for priority
if ($hesk_settings['cust_urgency'])
{
$repliesColumnWidth = 2;
echo '<div class="col-md-2 col-sm-12 ticket-cell ';
if ($ticket['priority'] == 0) {echo 'criticalPriority">';}
elseif ($ticket['priority'] == 1) {echo 'highPriority">';}
else {echo 'medLowPriority">';}
echo '<p class="ticketPropertyTitle">'.$hesklang['priority'].'</p>';
if ($ticket['priority']==0) {echo '<p class="ticketPropertyText">'.$hesklang['critical'].'</p>';}
elseif ($ticket['priority']==1) {echo '<p class="ticketPropertyText">'.$hesklang['high'].'</p>';}
elseif ($ticket['priority']==2) {echo '<p class="ticketPropertyText">'.$hesklang['medium'].'</p>';}
else {echo '<p class="ticketPropertyText">'.$hesklang['low'].'</p>';}
echo '</div>';
}
?>
<h3 align="left"><?php echo $hesklang['view_ticket']; ?>: <?php
if ($hesk_settings['sequential'])
{
echo $trackingID.' ('.$hesklang['seqid'].': '.$ticket['id'].')';
}
else
{
echo $trackingID;
}
?></h3>
<div class="footerWithBorder"></div>
<div class="blankSpace"></div>
<table class="table table-bordered">
<tr>
<td colspan="20" style="border-bottom: 0px;">
<h2><?php echo $ticket['subject']; ?></h2>
</td>
</tr>
<tr>
<td colspan="10" style="border-width: 0px">
<p><?php echo $hesklang['created_on']; ?>: <?php echo hesk_date($ticket['dt']); ?>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $hesklang['last_update']; ?>: <?php echo hesk_date($ticket['lastchange']); ?></p>
</td>
<td colspan="10" style="border-width: 0px; text-align: right;">
<p><?php $random=rand(10000,99999);
if ($ticket['isClosed'] == true && $ticket['locked'] != 1 && $hesk_settings['custopen']) {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&amp;s=2&amp;Refresh='.$random.'&amp;token='.hesk_token_echo(0).'" title="'.$hesklang['open_action'].'">'.$hesklang['open_action'].'</a>';}
else {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&amp;s=3&amp;Refresh='.$random.'&amp;token='.hesk_token_echo(0).'" title="'.$hesklang['close_action'].'">'.$hesklang['close_action'].'</a>';} ?></p>
</td>
</tr>
<tr class="medLowPriority">
<?php //This entire conditional is all just for priority
if ($hesk_settings['cust_urgency'])
{
$hesk_settings['ticketColumnWidth'] = 4;
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'" ';
if ($ticket['priority'] == 0) {echo 'class="criticalPriority">';}
elseif ($ticket['priority'] == 1) {echo 'class="highPriority">';}
else {echo 'class="medLowPriority">';}
echo '<p class="ticketPropertyTitle">'.$hesklang['priority'].'</p>';
if ($ticket['priority']==0) {echo '<p class="ticketPropertyText">'.$hesklang['critical'].'</p>';}
elseif ($ticket['priority']==1) {echo '<p class="ticketPropertyText">'.$hesklang['high'].'</p>';}
elseif ($ticket['priority']==2) {echo '<p class="ticketPropertyText">'.$hesklang['medium'].'</p>';}
else {echo '<p class="ticketPropertyText">'.$hesklang['low'].'</p>';}
echo '</td>';
}
else
{
$hesk_settings['ticketColumnWidth'] = 5;
}
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['status'].'</p>';
$ticketStatusKey = $ticket['statusKey'];
echo '<p class="ticketPropertyText">'.$hesklang[$ticketStatusKey].'</p>';
echo '</td>';
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['last_replier'].'</p>
<p class="ticketPropertyText">'.$ticket['repliername'].'</p></td>';
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['category'].'</p>
<p class="ticketPropertyText">'.$category['name'].'</p></td>';
echo '<td colspan="'.$hesk_settings['ticketColumnWidth'].'"><p class="ticketPropertyTitle">'.$hesklang['replies'].'</p>
<p class="ticketPropertyText">'.$replies.'</p></td>';
?>
</tr>
</table>
<!-- REPLIES -->
else
{
$repliesColumnWidth = 3;
}
echo '<div class="col-md-3 col-sm-12 ticket-cell"><p class="ticketPropertyTitle">'.$hesklang['status'].'</p>';
$ticketStatusKey = $ticket['statusKey'];
echo '<p class="ticketPropertyText">'.$hesklang[$ticketStatusKey].'</p>';
echo '</div>';
echo '<div class="col-md-3 col-sm-12 ticket-cell"><p class="ticketPropertyTitle">'.$hesklang['last_replier'].'</p>
<p class="ticketPropertyText">'.$ticket['repliername'].'</p></div>';
echo '<div class="col-md-'.$repliesColumnWidth.' col-sm-12 ticket-cell"><p class="ticketPropertyTitle">'.$hesklang['category'].'</p>
<p class="ticketPropertyText">'.$category['name'].'</p></div>';
echo '<div class="col-md-'.$repliesColumnWidth.' col-sm-12 ticket-cell"><p class="ticketPropertyTitle">'.$hesklang['replies'].'</p>
<p class="ticketPropertyText">'.$replies.'</p></div>';
?>
</div>
</div>
<div class="blankSpace"></div>
<!-- REPLIES -->
<?php
if ($hesk_settings['new_top'])
{
$i = hesk_printCustomerTicketReplies() ? 0 : 1;
}
else
{
$i = 1;
}
<?php
if ($hesk_settings['new_top'])
{
$i = hesk_printCustomerTicketReplies() ? 0 : 1;
}
else
{
$i = 1;
}
/* Make sure original message is in correct color if newest are on top */
$color = 'class="ticketMessageContainer"';
?>
<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>
<div class="col-md-9 col-xs-12 pushMarginLeft">
<div class="ticketMessageTop withBorder">
<!-- Date and Action buttons -->
<p><?php echo $hesklang['date']; ?>: <?php echo hesk_date($ticket['dt']); ?><span style="float: right"><?php echo hesk_getCustomerButtons($i); ?></span></p>
<!-- Custom Fields Before Message -->
<?php
foreach ($hesk_settings['custom_fields'] as $k=>$v)
/* Make sure original message is in correct color if newest are on top */
$color = 'class="ticketMessageContainer"';
?>
<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>
<div class="col-md-9 col-xs-12 pushMarginLeft">
<div class="ticketMessageTop withBorder">
<!-- Date and Action buttons -->
<p><?php echo $hesklang['date']; ?>: <?php echo hesk_date($ticket['dt'], true); ?><span style="float: right"><?php echo hesk_getCustomerButtons($i); ?></span></p>
<!-- Custom Fields Before Message -->
<?php
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'] && $v['place']==0)
{
if ($v['use'] && $v['place']==0)
if ($modsForHesk_settings['custom_field_setting'])
{
echo '
<p>'.$v['name'].': '.$ticket[$k].'</p>';
$v['name'] = $hesklang[$v['name']];
}
echo '<p>'.$v['name'].': ';
if ($v['type'] == 'date' && !empty($ticket[$k]))
{
$dt = date('Y-m-d h:i:s', $ticket[$k]);
echo hesk_dateToString($dt, 0);
} else
{
echo $ticket[$k];
}
echo '</p>';
}
?>
</div>
<div class="ticketMessageBottom">
<!-- Message -->
<p><b><?php echo $hesklang['message']; ?>:</b></p>
<p class="message"><?php echo $ticket['message']; ?><br />&nbsp;</p>
</div>
<div class="ticketMessageTop">
<!-- Custom Fields after Message -->
<?php
foreach ($hesk_settings['custom_fields'] as $k=>$v)
}
?>
</div>
<div class="ticketMessageBottom">
<!-- Message -->
<p><b><?php echo $hesklang['message']; ?>:</b></p>
<p class="message"><?php echo $ticket['message']; ?><br />&nbsp;</p>
</div>
<div class="ticketMessageTop">
<!-- Custom Fields after Message -->
<?php
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'] && $v['place'])
{
if ($v['use'] && $v['place'])
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
echo '<p>'.$v['name'].': ';
if ($v['type'] == 'date' && !empty($ticket[$k]))
{
$dt = date('Y-m-d h:i:s', $ticket[$k]);
echo hesk_dateToString($dt, 0);
} else
{
echo '
<p>'.$v['name'].': '.$ticket[$k].'</p>';
echo $ticket[$k];
}
echo '</p>';
}
/* Attachments */
hesk_listAttachments($ticket['attachments'], $i);
?>
</div>
}
/* Attachments */
hesk_listAttachments($ticket['attachments'], $i);
?>
</div>
</div>
<?php
if ( ! $hesk_settings['new_top'])
</div>
<?php
if ( ! $hesk_settings['new_top'])
{
hesk_printCustomerTicketReplies();
}
?>
<!-- END REPLIES -->
<?php
// Print "Submit a reply" form?
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && $hesk_settings['reply_top'] == 1)
{
hesk_printCustomerTicketReplies();
hesk_printCustomerReplyForm();
}
?>
<!-- END REPLIES -->
<?php
// Print "Submit a reply" form?
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && $hesk_settings['reply_top'] == 1)
{
hesk_printCustomerReplyForm();
}
?>
?>
<?php
/* Print "Submit a reply" form? */
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && ! $hesk_settings['reply_top'])
{
hesk_printCustomerReplyForm();
}
<?php
/* Print "Submit a reply" form? */
if ($ticket['locked'] != 1 && $ticket['status'] != 3 && ! $hesk_settings['reply_top'])
{
hesk_printCustomerReplyForm();
}
/* If needed update unread replies as read for staff to know */
if ( count($unread_replies) )
{
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `read` = '1' WHERE `id` IN ('".implode("','", $unread_replies)."')");
}
?>
</div> <!-- End col-md-7 -->
</div> <!-- End row -->
</div> <!-- End enclosingDashboard-->
/* If needed update unread replies as read for staff to know */
if ( count($unread_replies) )
{
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `read` = '1' WHERE `id` IN ('".implode("','", $unread_replies)."')");
}
?>
</div> <!-- End col-md-7 -->
</div> <!-- End row -->
@ -428,87 +441,82 @@ function print_form()
<li class="active"><?php echo $hesklang['view_ticket_nav']; ?></li>
</ol>
<div class="enclosingDashboard">
<div class="row">
<div align="left" class="col-md-4">
<div class="moreToLeft">
<ul class="nav nav-tabs">
<li class="active"><a href="#" onclick="return false;"><?php echo $hesklang['quick_help']; ?></a></li>
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<p><?php echo $hesklang['quick_help_view_ticket']; ?></p>
</div>
</div>
</div>
<div class="row">
<div align="left" class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<?php echo $hesklang['quick_help']; ?>
</div>
<div class="panel-body">
<p><?php echo $hesklang['quick_help_view_ticket']; ?></p>
</div>
</div>
<div class="col-md-7">
</div>
<div class="col-md-8">
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
?>
<h3 align="left"><?php echo $hesklang['view_existing']; ?></h3>
<div class="footerWithBorder"></div>
<div class="blankSpace"></div>
<form action="ticket.php" class="form-horizontal" role="form" method="get" name="form2">
<div class="form-group">
<label for="track" class="col-sm-3 control-label"><?php echo $hesklang['ticket_trackID']; ?></label>
<div class="col-sm-9">
<input type="text" class="form-control" name="track" id="track" maxlength="20" size="35" value="<?php echo $trackingID; ?>" placeholder="<?php echo $hesklang['ticket_trackID']; ?>">
</div>
</div>
<?php
/* This will handle error, success and notice messages */
hesk_handle_messages();
$tmp = '';
if ($hesk_settings['email_view_ticket'])
{
$tmp = 'document.form1.email.value=document.form2.e.value;';
?>
<h3 align="left"><?php echo $hesklang['view_existing']; ?></h3>
<div class="footerWithBorder"></div>
<div class="form-group">
<label for="e" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?></label>
<div class="col-sm-9">
<input type="text" class="form-control" id="e" name="e" size="35" value="<?php echo $my_email; ?>" placeholder="<?php echo $hesklang['email']; ?>" />
</div>
</div>
<div align="left" class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div class="checkbox">
<label>
<input type="checkbox" name="r" value="Y" <?php echo $do_remember; ?> /> <?php echo $hesklang['rem_email']; ?>
</label>
</div>
</div>
</div>
<?php } ?>
<div align="left" class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-default" value="<?php echo $hesklang['view_ticket']; ?>"><?php echo $hesklang['view_ticket']; ?></button>
<input type="hidden" name="Refresh" value="<?php echo rand(10000,99999); ?>"><input type="hidden" name="f" value="1">
<div class="blankSpace"></div>
<a href="Javascript:void(0)" onclick="javascript:hesk_toggleLayerDisplay('forgot');<?php echo $tmp; ?>"><?php echo $hesklang['forgot_tid'];?></a>
</div>
</div>
</form>
<div align="left" id="forgot" class="alert alert-info" style="display: <?php echo $display; ?>;">
<p><?php echo $hesklang['tid_mail']; ?></p>
<div class="blankSpace"></div>
<form action="ticket.php" class="form-horizontal" role="form" method="get" name="form2">
<form action="index.php" method="post" class="form-horizontal" name="form1">
<div class="form-group">
<label for="track" class="col-sm-3 control-label"><?php echo $hesklang['ticket_trackID']; ?></label>
<label for="email" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?></label>
<div class="col-sm-9">
<input type="text" class="form-control" name="track" id="track" maxlength="20" size="35" value="<?php echo $trackingID; ?>" placeholder="<?php echo $hesklang['ticket_trackID']; ?>">
<input type="text" id="email" class="form-control" name="email" size="35" value="<?php echo $my_email; ?>" placeholder="<?php echo $hesklang['email']; ?>"/><input type="hidden" name="a" value="forgot_tid" />
</div>
</div>
<?php
$tmp = '';
if ($hesk_settings['email_view_ticket'])
{
$tmp = 'document.form1.email.value=document.form2.e.value;';
?>
<div class="form-group">
<label for="e" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?></label>
<div class="col-sm-9">
<input type="text" class="form-control" id="e" name="e" size="35" value="<?php echo $my_email; ?>" placeholder="<?php echo $hesklang['email']; ?>" />
</div>
</div>
<div align="left" class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div class="checkbox">
<label>
<input type="checkbox" name="r" value="Y" <?php echo $do_remember; ?> /> <?php echo $hesklang['rem_email']; ?>
</label>
</div>
</div>
</div>
<?php } ?>
<div align="left" class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-default" value="<?php echo $hesklang['view_ticket']; ?>"><?php echo $hesklang['view_ticket']; ?></button>
<input type="hidden" name="Refresh" value="<?php echo rand(10000,99999); ?>"><input type="hidden" name="f" value="1">
<div class="blankSpace"></div>
<a href="Javascript:void(0)" onclick="javascript:hesk_toggleLayerDisplay('forgot');<?php echo $tmp; ?>"><?php echo $hesklang['forgot_tid'];?></a>
<button type="submit" class="btn btn-default" value="<?php echo $hesklang['tid_send']; ?>"><?php echo $hesklang['tid_send']; ?></button>
</div>
</div>
</form>
<div align="left" id="forgot" class="alert alert-info" style="display: <?php echo $display; ?>;">
<p><?php echo $hesklang['tid_mail']; ?></p>
<div class="blankSpace"></div>
<form action="index.php" method="post" class="form-horizontal" name="form1">
<div class="form-group">
<label for="email" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?></label>
<div class="col-sm-9">
<input type="text" id="email" class="form-control" name="email" size="35" value="<?php echo $my_email; ?>" placeholder="<?php echo $hesklang['email']; ?>"/><input type="hidden" name="a" value="forgot_tid" />
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-default" value="<?php echo $hesklang['tid_send']; ?>"><?php echo $hesklang['tid_send']; ?></button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php
require_once(HESK_PATH . 'inc/footer.inc.php');
@ -528,7 +536,7 @@ function hesk_printCustomerReplyForm($reopen=0)
?>
<h3 style="text-align:left"><?php echo $hesklang['add_reply']; ?></h3>
<h3 class="text-left"><?php echo $hesklang['add_reply']; ?></h3>
<div class="footerWithBorder"></div>
<div class="blankSpace"></div>
@ -546,7 +554,7 @@ function hesk_printCustomerReplyForm($reopen=0)
?>
<div class="form-group">
<label for="attachments" class="col-sm-3 control-label"><?php echo $hesklang['attachments']; ?>:</label>
<div class="col-sm-9" style="text-align: left">
<div class="col-sm-9 text-left">
<?php
for ($i=1;$i<=$hesk_settings['attachments']['max_number'];$i++)
{
@ -598,7 +606,7 @@ function hesk_printCustomerTicketReplies()
$unread_replies[] = $reply['id'];
}
$reply['dt'] = hesk_date($reply['dt']);
$reply['dt'] = hesk_date($reply['dt'], true);
?>
<div class="row ticketMessageContainer">

@ -0,0 +1,128 @@
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','./');
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
hesk_load_database_functions();
require(HESK_PATH . 'inc/posting_functions.inc.php');
require(HESK_PATH . 'inc/email_functions.inc.php');
require_once(HESK_PATH . 'inc/header.inc.php');
?>
<ol class="breadcrumb">
<li><a href="<?php echo $hesk_settings['site_url']; ?>"><?php echo $hesk_settings['site_title']; ?></a></li>
<li><a href="<?php echo $hesk_settings['hesk_url']; ?>"><?php echo $hesk_settings['hesk_title']; ?></a></li>
<li class="active"><?php echo $hesklang['verify_email']; ?></li>
</ol>
<div class="row">
<div class="col-md-8 col-md-offset-2 col-sm-12">
<h3><?php echo $hesklang['verify_email']; ?></h3>
<div class="footerWithBorder blankSpace"></div>
<?php
$showForm = true;
if (isset($_GET['key']) || isset($_POST['key']))
{
$key = isset($_GET['key'])
? $_GET['key']
: $_POST['key'];
$submittedTickets = array();
$email = '';
hesk_dbConnect();
$getRs = hesk_dbQuery("SELECT `Email` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails`
WHERE `ActivationKey` = '".hesk_dbEscape($key)."'");
while ($result = $getRs->fetch_assoc())
{
$email = $result['Email'];
$ticketRs = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets`
WHERE `email` = '".hesk_dbEscape($result['Email'])."'");
while ($innerResult = $ticketRs->fetch_assoc())
{
$ticket = hesk_newTicket($innerResult);
// Notify the customer
hesk_notifyCustomer();
// Need to notify staff?
// --> From autoassign?
$getOwnerRs = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE ID = ".hesk_dbEscape($ticket['owner']));
$autoassign_owner = $getOwnerRs->fetch_assoc();
if ($ticket['owner'] && $autoassign_owner['notify_assigned'])
{
hesk_notifyAssignedStaff($autoassign_owner, 'ticket_assigned_to_you');
}
// --> No autoassign, find and notify appropriate staff
elseif ( ! $ticket['owner'] )
{
hesk_notifyStaff('new_ticket_staff', " `notify_new_unassigned` = '1' ");
}
array_push($submittedTickets, $innerResult['trackid']);
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets`
WHERE `id` = ".$innerResult['id']);
}
//Add email address to the verified emails table
hesk_dbQuery('INSERT INTO `'.hesk_dbEscape($hesk_settings['db_pfix']).'verified_emails` (`Email`) VALUES (\''.hesk_dbEscape($email).'\')');
}
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails`
WHERE `ActivationKey` = '".hesk_dbEscape($key)."'");
//-- was there an email recorded for the key?
if (!empty($email))
{
$showForm = false;
?>
<div class="alert alert-success">
<p><i class="fa fa-check"></i> <?php echo sprintf($hesklang['email_verified'], $email) ?></p>
<ul>
<?php
foreach ($submittedTickets as $ticket)
{
echo '<li><a href="'.$hesk_settings['hesk_url'].'/ticket.php?track='.$ticket.'">'.$ticket.'</a></li>';
}
if (count($submittedTickets) == 0)
{
echo '<li>'.$hesklang['no_tickets_created'].'</li>';
}
?>
</ul>
</div>
<?php
} else
{
//-- no tickets were activated. invalid key, or was email already activated??
?>
<div class="alert alert-warning">
<p><i class="fa fa-exclamation-triangle"></i> <?php echo $hesklang['verify_no_records']; ?></p>
</div>
<?php
}
}
if ($showForm) {
?>
<form class="form-horizontal" action="verifyemail.php" method="post">
<div class="form-group">
<label for="key" class="col-sm-3 control-label"><?php echo $hesklang['activation_key']; ?></label>
<div class="col-sm-9">
<input type="text" class="form-control" id="key" name="key" placeholder="<?php echo $hesklang['activation_key']; ?>">
</div>
</div>
<div class="form-group">
<div class="col-sm-9 col-sm-offset-3">
<input type="submit" class="btn btn-default" value="<?php echo $hesklang['verify_email']; ?>">
</div>
</div>
</form>
<?php
}
?>
</div>
</div>
<?php
require_once(HESK_PATH . 'inc/footer.inc.php');
?>
Loading…
Cancel
Save