Merge branch 'master' into service-messages
Conflicts: language/en/text.php
This commit is contained in:
commit
9defb24235
2
.gitignore
vendored
2
.gitignore
vendored
@ -257,6 +257,8 @@ language/en/emails/new_ticket_staff.txt
|
||||
language/en/emails/ticket_assigned_to_you.txt
|
||||
language/en/index.htm
|
||||
language/index.htm
|
||||
language/*
|
||||
!language/en
|
||||
print_sec_img.php
|
||||
rate.php
|
||||
readme.html
|
||||
|
@ -3,8 +3,8 @@ So you want to contribute to Mods for HESK? Awesome! However, there are a few gu
|
||||
|
||||
## Submitting an issue
|
||||
If all you are doing is submitting an issue, please check if your "issue" qualifies as a GitHub issue:
|
||||
- **Feature Requests:** Feature requests are now being recorded at the Mods for HESK [UserVoice page](https://mods-for-hesk.uservoice.com/forums/254758-general). Please do not open these types of issues on GitHub.
|
||||
- **Translations:** Translations are now being recorded at the official Mods for HESK [translations topic](http://developers.phpjunkyard.com/viewtopic.php?f=19&t=5217). Please do not open these types of issues on GitHub.
|
||||
- **Feature Requests:** Feature requests are now being recorded at the Mods for HESK [UserVoice page](https://mods-for-hesk.uservoice.com/forums/254758-general). Please do not open these types of issues on GitHub. Issues opened that are "feature requests" will be closed.
|
||||
- **Translations:** Translations are now being recorded at the official Mods for HESK [translations topic](http://developers.phpjunkyard.com/viewtopic.php?f=19&t=5217). Please do not open these types of issues on GitHub. Issues opened that pertain to submitting new translations will be closed.
|
||||
- **Bugs:** Yes, please open these types of issues here. :grinning:
|
||||
|
||||
## Getting Started
|
||||
|
427
LICENSE
Normal file
427
LICENSE
Normal file
@ -0,0 +1,427 @@
|
||||
NOTE: This license only applies to Mods for HESK. It does not apply to HESK.
|
||||
|
||||
Attribution-ShareAlike 4.0 International
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||
does not provide legal services or legal advice. Distribution of
|
||||
Creative Commons public licenses does not create a lawyer-client or
|
||||
other relationship. Creative Commons makes its licenses and related
|
||||
information available on an "as-is" basis. Creative Commons gives no
|
||||
warranties regarding its licenses, any material licensed under their
|
||||
terms and conditions, or any related information. Creative Commons
|
||||
disclaims all liability for damages resulting from their use to the
|
||||
fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and
|
||||
conditions that creators and other rights holders may use to share
|
||||
original works of authorship and other material subject to copyright
|
||||
and certain other rights specified in the public license below. The
|
||||
following considerations are for informational purposes only, are not
|
||||
exhaustive, and do not form part of our licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are
|
||||
intended for use by those authorized to give the public
|
||||
permission to use material in ways otherwise restricted by
|
||||
copyright and certain other rights. Our licenses are
|
||||
irrevocable. Licensors should read and understand the terms
|
||||
and conditions of the license they choose before applying it.
|
||||
Licensors should also secure all rights necessary before
|
||||
applying our licenses so that the public can reuse the
|
||||
material as expected. Licensors should clearly mark any
|
||||
material not subject to the license. This includes other CC-
|
||||
licensed material, or material used under an exception or
|
||||
limitation to copyright. More considerations for licensors:
|
||||
wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public
|
||||
licenses, a licensor grants the public permission to use the
|
||||
licensed material under specified terms and conditions. If
|
||||
the licensor's permission is not necessary for any reason--for
|
||||
example, because of any applicable exception or limitation to
|
||||
copyright--then that use is not regulated by the license. Our
|
||||
licenses grant only permissions under copyright and certain
|
||||
other rights that a licensor has authority to grant. Use of
|
||||
the licensed material may still be restricted for other
|
||||
reasons, including because others have copyright or other
|
||||
rights in the material. A licensor may make special requests,
|
||||
such as asking that all changes be marked or described.
|
||||
Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More_considerations
|
||||
for the public:
|
||||
wiki.creativecommons.org/Considerations_for_licensees
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons Attribution-ShareAlike 4.0 International Public
|
||||
License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree
|
||||
to be bound by the terms and conditions of this Creative Commons
|
||||
Attribution-ShareAlike 4.0 International Public License ("Public
|
||||
License"). To the extent this Public License may be interpreted as a
|
||||
contract, You are granted the Licensed Rights in consideration of Your
|
||||
acceptance of these terms and conditions, and the Licensor grants You
|
||||
such rights in consideration of benefits the Licensor receives from
|
||||
making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
|
||||
Section 1 -- Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar
|
||||
Rights that is derived from or based upon the Licensed Material
|
||||
and in which the Licensed Material is translated, altered,
|
||||
arranged, transformed, or otherwise modified in a manner requiring
|
||||
permission under the Copyright and Similar Rights held by the
|
||||
Licensor. For purposes of this Public License, where the Licensed
|
||||
Material is a musical work, performance, or sound recording,
|
||||
Adapted Material is always produced where the Licensed Material is
|
||||
synched in timed relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright
|
||||
and Similar Rights in Your contributions to Adapted Material in
|
||||
accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-SA Compatible License means a license listed at
|
||||
creativecommons.org/compatiblelicenses, approved by Creative
|
||||
Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights
|
||||
closely related to copyright including, without limitation,
|
||||
performance, broadcast, sound recording, and Sui Generis Database
|
||||
Rights, without regard to how the rights are labeled or
|
||||
categorized. For purposes of this Public License, the rights
|
||||
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||
Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the
|
||||
absence of proper authority, may not be circumvented under laws
|
||||
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||
Treaty adopted on December 20, 1996, and/or similar international
|
||||
agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||
any other exception or limitation to Copyright and Similar Rights
|
||||
that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name
|
||||
of a Creative Commons Public License. The License Elements of this
|
||||
Public License are Attribution and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database,
|
||||
or other material to which the Licensor applied this Public
|
||||
License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the
|
||||
terms and conditions of this Public License, which are limited to
|
||||
all Copyright and Similar Rights that apply to Your use of the
|
||||
Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights
|
||||
under this Public License.
|
||||
|
||||
k. Share means to provide material to the public by any means or
|
||||
process that requires permission under the Licensed Rights, such
|
||||
as reproduction, public display, public performance, distribution,
|
||||
dissemination, communication, or importation, and to make material
|
||||
available to the public including in ways that members of the
|
||||
public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
l. Sui Generis Database Rights means rights other than copyright
|
||||
resulting from Directive 96/9/EC of the European Parliament and of
|
||||
the Council of 11 March 1996 on the legal protection of databases,
|
||||
as amended and/or succeeded, as well as other essentially
|
||||
equivalent rights anywhere in the world.
|
||||
|
||||
m. You means the individual or entity exercising the Licensed Rights
|
||||
under this Public License. Your has a corresponding meaning.
|
||||
|
||||
|
||||
Section 2 -- Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License,
|
||||
the Licensor hereby grants You a worldwide, royalty-free,
|
||||
non-sublicensable, non-exclusive, irrevocable license to
|
||||
exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
a. reproduce and Share the Licensed Material, in whole or
|
||||
in part; and
|
||||
|
||||
b. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||
Exceptions and Limitations apply to Your use, this Public
|
||||
License does not apply, and You do not need to comply with
|
||||
its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section
|
||||
6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The
|
||||
Licensor authorizes You to exercise the Licensed Rights in
|
||||
all media and formats whether now known or hereafter created,
|
||||
and to make technical modifications necessary to do so. The
|
||||
Licensor waives and/or agrees not to assert any right or
|
||||
authority to forbid You from making technical modifications
|
||||
necessary to exercise the Licensed Rights, including
|
||||
technical modifications necessary to circumvent Effective
|
||||
Technological Measures. For purposes of this Public License,
|
||||
simply making modifications authorized by this Section 2(a)
|
||||
(4) never produces Adapted Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
a. Offer from the Licensor -- Licensed Material. Every
|
||||
recipient of the Licensed Material automatically
|
||||
receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this
|
||||
Public License.
|
||||
|
||||
b. Additional offer from the Licensor -- Adapted Material.
|
||||
Every recipient of Adapted Material from You
|
||||
automatically receives an offer from the Licensor to
|
||||
exercise the Licensed Rights in the Adapted Material
|
||||
under the conditions of the Adapter's License You apply.
|
||||
|
||||
c. No downstream restrictions. You may not offer or impose
|
||||
any additional or different terms or conditions on, or
|
||||
apply any Effective Technological Measures to, the
|
||||
Licensed Material if doing so restricts exercise of the
|
||||
Licensed Rights by any recipient of the Licensed
|
||||
Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or
|
||||
may be construed as permission to assert or imply that You
|
||||
are, or that Your use of the Licensed Material is, connected
|
||||
with, or sponsored, endorsed, or granted official status by,
|
||||
the Licensor or others designated to receive attribution as
|
||||
provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not
|
||||
licensed under this Public License, nor are publicity,
|
||||
privacy, and/or other similar personality rights; however, to
|
||||
the extent possible, the Licensor waives and/or agrees not to
|
||||
assert any such rights held by the Licensor to the limited
|
||||
extent necessary to allow You to exercise the Licensed
|
||||
Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this
|
||||
Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to
|
||||
collect royalties from You for the exercise of the Licensed
|
||||
Rights, whether directly or through a collecting society
|
||||
under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly
|
||||
reserves any right to collect such royalties.
|
||||
|
||||
|
||||
Section 3 -- License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the
|
||||
following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified
|
||||
form), You must:
|
||||
|
||||
a. retain the following if it is supplied by the Licensor
|
||||
with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed
|
||||
Material and any others designated to receive
|
||||
attribution, in any reasonable manner requested by
|
||||
the Licensor (including by pseudonym if
|
||||
designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of
|
||||
warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the
|
||||
extent reasonably practicable;
|
||||
|
||||
b. indicate if You modified the Licensed Material and
|
||||
retain an indication of any previous modifications; and
|
||||
|
||||
c. indicate the Licensed Material is licensed under this
|
||||
Public License, and include the text of, or the URI or
|
||||
hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||
reasonable manner based on the medium, means, and context in
|
||||
which You Share the Licensed Material. For example, it may be
|
||||
reasonable to satisfy the conditions by providing a URI or
|
||||
hyperlink to a resource that includes the required
|
||||
information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the
|
||||
information required by Section 3(a)(1)(A) to the extent
|
||||
reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share
|
||||
Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter's License You apply must be a Creative Commons
|
||||
license with the same License Elements, this version or
|
||||
later, or a BY-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the
|
||||
Adapter's License You apply. You may satisfy this condition
|
||||
in any reasonable manner based on the medium, means, and
|
||||
context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms
|
||||
or conditions on, or apply any Effective Technological
|
||||
Measures to, Adapted Material that restrict exercise of the
|
||||
rights granted under the Adapter's License You apply.
|
||||
|
||||
|
||||
Section 4 -- Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that
|
||||
apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||
to extract, reuse, reproduce, and Share all or a substantial
|
||||
portion of the contents of the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database
|
||||
contents in a database in which You have Sui Generis Database
|
||||
Rights, then the database in which You have Sui Generis Database
|
||||
Rights (but not its individual contents) is Adapted Material,
|
||||
|
||||
including for purposes of Section 3(b); and
|
||||
c. You must comply with the conditions in Section 3(a) if You Share
|
||||
all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not
|
||||
replace Your obligations under this Public License where the Licensed
|
||||
Rights include other Copyright and Similar Rights.
|
||||
|
||||
|
||||
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||
|
||||
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided
|
||||
above shall be interpreted in a manner that, to the extent
|
||||
possible, most closely approximates an absolute disclaimer and
|
||||
waiver of all liability.
|
||||
|
||||
|
||||
Section 6 -- Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and
|
||||
Similar Rights licensed here. However, if You fail to comply with
|
||||
this Public License, then Your rights under this Public License
|
||||
terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under
|
||||
Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided
|
||||
it is cured within 30 days of Your discovery of the
|
||||
violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||
right the Licensor may have to seek remedies for Your violations
|
||||
of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the
|
||||
Licensed Material under separate terms or conditions or stop
|
||||
distributing the Licensed Material at any time; however, doing so
|
||||
will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||
License.
|
||||
|
||||
|
||||
Section 7 -- Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different
|
||||
terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the
|
||||
Licensed Material not stated herein are separate from and
|
||||
independent of the terms and conditions of this Public License.
|
||||
|
||||
|
||||
Section 8 -- Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and
|
||||
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||
conditions on any use of the Licensed Material that could lawfully
|
||||
be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is
|
||||
deemed unenforceable, it shall be automatically reformed to the
|
||||
minimum extent necessary to make it enforceable. If the provision
|
||||
cannot be reformed, it shall be severed from this Public License
|
||||
without affecting the enforceability of the remaining terms and
|
||||
conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no
|
||||
failure to comply consented to unless expressly agreed to by the
|
||||
Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted
|
||||
as a limitation upon, or waiver of, any privileges and immunities
|
||||
that apply to the Licensor or You, including from the legal
|
||||
processes of any jurisdiction or authority.
|
||||
|
||||
|
||||
=======================================================================
|
||||
|
||||
Creative Commons is not a party to its public licenses.
|
||||
Notwithstanding, Creative Commons may elect to apply one of its public
|
||||
licenses to material it publishes and in those instances will be
|
||||
considered the "Licensor." Except for the limited purpose of indicating
|
||||
that material is shared under a Creative Commons public license or as
|
||||
otherwise permitted by the Creative Commons policies published at
|
||||
creativecommons.org/policies, Creative Commons does not authorize the
|
||||
use of the trademark "Creative Commons" or any other trademark or logo
|
||||
of Creative Commons without its prior written consent including,
|
||||
without limitation, in connection with any unauthorized modifications
|
||||
to any of its public licenses or any other arrangements,
|
||||
understandings, or agreements concerning use of licensed material. For
|
||||
the avoidance of doubt, this paragraph does not form part of the public
|
||||
licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
@ -1,8 +1,9 @@
|
||||
## [Mods for HESK](http://mods-for-hesk.mkochcs.com) v2.0.1
|
||||
## [Mods for HESK](http://mods-for-hesk.mkochcs.com) [](https://www.github.com/mkoch227/Mods-for-HESK/releases) [](https://www.github.com/mkoch227/Mods-for-HESK)
|
||||
[](https://waffle.io/mkoch227/Mods-For-Hesk)
|
||||
[](https://github.com/mkoch227/Mods-for-HESK/blob/master/LICENSE)
|
||||
[](https://gitter.im/mkoch227/Mods-for-HESK?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
Mods for HESK is a set of modifications for HESK v2.6.1, a free and popular helpdesk solution.
|
||||
Mods for HESK is a set of modifications for [HESK](http://www.hesk.com) v2.6.2, a free and popular helpdesk solution.
|
||||
|
||||
## Features
|
||||
- A new, responsive user interface
|
||||
@ -50,8 +51,8 @@ Mods for HESK will be maintained under the Semantic Versioning guidelines as muc
|
||||
`<major>.<minor>.<patch>`
|
||||
|
||||
And constructed with the following guidelines:
|
||||
- Breaking backward compatibility bumps the major (and resets the minor and patch)
|
||||
- New additions, including new minor features, without breaking backward compatibility bumps the minor (and resets the patch)
|
||||
- Updates to ensure compatibility with new minor/major versions of HESK bumps the major
|
||||
- New additions, including new minor features, without breaking backward compatibility, or updates to patch versions of HESK bumps the minor (and resets the patch)
|
||||
- Bug fixes and misc minor changes bumps the patch
|
||||
|
||||
For more information on SemVer, please visit http://semver.org.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* 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-10 col-md-offset-1" style="padding-top: 20px">
|
||||
<div class="col-md-12" style="padding-top: 20px">
|
||||
<?php
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -197,7 +197,7 @@ if ($hesk_settings['attachments']['use'] && !empty($attachments))
|
||||
foreach ($attachments as $myatt)
|
||||
{
|
||||
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` (`ticket_id`,`saved_name`,`real_name`,`size`) VALUES ('".hesk_dbEscape($trackingID)."','".hesk_dbEscape($myatt['saved_name'])."','".hesk_dbEscape($myatt['real_name'])."','".intval($myatt['size'])."')");
|
||||
$myattachments .= hesk_dbInsertID() . '#' . $myatt['real_name'] .',';
|
||||
$myattachments .= hesk_dbInsertID() . '#' . $myatt['real_name'] . '#' . $myatt['saved_name'] .',';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -102,49 +102,96 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?php echo $hesklang['installation_information']; ?></div>
|
||||
<table class="table table-striped">
|
||||
<tr><td class="text-right">
|
||||
<?php echo $hesklang['v']; ?>:
|
||||
<tr>
|
||||
<td class="text-right">
|
||||
<?php echo $hesklang['v']; ?>:
|
||||
</td>
|
||||
<td style="padding-left: 10px">
|
||||
<?php echo $hesk_settings['hesk_version']; ?>
|
||||
<?php
|
||||
$cellClass = '';
|
||||
if ($hesk_settings['check_updates'])
|
||||
{
|
||||
$latest = hesk_checkVersion();
|
||||
|
||||
if ($latest === true)
|
||||
{
|
||||
echo ' - <span style="color:green">' . $hesklang['hud'] . '</span> ';
|
||||
}
|
||||
elseif ($latest != -1)
|
||||
$cellClass = 'class="success"';
|
||||
} elseif ($latest != -1)
|
||||
{
|
||||
// Is this a beta/dev version?
|
||||
if ( strpos($hesk_settings['hesk_version'], 'beta') || strpos($hesk_settings['hesk_version'], 'dev') || strpos($hesk_settings['hesk_version'], 'RC') )
|
||||
$cellClass = 'class="warning"';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<td style="padding-left: 10px" <?php echo $cellClass; ?>>
|
||||
<?php echo $hesk_settings['hesk_version']; ?>
|
||||
<?php
|
||||
if ($hesk_settings['check_updates'])
|
||||
{
|
||||
|
||||
if ($latest === true)
|
||||
{
|
||||
echo ' <span style="color:darkorange">' . $hesklang['beta'] . '</span> '; ?> <a href="http://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
echo ' - <span style="color:green">' . $hesklang['hud'] . '</span> ';
|
||||
}
|
||||
elseif ($latest != -1)
|
||||
{
|
||||
// Is this a beta/dev version?
|
||||
if ( strpos($hesk_settings['hesk_version'], 'beta') || strpos($hesk_settings['hesk_version'], 'dev') || strpos($hesk_settings['hesk_version'], 'RC') )
|
||||
{
|
||||
echo ' <span style="color:darkorange">' . $hesklang['beta'] . '</span> '; ?> <a href="http://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ' - <span style="color:darkorange;font-weight:bold">' . $hesklang['hnw'] . '</span> '; ?> <a href="http://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['getup']; ?></a><?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ' - <span style="color:darkorange;font-weight:bold">' . $hesklang['hnw'] . '</span> '; ?> <a href="http://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['getup']; ?></a><?php
|
||||
?> - <a href="http://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?> - <a href="http://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?> - <a href="http://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a><?php
|
||||
}
|
||||
?>
|
||||
</td></tr>
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" style="padding-bottom: 5px">
|
||||
<?php echo $hesklang['mods_for_hesk_version']; ?>:
|
||||
</td>
|
||||
<td style="padding-left: 10px; padding-bottom: 5px">
|
||||
<?php
|
||||
$cellClass = '';
|
||||
if ($hesk_settings['check_updates'])
|
||||
{
|
||||
$latest = hesk_checkMfhVersion($modsForHeskVersion);
|
||||
if ($latest === true)
|
||||
{
|
||||
$cellClass = 'class="success"';
|
||||
} elseif ($latest != -1)
|
||||
{
|
||||
$cellClass = 'class="warning"';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<td <?php echo $cellClass; ?> style="padding-left: 10px; padding-bottom: 5px">
|
||||
<?php echo $modsForHeskVersion; ?>
|
||||
<?php
|
||||
if ($hesk_settings['check_updates'])
|
||||
{
|
||||
if ($latest === true)
|
||||
{
|
||||
echo ' - <span style="color:green">' . $hesklang['mfh_up_to_date'] . '</span>';
|
||||
} else
|
||||
{
|
||||
?> - <a href="http://mods-for-hesk.mkochcs.com" target="_blank" style="color:orange;font-weight:bold"><?php echo $hesklang['hnw']; ?></a>
|
||||
<?php
|
||||
}
|
||||
} else
|
||||
{
|
||||
?> - <a href="http://mods-for-hesk.mkochcs.com?checkVersion.php?v=<?php echo $modsForHeskVersion; ?>" target="_blank"><?php echo $hesklang['check4updates']; ?></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="text-right">
|
||||
@ -487,31 +534,31 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_site_title" class="col-sm-3 control-label"><?php echo $hesklang['wbst_title']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#1','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="s_site_title" size="40" maxlength="255" value="<?php echo $hesk_settings['site_title']; ?>" placeholder="<?php echo $hesklang['wbst_title']; ?>" />
|
||||
<input type="text" class="form-control" name="s_site_title" size="40" maxlength="255" value="<?php echo $hesk_settings['site_title']; ?>" placeholder="<?php echo htmlspecialchars($hesklang['wbst_title']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_site_url" class="col-sm-3 control-label"><?php echo $hesklang['wbst_url']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#2','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="s_site_url" size="40" maxlength="255" value="<?php echo $hesk_settings['site_url']; ?>" placeholder="<?php echo $hesklang['wbst_url']; ?>" />
|
||||
<input type="text" class="form-control" name="s_site_url" size="40" maxlength="255" value="<?php echo $hesk_settings['site_url']; ?>" placeholder="<?php echo htmlspecialchars($hesklang['wbst_url']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_webmaster_email" class="col-sm-3 control-label"><?php echo $hesklang['email_wm']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#4','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="s_webmaster_mail" size="40" maxlength="255" value="<?php echo $hesk_settings['webmaster_mail']; ?>" placeholder="<?php echo $hesklang['email_wm']; ?>" />
|
||||
<input type="text" class="form-control" name="s_webmaster_mail" size="40" maxlength="255" value="<?php echo $hesk_settings['webmaster_mail']; ?>" placeholder="<?php echo htmlspecialchars($hesklang['email_wm']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_noreply_mail" class="col-sm-3 control-label"><?php echo $hesklang['email_noreply']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#5','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="s_noreply_mail" size="40" maxlength="255" value="<?php echo $hesk_settings['noreply_mail']; ?>" placeholder="<?php echo $hesklang['email_noreply']; ?>" />
|
||||
<input type="text" class="form-control" name="s_noreply_mail" size="40" maxlength="255" value="<?php echo $hesk_settings['noreply_mail']; ?>" placeholder="<?php echo htmlspecialchars($hesklang['email_noreply']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_noreply_name" class="col-sm-3 control-label"><?php echo $hesklang['email_name']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#6','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="s_noreply_name" size="40" maxlength="255" value="<?php echo $hesk_settings['noreply_name']; ?>" placeholder="<?php echo $hesklang['email_name']; ?>" />
|
||||
<input type="text" class="form-control" name="s_noreply_name" size="40" maxlength="255" value="<?php echo $hesk_settings['noreply_name']; ?>" placeholder="<?php echo htmlspecialchars($hesklang['email_name']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -546,31 +593,31 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_db_host" class="col-sm-3 control-label"><?php echo $hesklang['db_host']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#32','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" placeholder="<?php echo $hesklang['db_host']; ?>" type="text" name="s_db_host" id="m1" size="40" maxlength="255" value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_host']; ?>" autocomplete="off" />
|
||||
<input class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['db_host']); ?>" type="text" name="s_db_host" id="m1" size="40" maxlength="255" value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_host']; ?>" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_db_name" class="col-sm-3 control-label"><?php echo $hesklang['db_name']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#33','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['db_name']; ?>" name="s_db_name" id="m2" size="40" maxlength="255" value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_name']; ?>" autocomplete="off" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['db_name']); ?>" name="s_db_name" id="m2" size="40" maxlength="255" value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_name']; ?>" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_db_user" class="col-sm-3 control-label"><?php echo $hesklang['db_user']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#34','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['db_user']; ?>" name="s_db_user" id="m3" size="40" maxlength="255" value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_user']; ?>" autocomplete="off" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['db_user']); ?>" name="s_db_user" id="m3" size="40" maxlength="255" value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_user']; ?>" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_db_pass" class="col-sm-3 control-label"><?php echo $hesklang['db_pass']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#35','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" placeholder="<?php echo $hesklang['db_pass']; ?>" name="s_db_pass" id="m4" size="40" maxlength="255" value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_pass'] ; ?>" autocomplete="off" />
|
||||
<input type="password" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['db_pass']); ?>" name="s_db_pass" id="m4" size="40" maxlength="255" value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_pass'] ; ?>" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_db_pfix" class="col-sm-3 control-label"><?php echo $hesklang['prefix']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#36','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['prefix']; ?>" name="s_db_pfix" id="m5" size="40" maxlength="255" value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_pfix']; ?>" autocomplete="off" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['prefix']); ?>" name="s_db_pfix" id="m5" size="40" maxlength="255" value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_pfix']; ?>" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -635,49 +682,49 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_hesk_title" class="col-sm-3 control-label"><?php echo $hesklang['hesk_title']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#6','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['hesk_title']; ?>" name="s_hesk_title" size="40" maxlength="255" value="<?php echo $hesk_settings['hesk_title']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['hesk_title']); ?>" name="s_hesk_title" size="40" maxlength="255" value="<?php echo $hesk_settings['hesk_title']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_hesk_url" class="col-sm-3 control-label"><?php echo $hesklang['hesk_url']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#7','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['hesk_url']; ?>" name="s_hesk_url" size="40" maxlength="255" value="<?php echo $hesk_settings['hesk_url']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['hesk_url']); ?>" name="s_hesk_url" size="40" maxlength="255" value="<?php echo $hesk_settings['hesk_url']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_admin_dir" class="col-sm-3 control-label"><?php echo $hesklang['adf']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#61','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['adf']; ?>" name="s_admin_dir" size="40" maxlength="255" value="<?php echo $hesk_settings['admin_dir']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['adf']); ?>" name="s_admin_dir" size="40" maxlength="255" value="<?php echo $hesk_settings['admin_dir']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_attach_dir" class="col-sm-3 control-label"><?php echo $hesklang['atf']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#62','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['atf']; ?>" name="s_attach_dir" size="40" maxlength="255" value="<?php echo $hesk_settings['attach_dir']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['atf']); ?>" name="s_attach_dir" size="40" maxlength="255" value="<?php echo $hesk_settings['attach_dir']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_max_listings" class="col-sm-3 control-label"><?php echo $hesklang['max_listings']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#10','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['max_listings']; ?>" name="s_max_listings" size="5" maxlength="30" value="<?php echo $hesk_settings['max_listings']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['max_listings']); ?>" name="s_max_listings" size="5" maxlength="30" value="<?php echo $hesk_settings['max_listings']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_print_font_size" class="col-sm-3 control-label"><?php echo $hesklang['print_size']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#11','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['print_size']; ?>" name="s_print_font_size" size="5" maxlength="3" value="<?php echo $hesk_settings['print_font_size']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['print_size']); ?>" name="s_print_font_size" size="5" maxlength="3" value="<?php echo $hesk_settings['print_font_size']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_autoclose" class="col-sm-3 control-label"><?php echo $hesklang['aclose']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#15','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['aclose']; ?>" name="s_autoclose" size="5" maxlength="3" value="<?php echo $hesk_settings['autoclose']; ?>" /><?php echo $hesklang['aclose2']; ?>
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['aclose']); ?>" name="s_autoclose" size="5" maxlength="3" value="<?php echo $hesk_settings['autoclose']; ?>" /><?php echo $hesklang['aclose2']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_max_open" class="col-sm-3 control-label"><?php echo $hesklang['mop']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#58','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['mop']; ?>" name="s_max_open" size="5" maxlength="3" value="<?php echo $hesk_settings['max_open']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['mop']); ?>" name="s_max_open" size="5" maxlength="3" value="<?php echo $hesk_settings['max_open']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -926,11 +973,11 @@ if ( defined('HESK_DEMO') )
|
||||
<br />
|
||||
|
||||
<label for="s_recaptcha_public_key" class="control-label"><?php echo $hesklang['rcpb']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#64','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['rcpb']; ?>" name="s_recaptcha_public_key" size="50" maxlength="255" value="<?php echo $hesk_settings['recaptcha_public_key']; ?>" /><br />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['rcpb']); ?>" name="s_recaptcha_public_key" size="50" maxlength="255" value="<?php echo $hesk_settings['recaptcha_public_key']; ?>" /><br />
|
||||
<br />
|
||||
|
||||
<label for="s_recaptcha_private_key" class="control-label"><?php echo $hesklang['rcpv']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#64','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['rcpv']; ?>" name="s_recaptcha_private_key" size="50" maxlength="255" value="<?php echo $hesk_settings['recaptcha_private_key']; ?>" /><br />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['rcpv']); ?>" name="s_recaptcha_private_key" size="50" maxlength="255" value="<?php echo $hesk_settings['recaptcha_private_key']; ?>" /><br />
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
@ -980,13 +1027,13 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_attempt_limit" class="col-sm-3 control-label"><?php echo $hesklang['banlim']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#47','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['banlim']; ?>" name="s_attempt_limit" size="5" maxlength="30" value="<?php echo ($hesk_settings['attempt_limit'] ? ($hesk_settings['attempt_limit']-1) : 0); ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['banlim']); ?>" name="s_attempt_limit" size="5" maxlength="30" value="<?php echo ($hesk_settings['attempt_limit'] ? ($hesk_settings['attempt_limit']-1) : 0); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_attempt_banmin" class="col-sm-3 control-label"><?php echo $hesklang['banmin']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#47','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['banmin']; ?>" name="s_attempt_banmin" size="5" maxlength="3" value="<?php echo $hesk_settings['attempt_banmin']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['banmin']); ?>" name="s_attempt_banmin" size="5" maxlength="3" value="<?php echo $hesk_settings['attempt_banmin']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1052,7 +1099,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_max_num" class="col-sm-3 control-label"><?php echo $hesklang['attach_num']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#38','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['attach_num']; ?>" name="s_max_number" size="5" maxlength="2" id="a1" value="<?php echo $hesk_settings['attachments']['max_number']; ?>" <?php echo $onload_status; ?> />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['attach_num']); ?>" name="s_max_number" size="5" maxlength="2" id="a1" value="<?php echo $hesk_settings['attachments']['max_number']; ?>" <?php echo $onload_status; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1068,7 +1115,7 @@ if ( defined('HESK_DEMO') )
|
||||
?>
|
||||
<label for="s_max_size" class="col-sm-3 control-label"><?php echo $hesklang['attach_size']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#39','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['attach_size']; ?>" name="s_max_size" size="5" maxlength="6" id="a2" value="<?php echo $size; ?>" <?php echo $onload_status; ?> />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['attach_size']); ?>" name="s_max_size" size="5" maxlength="6" id="a2" value="<?php echo $size; ?>" <?php echo $onload_status; ?> />
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<select name="s_max_unit" class="form-control" id="a4" <?php echo $onload_status; ?> >
|
||||
@ -1091,7 +1138,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_allowed_types" class="col-sm-3 control-label"><?php echo $hesklang['attach_type']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#40','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['attach_type']; ?>" name="s_allowed_types" size="40" maxlength="255" id="a3" value="<?php echo implode(',',$hesk_settings['attachments']['allowed_types']); ?>" <?php echo $onload_status; ?> />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['attach_type']); ?>" name="s_allowed_types" size="40" maxlength="255" id="a3" value="<?php echo implode(',',$hesk_settings['attachments']['allowed_types']); ?>" <?php echo $onload_status; ?> />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1193,31 +1240,31 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_kb_search_limit" class="col-sm-3 control-label"><?php echo $hesklang['s_maxsr']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#26','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['s_maxsr']; ?>" name="s_kb_search_limit" size="5" maxlength="3" value="<?php echo $hesk_settings['kb_search_limit']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['s_maxsr']); ?>" name="s_kb_search_limit" size="5" maxlength="3" value="<?php echo $hesk_settings['kb_search_limit']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_kb_substrart" class="col-sm-3 control-label"><?php echo $hesklang['s_ptxt']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#27','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['s_ptxt']; ?>" name="s_kb_substrart" size="5" maxlength="5" value="<?php echo $hesk_settings['kb_substrart']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['s_ptxt']); ?>" name="s_kb_substrart" size="5" maxlength="5" value="<?php echo $hesk_settings['kb_substrart']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_kb_cols" class="col-sm-3 control-label"><?php echo $hesklang['s_scol']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#28','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['s_scol']; ?>" name="s_kb_cols" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_cols']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['s_scol']); ?>" name="s_kb_cols" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_cols']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_kb_numshow" class="col-sm-3 control-label"><?php echo $hesklang['s_psubart']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#29','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['s_psubart']; ?>" name="s_kb_numshow" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_numshow']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['s_psubart']); ?>" name="s_kb_numshow" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_numshow']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_kb_index_popart" class="col-sm-3 control-label"><?php echo $hesklang['s_spop']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#30','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['s_spop']; ?>" name="s_kb_index_popart" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_index_popart']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['s_spop']); ?>" name="s_kb_index_popart" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_index_popart']; ?>" />
|
||||
</div>
|
||||
<div class="col-sm-6" style="padding-left:0px">
|
||||
<p class="form-control-static"><?php echo $hesklang['s_onin']; ?></p>
|
||||
@ -1225,7 +1272,7 @@ if ( defined('HESK_DEMO') )
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-3 col-sm-offset-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['s_spop']; ?>" name="s_kb_popart" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_popart']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['s_spop']); ?>" name="s_kb_popart" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_popart']; ?>" />
|
||||
</div>
|
||||
<div class="col-sm-6" style="padding-left:0px">
|
||||
<p class="form-control-static"><?php echo $hesklang['s_onkb']; ?></p>
|
||||
@ -1234,7 +1281,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_kb_latest" class="col-sm-3 control-label"><?php echo $hesklang['s_slat']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#31','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['s_slat']; ?>" name="s_kb_index_latest" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_index_latest']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['s_slat']); ?>" name="s_kb_index_latest" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_index_latest']; ?>" />
|
||||
</div>
|
||||
<div class="col-sm-6" style="padding-left:0px">
|
||||
<p class="form-control-static"><?php echo $hesklang['s_onin']; ?></p>
|
||||
@ -1242,7 +1289,7 @@ if ( defined('HESK_DEMO') )
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-3 col-sm-offset-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['s_slat']; ?>" name="s_kb_latest" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_latest']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['s_slat']); ?>" name="s_kb_latest" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_latest']; ?>" />
|
||||
</div>
|
||||
<div class="col-sm-6" style="padding-left:0px">
|
||||
<p class="form-control-static"><?php echo $hesklang['s_onkb']; ?></p>
|
||||
@ -1251,7 +1298,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_kb_related" class="col-sm-3 control-label"><?php echo $hesklang['s_relart']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#60','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['s_relart']; ?>" name="s_kb_related" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_related']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['s_relart']); ?>" name="s_kb_related" size="5" maxlength="2" value="<?php echo $hesk_settings['kb_related']; ?>" />
|
||||
</div>
|
||||
<div class="col-sm-6" style="padding-left:0px">
|
||||
<p class="form-control-static"><?php echo $hesklang['s_onin']; ?></p>
|
||||
@ -1372,13 +1419,13 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="mailgun_api_key" class="col-sm-3 control-label"><?php echo $hesklang['mailgun_api_key']; ?> <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" title="<?php echo $hesklang['mailgun_api_key']; ?>" data-content="<?php echo $hesklang['mailgun_api_key_help']; ?>"></i></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['mailgun_api_key']; ?>" id="mailgun_api_key" name="mailgun_api_key" value="<?php echo $modsForHesk_settings['mailgun_api_key']; ?>">
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['mailgun_api_key']); ?>" id="mailgun_api_key" name="mailgun_api_key" value="<?php echo $modsForHesk_settings['mailgun_api_key']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mailgun_domain" class="col-sm-3 control-label"><?php echo $hesklang['mailgun_domain']; ?> <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" title="<?php echo $hesklang['mailgun_domain']; ?>" data-content="<?php echo $hesklang['mailgun_domain_help']; ?>"></i></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['mailgun_domain']; ?>" id="mailgun_domain" name="mailgun_domain" value="<?php echo $modsForHesk_settings['mailgun_domain']; ?>">
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['mailgun_domain']); ?>" id="mailgun_domain" name="mailgun_domain" value="<?php echo $modsForHesk_settings['mailgun_domain']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1386,19 +1433,19 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_smtp_host_name" class="col-sm-3 control-label"><?php echo $hesklang['smtph']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['smtph']; ?>" id="s1" name="s_smtp_host_name" size="40" maxlength="255" value="<?php echo $hesk_settings['smtp_host_name']; ?>" <?php echo $onload_status; ?> />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['smtph']); ?>" id="s1" name="s_smtp_host_name" size="40" maxlength="255" value="<?php echo $hesk_settings['smtp_host_name']; ?>" <?php echo $onload_status; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_smtp_host_port" class="col-sm-3 control-label"><?php echo $hesklang['smtpp']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['smtpp']; ?>" id="s2" name="s_smtp_host_port" size="5" maxlength="255" value="<?php echo $hesk_settings['smtp_host_port']; ?>" <?php echo $onload_status; ?> />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['smtpp']); ?>" id="s2" name="s_smtp_host_port" size="5" maxlength="255" value="<?php echo $hesk_settings['smtp_host_port']; ?>" <?php echo $onload_status; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_smtp_timeout" class="col-sm-3 control-label"><?php echo $hesklang['smtpt']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['smtpt']; ?>" id="s3" name="s_smtp_timeout" size="5" maxlength="255" value="<?php echo $hesk_settings['smtp_timeout']; ?>" <?php echo $onload_status; ?> />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['smtpt']); ?>" id="s3" name="s_smtp_timeout" size="5" maxlength="255" value="<?php echo $hesk_settings['smtp_timeout']; ?>" <?php echo $onload_status; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1428,13 +1475,13 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_smtp_user" class="col-sm-3 control-label"><?php echo $hesklang['smtpu']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['smtpu']; ?>" id="s4" name="s_smtp_user" size="40" maxlength="255" value="<?php echo $hesk_settings['smtp_user']; ?>" <?php echo $onload_status; ?> autocomplete="off" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['smtpu']); ?>" id="s4" name="s_smtp_user" size="40" maxlength="255" value="<?php echo $hesk_settings['smtp_user']; ?>" <?php echo $onload_status; ?> autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_smtp_password" class="col-sm-3 control-label"><?php echo $hesklang['smtpw']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" placeholder="<?php echo $hesklang['smtpw']; ?>" id="s5" name="s_smtp_password" size="40" maxlength="255" value="<?php echo $hesk_settings['smtp_password']; ?>" <?php echo $onload_status; ?> autocomplete="off" />
|
||||
<input type="password" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['smtpw']); ?>" id="s5" name="s_smtp_password" size="40" maxlength="255" value="<?php echo $hesk_settings['smtp_password']; ?>" <?php echo $onload_status; ?> autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1553,19 +1600,19 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_pop3_job_wait" class="col-sm-3 control-label"><?php echo $hesklang['pjt']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['pjt']; ?>" id="p0" name="s_pop3_job_wait" size="40" maxlength="255" value="<?php echo $hesk_settings['pop3_job_wait']; ?>" <?php echo $onload_status; ?> /> <?php echo $hesklang['pjt2']; ?>
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['pjt']); ?>" id="p0" name="s_pop3_job_wait" size="40" maxlength="255" value="<?php echo $hesk_settings['pop3_job_wait']; ?>" <?php echo $onload_status; ?> /> <?php echo $hesklang['pjt2']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_pop3_host_name" class="col-sm-3 control-label"><?php echo $hesklang['pop3h']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['pop3h']; ?>" id="p1" name="s_pop3_host_name" size="40" maxlength="255" value="<?php echo $hesk_settings['pop3_host_name']; ?>" <?php echo $onload_status; ?> />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['pop3h']); ?>" id="p1" name="s_pop3_host_name" size="40" maxlength="255" value="<?php echo $hesk_settings['pop3_host_name']; ?>" <?php echo $onload_status; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_pop3_host_port" class="col-sm-3 control-label"><?php echo $hesklang['pop3p']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['pop3p']; ?>" id="p2" name="s_pop3_host_port" size="5" maxlength="255" value="<?php echo $hesk_settings['pop3_host_port']; ?>" <?php echo $onload_status; ?> />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['pop3p']); ?>" id="p2" name="s_pop3_host_port" size="5" maxlength="255" value="<?php echo $hesk_settings['pop3_host_port']; ?>" <?php echo $onload_status; ?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1595,13 +1642,13 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_pop3_user" class="col-sm-3 control-label"><?php echo $hesklang['pop3u']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['pop3u']; ?>" id="p5" name="s_pop3_user" size="40" maxlength="255" value="<?php echo $hesk_settings['pop3_user']; ?>" <?php echo $onload_status; ?> autocomplete="off" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['pop3u']); ?>" id="p5" name="s_pop3_user" size="40" maxlength="255" value="<?php echo $hesk_settings['pop3_user']; ?>" <?php echo $onload_status; ?> autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_pop3_password" class="col-sm-3 control-label"><?php echo $hesklang['pop3w']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" placeholder="<?php echo $hesklang['pop3w']; ?>" id="p6" name="s_pop3_password" size="40" maxlength="255" value="<?php echo $hesk_settings['pop3_password']; ?>" <?php echo $onload_status; ?> autocomplete="off" />
|
||||
<input type="password" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['pop3w']); ?>" id="p6" name="s_pop3_password" size="40" maxlength="255" value="<?php echo $hesk_settings['pop3_password']; ?>" <?php echo $onload_status; ?> autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1677,13 +1724,13 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_loop_hits" class="col-sm-3 control-label"><?php echo $hesklang['looph']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#60','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['looph']; ?>" name="s_loop_hits" size="5" maxlength="5" value="<?php echo $hesk_settings['loop_hits']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['looph']); ?>" name="s_loop_hits" size="5" maxlength="5" value="<?php echo $hesk_settings['loop_hits']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_loop_time" class="col-sm-3 control-label"><?php echo $hesklang['loopt']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#60','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['loopt']; ?>" name="s_loop_time" size="5" maxlength="5" value="<?php echo $hesk_settings['loop_time']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['loopt']); ?>" name="s_loop_time" size="5" maxlength="5" value="<?php echo $hesk_settings['loop_time']; ?>" />
|
||||
</div>
|
||||
<div class="col-sm-6" style="padding-left: 0px">
|
||||
<p class="form-control-static"><?php echo $hesklang['ss']; ?></p>
|
||||
@ -1723,7 +1770,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_email_providers" class="col-sm-3 control-label"><?php echo $hesklang['epro']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#63','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<textarea name="s_email_providers" class="form-control" placeholder="<?php echo $hesklang['epro']; ?>" id="d1" rows="5" cols="40"/><?php echo implode("\n", $hesk_settings['email_providers']); ?></textarea>
|
||||
<textarea name="s_email_providers" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['epro']); ?>" id="d1" rows="5" cols="40"/><?php echo implode("\n", $hesk_settings['email_providers']); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<table border="0" width="100%">
|
||||
@ -1926,7 +1973,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="s_timeformat" class="col-sm-3 control-label"><?php echo $hesklang['tfor']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>misc.html#20','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['tfor']; ?>" name="s_timeformat" size="40" maxlength="255" value="<?php echo $hesk_settings['timeformat']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['tfor']); ?>" name="s_timeformat" size="40" maxlength="255" value="<?php echo $hesk_settings['timeformat']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2047,6 +2094,43 @@ if ( defined('HESK_DEMO') )
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email_attachments" class="col-sm-4 col-xs-12 control-label">
|
||||
<?php echo $hesklang['email_attachments']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
|
||||
title="<?php echo $hesklang['email_attachments']; ?>"
|
||||
data-content="<?php echo $hesklang['email_attachments_help']; ?>"></i>
|
||||
</label>
|
||||
<div class="col-sm-8 col-xs-12">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="email_attachments" value="0" <?php echo $modsForHesk_settings['attachments'] == 0 ? 'checked' : ''; ?>>
|
||||
<?php echo $hesklang['show_attachments_as_links']; ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="email_attachments" value="1" <?php echo $modsForHesk_settings['attachments'] == 1 ? 'checked' : ''; ?>>
|
||||
<?php echo $hesklang['attach_directly_to_email']; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="use_bootstrap_theme" class="col-sm-4 col-xs-12 control-label">
|
||||
<?php echo $hesklang['use_bootstrap_theme']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
|
||||
title="<?php echo $hesklang['use_bootstrap_theme']; ?>"
|
||||
data-content="<?php echo $hesklang['use_bootstrap_theme_help']; ?>"></i>
|
||||
</label>
|
||||
<div class="col-sm-8 col-xs-12">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input id="use_boostrap_theme" name="use_bootstrap_theme" type="checkbox" <?php if ($modsForHesk_settings['use_bootstrap_theme']) {echo 'checked';} ?>> <?php echo $hesklang['use_bootstrap_theme']; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blankSpace"></div>
|
||||
<h6 style="font-weight: bold"><?php echo $hesklang['tab_4']; ?></h6>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
@ -2065,6 +2149,46 @@ if ( defined('HESK_DEMO') )
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blankSpace"></div>
|
||||
<h6 style="font-weight: bold"><?php echo $hesklang['menu_kb']; ?></h6>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<div class="form-group">
|
||||
<label for="knowledgebase-visibility-setting" class="col-sm-4 col-xs-12 control-label">
|
||||
<?php echo $hesklang['new_article_default_type']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
|
||||
title="<?php echo $hesklang['new_article_default_type']; ?>"
|
||||
data-content="<?php echo $hesklang['new_article_default_type_help']; ?>"></i>
|
||||
</label>
|
||||
<div class="col-sm-8 col-xs-12">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="new_kb_article_visibility" value="0" <?php echo $modsForHesk_settings['new_kb_article_visibility'] == 0 ? 'checked' : ''; ?>>
|
||||
<?php echo $hesklang['kb_published']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
|
||||
title="<?php echo $hesklang['kb_published']; ?>"
|
||||
data-content="<?php echo $hesklang['kb_published2']; ?>"></i>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="new_kb_article_visibility" value="1" <?php echo $modsForHesk_settings['new_kb_article_visibility'] == 1 ? 'checked' : ''; ?>>
|
||||
<?php echo $hesklang['kb_private']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
|
||||
title="<?php echo $hesklang['kb_private']; ?>"
|
||||
data-content="<?php echo $hesklang['kb_private2']; ?>"></i>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="new_kb_article_visibility" value="2" <?php echo $modsForHesk_settings['new_kb_article_visibility'] == 2 ? 'checked' : ''; ?>>
|
||||
<?php echo $hesklang['kb_draft']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
|
||||
title="<?php echo $hesklang['kb_draft']; ?>"
|
||||
data-content="<?php echo $hesklang['kb_draft3']; ?>"></i>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Mods For Hesk: Statuses -->
|
||||
<div class="tab-pane fade in" id="statuses">
|
||||
@ -2073,6 +2197,8 @@ if ( defined('HESK_DEMO') )
|
||||
<?php
|
||||
//-- We need to get all of the statuses and dump the information to the page.
|
||||
$statusesSql = 'SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses`';
|
||||
$closedStatusesSql = 'SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsClosed` = 1';
|
||||
$openStatusesSql = 'SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsClosed` = 0';
|
||||
$statusesRS = hesk_dbQuery($statusesSql);
|
||||
//Print header
|
||||
?>
|
||||
@ -2084,6 +2210,7 @@ if ( defined('HESK_DEMO') )
|
||||
<th><?php echo $hesklang['shortNameKey']; ?> <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" title="<?php echo $hesklang['shortNameKey']; ?>" data-content="<?php echo $hesklang['shortNameKeyDescr']; ?>"></i></th>
|
||||
<th><?php echo $hesklang['longNameKey']; ?> <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" title="<?php echo $hesklang['longNameKey']; ?>" data-content="<?php echo $hesklang['longNameKeyDescr']; ?>"></i></th>
|
||||
<th><?php echo $hesklang['textColor']; ?> <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" title="<?php echo $hesklang['textColor']; ?>" data-content="<?php echo $hesklang['textColorDescr']; ?>"></i></th>
|
||||
<th><?php echo $hesklang['closable_question']; ?> <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover" data-placement="bottom" title="<?php echo $hesklang['closable_question']; ?>" data-content="<?php echo $hesklang['closable_description']; ?>"></i></th>
|
||||
<th><?php echo $hesklang['closedQuestionMark']; ?> <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" data-placement="top" title="<?php echo $hesklang['closedQuestionMark']; ?>" data-content="<?php echo $hesklang['closedQuestionMarkDescr']; ?>"></i></th>
|
||||
<th><?php echo $hesklang['delete']; ?></th>
|
||||
</tr>
|
||||
@ -2096,17 +2223,31 @@ if ( defined('HESK_DEMO') )
|
||||
$checkedEcho = ($row['IsClosed'] == 1) ? 'checked="checked"' : '';
|
||||
$isDisabled = false;
|
||||
if ($row['IsNewTicketStatus'] || $row['IsClosedByClient'] || $row['IsCustomerReplyStatus'] ||
|
||||
$row['IsStaffClosedOption'] || $row['IsStaffReopenedStatus'] || $row['IsDefaultStaffReplyStatus']
|
||||
|| $row['LockedTicketStatus'])
|
||||
$row['IsStaffClosedOption'] || $row['IsStaffReopenedStatus'] || $row['IsDefaultStaffReplyStatus'] ||
|
||||
$row['LockedTicketStatus'] || $row['IsAutocloseOption'])
|
||||
{
|
||||
$isDisabled = true;
|
||||
}
|
||||
|
||||
$yesSelected = $customersOnlySelected = $staffOnlySelected = $noSelected = '';
|
||||
if ($row['Closable'] == 'yes') { $yesSelected = 'selected'; }
|
||||
elseif ($row['Closable'] == 'conly') { $customersOnlySelected = 'selected'; }
|
||||
elseif ($row['Closable'] == 'sonly') { $staffOnlySelected = 'selected'; }
|
||||
else { $noSelected = 'selected'; }
|
||||
|
||||
echo '<tr id="s'.$row['ID'].'_row">';
|
||||
echo '<td>'.$hesklang[$row['ShortNameContentKey']].'</td>'; //Name
|
||||
echo '<td><input type="text" class="form-control" name="s'.$row['ID'].'_shortName" value="'.$row['ShortNameContentKey'].'" placeholder="'.$hesklang['shortNameKey'].'"></td>'; // Short Name Language File
|
||||
echo '<td><input type="text" class="form-control" name="s'.$row['ID'].'_longName" value="'.$row['TicketViewContentKey'].'" placeholder="'.$hesklang['longNameKey'].'"></td>'; // Long Name Language File
|
||||
echo '<td><input type="text" class="form-control" name="s'.$row['ID'].'_textColor" value="'.$row['TextColor'].'" placeholder="'.$hesklang['textColor'].'"></td>'; // Text Color
|
||||
echo '<td><input type="text" class="form-control" name="s'.$row['ID'].'_shortName" value="'.$row['ShortNameContentKey'].'" placeholder="'.htmlspecialchars($hesklang['shortNameKey']).'"></td>'; // Short Name Language File
|
||||
echo '<td><input type="text" class="form-control" name="s'.$row['ID'].'_longName" value="'.$row['TicketViewContentKey'].'" placeholder="'.htmlspecialchars($hesklang['longNameKey']).'"></td>'; // Long Name Language File
|
||||
echo '<td><input type="text" class="form-control" name="s'.$row['ID'].'_textColor" value="'.$row['TextColor'].'" placeholder="'.htmlspecialchars($hesklang['textColor']).'"></td>'; // Text Color
|
||||
echo '<td>
|
||||
<select class="form-control" name="s'.$row['ID'].'_closable">
|
||||
<option value="yes" '.$yesSelected.'>'.$hesklang['yes_title_case'].'</option>
|
||||
<option value="conly" '.$customersOnlySelected.'>'.$hesklang['customers_only'].'</option>
|
||||
<option value="sonly" '.$staffOnlySelected.'>'.$hesklang['staff_only'].'</option>
|
||||
<option value="no" '.$noSelected.'>'.$hesklang['no_title_case'].'</option>
|
||||
</select>
|
||||
</td>';
|
||||
echo '<td><input type="checkbox" name="s'.$row['ID'].'_isClosed" value="1" '.$checkedEcho.'></td>'; // Resolved Status?
|
||||
echo '<td>';
|
||||
if ($isDisabled)
|
||||
@ -2123,9 +2264,17 @@ if ( defined('HESK_DEMO') )
|
||||
//Print out an additional blank space for adding a status
|
||||
echo '<tr class="info">';
|
||||
echo '<td><b>'.$hesklang['addNew'].'</b></td>';
|
||||
echo '<td><input type="text" class="form-control" name="sN_shortName" value="" placeholder="'.$hesklang['shortNameKey'].'"></td>'; // Short Name Language File
|
||||
echo '<td><input type="text" class="form-control" name="sN_longName" value="" placeholder="'.$hesklang['longNameKey'].'"></td>'; // Long Name Language File
|
||||
echo '<td><input type="text" class="form-control" name="sN_textColor" value="" placeholder="'.$hesklang['textColor'].'"></td>'; // Text Color
|
||||
echo '<td><input type="text" class="form-control" name="sN_shortName" value="" placeholder="'.htmlspecialchars($hesklang['shortNameKey']).'"></td>'; // Short Name Language File
|
||||
echo '<td><input type="text" class="form-control" name="sN_longName" value="" placeholder="'.htmlspecialchars($hesklang['longNameKey']).'"></td>'; // Long Name Language File
|
||||
echo '<td><input type="text" class="form-control" name="sN_textColor" value="" placeholder="'.htmlspecialchars($hesklang['textColor']).'"></td>'; // Text Color
|
||||
echo '<td>
|
||||
<select class="form-control" name="sN_closable">
|
||||
<option value="yes">'.$hesklang['yes_title_case'].'</option>
|
||||
<option value="conly">'.$hesklang['customers_only'].'</option>
|
||||
<option value="sonly">'.$hesklang['staff_only'].'</option>
|
||||
<option value="no">'.$hesklang['no_title_case'].'</option>
|
||||
</select>
|
||||
</td>';
|
||||
echo '<td><input type="checkbox" name="sN_isClosed" value="1"></td>'; // Resolved Status?
|
||||
echo '<td></td>'; //Empty placeholder where the delete row is.
|
||||
echo '</tr>';
|
||||
@ -2140,7 +2289,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="col-sm-4 col-xs-12">
|
||||
<select name="newTicket" class="form-control" id="newTicket">
|
||||
<?php
|
||||
$statusesRS = hesk_dbQuery($statusesSql);
|
||||
$statusesRS = hesk_dbQuery($openStatusesSql);
|
||||
while ($row = $statusesRS->fetch_assoc())
|
||||
{
|
||||
$selectedEcho = ($row['IsNewTicketStatus'] == 1) ? 'selected="selected"' : '';
|
||||
@ -2155,7 +2304,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="col-sm-4 col-xs-12">
|
||||
<select name="closedByClient" class="form-control" id="closedByClient">
|
||||
<?php
|
||||
$statusesRS = hesk_dbQuery($statusesSql);
|
||||
$statusesRS = hesk_dbQuery($closedStatusesSql);
|
||||
while ($row = $statusesRS->fetch_assoc())
|
||||
{
|
||||
$selectedEcho = ($row['IsClosedByClient'] == 1) ? 'selected="selected"' : '';
|
||||
@ -2170,7 +2319,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="col-sm-4 col-xs-12">
|
||||
<select name="replyFromClient" class="form-control" id="replyFromClient">
|
||||
<?php
|
||||
$statusesRS = hesk_dbQuery($statusesSql);
|
||||
$statusesRS = hesk_dbQuery($openStatusesSql);
|
||||
while ($row = $statusesRS->fetch_assoc())
|
||||
{
|
||||
$selectedEcho = ($row['IsCustomerReplyStatus'] == 1) ? 'selected="selected"' : '';
|
||||
@ -2185,7 +2334,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="col-sm-4 col-xs-12">
|
||||
<select name="staffClosedOption" class="form-control" id="staffClosedOption">
|
||||
<?php
|
||||
$statusesRS = hesk_dbQuery($statusesSql);
|
||||
$statusesRS = hesk_dbQuery($closedStatusesSql);
|
||||
while ($row = $statusesRS->fetch_assoc())
|
||||
{
|
||||
$selectedEcho = ($row['IsStaffClosedOption'] == 1) ? 'selected="selected"' : '';
|
||||
@ -2200,7 +2349,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="col-sm-4 col-xs-12">
|
||||
<select name="staffReopenedStatus" class="form-control" id="staffReopenedStatus">
|
||||
<?php
|
||||
$statusesRS = hesk_dbQuery($statusesSql);
|
||||
$statusesRS = hesk_dbQuery($openStatusesSql);
|
||||
while ($row = $statusesRS->fetch_assoc())
|
||||
{
|
||||
$selectedEcho = ($row['IsStaffReopenedStatus'] == 1) ? 'selected="selected"' : '';
|
||||
@ -2215,7 +2364,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="col-sm-4 col-xs-12">
|
||||
<select name="defaultStaffReplyStatus" class="form-control" id="defaultStaffReplyStatus">
|
||||
<?php
|
||||
$statusesRS = hesk_dbQuery($statusesSql);
|
||||
$statusesRS = hesk_dbQuery($openStatusesSql);
|
||||
while ($row = $statusesRS->fetch_assoc())
|
||||
{
|
||||
$selectedEcho = ($row['IsDefaultStaffReplyStatus'] == 1) ? 'selected="selected"' : '';
|
||||
@ -2240,6 +2389,21 @@ if ( defined('HESK_DEMO') )
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="autocloseTicketOption" class="col-sm-8 col-xs-12 control-label"><?php echo $hesklang['autoclose_ticket_status']; ?></label>
|
||||
<div class="col-sm-4 col-xs-12">
|
||||
<select name="autocloseTicketOption" class="form-control" id="autocloseTicketOption">
|
||||
<?php
|
||||
$statusesRS = hesk_dbQuery($closedStatusesSql);
|
||||
while ($row = $statusesRS->fetch_assoc())
|
||||
{
|
||||
$selectedEcho = ($row['IsAutocloseOption'] == 1) ? 'selected' : '';
|
||||
echo '<option value="'.$row['ID'].'" '.$selectedEcho.'>'.$hesklang[$row['ShortNameContentKey']].'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Mods For Hesk: Color settings -->
|
||||
<div class="tab-pane fade in" id="colors">
|
||||
@ -2481,17 +2645,87 @@ function hesk_getLatestVersion()
|
||||
|
||||
} // END hesk_getLatestVersion()
|
||||
|
||||
|
||||
function hesk_cacheLatestVersion($latest)
|
||||
{
|
||||
global $hesk_settings;
|
||||
global $hesk_settings;
|
||||
|
||||
@file_put_contents(HESK_PATH . $hesk_settings['attach_dir'] . '/__latest.txt', time() . '|' . $latest);
|
||||
@file_put_contents(HESK_PATH . $hesk_settings['attach_dir'] . '/__latest.txt', time() . '|' . $latest);
|
||||
|
||||
return $latest;
|
||||
return $latest;
|
||||
|
||||
} // END hesk_cacheLatestVersion()
|
||||
|
||||
function hesk_checkMfhVersion($currentVersion)
|
||||
{
|
||||
if ($latest = hesk_getMfhLatestVersion() )
|
||||
{
|
||||
if ( strlen($latest) > 12 )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
elseif ($latest == $currentVersion)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $latest;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
function hesk_getMfhLatestVersion()
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
// Do we have a cached version file?
|
||||
if ( file_exists(HESK_PATH . $hesk_settings['attach_dir'] . '/__latest-mfh.txt') )
|
||||
{
|
||||
if ( preg_match('/^(\d+)\|([\d.]+)+$/', @file_get_contents(HESK_PATH . $hesk_settings['attach_dir'] . '/__latest-mfh.txt'), $matches) && (time() - intval($matches[1])) < 3600 )
|
||||
{
|
||||
return $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
// No cached file or older than 3600 seconds, try to get an update
|
||||
$hesk_version_url = 'http://mods-for-hesk.mkochcs.com/latestversion.php';
|
||||
|
||||
// Try using cURL
|
||||
if ( function_exists('curl_init') )
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $hesk_version_url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
|
||||
$latest = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return hesk_cacheMfhLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Try using a simple PHP function instead
|
||||
if ($latest = file_get_contents($hesk_version_url) )
|
||||
{
|
||||
return hesk_cacheMfhLatestVersion($latest);
|
||||
}
|
||||
|
||||
// Can't check automatically, will need a manual check
|
||||
return false;
|
||||
}
|
||||
|
||||
function hesk_cacheMfhLatestVersion($latest)
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
@file_put_contents(HESK_PATH . $hesk_settings['attach_dir'] . '/__latest-mfh.txt', time() . '|' . $latest);
|
||||
|
||||
return $latest;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function hesk_testLanguage($return_options = 0)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -529,10 +529,10 @@ while ($row = $results->fetch_assoc())
|
||||
} else
|
||||
{
|
||||
//-- Update the information in the database with what is on the page
|
||||
$query = "UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` SET `ShortNameContentKey` = ?, `TicketViewContentKey` = ?, `TextColor` = ?, `IsClosed` = ? WHERE `ID` = ?";
|
||||
$query = "UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` SET `ShortNameContentKey` = ?, `TicketViewContentKey` = ?, `TextColor` = ?, `IsClosed` = ?, `Closable` = ? WHERE `ID` = ?";
|
||||
$stmt = hesk_dbConnect()->prepare($query);
|
||||
$isStatusClosed = (isset($_POST['s'.$row['ID'].'_isClosed']) ? 1 : 0);
|
||||
$stmt->bind_param('sssii', $_POST['s'.$row['ID'].'_shortName'], $_POST['s'.$row['ID'].'_longName'], $_POST['s'.$row['ID'].'_textColor'], $isStatusClosed, $row['ID']);
|
||||
$stmt->bind_param('sssisi', $_POST['s'.$row['ID'].'_shortName'], $_POST['s'.$row['ID'].'_longName'], $_POST['s'.$row['ID'].'_textColor'], $isStatusClosed, $_POST['s'.$row['ID'].'_closable'], $row['ID']);
|
||||
$stmt->execute();
|
||||
}
|
||||
}
|
||||
@ -552,11 +552,10 @@ if ($_POST['sN_shortName'] != null && $_POST['sN_longName'] != null && $_POST['s
|
||||
{
|
||||
//-- The next ID is equal to the number of rows, since the IDs are zero-indexed.
|
||||
$nextValue = hesk_dbQuery('SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses`')->num_rows;
|
||||
$insert = "INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (`ID`, `ShortNameContentKey`, `TicketViewContentKey`, `TextColor`, `IsClosed`) VALUES (?, ?, ?, ?, ?)";
|
||||
$stmt = hesk_dbConnect()->prepare($insert);
|
||||
$isClosed = isset($_POST['sN_isClosed']) ? 1 : 0;
|
||||
$stmt->bind_param('isssi', $nextValue, $_POST['sN_shortName'], $_POST['sN_longName'], $_POST['sN_textColor'], $isClosed);
|
||||
$stmt->execute();
|
||||
$insert = "INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (`ID`, `ShortNameContentKey`, `TicketViewContentKey`, `TextColor`, `IsClosed`, `Closable`)
|
||||
VALUES (".$nextValue.", '".hesk_dbEscape($_POST['sN_shortName'])."', '".hesk_dbEscape($_POST['sN_longName'])."', '".hesk_dbEscape($_POST['sN_textColor'])."', ".$isClosed.", '".hesk_dbEscape($_POST['sN_closable'])."')";
|
||||
hesk_dbQuery($insert);
|
||||
}
|
||||
|
||||
//-- Update default status for actions
|
||||
@ -605,6 +604,12 @@ $stmt = hesk_dbConnect()->prepare($updateQuery);
|
||||
$stmt->bind_param('i', $_POST['lockedTicketStatus']);
|
||||
$stmt->execute();
|
||||
|
||||
hesk_dbConnect()->query($defaultQuery . "`IsAutocloseOption` = 0");
|
||||
$updateQuery = $defaultQuery . "`IsAutocloseOption` = 1 WHERE `ID` = ?";
|
||||
$stmt = hesk_dbConnect()->prepare($updateQuery);
|
||||
$stmt->bind_param('i', $_POST['autocloseTicketOption']);
|
||||
$stmt->execute();
|
||||
|
||||
$set['hesk_version'] = $hesk_settings['hesk_version'];
|
||||
|
||||
// Save the modsForHesk_settings.inc.php file
|
||||
@ -613,6 +618,9 @@ $set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1;
|
||||
$set['custom-field-setting'] = empty($_POST['custom-field-setting']) ? 0 : 1;
|
||||
$set['customer-email-verification-required'] = empty($_POST['email-verification']) ? 0 : 1;
|
||||
$set['html_emails'] = empty($_POST['html_emails']) ? 0 : 1;
|
||||
$set['use_bootstrap_theme'] = empty($_POST['use_bootstrap_theme']) ? 0 : 1;
|
||||
$set['new_kb_article_visibility'] = hesk_checkMinMax( intval( hesk_POST('new_kb_article_visibility') ) , 0, 2, 2);
|
||||
$set['mfh_attachments'] = empty($_POST['email_attachments']) ? 0 : 1;
|
||||
|
||||
if ($set['customer-email-verification-required'])
|
||||
{
|
||||
@ -663,7 +671,16 @@ $modsForHesk_settings[\'html_emails\'] = '.$set['html_emails'].';
|
||||
//-- Mailgun Settings
|
||||
$modsForHesk_settings[\'use_mailgun\'] = '.$set['use_mailgun'].';
|
||||
$modsForHesk_settings[\'mailgun_api_key\'] = \''.$set['mailgun_api_key'].'\';
|
||||
$modsForHesk_settings[\'mailgun_domain\'] = \''.$set['mailgun_domain'].'\';';
|
||||
$modsForHesk_settings[\'mailgun_domain\'] = \''.$set['mailgun_domain'].'\';
|
||||
|
||||
//-- Set this to 1 to enable bootstrap-theme.css
|
||||
$modsForHesk_settings[\'use_bootstrap_theme\'] = '.$set['use_bootstrap_theme'].';
|
||||
|
||||
//-- Default value for new Knowledgebase article: 0 = Published, 1 = Private, 2 = Draft
|
||||
$modsForHesk_settings[\'new_kb_article_visibility\'] = '.$set['new_kb_article_visibility'].';
|
||||
|
||||
//-- Setting for adding attachments to email messages. Either 0 for default-HESK behavior, or 1 to send as attachments
|
||||
$modsForHesk_settings[\'attachments\'] = '.$set['mfh_attachments'].';';
|
||||
|
||||
// Write the file
|
||||
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -401,7 +401,7 @@ if (isset($_POST['notemsg']) && hesk_token_check('POST'))
|
||||
foreach ($attachments as $myatt)
|
||||
{
|
||||
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` (`ticket_id`,`saved_name`,`real_name`,`size`,`type`) VALUES ('".hesk_dbEscape($trackingID)."','".hesk_dbEscape($myatt['saved_name'])."','".hesk_dbEscape($myatt['real_name'])."','".intval($myatt['size'])."', '1')");
|
||||
$myattachments .= hesk_dbInsertID() . '#' . $myatt['real_name'] .',';
|
||||
$myattachments .= hesk_dbInsertID() . '#' . $myatt['real_name'] . '#' . $myatt['saved_name'] .',';
|
||||
}
|
||||
}
|
||||
|
||||
@ -448,10 +448,12 @@ if (isset($_POST['notemsg']) && hesk_token_check('POST'))
|
||||
$subject = hesk_getEmailSubject('new_note',$ticket);
|
||||
$message = hesk_getEmailMessage('new_note',$ticket,1);
|
||||
$htmlMessage = hesk_getHtmlMessage('new_note',$ticket,1);
|
||||
$hasMessage = hesk_doesTemplateHaveTag('new_note', '%%MESSAGE%%');
|
||||
|
||||
|
||||
/* Send email to staff */
|
||||
while ($user = hesk_dbFetchAssoc($users)) {
|
||||
hesk_mail($user['email'], $subject, $message, $htmlMessage);
|
||||
hesk_mail($user['email'], $subject, $message, $htmlMessage, array(), array(), $hasMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -568,15 +570,18 @@ if (isset($_GET['delatt']) && hesk_token_check())
|
||||
$revision = sprintf($hesklang['thist12'],hesk_date(),$att['real_name'],$_SESSION['name'].' ('.$_SESSION['user'].')');
|
||||
if ($reply)
|
||||
{
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `attachments`=REPLACE(`attachments`,'".hesk_dbEscape($att_id.'#'.$att['real_name']).",','') WHERE `id`='".intval($reply)."' LIMIT 1");
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `attachments`=REPLACE(`attachments`,'".hesk_dbEscape($att_id.'#'.$att['real_name'].'#'.$att['saved_name']).",','') WHERE `id`='".intval($reply)."' LIMIT 1");
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."replies` SET `attachments`=REPLACE(`attachments`,'".hesk_dbEscape($att_id.'#'.$att['real_name']).",','') WHERE `id`='".intval($reply)."' LIMIT 1");
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `history`=CONCAT(`history`,'".hesk_dbEscape($revision)."') WHERE `id`='".intval($ticket['id'])."' LIMIT 1");
|
||||
}
|
||||
elseif ($note)
|
||||
{
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` SET `attachments`=REPLACE(`attachments`,'".hesk_dbEscape($att_id.'#'.$att['real_name'].'#'.$att['saved_name']).",','') WHERE `id`={$note} LIMIT 1");
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` SET `attachments`=REPLACE(`attachments`,'".hesk_dbEscape($att_id.'#'.$att['real_name']).",','') WHERE `id`={$note} LIMIT 1");
|
||||
}
|
||||
else
|
||||
{
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `attachments`=REPLACE(`attachments`,'".hesk_dbEscape($att_id.'#'.$att['real_name'].'#'.$att['saved_name']).",','') WHERE `id`='".intval($ticket['id'])."' LIMIT 1");
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `attachments`=REPLACE(`attachments`,'".hesk_dbEscape($att_id.'#'.$att['real_name']).",',''), `history`=CONCAT(`history`,'".hesk_dbEscape($revision)."') WHERE `id`='".intval($ticket['id'])."' LIMIT 1");
|
||||
}
|
||||
|
||||
@ -640,6 +645,32 @@ if ( defined('HESK_DEMO') )
|
||||
$ticket['ip'] = '127.0.0.1';
|
||||
}
|
||||
|
||||
// If an email address is tied to this ticket, check if there are any others
|
||||
$recentTickets = NULL;
|
||||
if($ticket['email'] != '') {
|
||||
$recentTicketsSql = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets`
|
||||
WHERE `email` = '".hesk_dbEscape($ticket['email'])."' AND `trackid` <> '".hesk_dbEscape($trackingID)."' ORDER BY `lastchange` DESC LIMIT 5");
|
||||
while ($recentRow = hesk_dbFetchAssoc($recentTicketsSql)) {
|
||||
if ($recentTickets === NULL) {
|
||||
$recentTickets = array();
|
||||
}
|
||||
array_push($recentTickets, $recentRow);
|
||||
}
|
||||
|
||||
if ($recentTickets !== NULL) {
|
||||
$recentTicketsWithStatuses = array();
|
||||
foreach ($recentTickets as $recentTicket) {
|
||||
$newRecentTicket = $recentTicket;
|
||||
$thisTicketStatusRS = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` WHERE `ID` = " . intval($recentTicket['status']));
|
||||
$theStatusRow = hesk_dbFetchAssoc($thisTicketStatusRS);
|
||||
$newRecentTicket['statusText'] = $hesklang[$theStatusRow['ShortNameContentKey']];
|
||||
$newRecentTicket['statusColor'] = $theStatusRow['TextColor'];
|
||||
array_push($recentTicketsWithStatuses, $newRecentTicket);
|
||||
}
|
||||
$recentTickets = $recentTicketsWithStatuses;
|
||||
}
|
||||
}
|
||||
|
||||
/* Print admin navigation */
|
||||
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
?>
|
||||
@ -672,7 +703,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<strong><?php echo $hesklang['owner']; ?></strong><br/>
|
||||
<?php
|
||||
echo isset($admins[$ticket['owner']]) ? $admins[$ticket['owner']] :
|
||||
($can_assign_self ? $hesklang['unas'].' [<a href="assign_owner.php?track='.$trackingID.'&owner='.$_SESSION['id'].'&token='.hesk_token_echo(0).'">'.$hesklang['asss'].'</a>]' : $hesklang['unas']);
|
||||
($can_assign_self ? $hesklang['unas'].' — <a href="assign_owner.php?track='.$trackingID.'&owner='.$_SESSION['id'].'&token='.hesk_token_echo(0).'">'.$hesklang['asss'].'</a>' : $hesklang['unas']);
|
||||
?>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
@ -789,6 +820,19 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
</div>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<?php if ($recentTickets !== NULL): ?>
|
||||
<li class="list-group-item">
|
||||
<strong><?php echo $hesklang['recent_tickets']; ?></strong>
|
||||
<?php foreach ($recentTickets as $recentTicket): ?>
|
||||
<p style="margin: 0">
|
||||
<i class="fa fa-circle" data-toggle="tooltip" data-placement="top"
|
||||
style="color: <?php echo $recentTicket['statusColor']; ?>"
|
||||
title="<?php echo sprintf($hesklang['current_status_colon'], $recentTicket['statusText']); ?>"></i>
|
||||
<?php echo '<a href="admin_ticket.php?track='.$recentTicket['trackid'].'&Refresh='.mt_rand(10000,99999).'">'.$recentTicket['trackid'].'</a>'; ?>
|
||||
</p>
|
||||
<?php endforeach; ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -847,18 +891,19 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
}
|
||||
}
|
||||
|
||||
$isTicketClosedSql = 'SELECT `IsClosed` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `ID` = '.$ticket['status'];
|
||||
$isTicketClosedSql = 'SELECT `IsClosed`, `Closable` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `ID` = '.$ticket['status'];
|
||||
$isTicketClosedRow = hesk_dbQuery($isTicketClosedSql)->fetch_assoc();
|
||||
$isTicketClosed = $isTicketClosedRow['IsClosed'];
|
||||
$isClosable = $isTicketClosedRow['Closable'] == 'yes' || $isTicketClosedRow['Closable'] == 'sonly';
|
||||
|
||||
echo '<div class="btn-group" role="group">';
|
||||
if ($isTicketClosed == 0) // Ticket is still open
|
||||
if ($isTicketClosed == 0 && $isClosable) // Ticket is still open
|
||||
{
|
||||
echo '<a
|
||||
class="btn btn-default btn-sm" href="change_status.php?track='.$trackingID.'&s='.$staffClosedOptionStatus['ID'].'&Refresh='.$random.'&token='.hesk_token_echo(0).'">
|
||||
<i class="fa fa-check-circle"></i> '.$hesklang['close_action'].'</a>';
|
||||
}
|
||||
else
|
||||
elseif ($isTicketClosed == 1)
|
||||
{
|
||||
echo '<a
|
||||
class="btn btn-default btn-sm" href="change_status.php?track='.$trackingID.'&s='.$staffReopenedStatus['ID'].'&Refresh='.$random.'&token='.hesk_token_echo(0).'">
|
||||
@ -1016,7 +1061,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<div class="col-md-12 alert-warning">
|
||||
<div class="row" style="padding-top: 10px; padding-bottom: 10px">
|
||||
<div class="col-md-8">
|
||||
<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><i><?php echo $hesklang['noteby']; ?> <b><?php echo ($note['name'] ? $note['name'] : $hesklang['e_udel']); ?></b></i> - <?php echo hesk_date($note['dt'], true); ?></p>
|
||||
<?php
|
||||
// Message
|
||||
echo $note['message'];
|
||||
@ -1355,41 +1400,33 @@ function hesk_listAttachments($attachments='', $reply=0, $white=1)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Style and mousover/mousout */
|
||||
$tmp = $white ? 'White' : 'Blue';
|
||||
$style = 'class="option'.$tmp.'OFF" onmouseover="this.className=\'option'.$tmp.'ON\'" onmouseout="this.className=\'option'.$tmp.'OFF\'"';
|
||||
|
||||
/* List attachments */
|
||||
echo '<p><b>'.$hesklang['attachments'].':</b><br />';
|
||||
echo '<p><b>'.$hesklang['attachments'].':</b></p><br />';
|
||||
$att=explode(',',substr($attachments, 0, -1));
|
||||
$columnNumber = 0;
|
||||
echo '<div class="row">';
|
||||
echo '<div class="table-responsive">';
|
||||
echo '<table class="table table-striped attachment-table">';
|
||||
echo '<thead><tr><th> </th><th>'.$hesklang['file_name'].'</th><th>'.$hesklang['action'].'</th></tr></thead>';
|
||||
echo '<tbody>';
|
||||
foreach ($att as $myatt)
|
||||
{
|
||||
$columnNumber++;
|
||||
if ($columnNumber > 4)
|
||||
{
|
||||
echo '</div><div class="row">';
|
||||
$columnNumber = 1;
|
||||
}
|
||||
list($att_id, $att_name) = explode('#', $myatt);
|
||||
|
||||
echo '<div class="col-md-3 col-sm-6 col-xs-12">';
|
||||
|
||||
list($att_id, $att_name) = explode('#', $myatt);
|
||||
$fileparts = pathinfo($att_name);
|
||||
$fontAwesomeIcon = hesk_getFontAwesomeIconForFileExtension($fileparts['extension']);
|
||||
echo '
|
||||
<div class="panel panel-default file-attachment-panel">
|
||||
<div class="panel-body file-attachment">';
|
||||
<tr>
|
||||
<td>';
|
||||
//-- File is an image
|
||||
if ($fontAwesomeIcon == 'fa fa-file-image-o') {
|
||||
|
||||
//-- Get the actual image location and display a thumbnail. It will be linked to a modal to view a larger size.
|
||||
$path = hesk_getSavedNameUrlForAttachment($att_id);
|
||||
if ($path == '') {
|
||||
echo '<i class="fa fa-ban fa-4x"></i>';
|
||||
echo '<i class="fa fa-ban fa-4x" data-toggle="tooltip" title="'.$hesklang['attachment_removed'].'"></i>';
|
||||
} else {
|
||||
echo '<img src="'.$path.'" alt="'.$hesklang['image'].'" data-toggle="modal" data-target="#modal-attachment-'.$att_id.'">';
|
||||
echo '<span data-toggle="tooltip" title="'.$hesklang['click_to_preview'].'">
|
||||
<img src="'.$path.'" alt="'.$hesklang['image'].'" data-toggle="modal" data-target="#modal-attachment-'.$att_id.'">
|
||||
</span>';
|
||||
echo '<div class="modal fade" id="modal-attachment-'.$att_id.'" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@ -1402,7 +1439,7 @@ function hesk_listAttachments($attachments='', $reply=0, $white=1)
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">'.$hesklang['close_modal'].'</button>
|
||||
<button type="button" class="btn btn-success">'.$hesklang['dnl'].'</button>
|
||||
<a href="../download_attachment.php?att_id='.$att_id.'&track='.$trackingID.'" class="btn btn-success">'.$hesklang['dnl'].'</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1412,25 +1449,28 @@ function hesk_listAttachments($attachments='', $reply=0, $white=1)
|
||||
//-- Display the FontAwesome icon in the panel's body
|
||||
echo '<i class="'.$fontAwesomeIcon.' fa-4x"></i>';
|
||||
}
|
||||
echo '</div>
|
||||
<div class="panel-footer">
|
||||
echo'
|
||||
</td>
|
||||
<td>
|
||||
<p>'.$att_name.'</p>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">';
|
||||
/* Can edit and delete tickets? */
|
||||
if ($can_edit && $can_delete)
|
||||
{
|
||||
echo '<a class="btn btn-danger" href="admin_ticket.php?delatt='.$att_id.'&reply='.$reply.'&track='.$trackingID.'&Refresh='.mt_rand(10000,99999).'&token='.hesk_token_echo(0).'" onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['pda']).'\');" data-toggle="tooltip" data-placement="top" data-original-title="'.$hesklang['delete'].'"><i class="fa fa-times"></i></a> ';
|
||||
}
|
||||
echo '
|
||||
<a class="btn btn-success" href="../download_attachment.php?att_id='.$att_id.'&track='.$trackingID.'" data-toggle="tooltip" data-placement="top" data-original-title="'.$hesklang['dnl'].'"><i class="fa fa-arrow-down"></i></a>
|
||||
</div>
|
||||
<p><br>'.$att_name.'</p>
|
||||
';
|
||||
echo '</div>
|
||||
</div>
|
||||
echo '<a class="btn btn-success" href="../download_attachment.php?att_id='.$att_id.'&track='.$trackingID.'"
|
||||
data-toggle="tooltip" data-placement="top" data-original-title="'.$hesklang['dnl'].'">
|
||||
<i class="fa fa-arrow-down"></i>
|
||||
</a>';
|
||||
echo '</div>
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '</tbody></table></div>';
|
||||
|
||||
return true;
|
||||
} // End hesk_listAttachments()
|
||||
@ -1449,7 +1489,7 @@ function hesk_getSavedNameUrlForAttachment($att_id)
|
||||
|
||||
function hesk_getFontAwesomeIconForFileExtension($fileExtension)
|
||||
{
|
||||
$imageExtensions = array('jpg','png','bmp','gif');
|
||||
$imageExtensions = array('jpg','jpeg','png','bmp','gif');
|
||||
|
||||
//-- Word, Excel, and PPT file extensions: http://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions
|
||||
$wordFileExtensions = array('doc','docx','dotm','dot','docm','docb');
|
||||
@ -1471,6 +1511,7 @@ function hesk_getFontAwesomeIconForFileExtension($fileExtension)
|
||||
$textFileExtensions = array('txt');
|
||||
|
||||
$icon = 'fa fa-file-';
|
||||
$fileExtension = strtolower($fileExtension);
|
||||
if (in_array($fileExtension, $imageExtensions)) {
|
||||
$icon.='image-o';
|
||||
} elseif (in_array($fileExtension, $wordFileExtensions)) {
|
||||
@ -1830,7 +1871,7 @@ function hesk_printReplyForm() {
|
||||
<label for="message" class="col-sm-3 control-label"><?php echo $hesklang['message']; ?>: <font class="important">*</font></label>
|
||||
<div class="col-sm-9">
|
||||
<span id="HeskMsg">
|
||||
<textarea class="form-control" name="message" id="message" rows="12" placeholder="<?php echo $hesklang['message']; ?>" cols="72"><?php
|
||||
<textarea class="form-control" name="message" id="message" rows="12" placeholder="<?php echo htmlspecialchars($hesklang['message']); ?>" cols="72"><?php
|
||||
|
||||
// Do we have any message stored in session?
|
||||
if ( isset($_SESSION['ticket_message']) )
|
||||
@ -1892,13 +1933,23 @@ function hesk_printReplyForm() {
|
||||
$staffClosedOptionStatus['ID'] = $statusRow['ID'];
|
||||
|
||||
?>
|
||||
<div class="form-inline"><label><input type="checkbox" name="set_priority" value="1" /> <?php echo $hesklang['change_priority']; ?> </label>
|
||||
<select class="form-control" name="priority">
|
||||
<?php echo implode('',$options); ?>
|
||||
</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 ($_SESSION['notify_customer_reply'] && !empty($ticket['email'])) ? '' : 'checked="checked" '; ?> <?php if (empty($ticket['email'])) { echo 'disabled'; } ?>> <?php echo $hesklang['dsen']; ?></label><br/><br/>
|
||||
<div class="form-inline">
|
||||
<label>
|
||||
<input type="checkbox" name="set_priority" value="1" /> <?php echo $hesklang['change_priority']; ?>
|
||||
</label>
|
||||
<select class="form-control" name="priority">
|
||||
<?php echo implode('',$options); ?>
|
||||
</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 ($_SESSION['notify_customer_reply'] && !empty($ticket['email'])) ? '' : 'checked="checked" '; ?> <?php if (empty($ticket['email'])) { echo 'disabled'; } ?>> <?php echo $hesklang['dsen']; ?>
|
||||
</label><br/><br/>
|
||||
<?php if (empty($ticket['email'])) {
|
||||
echo '<input type="hidden" name="no_notify" value="1">';
|
||||
} ?>
|
||||
@ -1936,9 +1987,8 @@ function hesk_printReplyForm() {
|
||||
</ul>
|
||||
</div>
|
||||
<input class="btn btn-default" type="submit" name="save_reply" value="<?php echo $hesklang['sacl']; ?>"
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
</form>
|
||||
|
||||
<!-- END REPLY FORM -->
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -89,6 +89,15 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<a title="' . $hesklang['sm_title'] . '" href="service_messages.php">' . $hesklang['sm_title'] . '</a>
|
||||
</li>';
|
||||
}
|
||||
|
||||
// Show a link to email tpl management if user has permission to do so
|
||||
if (hesk_checkPermission('can_man_email_tpl', 0)) {
|
||||
echo '
|
||||
<li role="presentation">
|
||||
<a title="'.$hesklang['email_templates'].'" href="manage_email_templates.php">'.$hesklang['email_templates'].'</a>
|
||||
</li>
|
||||
';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class="tab-content summaryList tabPadding">
|
||||
@ -111,7 +120,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-3 control-label"><?php echo $hesklang['bananemail']; ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="email" size="30" maxlength="255" placeholder="<?php echo $hesklang['email']; ?>">
|
||||
<input type="text" class="form-control" name="email" size="30" maxlength="255" placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
|
||||
<input type="hidden" name="a" value="ban" />
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -92,6 +92,15 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<a title="' . $hesklang['sm_title'] . '" href="service_messages.php">' . $hesklang['sm_title'] . '</a>
|
||||
</li>';
|
||||
}
|
||||
|
||||
// Show a link to email tpl management if user has permission to do so
|
||||
if (hesk_checkPermission('can_man_email_tpl', 0)) {
|
||||
echo '
|
||||
<li role="presentation">
|
||||
<a title="'.$hesklang['email_templates'].'" href="manage_email_templates.php">'.$hesklang['email_templates'].'</a>
|
||||
</li>
|
||||
';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class="tab-content summaryList tabPadding">
|
||||
@ -113,7 +122,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<div class="form-group">
|
||||
<label for="ip" class="col-sm-3 control-label"><?php echo $hesklang['bananip']; ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="ip" size="30" maxlength="255" class="form-control" placeholder="<?php echo $hesklang['iprange']; ?>">
|
||||
<input type="text" name="ip" size="30" maxlength="255" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['iprange']); ?>">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
|
||||
<input type="hidden" name="a" value="ban" />
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -241,19 +241,19 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-3 control-label"><?php echo $hesklang['subject']; ?>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="text" name="subject" size="40" maxlength="40" value="<?php echo $ticket['subject'];?>" placeholder="<?php echo $hesklang['subject']; ?>" />
|
||||
<input class="form-control" type="text" name="subject" size="40" maxlength="40" value="<?php echo $ticket['subject'];?>" placeholder="<?php echo htmlspecialchars($hesklang['subject']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-3 control-label"><?php echo $hesklang['name']; ?>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="text" name="name" size="40" maxlength="30" value="<?php echo $ticket['name'];?>" placeholder="<?php echo $hesklang['name']; ?>" />
|
||||
<input class="form-control" type="text" name="name" size="40" maxlength="30" value="<?php echo $ticket['name'];?>" placeholder="<?php echo htmlspecialchars($hesklang['name']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="text" name="email" size="40" maxlength="1000" value="<?php echo $ticket['email'];?>" placeholder="<?php echo $hesklang['email']; ?>" />
|
||||
<input class="form-control" type="text" name="email" size="40" maxlength="1000" value="<?php echo $ticket['email'];?>" placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@ -382,7 +382,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<div class="form-group">
|
||||
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': </label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control" name="'.$k.'" rows="'.$size[0].'" placeholder="'.$v['name'].'" cols="'.$size[1].'">'.$k_value.'</textarea>
|
||||
<textarea class="form-control" name="'.$k.'" rows="'.$size[0].'" placeholder="'.htmlspecialchars($v['name']).'" cols="'.$size[1].'">'.$k_value.'</textarea>
|
||||
</div>
|
||||
</div>';
|
||||
break;
|
||||
@ -396,7 +396,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<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"
|
||||
<input type="text" class="datepicker form-control white-readonly" placeholder="'.htmlspecialchars($v['name']).'" id="'.$v['name'].'" name="'.$k.'" size="40"
|
||||
maxlength="'.$v['maxlen'].'" value="'.date('Y-m-d', $v['value']).'" readonly/>
|
||||
</div>
|
||||
</div>';
|
||||
@ -436,7 +436,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<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="form-control" placeholder="'.$v['name'].'" name="'.$k.'" size="40" maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" />
|
||||
<input type="text" class="form-control" placeholder="'.htmlspecialchars($v['name']).'" name="'.$k.'" size="40" maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" />
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
@ -449,7 +449,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<div class="form-group">
|
||||
<label for="message" class="col-sm-3 control-label"><?php echo $hesklang['message']; ?>:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control" name="message" rows="12" placeholder="<?php echo $hesklang['message']; ?>" cols="60"><?php echo $ticket['message']; ?></textarea>
|
||||
<textarea class="form-control" name="message" rows="12" placeholder="<?php echo htmlspecialchars($hesklang['message']); ?>" cols="60"><?php echo $ticket['message']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -525,8 +525,8 @@ if (isset($_GET['w']))
|
||||
}
|
||||
|
||||
$ticket['archive'] = !($ticket['archive']) ? $hesklang['no'] : $hesklang['yes'];
|
||||
$ticket['message'] = hesk_msgToPlain($ticket['message'], 1);
|
||||
$ticket['subject'] = hesk_msgToPlain($ticket['subject'], 1);
|
||||
$ticket['message'] = hesk_msgToPlain($ticket['message'], 1, 0);
|
||||
$ticket['subject'] = hesk_msgToPlain($ticket['subject'], 1, 0);
|
||||
$ticket['owner'] = isset($admins[$ticket['owner']]) ? $admins[$ticket['owner']] : '';
|
||||
$ticket['category'] = isset($my_cat[$ticket['category']]) ? $my_cat[$ticket['category']] : '';
|
||||
|
||||
@ -556,7 +556,7 @@ if (isset($_GET['w']))
|
||||
{
|
||||
if ($v['use'])
|
||||
{
|
||||
$tmp .= '<Cell><Data ss:Type="String"><![CDATA['.hesk_msgToPlain($ticket[$k], 1).']]></Data></Cell> ' . "\n";
|
||||
$tmp .= '<Cell><Data ss:Type="String"><![CDATA['.hesk_msgToPlain($ticket[$k], 1, 0).']]></Data></Cell> ' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
338
admin/index.php
338
admin/index.php
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -260,35 +260,37 @@ function do_login()
|
||||
$revision = sprintf($hesklang['thist3'],hesk_date(),$hesklang['auto']);
|
||||
$dt = date('Y-m-d H:i:s',time() - $hesk_settings['autoclose']*86400);
|
||||
|
||||
// Notify customer of closed ticket?
|
||||
if ($hesk_settings['notify_closed'])
|
||||
{
|
||||
$closedStatusRs = hesk_dbQuery('SELECT `ID` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsDefaultStaffReplyStatus` = 1');
|
||||
$closedStatus = hesk_dbFetchAssoc($closedStatusRs);
|
||||
// Get list of tickets
|
||||
$result = hesk_dbQuery("SELECT * FROM `".$hesk_settings['db_pfix']."tickets` WHERE `status` = ".$closedStatus['ID']." AND `lastchange` <= '".hesk_dbEscape($dt)."' ");
|
||||
if (hesk_dbNumRows($result) > 0)
|
||||
{
|
||||
global $ticket;
|
||||
|
||||
// Load required functions?
|
||||
if ( ! function_exists('hesk_notifyCustomer') )
|
||||
{
|
||||
require(HESK_PATH . 'inc/email_functions.inc.php');
|
||||
}
|
||||
$closedStatusRs = hesk_dbQuery('SELECT `ID`, `Closable` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsDefaultStaffReplyStatus` = 1');
|
||||
$closedStatus = hesk_dbFetchAssoc($closedStatusRs);
|
||||
// Are we allowed to close tickets in this status?
|
||||
if ($closedStatus['Closable'] == 'yes' || $closedStatus['Closable'] == 'sonly') {
|
||||
// Notify customer of closed ticket?
|
||||
if ($hesk_settings['notify_closed']) {
|
||||
// Get list of tickets
|
||||
$result = hesk_dbQuery("SELECT * FROM `" . $hesk_settings['db_pfix'] . "tickets` WHERE `status` = " . $closedStatus['ID'] . " AND `lastchange` <= '" . hesk_dbEscape($dt) . "' ");
|
||||
if (hesk_dbNumRows($result) > 0) {
|
||||
global $ticket;
|
||||
|
||||
while ($ticket = hesk_dbFetchAssoc($result))
|
||||
{
|
||||
$ticket['dt'] = hesk_date($ticket['dt'], true);
|
||||
$ticket['lastchange'] = hesk_date($ticket['lastchange'], true);
|
||||
$ticket = hesk_ticketToPlain($ticket, 1, 0);
|
||||
hesk_notifyCustomer('ticket_closed');
|
||||
// Load required functions?
|
||||
if (!function_exists('hesk_notifyCustomer')) {
|
||||
require(HESK_PATH . 'inc/email_functions.inc.php');
|
||||
}
|
||||
|
||||
while ($ticket = hesk_dbFetchAssoc($result)) {
|
||||
$ticket['dt'] = hesk_date($ticket['dt'], true);
|
||||
$ticket['lastchange'] = hesk_date($ticket['lastchange'], true);
|
||||
$ticket = hesk_ticketToPlain($ticket, 1, 0);
|
||||
hesk_notifyCustomer('ticket_closed');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update ticket statuses and history in database
|
||||
hesk_dbQuery("UPDATE `".$hesk_settings['db_pfix']."tickets` SET `status`='3', `closedat`=NOW(), `closedby`='-1', `history`=CONCAT(`history`,'".hesk_dbEscape($revision)."') WHERE `status` = '2' AND `lastchange` <= '".hesk_dbEscape($dt)."' ");
|
||||
// Update ticket statuses and history in database if we're allowed to do so
|
||||
$defaultCloseRs = hesk_dbQuery('SELECT `ID` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `IsAutocloseOption` = 1');
|
||||
$defaultCloseStatus = hesk_dbFetchAssoc($defaultCloseRs);
|
||||
hesk_dbQuery("UPDATE `" . $hesk_settings['db_pfix'] . "tickets` SET `status`=".intval($defaultCloseStatus['ID']).", `closedat`=NOW(), `closedby`='-1', `history`=CONCAT(`history`,'" . hesk_dbEscape($revision) . "') WHERE `status` = '".$closedStatus['ID']."' AND `lastchange` <= '" . hesk_dbEscape($dt) . "' ");
|
||||
}
|
||||
}
|
||||
|
||||
/* Redirect to the destination page */
|
||||
@ -326,171 +328,185 @@ function print_login()
|
||||
hesk_handle_messages();
|
||||
?></div>
|
||||
<div>
|
||||
<form class="form-signin form-horizontal" role="form" action="index.php" method="post" name="form1">
|
||||
|
||||
<h2 class="form-signin-heading"><span <?php echo $iconDisplay; ?>><span class="mega-octicon octicon-sign-in"></span> </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">
|
||||
<div class="panel panel-default form-signin">
|
||||
<div class="panel-heading">
|
||||
<h4><span <?php echo $iconDisplay; ?>><span class="mega-octicon octicon-sign-in"></span> </span><?php echo $hesklang['admin_login']; ?></a></h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form class="form-signin form-horizontal" role="form" action="index.php" method="post" name="form1">
|
||||
<?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-4 control-label"><?php echo $hesklang['username']; ?>:</label>
|
||||
<div class="col-sm-8">
|
||||
<?php
|
||||
|
||||
if (defined('HESK_USER'))
|
||||
{
|
||||
$savedUser = HESK_USER;
|
||||
}
|
||||
else
|
||||
{
|
||||
$savedUser = hesk_htmlspecialchars( hesk_COOKIE('hesk_username') );
|
||||
}
|
||||
if (defined('HESK_USER'))
|
||||
{
|
||||
$savedUser = HESK_USER;
|
||||
}
|
||||
else
|
||||
{
|
||||
$savedUser = hesk_htmlspecialchars( hesk_COOKIE('hesk_username') );
|
||||
}
|
||||
|
||||
$is_1 = '';
|
||||
$is_2 = '';
|
||||
$is_3 = '';
|
||||
$is_1 = '';
|
||||
$is_2 = '';
|
||||
$is_3 = '';
|
||||
|
||||
$remember_user = hesk_POST('remember_user');
|
||||
$remember_user = hesk_POST('remember_user');
|
||||
|
||||
if ($hesk_settings['autologin'] && (isset($_COOKIE['hesk_p']) || $remember_user == 'AUTOLOGIN') )
|
||||
{
|
||||
$is_1 = 'checked="checked"';
|
||||
}
|
||||
elseif (isset($_COOKIE['hesk_username']) || $remember_user == 'JUSTUSER' )
|
||||
{
|
||||
$is_2 = 'checked="checked"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_3 = 'checked="checked"';
|
||||
}
|
||||
if ($hesk_settings['autologin'] && (isset($_COOKIE['hesk_p']) || $remember_user == 'AUTOLOGIN') )
|
||||
{
|
||||
$is_1 = 'checked="checked"';
|
||||
}
|
||||
elseif (isset($_COOKIE['hesk_username']) || $remember_user == 'JUSTUSER' )
|
||||
{
|
||||
$is_2 = 'checked="checked"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_3 = 'checked="checked"';
|
||||
}
|
||||
|
||||
if ($hesk_settings['list_users'])
|
||||
{
|
||||
echo '<select class="form-control" name="user">';
|
||||
if ($hesk_settings['list_users'])
|
||||
{
|
||||
echo '<select class="form-control" name="user">';
|
||||
$res = hesk_dbQuery('SELECT `user` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'users` ORDER BY `user` ASC');
|
||||
while ($row=hesk_dbFetchAssoc($res))
|
||||
{
|
||||
$sel = (strtolower($savedUser) == strtolower($row['user'])) ? 'selected="selected"' : '';
|
||||
echo '<option value="'.$row['user'].'" '.$sel.'>'.$row['user'].'</option>';
|
||||
}
|
||||
echo '</select>';
|
||||
while ($row=hesk_dbFetchAssoc($res))
|
||||
{
|
||||
$sel = (strtolower($savedUser) == strtolower($row['user'])) ? 'selected="selected"' : '';
|
||||
echo '<option value="'.$row['user'].'" '.$sel.'>'.$row['user'].'</option>';
|
||||
}
|
||||
echo '</select>';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<input class="form-control" type="text" name="user" size="35" placeholder="'.$hesklang['username'].'" value="'.$savedUser.'" />';
|
||||
}
|
||||
?>
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<input class="form-control" type="text" name="user" size="35" placeholder="'.htmlspecialchars($hesklang['username']).'" value="'.$savedUser.'" />';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (in_array('pass',$_SESSION['a_iserror'])) { echo '<div class="form-group has-error">';} else { echo '<div class="form-group">';}?>
|
||||
<label for="pass" class="col-sm-3 control-label"><?php echo $hesklang['pass']; ?>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" id="pass" name="pass" size="35" placeholder="<?php echo $hesklang['pass']; ?>" />
|
||||
</div>
|
||||
<label for="pass" class="col-sm-4 control-label"><?php echo $hesklang['pass']; ?>:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="password" class="form-control" id="pass" name="pass" size="35" placeholder="<?php echo htmlspecialchars($hesklang['pass']); ?>" />
|
||||
</div>
|
||||
<?php
|
||||
if ($hesk_settings['secimg_use'] == 2)
|
||||
{
|
||||
</div>
|
||||
<?php
|
||||
if ($hesk_settings['secimg_use'] == 2)
|
||||
{
|
||||
|
||||
// SPAM prevention verified for this session
|
||||
if (isset($_SESSION['img_a_verified']))
|
||||
{
|
||||
echo '<img src="'.HESK_PATH.'img/success.png" width="16" height="16" border="0" alt="" style="vertical-align:text-bottom" /> '.$hesklang['vrfy'];
|
||||
}
|
||||
// Not verified yet, should we use Recaptcha?
|
||||
elseif ($hesk_settings['recaptcha_use'] == 1)
|
||||
{
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var RecaptchaOptions = {
|
||||
theme : '<?php echo ( isset($_SESSION['a_iserror']) && in_array('mysecnum',$_SESSION['a_iserror']) ) ? 'red' : 'white'; ?>',
|
||||
custom_translations : {
|
||||
visual_challenge : "<?php echo hesk_slashJS($hesklang['visual_challenge']); ?>",
|
||||
audio_challenge : "<?php echo hesk_slashJS($hesklang['audio_challenge']); ?>",
|
||||
refresh_btn : "<?php echo hesk_slashJS($hesklang['refresh_btn']); ?>",
|
||||
instructions_visual : "<?php echo hesk_slashJS($hesklang['instructions_visual']); ?>",
|
||||
instructions_context : "<?php echo hesk_slashJS($hesklang['instructions_context']); ?>",
|
||||
instructions_audio : "<?php echo hesk_slashJS($hesklang['instructions_audio']); ?>",
|
||||
help_btn : "<?php echo hesk_slashJS($hesklang['help_btn']); ?>",
|
||||
play_again : "<?php echo hesk_slashJS($hesklang['play_again']); ?>",
|
||||
cant_hear_this : "<?php echo hesk_slashJS($hesklang['cant_hear_this']); ?>",
|
||||
incorrect_try_again : "<?php echo hesk_slashJS($hesklang['incorrect_try_again']); ?>",
|
||||
image_alt_text : "<?php echo hesk_slashJS($hesklang['image_alt_text']); ?>"
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/recaptcha/recaptchalib.php');
|
||||
// SPAM prevention verified for this session
|
||||
if (isset($_SESSION['img_a_verified']))
|
||||
{
|
||||
echo '<img src="'.HESK_PATH.'img/success.png" width="16" height="16" border="0" alt="" style="vertical-align:text-bottom" /> '.$hesklang['vrfy'];
|
||||
}
|
||||
// Not verified yet, should we use Recaptcha?
|
||||
elseif ($hesk_settings['recaptcha_use'] == 1)
|
||||
{
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var RecaptchaOptions = {
|
||||
theme : '<?php echo ( isset($_SESSION['a_iserror']) && in_array('mysecnum',$_SESSION['a_iserror']) ) ? 'red' : 'white'; ?>',
|
||||
custom_translations : {
|
||||
visual_challenge : "<?php echo hesk_slashJS($hesklang['visual_challenge']); ?>",
|
||||
audio_challenge : "<?php echo hesk_slashJS($hesklang['audio_challenge']); ?>",
|
||||
refresh_btn : "<?php echo hesk_slashJS($hesklang['refresh_btn']); ?>",
|
||||
instructions_visual : "<?php echo hesk_slashJS($hesklang['instructions_visual']); ?>",
|
||||
instructions_context : "<?php echo hesk_slashJS($hesklang['instructions_context']); ?>",
|
||||
instructions_audio : "<?php echo hesk_slashJS($hesklang['instructions_audio']); ?>",
|
||||
help_btn : "<?php echo hesk_slashJS($hesklang['help_btn']); ?>",
|
||||
play_again : "<?php echo hesk_slashJS($hesklang['play_again']); ?>",
|
||||
cant_hear_this : "<?php echo hesk_slashJS($hesklang['cant_hear_this']); ?>",
|
||||
incorrect_try_again : "<?php echo hesk_slashJS($hesklang['incorrect_try_again']); ?>",
|
||||
image_alt_text : "<?php echo hesk_slashJS($hesklang['image_alt_text']); ?>"
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/recaptcha/recaptchalib.php');
|
||||
echo '<div class="form-group"><div class="col-md-8 col-md-offset-4">';
|
||||
echo recaptcha_get_html($hesk_settings['recaptcha_public_key'], null, true);
|
||||
echo '</div></div>';
|
||||
}
|
||||
// Use reCaptcha API v2?
|
||||
elseif ($hesk_settings['recaptcha_use'] == 2)
|
||||
{
|
||||
?>
|
||||
<div class="g-recaptcha" data-sitekey="<?php echo $hesk_settings['recaptcha_public_key']; ?>"></div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-8 col-md-offset-4">
|
||||
<div class="g-recaptcha" data-sitekey="<?php echo $hesk_settings['recaptcha_public_key']; ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
// At least use some basic PHP generated image (better than nothing)
|
||||
else
|
||||
{
|
||||
$cls = in_array('mysecnum',$_SESSION['a_iserror']) ? ' class="isError" ' : '';
|
||||
}
|
||||
// At least use some basic PHP generated image (better than nothing)
|
||||
else
|
||||
{
|
||||
echo '<div class="form-group"><div class="col-md-8 col-md-offset-4">';
|
||||
$cls = in_array('mysecnum',$_SESSION['a_iserror']) ? ' class="isError" ' : '';
|
||||
|
||||
echo $hesklang['sec_enter'].'<br /> <br /><img src="'.HESK_PATH.'print_sec_img.php?'.rand(10000,99999).'" width="150" height="40" alt="'.$hesklang['sec_img'].'" title="'.$hesklang['sec_img'].'" border="1" name="secimg" style="vertical-align:text-bottom" /> '.
|
||||
'<a href="javascript:void(0)" onclick="javascript:document.form1.secimg.src=\''.HESK_PATH.'print_sec_img.php?\'+ ( Math.floor((90000)*Math.random()) + 10000);"><img src="'.HESK_PATH.'img/reload.png" height="24" width="24" alt="'.$hesklang['reload'].'" title="'.$hesklang['reload'].'" border="0" style="vertical-align:text-bottom" /></a>'.
|
||||
'<br /> <br /><input type="text" name="mysecnum" size="20" maxlength="5" '.$cls.' />';
|
||||
}
|
||||
} // End if $hesk_settings['secimg_use'] == 2
|
||||
echo $hesklang['sec_enter'].'<br /> <br /><img src="'.HESK_PATH.'print_sec_img.php?'.rand(10000,99999).'" width="150" height="40" alt="'.$hesklang['sec_img'].'" title="'.$hesklang['sec_img'].'" border="1" name="secimg" style="vertical-align:text-bottom" /> '.
|
||||
'<a href="javascript:void(0)" onclick="javascript:document.form1.secimg.src=\''.HESK_PATH.'print_sec_img.php?\'+ ( Math.floor((90000)*Math.random()) + 10000);"><img src="'.HESK_PATH.'img/reload.png" height="24" width="24" alt="'.$hesklang['reload'].'" title="'.$hesklang['reload'].'" border="0" style="vertical-align:text-bottom" /></a>'.
|
||||
'<br /> <br /><input type="text" name="mysecnum" size="20" maxlength="5" '.$cls.' />';
|
||||
echo '</div></div>';
|
||||
}
|
||||
} // End if $hesk_settings['secimg_use'] == 2
|
||||
|
||||
if ($hesk_settings['autologin'])
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="remember_user" value="AUTOLOGIN" <?php echo $is_1; ?> /> <?php echo $hesklang['autologin']; ?></label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="remember_user" value="JUSTUSER" <?php echo $is_2; ?> /> <?php echo $hesklang['just_user']; ?></label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="remember_user" value="NOTHANKS" <?php echo $is_3; ?> /> <?php echo $hesklang['nothx']; ?></label>
|
||||
if ($hesk_settings['autologin'])
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-8">
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="remember_user" value="AUTOLOGIN" <?php echo $is_1; ?> /> <?php echo $hesklang['autologin']; ?></label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="remember_user" value="JUSTUSER" <?php echo $is_2; ?> /> <?php echo $hesklang['just_user']; ?></label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="remember_user" value="NOTHANKS" <?php echo $is_3; ?> /> <?php echo $hesklang['nothx']; ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" name="remember_user" value="JUSTUSER" <?php echo $is_2; ?> /> <?php echo $hesklang['remember_user']; ?></label>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-8">
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" name="remember_user" value="JUSTUSER" <?php echo $is_2; ?> /> <?php echo $hesklang['remember_user']; ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} // End if $hesk_settings['autologin']
|
||||
?>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<input type="submit" value="<?php echo $hesklang['click_login']; ?>" class="btn btn-default" />
|
||||
<input type="hidden" name="a" value="do_login" />
|
||||
<?php
|
||||
if ( hesk_isREQUEST('goto') && $url=hesk_REQUEST('goto') )
|
||||
{
|
||||
echo '<input type="hidden" name="goto" value="'.$url.'" />';
|
||||
}
|
||||
</div>
|
||||
<?php
|
||||
} // End if $hesk_settings['autologin']
|
||||
?>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-4 col-md-8">
|
||||
<input type="submit" value="<?php echo $hesklang['click_login']; ?>" class="btn btn-default" />
|
||||
<input type="hidden" name="a" value="do_login" />
|
||||
<?php
|
||||
if ( hesk_isREQUEST('goto') && $url=hesk_REQUEST('goto') )
|
||||
{
|
||||
echo '<input type="hidden" name="goto" value="'.$url.'" />';
|
||||
}
|
||||
|
||||
// Do we allow staff password reset?
|
||||
if ($hesk_settings['reset_pass'])
|
||||
{
|
||||
echo '<br /> <br /><a href="password.php" class="smaller">'.$hesklang['fpass'].'</a>';
|
||||
}
|
||||
?>
|
||||
// Do we allow staff password reset?
|
||||
if ($hesk_settings['reset_pass'])
|
||||
{
|
||||
echo '<br /> <br /><a href="password.php" class="smaller">'.$hesklang['fpass'].'</a>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -355,9 +355,10 @@ function mail_send()
|
||||
$subject = hesk_getEmailSubject('new_pm',$pm,0);
|
||||
$message = hesk_getEmailMessage('new_pm',$pm,1,0);
|
||||
$htmlMessage = hesk_getHtmlMessage('new_pm',$pm,1,0);
|
||||
$hasMessage = hesk_doesTemplateHaveTag('new_pm','%%MESSAGE%%');
|
||||
|
||||
/* Send e-mail */
|
||||
hesk_mail($pm_recipient['email'], $subject, $message, $htmlMessage);
|
||||
hesk_mail($pm_recipient['email'], $subject, $message, $htmlMessage, array(), array(), $hasMessage);
|
||||
}
|
||||
|
||||
unset($_SESSION['mail']);
|
||||
@ -688,7 +689,7 @@ function show_new_form()
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-3 control-label"><?php echo $hesklang['m_sub']; ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['subject']; ?>" name="subject" size="40" maxlength="50"
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['subject']); ?>" name="subject" size="40" maxlength="50"
|
||||
<?php
|
||||
if (isset($_SESSION['mail']['subject']))
|
||||
{
|
||||
@ -701,7 +702,7 @@ function show_new_form()
|
||||
<div class="form-group">
|
||||
<label for="message" class="col-sm-3 control-label"><?php echo $hesklang['message']; ?>:</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea name="message" class="form-control" placeholder="<?php echo $hesklang['message']; ?>" rows="15" cols="70"><?php
|
||||
<textarea name="message" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['message']); ?>" rows="15" cols="70"><?php
|
||||
if (isset($_SESSION['mail']['message']))
|
||||
{
|
||||
echo stripslashes($_SESSION['mail']['message']);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -264,14 +264,14 @@ myField.value += myValue;
|
||||
<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>
|
||||
<span id="HeskTitle"><input class="form-control" placeholder="<?php echo htmlspecialchars($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="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
|
||||
<textarea class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['message']); ?>" name="msg" rows="15" cols="70"><?php
|
||||
if (isset($_SESSION['canned']['msg']))
|
||||
{
|
||||
echo stripslashes($_SESSION['canned']['msg']);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -112,7 +112,7 @@ else {return false;}
|
||||
<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"
|
||||
<input class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['cat_name']); ?>" type="text" name="name" size="40" maxlength="40"
|
||||
<?php
|
||||
if (isset($_SESSION['catname']))
|
||||
{
|
||||
@ -181,7 +181,7 @@ else {return false;}
|
||||
<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']).'" ';} ?> />
|
||||
<input class="form-control" placeholder="<?php echo htmlspecialchars($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">
|
||||
|
302
admin/manage_email_templates.php
Normal file
302
admin/manage_email_templates.php
Normal file
@ -0,0 +1,302 @@
|
||||
<?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();
|
||||
|
||||
hesk_checkPermission('can_manage_email_templates');
|
||||
|
||||
define('WYSIWYG',1);
|
||||
|
||||
// Are we performing an action?
|
||||
$showEditPanel = false;
|
||||
if (isset($_GET['action'])) {
|
||||
if ($_GET['action'] == 'edit') {
|
||||
$showEditPanel = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Are we saving?
|
||||
if (isset($_POST['action'])) {
|
||||
if ($_POST['action'] == 'save') {
|
||||
save();
|
||||
}
|
||||
}
|
||||
/* Print header */
|
||||
require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
|
||||
|
||||
if ($modsForHesk_settings['html_emails']) {
|
||||
echo '<script type="text/javascript">
|
||||
tinyMCE.init({
|
||||
mode : "textareas",
|
||||
editor_selector : "htmlEditor",
|
||||
elements : "content",
|
||||
theme : "advanced",
|
||||
convert_urls : false,
|
||||
gecko_spellcheck: true,
|
||||
|
||||
theme_advanced_buttons1 : "cut,copy,paste,|,undo,redo,|,formatselect,fontselect,fontsizeselect,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull",
|
||||
theme_advanced_buttons2 : "sub,sup,|,charmap,|,bullist,numlist,|,outdent,indent,insertdate,inserttime,preview,|,forecolor,backcolor,|,hr,removeformat,visualaid,|,link,unlink,anchor,image,cleanup,code",
|
||||
theme_advanced_buttons3 : "",
|
||||
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "left",
|
||||
theme_advanced_statusbar_location : "bottom",
|
||||
theme_advanced_resizing : true
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
|
||||
/* Print main manage users page */
|
||||
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
?>
|
||||
|
||||
<div class="row" style="padding: 20px">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<?php
|
||||
// Show a link to banned_emails.php if user has permission
|
||||
if ( hesk_checkPermission('can_ban_emails',0) )
|
||||
{
|
||||
echo '
|
||||
<li role="presentation">
|
||||
<a title="' . $hesklang['banemail'] . '" href="banned_emails.php">'.$hesklang['banemail'].'</a>
|
||||
</li>
|
||||
';
|
||||
}
|
||||
if ( hesk_checkPermission('can_ban_ips',0) )
|
||||
{
|
||||
echo '
|
||||
<li role="presentation">
|
||||
<a title="' . $hesklang['banip'] . '" href="banned_ips.php">'.$hesklang['banip'].'</a>
|
||||
</li>';
|
||||
}
|
||||
// Show a link to status_message.php if user has permission to do so
|
||||
if ( hesk_checkPermission('can_service_msg',0) )
|
||||
{
|
||||
echo '
|
||||
<li role="presentation">
|
||||
<a title="' . $hesklang['sm_title'] . '" href="service_messages.php">' . $hesklang['sm_title'] . '</a>
|
||||
</li>';
|
||||
}
|
||||
?>
|
||||
<li role="presentation" class="active">
|
||||
<a href="#"><?php echo $hesklang['email_templates']; ?> <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" title="<?php echo $hesklang['email_templates']; ?>" data-content="<?php echo $hesklang['email_templates_intro']; ?>"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content summaryList tabPadding">
|
||||
<?php if ($showEditPanel): ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>
|
||||
<?php
|
||||
$isHtml = ($_GET['html'] == 'true');
|
||||
$class = 'plaintext-editor';
|
||||
if ($isHtml) {
|
||||
$class = 'htmlEditor';
|
||||
echo sprintf($hesklang['editing_html_template'], $_GET['template']);
|
||||
} else {
|
||||
echo sprintf($hesklang['editing_plain_text_template'], $_GET['template']);
|
||||
} ?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
$fileContent = '';
|
||||
if ($isHtml) {
|
||||
$fileContent = file_get_contents(HESK_PATH . 'language/'.urldecode($_GET['language']).'/emails/html/'.$_GET['template']);
|
||||
} else {
|
||||
$fileContent = file_get_contents(HESK_PATH . 'language/'.urldecode($_GET['language']).'/emails/'.$_GET['template']);
|
||||
}
|
||||
if ($fileContent === false) {
|
||||
//throw error
|
||||
}
|
||||
?>
|
||||
<a href="#" id="showSpecialTags" onclick="toggleContainers(['specialTags'],['showSpecialTags'])">
|
||||
<?php echo $hesklang['show_special_tags']; ?>
|
||||
</a>
|
||||
<div id="specialTags" style="display: none">
|
||||
<a href="#" onclick="toggleContainers(['showSpecialTags'],['specialTags'])">
|
||||
<?php echo $hesklang['hide_special_tags']; ?>
|
||||
</a>
|
||||
<table class="table table-striped table-responsive table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $hesklang['special_tag']; ?></th>
|
||||
<th><?php echo $hesklang['description'] ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$tags = getSpecialTagMap();
|
||||
foreach ($tags as $tag => $text): ?>
|
||||
<tr>
|
||||
<td><?php echo $tag; ?></td>
|
||||
<td><?php echo $text; ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<form action="manage_email_templates.php" method="post">
|
||||
<textarea name="text" rows="15" class="form-control <?php echo $class; ?>"><?php echo $fileContent; ?></textarea>
|
||||
<input type="hidden" name="action" value="save">
|
||||
<input type="hidden" name="template" value="<?php echo htmlspecialchars($_GET['template']); ?>">
|
||||
<input type="hidden" name="language" value="<?php echo htmlspecialchars($_GET['language']); ?>">
|
||||
<input type="hidden" name="html" value="<?php echo $isHtml; ?>">
|
||||
<br>
|
||||
<?php
|
||||
$fileWritable = false;
|
||||
if ($isHtml) {
|
||||
$fileWritable = is_writable(HESK_PATH.'language/'.$_GET['language'].'/emails/html/'.$_GET['template']);
|
||||
} else {
|
||||
$fileWritable = is_writable(HESK_PATH.'language/'.$_GET['language'].'/emails/'.$_GET['template']);
|
||||
}
|
||||
|
||||
if (!$fileWritable) {
|
||||
echo '<div class="alert alert-danger">
|
||||
<p>'.sprintf($hesklang['email_template_directory_not_writable'], $_GET['template']).'</p>
|
||||
</div>';
|
||||
} else {
|
||||
echo '<input type="submit" class="btn btn-default" value="'.$hesklang['save'].'">';
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
|
||||
// Output list of templates, and provide links to edit the plaintext and HTML versions for each language
|
||||
// First get list of languages
|
||||
$languages = array();
|
||||
foreach ($hesk_settings['languages'] as $key => $value) {
|
||||
$languages[$key] = $hesk_settings['languages'][$key]['folder'];
|
||||
}
|
||||
|
||||
// Get all files, but don't worry about index.htm, items beginning with '.', or the html folder
|
||||
// We'll also assume the template file exists in all language folders and in the html folder
|
||||
reset($languages);
|
||||
$firstKey = key($languages);
|
||||
$firstDirectory = HESK_PATH . 'language/'.$languages[$firstKey].'/emails';
|
||||
$directoryListing = preg_grep('/^([^.])/', scandir($firstDirectory));
|
||||
$emailTemplates = array_diff($directoryListing, array('html', 'index.htm'));
|
||||
|
||||
?>
|
||||
<table class="table table-striped table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $hesklang['file_name']; ?></th>
|
||||
<?php foreach ($languages as $language => $languageCode): ?>
|
||||
<th><?php echo $language; ?></th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($emailTemplates as $template): ?>
|
||||
<tr>
|
||||
<td><?php echo $template; ?></td>
|
||||
<?php foreach ($languages as $language => $languageCode): ?>
|
||||
<td>
|
||||
<?php
|
||||
echo getTemplateMarkup($template, $languageCode);
|
||||
echo ' ';
|
||||
if ($modsForHesk_settings['html_emails']) {
|
||||
echo getTemplateMarkup($template, $languageCode, true);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
|
||||
function getTemplateMarkup($template, $languageCode, $html = false) {
|
||||
global $hesklang;
|
||||
|
||||
$templateUrl = urlencode($template);
|
||||
$languageCodeUrl = urlencode($languageCode);
|
||||
if ($html) {
|
||||
$markup = '<a href="manage_email_templates.php?action=edit&template='.$templateUrl.'&language='.$languageCodeUrl.'&html=true">';
|
||||
$markup .= '<i class="fa fa-html5" style="font-size: 1.5em" data-toggle="tooltip" title="'.$hesklang['edit_html_template'].'"></i>';
|
||||
$markup .= '</a>';
|
||||
return $markup;
|
||||
} else {
|
||||
$markup = '<a href="manage_email_templates.php?action=edit&template='.$templateUrl.'&language='.$languageCodeUrl.'&html=false">';
|
||||
$markup .= '<i class="fa fa-file-text-o" style="font-size: 1.5em" data-toggle="tooltip" title="'.$hesklang['edit_plain_text_template'].'"></i>';
|
||||
$markup .= '</a>';
|
||||
return $markup;
|
||||
}
|
||||
}
|
||||
|
||||
function save() {
|
||||
global $hesklang;
|
||||
|
||||
$filePath = HESK_PATH . 'language/'.$_POST['language'].'/emails/'.$_POST['template'];
|
||||
if ($_POST['html'] == '1') {
|
||||
$filePath = HESK_PATH . 'language/'.$_POST['language'].'/emails/html/'.$_POST['template'];
|
||||
}
|
||||
|
||||
$success = file_put_contents($filePath, $_POST['text']);
|
||||
if ($success === false) {
|
||||
hesk_process_messages($hesklang[''], 'manage_email_templates.php');
|
||||
} else {
|
||||
$message = sprintf($hesklang['email_template_saved'], $_POST['template']);
|
||||
hesk_process_messages($message,'manage_email_templates.php','SUCCESS');
|
||||
}
|
||||
}
|
||||
|
||||
function getSpecialTagMap() {
|
||||
global $hesk_settings, $modsForHesk_settings, $hesklang;
|
||||
|
||||
$map = array();
|
||||
$map['%%NAME%%'] = $hesklang['customer_name'];
|
||||
$map['%%EMAIL%%'] = $hesklang['customer_email'];
|
||||
$map['%%SUBJECT%%'] = $hesklang['ticket_subject'];
|
||||
$map['%%MESSAGE%%'] = $hesklang['ticket_message'];
|
||||
$map['%%CREATED%%'] = $hesklang['ticket_created'];
|
||||
$map['%%UPDATED%%'] = $hesklang['ticket_updated'];
|
||||
$map['%%TRACK_ID%%'] = $hesklang['ticket_trackID'];
|
||||
$map['%%TRACK_URL%%'] = $hesklang['ticket_url'];
|
||||
$map['%%SITE_TITLE%%'] = $hesklang['wbst_title'];
|
||||
$map['%%SITE_URL%%'] = $hesklang['wbst_url'];
|
||||
$map['%%CATEGORY%%'] = $hesklang['ticket_category'];
|
||||
$map['%%OWNER%%'] = $hesklang['ticket_owner'];
|
||||
$map['%%PRIORITY%%'] = $hesklang['ticket_priority'];
|
||||
$map['%%STATUS%%'] = $hesklang['ticket_status'];
|
||||
|
||||
$i = 1;
|
||||
foreach ($hesk_settings['custom_fields'] as $key => $value) {
|
||||
if ($value['use']) {
|
||||
$uppercaseKey = strtoupper($key);
|
||||
$map['%%'.$uppercaseKey.'%%'] = sprintf($hesklang['custom_field_x'], $i++);
|
||||
}
|
||||
}
|
||||
|
||||
return $map;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -366,14 +366,23 @@ if (!isset($_SESSION['hide']['new_article']))
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="type" class="control-label"><?php echo $hesklang['kb_type']; ?></label>
|
||||
<?php
|
||||
if (isset($_SESSION['new_article']['type']))
|
||||
{
|
||||
$selectedIndex = -1;
|
||||
} else
|
||||
{
|
||||
$selectedIndex = $modsForHesk_settings['new_kb_article_visibility'];
|
||||
}
|
||||
?>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="type" value="0" <?php if (!isset($_SESSION['new_article']['type']) || (isset($_SESSION['new_article']['type']) && $_SESSION['new_article']['type'] == 0) ) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['kb_published']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo $hesklang['kb_published2']; ?>')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<label><input type="radio" name="type" value="0" <?php if ((isset($_SESSION['new_article']['type']) && $_SESSION['new_article']['type'] == 0) || $selectedIndex == 0) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['kb_published']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo $hesklang['kb_published2']; ?>')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="type" value="1" <?php if (isset($_SESSION['new_article']['type']) && $_SESSION['new_article']['type'] == 1) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['kb_private']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo $hesklang['kb_private2']; ?>')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<label><input type="radio" name="type" value="1" <?php if ((isset($_SESSION['new_article']['type']) && $_SESSION['new_article']['type'] == 1) || $selectedIndex == 1) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['kb_private']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo $hesklang['kb_private2']; ?>')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="type" value="2" <?php if (isset($_SESSION['new_article']['type']) && $_SESSION['new_article']['type'] == 2) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['kb_draft']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo $hesklang['kb_draft2']; ?>')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<label><input type="radio" name="type" value="2" <?php if ((isset($_SESSION['new_article']['type']) && $_SESSION['new_article']['type'] == 2) || $selectedIndex == 2) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['kb_draft']; ?> <a href="javascript:void(0)" onclick="javascript:alert('<?php echo $hesklang['kb_draft2']; ?>')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -398,7 +407,7 @@ if (!isset($_SESSION['hide']['new_article']))
|
||||
</span>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="control-label"><?php echo $hesklang['kb_subject']; ?></label>
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['kb_subject']; ?>" name="subject" size="70" maxlength="255" <?php if (isset($_SESSION['new_article']['subject'])) {echo 'value="'.$_SESSION['new_article']['subject'].'"';} ?> />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['kb_subject']); ?>" name="subject" size="70" maxlength="255" <?php if (isset($_SESSION['new_article']['subject'])) {echo 'value="'.$_SESSION['new_article']['subject'].'"';} ?> />
|
||||
</div>
|
||||
<p><textarea class="form-control" name="content" rows="25" cols="70" id="content"><?php if (isset($_SESSION['new_article']['content'])) {echo $_SESSION['new_article']['content'];} ?></textarea></p>
|
||||
</div>
|
||||
@ -1399,9 +1408,9 @@ function edit_article()
|
||||
</span>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="control-label"><?php echo $hesklang['kb_subject']; ?></label>
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['kb_subject']; ?>" name="subject" size="70" maxlength="255" value="<?php echo $article['subject']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['kb_subject']); ?>" name="subject" size="70" maxlength="255" value="<?php echo $article['subject']; ?>" />
|
||||
</div>
|
||||
<textarea name="content" class="form-control" placeholder="<?php echo $hesklang['kb_content']; ?>" rows="25" cols="70" id="content"><?php echo $article['content']; ?></textarea>
|
||||
<textarea name="content" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['kb_content']); ?>" rows="25" cols="70" id="content"><?php echo $article['content']; ?></textarea>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="panel panel-default" style="margin-right:10px">
|
||||
@ -1409,7 +1418,7 @@ function edit_article()
|
||||
<div class="form-group">
|
||||
<label for="keywords" class="control-label"><?php echo $hesklang['kw']; ?></label>
|
||||
<p style="font-size: .9em" class="form-control-static"><?php echo $hesklang['kw1']; ?></p><br>
|
||||
<textarea name="keywords" class="form-control" placeholder="<?php echo $hesklang['kw']; ?>" rows="3" cols="70" id="keywords"><?php echo $article['keywords']; ?></textarea>
|
||||
<textarea name="keywords" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['kw']); ?>" rows="3" cols="70" id="keywords"><?php echo $article['keywords']; ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="attachments" class="control-label"><?php echo $hesklang['attachments']; ?> (<a href="Javascript:void(0)" onclick="Javascript:hesk_window('../file_limits.php',250,500);return false;"><?php echo $hesklang['ful']; ?></a>)</label>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -223,7 +223,7 @@ $num = hesk_dbNumRows($result);
|
||||
<label for="name" class="col-sm-2 control-label"><?php echo $hesklang['ticket_tpl_title']; ?></label>
|
||||
<div class="col-sm-10">
|
||||
<span id="HeskTitle">
|
||||
<input class="form-control" type="text" name="name" size="40" maxlength="50" placeholder="<?php echo $hesklang['ticket_tpl_title']; ?>"
|
||||
<input class="form-control" type="text" name="name" size="40" maxlength="50" placeholder="<?php echo htmlspecialchars($hesklang['ticket_tpl_title']); ?>"
|
||||
<?php if (isset($_SESSION['canned']['name'])) {echo ' value="'.stripslashes($_SESSION['canned']['name']).'" ';} ?>>
|
||||
</span>
|
||||
</div>
|
||||
@ -232,7 +232,7 @@ $num = hesk_dbNumRows($result);
|
||||
<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
|
||||
<textarea class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['message']); ?>" name="msg" rows="15" cols="70"><?php
|
||||
if (isset($_SESSION['canned']['msg']))
|
||||
{
|
||||
echo stripslashes($_SESSION['canned']['msg']);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -77,6 +77,7 @@ $hesk_settings['features'] = array(
|
||||
'can_ban_ips', /* User can ban IP addresses */
|
||||
'can_unban_ips', /* User can delete IP bans. Also enables "can_ban_ips" */
|
||||
'can_service_msg', /* User can manage service messages shown in customer interface */
|
||||
'can_man_email_tpl', /* User can manage email templates */
|
||||
);
|
||||
|
||||
/* Set default values */
|
||||
@ -577,7 +578,8 @@ function new_user()
|
||||
`notify_assigned`,
|
||||
`notify_pm`,
|
||||
`notify_note`,
|
||||
`notify_note_unassigned`) VALUES (
|
||||
`notify_note_unassigned`,
|
||||
`autorefresh`) VALUES (
|
||||
'".hesk_dbEscape($myuser['user'])."',
|
||||
'".hesk_dbEscape($myuser['pass'])."',
|
||||
'".intval($myuser['isadmin'])."',
|
||||
@ -601,8 +603,8 @@ function new_user()
|
||||
'".($myuser['notify_assigned'])."' ,
|
||||
'".($myuser['notify_pm'])."',
|
||||
'".($myuser['notify_note'])."',
|
||||
'".($myuser['notify_note_unassigned'])."'
|
||||
)" );
|
||||
'".($myuser['notify_note_unassigned'])."',
|
||||
".intval($myuser['autorefresh']).")" );
|
||||
|
||||
$_SESSION['seluser'] = hesk_dbInsertID();
|
||||
|
||||
@ -633,7 +635,7 @@ function update_user()
|
||||
$myuser = hesk_validateUserInfo(0,$_SERVER['PHP_SELF']);
|
||||
$myuser['id'] = $tmp;
|
||||
|
||||
/* Only active users can be assigned tickets */
|
||||
/* Only active users can be assigned tickets. Also turn off all notifications */
|
||||
if (!$myuser['active']) {
|
||||
$myuser['autoassign'] = 0;
|
||||
$myuser['notify_new_unassigned'] = 0;
|
||||
@ -707,7 +709,8 @@ function update_user()
|
||||
`notify_assigned`='".($myuser['notify_assigned'])."' ,
|
||||
`notify_pm`='".($myuser['notify_pm'])."',
|
||||
`notify_note`='".($myuser['notify_note'])."',
|
||||
`notify_note_unassigned`='".($myuser['notify_note_unassigned'])."'
|
||||
`notify_note_unassigned`='".($myuser['notify_note_unassigned'])."',
|
||||
`autorefresh`=".intval($myuser['autorefresh'])."
|
||||
WHERE `id`='".intval($myuser['id'])."' LIMIT 1");
|
||||
|
||||
unset($_SESSION['save_userdata']);
|
||||
@ -820,6 +823,7 @@ function hesk_validateUserInfo($pass_required = 1, $redirect_to = './manage_user
|
||||
{
|
||||
$myuser['afterreply'] = 0;
|
||||
}
|
||||
$myuser['autorefresh'] = intval(hesk_POST('autorefresh'));
|
||||
|
||||
// Defaults
|
||||
$myuser['autostart'] = isset($_POST['autostart']) ? 1 : 0;
|
||||
@ -952,12 +956,15 @@ function toggle_active()
|
||||
{
|
||||
$active = 1;
|
||||
$tmp = $hesklang['user_activated'];
|
||||
$notificationSql = "";
|
||||
} else
|
||||
{
|
||||
$active = 0;
|
||||
$tmp = $hesklang['user_deactivated'];
|
||||
$notificationSql = ", `autoassign` = 0, `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, `notify_note_unassigned` = 0";
|
||||
}
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` SET `active` = '".$active."' WHERE `id` = '".intval($myuser)."'");
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` SET `active` = '".$active."'".$notificationSql." WHERE `id` = '".intval($myuser)."'");
|
||||
|
||||
if (hesk_dbAffectedRows() != 1) {
|
||||
hesk_process_messages($hesklang['int_error'].': '.$hesklang['user_not_found'],'./manage_users.php');
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -180,7 +180,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<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']; ?>">
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['name']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -189,7 +189,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<input type="text" class="form-control" name="email" size="40" maxlength="1000" id="email-input"
|
||||
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']; ?>"
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>"
|
||||
onkeyup="disableIfEmpty('email-input','notify-email')">
|
||||
</div>
|
||||
|
||||
@ -442,7 +442,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
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"><textarea class="form-control" placeholder="'.$v['name'].'" id="'.$formattedId.'" name="'.$k.'" rows="'.$size[0].'" cols="'.$size[1].'" '.$cls.'>'.$k_value.'</textarea></div>
|
||||
<div class="col-sm-9"><textarea class="form-control" placeholder="'.htmlspecialchars($v['name']).'" id="'.$formattedId.'" name="'.$k.'" rows="'.$size[0].'" cols="'.$size[1].'" '.$cls.'>'.$k_value.'</textarea></div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
@ -462,7 +462,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<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="'.$formattedId.'" name="'.$k.'" size="40"
|
||||
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.htmlspecialchars($v['name']).'" id="'.$formattedId.'" name="'.$k.'" size="40"
|
||||
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
|
||||
<span class="help-block">'.$hesklang['date_format'].'</span>
|
||||
</div>
|
||||
@ -489,7 +489,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
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="form-control" placeholder="'.$v['name'].'" id="'.$formattedId.'" name="'.$k.'" size="40" maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" '.$cls.' /></div>
|
||||
<div class="col-sm-9"><input type="text" class="form-control" placeholder="'.htmlspecialchars($v['name']).'" id="'.$formattedId.'" name="'.$k.'" size="40" maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" '.$cls.' /></div>
|
||||
</div>';
|
||||
|
||||
break;
|
||||
@ -509,7 +509,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
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="form-control" placeholder="'.$v['name'].'" id="'.$formattedId.'" name="'.$k.'" size="40" maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" '.$cls.' /></div>
|
||||
<div class="col-sm-9"><input type="text" class="form-control" placeholder="'.htmlspecialchars($v['name']).'" id="'.$formattedId.'" name="'.$k.'" size="40" maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" '.$cls.' /></div>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
@ -642,13 +642,13 @@ 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">
|
||||
<span id="HeskSub"><input class="form-control" type="text" name="subject" id="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']; ?>" /></span>
|
||||
<span id="HeskSub"><input class="form-control" type="text" name="subject" id="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 htmlspecialchars($hesklang['subject']); ?>" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (in_array('message',$_SESSION['iserror'])) {echo '<div class="form-group has-error">';} else {echo '<div class="form-group">';} ?>
|
||||
<div class="col-sm-12">
|
||||
<span id="HeskMsg">
|
||||
<textarea class="form-control" name="message" id="message" rows="12" cols="60" placeholder="<?php echo $hesklang['message']; ?>" ><?php if (isset($_SESSION['as_message'])) {echo stripslashes(hesk_input($_SESSION['as_message']));} ?></textarea>
|
||||
<textarea class="form-control" name="message" id="message" rows="12" cols="60" placeholder="<?php echo htmlspecialchars($hesklang['message']); ?>" ><?php if (isset($_SESSION['as_message'])) {echo stripslashes(hesk_input($_SESSION['as_message']));} ?></textarea>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -804,7 +804,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
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"><textarea class="form-control" placeholder="'.$v['name'].'" id="'.$formattedId.'" name="'.$k.'" rows="'.$size[0].'" cols="'.$size[1].'" '.$cls.'>'.$k_value.'</textarea></div>
|
||||
<div class="col-sm-9"><textarea class="form-control" placeholder="'.htmlspecialchars($v['name']).'" id="'.$formattedId.'" name="'.$k.'" rows="'.$size[0].'" cols="'.$size[1].'" '.$cls.'>'.$k_value.'</textarea></div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
@ -824,7 +824,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<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="'.$formattedId.'" name="'.$k.'" size="40"
|
||||
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.htmlspecialchars($v['name']).'" id="'.$formattedId.'" name="'.$k.'" size="40"
|
||||
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
|
||||
<span class="help-block">'.$hesklang['date_format'].'</span>
|
||||
</div>
|
||||
@ -886,7 +886,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
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="form-control" placeholder="'.$v['name'].'" id="'.$formattedId.'" name="'.$k.'" size="40" maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" '.$cls.' /></div>
|
||||
<div class="col-sm-9"><input type="text" class="form-control" placeholder="'.htmlspecialchars($v['name']).'" id="'.$formattedId.'" name="'.$k.'" size="40" maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" '.$cls.' /></div>
|
||||
</div>';
|
||||
|
||||
break;
|
||||
@ -906,7 +906,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
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="form-control" placeholder="'.$v['name'].'" id="'.$formattedId.'" name="'.$k.'" size="40" maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" '.$cls.' /></div>
|
||||
<div class="col-sm-9"><input type="text" class="form-control" placeholder="'.htmlspecialchars($v['name']).'" id="'.$formattedId.'" name="'.$k.'" size="40" maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" '.$cls.' /></div>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -294,7 +294,7 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
||||
<div class="form-group <?php echo in_array('email',$_SESSION['a_iserror']) ? 'has-error' : ''; ?>">
|
||||
<label for="email" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="email" size="35" value="<?php if (isset($email)) {echo stripslashes(hesk_input($email));} ?>" class="form-control" placeholder="<?php echo $hesklang['email']; ?>">
|
||||
<input type="text" name="email" size="35" value="<?php if (isset($email)) {echo stripslashes(hesk_input($email));} ?>" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -255,6 +255,9 @@ function update_profile() {
|
||||
{
|
||||
$_SESSION['new']['afterreply'] = 0;
|
||||
}
|
||||
$_SESSION['new']['notify_customer_new'] = isset($_POST['notify_customer_new']) ? 1 : 0;
|
||||
$_SESSION['new']['notify_customer_reply'] = isset($_POST['notify_customer_reply']) ? 1 : 0;
|
||||
$_SESSION['new']['show_suggested'] = isset($_POST['show_suggested']) ? 1 : 0;
|
||||
|
||||
/* Auto-start ticket timer */
|
||||
$_SESSION['new']['autostart'] = isset($_POST['autostart']) ? 1 : 0;
|
||||
@ -301,7 +304,10 @@ function update_profile() {
|
||||
`notify_assigned`='".intval($_SESSION['new']['notify_assigned'])."' ,
|
||||
`notify_pm`='".intval($_SESSION['new']['notify_pm'])."',
|
||||
`notify_note`='".intval($_SESSION['new']['notify_note'])."',
|
||||
`notify_note_unassigned`='".intval($_SESSION['new']['notify_note_unassigned'])."'
|
||||
`notify_note_unassigned`='".intval($_SESSION['new']['notify_note_unassigned'])."',
|
||||
`notify_customer_new`='".$_SESSION['new']['notify_customer_new']."',
|
||||
`notify_customer_reply`='".$_SESSION['new']['notify_customer_reply']."',
|
||||
`show_suggested`='".$_SESSION['new']['show_suggested']."'
|
||||
WHERE `id`='".intval($_SESSION['id'])."' LIMIT 1"
|
||||
);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -92,6 +92,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<li role="presentation" class="active">
|
||||
<a href="#"><?php echo $hesklang['sm_title']; ?> <i class="fa fa-question-circle settingsquestionmark" onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['sm_intro']); ?>')"></i></a>
|
||||
</li>
|
||||
<?php
|
||||
// Show a link to email tpl management if user has permission to do so
|
||||
if (hesk_checkPermission('can_man_email_tpl', 0)) {
|
||||
echo '
|
||||
<li role="presentation">
|
||||
<a title="'.$hesklang['email_templates'].'" href="manage_email_templates.php">'.$hesklang['email_templates'].'</a>
|
||||
</li>
|
||||
';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class="tab-content summaryList tabPadding">
|
||||
<script language="javascript" type="text/javascript"><!--
|
||||
@ -360,7 +370,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<div class="form-group">
|
||||
<label for="title" class="col-md-2 control-label"><?php echo $hesklang['sm_mtitle']; ?></label>
|
||||
<div class="col-md-10">
|
||||
<input class="form-control" placeholder="<?php echo $hesklang['sm_mtitle']; ?>"
|
||||
<input class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['sm_mtitle']); ?>"
|
||||
type="text" name="title" size="70" maxlength="255"
|
||||
<?php if (isset($_SESSION['new_sm']['title'])) {echo 'value="'.$_SESSION['new_sm']['title'].'"';} ?>>
|
||||
</div>
|
||||
@ -368,7 +378,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<div class="form-group">
|
||||
<label for="message" class="col-md-2 control-label"><?php echo $hesklang['sm_msg']; ?></label>
|
||||
<div class="col-md-10">
|
||||
<textarea placeholder="<?php echo $hesklang['sm_msg']; ?>" class="form-control" name="message" rows="25" cols="70" id="content">
|
||||
<textarea placeholder="<?php echo htmlspecialchars($hesklang['sm_msg']); ?>" class="form-control" name="message" rows="25" cols="70" id="content">
|
||||
<?php if (isset($_SESSION['new_sm']['message'])) {echo $_SESSION['new_sm']['message'];} ?>
|
||||
</textarea>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -57,35 +57,38 @@ require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
|
||||
require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="margin-top: 20px">
|
||||
<?php
|
||||
/* This will handle error, success and notice messages */
|
||||
hesk_handle_messages();
|
||||
?>
|
||||
<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;
|
||||
require_once(HESK_PATH . 'inc/print_tickets.inc.php');
|
||||
|
||||
<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();
|
||||
?>
|
||||
<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;
|
||||
require_once(HESK_PATH . 'inc/print_tickets.inc.php');
|
||||
/* Update staff default settings? */
|
||||
if ( ! empty($_GET['def']))
|
||||
{
|
||||
hesk_updateStaffDefaults();
|
||||
}
|
||||
|
||||
/* Update staff default settings? */
|
||||
if ( ! empty($_GET['def']))
|
||||
{
|
||||
hesk_updateStaffDefaults();
|
||||
}
|
||||
|
||||
/* Print forms for listing and searching tickets */
|
||||
require_once(HESK_PATH . 'inc/show_search_form.inc.php');
|
||||
|
||||
/* Print footer */
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
|
||||
?>
|
||||
/* Print forms for listing and searching tickets */
|
||||
require_once(HESK_PATH . 'inc/show_search_form.inc.php');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
|
||||
/* Print footer */
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
?>
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -134,13 +134,12 @@
|
||||
text-decoration: underline;
|
||||
}
|
||||
.form-signin {
|
||||
max-width: 330px;
|
||||
padding: 15px;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.loginError {
|
||||
width: 40%;
|
||||
padding: 20px;
|
||||
max-width: 800px;
|
||||
padding-top: 20px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
@ -377,20 +376,29 @@ button.dropdown-submit {
|
||||
border:none;
|
||||
}
|
||||
|
||||
.file-attachment {
|
||||
min-height: 100px;
|
||||
max-height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.file-attachment > i {
|
||||
padding-top: 10px;
|
||||
.attachment-table > tbody > tr > td > i {
|
||||
color: #ddd;
|
||||
text-shadow: 2px 2px #ccc;
|
||||
}
|
||||
|
||||
.file-attachment > img {
|
||||
margin: -15px;
|
||||
height: 100px;
|
||||
.attachment-table > tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.attachment-table > tbody > tr > td > span > img {
|
||||
max-height: 80px;
|
||||
max-width: 80px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.plaintext-editor {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.table-fixed {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.indent-15 {
|
||||
margin-left: 15px;
|
||||
}
|
@ -137,13 +137,12 @@
|
||||
text-decoration: underline;
|
||||
}
|
||||
.form-signin {
|
||||
max-width: 330px;
|
||||
padding: 15px;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.loginError {
|
||||
width: 40%;
|
||||
padding: 20px;
|
||||
max-width: 800px;
|
||||
padding-top: 20px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
@ -371,20 +370,29 @@ button.dropdown-submit {
|
||||
border:none;
|
||||
}
|
||||
|
||||
.file-attachment {
|
||||
min-height: 100px;
|
||||
max-height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.file-attachment > i {
|
||||
padding-top: 10px;
|
||||
.attachment-table > tbody > tr > td > i {
|
||||
color: #ddd;
|
||||
text-shadow: 2px 2px #ccc;
|
||||
}
|
||||
|
||||
.file-attachment > img {
|
||||
margin: -15px;
|
||||
height: 100px;
|
||||
.attachment-table > tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.attachment-table > tbody > tr > td > span > img {
|
||||
max-height: 80px;
|
||||
max-width: 80px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.plaintext-editor {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.table-fixed {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.indent-15 {
|
||||
margin-right: 15px;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -715,12 +715,38 @@ function hesk_okCategory($cat,$error=1,$user_isadmin=false,$user_cat=false)
|
||||
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> </p><p align="center"><a href="index.php">'.$hesklang['click_login'].'</a>');
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Admins have full access to all features */
|
||||
if ($_SESSION['isadmin'])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($feature == 'can_manage_email_templates') {
|
||||
if ($_SESSION['can_manage_email_templates']) {
|
||||
return true;
|
||||
} else {
|
||||
if ($showerror) {
|
||||
hesk_error($hesklang['no_permission'].'<p> </p><p align="center"><a href="index.php">'.$hesklang['click_login'].'</a>');
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check other staff for permissions */
|
||||
if (strpos($_SESSION['heskprivileges'], $feature) === false)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -1247,7 +1247,7 @@ function hesk_array_fill_keys($keys, $value)
|
||||
*
|
||||
* Credits: derived from functions of www.phpbb.com
|
||||
*/
|
||||
function hesk_makeURL($text, $class = '')
|
||||
function hesk_makeURL($text, $class = '', $shortenLinks = true)
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
@ -1266,7 +1266,7 @@ function hesk_makeURL($text, $class = '')
|
||||
'#(^|[\n\t (>.])([a-z][a-z\d+]*:/{2}(?:(?:[a-z0-9\-._~!$&\'(*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[a-z0-9\-._~!$&\'(*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&\'(*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&\'(*+,;=:@/?|]+|%[\dA-F]{2})*)?)#i',
|
||||
create_function(
|
||||
"\$matches",
|
||||
"return make_clickable_callback(MAGIC_URL_FULL, \$matches[1], \$matches[2], '', '$class');"
|
||||
"return make_clickable_callback(MAGIC_URL_FULL, \$matches[1], \$matches[2], '', '$class', '$shortenLinks');"
|
||||
),
|
||||
$text
|
||||
);
|
||||
@ -1276,7 +1276,7 @@ function hesk_makeURL($text, $class = '')
|
||||
'#(^|[\n\t (>.])(www\.(?:[a-z0-9\-._~!$&\'(*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[a-z0-9\-._~!$&\'(*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&\'(*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&\'(*+,;=:@/?|]+|%[\dA-F]{2})*)?)#i',
|
||||
create_function(
|
||||
"\$matches",
|
||||
"return make_clickable_callback(MAGIC_URL_WWW, \$matches[1], \$matches[2], '', '$class');"
|
||||
"return make_clickable_callback(MAGIC_URL_WWW, \$matches[1], \$matches[2], '', '$class', '$shortenLinks');"
|
||||
),
|
||||
$text
|
||||
);
|
||||
@ -1286,7 +1286,7 @@ function hesk_makeURL($text, $class = '')
|
||||
'/(^|[\n\t (>])(' . '(?:(?:(?:[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]|\x5c(?=[@,"\[\]\x5c\x00-\x20\x7f-\xff]))(?:[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]|(?<=\x5c)[@,"\[\]\x5c\x00-\x20\x7f-\xff]|\x5c(?=[@,"\[\]\x5c\x00-\x20\x7f-\xff])|\.(?=[^\.])){1,62}(?:[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]|(?<=\x5c)[@,"\[\]\x5c\x00-\x20\x7f-\xff])|[^@,"\[\]\x5c\x00-\x20\x7f-\xff\.]{1,2})|"(?:[^"]|(?<=\x5c)"){1,62}")@(?:(?!.{64})(?:[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.?|[a-zA-Z0-9]\.?)+\.(?:xn--[a-zA-Z0-9]+|[a-zA-Z]{2,6})|\[(?:[0-1]?\d?\d|2[0-4]\d|25[0-5])(?:\.(?:[0-1]?\d?\d|2[0-4]\d|25[0-5])){3}\])' . ')/iu',
|
||||
create_function(
|
||||
"\$matches",
|
||||
"return make_clickable_callback(MAGIC_URL_EMAIL, \$matches[1], \$matches[2], '', '$class');"
|
||||
"return make_clickable_callback(MAGIC_URL_EMAIL, \$matches[1], \$matches[2], '', '$class', '$shortenLinks');"
|
||||
),
|
||||
$text
|
||||
);
|
||||
@ -1295,7 +1295,7 @@ function hesk_makeURL($text, $class = '')
|
||||
} // END hesk_makeURL()
|
||||
|
||||
|
||||
function make_clickable_callback($type, $whitespace, $url, $relative_url, $class)
|
||||
function make_clickable_callback($type, $whitespace, $url, $relative_url, $class, $shortenLinks)
|
||||
{
|
||||
global $hesk_settings;
|
||||
|
||||
@ -1373,7 +1373,7 @@ function make_clickable_callback($type, $whitespace, $url, $relative_url, $class
|
||||
break;
|
||||
}
|
||||
|
||||
$short_url = ($hesk_settings['short_link'] && strlen($url) > 70) ? substr($url, 0, 54) . ' ... ' . substr($url, -10) : $url;
|
||||
$short_url = ($hesk_settings['short_link'] && strlen($url) > 70 && $shortenLinks) ? substr($url, 0, 54) . ' ... ' . substr($url, -10) : $url;
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -66,7 +66,10 @@ function hesk_notifyCustomerForVerifyEmail($email_template = 'verify_email', $ac
|
||||
$htmlMessage = hesk_getHtmlMessage($email_template, $ticket);
|
||||
$activationUrl = $hesk_settings['hesk_url'] . '/verifyemail.php?key=%%ACTIVATIONKEY%%';
|
||||
$message = str_replace('%%VERIFYURL%%', $activationUrl, $message);
|
||||
$htmlMessage = str_replace('%%VERIFYURL%%', $activationUrl, $htmlMessage);
|
||||
$message = str_replace('%%ACTIVATIONKEY%%', $activationKey, $message);
|
||||
$htmlMessage = str_replace('%%ACTIVATIONKEY%%', $activationKey, $htmlMessage);
|
||||
$hasMessage = hesk_doesTemplateHaveTag($email_template, '%%MESSAGE%%');
|
||||
|
||||
// Add Cc / Bcc recipents if needed
|
||||
$ccEmails = array();
|
||||
@ -85,7 +88,7 @@ function hesk_notifyCustomerForVerifyEmail($email_template = 'verify_email', $ac
|
||||
}
|
||||
}
|
||||
|
||||
hesk_mail($ticket['email'], $subject, $message, $htmlMessage, $ccEmails, $bccEmails);
|
||||
hesk_mail($ticket['email'], $subject, $message, $htmlMessage, $ccEmails, $bccEmails, $hasMessage);
|
||||
}
|
||||
|
||||
|
||||
@ -111,6 +114,7 @@ function hesk_notifyCustomer($email_template = 'new_ticket')
|
||||
$subject = hesk_getEmailSubject($email_template,$ticket);
|
||||
$message = hesk_getEmailMessage($email_template,$ticket);
|
||||
$htmlMessage = hesk_getHtmlMessage($email_template,$ticket);
|
||||
$hasMessage = hesk_doesTemplateHaveTag($email_template,'%%MESSAGE%%');
|
||||
|
||||
// Add Cc / Bcc recipents if needed
|
||||
$ccEmails = array();
|
||||
@ -128,7 +132,7 @@ function hesk_notifyCustomer($email_template = 'new_ticket')
|
||||
}
|
||||
|
||||
// Send e-mail
|
||||
hesk_mail($ticket['email'], $subject, $message, $htmlMessage, $ccEmails, $bccEmails);
|
||||
hesk_mail($ticket['email'], $subject, $message, $htmlMessage, $ccEmails, $bccEmails, $hasMessage);
|
||||
|
||||
// Reset the language if it was changed
|
||||
if ($changedLanguage)
|
||||
@ -175,9 +179,10 @@ function hesk_notifyAssignedStaff($autoassign_owner, $email_template, $type = 'n
|
||||
$subject = hesk_getEmailSubject($email_template,$ticket);
|
||||
$message = hesk_getEmailMessage($email_template,$ticket,1);
|
||||
$htmlMessage = hesk_getHtmlMessage($email_template,$ticket,1);
|
||||
$hasMessage = hesk_doesTemplateHaveTag($email_template,'%%MESSAGE%%');
|
||||
|
||||
/* Send email to staff */
|
||||
hesk_mail($autoassign_owner['email'], $subject, $message, $htmlMessage);
|
||||
hesk_mail($autoassign_owner['email'], $subject, $message, $htmlMessage, array(), array(), $hasMessage);
|
||||
|
||||
/* Reset language to original one */
|
||||
hesk_resetLanguage();
|
||||
@ -245,7 +250,7 @@ function hesk_notifyStaff($email_template,$sql_where,$is_ticket=1)
|
||||
if ($current_language != 'NONE')
|
||||
{
|
||||
/* Send e-mail to staff */
|
||||
hesk_mail(implode(',',$recipients), $subject, $message, $htmlMessage );
|
||||
hesk_mail(implode(',',$recipients), $subject, $message, $htmlMessage, array(), array(), $hasMessage);
|
||||
|
||||
/* Reset list of email addresses */
|
||||
$recipients = array();
|
||||
@ -258,6 +263,7 @@ function hesk_notifyStaff($email_template,$sql_where,$is_ticket=1)
|
||||
$subject = hesk_getEmailSubject($email_template,$ticket);
|
||||
$message = hesk_getEmailMessage($email_template,$ticket,$is_ticket);
|
||||
$htmlMessage = hesk_getHtmlMessage($email_template,$ticket,$is_ticket);
|
||||
$hasMessage = hesk_doesTemplateHaveTag($email_template, '%%MESSAGE%%');
|
||||
|
||||
/* Add email to the recipients list */
|
||||
$recipients[] = $admin['email'];
|
||||
@ -268,7 +274,7 @@ function hesk_notifyStaff($email_template,$sql_where,$is_ticket=1)
|
||||
}
|
||||
|
||||
/* Send email messages to the remaining staff */
|
||||
hesk_mail(implode(',',$recipients), $subject, $message, $htmlMessage);
|
||||
hesk_mail(implode(',',$recipients), $subject, $message, $htmlMessage, array(), array(), $hasMessage);
|
||||
|
||||
/* Reset language to original one */
|
||||
hesk_resetLanguage();
|
||||
@ -330,9 +336,9 @@ function hesk_validEmails()
|
||||
} // END hesk_validEmails()
|
||||
|
||||
|
||||
function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array())
|
||||
function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array(),$hasMessageTag = false)
|
||||
{
|
||||
global $hesk_settings, $hesklang, $modsForHesk_settings;
|
||||
global $hesk_settings, $hesklang, $modsForHesk_settings, $ticket;
|
||||
|
||||
// Demo mode
|
||||
if ( defined('HESK_DEMO') )
|
||||
@ -343,6 +349,9 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array())
|
||||
// Encode subject to UTF-8
|
||||
$subject = "=?UTF-8?B?" . base64_encode( hesk_html_entity_decode($subject) ) . "?=";
|
||||
|
||||
// Auto-generate URLs for HTML-formatted emails
|
||||
$htmlMessage = hesk_makeURL($htmlMessage, '', false);
|
||||
|
||||
// Setup "name <email>" for headers
|
||||
if ($hesk_settings['noreply_name'])
|
||||
{
|
||||
@ -394,6 +403,11 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array())
|
||||
{
|
||||
$postfields['html'] = $htmlMessage;
|
||||
}
|
||||
if ($hasMessageTag && $modsForHesk_settings['attachments'] && $hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']))
|
||||
{
|
||||
$postfields = processDirectAttachments('mailgun', $postfields);
|
||||
}
|
||||
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
|
||||
|
||||
$result = curl_exec($ch);
|
||||
@ -405,29 +419,35 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array())
|
||||
return (strlen($tmp)) ? $tmp : true;
|
||||
}
|
||||
|
||||
$boundary = sha1(uniqid());
|
||||
$outerboundary = sha1(uniqid());
|
||||
$innerboundary = sha1(uniqid());
|
||||
if ($outerboundary == $innerboundary) {
|
||||
$innerboundary .= '1';
|
||||
}
|
||||
$plaintextMessage = $message;
|
||||
$message = "--".$outerboundary."\n";
|
||||
$message .= "Content-Type: multipart/alternative; boundary=\"".$innerboundary."\"\n\n";
|
||||
|
||||
$message .= "--".$innerboundary."\n";
|
||||
$message .= "Content-Type: text/plain; charset=".$hesklang['ENCODING']."\n\n";
|
||||
$message .= $plaintextMessage."\n\n";
|
||||
//Prepare the message for HTML or non-html
|
||||
if ($modsForHesk_settings['html_emails'])
|
||||
{
|
||||
$plaintextMessage = $message;
|
||||
$message = "--".$boundary."\n";
|
||||
$message .= "Content-Type: text/plain; charset=".$hesklang['ENCODING']."\n\n";
|
||||
$message .= $plaintextMessage."\n\n";
|
||||
$message .= "--".$boundary."\n";
|
||||
$message .= "--".$innerboundary."\n";
|
||||
$message .= "Content-Type: text/html; charset=".$hesklang['ENCODING']."\n\n";
|
||||
$message .= $htmlMessage."\n\n";
|
||||
$message .= "--".$boundary."--";
|
||||
}
|
||||
|
||||
//-- Close the email
|
||||
$message .= "--".$innerboundary."--";
|
||||
|
||||
// Use PHP's mail function
|
||||
if ( ! $hesk_settings['smtp'])
|
||||
{
|
||||
// Set additional headers
|
||||
$headers = '';
|
||||
if ($modsForHesk_settings['html_emails'])
|
||||
{
|
||||
$headers .= "MIME-Version: 1.0\n";
|
||||
}
|
||||
$headers .= "MIME-Version: 1.0\n";
|
||||
$headers .= "From: $hesk_settings[from_header]\n";
|
||||
if (count($cc) > 0)
|
||||
{
|
||||
@ -440,10 +460,14 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array())
|
||||
$headers.= "Reply-To: $hesk_settings[from_header]\n";
|
||||
$headers.= "Return-Path: $hesk_settings[webmaster_mail]\n";
|
||||
$headers.= "Date: " . date(DATE_RFC2822) . "\n";
|
||||
if ($modsForHesk_settings['html_emails'])
|
||||
$headers.= "Content-Type: multipart/mixed;boundary=\"".$outerboundary."\"";
|
||||
|
||||
// Add attachments if necessary
|
||||
if ($hasMessageTag && $modsForHesk_settings['attachments'] && $hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']))
|
||||
{
|
||||
$headers.= "Content-Type: multipart/alternative;boundary=".$boundary;
|
||||
$message .= processDirectAttachments('phpmail', NULL, $outerboundary);
|
||||
}
|
||||
$message .= "\n\n".'--'.$outerboundary.'--';
|
||||
|
||||
// Send using PHP mail() function
|
||||
ob_start();
|
||||
@ -479,14 +503,9 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array())
|
||||
"Subject: " . $subject,
|
||||
"Date: " . date(DATE_RFC2822)
|
||||
);
|
||||
if ($modsForHesk_settings['html_emails'])
|
||||
{
|
||||
array_push($headersArray,"MIME-Version: 1.0");
|
||||
array_push($headersArray,"Content-Type: multipart/alternative;boundary=".$boundary);
|
||||
} else
|
||||
{
|
||||
array_push($headersArray,"Content-Type: text/plain; charset=" . $hesklang['ENCODING']);
|
||||
}
|
||||
array_push($headersArray,"MIME-Version: 1.0");
|
||||
array_push($headersArray,"Content-Type: multipart/mixed;boundary=\"".$outerboundary."\"");
|
||||
|
||||
if (count($cc) > 0)
|
||||
{
|
||||
array_push($headersArray,"Cc: ".implode(',',$cc));
|
||||
@ -496,6 +515,12 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array())
|
||||
array_push($headersArray,"Bcc: ".implode(',',$bcc));
|
||||
}
|
||||
|
||||
// Add attachments if necessary
|
||||
if ($hasMessageTag && $modsForHesk_settings['attachments'] && $hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']))
|
||||
{
|
||||
$message .= processDirectAttachments('smtp', NULL, $outerboundary);
|
||||
}
|
||||
$message .= "\n\n".'--'.$outerboundary.'--';
|
||||
|
||||
if ( ! $smtp->SendMessage($hesk_settings['noreply_mail'], $to_arr, $headersArray, $message))
|
||||
{
|
||||
@ -629,7 +654,7 @@ function hesk_getHtmlMessage($eml_file, $ticket, $is_admin=0, $is_ticket=1, $jus
|
||||
}
|
||||
|
||||
//Perform logic common between hesk_getEmailMessage and hesk_getHtmlMessage
|
||||
$msg = hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message);
|
||||
$msg = hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message, true);
|
||||
return $msg;
|
||||
}
|
||||
|
||||
@ -669,9 +694,23 @@ function hesk_getEmailMessage($eml_file, $ticket, $is_admin=0, $is_ticket=1, $ju
|
||||
|
||||
} // END hesk_getEmailMessage
|
||||
|
||||
function hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message)
|
||||
function hesk_doesTemplateHaveTag($eml_file, $tag)
|
||||
{
|
||||
global $hesk_settings, $hesklang;
|
||||
global $hesk_settings, $modsForHesk_settings;
|
||||
$path = 'language/' . $hesk_settings['languages'][$hesk_settings['language']]['folder'] . '/emails/'. $eml_file .'.txt';
|
||||
$htmlHasTag = false;
|
||||
if ($modsForHesk_settings['html_emails']) {
|
||||
$htmlPath = 'language/' . $hesk_settings['languages'][$hesk_settings['language']]['folder'] . '/emails/html/'. $eml_file . '.txt';
|
||||
$htmlContents = file_get_contents(HESK_PATH.$htmlPath);
|
||||
$htmlHasTag = !(strpos($htmlContents, $tag) === false);
|
||||
}
|
||||
$emailContents = file_get_contents(HESK_PATH . $path);
|
||||
return !(strpos($emailContents, $tag) === false) || $htmlHasTag;
|
||||
}
|
||||
|
||||
function hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message, $isForHtml = 0)
|
||||
{
|
||||
global $hesk_settings, $hesklang, $modsForHesk_settings;
|
||||
|
||||
/* Return just the message without any processing? */
|
||||
if ($just_message)
|
||||
@ -695,6 +734,11 @@ function hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message
|
||||
|
||||
if ( isset($ticket['message']) )
|
||||
{
|
||||
if ($isForHtml)
|
||||
{
|
||||
$htmlMessage = nl2br($ticket['message']);
|
||||
return str_replace('%%MESSAGE%%', $htmlMessage, $msg);
|
||||
}
|
||||
return str_replace('%%MESSAGE%%', $ticket['message'], $msg);
|
||||
}
|
||||
else
|
||||
@ -776,19 +820,40 @@ function hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message
|
||||
if (strpos($msg, '%%MESSAGE%%') !== false)
|
||||
{
|
||||
// Replace message
|
||||
$msg = str_replace('%%MESSAGE%%',$ticket['message'],$msg);
|
||||
if ($isForHtml)
|
||||
{
|
||||
$htmlMessage = nl2br($ticket['message']);
|
||||
$msg = str_replace('%%MESSAGE%%', $htmlMessage, $msg);
|
||||
} else
|
||||
{
|
||||
$msg = str_replace('%%MESSAGE%%',$ticket['message'],$msg);
|
||||
}
|
||||
|
||||
// Add direct links to any attachments at the bottom of the email message
|
||||
// Add direct links to any attachments at the bottom of the email message OR add them as attachments, depending on the settings
|
||||
// if ($modsForHesk_settings['attachments'] == 'inline' (other is 'attachment') {...}
|
||||
if ($hesk_settings['attachments']['use'] && isset($ticket['attachments']) && strlen($ticket['attachments']) )
|
||||
{
|
||||
$msg .= "\n\n\n" . $hesklang['fatt'];
|
||||
if (!$modsForHesk_settings['attachments']) {
|
||||
if ($isForHtml) {
|
||||
$msg .= "<br><br><br>" . $hesklang['fatt'];
|
||||
} else {
|
||||
$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'];
|
||||
$att = explode(',', substr($ticket['attachments'], 0, -1));
|
||||
foreach ($att as $myatt)
|
||||
{
|
||||
list($att_id, $att_name, $saved_name) = explode('#', $myatt);
|
||||
if ($isForHtml) {
|
||||
$msg .= "<br><br>" . $att_name . "<br>";
|
||||
} else {
|
||||
$msg .= "\n\n" . $att_name . "\n";
|
||||
}
|
||||
$msg .= $hesk_settings['hesk_url'] . '/download_attachment.php?att_id='.$att_id.'&track='.$ticket['trackid'].$hesk_settings['e_param'];
|
||||
}
|
||||
}
|
||||
|
||||
// If attachments setting is set to 1, we'll add the attachments separately later; otherwise we'll duplicate the number of attachments.
|
||||
}
|
||||
|
||||
// For customer notifications: if we allow email piping/pop 3 fetching and
|
||||
@ -801,3 +866,34 @@ function hesk_processMessage($msg, $ticket, $is_admin, $is_ticket, $just_message
|
||||
|
||||
return $msg;
|
||||
}
|
||||
|
||||
// $postfields is only required for mailgun.
|
||||
// $boundary is only required for PHP/SMTP
|
||||
function processDirectAttachments($emailMethod, $postfields = NULL, $boundary = '') {
|
||||
global $hesk_settings, $ticket;
|
||||
|
||||
$att = explode(',', substr($ticket['attachments'], 0, -1));
|
||||
// if using mailgun, add each attachment to the array
|
||||
if ($emailMethod == 'mailgun') {
|
||||
$i = 0;
|
||||
foreach ($att as $myatt) {
|
||||
list($att_id, $att_name, $saved_name) = explode('#', $myatt);
|
||||
$postfields['attachment['.$i.']'] = '@'.HESK_PATH.$hesk_settings['attach_dir'].'/'.$saved_name;
|
||||
$i++;
|
||||
}
|
||||
return $postfields;
|
||||
} else {
|
||||
$attachments = '';
|
||||
foreach ($att as $myatt) {
|
||||
list($att_id, $att_name, $saved_name) = explode('#', $myatt);
|
||||
$attachments .= "\n\n" . "--".$boundary."\n";
|
||||
$attachments .= "Content-Type: application/octet-stream; name=\"".$att_name."\" \n";
|
||||
$attachments .= "Content-Disposition: attachment\n";
|
||||
$attachments .= "Content-Transfer-Encoding: base64\n\n";
|
||||
$attachmentBinary = file_get_contents(HESK_PATH.$hesk_settings['attach_dir'].'/'.$saved_name);
|
||||
$attcontents = chunk_split(base64_encode($attachmentBinary));
|
||||
$attachments .= $attcontents."\n\n";
|
||||
}
|
||||
return $attachments;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -50,7 +50,7 @@ require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
<?php } ?>
|
||||
<link href="<?php echo HESK_PATH; ?>css/datepicker.css" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" <?php if ($modsForHesk_settings['use_bootstrap_theme'] == 0) {echo 'disabled';} ?>>
|
||||
<?php if ($modsForHesk_settings['rtl']) { ?>
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-rtl.min.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyleRTL.php?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.5.5 from 5th August 2014
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -50,7 +50,7 @@ require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
<?php } ?>
|
||||
<link href="<?php echo HESK_PATH; ?>css/datepicker.css" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" <?php if ($modsForHesk_settings['use_bootstrap_theme'] == 0) {echo 'disabled';} ?>>
|
||||
<?php if ($modsForHesk_settings['rtl']) { ?>
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-rtl.min.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyleRTL.php?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -90,78 +90,70 @@ function hesk_kbTopArticles($how_many, $index = 1)
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<h4 class="text-left"><?php echo $hesklang['popart']; ?></h4>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
|
||||
<?php
|
||||
/* Get list of articles from the database */
|
||||
$res = hesk_dbQuery("SELECT `t1`.`id`,`t1`.`subject`,`t1`.`views` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="text-left"><?php echo $hesklang['popart_no_colon']; ?></h4>
|
||||
</div>
|
||||
<table border="0" width="100%" class="table table-striped table-fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-xs-8 col-sm-9"> </th>
|
||||
<?php
|
||||
/* Get list of articles from the database */
|
||||
$res = hesk_dbQuery("SELECT `t1`.`id`,`t1`.`subject`,`t1`.`views` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
|
||||
LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` AS `t2` ON `t1`.`catid` = `t2`.`id`
|
||||
WHERE `t1`.`type`='0' AND `t2`.`type`='0'
|
||||
ORDER BY `t1`.`sticky` DESC, `t1`.`views` DESC, `t1`.`art_order` ASC LIMIT ".intval($how_many));
|
||||
|
||||
/* Show number of views? */
|
||||
if ($hesk_settings['kb_views'] && hesk_dbNumRows($res) != 0)
|
||||
{
|
||||
echo '<td class="text-right"><i>' . $hesklang['views'] . '</i></td>';
|
||||
}
|
||||
?>
|
||||
/* Show number of views? */
|
||||
if ($hesk_settings['kb_views'] && hesk_dbNumRows($res) != 0)
|
||||
{
|
||||
echo '<th class="col-xs-4 col-sm-3"><i>' . $hesklang['views'] . '</i></th>';
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
/* Get list of articles from the database */
|
||||
$res = hesk_dbQuery("SELECT `t1`.`id`,`t1`.`subject`,`t1`.`dt`, `t1`.`views` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
|
||||
LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` AS `t2` ON `t1`.`catid` = `t2`.`id`
|
||||
WHERE `t1`.`type`='0' AND `t2`.`type`='0'
|
||||
ORDER BY `t1`.`sticky` DESC, `t1`.`views` DESC, `t1`.`art_order` ASC LIMIT ".intval($how_many));
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
/* If no results found end here */
|
||||
if (hesk_dbNumRows($res) == 0)
|
||||
{
|
||||
$colspan = '';
|
||||
if (!$hesk_settings['kb_views']) {
|
||||
$colspan = 'colspan="2"';
|
||||
}
|
||||
echo '<tr><td '.$colspan.'><i>'.$hesklang['noa'].'</i></td></tr>';
|
||||
return true;
|
||||
}
|
||||
|
||||
<?php
|
||||
/* Get list of articles from the database */
|
||||
$res = hesk_dbQuery("SELECT `t1`.`id`,`t1`.`subject`,`t1`.`dt` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
|
||||
LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` AS `t2` ON `t1`.`catid` = `t2`.`id`
|
||||
WHERE `t1`.`type`='0' AND `t2`.`type`='0'
|
||||
ORDER BY `t1`.`sticky` DESC, `t1`.`views` DESC, `t1`.`art_order` ASC LIMIT ".intval($how_many));
|
||||
|
||||
/* If no results found end here */
|
||||
if (hesk_dbNumRows($res) == 0)
|
||||
{
|
||||
echo '<p class="text-left"><i>'.$hesklang['noa'].'</i><br /> </p>';
|
||||
return true;
|
||||
}
|
||||
|
||||
/* We have some results, print them out */
|
||||
?>
|
||||
<div align="left">
|
||||
<table border="0" cellspacing="1" cellpadding="3" width="100%">
|
||||
<?php
|
||||
|
||||
while ($article = hesk_dbFetchAssoc($res))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="1" valign="top"><span class="glyphicon glyphicon-file"></span></td>
|
||||
<td valign="top"> <a href="knowledgebase.php?article=' . $article['id'] . '">' . $article['subject'] . '</a></td>
|
||||
';
|
||||
|
||||
if ($hesk_settings['kb_views'])
|
||||
{
|
||||
echo '<td valign="top" class="text-right" width="200">' . $article['views'] . '</td>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
/* We have some results, print them out */
|
||||
$colspan = '';
|
||||
if (!$hesk_settings['kb_views']) {
|
||||
$colspan = 'colspan="2"';
|
||||
}
|
||||
while ($article = hesk_dbFetchAssoc($res))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td class="col-xs-8 col-sm-9" '.$colspan.'>
|
||||
<i class="fa fa-file"></i> <a href="knowledgebase.php?article='.$article['id'].'">'.$article['subject'].'</a>
|
||||
</td>
|
||||
';
|
||||
if ($hesk_settings['kb_views']) {
|
||||
echo '<td class="col-xs-4 col-sm-3">'.$article['views'].'</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
<?php
|
||||
} // END hesk_kbTopArticles()
|
||||
|
||||
@ -201,78 +193,73 @@ function hesk_kbLatestArticles($how_many, $index = 1)
|
||||
}
|
||||
?>
|
||||
|
||||
<h4 class="text-left"><?php echo $hesklang['latart']; ?></h4>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="text-left"><?php echo $hesklang['latart_no_colon']; ?></h4>
|
||||
</div>
|
||||
<table class="table table-striped table-fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
$colspan = '';
|
||||
if (!$hesk_settings['kb_date']) {
|
||||
$colspan = 'colspan="2"';
|
||||
}
|
||||
/* Get list of articles from the database */
|
||||
$res = hesk_dbQuery("SELECT `t1`.* FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
|
||||
LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` AS `t2` ON `t1`.`catid` = `t2`.`id`
|
||||
WHERE `t1`.`type`='0' AND `t2`.`type`='0'
|
||||
ORDER BY `t1`.`dt` DESC LIMIT ".intval($how_many));
|
||||
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
<?php
|
||||
/* Get list of articles from the database */
|
||||
$res = hesk_dbQuery("SELECT `t1`.* FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
|
||||
/* Show number of views? */
|
||||
if (hesk_dbNumRows($res) != 0)
|
||||
{
|
||||
echo '<th class="col-xs-9" '.$colspan.'> </th>';
|
||||
if ($hesk_settings['kb_date'])
|
||||
{
|
||||
echo '<th class="col-xs-3"><i>' . $hesklang['dta'] . '</i></th>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
/* Get list of articles from the database */
|
||||
$res = hesk_dbQuery("SELECT `t1`.* FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
|
||||
LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` AS `t2` ON `t1`.`catid` = `t2`.`id`
|
||||
WHERE `t1`.`type`='0' AND `t2`.`type`='0'
|
||||
ORDER BY `t1`.`dt` DESC LIMIT ".intval($how_many));
|
||||
|
||||
/* Show number of views? */
|
||||
if ($hesk_settings['kb_date'] && hesk_dbNumRows($res) != 0)
|
||||
{
|
||||
echo '<td class="text-right"><i>' . $hesklang['dta'] . '</i></td>';
|
||||
}
|
||||
?>
|
||||
/* If no results found end here */
|
||||
if (hesk_dbNumRows($res) == 0)
|
||||
{
|
||||
$colspan = '';
|
||||
if ($hesk_settings['kb_date']) {
|
||||
$colspan = 'colspan="2"';
|
||||
}
|
||||
echo '<td '.$colspan.'><i>'.$hesklang['noa'].'</i></td>';
|
||||
return true;
|
||||
}
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
/* Get list of articles from the database */
|
||||
$res = hesk_dbQuery("SELECT `t1`.* FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
|
||||
LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` AS `t2` ON `t1`.`catid` = `t2`.`id`
|
||||
WHERE `t1`.`type`='0' AND `t2`.`type`='0'
|
||||
ORDER BY `t1`.`dt` DESC LIMIT ".intval($how_many));
|
||||
|
||||
/* If no results found end here */
|
||||
if (hesk_dbNumRows($res) == 0)
|
||||
{
|
||||
echo '<p class="text-left"><i>'.$hesklang['noa'].'</i><br /> </p>';
|
||||
return true;
|
||||
}
|
||||
|
||||
/* We have some results, print them out */
|
||||
?>
|
||||
<div align="center">
|
||||
<table border="0" cellspacing="1" cellpadding="3" width="100%">
|
||||
<?php
|
||||
|
||||
while ($article = hesk_dbFetchAssoc($res))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="1" valign="top"><span class="glyphicon glyphicon-file"></span></td>
|
||||
<td valign="top"> <a href="knowledgebase.php?article=' . $article['id'] . '">' . $article['subject'] . '</a></td>
|
||||
';
|
||||
|
||||
if ($hesk_settings['kb_date'])
|
||||
{
|
||||
echo '<td valign="top" class="text-right" width="200">' . hesk_date($article['dt'], true) . '</td>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
/* We have some results, print them out */
|
||||
$colspan = $hesk_settings['kb_date'] ? '' : 'colspan="2"';
|
||||
while ($article = hesk_dbFetchAssoc($res))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td class="col-xs-9" '.$colspan.'>
|
||||
<i class="fa fa-file"></i> <a href="knowledgebase.php?article='.$article['id'].'">'.$article['subject'].'</a>
|
||||
</td>';
|
||||
if ($hesk_settings['kb_date']) {
|
||||
echo '<td class="col-xs-3">' . hesk_date($article['dt'], true) . '</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
} // END hesk_kbLatestArticles()
|
||||
|
||||
@ -293,7 +280,7 @@ function hesk_kbSearchLarge($admin = '')
|
||||
<div style="text-align:center">
|
||||
<form role="form" action="<?php echo $action; ?>" method="get" style="display: inline; margin: 0;" name="searchform">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="<?php echo $hesklang['search_the_knowledgebase']; ?>" name="search">
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['search_the_knowledgebase']); ?>" name="search">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit" value="<?php echo $hesklang['search']; ?>" title="<?php echo $hesklang['search']; ?>"><?php echo $hesklang['search']; ?></button>
|
||||
</span>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.1 from 26th February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -37,13 +37,13 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
|
||||
|
||||
/*** FUNCTIONS ***/
|
||||
|
||||
function hesk_newTicket($ticket)
|
||||
function hesk_newTicket($ticket, $isVerified = true)
|
||||
{
|
||||
global $hesk_settings, $hesklang, $hesk_db_link;
|
||||
|
||||
// If language is not set or default, set it to NULL.
|
||||
if (!isset($ticket['language']) || empty($ticket['language'])) {
|
||||
$language = (!$hesk_settings['can_sel_lang']) ? HESK_DEFAULT_LANGUAGE : "'" . hesk_dbEscape($hesklang['LANGUAGE']) . "'";
|
||||
$language = (!$hesk_settings['can_sel_lang']) ? HESK_DEFAULT_LANGUAGE : hesk_dbEscape($hesklang['LANGUAGE']);
|
||||
} else {
|
||||
$language = $ticket['language'];
|
||||
}
|
||||
@ -52,10 +52,11 @@ function hesk_newTicket($ticket)
|
||||
$defaultNewTicketRs = hesk_dbQuery("SELECT `ID` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` WHERE `IsNewTicketStatus` = 1");
|
||||
$defaultNewTicket = hesk_dbFetchAssoc($defaultNewTicketRs);
|
||||
$ticket['status'] = $defaultNewTicket['ID'];
|
||||
$tableName = $isVerified ? 'tickets' : 'stage_tickets';
|
||||
|
||||
// Insert ticket into database
|
||||
hesk_dbQuery("
|
||||
INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets`
|
||||
INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix']).$tableName."`
|
||||
(
|
||||
`trackid`,
|
||||
`name`,
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -64,13 +64,13 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-md-3 control-label"><?php echo $hesklang['real_name']; ?>: <font class="important">*</font></label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" name="name" size="40" maxlength="50" value="<?php echo $_SESSION[$session_array]['name']; ?>" placeholder="<?php echo $hesklang['real_name']; ?>" />
|
||||
<input type="text" class="form-control" name="name" size="40" maxlength="50" value="<?php echo $_SESSION[$session_array]['name']; ?>" placeholder="<?php echo htmlspecialchars($hesklang['real_name']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-md-3 control-label"><?php echo $hesklang['email']; ?>: <font class="important">*</font></label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" name="email" size="40" maxlength="255" placeholder="<?php echo $hesklang['email']; ?>" value="<?php echo $_SESSION[$session_array]['email']; ?>" />
|
||||
<input type="text" class="form-control" name="email" size="40" maxlength="255" placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>" value="<?php echo $_SESSION[$session_array]['email']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@ -82,7 +82,7 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" name="user" size="40" maxlength="20"
|
||||
value="<?php echo $_SESSION[$session_array]['user']; ?>"
|
||||
placeholder="<?php echo $hesklang['username']; ?>"/>
|
||||
placeholder="<?php echo htmlspecialchars($hesklang['username']); ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@ -92,13 +92,13 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
|
||||
<div class="form-group">
|
||||
<label for="pass" class="col-md-3 control-label"><?php echo $is_profile_page ? $hesklang['new_pass'] : $hesklang['pass']; ?>: <span class="important" style="<?php echo $passwordRequiredSpan; ?>">*</span></label>
|
||||
<div class="col-md-9">
|
||||
<input type="password" class="form-control" name="newpass" autocomplete="off" size="40" placeholder="<?php echo $hesklang['pass']; ?>" value="<?php echo isset($_SESSION[$session_array]['cleanpass']) ? $_SESSION[$session_array]['cleanpass'] : ''; ?>" onkeyup="javascript:hesk_checkPassword(this.value)" />
|
||||
<input type="password" class="form-control" name="newpass" autocomplete="off" size="40" placeholder="<?php echo htmlspecialchars($hesklang['pass']); ?>" value="<?php echo isset($_SESSION[$session_array]['cleanpass']) ? $_SESSION[$session_array]['cleanpass'] : ''; ?>" onkeyup="javascript:hesk_checkPassword(this.value)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="confirmPass" class="col-md-3 control-label"><?php echo $hesklang['confirm_pass']; ?>: <span class="important" style="<?php echo $passwordRequiredSpan; ?>">*</span></label>
|
||||
<div class="col-md-9">
|
||||
<input type="password" name="newpass2" class="form-control" autocomplete="off" placeholder="<?php echo $hesklang['confirm_pass']; ?>" size="40" value="<?php echo isset($_SESSION[$session_array]['cleanpass']) ? $_SESSION[$session_array]['cleanpass'] : ''; ?>" />
|
||||
<input type="password" name="newpass2" class="form-control" autocomplete="off" placeholder="<?php echo htmlspecialchars($hesklang['confirm_pass']); ?>" size="40" value="<?php echo isset($_SESSION[$session_array]['cleanpass']) ? $_SESSION[$session_array]['cleanpass'] : ''; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -111,7 +111,7 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ( ! $is_profile_page && $hesk_settings['autoassign']) {
|
||||
if (!$is_profile_page) {
|
||||
?>
|
||||
<div class="blankSpace"></div>
|
||||
<div class="form-group">
|
||||
@ -196,7 +196,7 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
|
||||
}
|
||||
?>
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" name="can_change_notification_settings" checked> <?php echo $hesklang['can_change_notification_settings']; ?> </label>
|
||||
<label><input type="checkbox" name="can_change_notification_settings" <?php if (!isset($_SESSION[$session_array]['can_change_notification_settings']) || $_SESSION[$session_array]['can_change_notification_settings']) { echo 'checked'; } ?>> <?php echo $hesklang['can_change_notification_settings']; ?> </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -210,7 +210,7 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
|
||||
<label for="signature" class="col-md-3 control-label"><?php echo $hesklang['signature_max']; ?>:</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
<textarea class="form-control" name="signature" rows="6" placeholder="<?php echo $hesklang['sig']; ?>" cols="40"><?php echo $_SESSION[$session_array]['signature']; ?></textarea>
|
||||
<textarea class="form-control" name="signature" rows="6" placeholder="<?php echo htmlspecialchars($hesklang['sig']); ?>" cols="40"><?php echo $_SESSION[$session_array]['signature']; ?></textarea>
|
||||
<?php echo $hesklang['sign_extra']; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
32
index.php
32
index.php
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -194,13 +194,13 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
<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" id="name" name="name" size="40" maxlength="30" value="<?php if (isset($_SESSION['c_name'])) {echo stripslashes(hesk_input($_SESSION['c_name']));} ?>" <?php if (in_array('name',$_SESSION['iserror'])) {echo ' class="isError" ';} ?> placeholder="<?php echo $hesklang['name']; ?>" />
|
||||
<input type="text" class="form-control" id="name" name="name" size="40" maxlength="30" value="<?php if (isset($_SESSION['c_name'])) {echo stripslashes(hesk_input($_SESSION['c_name']));} ?>" <?php if (in_array('name',$_SESSION['iserror'])) {echo ' class="isError" ';} ?> placeholder="<?php echo htmlspecialchars($hesklang['name']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-3 control-label"><?php echo $hesklang['email']; ?>: <font class="important">*</font></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="email" name="email" size="40" maxlength="1000" value="<?php if (isset($_SESSION['c_email'])) {echo stripslashes(hesk_input($_SESSION['c_email']));} ?>" <?php if (in_array('email',$_SESSION['iserror'])) {echo ' class="isError" ';} elseif (in_array('email',$_SESSION['isnotice'])) {echo ' class="isNotice" ';} ?> <?php if($hesk_settings['detect_typos']) { echo ' onblur="Javascript:hesk_suggestEmail(0)"'; } ?> placeholder="<?php echo $hesklang['email']; ?>" />
|
||||
<input type="text" class="form-control" id="email" name="email" size="40" maxlength="1000" value="<?php if (isset($_SESSION['c_email'])) {echo stripslashes(hesk_input($_SESSION['c_email']));} ?>" <?php if (in_array('email',$_SESSION['iserror'])) {echo ' class="isError" ';} elseif (in_array('email',$_SESSION['isnotice'])) {echo ' class="isNotice" ';} ?> <?php if($hesk_settings['detect_typos']) { echo ' onblur="Javascript:hesk_suggestEmail(0)"'; } ?> placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@ -210,7 +210,7 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
<div class="form-group">
|
||||
<label for="email2" class="col-sm-3 control-label"><?php echo $hesklang['confemail']; ?>: <font class="important">*</font></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="email2" class="form-control" name="email2" size="40" maxlength="1000" value="<?php if (isset($_SESSION['c_email2'])) {echo stripslashes(hesk_input($_SESSION['c_email2']));} ?>" <?php if (in_array('email2',$_SESSION['iserror'])) {echo ' class="isError" ';} ?> placeholder="<?php echo $hesklang['confemail']; ?>" />
|
||||
<input type="text" id="email2" class="form-control" name="email2" size="40" maxlength="1000" value="<?php if (isset($_SESSION['c_email2'])) {echo stripslashes(hesk_input($_SESSION['c_email2']));} ?>" <?php if (in_array('email2',$_SESSION['iserror'])) {echo ' class="isError" ';} ?> placeholder="<?php echo htmlspecialchars($hesklang['confemail']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@ -493,7 +493,7 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
<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="'.$formattedId.'" name="'.$k.'" size="40"
|
||||
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.htmlspecialchars($v['name']).'" id="'.$formattedId.'" name="'.$k.'" size="40"
|
||||
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
|
||||
<span class="help-block">'.$hesklang['date_format'].'</span>
|
||||
</div>
|
||||
@ -557,13 +557,13 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
<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 type="text" id="subject" class="form-control" name="subject" size="40" maxlength="40" value="<?php if (isset($_SESSION['c_subject'])) {echo stripslashes(hesk_input($_SESSION['c_subject']));} ?>" <?php if (in_array('subject',$_SESSION['iserror'])) {echo ' class="isError" ';} ?> placeholder="<?php echo $hesklang['subject']; ?>"/>
|
||||
<input type="text" id="subject" class="form-control" name="subject" size="40" maxlength="40" value="<?php if (isset($_SESSION['c_subject'])) {echo stripslashes(hesk_input($_SESSION['c_subject']));} ?>" <?php if (in_array('subject',$_SESSION['iserror'])) {echo ' class="isError" ';} ?> placeholder="<?php echo htmlspecialchars($hesklang['subject']); ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<div class="col-sm-12">
|
||||
<textarea placeholder="<?php echo $hesklang['message']; ?>" name="message" id="message" class="form-control" rows="12" cols="60" <?php if (in_array('message',$_SESSION['iserror'])) {echo ' class="isError" ';} ?> ><?php if (isset($_SESSION['c_message'])) {echo stripslashes(hesk_input($_SESSION['c_message']));} ?></textarea>
|
||||
<textarea placeholder="<?php echo htmlspecialchars($hesklang['message']); ?>" name="message" id="message" class="form-control" rows="12" cols="60" <?php if (in_array('message',$_SESSION['iserror'])) {echo ' class="isError" ';} ?> ><?php if (isset($_SESSION['c_message'])) {echo stripslashes(hesk_input($_SESSION['c_message']));} ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -792,7 +792,7 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
<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="'.$formattedId.'" name="'.$k.'" size="40"
|
||||
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.htmlspecialchars($v['name']).'" id="'.$formattedId.'" name="'.$k.'" size="40"
|
||||
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
|
||||
<span class="help-block">'.$hesklang['date_format'].'</span>
|
||||
</div>
|
||||
@ -879,7 +879,7 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
{
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label for="question"><?php echo $hesklang['verify_q']; ?> <font class="important">*</font></label>
|
||||
<label for="question" class="col-sm-3 control-label"><?php echo $hesklang['verify_q']; ?> <span class="important">*</span></label>
|
||||
|
||||
<?php
|
||||
$value = '';
|
||||
@ -888,7 +888,7 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
$value = stripslashes(hesk_input($_SESSION['c_question']));
|
||||
}
|
||||
$cls = in_array('question',$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
echo $hesk_settings['question_ask'].'<br /><input class="form-control" id="question" type="text" name="question" size="20" value="'.$value.'" '.$cls.' />';
|
||||
echo '<div class="col-md-9">'.$hesk_settings['question_ask'].'<br /><input class="form-control" id="question" type="text" name="question" size="20" value="'.$value.'" '.$cls.' /></div>';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
@ -927,15 +927,21 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<div class="col-md-9">
|
||||
<?php
|
||||
require(HESK_PATH . 'inc/recaptcha/recaptchalib.php');
|
||||
echo recaptcha_get_html($hesk_settings['recaptcha_public_key'], null, true);
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
// Use reCaptcha API v2?
|
||||
elseif ($hesk_settings['recaptcha_use'] == 2)
|
||||
{
|
||||
?>
|
||||
<div class="g-recaptcha" data-sitekey="<?php echo $hesk_settings['recaptcha_public_key']; ?>"></div>
|
||||
<div class="col-md-9">
|
||||
<div class="g-recaptcha" data-sitekey="<?php echo $hesk_settings['recaptcha_public_key']; ?>"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
// At least use some basic PHP generated image (better than nothing)
|
||||
@ -1072,7 +1078,7 @@ function print_start()
|
||||
<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']; ?>">
|
||||
<input type="text" class="form-control" name="track" id="ticketID" maxlength="20" size="35" value="" placeholder="<?php echo htmlspecialchars($hesklang['ticket_trackID']); ?>">
|
||||
</div>
|
||||
<?php
|
||||
$tmp = '';
|
||||
@ -1082,7 +1088,7 @@ function print_start()
|
||||
?>
|
||||
<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']; ?>"/>
|
||||
<input type="text" class="form-control" name="e" id="emailAddress" size="35" value="<?php echo $my_email; ?>" placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>"/>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<input type="checkbox" name="r" value="Y" <?php echo $do_remember; ?> /> <?php echo $hesklang['rem_email']; ?></label>
|
||||
|
@ -1,64 +1,10 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
* COPYRIGHT AND TRADEMARK NOTICE
|
||||
* Copyright 2005-2015 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','../');
|
||||
|
||||
require(HESK_PATH . 'install/install_functions.inc.php');
|
||||
|
||||
// Reset installation steps
|
||||
hesk_session_stop();
|
||||
|
||||
hesk_iHeader();
|
||||
?>
|
||||
<div class="setupContainer">
|
||||
<img src="hesk.png" alt="HESK Logo" />
|
||||
<br><br>
|
||||
<p>Thank you for downloading HESK. Please choose an option below.</p>
|
||||
<br>
|
||||
<br>
|
||||
<a class="btn btn-default btn-lg" href="install.php?" role="button">Setup</a>
|
||||
<p><br/>Install a new copy of HESK on your server</p>
|
||||
<br/><br/>
|
||||
<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="mods-for-hesk/modsForHesk.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
|
||||
hesk_iFooter();
|
||||
exit();
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Install | Redirecting...</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.location.replace("mods-for-hesk/modsForHesk.php");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -36,8 +36,8 @@
|
||||
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
|
||||
|
||||
// We will be installing this HESK version:
|
||||
define('HESK_NEW_VERSION','2.6.0');
|
||||
define('MODS_FOR_HESK_NEW_VERSION','2.0.1');
|
||||
define('HESK_NEW_VERSION','2.6.2');
|
||||
define('MODS_FOR_HESK_NEW_VERSION','2.2.1');
|
||||
define('REQUIRE_PHP_VERSION','5.0.0');
|
||||
define('REQUIRE_MYSQL_VERSION','5.0.7');
|
||||
|
||||
|
@ -4,7 +4,7 @@ define('HESK_PATH','../../../');
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
hesk_load_database_functions();
|
||||
require('../modsForHeskSql.php');
|
||||
require('../sql/installSql.php');
|
||||
|
||||
$version = $_POST['version'];
|
||||
if ($version == 1) {
|
||||
@ -27,6 +27,17 @@ if ($version == 1) {
|
||||
execute200FileUpdate();
|
||||
} elseif ($version == 201) {
|
||||
execute201Scripts();
|
||||
} elseif ($version == 210) {
|
||||
execute210Scripts();
|
||||
execute210FileUpdate();
|
||||
} elseif ($version == 211) {
|
||||
execute211Scripts();
|
||||
execute211FileUpdate();
|
||||
} elseif ($version == 220) {
|
||||
execute220Scripts();
|
||||
execute220FileUpdate();
|
||||
} elseif ($version == 221) {
|
||||
execute221Scripts();
|
||||
} else {
|
||||
$response = 'The version "'.$version.'" was not recognized. Check the value submitted and try again.';
|
||||
print $response;
|
@ -4,7 +4,7 @@ define('HESK_PATH','../../../');
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
hesk_load_database_functions();
|
||||
require('../modsForHeskSql.php');
|
||||
require('../sql/installSql.php');
|
||||
|
||||
$task = $_POST['task'];
|
||||
if ($task == 'ip-email-bans') {
|
||||
|
37
install/mods-for-hesk/ajax/uninstall-database-ajax.php
Normal file
37
install/mods-for-hesk/ajax/uninstall-database-ajax.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
define('IN_SCRIPT',1);
|
||||
define('HESK_PATH','../../../');
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
hesk_load_database_functions();
|
||||
require('../sql/uninstallSql.php');
|
||||
|
||||
$task = $_POST['task'];
|
||||
if ($task == 'status-change') {
|
||||
replaceStatusColumn();
|
||||
} elseif ($task == 'autorefresh') {
|
||||
removeAutorefresh();
|
||||
} elseif ($task == 'parent-child') {
|
||||
removeParentColumn();
|
||||
} elseif ($task == 'settings-access') {
|
||||
removeHelpDeskSettingsPermission();
|
||||
} elseif ($task == 'activate-user') {
|
||||
removeActiveColumn();
|
||||
} elseif ($task == 'notify-note-unassigned') {
|
||||
removeNotifyNoteUnassigned();
|
||||
} elseif ($task == 'user-manage-notification-settings') {
|
||||
removeUserManageOwnNotificationSettingsColumn();
|
||||
} elseif ($task == 'settings-table') {
|
||||
removeSettingsTable();
|
||||
} elseif ($task == 'verified-emails-table') {
|
||||
removeVerifiedEmailsTable();
|
||||
} elseif ($task == 'pending-verification-emails-table') {
|
||||
removePendingVerificationEmailsTable();
|
||||
} elseif ($task == 'pending-verification-tickets-table') {
|
||||
removeTicketsPendingVerificationTable();
|
||||
} elseif ($task == 'miscellaneous') {
|
||||
executeMiscellaneousSql();
|
||||
} else {
|
||||
http_response_code(400);
|
||||
}
|
||||
return;
|
12
install/mods-for-hesk/index.html
Normal file
12
install/mods-for-hesk/index.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.location.replace("modsForHesk.php");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -37,6 +37,18 @@ function echoInitialVersionRows($version) {
|
||||
if ($version < 201) {
|
||||
printRow('v2.0.1');
|
||||
}
|
||||
if ($version < 210) {
|
||||
printRow('v2.1.0');
|
||||
}
|
||||
if ($version < 211) {
|
||||
printRow('v2.1.1');
|
||||
}
|
||||
if ($version < 220) {
|
||||
printRow('v2.2.0');
|
||||
}
|
||||
if ($version < 221) {
|
||||
printRow('v2.2.1');
|
||||
}
|
||||
}
|
||||
|
||||
function printRow($version) {
|
||||
@ -119,8 +131,16 @@ function printRow($version) {
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Console</div>
|
||||
<div class="panel-body" style="min-height: 400px;max-height: 400px; overflow: auto;">
|
||||
<p id="console-text" style="font-family: 'Courier New',monospace;"></p>
|
||||
<div style="max-height: 400px; overflow: auto;">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Severity</th>
|
||||
<th>Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="consoleBody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -17,11 +17,12 @@ function startVersionUpgrade(version) {
|
||||
changeTextTo('span', version, 'In Progress');
|
||||
}
|
||||
|
||||
function markUpdateAsSuccess(version) {
|
||||
function markUpdateAsSuccess(version, formattedVersion) {
|
||||
removeSpinner(version);
|
||||
$('#spinner-'+version).addClass('fa-check-circle');
|
||||
changeTextTo('span', version, 'Completed Successfully');
|
||||
changeRowTo('row', version, 'success');
|
||||
appendToInstallConsole('<tr><td><span class="label label-success">SUCCESS</span></td><td>Updates for ' + formattedVersion + ' complete</td></tr>');
|
||||
}
|
||||
|
||||
function removeSpinner(version) {
|
||||
@ -61,11 +62,11 @@ function changeRowTo(prefix, version, clazz) {
|
||||
}
|
||||
|
||||
function appendToInstallConsole(text) {
|
||||
var currentText = $('#console-text').text();
|
||||
$('#console-text').append(text).append('<br>');
|
||||
$('#consoleBody').append(text);
|
||||
}
|
||||
|
||||
function installationFinished() {
|
||||
appendToInstallConsole('<tr><td><span class="label label-success">SUCCESS</span></td><td>Installation complete</td></tr>');
|
||||
var output = '<div class="panel-body">' +
|
||||
'<div class="col-md-12 text-center">' +
|
||||
'<i class="fa fa-check-circle fa-4x" style="color: #008000"></i><br><br>' +
|
||||
|
104
install/mods-for-hesk/js/uninstall-scripts.js
Normal file
104
install/mods-for-hesk/js/uninstall-scripts.js
Normal file
@ -0,0 +1,104 @@
|
||||
function getTasks() {
|
||||
return ['status-change', 'autorefresh', 'parent-child', 'settings-access', 'activate-user',
|
||||
'notify-note-unassigned', 'user-manage-notification-settings', 'settings-table', 'verified-emails-table',
|
||||
'pending-verification-emails-table', 'pending-verification-tickets-table', 'miscellaneous'];
|
||||
}
|
||||
|
||||
function processUninstallation() {
|
||||
var tasks = getTasks();
|
||||
//-- Change status column to default HESK values
|
||||
tasks.forEach(function(task) {
|
||||
startUninstallation(task);
|
||||
executeUninstallation(task);
|
||||
});
|
||||
}
|
||||
function startUninstallation(task) {
|
||||
$('#spinner-'+task)
|
||||
.removeClass('fa-exclamation-triangle')
|
||||
.addClass('fa-spinner')
|
||||
.addClass('fa-pulse');
|
||||
changeRowTo('row', task, 'info');
|
||||
changeTextTo('span', task, 'In Progress');
|
||||
}
|
||||
|
||||
function changeTextTo(prefix, task, text) {
|
||||
$('#'+prefix+'-'+task).text(text);
|
||||
}
|
||||
|
||||
function changeRowTo(prefix, task, clazz) {
|
||||
//-- Remove all classes
|
||||
$('#'+prefix+'-'+task)
|
||||
.removeClass('info')
|
||||
.removeClass('warning')
|
||||
.removeClass('danger')
|
||||
.removeClass('success');
|
||||
|
||||
//-- Re-add the requested class
|
||||
$('#'+prefix+'-'+task).addClass(clazz);
|
||||
}
|
||||
|
||||
function executeUninstallation(task) {
|
||||
appendToInstallConsole('<tr><td><span class="label label-info">INFO</span></td><td>Starting task code: ' + task + '</td></tr>');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax/uninstall-database-ajax.php',
|
||||
data: { task: task },
|
||||
success: function(data) {
|
||||
markUninstallAsSuccess(task);
|
||||
checkForCompletion();
|
||||
},
|
||||
error: function(data) {
|
||||
if (data.status == 400) {
|
||||
appendToInstallConsole('<tr><td><span class="label label-danger">ERROR</span></td><td>The task <code>'+ task +'</code> was not recognized. Check the value submitted and try again.</td></tr>');
|
||||
} else {
|
||||
appendToInstallConsole('<tr><td><span class="label label-danger">ERROR</span></td><td>'+ data.responseText + '</td></tr>');
|
||||
}
|
||||
markUninstallAsFailure(task);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function checkForCompletion() {
|
||||
// If all rows have a .success row, installation is finished
|
||||
var numberOfTasks = getTasks().length;
|
||||
var numberOfCompletions = $('tr.success').length;
|
||||
if (numberOfTasks == numberOfCompletions) {
|
||||
uninstallationFinished();
|
||||
}
|
||||
}
|
||||
|
||||
function uninstallationFinished() {
|
||||
appendToInstallConsole('<tr><td><span class="label label-success">SUCCESS</span></td><td>Uninstallation complete</td></tr>');
|
||||
var output = '<div class="panel-body">' +
|
||||
'<div class="col-md-12 text-center">' +
|
||||
'<i class="fa fa-check-circle fa-4x" style="color: #008000"></i><br><br>' +
|
||||
'<h4>Awesome! The automated portion of uninstalling Mods for HESK has completed. ' +
|
||||
'Please follow <a href="http://mods-for-hesk.mkochcs.com/uninstall-instructions.php" target="_blank">these instructions</a> ' +
|
||||
'on the Mods for HESK website to finish uninstallation.</h4>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
$('#uninstall-information').html(output);
|
||||
}
|
||||
|
||||
function markUninstallAsSuccess(task) {
|
||||
removeSpinner(task);
|
||||
$('#spinner-'+task).addClass('fa-check-circle');
|
||||
changeTextTo('span', task, 'Completed Successfully');
|
||||
changeRowTo('row', task, 'success');
|
||||
appendToInstallConsole('<tr><td><span class="label label-success">SUCCESS</span></td><td>Uninstall for task code: <code>' + task + '</code> complete</td></tr>');
|
||||
}
|
||||
|
||||
function markUninstallAsFailure(task) {
|
||||
removeSpinner(task);
|
||||
$('#spinner-'+task).addClass('fa-times-circle');
|
||||
changeRowTo('row', task, 'danger');
|
||||
changeTextTo('span', task, 'Uninstall failed! Check the console for more information');
|
||||
}
|
||||
|
||||
function removeSpinner(task) {
|
||||
$('#spinner-'+task)
|
||||
.removeClass('fa-pulse')
|
||||
.removeClass('fa-spinner');
|
||||
}
|
||||
|
||||
jQuery(document).ready(loadJquery);
|
@ -1,52 +1,65 @@
|
||||
function processUpdates(startingVersion) {
|
||||
if (startingVersion < 1) {
|
||||
startVersionUpgrade('p140');
|
||||
executeUpdate(1, 'p140');
|
||||
executeUpdate(1, 'p140', 'Pre 1.4.0');
|
||||
} else if (startingVersion < 140) {
|
||||
startVersionUpgrade('140');
|
||||
executeUpdate(140, '140');
|
||||
executeUpdate(140, '140', '1.4.0');
|
||||
} else if (startingVersion < 141) {
|
||||
startVersionUpgrade('141');
|
||||
executeUpdate(141, '141');
|
||||
executeUpdate(141, '141', '1.4.1');
|
||||
} else if (startingVersion < 150) {
|
||||
startVersionUpgrade('150');
|
||||
executeUpdate(150, '150');
|
||||
executeUpdate(150, '150', '1.5.0');
|
||||
} else if (startingVersion < 160) {
|
||||
startVersionUpgrade('160');
|
||||
executeUpdate(160, '160');
|
||||
executeUpdate(160, '160', '1.6.0');
|
||||
} else if (startingVersion < 161) {
|
||||
startVersionUpgrade('161');
|
||||
executeUpdate(161, '161');
|
||||
executeUpdate(161, '161', '1.6.1');
|
||||
} else if (startingVersion < 170) {
|
||||
startVersionUpgrade('170');
|
||||
executeUpdate(170, '170');
|
||||
executeUpdate(170, '170', '1.7.0');
|
||||
} else if (startingVersion < 200) {
|
||||
startVersionUpgrade('200');
|
||||
executeUpdate(200, '200');
|
||||
executeUpdate(200, '200', '2.0.0');
|
||||
} else if (startingVersion < 201) {
|
||||
startVersionUpgrade('201');
|
||||
executeUpdate(201, '201');
|
||||
executeUpdate(201, '201', '2.0.1');
|
||||
} else if (startingVersion < 210) {
|
||||
startVersionUpgrade('210');
|
||||
executeUpdate(210, '210', '2.1.0');
|
||||
} else if (startingVersion < 211) {
|
||||
startVersionUpgrade('211');
|
||||
executeUpdate(211, '211', '2.1.1');
|
||||
} else if (startingVersion < 220) {
|
||||
startVersionUpgrade('220');
|
||||
executeUpdate(220, '220', '2.2.0');
|
||||
} else if (startingVersion < 221) {
|
||||
startVersionUpgrade('221');
|
||||
executeUpdate(221, '221', '2.2.1');
|
||||
} else {
|
||||
installationFinished();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function executeUpdate(version, cssclass) {
|
||||
function executeUpdate(version, cssclass, formattedVersion) {
|
||||
appendToInstallConsole('<tr><td><span class="label label-info">INFO</span></td><td>Starting updates for ' + formattedVersion + '</td></tr>');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax/database-ajax.php',
|
||||
url: 'ajax/install-database-ajax.php',
|
||||
data: { version: version },
|
||||
success: function(data) {
|
||||
|
||||
markUpdateAsSuccess(cssclass);
|
||||
markUpdateAsSuccess(cssclass, formattedVersion);
|
||||
if (version == 200) {
|
||||
migrateIpEmailBans('banmigrate', cssclass);
|
||||
} else {
|
||||
processUpdates(version);
|
||||
}
|
||||
processUpdates(version);
|
||||
},
|
||||
error: function(data) {
|
||||
appendToInstallConsole('ERROR: ' + data.responseText);
|
||||
appendToInstallConsole('<tr><td><span class="label label-danger">ERROR</span></td><td>'+ data.responseText + '</td></tr>');
|
||||
markUpdateAsFailure(cssclass);
|
||||
}
|
||||
});
|
||||
@ -54,6 +67,7 @@ function executeUpdate(version, cssclass) {
|
||||
|
||||
function migrateIpEmailBans(version, cssclass) {
|
||||
startVersionUpgrade(version);
|
||||
appendToInstallConsole('<tr><td><span class="label label-info">INFO</span></td><td>Checking for IP / Email address bans to migrate</td></tr>');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax/task-ajax.php',
|
||||
@ -62,6 +76,7 @@ function migrateIpEmailBans(version, cssclass) {
|
||||
var parsedData = $.parseJSON(data);
|
||||
console.info(parsedData);
|
||||
if (parsedData.status == 'ATTENTION') {
|
||||
appendToInstallConsole('<tr><td><span class="label label-warning">WARNING</span></td><td>Your response is needed. Please check above.</td></tr>');
|
||||
markUpdateAsAttention(version);
|
||||
prepareAttentionPanel(getContentForMigratePrompt(parsedData.users));
|
||||
} else {
|
||||
@ -69,7 +84,7 @@ function migrateIpEmailBans(version, cssclass) {
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
appendToInstallConsole('ERROR: ' + data.responseText);
|
||||
appendToInstallConsole('<tr><td><span class="label label-danger">ERROR</span></td><td>' + data.responseText + '</td></tr>');
|
||||
markUpdateAsFailure(cssclass);
|
||||
}
|
||||
});
|
||||
@ -98,7 +113,7 @@ function runMigration() {
|
||||
|
||||
function migrateComplete() {
|
||||
$('#attention-row').hide();
|
||||
markUpdateAsSuccess('banmigrate');
|
||||
markUpdateAsSuccess('banmigrate', 'IP and Email address bans');
|
||||
processUpdates(200);
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ hesk_dbConnect();
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Mods For HESK 2.0.1 Install / Upgrade</title>
|
||||
<title>Mods For HESK <?php echo MODS_FOR_HESK_NEW_VERSION; ?> Install / Upgrade</title>
|
||||
<link href="../../hesk_style.css?<?php echo HESK_NEW_VERSION; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
@ -22,10 +22,10 @@ hesk_dbConnect();
|
||||
<script language="JavaScript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap-datepicker.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="headersm">Mods for HESK 2.0.1 Install / Upgrade</div>
|
||||
<div class="headersm">Mods for HESK <?php echo MODS_FOR_HESK_NEW_VERSION; ?> Install / Upgrade</div>
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<h1>Mods for HESK 2.0.1 Install / Upgrade</h1>
|
||||
<h1>Mods for HESK <?php echo MODS_FOR_HESK_NEW_VERSION; ?> Install / Upgrade</h1>
|
||||
</div>
|
||||
<?php
|
||||
$allowInstallation = true;
|
||||
@ -136,6 +136,53 @@ hesk_dbConnect();
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.2.0') {
|
||||
$v220btn = 'btn-success';
|
||||
$disableAllExcept = '220';
|
||||
} else {
|
||||
$v220btn = 'btn-default';
|
||||
}
|
||||
?>
|
||||
<a id="220" class="btn <?php echo $v220btn; ?> btn-block disablable" href="installModsForHesk.php?v=220">v2.2.0</a>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.1.1') {
|
||||
$v211btn = 'btn-success';
|
||||
$disableAllExcept = '211';
|
||||
} else {
|
||||
$v211btn = 'btn-default';
|
||||
}
|
||||
?>
|
||||
<a id="211" class="btn <?php echo $v211btn; ?> btn-block disablable" href="installModsForHesk.php?v=211">v2.1.1</a>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.1.0') {
|
||||
$v210btn = 'btn-success';
|
||||
$disableAllExcept = '210';
|
||||
} else {
|
||||
$v210btn = 'btn-default';
|
||||
}
|
||||
?>
|
||||
<a id="210" class="btn <?php echo $v210btn; ?> btn-block disablable" href="installModsForHesk.php?v=210">v2.1.0</a>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
if ($version == '2.0.1') {
|
||||
$v201btn = 'btn-success';
|
||||
$disableAllExcept = '201';
|
||||
} else {
|
||||
$v201btn = 'btn-default';
|
||||
}
|
||||
?>
|
||||
<a id="201" class="btn <?php echo $v201btn; ?> btn-block disablable" href="installModsForHesk.php?v=201">v2.0.1</a>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<?php
|
||||
@ -203,8 +250,14 @@ hesk_dbConnect();
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<a id="124" class="btn btn-default btn-block disablable" href="installModsForHesk.php?v=124">v1.2.4</a>
|
||||
</div>
|
||||
<div class="col-md-9 col-sm-12">
|
||||
<a class="btn btn-default btn-block disablable" href="installModsForHesk.php?v=0">No previous installation</a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="btn-group-vertical" role="group" style="width: 100%">
|
||||
<a class="btn btn-primary btn-block disablable" href="installModsForHesk.php?v=0">No previous installation</a>
|
||||
<button type="button" class="btn btn-danger btn-block" data-toggle="modal" data-target="#uninstallModal"><i class="fa fa-trash"></i> Uninstall Mods for HESK</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
@ -219,6 +272,23 @@ hesk_dbConnect();
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="uninstallModal" tabindex="-1" role="dialog" aria-labelledby="uninstallModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="uninstallModalTitle"><i class="fa fa-trash"></i> Uninstall Mods for HESK</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure you want to uninstall Mods for HESK?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-success" href="uninstallModsForHesk.php"><i class="fa fa-check"></i> Yes</a>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i> No</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ($disableAllExcept !== NULL) {
|
||||
echo '<script>disableAllDisablable(\''.$disableAllExcept.'\')</script>';
|
||||
|
@ -216,7 +216,7 @@ function execute170FileUpdate() {
|
||||
$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)
|
||||
if (strpos($file, 'custom_field_setting') === false)
|
||||
{
|
||||
$file .= '
|
||||
|
||||
@ -255,7 +255,7 @@ function execute200FileUpdate() {
|
||||
$file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
|
||||
//-- Only add the additional settings if they aren't already there.
|
||||
if (strpos($file, 'html_emails') !== true)
|
||||
if (strpos($file, 'html_emails') === false)
|
||||
{
|
||||
$file .= '
|
||||
|
||||
@ -321,11 +321,119 @@ function migrateBans($creator) {
|
||||
}
|
||||
// END Version 2.0.0
|
||||
|
||||
// BEGIN Version 2.0.1
|
||||
// Version 2.0.1
|
||||
function execute201Scripts() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.0.1' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
// END Version 2.0.1
|
||||
|
||||
// BEGIN Version 2.1.0
|
||||
function execute210Scripts() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.1.0' WHERE `Key` = 'modsForHeskVersion'");
|
||||
|
||||
// Some old tables may not have been dropped during the 2.0.0 upgrade. Check and drop if necessary
|
||||
executeQuery("DROP TABLE IF EXISTS `".hesk_dbEscape($hesk_settings['db_pfix'])."denied_ips`");
|
||||
executeQuery("DROP TABLE IF EXISTS `".hesk_dbEscape($hesk_settings['db_pfix'])."denied_emails`");
|
||||
}
|
||||
|
||||
function execute210FileUpdate() {
|
||||
//-- Add the boostrap theme 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, 'use_bootstrap_theme') === false)
|
||||
{
|
||||
$file .= '
|
||||
|
||||
//-- Set this to 1 to enable bootstrap-theme.css
|
||||
$modsForHesk_settings[\'use_bootstrap_theme\'] = 1;';
|
||||
}
|
||||
|
||||
return file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file);
|
||||
}
|
||||
// END Version 2.1.0
|
||||
|
||||
// BEGIN Version 2.1.1
|
||||
function execute211Scripts() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("ALTER IGNORE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets` CHANGE `dt` `dt` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets`
|
||||
CHANGE `email` `email` VARCHAR( 1000 ) NOT NULL DEFAULT '',
|
||||
CHANGE `ip` `ip` VARCHAR(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
||||
ADD `firstreply` TIMESTAMP NULL DEFAULT NULL AFTER `lastchange`,
|
||||
ADD `closedat` TIMESTAMP NULL DEFAULT NULL AFTER `firstreply`,
|
||||
ADD `articles` VARCHAR(255) NULL DEFAULT NULL AFTER `closedat`,
|
||||
ADD `openedby` MEDIUMINT(8) DEFAULT '0' AFTER `status`,
|
||||
ADD `firstreplyby` SMALLINT(5) UNSIGNED NULL DEFAULT NULL AFTER `openedby`,
|
||||
ADD `closedby` MEDIUMINT(8) NULL DEFAULT NULL AFTER `firstreplyby`,
|
||||
ADD `replies` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `closedby`,
|
||||
ADD `staffreplies` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `replies`,
|
||||
ADD INDEX ( `openedby` , `firstreplyby` , `closedby` ),
|
||||
ADD INDEX(`dt`)");
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.1.1' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
|
||||
function execute211FileUpdate() {
|
||||
//-- Add the new kb article visibility 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, 'new_kb_article_visibility') === false)
|
||||
{
|
||||
$file .= '
|
||||
|
||||
//-- Default value for new Knowledgebase article: 0 = Published, 1 = Private, 2 = Draft
|
||||
$modsForHesk_settings[\'new_kb_article_visibility\'] = 0;';
|
||||
}
|
||||
|
||||
return file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file);
|
||||
}
|
||||
// END Version 2.1.1
|
||||
|
||||
// BEGIN Version 2.2.0
|
||||
function execute220Scripts() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` ADD COLUMN `IsAutocloseOption` INT NOT NULL DEFAULT 0");
|
||||
|
||||
// There will only ever be one row
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` SET `IsAutocloseOption` = 1 WHERE `IsStaffClosedOption` = 1");
|
||||
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` ADD COLUMN `Closable` VARCHAR(10) NOT NULL");
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` SET `Closable` = 'yes'");
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.2.0' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
|
||||
function execute220FileUpdate() {
|
||||
//-- Add the new attachment 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, '$modsForHesk_settings[\'attachments\']') === false)
|
||||
{
|
||||
$file .= '
|
||||
|
||||
//-- Setting for adding attachments to email messages. Either 0 for default-HESK behavior, or 1 to send as attachments
|
||||
$modsForHesk_settings[\'attachments\'] = 0;';
|
||||
}
|
||||
|
||||
return file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file);
|
||||
}
|
||||
// END Version 2.2.0
|
||||
|
||||
// BEGIN Version 2.2.1
|
||||
function execute221Scripts() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.2.1' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
// END Version 2.2.1
|
139
install/mods-for-hesk/sql/uninstallSql.php
Normal file
139
install/mods-for-hesk/sql/uninstallSql.php
Normal file
@ -0,0 +1,139 @@
|
||||
<?php
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
|
||||
function executeQuery($sql) {
|
||||
global $hesk_last_query;
|
||||
global $hesk_db_link;
|
||||
if ( function_exists('mysqli_connect') ) {
|
||||
|
||||
if ( ! $hesk_db_link && ! hesk_dbConnect())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$hesk_last_query = $sql;
|
||||
|
||||
if ($res = @mysqli_query($hesk_db_link, $sql))
|
||||
{
|
||||
return $res;
|
||||
} else
|
||||
{
|
||||
print "Could not execute query: $sql. MySQL said: ".mysqli_error($hesk_db_link);
|
||||
http_response_code(500);
|
||||
die();
|
||||
}
|
||||
} else {
|
||||
if ( ! $hesk_db_link && ! hesk_dbConnect())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$hesk_last_query = $sql;
|
||||
|
||||
if ($res = @mysql_query($sql, $hesk_db_link))
|
||||
{
|
||||
return $res;
|
||||
} else
|
||||
{
|
||||
print "Could not execute query: $sql. MySQL said: ".mysql_error();
|
||||
http_response_code(500);
|
||||
die();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function replaceStatusColumn() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` ADD COLUMN `status_int` ENUM('0','1','2','3','4','5') NOT NULL AFTER `status`;");
|
||||
$ticketsRS = executeQuery("SELECT `id`, `status` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets`;");
|
||||
while ($currentResult = $ticketsRS->fetch_assoc())
|
||||
{
|
||||
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `status_int` = '".intval($currentResult['status'])."' WHERE `id` = ".$currentResult['id']);
|
||||
}
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` DROP COLUMN `status`");
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` CHANGE COLUMN `status_int` `status` ENUM('0','1','2','3','4','5') NOT NULL");
|
||||
executeQuery("DROP TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses`");
|
||||
}
|
||||
|
||||
function removeAutorefresh() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` DROP COLUMN `autorefresh`");
|
||||
}
|
||||
|
||||
function removeParentColumn() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` DROP COLUMN `parent`");
|
||||
}
|
||||
|
||||
function removeHelpDeskSettingsPermission() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` DROP COLUMN `can_manage_settings`");
|
||||
}
|
||||
|
||||
function removeActiveColumn() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` DROP COLUMN `active`");
|
||||
}
|
||||
|
||||
function removeNotifyNoteUnassigned() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` DROP COLUMN `notify_note_unassigned`");
|
||||
}
|
||||
|
||||
function removeUserManageOwnNotificationSettingsColumn() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` DROP COLUMN `can_change_notification_settings`");
|
||||
}
|
||||
|
||||
function removeSettingsTable() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("DROP TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings`");
|
||||
}
|
||||
|
||||
function removeVerifiedEmailsTable() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("DROP TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."verified_emails`");
|
||||
}
|
||||
|
||||
function removePendingVerificationEmailsTable() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("DROP TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails`");
|
||||
}
|
||||
|
||||
function removeTicketsPendingVerificationTable() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("DROP TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets`");
|
||||
}
|
||||
|
||||
function executeMiscellaneousSql() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
// These queries are ran in case someone used an unfortunate installation they may have not properly cleaned up tables
|
||||
executeQuery('DROP TABLE IF EXISTS `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_ips`');
|
||||
executeQuery('DROP TABLE IF EXISTS `'.hesk_dbEscape($hesk_settings['db_pfix']).'denied_emails`');
|
||||
}
|
87
install/mods-for-hesk/uninstallModsForHesk.php
Normal file
87
install/mods-for-hesk/uninstallModsForHesk.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
define('IN_SCRIPT',1);
|
||||
define('HESK_PATH','../../');
|
||||
require(HESK_PATH . 'install/install_functions.inc.php');
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
|
||||
function echoTaskRows() {
|
||||
printUninstallRow('Change status column to default HESK values', 'status-change');
|
||||
printUninstallRow('Remove autorefresh feature', 'autorefresh');
|
||||
printUninstallRow('Remove parent-child ticket relationships', 'parent-child');
|
||||
printUninstallRow('Remove explicit help desk settings permission', 'settings-access');
|
||||
printUninstallRow('Remove activate/deactivate users settings', 'activate-user');
|
||||
printUninstallRow('Remove Mods for HESK-added notification settings', 'notify-note-unassigned');
|
||||
printUninstallRow('Remove "user can manage notification settings" feature', 'user-manage-notification-settings');
|
||||
printUninstallRow('Remove settings table', 'settings-table');
|
||||
printUninstallRow('Remove verified emails table', 'verified-emails-table');
|
||||
printUninstallRow('Remove pending verification emails table', 'pending-verification-emails-table');
|
||||
printUninstallRow('Remove tickets pending verification table', 'pending-verification-tickets-table');
|
||||
printUninstallRow('Miscellaneous database cleanup changes', 'miscellaneous');
|
||||
}
|
||||
|
||||
function printUninstallRow($text, $id) {
|
||||
echo '<tr id="row-'.$id.'">';
|
||||
echo '<td>'.$text.'</td>';
|
||||
echo '<td><i id="spinner-'.$id.'" class="fa fa-spinner"></i> <span id="span-'.$id.'">Waiting...</span></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Uninstalling Mods for HESK</title>
|
||||
<link href="../../hesk_style.css?<?php echo HESK_NEW_VERSION; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css?v=<?php echo $hesk_settings['hesk_version']; ?>" type="text/css" rel="stylesheet" />
|
||||
<link href="//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="../../css/hesk_newStyle.php" type="text/css" rel="stylesheet" />
|
||||
<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; ?>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; ?>install/mods-for-hesk/js/ui-scripts.js"></script>
|
||||
<script language="JavaScript" type="text/javascript" src="<?php echo HESK_PATH; ?>install/mods-for-hesk/js/uninstall-scripts.js"></script>
|
||||
<script language="JavaScript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap-datepicker.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="headersm">Uninstalling Mods for HESK</div>
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<h1>Uninstalling Mods for HESK</h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Uninstallation Progress</div>
|
||||
<div id="uninstall-information">
|
||||
<table class="table table-striped" style="table-layout:fixed;">
|
||||
<thead>
|
||||
<?php echoTaskRows(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Console</div>
|
||||
<div style="max-height: 400px; overflow: auto;">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Severity</th>
|
||||
<th>Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="consoleBody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
processUninstallation();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -139,7 +139,7 @@ else
|
||||
{
|
||||
hesk_show_kb_category($catid);
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
exit();
|
||||
|
||||
@ -276,8 +276,15 @@ function hesk_show_kb_article($artid)
|
||||
{
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` SET `views`=`views`+1 WHERE `id`={$artid} LIMIT 1");
|
||||
}
|
||||
if (!isset($_GET['suggest'])) {
|
||||
$historyNumber = isset($_GET['rated']) ? '-2' : '-1';
|
||||
$goBackText = '<a href="javascript:history.go('.$historyNumber.')">
|
||||
<i class="fa fa-arrow-circle-left" data-toggle="tooltip" data-placement="top" title="'.$hesklang['back'].'"></i></a>';
|
||||
} else {
|
||||
$goBackText = '';
|
||||
}
|
||||
|
||||
echo '<h3 class="text-left">'.$article['subject'].'</h3>
|
||||
echo '<h3 class="text-left">'.$goBackText.' '.$article['subject'].'</h3>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<h4 class="text-left">'.$hesklang['as'].'</h4>
|
||||
<div class="kbContent">'
|
||||
@ -409,22 +416,7 @@ function hesk_show_kb_article($artid)
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
if (!isset($_GET['suggest']))
|
||||
{
|
||||
?>
|
||||
<p><a href="javascript:history.go(<?php echo isset($_GET['rated']) ? '-2' : '-1'; ?>)"><span class="glyphicon glyphicon-circle-arrow-left"></span> <?php echo $hesklang['back']; ?></a></p>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<p> </p>
|
||||
<?php
|
||||
}
|
||||
|
||||
<?php
|
||||
} // END hesk_show_kb_article()
|
||||
|
||||
|
||||
@ -456,8 +448,7 @@ 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 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>
|
||||
echo '<h3 class="text-left"><a href="javascript:history.go(-1)"><i class="fa fa-arrow-circle-left" data-toggle="tooltip" data-placement="top" title="'.$hesklang['back'].'"></i></a> '.$hesklang['kb_cat'].': '.$thiscat['name'].' </h3>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<div class="blankSpace"></div>
|
||||
';
|
||||
@ -468,153 +459,137 @@ function hesk_show_kb_category($catid, $is_search = 0) {
|
||||
{
|
||||
?>
|
||||
|
||||
<h4 class="text-left"><?php echo $hesklang['kb_cat_sub']; ?></h4>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="text-left"><?php echo $hesklang['kb_cat_sub']; ?></h4>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
|
||||
<table border="0" cellspacing="1" cellpadding="3" width="100%">
|
||||
<?php
|
||||
$per_col = $hesk_settings['kb_cols'];
|
||||
$i = 1;
|
||||
|
||||
<?php
|
||||
$per_col = $hesk_settings['kb_cols'];
|
||||
$i = 1;
|
||||
while ($cat = hesk_dbFetchAssoc($result))
|
||||
{
|
||||
|
||||
while ($cat = hesk_dbFetchAssoc($result))
|
||||
{
|
||||
if ($i == 1)
|
||||
{
|
||||
echo '<tr>';
|
||||
}
|
||||
|
||||
if ($i == 1)
|
||||
{
|
||||
echo '<tr>';
|
||||
}
|
||||
echo '
|
||||
<td width="50%" valign="top">
|
||||
<table border="0">
|
||||
<tr><td><i class="fa fa-folder"></i> <a href="knowledgebase.php?category='.$cat['id'].'">'.$cat['name'].'</a></td></tr>
|
||||
';
|
||||
|
||||
echo '
|
||||
<td width="50%" valign="top">
|
||||
<table border="0">
|
||||
<tr><td><span class="glyphicon glyphicon-folder-close"></span> <a href="knowledgebase.php?category='.$cat['id'].'">'.$cat['name'].'</a></td></tr>
|
||||
';
|
||||
|
||||
/* Print most popular/sticky articles */
|
||||
if ($hesk_settings['kb_numshow'] && $cat['articles'])
|
||||
{
|
||||
$res = hesk_dbQuery("SELECT `id`,`subject` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$cat['id']}' AND `type`='0' ORDER BY `sticky` DESC, `views` DESC, `art_order` ASC LIMIT " . (intval($hesk_settings['kb_numshow']) + 1) );
|
||||
$num = 1;
|
||||
while ($art = hesk_dbFetchAssoc($res))
|
||||
{
|
||||
echo '
|
||||
/* Print most popular/sticky articles */
|
||||
if ($hesk_settings['kb_numshow'] && $cat['articles'])
|
||||
{
|
||||
$res = hesk_dbQuery("SELECT `id`,`subject` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$cat['id']}' AND `type`='0' ORDER BY `sticky` DESC, `views` DESC, `art_order` ASC LIMIT " . (intval($hesk_settings['kb_numshow']) + 1) );
|
||||
$num = 1;
|
||||
while ($art = hesk_dbFetchAssoc($res))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td> <span class="glyphicon glyphicon-file"></span>
|
||||
<a href="knowledgebase.php?article='.$art['id'].'" class="article">'.$art['subject'].'</a></td>
|
||||
</tr>';
|
||||
|
||||
if ($num == $hesk_settings['kb_numshow'])
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$num++;
|
||||
}
|
||||
}
|
||||
if (hesk_dbNumRows($res) > $hesk_settings['kb_numshow'])
|
||||
{
|
||||
echo '<tr><td>» <a href="knowledgebase.php?category='.$cat['id'].'"><i>'.$hesklang['m'].'</i></a></td></tr>';
|
||||
}
|
||||
}
|
||||
if ($num == $hesk_settings['kb_numshow'])
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$num++;
|
||||
}
|
||||
}
|
||||
if (hesk_dbNumRows($res) > $hesk_settings['kb_numshow'])
|
||||
{
|
||||
echo '<tr><td>» <a href="knowledgebase.php?category='.$cat['id'].'"><i>'.$hesklang['m'].'</i></a></td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '
|
||||
echo '
|
||||
</table>
|
||||
</td>
|
||||
';
|
||||
|
||||
if ($i == $per_col)
|
||||
{
|
||||
echo '</tr>';
|
||||
$i = 0;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
/* Finish the table if needed */
|
||||
if ($i != 1)
|
||||
{
|
||||
for ($j=1;$j<=$per_col;$j++)
|
||||
{
|
||||
echo '<td width="50%"> </td>';
|
||||
if ($i == $per_col)
|
||||
{
|
||||
echo '</tr>';
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if ($i == $per_col)
|
||||
{
|
||||
echo '</tr>';
|
||||
$i = 0;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
/* Finish the table if needed */
|
||||
if ($i != 1)
|
||||
{
|
||||
for ($j=1;$j<=$per_col;$j++)
|
||||
{
|
||||
echo '<td width="50%"> </td>';
|
||||
if ($i == $per_col)
|
||||
{
|
||||
echo '</tr>';
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td class="roundcornersright"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} // END if NumRows > 0
|
||||
?>
|
||||
|
||||
<h4 class="text-left"><?php echo $hesklang['ac']; ?></h4>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="text-left"><?php echo $hesklang['ac_no_colon']; ?></h4>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<?php
|
||||
$res = hesk_dbQuery("SELECT `id`, `subject`, LEFT(`content`, ".max(200, $hesk_settings['kb_substrart'] * 2).") AS `content`, `rating` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$catid}' AND `type`='0' ORDER BY `sticky` DESC, `art_order` ASC");
|
||||
if (hesk_dbNumRows($res) == 0)
|
||||
{
|
||||
echo '<tr><td><i>'.$hesklang['noac'].'</i></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
while ($article = hesk_dbFetchAssoc($res))
|
||||
{
|
||||
$txt = hesk_kbArticleContentPreview($article['content']);
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
if ($hesk_settings['kb_rating'])
|
||||
{
|
||||
$alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated'];
|
||||
$rat = '<td><img src="img/star_'.(hesk_round_to_half($article['rating'])*10).'.png" width="85" height="16" alt="'.$alt.'" title="'.$alt.'" border="0" style="vertical-align:text-bottom" /></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$rat = '';
|
||||
}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<?php
|
||||
$res = hesk_dbQuery("SELECT `id`, `subject`, LEFT(`content`, ".max(200, $hesk_settings['kb_substrart'] * 2).") AS `content`, `rating` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$catid}' AND `type`='0' ORDER BY `sticky` DESC, `art_order` ASC");
|
||||
if (hesk_dbNumRows($res) == 0)
|
||||
{
|
||||
echo '<p><i>'.$hesklang['noac'].'</i></p>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<div align="center"><table border="0" cellspacing="1" cellpadding="3" width="100%">';
|
||||
while ($article = hesk_dbFetchAssoc($res))
|
||||
{
|
||||
$txt = hesk_kbArticleContentPreview($article['content']);
|
||||
|
||||
if ($hesk_settings['kb_rating'])
|
||||
{
|
||||
$alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated'];
|
||||
$rat = '<td width="1" valign="top"><img src="img/star_'.(hesk_round_to_half($article['rating'])*10).'.png" width="85" height="16" alt="'.$alt.'" title="'.$alt.'" border="0" style="vertical-align:text-bottom" /></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$rat = '';
|
||||
}
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" width="100%" cellspacing="0" cellpadding="1">
|
||||
<tr>
|
||||
<td width="1" valign="top"><span class="glyphicon glyphicon-file"></span></td>
|
||||
<td valign="top"><a href="knowledgebase.php?article='.$article['id'].'">'.$article['subject'].'</a></td>
|
||||
'.$rat.'
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" width="100%" cellspacing="0" cellpadding="1">
|
||||
<tr>
|
||||
<td width="1" valign="top"><img src="img/blank.gif" width="16" height="10" style="vertical-align:middle" alt="" /></td>
|
||||
<td><span class="article_list">'.$txt.'</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</table></div>';
|
||||
}
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
echo '
|
||||
<tr>
|
||||
<td>
|
||||
<i class="fa fa-file"></i>
|
||||
<a href="knowledgebase.php?article='.$article['id'].'">'.$article['subject'].'</a>
|
||||
<br>
|
||||
<span class="indent-15">'.$txt.'</span>
|
||||
</td>
|
||||
'.$rat.'
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
/* On the main KB page print out top and latest articles if needed */
|
||||
@ -626,6 +601,5 @@ function hesk_show_kb_category($catid, $is_search = 0) {
|
||||
/* Get list of latest articles */
|
||||
hesk_kbLatestArticles($hesk_settings['kb_latest'], 0);
|
||||
}
|
||||
|
||||
} // END hesk_show_kb_category()
|
||||
?>
|
||||
|
@ -1,10 +1,7 @@
|
||||
<p>Hello,</p>
|
||||
<p>A new support ticket has been moved to your category. Ticket details:</p>
|
||||
<p>Ticket subject: %%SUBJECT%%<br>
|
||||
Tracking ID: %%TRACK_ID%%</p>
|
||||
<p>You can manage this ticket here:
|
||||
%%TRACK_URL%%</p>
|
||||
<br>
|
||||
<p>Ticket subject: %%SUBJECT%%<br /> Tracking ID: %%TRACK_ID%%</p>
|
||||
<p>You can manage this ticket here: %%TRACK_URL%%</p>
|
||||
<p> </p>
|
||||
<p>Regards,</p>
|
||||
%%SITE_TITLE%% <br>
|
||||
%%SITE_URL%%
|
||||
<p>%%SITE_TITLE%% <br /> %%SITE_URL%%</p>
|
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Language file for Help Desk Software HESK (www.hesk.com)
|
||||
* Language: ENGLISH
|
||||
* Version: 2.6.0
|
||||
* Version: 2.6.1
|
||||
* Author: Klemen Stirn (http://www.hesk.com)
|
||||
*
|
||||
* !!! This file must be saved in UTF-8 encoding without byte order mark (BOM) !!!
|
||||
@ -21,8 +21,72 @@ $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 Mods for HESK 2.2.1
|
||||
$hesklang['popart_no_colon']='Top Knowledgebase Articles'; // same as $hesklang['popart'] but without a colon (:)
|
||||
$hesklang['latart_no_colon']='Latest Knowledgebase Articles'; // same as $hesklang['latart'] but without a colon (:)
|
||||
$hesklang['ac_no_colon']='Articles in this Category'; // same as $hesklang['ac'] but without a colon (:)
|
||||
|
||||
// ADDED OR MODIFIED IN Mods for HESK 2.2.0
|
||||
$hesklang['email_templates'] = 'Email templates';
|
||||
$hesklang['email_templates_intro'] = 'You can edit your plaintext and HTML email templates here.';
|
||||
$hesklang['edit_plain_text_template'] = 'Edit plain text template';
|
||||
$hesklang['edit_html_template'] = 'Edit HTML template';
|
||||
$hesklang['editing_plain_text_template'] = 'Editing plain text template <code>%s</code>'; // %s: The name of the template file, then language name
|
||||
$hesklang['editing_html_template'] = 'Editing HTML template <code>%s</code>'; // %s: The name of the template file, then language name
|
||||
$hesklang['show_special_tags'] = 'Show Special Tags';
|
||||
$hesklang['hide_special_tags'] = 'Hide Special Tags';
|
||||
$hesklang['special_tag'] = 'Special Tag';
|
||||
$hesklang['description'] = 'Description';
|
||||
$hesklang['customer_name'] = 'Customer name';
|
||||
$hesklang['customer_email'] = 'Customer email';
|
||||
$hesklang['ticket_subject'] = 'Ticket subject';
|
||||
$hesklang['ticket_message'] = 'Ticket/Reply message';
|
||||
$hesklang['ticket_created'] = 'Date and time of ticket submission';
|
||||
$hesklang['ticket_updated'] = 'Date and time of ticket last update';
|
||||
$hesklang['ticket_url'] = 'Ticket URL address';
|
||||
$hesklang['ticket_category'] = 'Ticket category';
|
||||
$hesklang['ticket_owner'] = 'Staff member assigned to the ticket';
|
||||
$hesklang['ticket_priority'] = 'Ticket priority';
|
||||
$hesklang['custom_field_x'] = 'Custom field %s'; // %s: Custom field #1-20
|
||||
$hesklang['email_template_saved'] = 'The email template <b>%s</b> has been saved.'; // %s: Template file name
|
||||
$hesklang['error_saving_template'] = 'An error occurred when trying to save the email template!';
|
||||
$hesklang['can_man_email_tpl'] = 'Edit email templates';
|
||||
$hesklang['email_template_directory_not_writable'] = 'The email template <b>%s</b> is not writable by HESK. Please CHMOD it to 0666.'; // %s: template file name
|
||||
$hesklang['closable_question'] = 'Closable?';
|
||||
$hesklang['closable_description'] = '<b><i>This setting is ignored if the "Closed?" checkbox is checked for this status</i></b>.
|
||||
<br><br>Determines if the customer staff is able to close a ticket in this status.
|
||||
<br><br><b>Yes:</b> Both customers and staff can close a ticket in this status.
|
||||
<br><b>Customers only:</b> Customers can close a ticket in this status, but staff cannot.
|
||||
<br><b>Staff only:</b> Staff can close a ticket in this status, but customers cannot.
|
||||
<br><b>No:</b> No one is allowed to close a ticket in this status.'; // " = "
|
||||
$hesklang['customers_only'] = 'Customers only';
|
||||
$hesklang['staff_only'] = 'Staff only';
|
||||
$hesklang['yes_title_case'] = 'Yes';
|
||||
$hesklang['no_title_case'] = 'No';
|
||||
$hesklang['autoclose_ticket_status'] = 'When a ticket is closed automatically, change the status to';
|
||||
$hesklang['recent_tickets'] = 'Recent tickets';
|
||||
$hesklang['current_status_colon'] = 'Current status: %s'; // %s: status name (i.e. "Resolved", "New", etc.)
|
||||
$hesklang['email_attachments'] = 'Email attachments';
|
||||
$hesklang['email_attachments_help'] = '<b>Show attachments as links:</b> Links to attachments will be appended at the end of the email.
|
||||
<br><br><b>Attach directly to email:</b> Attachments will be embedded directly into emails.';
|
||||
$hesklang['show_attachments_as_links'] = 'Show attachments as links';
|
||||
$hesklang['attach_directly_to_email'] = 'Attach directly to email';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods for HESK 2.1.1
|
||||
$hesklang['new_article_default_type'] = 'Default Type for New Articles';
|
||||
$hesklang['new_article_default_type_help'] = 'Choose the default type for new knowledgebase articles.';
|
||||
$hesklang['kb_draft3'] = 'The article is saved but not yet published. It can only be read by staff who has permission to
|
||||
manage knowledgebase articles.'; // This is exactly the same as kb_draft2 with all HTML removed
|
||||
$hesklang['file_name'] = 'File Name';
|
||||
$hesklang['action'] = 'Action';
|
||||
$hesklang['click_to_preview'] = 'Click to preview';
|
||||
$hesklang['attachment_removed'] = 'This attachment has been removed and cannot be viewed / downloaded';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods for HESK 2.1.0
|
||||
$hesklang['e_mfh_settings'] = 'You will not be able to save your settings unless this file is writable by the script (CHMOD to 666)!';
|
||||
$hesklang['mfh_up_to_date'] = 'Mods for HESK is up to date';
|
||||
$hesklang['use_bootstrap_theme'] = 'Use Boostrap Theme CSS';
|
||||
$hesklang['use_bootstrap_theme_help'] = 'Enable this to use the <code>bootstrap-theme.css</code> file. Use this for a more 3D look and feel, or disable it for a flatter look.';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods For HESK 2.0.0
|
||||
$hesklang['saved_ticket_tpl'] = 'Saved Templates';
|
||||
|
@ -32,3 +32,12 @@ $modsForHesk_settings['html_emails'] = 1;
|
||||
$modsForHesk_settings['use_mailgun'] = 0;
|
||||
$modsForHesk_settings['mailgun_api_key'] = '';
|
||||
$modsForHesk_settings['mailgun_domain'] = '';
|
||||
|
||||
//-- Set this to 1 to enable bootstrap-theme.css
|
||||
$modsForHesk_settings['use_bootstrap_theme'] = 1;
|
||||
|
||||
//-- Default value for new Knowledgebase article: 0 = Published, 1 = Private, 2 = Draft
|
||||
$modsForHesk_settings['new_kb_article_visibility'] = 0;
|
||||
|
||||
//-- Setting for adding attachments to email messages. Either 0 for default-HESK behavior, or 1 to send as attachments
|
||||
$modsForHesk_settings['attachments'] = 0;
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -187,7 +187,7 @@ if ($hesk_settings['attachments']['use'] && !empty($attachments))
|
||||
foreach ($attachments as $myatt)
|
||||
{
|
||||
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` (`ticket_id`,`saved_name`,`real_name`,`size`) VALUES ('{$trackingID}','".hesk_dbEscape($myatt['saved_name'])."','".hesk_dbEscape($myatt['real_name'])."','".intval($myatt['size'])."')");
|
||||
$myattachments .= hesk_dbInsertID() . '#' . $myatt['real_name'] .',';
|
||||
$myattachments .= hesk_dbInsertID() . '#' . $myatt['real_name'] . '#' . $myatt['saved_name'] .',';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
|
22
ticket.php
22
ticket.php
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.6.0 from 22nd February 2015
|
||||
* Version: 2.6.2 from 18th March 2015
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
@ -264,9 +264,17 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
||||
<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'].'&s=2&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['open_action'].'">'.$hesklang['open_action'].'</a>';}
|
||||
elseif ($hesk_settings['custclose']) {echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&s=3&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['close_action'].'">'.$hesklang['close_action'].'</a>';} ?></p>
|
||||
<p><?php
|
||||
$statusRS = hesk_dbQuery('SELECT `Closable` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses` WHERE `ID` = '.intval($ticket['status']));
|
||||
$status = hesk_dbFetchAssoc($statusRS);
|
||||
$isClosable = $status['Closable'] == 'yes' || $status['Closable'] == 'conly';
|
||||
$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'].'&s=2&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['open_action'].'">'.$hesklang['open_action'].'</a>';
|
||||
}
|
||||
elseif ($hesk_settings['custclose'] && $isClosable) {
|
||||
echo '<a href="change_status.php?track='.$trackingID.$hesk_settings['e_query'].'&s=3&Refresh='.$random.'&token='.hesk_token_echo(0).'" title="'.$hesklang['close_action'].'">'.$hesklang['close_action'].'</a>';
|
||||
} ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row medLowPriority">
|
||||
@ -468,7 +476,7 @@ function print_form()
|
||||
<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']; ?>">
|
||||
<input type="text" class="form-control" name="track" id="track" maxlength="20" size="35" value="<?php echo $trackingID; ?>" placeholder="<?php echo htmlspecialchars($hesklang['ticket_trackID']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@ -480,7 +488,7 @@ function print_form()
|
||||
<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']; ?>" />
|
||||
<input type="text" class="form-control" id="e" name="e" size="35" value="<?php echo $my_email; ?>" placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div align="left" class="form-group">
|
||||
@ -509,7 +517,7 @@ function print_form()
|
||||
<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" />
|
||||
<input type="text" id="email" class="form-control" name="email" size="35" value="<?php echo $my_email; ?>" placeholder="<?php echo htmlspecialchars($hesklang['email']); ?>"/><input type="hidden" name="a" value="forgot_tid" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -109,7 +109,7 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
||||
<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']; ?>">
|
||||
<input type="text" class="form-control" id="key" name="key" placeholder="<?php echo htmlspecialchars($hesklang['activation_key']); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
Loading…
x
Reference in New Issue
Block a user