Rest of b3 updates
This commit is contained in:
parent
f883aff904
commit
9295cf4e14
@ -344,13 +344,8 @@ $show_quick_help = $show['show'];
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
/* custom fields BEFORE comments */
|
/* custom fields BEFORE comments */
|
||||||
$hidden_cf_buffer = '';
|
|
||||||
foreach ($hesk_settings['custom_fields'] as $k => $v) {
|
foreach ($hesk_settings['custom_fields'] as $k => $v) {
|
||||||
if ($v['use'] && $v['place'] == 0 && hesk_is_custom_field_in_category($k, $category)) {
|
if ($v['use'] && $v['place'] == 0 && hesk_is_custom_field_in_category($k, $category)) {
|
||||||
if ($modsForHesk_settings['custom_field_setting']) {
|
|
||||||
$v['name'] = $hesklang[$v['name']];
|
|
||||||
}
|
|
||||||
|
|
||||||
$v['req'] = $v['req']==2 ? '<span class="important">*</span>' : '';
|
$v['req'] = $v['req']==2 ? '<span class="important">*</span>' : '';
|
||||||
|
|
||||||
if ($v['type'] == 'checkbox' && !isset($_GET["c_$k"])) {
|
if ($v['type'] == 'checkbox' && !isset($_GET["c_$k"])) {
|
||||||
@ -381,7 +376,10 @@ $show_quick_help = $show['show'];
|
|||||||
|
|
||||||
foreach ($v['value']['radio_options'] as $option) {
|
foreach ($v['value']['radio_options'] as $option) {
|
||||||
|
|
||||||
if (strlen($k_value) == 0 || $k_value == $option) {
|
if (strlen($k_value) == 0) {
|
||||||
|
$k_value = $option;
|
||||||
|
$checked = empty($v['value']['no_default']) ? 'checked="checked"' : '';
|
||||||
|
} elseif ($k_value == $option) {
|
||||||
$k_value = $option;
|
$k_value = $option;
|
||||||
$checked = 'checked="checked"';
|
$checked = 'checked="checked"';
|
||||||
} else {
|
} else {
|
||||||
@ -509,36 +507,9 @@ $show_quick_help = $show['show'];
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Hidden and read-only should work the same as text
|
||||||
case 'hidden':
|
case 'hidden':
|
||||||
//Clean up multiple dashes or whitespaces
|
|
||||||
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
|
||||||
$formattedId = preg_replace("/[\s_]/", "-", $formattedId);
|
|
||||||
|
|
||||||
if (strlen($k_value) != 0) {
|
|
||||||
$v['value']['hidden_default_value'] = $k_value;
|
|
||||||
}
|
|
||||||
$hidden_cf_buffer .= '<input type="hidden" name="'.$k.'" value="'.$v['value']['hidden_default_value'].'">';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'readonly':
|
case 'readonly':
|
||||||
//Clean up multiple dashes or whitespaces
|
|
||||||
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
|
||||||
$formattedId = preg_replace("/[\s_]/", "-", $formattedId);
|
|
||||||
|
|
||||||
if (strlen($k_value) != 0) {
|
|
||||||
$v['value'] = $k_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
$cls = in_array($k, $_SESSION['iserror']) ? ' class="isError" ' : '';
|
|
||||||
|
|
||||||
echo '<div class="form-group">
|
|
||||||
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . '</label>
|
|
||||||
<div class="col-sm-9"><input type="text" class="form-control" id="' . $formattedId . '" name="' . $k . '" size="40" maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '" ' . $cls . ' readonly></div>
|
|
||||||
</div>';
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Default text input */
|
|
||||||
default:
|
default:
|
||||||
//Clean up multiple dashes or whitespaces
|
//Clean up multiple dashes or whitespaces
|
||||||
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
||||||
@ -926,35 +897,7 @@ $show_quick_help = $show['show'];
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'hidden':
|
case 'hidden':
|
||||||
//Clean up multiple dashes or whitespaces
|
|
||||||
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
|
||||||
$formattedId = preg_replace("/[\s_]/", "-", $formattedId);
|
|
||||||
|
|
||||||
if (strlen($k_value) != 0) {
|
|
||||||
$v['value']['hidden_default_value'] = $k_value;
|
|
||||||
}
|
|
||||||
$hidden_cf_buffer .= '<input type="hidden" name="'.$k.'" value="'.$v['value']['hidden_default_value'].'">';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'readonly':
|
case 'readonly':
|
||||||
//Clean up multiple dashes or whitespaces
|
|
||||||
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
|
||||||
$formattedId = preg_replace("/[\s_]/", "-", $formattedId);
|
|
||||||
|
|
||||||
if (strlen($k_value) != 0) {
|
|
||||||
$v['value'] = $k_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
$cls = in_array($k, $_SESSION['iserror']) ? ' class="isError" ' : '';
|
|
||||||
|
|
||||||
echo '<div class="form-group">
|
|
||||||
<label for="' . $v['name'] . '" class="col-sm-3 control-label">' . $v['name'] . '</label>
|
|
||||||
<div class="col-sm-9"><input type="text" class="form-control" id="' . $formattedId . '" name="' . $k . '" size="40" maxlength="' . $v['maxlen'] . '" value="' . $v['value'] . '" ' . $cls . ' readonly></div>
|
|
||||||
</div>';
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Default text input */
|
|
||||||
default:
|
default:
|
||||||
//Clean up multiple dashes or whitespaces
|
//Clean up multiple dashes or whitespaces
|
||||||
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
$formattedId = preg_replace("/[\s-]+/", " ", $v['name']);
|
||||||
|
@ -244,6 +244,8 @@ function update_profile()
|
|||||||
if ($_SESSION['new']['autoreload'] < 0 || $_SESSION['new']['autoreload'] > 65535) {
|
if ($_SESSION['new']['autoreload'] < 0 || $_SESSION['new']['autoreload'] > 65535) {
|
||||||
$_SESSION['new']['autoreload'] = 30;
|
$_SESSION['new']['autoreload'] = 30;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
hesk_setcookie('autorefresh', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Auto-start ticket timer */
|
/* Auto-start ticket timer */
|
||||||
|
@ -530,7 +530,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
|
|
||||||
// Some variables we will need
|
// Some variables we will need
|
||||||
$tickets = array();
|
$tickets = array();
|
||||||
$totals = array('asstickets' => 0, 'resolved' => 0, 'tickets' => 0, 'replies' => 0, 'worked' => 0);
|
$totals = array('asstickets' => 0, 'resolved' => 0, 'tickets' => 0, 'replies' => 0, 'worked' => 0, 'openedby' => 0);
|
||||||
|
|
||||||
// Get list of users
|
// Get list of users
|
||||||
$admins = array();
|
$admins = array();
|
||||||
@ -550,6 +550,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
'tickets' => 0,
|
'tickets' => 0,
|
||||||
'replies' => 0,
|
'replies' => 0,
|
||||||
'worked' => '',
|
'worked' => '',
|
||||||
|
'openedby' => 0,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -625,10 +626,21 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
// Convert total seconds worked to HH:MM:SS
|
// Convert total seconds worked to HH:MM:SS
|
||||||
$totals['worked'] = $hesk_settings['time_worked'] ? hesk_SecondsToHHMMSS($totals['worked']) : 0;
|
$totals['worked'] = $hesk_settings['time_worked'] ? hesk_SecondsToHHMMSS($totals['worked']) : 0;
|
||||||
|
|
||||||
|
// Get total opened by tickets
|
||||||
|
$res = hesk_dbQuery("SELECT `openedby`, COUNT(*) AS `cnt` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `openedby` IN ('" . implode("','", array_keys($admins) ) . "') AND DATE(`dt`) BETWEEN '" . hesk_dbEscape($date_from) . "' AND '" . hesk_dbEscape($date_to) . "' GROUP BY `openedby`");
|
||||||
|
|
||||||
|
// -> update ticket list values
|
||||||
|
while ($row = hesk_dbFetchAssoc($res))
|
||||||
|
{
|
||||||
|
$tickets[$row['openedby']]['openedby'] += $row['cnt'];
|
||||||
|
$totals['openedby'] += $row['cnt'];
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<table class="table table-striped table-condensed">
|
<table class="table table-striped table-condensed">
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php echo $hesklang['user']; ?></th>
|
<th><?php echo $hesklang['user']; ?></th>
|
||||||
|
<th><?php echo $hesklang['numsub']; ?></th>
|
||||||
<th><?php echo $hesklang['ticass']; ?></th>
|
<th><?php echo $hesklang['ticass']; ?></th>
|
||||||
<th><?php echo $hesklang['topen']; ?></th>
|
<th><?php echo $hesklang['topen']; ?></th>
|
||||||
<th><?php echo $hesklang['closed_title']; ?></th>
|
<th><?php echo $hesklang['closed_title']; ?></th>
|
||||||
@ -647,6 +659,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b><?php echo $hesklang['totals']; ?></b></td>
|
<td><b><?php echo $hesklang['totals']; ?></b></td>
|
||||||
|
<td><b><?php echo $totals['openedby']; ?></b></td>
|
||||||
<td><b><?php echo $totals['asstickets']; ?></b></td>
|
<td><b><?php echo $totals['asstickets']; ?></b></td>
|
||||||
<td><b><?php echo $totals['asstickets'] - $totals['resolved']; ?></b></td>
|
<td><b><?php echo $totals['asstickets'] - $totals['resolved']; ?></b></td>
|
||||||
<td><b><?php echo $totals['resolved']; ?></b></td>
|
<td><b><?php echo $totals['resolved']; ?></b></td>
|
||||||
@ -666,6 +679,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $admins[$k]; ?></td>
|
<td><?php echo $admins[$k]; ?></td>
|
||||||
|
<td><?php echo $d['openedby']; ?></td>
|
||||||
<td><?php echo $d['asstickets']; ?></td>
|
<td><?php echo $d['asstickets']; ?></td>
|
||||||
<td><?php echo $d['asstickets'] - $d['resolved']; ?></td>
|
<td><?php echo $d['asstickets'] - $d['resolved']; ?></td>
|
||||||
<td><?php echo $d['resolved']; ?></td>
|
<td><?php echo $d['resolved']; ?></td>
|
||||||
@ -682,6 +696,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b><?php echo $hesklang['totals']; ?></b></td>
|
<td><b><?php echo $hesklang['totals']; ?></b></td>
|
||||||
|
<td><b><?php echo $totals['openedby']; ?></b></td>
|
||||||
<td><b><?php echo $totals['asstickets']; ?></b></td>
|
<td><b><?php echo $totals['asstickets']; ?></b></td>
|
||||||
<td><b><?php echo $totals['asstickets'] - $totals['resolved']; ?></b></td>
|
<td><b><?php echo $totals['asstickets'] - $totals['resolved']; ?></b></td>
|
||||||
<td><b><?php echo $totals['resolved']; ?></b></td>
|
<td><b><?php echo $totals['resolved']; ?></b></td>
|
||||||
|
@ -35,8 +35,13 @@ if (!defined('IN_SCRIPT')) {
|
|||||||
|
|
||||||
#error_reporting(E_ALL);
|
#error_reporting(E_ALL);
|
||||||
|
|
||||||
// Set correct Content-Type header
|
/*
|
||||||
if (!defined('NO_HTTP_HEADER')) {
|
* If code is executed from CLI, don't force SSL
|
||||||
|
* else set correct Content-Type header
|
||||||
|
*/
|
||||||
|
if (defined('NO_HTTP_HEADER')) {
|
||||||
|
$hesk_settings['force_ssl'] = false;
|
||||||
|
} else {
|
||||||
header('Content-Type: text/html; charset=utf-8');
|
header('Content-Type: text/html; charset=utf-8');
|
||||||
|
|
||||||
// Don't allow HESK to be loaded in a frame on third party domains
|
// Don't allow HESK to be loaded in a frame on third party domains
|
||||||
|
23
index.php
23
index.php
@ -473,8 +473,10 @@ function print_add_ticket()
|
|||||||
|
|
||||||
foreach ($v['value']['radio_options'] as $option)
|
foreach ($v['value']['radio_options'] as $option)
|
||||||
{
|
{
|
||||||
if (strlen($k_value) == 0 || $k_value == $option)
|
if (strlen($k_value) == 0) {
|
||||||
{
|
$k_value = $option;
|
||||||
|
$checked = empty($v['value']['no_default']) ? 'checked="checked"' : '';
|
||||||
|
} elseif ($k_value == $option) {
|
||||||
$k_value = $option;
|
$k_value = $option;
|
||||||
$checked = 'checked="checked"';
|
$checked = 'checked="checked"';
|
||||||
}
|
}
|
||||||
@ -597,11 +599,11 @@ function print_add_ticket()
|
|||||||
|
|
||||||
// Hidden
|
// Hidden
|
||||||
case 'hidden':
|
case 'hidden':
|
||||||
if (strlen($k_value) != 0)
|
if (strlen($k_value) != 0 || isset($_SESSION["c_$k"]))
|
||||||
{
|
{
|
||||||
$v['value']['hidden_default_value'] = $k_value;
|
$v['value']['default_value'] = $k_value;
|
||||||
}
|
}
|
||||||
$hidden_cf_buffer .= '<input type="hidden" name="'.$k.'" value="'.$v['value']['hidden_default_value'].'" />';
|
$hidden_cf_buffer .= '<input type="hidden" name="'.$k.'" value="'.$v['value']['default_value'].'">';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Default text input */
|
/* Default text input */
|
||||||
@ -766,8 +768,10 @@ function print_add_ticket()
|
|||||||
|
|
||||||
foreach ($v['value']['radio_options'] as $option)
|
foreach ($v['value']['radio_options'] as $option)
|
||||||
{
|
{
|
||||||
if (strlen($k_value) == 0 || $k_value == $option)
|
if (strlen($k_value) == 0) {
|
||||||
{
|
$k_value = $option;
|
||||||
|
$checked = empty($v['value']['no_default']) ? 'checked="checked"' : '';
|
||||||
|
} elseif ($k_value == $option) {
|
||||||
$k_value = $option;
|
$k_value = $option;
|
||||||
$checked = 'checked="checked"';
|
$checked = 'checked="checked"';
|
||||||
}
|
}
|
||||||
@ -890,7 +894,10 @@ function print_add_ticket()
|
|||||||
|
|
||||||
// Hidden
|
// Hidden
|
||||||
case 'hidden':
|
case 'hidden':
|
||||||
$hidden_cf_buffer .= '<input type="hidden" name="'.$k.'" value="'.$k_value.'" />';
|
if (strlen($k_value) != 0 || isset($_SESSION["c_$k"])) {
|
||||||
|
$v['value']['default_value'] = $k_value;
|
||||||
|
}
|
||||||
|
$hidden_cf_buffer .= '<input type="hidden" name="'.$k.'" value="'.$v['value']['default_value'].'">';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Default text input */
|
/* Default text input */
|
||||||
|
@ -2045,6 +2045,9 @@ $hesklang['status_limit']='You have 100 custom statuses, no new can be created.'
|
|||||||
$hesklang['public_link']='Public link'; // Link to the public KB article in the private KB pages
|
$hesklang['public_link']='Public link'; // Link to the public KB article in the private KB pages
|
||||||
$hesklang['frames']='Frames';
|
$hesklang['frames']='Frames';
|
||||||
$hesklang['frames2']='Prevent loading HESK in frames on third party domains';
|
$hesklang['frames2']='Prevent loading HESK in frames on third party domains';
|
||||||
|
$hesklang['numsub']='Submitted tickets'; // Will show how many tickets this user submitted
|
||||||
|
$hesklang['hidf']='Hidden inputs are not visible to customers on the Submit a ticket form (the value will still be visible on ticket details page if they are set as public). They behave as normal text fields for staff members.';
|
||||||
|
$hesklang['rcheck']='Do not select a default option';
|
||||||
|
|
||||||
// DO NOT CHANGE BELOW
|
// DO NOT CHANGE BELOW
|
||||||
if (!defined('IN_SCRIPT')) die('PHP syntax OK!');
|
if (!defined('IN_SCRIPT')) die('PHP syntax OK!');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user