Merge branch 'master' into remove-2-6-0-features
Conflicts: admin/admin_settings.php admin/admin_settings_save.php modsForHesk_settings.inc.php
1
.gitignore
vendored
@ -3,7 +3,6 @@ admin/archive.php
|
||||
admin/assign_owner.php
|
||||
admin/generate_spam_question.php
|
||||
admin/move_category.php
|
||||
admin/options.php
|
||||
admin/priority.php
|
||||
admin/test_connection.php
|
||||
attachments/index.htm
|
||||
|
13
README.md
@ -1,5 +1,5 @@
|
||||
[](https://waffle.io/mkoch227/Mods-For-Hesk)
|
||||
<h2><a href="http://mods-for-hesk.mkochcs.com" target="_blank">Mods for HESK</a> v1.6.1</h2>
|
||||
<h2><a href="http://mods-for-hesk.mkochcs.com" target="_blank">Mods for HESK</a> v1.7.0</h2>
|
||||
|
||||
Mods for HESK is a set of modifications for HESK v2.5.5, a free and popular helpdesk solution.
|
||||
|
||||
@ -26,16 +26,7 @@ You can download Mods for HESK via two ways:
|
||||
</ol>
|
||||
|
||||
<h2>Installation</h2>
|
||||
|
||||
<ol>
|
||||
<li>Download HESK from <a href="http://www.hesk.com/download.php" target="_blank">http://www.hesk.com/download.php</a>.</li>
|
||||
<li>Extract the contents of HESK to a directory of your choice.</li>
|
||||
<li>Download Mods for HESK from one of the two methods described above.</li>
|
||||
<li>Copy and paste the contents of the zip/tar.gz bundle and overwrite any files in the original HESK 2.x folder.</li>
|
||||
<li>Upload the resulting folder to your webserver.</li>
|
||||
<li>Go to the /install directory in your web browser and click on "Install/Update Mods for HESK Installation"</li>
|
||||
</ol>
|
||||
<p>Please consult the official HESK Documentation on how to install HESK, as it is the same for both HESK and Mods for HESK.</p>
|
||||
<p>Visit <a href="http://mods-for-hesk.mkochcs.com/download.php">http://mods-for-hesk.mkochcs.com/download.php</a> for installation instructions.</p>
|
||||
|
||||
<h2>Languages</h2>
|
||||
<p>As of current, only English is a supported language, as there have been several language items that have been edited/created. If you want to translate Mods for HESK to your own language, it is recommended to download the original HESK language file for your language, and then add/edit the lines listed under <code>//Added or modified in Mods for HESK X.X.X (where X.X.X is a version number) for your language.</p>
|
||||
|
@ -100,7 +100,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="row" style="margin-top: 20px">
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?php echo $hesklang['check_status']; ?></div>
|
||||
<div class="panel-heading"><?php echo $hesklang['installation_information']; ?></div>
|
||||
<div class="panel-body">
|
||||
<table>
|
||||
<tr><td class="text-right">
|
||||
@ -141,10 +141,10 @@ if ( defined('HESK_DEMO') )
|
||||
?>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td class="text-right">
|
||||
<td class="text-right" style="padding-bottom: 5px">
|
||||
<?php echo $hesklang['mods_for_hesk_version']; ?>:
|
||||
</td>
|
||||
<td style="padding-left: 10px">
|
||||
<td style="padding-left: 10px; padding-bottom: 5px">
|
||||
<?php echo $modsForHeskVersion; ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -153,6 +153,11 @@ if ( defined('HESK_DEMO') )
|
||||
</td><td style="padding-left: 10px">
|
||||
<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : PHP_VERSION . ' ' . (function_exists('mysqli_connect') ? '(MySQLi)' : '(MySQL)'); ?>
|
||||
</td></tr>
|
||||
<tr><td class="text-right" style="padding-bottom: 5px">
|
||||
<?php echo $hesklang['mysqlv']; ?>:
|
||||
</td><td style="padding-left: 10px; padding-bottom: 5px">
|
||||
<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : hesk_dbResult( hesk_dbQuery('SELECT VERSION() AS version') ); ?>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td class="text-right">
|
||||
/hesk_settings.inc.php
|
||||
@ -1215,7 +1220,9 @@ if ( defined('HESK_DEMO') )
|
||||
<th><?php echo $hesklang['enable']; ?></th>
|
||||
<th><?php echo $hesklang['s_type']; ?></th>
|
||||
<th><?php echo $hesklang['custom_r']; ?></th>
|
||||
<th><?php echo $hesklang['custom_n']; ?></th>
|
||||
<th>
|
||||
<?php if ($modsForHesk_settings['custom_field_setting']) { echo $hesklang['custom_language_key']; } else { echo $hesklang['custom_n']; } ?>
|
||||
</th>
|
||||
<th><?php echo $hesklang['custom_place']; ?></th>
|
||||
<th><?php echo $hesklang['opt']; ?></th>
|
||||
</tr>
|
||||
@ -1238,6 +1245,8 @@ if ( defined('HESK_DEMO') )
|
||||
<option value="radio" '.($this_field['type'] == 'radio' ? 'selected="selected"' : ''). '>'.$hesklang['srb'].'</option>
|
||||
<option value="select" '.($this_field['type'] == 'select' ? 'selected="selected"' : ''). '>'.$hesklang['ssb'].'</option>
|
||||
<option value="checkbox" '.($this_field['type'] == 'checkbox' ? 'selected="selected"' : '').'>'.$hesklang['scb'].'</option>
|
||||
<option value="date" '.($this_field['type'] == 'date' ? 'selected="selected"' : '').'>'.$hesklang['date_custom_field'].'</option>
|
||||
<option value="multiselect" '.($this_field['type'] == 'multiselect' ? 'selected="selected"' : '').'>'.$hesklang['multiple_select_custom_field'].'</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><div class="checkbox"><label><input type="checkbox" name="s_custom'.$i.'_req" value="1" id="s_custom'.$i.'_req" '; if ($this_field['req']) {echo 'checked="checked"';} echo $onload_locally.' /> '.$hesklang['yes'].'</label></div></td>
|
||||
@ -1670,7 +1679,24 @@ if ( defined('HESK_DEMO') )
|
||||
<label for="s_multi_eml" class="col-sm-3 control-label"><?php echo $hesklang['meml']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#57','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" name="s_multi_eml" value="1" <?php if ($hesk_settings['multi_eml']) {echo 'checked="checked"';} ?>/> <?php echo $hesklang['meml2']; ?></label>
|
||||
<?php
|
||||
if ($modsForHesk_settings['customer_email_verification_required'])
|
||||
{
|
||||
?>
|
||||
<label>
|
||||
<i class="fa fa-ban" style="color: red; font-size: 1.2em; margin-left: -20px; font-weight: bold"
|
||||
data-toggle="popover"
|
||||
title="<?php echo $hesklang['feature_disabled']; ?>"
|
||||
data-content="<?php echo $hesklang['multi_eml_disabled']; ?>"></i> <?php echo $hesklang['meml2']; ?></label>
|
||||
<input type="hidden" name="s_multi_eml" value="0">
|
||||
<?php
|
||||
} else
|
||||
{
|
||||
?>
|
||||
<label><input type="checkbox" name="s_multi_eml" value="1" <?php if ($hesk_settings['multi_eml']) {echo 'checked="checked"';} ?>/> <?php echo $hesklang['meml2']; ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1790,7 +1816,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="rtl" class="col-sm-4 col-xs-12 control-label">
|
||||
<?php echo $hesklang['displayRtl']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" data-placement="bottom"
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
|
||||
title="<?php echo $hesklang['displayRtl']; ?>"
|
||||
data-content="<?php echo $hesklang['displayRtlHelp']; ?>"></i>
|
||||
</label>
|
||||
@ -1805,7 +1831,7 @@ if ( defined('HESK_DEMO') )
|
||||
<div class="form-group">
|
||||
<label for="show-icons" class="col-sm-4 col-xs-12 control-label">
|
||||
<?php echo $hesklang['showIcons']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover" data-placement="bottom"
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
|
||||
title="<?php echo $hesklang['showIcons']; ?>"
|
||||
data-content="<?php echo $hesklang['showIconsHelp']; ?>"></i>
|
||||
</label>
|
||||
@ -1817,6 +1843,38 @@ if ( defined('HESK_DEMO') )
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email-verification" class="col-sm-4 col-xs-12 control-label"><?php echo $hesklang['customer_email_verification']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
|
||||
title="<?php echo $hesklang['customer_email_verification']; ?>"
|
||||
data-content="<?php echo $hesklang['customer_email_verification_help']; ?>"></i>
|
||||
</label>
|
||||
<div class="col-sm-8 col-xs-12">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input id="email-verification" name="email-verification" type="checkbox" <?php if ($modsForHesk_settings['customer_email_verification_required']) {echo 'checked';} ?>> <?php echo $hesklang['require_customer_validate_email']; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="blankSpace"></div>
|
||||
<h6 style="font-weight: bold"><?php echo $hesklang['tab_4']; ?></h6>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<div class="form-group">
|
||||
<label for="custom-field-setting" class="col-sm-4 col-xs-12 control-label">
|
||||
<?php echo $hesklang['custom_field_setting']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
|
||||
title="<?php echo $hesklang['custom_field_setting']; ?>"
|
||||
data-content="<?php echo $hesklang['custom_field_setting_help']; ?>"></i>
|
||||
</label>
|
||||
<div class="col-sm-8 col-xs-12">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input id="custom-field-setting" name="custom-field-setting" type="checkbox" <?php if ($modsForHesk_settings['custom_field_setting']) {echo 'checked';} ?>> <?php echo $hesklang['enable_custom_field_language']; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Mods For Hesk: Statuses -->
|
||||
<div class="tab-pane fade in" id="statuses">
|
||||
|
@ -390,7 +390,7 @@ for ($i=1;$i<=20;$i++)
|
||||
$set['custom_fields'][$this_field]['maxlen'] = intval( hesk_POST('s_custom'.$i.'_maxlen', 255) );
|
||||
$set['custom_fields'][$this_field]['value'] = hesk_input( hesk_POST('s_custom'.$i.'_val') );
|
||||
|
||||
if (!in_array($set['custom_fields'][$this_field]['type'],array('text','textarea','select','radio','checkbox')))
|
||||
if (!in_array($set['custom_fields'][$this_field]['type'],array('text','textarea','select','radio','checkbox','date','multiselect')))
|
||||
{
|
||||
$set['custom_fields'][$this_field]['type'] = 'text';
|
||||
}
|
||||
@ -537,6 +537,14 @@ $set['hesk_version'] = $hesk_settings['hesk_version'];
|
||||
// Save the modsForHesk_settings.inc.php file
|
||||
$set['rtl'] = empty($_POST['rtl']) ? 0 : 1;
|
||||
$set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1;
|
||||
$set['custom-field-setting'] = empty($_POST['custom-field-setting']) ? 0 : 1;
|
||||
$set['customer-email-verification-required'] = empty($_POST['email-verification']) ? 0 : 1;
|
||||
|
||||
if ($set['customer-email-verification-required'])
|
||||
{
|
||||
//-- Don't allow multiple emails if verification is required
|
||||
$set['multi_eml'] = 0;
|
||||
}
|
||||
$set['navbarBackgroundColor'] = hesk_input(hesk_POST('navbarBackgroundColor'));
|
||||
$set['navbarBrandColor'] = hesk_input(hesk_POST('navbarBrandColor'));
|
||||
$set['navbarBrandHoverColor'] = hesk_input(hesk_POST('navbarBrandHoverColor'));
|
||||
@ -567,7 +575,13 @@ $modsForHesk_settings[\'questionMarkColor\'] = \''.$set['questionMarkColor'].'\'
|
||||
$modsForHesk_settings[\'rtl\'] = '.$set['rtl'].';
|
||||
|
||||
//-- Set this to 1 to show icons next to navigation menu items
|
||||
$modsForHesk_settings[\'show_icons\'] = '.$set['show-icons'].';';
|
||||
$modsForHesk_settings[\'show_icons\'] = '.$set['show-icons'].';
|
||||
|
||||
//-- Set this to 1 to enable custom field names as keys
|
||||
$modsForHesk_settings[\'custom_field_setting\'] = '.$set['custom-field-setting'].';
|
||||
|
||||
//-- Set this to 1 to enable email verification for new customers
|
||||
$modsForHesk_settings[\'customer_email_verification_required\'] = '.$set['customer-email-verification-required'].';';
|
||||
|
||||
// Write the file
|
||||
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )
|
||||
|
@ -92,7 +92,11 @@ foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||
{
|
||||
if ($v['use'] && isset($_POST[$k]))
|
||||
{
|
||||
if (is_array($_POST[$k]))
|
||||
// Date will be handled by the jQuery datepicker
|
||||
if( $v['type'] == 'date' && $_POST[$k] != '')
|
||||
{
|
||||
$tmpvar[$k] = strtotime($_POST[$k]);
|
||||
} else if (is_array($_POST[$k]))
|
||||
{
|
||||
$tmpvar[$k]='';
|
||||
foreach ($_POST[$k] as $myCB)
|
||||
|
@ -1036,8 +1036,21 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
{
|
||||
if ($v['use'] && $v['place']==0)
|
||||
{
|
||||
echo '
|
||||
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
echo '<p>'.$v['name'].': ';
|
||||
if ($v['type'] == 'date' && !empty($ticket[$k]))
|
||||
{
|
||||
$dt = date('Y-m-d h:i:s', $ticket[$k]);
|
||||
echo hesk_dateToString($dt, 0);
|
||||
} else
|
||||
{
|
||||
echo $ticket[$k];
|
||||
}
|
||||
echo '</p>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -1054,8 +1067,21 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
{
|
||||
if ($v['use'] && $v['place'])
|
||||
{
|
||||
echo '
|
||||
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
echo '<p>'.$v['name'].': ';
|
||||
if ($v['type'] == 'date' && !empty($ticket[$k]))
|
||||
{
|
||||
$dt = date('Y-m-d h:i:s', $ticket[$k]);
|
||||
echo hesk_dateToString($dt, 0);
|
||||
} else
|
||||
{
|
||||
echo $ticket[$k];
|
||||
}
|
||||
echo '</p>';
|
||||
}
|
||||
}
|
||||
/* Attachments */
|
||||
|
@ -94,7 +94,11 @@ if ($statusRow['IsClosed']) // Closed
|
||||
|
||||
// Notify customer
|
||||
require(HESK_PATH . 'inc/email_functions.inc.php');
|
||||
hesk_notifyCustomer('ticket_closed');
|
||||
|
||||
if (!empty($ticket['email']))
|
||||
{
|
||||
hesk_notifyCustomer('ticket_closed');
|
||||
}
|
||||
}
|
||||
elseif ($statusRow['ID'] != 0) //Ticket is still open, but not new
|
||||
{
|
||||
|
@ -144,7 +144,10 @@ if (isset($_POST['save']))
|
||||
{
|
||||
if ($v['use'] && isset($_POST[$k]))
|
||||
{
|
||||
if (is_array($_POST[$k]))
|
||||
if( $v['type'] == 'date' && $_POST[$k] != '')
|
||||
{
|
||||
$tmpvar[$k] = strtotime($_POST[$k]);
|
||||
} elseif (is_array($_POST[$k]))
|
||||
{
|
||||
$tmpvar[$k]='';
|
||||
foreach ($_POST[$k] as $myCB)
|
||||
@ -246,6 +249,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
{
|
||||
if ($v['use'])
|
||||
{
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
$k_value = $ticket[$k];
|
||||
|
||||
if ($v['type'] == 'checkbox')
|
||||
@ -360,6 +368,44 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
</div>';
|
||||
break;
|
||||
|
||||
case 'date':
|
||||
if (strlen($k_value) != 0)
|
||||
{
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': </label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="datepicker form-control white-readonly" placeholder="'.$v['name'].'" id="'.$v['name'].'" name="'.$k.'" size="40"
|
||||
maxlength="'.$v['maxlen'].'" value="'.date('Y-m-d', $v['value']).'" readonly/>
|
||||
</div>
|
||||
</div>';
|
||||
break;
|
||||
case 'multiselect':
|
||||
echo '<div class="form-group"><label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': </label>
|
||||
<div class="col-sm-9"><select class="form-control" id="'.$v['name'].'" name="'.$k.'" multiple>';
|
||||
$options = explode('#HESK#',$v['value']);
|
||||
foreach ($options as $option)
|
||||
{
|
||||
if (strlen($k_value) == 0 || $k_value == $option)
|
||||
{
|
||||
$k_value = $option;
|
||||
$selected = 'selected="selected"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
echo '<option '.$selected.'>'.$option.'</option>';
|
||||
}
|
||||
echo '</select>
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-default" onclick="selectAll(\''.$v['name'].'\')">Select All</button>
|
||||
<button type="button" class="btn btn-default" onclick="deselectAll(\''.$v['name'].'\')">Deselect All</button>
|
||||
</div></div></div>';
|
||||
break;
|
||||
|
||||
/* Default text input */
|
||||
default:
|
||||
if (strlen($k_value) != 0)
|
||||
|
@ -481,6 +481,11 @@ if (isset($_GET['w']))
|
||||
{
|
||||
if ($v['use'])
|
||||
{
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
$tmp .= '<Cell><Data ss:Type="String">'.$v['name'].'</Data></Cell>' . "\n";
|
||||
}
|
||||
}
|
||||
|
@ -285,6 +285,11 @@ myField.value += myValue;
|
||||
{
|
||||
if ($v['use'])
|
||||
{
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
echo '| <a href="javascript:void(0)" onclick="hesk_insertTag(\'HESK_'.$k.'\')">'.$v['name'].'</a> ';
|
||||
}
|
||||
}
|
||||
|
@ -184,6 +184,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
{
|
||||
if ($v['use'] && $v['place']==0)
|
||||
{
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
// $v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
|
||||
// Staff doesn't need to fill in required custom fields
|
||||
$v['req'] = '';
|
||||
@ -275,6 +280,37 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
echo '</select></div></div>';
|
||||
break;
|
||||
|
||||
case 'multiselect':
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
|
||||
echo '<div class="form-group"><label for="'.$v['name'].'[]" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
|
||||
<div class="col-sm-9"><select class="form-control" id="'.$v['name'].'" name="'.$k.'[]" '.$cls.' multiple>';
|
||||
|
||||
$options = explode('#HESK#',$v['value']);
|
||||
|
||||
foreach ($options as $option)
|
||||
{
|
||||
|
||||
if (strlen($k_value) == 0 || $k_value == $option)
|
||||
{
|
||||
$k_value = $option;
|
||||
$selected = 'selected="selected"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
|
||||
echo '<option '.$selected.'>'.$option.'</option>';
|
||||
}
|
||||
|
||||
echo '</select>
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-default" onclick="selectAll(\''.$v['name'].'\')">Select All</button>
|
||||
<button type="button" class="btn btn-default" onclick="deselectAll(\''.$v['name'].'\')">Deselect All</button>
|
||||
</div></div></div>';
|
||||
break;
|
||||
|
||||
/* Checkbox */
|
||||
case 'checkbox':
|
||||
echo '<div class="form-group"><label class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label><div align="left" class="col-sm-9">';
|
||||
@ -312,6 +348,25 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
</div>';
|
||||
break;
|
||||
|
||||
case 'date':
|
||||
if (strlen($k_value) != 0)
|
||||
{
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' isError ' : '';
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.$v['name'].'" id="'.$v['name'].'" name="'.$k.'" size="40"
|
||||
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
|
||||
<span class="help-block">'.$hesklang['date_format'].'</span>
|
||||
</div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
/* Default text input */
|
||||
default:
|
||||
if (strlen($k_value) != 0)
|
||||
@ -352,6 +407,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
{
|
||||
if ($v['use'] && $v['place'])
|
||||
{
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
// $v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
|
||||
// Staff doesn't need to fill in required custom fields
|
||||
$v['req'] = '';
|
||||
@ -471,6 +531,56 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
</div>';
|
||||
break;
|
||||
|
||||
case 'date':
|
||||
if (strlen($k_value) != 0)
|
||||
{
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' isError ' : '';
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.$v['name'].'" id="'.$v['name'].'" name="'.$k.'" size="40"
|
||||
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
|
||||
<span class="help-block">'.$hesklang['date_format'].'</span>
|
||||
</div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
case 'multiselect':
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
|
||||
echo '<div class="form-group"><label for="'.$v['name'].'[]" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
|
||||
<div class="col-sm-9"><select class="form-control" id="'.$v['name'].'" name="'.$k.'[]" '.$cls.' multiple>';
|
||||
|
||||
$options = explode('#HESK#',$v['value']);
|
||||
|
||||
foreach ($options as $option)
|
||||
{
|
||||
|
||||
if (strlen($k_value) == 0 || $k_value == $option)
|
||||
{
|
||||
$k_value = $option;
|
||||
$selected = 'selected="selected"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
|
||||
echo '<option '.$selected.'>'.$option.'</option>';
|
||||
}
|
||||
|
||||
echo '</select>
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-default" onclick="selectAll(\''.$v['name'].'\')">Select All</button>
|
||||
<button type="button" class="btn btn-default" onclick="deselectAll(\''.$v['name'].'\')">Deselect All</button>
|
||||
</div></div></div>';
|
||||
break;
|
||||
|
||||
/* Default text input */
|
||||
default:
|
||||
if (strlen($k_value) != 0)
|
||||
|
323
admin/options.php
Normal file
@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.5.3 from 16th March 2014
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
* COPYRIGHT AND TRADEMARK NOTICE
|
||||
* Copyright 2005-2014 Klemen Stirn. All Rights Reserved.
|
||||
* HESK is a registered trademark of Klemen Stirn.
|
||||
|
||||
* The HESK may be used and modified free of charge by anyone
|
||||
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
|
||||
* By using this code you agree to indemnify Klemen Stirn from any
|
||||
* liability that might arise from it's use.
|
||||
|
||||
* Selling the code for this program, in part or full, without prior
|
||||
* written consent is expressly forbidden.
|
||||
|
||||
* Using this code, in part or full, to create derivate work,
|
||||
* new scripts or products is expressly forbidden. Obtain permission
|
||||
* before redistributing this software over the Internet or in
|
||||
* any other medium. In all cases copyright and header must remain intact.
|
||||
* This Copyright is in full effect in any country that has International
|
||||
* Trade Agreements with the United States of America or
|
||||
* with the European Union.
|
||||
|
||||
* Removing any of the copyright notices without purchasing a license
|
||||
* is expressly forbidden. To remove HESK copyright notice you must purchase
|
||||
* a license for this script. For more information on how to obtain
|
||||
* a license please visit the page below:
|
||||
* https://www.hesk.com/buy.php
|
||||
*******************************************************************************/
|
||||
|
||||
define('IN_SCRIPT',1);
|
||||
define('HESK_PATH','../');
|
||||
|
||||
/* Get all the required files and functions */
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
require(HESK_PATH . 'inc/admin_functions.inc.php');
|
||||
|
||||
$id = hesk_input( hesk_GET('i') );
|
||||
$query = hesk_input( hesk_utf8_urldecode( hesk_GET('q') ) );
|
||||
$type = hesk_input( hesk_GET('t', 'text') );
|
||||
$maxlen = intval( hesk_GET('m', 255) );
|
||||
$query = stripslashes($query);
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML; 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||
<head>
|
||||
<title><?php echo $hesklang['opt']; ?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=<?php echo $hesklang['ENCODING']; ?>" />
|
||||
<style type="text/css">
|
||||
body
|
||||
{
|
||||
margin:5px 5px;
|
||||
padding:0;
|
||||
background:#fff;
|
||||
color: black;
|
||||
font : 68.8%/1.5 Verdana, Geneva, Arial, Helvetica, sans-serif;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
color : black;
|
||||
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
|
||||
font-size: 1.0em;
|
||||
}
|
||||
h3
|
||||
{
|
||||
color : #AF0000;
|
||||
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 1.0em;
|
||||
text-align:center;
|
||||
}
|
||||
.title
|
||||
{
|
||||
color : black;
|
||||
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 1.0em;
|
||||
}
|
||||
.wrong {color : red;}
|
||||
.correct {color : green;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h3><?php echo $hesklang['opt']; ?></h3>
|
||||
|
||||
<p><i><?php echo $hesklang['ns']; ?></i></p>
|
||||
|
||||
<?php
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case 'text':
|
||||
echo '
|
||||
<script language="javascript">
|
||||
function hesk_saveOptions()
|
||||
{
|
||||
window.opener.document.getElementById(\'s_'.$id.'_val\').value = document.getElementById(\'o2\').value;
|
||||
window.opener.document.getElementById(\'s_'.$id.'_maxlen\').value = document.getElementById(\'o1\').value;
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>'.$hesklang['custom_l'].':<td>
|
||||
<td><input type="text" name="o1" id="o1" value="'.$maxlen.'" size="30" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$hesklang['defw'].':<td>
|
||||
<td><input type="text" name="o2" id="o2" value="'.$query.'" size="30" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
|
||||
';
|
||||
break;
|
||||
case 'textarea':
|
||||
if (strpos($query,'#') !== false)
|
||||
{
|
||||
list($rows,$cols)=explode('#',$query);
|
||||
}
|
||||
else
|
||||
{
|
||||
$rows = '';
|
||||
$cols = '';
|
||||
}
|
||||
echo '
|
||||
<script language="javascript">
|
||||
function hesk_saveOptions()
|
||||
{
|
||||
window.opener.document.getElementById(\'s_'.$id.'_val\').value = document.getElementById(\'o1\').value + "#" + document.getElementById(\'o2\').value;
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td>'.$hesklang['rows'].':<td>
|
||||
<td><input type="text" name="o1" id="o1" value="'.$rows.'" size="5" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$hesklang['cols'].':<td>
|
||||
<td><input type="text" name="o2" id="o2" value="'.$cols.'" size="5" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
|
||||
';
|
||||
break;
|
||||
case 'radio':
|
||||
$options=str_replace('#HESK#',"\n",$query);
|
||||
echo '
|
||||
<script language="javascript">
|
||||
function hesk_saveOptions()
|
||||
{
|
||||
text = document.getElementById(\'o1\').value;
|
||||
text = text.replace(/^\s\s*/, \'\').replace(/\s\s*$/, \'\');
|
||||
text = escape(text);
|
||||
if(text.indexOf(\'%0D%0A\') > -1)
|
||||
{
|
||||
re_nlchar = /%0D%0A/g ;
|
||||
}
|
||||
else if(text.indexOf(\'%0A\') > -1)
|
||||
{
|
||||
re_nlchar = /%0A/g ;
|
||||
}
|
||||
else if(text.indexOf(\'%0D\') > -1)
|
||||
{
|
||||
re_nlchar = /%0D/g ;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(\''.addslashes($hesklang['atl2']).'\');
|
||||
return false;
|
||||
}
|
||||
text = unescape(text.replace(re_nlchar,\'#HESK#\'));
|
||||
|
||||
window.opener.document.getElementById(\'s_'.$id.'_val\').value = text;
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<p>'.$hesklang['opt2'].'</p>
|
||||
<textarea name="o1" id="o1" rows="6" cols="40">'.$options.'</textarea>
|
||||
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
|
||||
';
|
||||
break;
|
||||
case 'select':
|
||||
$options=str_replace('#HESK#',"\n",$query);
|
||||
echo '
|
||||
<script language="javascript">
|
||||
function hesk_saveOptions()
|
||||
{
|
||||
text = document.getElementById(\'o1\').value;
|
||||
text = text.replace(/^\s\s*/, \'\').replace(/\s\s*$/, \'\');
|
||||
text = escape(text);
|
||||
if(text.indexOf(\'%0D%0A\') > -1)
|
||||
{
|
||||
re_nlchar = /%0D%0A/g ;
|
||||
}
|
||||
else if(text.indexOf(\'%0A\') > -1)
|
||||
{
|
||||
re_nlchar = /%0A/g ;
|
||||
}
|
||||
else if(text.indexOf(\'%0D\') > -1)
|
||||
{
|
||||
re_nlchar = /%0D/g ;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(\''.addslashes($hesklang['atl2']).'\');
|
||||
return false;
|
||||
}
|
||||
text = unescape(text.replace(re_nlchar,\'#HESK#\'));
|
||||
|
||||
window.opener.document.getElementById(\'s_'.$id.'_val\').value = text;
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<p>'.$hesklang['opt3'].'</p>
|
||||
<textarea name="o1" id="o1" rows="6" cols="40">'.$options.'</textarea>
|
||||
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
|
||||
';
|
||||
break;
|
||||
case 'checkbox':
|
||||
$options=str_replace('#HESK#',"\n",$query);
|
||||
echo '
|
||||
<script language="javascript">
|
||||
function hesk_saveOptions()
|
||||
{
|
||||
text = document.getElementById(\'o1\').value;
|
||||
text = text.replace(/^\s\s*/, \'\').replace(/\s\s*$/, \'\');
|
||||
text = escape(text);
|
||||
if(text.indexOf(\'%0D%0A\') > -1)
|
||||
{
|
||||
re_nlchar = /%0D%0A/g ;
|
||||
}
|
||||
else if(text.indexOf(\'%0A\') > -1)
|
||||
{
|
||||
re_nlchar = /%0A/g ;
|
||||
}
|
||||
else if(text.indexOf(\'%0D\') > -1)
|
||||
{
|
||||
re_nlchar = /%0D/g ;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(\''.addslashes($hesklang['atl2']).'\');
|
||||
return false;
|
||||
}
|
||||
text = unescape(text.replace(re_nlchar,\'#HESK#\'));
|
||||
|
||||
window.opener.document.getElementById(\'s_'.$id.'_val\').value = text;
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<p>'.$hesklang['opt4'].'</p>
|
||||
<textarea name="o1" id="o1" rows="6" cols="40">'.$options.'</textarea>
|
||||
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
|
||||
';
|
||||
break;
|
||||
case 'date':
|
||||
echo '<p>'.$hesklang['date_custom_field_text'].'</p>';
|
||||
break;
|
||||
case 'multiselect':
|
||||
$options=str_replace('#HESK#',"\n",$query);
|
||||
echo '
|
||||
<script language="javascript">
|
||||
function hesk_saveOptions()
|
||||
{
|
||||
text = document.getElementById(\'o1\').value;
|
||||
text = text.replace(/^\s\s*/, \'\').replace(/\s\s*$/, \'\');
|
||||
text = escape(text);
|
||||
if(text.indexOf(\'%0D%0A\') > -1)
|
||||
{
|
||||
re_nlchar = /%0D%0A/g ;
|
||||
}
|
||||
else if(text.indexOf(\'%0A\') > -1)
|
||||
{
|
||||
re_nlchar = /%0A/g ;
|
||||
}
|
||||
else if(text.indexOf(\'%0D\') > -1)
|
||||
{
|
||||
re_nlchar = /%0D/g ;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(\''.addslashes($hesklang['atl2']).'\');
|
||||
return false;
|
||||
}
|
||||
text = unescape(text.replace(re_nlchar,\'#HESK#\'));
|
||||
|
||||
window.opener.document.getElementById(\'s_'.$id.'_val\').value = text;
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<p>'.$hesklang['multiple_select_custom_field_text'].'</p>
|
||||
<textarea name="o1" id="o1" rows="6" cols="40">'.$options.'</textarea>
|
||||
<p><input type="button" value=" '.$hesklang['ok'].' " onclick="Javascript:hesk_saveOptions()" /></p>
|
||||
';
|
||||
break;
|
||||
default:
|
||||
die('Invalid type');
|
||||
}
|
||||
?>
|
||||
|
||||
<p align="center"><a href="#" onclick="Javascript:window.close()"><?php echo $hesklang['cwin']; ?></a></p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
?>
|
510
css/datepicker.css
Executable file
@ -0,0 +1,510 @@
|
||||
/*!
|
||||
* Datepicker for Bootstrap
|
||||
*
|
||||
* Copyright 2012 Stefan Petre
|
||||
* Improvements by Andrew Rowls
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*/
|
||||
.datepicker {
|
||||
padding: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
direction: ltr;
|
||||
}
|
||||
.datepicker-inline {
|
||||
width: 220px;
|
||||
}
|
||||
.datepicker.datepicker-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.datepicker.datepicker-rtl table tr td span {
|
||||
float: right;
|
||||
}
|
||||
.datepicker-dropdown {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.datepicker-dropdown:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
border-top: 0;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
position: absolute;
|
||||
}
|
||||
.datepicker-dropdown:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #ffffff;
|
||||
border-top: 0;
|
||||
position: absolute;
|
||||
}
|
||||
.datepicker-dropdown.datepicker-orient-left:before {
|
||||
left: 6px;
|
||||
}
|
||||
.datepicker-dropdown.datepicker-orient-left:after {
|
||||
left: 7px;
|
||||
}
|
||||
.datepicker-dropdown.datepicker-orient-right:before {
|
||||
right: 6px;
|
||||
}
|
||||
.datepicker-dropdown.datepicker-orient-right:after {
|
||||
right: 7px;
|
||||
}
|
||||
.datepicker-dropdown.datepicker-orient-top:before {
|
||||
top: -7px;
|
||||
}
|
||||
.datepicker-dropdown.datepicker-orient-top:after {
|
||||
top: -6px;
|
||||
}
|
||||
.datepicker-dropdown.datepicker-orient-bottom:before {
|
||||
bottom: -7px;
|
||||
border-bottom: 0;
|
||||
border-top: 7px solid #999;
|
||||
}
|
||||
.datepicker-dropdown.datepicker-orient-bottom:after {
|
||||
bottom: -6px;
|
||||
border-bottom: 0;
|
||||
border-top: 6px solid #ffffff;
|
||||
}
|
||||
.datepicker > div {
|
||||
display: none;
|
||||
}
|
||||
.datepicker.days div.datepicker-days {
|
||||
display: block;
|
||||
}
|
||||
.datepicker.months div.datepicker-months {
|
||||
display: block;
|
||||
}
|
||||
.datepicker.years div.datepicker-years {
|
||||
display: block;
|
||||
}
|
||||
.datepicker table {
|
||||
margin: 0;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.datepicker td,
|
||||
.datepicker th {
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
}
|
||||
.table-striped .datepicker table tr td,
|
||||
.table-striped .datepicker table tr th {
|
||||
background-color: transparent;
|
||||
}
|
||||
.datepicker table tr td.day:hover,
|
||||
.datepicker table tr td.day.focused {
|
||||
background: #eeeeee;
|
||||
cursor: pointer;
|
||||
}
|
||||
.datepicker table tr td.old,
|
||||
.datepicker table tr td.new {
|
||||
color: #999999;
|
||||
}
|
||||
.datepicker table tr td.disabled,
|
||||
.datepicker table tr td.disabled:hover {
|
||||
background: none;
|
||||
color: #999999;
|
||||
cursor: default;
|
||||
}
|
||||
.datepicker table tr td.today,
|
||||
.datepicker table tr td.today:hover,
|
||||
.datepicker table tr td.today.disabled,
|
||||
.datepicker table tr td.today.disabled:hover {
|
||||
background-color: #fde19a;
|
||||
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
|
||||
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-image: linear-gradient(top, #fdd49a, #fdf59a);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
|
||||
border-color: #fdf59a #fdf59a #fbed50;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
color: #000;
|
||||
}
|
||||
.datepicker table tr td.today:hover,
|
||||
.datepicker table tr td.today:hover:hover,
|
||||
.datepicker table tr td.today.disabled:hover,
|
||||
.datepicker table tr td.today.disabled:hover:hover,
|
||||
.datepicker table tr td.today:active,
|
||||
.datepicker table tr td.today:hover:active,
|
||||
.datepicker table tr td.today.disabled:active,
|
||||
.datepicker table tr td.today.disabled:hover:active,
|
||||
.datepicker table tr td.today.active,
|
||||
.datepicker table tr td.today:hover.active,
|
||||
.datepicker table tr td.today.disabled.active,
|
||||
.datepicker table tr td.today.disabled:hover.active,
|
||||
.datepicker table tr td.today.disabled,
|
||||
.datepicker table tr td.today:hover.disabled,
|
||||
.datepicker table tr td.today.disabled.disabled,
|
||||
.datepicker table tr td.today.disabled:hover.disabled,
|
||||
.datepicker table tr td.today[disabled],
|
||||
.datepicker table tr td.today:hover[disabled],
|
||||
.datepicker table tr td.today.disabled[disabled],
|
||||
.datepicker table tr td.today.disabled:hover[disabled] {
|
||||
background-color: #fdf59a;
|
||||
}
|
||||
.datepicker table tr td.today:active,
|
||||
.datepicker table tr td.today:hover:active,
|
||||
.datepicker table tr td.today.disabled:active,
|
||||
.datepicker table tr td.today.disabled:hover:active,
|
||||
.datepicker table tr td.today.active,
|
||||
.datepicker table tr td.today:hover.active,
|
||||
.datepicker table tr td.today.disabled.active,
|
||||
.datepicker table tr td.today.disabled:hover.active {
|
||||
background-color: #fbf069 \9;
|
||||
}
|
||||
.datepicker table tr td.today:hover:hover {
|
||||
color: #000;
|
||||
}
|
||||
.datepicker table tr td.today.active:hover {
|
||||
color: #fff;
|
||||
}
|
||||
.datepicker table tr td.range,
|
||||
.datepicker table tr td.range:hover,
|
||||
.datepicker table tr td.range.disabled,
|
||||
.datepicker table tr td.range.disabled:hover {
|
||||
background: #eeeeee;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.datepicker table tr td.range.today,
|
||||
.datepicker table tr td.range.today:hover,
|
||||
.datepicker table tr td.range.today.disabled,
|
||||
.datepicker table tr td.range.today.disabled:hover {
|
||||
background-color: #f3d17a;
|
||||
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
|
||||
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
|
||||
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
|
||||
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
|
||||
background-image: linear-gradient(top, #f3c17a, #f3e97a);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
|
||||
border-color: #f3e97a #f3e97a #edde34;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.datepicker table tr td.range.today:hover,
|
||||
.datepicker table tr td.range.today:hover:hover,
|
||||
.datepicker table tr td.range.today.disabled:hover,
|
||||
.datepicker table tr td.range.today.disabled:hover:hover,
|
||||
.datepicker table tr td.range.today:active,
|
||||
.datepicker table tr td.range.today:hover:active,
|
||||
.datepicker table tr td.range.today.disabled:active,
|
||||
.datepicker table tr td.range.today.disabled:hover:active,
|
||||
.datepicker table tr td.range.today.active,
|
||||
.datepicker table tr td.range.today:hover.active,
|
||||
.datepicker table tr td.range.today.disabled.active,
|
||||
.datepicker table tr td.range.today.disabled:hover.active,
|
||||
.datepicker table tr td.range.today.disabled,
|
||||
.datepicker table tr td.range.today:hover.disabled,
|
||||
.datepicker table tr td.range.today.disabled.disabled,
|
||||
.datepicker table tr td.range.today.disabled:hover.disabled,
|
||||
.datepicker table tr td.range.today[disabled],
|
||||
.datepicker table tr td.range.today:hover[disabled],
|
||||
.datepicker table tr td.range.today.disabled[disabled],
|
||||
.datepicker table tr td.range.today.disabled:hover[disabled] {
|
||||
background-color: #f3e97a;
|
||||
}
|
||||
.datepicker table tr td.range.today:active,
|
||||
.datepicker table tr td.range.today:hover:active,
|
||||
.datepicker table tr td.range.today.disabled:active,
|
||||
.datepicker table tr td.range.today.disabled:hover:active,
|
||||
.datepicker table tr td.range.today.active,
|
||||
.datepicker table tr td.range.today:hover.active,
|
||||
.datepicker table tr td.range.today.disabled.active,
|
||||
.datepicker table tr td.range.today.disabled:hover.active {
|
||||
background-color: #efe24b \9;
|
||||
}
|
||||
.datepicker table tr td.selected,
|
||||
.datepicker table tr td.selected:hover,
|
||||
.datepicker table tr td.selected.disabled,
|
||||
.datepicker table tr td.selected.disabled:hover {
|
||||
background-color: #9e9e9e;
|
||||
background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
|
||||
background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
|
||||
background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
|
||||
background-image: -o-linear-gradient(top, #b3b3b3, #808080);
|
||||
background-image: linear-gradient(top, #b3b3b3, #808080);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
|
||||
border-color: #808080 #808080 #595959;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.datepicker table tr td.selected:hover,
|
||||
.datepicker table tr td.selected:hover:hover,
|
||||
.datepicker table tr td.selected.disabled:hover,
|
||||
.datepicker table tr td.selected.disabled:hover:hover,
|
||||
.datepicker table tr td.selected:active,
|
||||
.datepicker table tr td.selected:hover:active,
|
||||
.datepicker table tr td.selected.disabled:active,
|
||||
.datepicker table tr td.selected.disabled:hover:active,
|
||||
.datepicker table tr td.selected.active,
|
||||
.datepicker table tr td.selected:hover.active,
|
||||
.datepicker table tr td.selected.disabled.active,
|
||||
.datepicker table tr td.selected.disabled:hover.active,
|
||||
.datepicker table tr td.selected.disabled,
|
||||
.datepicker table tr td.selected:hover.disabled,
|
||||
.datepicker table tr td.selected.disabled.disabled,
|
||||
.datepicker table tr td.selected.disabled:hover.disabled,
|
||||
.datepicker table tr td.selected[disabled],
|
||||
.datepicker table tr td.selected:hover[disabled],
|
||||
.datepicker table tr td.selected.disabled[disabled],
|
||||
.datepicker table tr td.selected.disabled:hover[disabled] {
|
||||
background-color: #808080;
|
||||
}
|
||||
.datepicker table tr td.selected:active,
|
||||
.datepicker table tr td.selected:hover:active,
|
||||
.datepicker table tr td.selected.disabled:active,
|
||||
.datepicker table tr td.selected.disabled:hover:active,
|
||||
.datepicker table tr td.selected.active,
|
||||
.datepicker table tr td.selected:hover.active,
|
||||
.datepicker table tr td.selected.disabled.active,
|
||||
.datepicker table tr td.selected.disabled:hover.active {
|
||||
background-color: #666666 \9;
|
||||
}
|
||||
.datepicker table tr td.active,
|
||||
.datepicker table tr td.active:hover,
|
||||
.datepicker table tr td.active.disabled,
|
||||
.datepicker table tr td.active.disabled:hover {
|
||||
background-color: #006dcc;
|
||||
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: linear-gradient(top, #0088cc, #0044cc);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||
border-color: #0044cc #0044cc #002a80;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.datepicker table tr td.active:hover,
|
||||
.datepicker table tr td.active:hover:hover,
|
||||
.datepicker table tr td.active.disabled:hover,
|
||||
.datepicker table tr td.active.disabled:hover:hover,
|
||||
.datepicker table tr td.active:active,
|
||||
.datepicker table tr td.active:hover:active,
|
||||
.datepicker table tr td.active.disabled:active,
|
||||
.datepicker table tr td.active.disabled:hover:active,
|
||||
.datepicker table tr td.active.active,
|
||||
.datepicker table tr td.active:hover.active,
|
||||
.datepicker table tr td.active.disabled.active,
|
||||
.datepicker table tr td.active.disabled:hover.active,
|
||||
.datepicker table tr td.active.disabled,
|
||||
.datepicker table tr td.active:hover.disabled,
|
||||
.datepicker table tr td.active.disabled.disabled,
|
||||
.datepicker table tr td.active.disabled:hover.disabled,
|
||||
.datepicker table tr td.active[disabled],
|
||||
.datepicker table tr td.active:hover[disabled],
|
||||
.datepicker table tr td.active.disabled[disabled],
|
||||
.datepicker table tr td.active.disabled:hover[disabled] {
|
||||
background-color: #0044cc;
|
||||
}
|
||||
.datepicker table tr td.active:active,
|
||||
.datepicker table tr td.active:hover:active,
|
||||
.datepicker table tr td.active.disabled:active,
|
||||
.datepicker table tr td.active.disabled:hover:active,
|
||||
.datepicker table tr td.active.active,
|
||||
.datepicker table tr td.active:hover.active,
|
||||
.datepicker table tr td.active.disabled.active,
|
||||
.datepicker table tr td.active.disabled:hover.active {
|
||||
background-color: #003399 \9;
|
||||
}
|
||||
.datepicker table tr td span {
|
||||
display: block;
|
||||
width: 23%;
|
||||
height: 54px;
|
||||
line-height: 54px;
|
||||
float: left;
|
||||
margin: 1%;
|
||||
cursor: pointer;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.datepicker table tr td span:hover {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.datepicker table tr td span.disabled,
|
||||
.datepicker table tr td span.disabled:hover {
|
||||
background: none;
|
||||
color: #999999;
|
||||
cursor: default;
|
||||
}
|
||||
.datepicker table tr td span.active,
|
||||
.datepicker table tr td span.active:hover,
|
||||
.datepicker table tr td span.active.disabled,
|
||||
.datepicker table tr td span.active.disabled:hover {
|
||||
background-color: #006dcc;
|
||||
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||
background-image: linear-gradient(top, #0088cc, #0044cc);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||
border-color: #0044cc #0044cc #002a80;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.datepicker table tr td span.active:hover,
|
||||
.datepicker table tr td span.active:hover:hover,
|
||||
.datepicker table tr td span.active.disabled:hover,
|
||||
.datepicker table tr td span.active.disabled:hover:hover,
|
||||
.datepicker table tr td span.active:active,
|
||||
.datepicker table tr td span.active:hover:active,
|
||||
.datepicker table tr td span.active.disabled:active,
|
||||
.datepicker table tr td span.active.disabled:hover:active,
|
||||
.datepicker table tr td span.active.active,
|
||||
.datepicker table tr td span.active:hover.active,
|
||||
.datepicker table tr td span.active.disabled.active,
|
||||
.datepicker table tr td span.active.disabled:hover.active,
|
||||
.datepicker table tr td span.active.disabled,
|
||||
.datepicker table tr td span.active:hover.disabled,
|
||||
.datepicker table tr td span.active.disabled.disabled,
|
||||
.datepicker table tr td span.active.disabled:hover.disabled,
|
||||
.datepicker table tr td span.active[disabled],
|
||||
.datepicker table tr td span.active:hover[disabled],
|
||||
.datepicker table tr td span.active.disabled[disabled],
|
||||
.datepicker table tr td span.active.disabled:hover[disabled] {
|
||||
background-color: #0044cc;
|
||||
}
|
||||
.datepicker table tr td span.active:active,
|
||||
.datepicker table tr td span.active:hover:active,
|
||||
.datepicker table tr td span.active.disabled:active,
|
||||
.datepicker table tr td span.active.disabled:hover:active,
|
||||
.datepicker table tr td span.active.active,
|
||||
.datepicker table tr td span.active:hover.active,
|
||||
.datepicker table tr td span.active.disabled.active,
|
||||
.datepicker table tr td span.active.disabled:hover.active {
|
||||
background-color: #003399 \9;
|
||||
}
|
||||
.datepicker table tr td span.old,
|
||||
.datepicker table tr td span.new {
|
||||
color: #999999;
|
||||
}
|
||||
.datepicker th.datepicker-switch {
|
||||
width: 145px;
|
||||
}
|
||||
.datepicker thead tr:first-child th,
|
||||
.datepicker tfoot tr th {
|
||||
cursor: pointer;
|
||||
}
|
||||
.datepicker thead tr:first-child th:hover,
|
||||
.datepicker tfoot tr th:hover {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.datepicker .cw {
|
||||
font-size: 10px;
|
||||
width: 12px;
|
||||
padding: 0 2px 0 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.datepicker thead tr:first-child th.cw {
|
||||
cursor: default;
|
||||
background-color: transparent;
|
||||
}
|
||||
.input-append.date .add-on i,
|
||||
.input-prepend.date .add-on i {
|
||||
cursor: pointer;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.input-daterange input {
|
||||
text-align: center;
|
||||
}
|
||||
.input-daterange input:first-child {
|
||||
-webkit-border-radius: 3px 0 0 3px;
|
||||
-moz-border-radius: 3px 0 0 3px;
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
.input-daterange input:last-child {
|
||||
-webkit-border-radius: 0 3px 3px 0;
|
||||
-moz-border-radius: 0 3px 3px 0;
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
.input-daterange .add-on {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
min-width: 16px;
|
||||
height: 20px;
|
||||
padding: 4px 5px;
|
||||
font-weight: normal;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 #ffffff;
|
||||
vertical-align: middle;
|
||||
background-color: #eeeeee;
|
||||
border: 1px solid #ccc;
|
||||
margin-left: -5px;
|
||||
margin-right: -5px;
|
||||
}
|
||||
.datepicker.dropdown-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
float: left;
|
||||
display: none;
|
||||
min-width: 160px;
|
||||
list-style: none;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
*border-right-width: 2px;
|
||||
*border-bottom-width: 2px;
|
||||
color: #333333;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.datepicker.dropdown-menu th,
|
||||
.datepicker.datepicker-inline th,
|
||||
.datepicker.dropdown-menu td,
|
||||
.datepicker.datepicker-inline td {
|
||||
padding: 4px 5px;
|
||||
}
|
@ -364,3 +364,8 @@ div.setupButtons {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.white-readonly {
|
||||
cursor: text !important;
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
BIN
img/ui-bg_flat_0_aaaaaa_40x100.png
Normal file
After Width: | Height: | Size: 212 B |
BIN
img/ui-bg_flat_75_ffffff_40x100.png
Normal file
After Width: | Height: | Size: 208 B |
BIN
img/ui-bg_glass_55_fbf9ee_1x400.png
Normal file
After Width: | Height: | Size: 335 B |
BIN
img/ui-bg_glass_65_ffffff_1x400.png
Normal file
After Width: | Height: | Size: 207 B |
BIN
img/ui-bg_glass_75_dadada_1x400.png
Normal file
After Width: | Height: | Size: 262 B |
BIN
img/ui-bg_glass_75_e6e6e6_1x400.png
Normal file
After Width: | Height: | Size: 262 B |
BIN
img/ui-bg_glass_95_fef1ec_1x400.png
Normal file
After Width: | Height: | Size: 332 B |
BIN
img/ui-bg_highlight-soft_75_cccccc_1x100.png
Normal file
After Width: | Height: | Size: 280 B |
BIN
img/ui-icons_222222_256x240.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
img/ui-icons_2e83ff_256x240.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
img/ui-icons_454545_256x240.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
img/ui-icons_888888_256x240.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
img/ui-icons_cd0a0a_256x240.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
@ -46,6 +46,25 @@ if ($hesk_settings['smtp'])
|
||||
}
|
||||
}
|
||||
|
||||
function hesk_notifyCustomerForVerifyEmail($email_template = 'verify_email', $activationKey)
|
||||
{
|
||||
global $hesk_settings, $ticket;
|
||||
|
||||
if (defined('HESK_DEMO'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Format email subject and message
|
||||
$subject = hesk_getEmailSubject($email_template, $ticket);
|
||||
$message = hesk_getEmailMessage($email_template, $ticket);
|
||||
$activationUrl = $hesk_settings['hesk_url'] . '/verifyemail.php?key=%%ACTIVATIONKEY%%';
|
||||
$message = str_replace('%%VERIFYURL%%', $activationUrl, $message);
|
||||
$message = str_replace('%%ACTIVATIONKEY%%', $activationKey, $message);
|
||||
|
||||
hesk_mail($ticket['email'], $subject, $message);
|
||||
}
|
||||
|
||||
|
||||
function hesk_notifyCustomer($email_template = 'new_ticket')
|
||||
{
|
||||
@ -225,6 +244,9 @@ function hesk_validEmails()
|
||||
// --> Ticket closed
|
||||
'ticket_closed' => $hesklang['ticket_closed'],
|
||||
|
||||
// --> Verify email
|
||||
'verify_email' => $hesklang['verify_email'],
|
||||
|
||||
|
||||
/*** Emails sent to STAFF ***/
|
||||
|
||||
@ -246,6 +268,9 @@ function hesk_validEmails()
|
||||
// --> New note by someone to a ticket assigned to you
|
||||
'new_note' => $hesklang['new_note'],
|
||||
|
||||
// --> Assigned ticket reopened
|
||||
'ticket_reopen_assigned' => $hesklang['ticket_reopen_assigned'],
|
||||
|
||||
);
|
||||
} // END hesk_validEmails()
|
||||
|
||||
|
@ -47,6 +47,7 @@ require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
<?php } else { ?>
|
||||
<link href="<?php echo HESK_PATH; ?>hesk_style_v25.css" type="text/css" rel="stylesheet" />
|
||||
<?php } ?>
|
||||
<link href="<?php echo HESK_PATH; ?>css/datepicker.css" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css" type="text/css" rel="stylesheet" />
|
||||
<?php if ($modsForHesk_settings['rtl']) { ?>
|
||||
@ -60,6 +61,8 @@ require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
<script src="<?php echo HESK_PATH; ?>js/jquery-1.10.2.min.js"></script>
|
||||
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>hesk_javascript_v25.js"></script>
|
||||
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap.min.js"></script>
|
||||
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/modsForHesk-javascript.js"></script>
|
||||
<script language="JavaScript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap-datepicker.js"></script>
|
||||
|
||||
<?php
|
||||
|
||||
@ -163,6 +166,12 @@ if ($modsForHesk_settings['show_icons']) {
|
||||
<li><a href="<?php echo HESK_PATH; ?>knowledgebase.php"><i class="fa fa-book" <?php echo $iconDisplay; ?>></i> <?php echo $hesklang['kb_text'] ?></a></li> <?php } ?>
|
||||
<?php include ('custom/header-custom.inc.php'); ?>
|
||||
</ul>
|
||||
<?php if ($hesk_settings['can_sel_lang']) { ?>
|
||||
<div class="navbar-form navbar-right" role="search" style="margin-right: 20px; min-width: 80px;">
|
||||
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
|
||||
|
@ -47,6 +47,7 @@ require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
<?php } else { ?>
|
||||
<link href="<?php echo HESK_PATH; ?>hesk_style_v25.css" type="text/css" rel="stylesheet" />
|
||||
<?php } ?>
|
||||
<link href="<?php echo HESK_PATH; ?>css/datepicker.css" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css" type="text/css" rel="stylesheet" />
|
||||
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css" type="text/css" rel="stylesheet" />
|
||||
<?php if ($modsForHesk_settings['rtl']) { ?>
|
||||
@ -61,6 +62,7 @@ require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>hesk_javascript_v25.js"></script>
|
||||
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/modsForHesk-javascript.js"></script>
|
||||
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap.min.js"></script>
|
||||
<script language="JavaScript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap-datepicker.js"></script>
|
||||
|
||||
<?php
|
||||
/* Prepare Javascript that browser should load on page load */
|
||||
|
@ -1,36 +1,36 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.5.5 from 5th August 2014
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
* COPYRIGHT AND TRADEMARK NOTICE
|
||||
* Copyright 2005-2013 Klemen Stirn. All Rights Reserved.
|
||||
* HESK is a registered trademark of Klemen Stirn.
|
||||
* Title: Help Desk Software HESK
|
||||
* Version: 2.5.5 from 5th August 2014
|
||||
* Author: Klemen Stirn
|
||||
* Website: http://www.hesk.com
|
||||
********************************************************************************
|
||||
* COPYRIGHT AND TRADEMARK NOTICE
|
||||
* Copyright 2005-2013 Klemen Stirn. All Rights Reserved.
|
||||
* HESK is a registered trademark of Klemen Stirn.
|
||||
|
||||
* The HESK may be used and modified free of charge by anyone
|
||||
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
|
||||
* By using this code you agree to indemnify Klemen Stirn from any
|
||||
* liability that might arise from it's use.
|
||||
* 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.
|
||||
* 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.
|
||||
* 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
|
||||
*******************************************************************************/
|
||||
* Removing any of the copyright notices without purchasing a license
|
||||
* is expressly forbidden. To remove HESK copyright notice you must purchase
|
||||
* a license for this script. For more information on how to obtain
|
||||
* a license please visit the page below:
|
||||
* https://www.hesk.com/buy.php
|
||||
*******************************************************************************/
|
||||
|
||||
/* Check if this is a valid include */
|
||||
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
|
||||
@ -47,22 +47,22 @@ if ( ! isset($status) )
|
||||
|
||||
if ( ! isset($priority) )
|
||||
{
|
||||
$priority = array(
|
||||
0 => 'CRITICAL',
|
||||
1 => 'HIGH',
|
||||
2 => 'MEDIUM',
|
||||
3 => 'LOW',
|
||||
);
|
||||
$priority = array(
|
||||
0 => 'CRITICAL',
|
||||
1 => 'HIGH',
|
||||
2 => 'MEDIUM',
|
||||
3 => 'LOW',
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! isset($what) )
|
||||
{
|
||||
$what = 'trackid';
|
||||
$what = 'trackid';
|
||||
}
|
||||
|
||||
if ( ! isset($date_input) )
|
||||
{
|
||||
$date_input = '';
|
||||
$date_input = '';
|
||||
}
|
||||
|
||||
/* Can view tickets that are unassigned or assigned to others? */
|
||||
@ -73,22 +73,22 @@ $can_view_unassigned = hesk_checkPermission('can_view_unassigned',0);
|
||||
$category_options = '';
|
||||
if ( isset($hesk_settings['categories']) && count($hesk_settings['categories']) )
|
||||
{
|
||||
foreach ($hesk_settings['categories'] as $row['id'] => $row['name'])
|
||||
{
|
||||
$row['name'] = (strlen($row['name']) > 30) ? substr($row['name'],0,30) . '...' : $row['name'];
|
||||
$selected = ($row['id'] == $category) ? 'selected="selected"' : '';
|
||||
$category_options .= '<option value="'.$row['id'].'" '.$selected.'>'.$row['name'].'</option>';
|
||||
}
|
||||
foreach ($hesk_settings['categories'] as $row['id'] => $row['name'])
|
||||
{
|
||||
$row['name'] = (strlen($row['name']) > 30) ? substr($row['name'],0,30) . '...' : $row['name'];
|
||||
$selected = ($row['id'] == $category) ? 'selected="selected"' : '';
|
||||
$category_options .= '<option value="'.$row['id'].'" '.$selected.'>'.$row['name'].'</option>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$res2 = hesk_dbQuery('SELECT `id`, `name` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'categories` WHERE ' . hesk_myCategories('id') . ' ORDER BY `cat_order` ASC');
|
||||
while ($row=hesk_dbFetchAssoc($res2))
|
||||
{
|
||||
$row['name'] = (strlen($row['name']) > 30) ? substr($row['name'],0,30) . '...' : $row['name'];
|
||||
$selected = ($row['id'] == $category) ? 'selected="selected"' : '';
|
||||
$category_options .= '<option value="'.$row['id'].'" '.$selected.'>'.$row['name'].'</option>';
|
||||
}
|
||||
$res2 = hesk_dbQuery('SELECT `id`, `name` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'categories` WHERE ' . hesk_myCategories('id') . ' ORDER BY `cat_order` ASC');
|
||||
while ($row=hesk_dbFetchAssoc($res2))
|
||||
{
|
||||
$row['name'] = (strlen($row['name']) > 30) ? substr($row['name'],0,30) . '...' : $row['name'];
|
||||
$selected = ($row['id'] == $category) ? 'selected="selected"' : '';
|
||||
$category_options .= '<option value="'.$row['id'].'" '.$selected.'>'.$row['name'].'</option>';
|
||||
}
|
||||
}
|
||||
|
||||
$more = empty($_GET['more']) ? 0 : 1;
|
||||
@ -99,211 +99,211 @@ $more2 = empty($_GET['more2']) ? 0 : 1;
|
||||
|
||||
<!-- ** START SHOW TICKET FORM ** -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4><?php echo $hesklang['show_tickets']; ?></h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<form name="showt" action="show_tickets.php" method="get">
|
||||
<table class="table" style="border-top: 0 !important" border="0" cellpadding="3" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style="border-top: 0px" width="20%" class="alignTop"><b><?php echo $hesklang['status']; ?></b>: </td>
|
||||
<td style="border-top: 0px" width="80%">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<?php
|
||||
<div class="panel-heading">
|
||||
<h4><?php echo $hesklang['show_tickets']; ?></h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<form name="showt" action="show_tickets.php" method="get">
|
||||
<table class="table" style="border-top: 0 !important" border="0" cellpadding="3" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td style="border-top: 0px" width="20%" class="alignTop"><b><?php echo $hesklang['status']; ?></b>: </td>
|
||||
<td style="border-top: 0px" width="80%">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<?php
|
||||
$rowCounter = 1;
|
||||
$statusRS = hesk_dbQuery('SELECT `ID`, `ShortNameContentKey`, `TextColor` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses`');
|
||||
while ($row = $statusRS->fetch_assoc())
|
||||
{
|
||||
if ($rowCounter > 3)
|
||||
{
|
||||
echo '</tr><tr>';
|
||||
$rowCounter = 1;
|
||||
$statusRS = hesk_dbQuery('SELECT `ID`, `ShortNameContentKey`, `TextColor` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'statuses`');
|
||||
while ($row = $statusRS->fetch_assoc())
|
||||
{
|
||||
if ($rowCounter > 3)
|
||||
{
|
||||
echo '</tr><tr>';
|
||||
$rowCounter = 1;
|
||||
}
|
||||
echo '<td width=';
|
||||
if ($rowCounter != 3)
|
||||
{
|
||||
echo '"33%"';
|
||||
} else
|
||||
{
|
||||
echo '"34%"';
|
||||
}
|
||||
echo '<label><input type="checkbox" name="s'.$row['ID'].'" value="1"';
|
||||
if (isset($status[$row['ID']])) {echo 'checked="checked"';}
|
||||
echo '/> <span style="font-weight: bold;color: '.$row['TextColor'].';">'.$hesklang[$row['ShortNameContentKey']].'</span></label></td>';
|
||||
}
|
||||
echo '<td width=';
|
||||
if ($rowCounter != 3)
|
||||
{
|
||||
echo '"33%"';
|
||||
} else
|
||||
{
|
||||
echo '"34%"';
|
||||
}
|
||||
echo '<label><input type="checkbox" name="s'.$row['ID'].'" value="1"';
|
||||
if (isset($status[$row['ID']])) {echo 'checked="checked"';}
|
||||
echo '/> <span style="font-weight: bold;color: '.$row['TextColor'].';">'.$hesklang[$row['ShortNameContentKey']].'</span></label></td>';
|
||||
|
||||
$rowCounter++;
|
||||
$rowCounter++;
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="topSubmit" style="display:<?php echo $more ? 'none' : 'block' ; ?>">
|
||||
<br />
|
||||
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['show_tickets']; ?>" />
|
||||
<a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow');Javascript:hesk_toggleLayerDisplay('topSubmit');document.showt.more.value='1';"><?php echo $hesklang['mopt']; ?></a>
|
||||
<br /> <br />
|
||||
</div>
|
||||
|
||||
<div id="divShow" style="display:<?php echo $more ? 'block' : 'none' ; ?>">
|
||||
|
||||
<table class="table table-striped" border="0" cellpadding="3" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="20%" class="borderTop alignTop"><b><?php echo $hesklang['priority']; ?></b>: </td>
|
||||
<td width="80%" class="borderTop alignTop">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="33%"><label><input type="checkbox" name="p0" value="1" <?php if (isset($priority[0])) {echo 'checked="checked"';} ?> /> <span class="critical"><?php echo $hesklang['critical']; ?></span></label></td>
|
||||
<td width="33%"><label><input type="checkbox" name="p2" value="1" <?php if (isset($priority[2])) {echo 'checked="checked"';} ?> /> <span class="medium"><?php echo $hesklang['medium']; ?></span></label></td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%"><label><input type="checkbox" name="p1" value="1" <?php if (isset($priority[1])) {echo 'checked="checked"';} ?> /> <span class="important"><?php echo $hesklang['high']; ?></span></label></td>
|
||||
<td width="33%"><label><input type="checkbox" name="p3" value="1" <?php if (isset($priority[3])) {echo 'checked="checked"';} ?> /> <span class="normal"><?php echo $hesklang['low']; ?></span></label></td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="borderTop alignTop"><b><?php echo $hesklang['show']; ?></b>: </td>
|
||||
<td class="borderTop">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="33%" class="alignTop">
|
||||
<label><input type="checkbox" name="s_my" value="1" <?php if ($s_my[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_my']; ?></label>
|
||||
<?php
|
||||
if ($can_view_unassigned)
|
||||
{
|
||||
?>
|
||||
<br />
|
||||
<label><input type="checkbox" name="s_un" value="1" <?php if ($s_un[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_un']; ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="33%" class="alignTop">
|
||||
<?php
|
||||
if ($can_view_ass_others)
|
||||
{
|
||||
?>
|
||||
<label><input type="checkbox" name="s_ot" value="1" <?php if ($s_ot[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_ot']; ?></label>
|
||||
<br />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<label><input type="checkbox" name="archive" value="1" <?php if ($archive[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['disp_only_archived']; ?></label></td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="topSubmit" style="display:<?php echo $more ? 'none' : 'block' ; ?>">
|
||||
<br />
|
||||
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['show_tickets']; ?>" />
|
||||
<a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow');Javascript:hesk_toggleLayerDisplay('topSubmit');document.showt.more.value='1';"><?php echo $hesklang['mopt']; ?></a>
|
||||
<br /> <br />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<div id="divShow" style="display:<?php echo $more ? 'block' : 'none' ; ?>">
|
||||
<tr>
|
||||
<td class="borderTop alignTop"><b><?php echo $hesklang['sort_by']; ?></b>: </td>
|
||||
<td class="borderTop">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="33%"><label><input type="radio" name="sort" value="priority" <?php if ($sort == 'priority') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['priority']; ?></label></td>
|
||||
<td width="33%"><label><input type="radio" name="sort" value="lastchange" <?php if ($sort == 'lastchange') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['last_update']; ?></label></td>
|
||||
<td width="34%"><label><input type="radio" name="sort" value="name" <?php if ($sort == 'name') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['name']; ?></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%"><label><input type="radio" name="sort" value="subject" <?php if ($sort == 'subject') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['subject']; ?></label></td>
|
||||
<td width="33%"><label><input type="radio" name="sort" value="status" <?php if ($sort == 'status') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['status']; ?></label></td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="table table-striped" border="0" cellpadding="3" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="20%" class="borderTop alignTop"><b><?php echo $hesklang['priority']; ?></b>: </td>
|
||||
<td width="80%" class="borderTop alignTop">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="33%"><label><input type="checkbox" name="p0" value="1" <?php if (isset($priority[0])) {echo 'checked="checked"';} ?> /> <span class="critical"><?php echo $hesklang['critical']; ?></span></label></td>
|
||||
<td width="33%"><label><input type="checkbox" name="p2" value="1" <?php if (isset($priority[2])) {echo 'checked="checked"';} ?> /> <span class="medium"><?php echo $hesklang['medium']; ?></span></label></td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%"><label><input type="checkbox" name="p1" value="1" <?php if (isset($priority[1])) {echo 'checked="checked"';} ?> /> <span class="important"><?php echo $hesklang['high']; ?></span></label></td>
|
||||
<td width="33%"><label><input type="checkbox" name="p3" value="1" <?php if (isset($priority[3])) {echo 'checked="checked"';} ?> /> <span class="normal"><?php echo $hesklang['low']; ?></span></label></td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td class="borderTop alignTop"><b><?php echo $hesklang['gb']; ?></b>: </td>
|
||||
<td class="borderTop">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="33%"><label><input type="radio" name="g" value="" <?php if ( ! $group) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['dg']; ?></label></td>
|
||||
<td width="33%"><?php
|
||||
if ($can_view_unassigned || $can_view_ass_others)
|
||||
{
|
||||
?>
|
||||
<label><input type="radio" name="g" value="owner" <?php if ($group == 'owner') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['owner']; ?></label>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%"><label><input type="radio" name="g" value="category" <?php if ($group == 'category') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['category']; ?></label></td>
|
||||
<td width="33%"><label><input type="radio" name="g" value="priority" <?php if ($group == 'priority') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['priority']; ?></label></td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="borderTop alignMiddle"><b><?php echo $hesklang['category']; ?></b>: </td>
|
||||
<td class="borderTop alignMiddle">
|
||||
<div class="col-md-4" style="padding-left: 0px"><select class="form-control" name="category">
|
||||
<option value="0" ><?php echo $hesklang['any_cat']; ?></option>
|
||||
<?php echo $category_options; ?>
|
||||
</select></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="borderTop"><b><?php echo $hesklang['display']; ?></b>: </td>
|
||||
<td class="borderTop"><div class="col-md-2" style="padding-left: 0px; padding-right:0px"><input type="text" class="form-control" name="limit" value="<?php echo $maxresults; ?>" size="4" /></div><div class="col-md-3" style="line-height: 40px"><?php echo $hesklang['tickets_page']; ?></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="borderTop alignMiddle"><b><?php echo $hesklang['order']; ?></b>: </td>
|
||||
<td class="borderTop alignMiddle">
|
||||
<label><input type="radio" name="asc" value="1" <?php if ($asc) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['ascending']; ?></label>
|
||||
|
|
||||
<label><input type="radio" name="asc" value="0" <?php if (!$asc) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['descending']; ?></label></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="borderTop alignTop"><b><?php echo $hesklang['opt']; ?></b>: </td>
|
||||
<td class="borderTop">
|
||||
|
||||
<label><input type="checkbox" name="cot" value="1" <?php if ($cot) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['cot']; ?></label><br />
|
||||
<label><input type="checkbox" name="def" value="1" /> <?php echo $hesklang['def']; ?></label> (<a href="admin_main.php?reset=1&token=<?php echo hesk_token_echo(0); ?>"><?php echo $hesklang['redv']; ?></a>)
|
||||
|
||||
</td>
|
||||
|
||||
</table>
|
||||
|
||||
<p><input class="btn btn-default" type="submit" value="<?php echo $hesklang['show_tickets']; ?>" />
|
||||
<input type="hidden" name="more" value="<?php echo $more ? 1 : 0 ; ?>" /><a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow');Javascript:hesk_toggleLayerDisplay('topSubmit');document.showt.more.value='0';"><?php echo $hesklang['lopt']; ?></a></p>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="borderTop alignTop"><b><?php echo $hesklang['show']; ?></b>: </td>
|
||||
<td class="borderTop">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="33%" class="alignTop">
|
||||
<label><input type="checkbox" name="s_my" value="1" <?php if ($s_my[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_my']; ?></label>
|
||||
<?php
|
||||
if ($can_view_unassigned)
|
||||
{
|
||||
?>
|
||||
<br />
|
||||
<label><input type="checkbox" name="s_un" value="1" <?php if ($s_un[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_un']; ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td width="33%" class="alignTop">
|
||||
<?php
|
||||
if ($can_view_ass_others)
|
||||
{
|
||||
?>
|
||||
<label><input type="checkbox" name="s_ot" value="1" <?php if ($s_ot[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_ot']; ?></label>
|
||||
<br />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<label><input type="checkbox" name="archive" value="1" <?php if ($archive[1]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['disp_only_archived']; ?></label></td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="borderTop alignTop"><b><?php echo $hesklang['sort_by']; ?></b>: </td>
|
||||
<td class="borderTop">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="33%"><label><input type="radio" name="sort" value="priority" <?php if ($sort == 'priority') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['priority']; ?></label></td>
|
||||
<td width="33%"><label><input type="radio" name="sort" value="lastchange" <?php if ($sort == 'lastchange') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['last_update']; ?></label></td>
|
||||
<td width="34%"><label><input type="radio" name="sort" value="name" <?php if ($sort == 'name') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['name']; ?></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%"><label><input type="radio" name="sort" value="subject" <?php if ($sort == 'subject') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['subject']; ?></label></td>
|
||||
<td width="33%"><label><input type="radio" name="sort" value="status" <?php if ($sort == 'status') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['status']; ?></label></td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="borderTop alignTop"><b><?php echo $hesklang['gb']; ?></b>: </td>
|
||||
<td class="borderTop">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="33%"><label><input type="radio" name="g" value="" <?php if ( ! $group) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['dg']; ?></label></td>
|
||||
<td width="33%"><?php
|
||||
if ($can_view_unassigned || $can_view_ass_others)
|
||||
{
|
||||
?>
|
||||
<label><input type="radio" name="g" value="owner" <?php if ($group == 'owner') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['owner']; ?></label>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%"><label><input type="radio" name="g" value="category" <?php if ($group == 'category') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['category']; ?></label></td>
|
||||
<td width="33%"><label><input type="radio" name="g" value="priority" <?php if ($group == 'priority') {echo 'checked="checked"';} ?> /> <?php echo $hesklang['priority']; ?></label></td>
|
||||
<td width="34%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="borderTop alignMiddle"><b><?php echo $hesklang['category']; ?></b>: </td>
|
||||
<td class="borderTop alignMiddle">
|
||||
<div class="col-md-4" style="padding-left: 0px"><select class="form-control" name="category">
|
||||
<option value="0" ><?php echo $hesklang['any_cat']; ?></option>
|
||||
<?php echo $category_options; ?>
|
||||
</select></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="borderTop"><b><?php echo $hesklang['display']; ?></b>: </td>
|
||||
<td class="borderTop"><div class="col-md-2" style="padding-left: 0px; padding-right:0px"><input type="text" class="form-control" name="limit" value="<?php echo $maxresults; ?>" size="4" /></div><div class="col-md-3" style="line-height: 40px"><?php echo $hesklang['tickets_page']; ?></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="borderTop alignMiddle"><b><?php echo $hesklang['order']; ?></b>: </td>
|
||||
<td class="borderTop alignMiddle">
|
||||
<label><input type="radio" name="asc" value="1" <?php if ($asc) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['ascending']; ?></label>
|
||||
|
|
||||
<label><input type="radio" name="asc" value="0" <?php if (!$asc) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['descending']; ?></label></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="borderTop alignTop"><b><?php echo $hesklang['opt']; ?></b>: </td>
|
||||
<td class="borderTop">
|
||||
|
||||
<label><input type="checkbox" name="cot" value="1" <?php if ($cot) {echo 'checked="checked"';} ?> /> <?php echo $hesklang['cot']; ?></label><br />
|
||||
<label><input type="checkbox" name="def" value="1" /> <?php echo $hesklang['def']; ?></label> (<a href="admin_main.php?reset=1&token=<?php echo hesk_token_echo(0); ?>"><?php echo $hesklang['redv']; ?></a>)
|
||||
|
||||
</td>
|
||||
|
||||
</table>
|
||||
|
||||
<p><input class="btn btn-default" type="submit" value="<?php echo $hesklang['show_tickets']; ?>" />
|
||||
<input type="hidden" name="more" value="<?php echo $more ? 1 : 0 ; ?>" /><a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow');Javascript:hesk_toggleLayerDisplay('topSubmit');document.showt.more.value='0';"><?php echo $hesklang['lopt']; ?></a></p>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ** END SHOW TICKET FORM ** -->
|
||||
@ -311,123 +311,128 @@ $more2 = empty($_GET['more2']) ? 0 : 1;
|
||||
|
||||
<!-- ** START SEARCH TICKETS FORM ** -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4><?php echo $hesklang['find_ticket_by']; ?></h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<div class="panel-heading">
|
||||
<h4><?php echo $hesklang['find_ticket_by']; ?></h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
|
||||
<form class="form-inline" action="find_tickets.php" method="get" name="findby" id="findby">
|
||||
<form class="form-inline" action="find_tickets.php" method="get" name="findby" id="findby">
|
||||
|
||||
<table class="table" style="width: auto" border="0" cellpadding="3" cellspacing="0">
|
||||
<tr>
|
||||
<td class="text-left" style="border-top: 0px">
|
||||
<b style="color: #000"><?php echo $hesklang['s_for']; ?></b><br />
|
||||
<input class="form-control" type="text" name="q" size="30" <?php if (isset($q)) {echo 'value="'.$q.'"';} ?> />
|
||||
</td>
|
||||
<td class="text-left" style="border-top: 0px">
|
||||
<b style="color: #000"><?php echo $hesklang['s_in']; ?></b><br />
|
||||
<select class="form-control" name="what">
|
||||
<option value="trackid" <?php if ($what=='trackid') {echo 'selected="selected"';} ?> ><?php echo $hesklang['trackID']; ?></option>
|
||||
<?php
|
||||
if ($hesk_settings['sequential'])
|
||||
{
|
||||
?>
|
||||
<option value="seqid" <?php if ($what=='seqid') {echo 'selected="selected"';} ?> ><?php echo $hesklang['seqid']; ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<option value="name" <?php if ($what=='name') {echo 'selected="selected"';} ?> ><?php echo $hesklang['name']; ?></option>
|
||||
<option value="email" <?php if ($what=='email') {echo 'selected="selected"';} ?> ><?php echo $hesklang['email']; ?></option>
|
||||
<option value="subject" <?php if ($what=='subject') {echo 'selected="selected"';} ?> ><?php echo $hesklang['subject']; ?></option>
|
||||
<option value="message" <?php if ($what=='message') {echo 'selected="selected"';} ?> ><?php echo $hesklang['message']; ?></option>
|
||||
<?php
|
||||
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||
{
|
||||
$selected = ($what == $k) ? 'selected="selected"' : '';
|
||||
if ($v['use'])
|
||||
{
|
||||
$v['name'] = (strlen($v['name']) > 30) ? substr($v['name'],0,30) . '...' : $v['name'];
|
||||
echo '<option value="'.$k.'" '.$selected.'>'.$v['name'].'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option value="notes" <?php if ($what=='notes') {echo 'selected="selected"';} ?> ><?php echo $hesklang['notes']; ?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table" style="width: auto" border="0" cellpadding="3" cellspacing="0">
|
||||
<tr>
|
||||
<td class="text-left" style="border-top: 0px">
|
||||
<b style="color: #000"><?php echo $hesklang['s_for']; ?></b><br />
|
||||
<input class="form-control" type="text" name="q" size="30" <?php if (isset($q)) {echo 'value="'.$q.'"';} ?> />
|
||||
</td>
|
||||
<td class="text-left" style="border-top: 0px">
|
||||
<b style="color: #000"><?php echo $hesklang['s_in']; ?></b><br />
|
||||
<select class="form-control" name="what">
|
||||
<option value="trackid" <?php if ($what=='trackid') {echo 'selected="selected"';} ?> ><?php echo $hesklang['trackID']; ?></option>
|
||||
<?php
|
||||
if ($hesk_settings['sequential'])
|
||||
{
|
||||
?>
|
||||
<option value="seqid" <?php if ($what=='seqid') {echo 'selected="selected"';} ?> ><?php echo $hesklang['seqid']; ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<option value="name" <?php if ($what=='name') {echo 'selected="selected"';} ?> ><?php echo $hesklang['name']; ?></option>
|
||||
<option value="email" <?php if ($what=='email') {echo 'selected="selected"';} ?> ><?php echo $hesklang['email']; ?></option>
|
||||
<option value="subject" <?php if ($what=='subject') {echo 'selected="selected"';} ?> ><?php echo $hesklang['subject']; ?></option>
|
||||
<option value="message" <?php if ($what=='message') {echo 'selected="selected"';} ?> ><?php echo $hesklang['message']; ?></option>
|
||||
<?php
|
||||
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||
{
|
||||
$selected = ($what == $k) ? 'selected="selected"' : '';
|
||||
if ($v['use'])
|
||||
{
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
<div id="topSubmit2" style="display:<?php echo $more2 ? 'none' : 'block' ; ?>">
|
||||
<br />
|
||||
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['find_ticket']; ?>" />
|
||||
<a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow2');Javascript:hesk_toggleLayerDisplay('topSubmit2');document.findby.more2.value='1';"><?php echo $hesklang['mopt']; ?></a>
|
||||
<br /> <br />
|
||||
</div>
|
||||
$v['name'] = (strlen($v['name']) > 30) ? substr($v['name'],0,30) . '...' : $v['name'];
|
||||
echo '<option value="'.$k.'" '.$selected.'>'.$v['name'].'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option value="notes" <?php if ($what=='notes') {echo 'selected="selected"';} ?> ><?php echo $hesklang['notes']; ?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="divShow2" style="display:<?php echo $more2 ? 'block' : 'none' ; ?>">
|
||||
<div id="topSubmit2" style="display:<?php echo $more2 ? 'none' : 'block' ; ?>">
|
||||
<br />
|
||||
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['find_ticket']; ?>" />
|
||||
<a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow2');Javascript:hesk_toggleLayerDisplay('topSubmit2');document.findby.more2.value='1';"><?php echo $hesklang['mopt']; ?></a>
|
||||
<br /> <br />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div id="divShow2" style="display:<?php echo $more2 ? 'block' : 'none' ; ?>">
|
||||
|
||||
<table class="table table-striped" border="0" cellpadding="3" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="alignMiddle" width="20%"><b><?php echo $hesklang['category']; ?></b>: </td>
|
||||
<td class="alignMiddle" width="80%">
|
||||
<select class="form-control" name="category">
|
||||
<option value="0" ><?php echo $hesklang['any_cat']; ?></option>
|
||||
<?php echo $category_options; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="alignMiddle"><b><?php echo $hesklang['date']; ?></b>: </td>
|
||||
<td class="alignMiddle">
|
||||
<div class="col-md-3" style="padding-left: 0px"><input class="form-control tcal" type="text" name="dt" id="dt" size="10" <?php if ($date_input) {echo 'value="'.$date_input.'"';} ?> /></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="alignTop"><b><?php echo $hesklang['s_incl']; ?></b>: </td>
|
||||
<td>
|
||||
<label><input type="checkbox" name="s_my" value="1" <?php if ($s_my[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_my']; ?></label>
|
||||
<?php
|
||||
if ($can_view_ass_others)
|
||||
{
|
||||
?>
|
||||
<br />
|
||||
<label><input type="checkbox" name="s_ot" value="1" <?php if ($s_ot[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_ot']; ?></label>
|
||||
<?php
|
||||
}
|
||||
<br />
|
||||
|
||||
if ($can_view_unassigned)
|
||||
{
|
||||
?>
|
||||
<br />
|
||||
<label><input type="checkbox" name="s_un" value="1" <?php if ($s_un[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_un']; ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
<label><input type="checkbox" name="archive" value="1" <?php if ($archive[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['disp_only_archived']; ?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><?php echo $hesklang['display']; ?></b>: </td>
|
||||
<td><div class="col-md-2 text-right" style="padding-left: 0px; padding-right: 0px;"><input class="form-control" type="text" name="limit" value="<?php echo $maxresults; ?>" size="4" /></div><div class="col-md-10" style="line-height: 40px"><?php echo $hesklang['results_page']; ?></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table table-striped" border="0" cellpadding="3" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="alignMiddle" width="20%"><b><?php echo $hesklang['category']; ?></b>: </td>
|
||||
<td class="alignMiddle" width="80%">
|
||||
<select class="form-control" name="category">
|
||||
<option value="0" ><?php echo $hesklang['any_cat']; ?></option>
|
||||
<?php echo $category_options; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="alignMiddle"><b><?php echo $hesklang['date']; ?></b>: </td>
|
||||
<td class="alignMiddle">
|
||||
<div class="col-md-3" style="padding-left: 0px"><input class="form-control tcal" type="text" name="dt" id="dt" size="10" <?php if ($date_input) {echo 'value="'.$date_input.'"';} ?> /></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="alignTop"><b><?php echo $hesklang['s_incl']; ?></b>: </td>
|
||||
<td>
|
||||
<label><input type="checkbox" name="s_my" value="1" <?php if ($s_my[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_my']; ?></label>
|
||||
<?php
|
||||
if ($can_view_ass_others)
|
||||
{
|
||||
?>
|
||||
<br />
|
||||
<label><input type="checkbox" name="s_ot" value="1" <?php if ($s_ot[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_ot']; ?></label>
|
||||
<?php
|
||||
}
|
||||
|
||||
<p><input class="btn btn-default" type="submit" value="<?php echo $hesklang['find_ticket']; ?>" />
|
||||
<input type="hidden" name="more2" value="<?php echo $more2 ? 1 : 0 ; ?>" /><a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow2');Javascript:hesk_toggleLayerDisplay('topSubmit2');document.findby.more2.value='0';"><?php echo $hesklang['lopt']; ?></a></p>
|
||||
if ($can_view_unassigned)
|
||||
{
|
||||
?>
|
||||
<br />
|
||||
<label><input type="checkbox" name="s_un" value="1" <?php if ($s_un[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['s_un']; ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
<label><input type="checkbox" name="archive" value="1" <?php if ($archive[2]) echo 'checked="checked"'; ?> /> <?php echo $hesklang['disp_only_archived']; ?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><?php echo $hesklang['display']; ?></b>: </td>
|
||||
<td><div class="col-md-2 text-right" style="padding-left: 0px; padding-right: 0px;"><input class="form-control" type="text" name="limit" value="<?php echo $maxresults; ?>" size="4" /></div><div class="col-md-10" style="line-height: 40px"><?php echo $hesklang['results_page']; ?></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<p><input class="btn btn-default" type="submit" value="<?php echo $hesklang['find_ticket']; ?>" />
|
||||
<input type="hidden" name="more2" value="<?php echo $more2 ? 1 : 0 ; ?>" /><a class="btn btn-default" href="javascript:void(0)" onclick="Javascript:hesk_toggleLayerDisplay('divShow2');Javascript:hesk_toggleLayerDisplay('topSubmit2');document.findby.more2.value='0';"><?php echo $hesklang['lopt']; ?></a></p>
|
||||
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ** END SEARCH TICKETS FORM ** -->
|
||||
|
127
index.php
@ -66,7 +66,7 @@ exit();
|
||||
|
||||
function print_add_ticket()
|
||||
{
|
||||
global $hesk_settings, $hesklang;
|
||||
global $hesk_settings, $hesklang, $modsForHesk_settings;
|
||||
|
||||
// Auto-focus first empty or error field
|
||||
define('AUTOFOCUS', true);
|
||||
@ -106,16 +106,6 @@ function print_add_ticket()
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
|
||||
<div class="panel-body">
|
||||
<?php if ($hesk_settings['can_sel_lang']) { ?>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<label class="control-label" style="margin-top:8px;"><?php echo $hesklang['changeLanguage']; ?></label>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<p><?php echo $hesklang['quick_help_submit_ticket']; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -232,8 +222,14 @@ function print_add_ticket()
|
||||
|
||||
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||
{
|
||||
|
||||
if ($v['use'] && $v['place']==0)
|
||||
{
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
$v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
|
||||
|
||||
if ($v['type'] == 'checkbox')
|
||||
@ -351,6 +347,57 @@ function print_add_ticket()
|
||||
</div>';
|
||||
break;
|
||||
|
||||
case 'multiselect':
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
|
||||
echo '<div class="form-group"><label for="'.$v['name'].'[]" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
|
||||
<div class="col-sm-9"><select class="form-control" id="'.$v['name'].'" name="'.$k.'[]" '.$cls.' multiple>';
|
||||
|
||||
$options = explode('#HESK#',$v['value']);
|
||||
|
||||
foreach ($options as $option)
|
||||
{
|
||||
|
||||
if (strlen($k_value) == 0 || $k_value == $option)
|
||||
{
|
||||
$k_value = $option;
|
||||
$selected = 'selected="selected"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
|
||||
echo '<option '.$selected.'>'.$option.'</option>';
|
||||
}
|
||||
|
||||
echo '</select>
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-default" onclick="selectAll(\''.$v['name'].'\')">Select All</button>
|
||||
<button type="button" class="btn btn-default" onclick="deselectAll(\''.$v['name'].'\')">Deselect All</button>
|
||||
</div>
|
||||
</div></div>';
|
||||
break;
|
||||
|
||||
case 'date':
|
||||
if (strlen($k_value) != 0)
|
||||
{
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' isError ' : '';
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.$v['name'].'" id="'.$v['name'].'" name="'.$k.'" size="40"
|
||||
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
|
||||
<span class="help-block">'.$hesklang['date_format'].'</span>
|
||||
</div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
/* Default text input */
|
||||
default:
|
||||
if (strlen($k_value) != 0)
|
||||
@ -411,12 +458,18 @@ function print_add_ticket()
|
||||
<!-- START CUSTOM AFTER -->
|
||||
<?php
|
||||
|
||||
/* custom fields BEFORE comments */
|
||||
/* custom fields AFTER comments */
|
||||
|
||||
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||
{
|
||||
|
||||
if ($v['use'] && $v['place'])
|
||||
{
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
$v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
|
||||
|
||||
if ($v['type'] == 'checkbox')
|
||||
@ -534,6 +587,56 @@ function print_add_ticket()
|
||||
</div>';
|
||||
break;
|
||||
|
||||
case 'multiselect':
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
|
||||
|
||||
echo '<div class="form-group"><label for="'.$v['name'].'[]" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
|
||||
<div class="col-sm-9"><select class="form-control" id="'.$v['name'].'" name="'.$k.'[]" '.$cls.' multiple>';
|
||||
|
||||
$options = explode('#HESK#',$v['value']);
|
||||
|
||||
foreach ($options as $option)
|
||||
{
|
||||
|
||||
if (strlen($k_value) == 0 || $k_value == $option)
|
||||
{
|
||||
$k_value = $option;
|
||||
$selected = 'selected="selected"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
|
||||
echo '<option '.$selected.'>'.$option.'</option>';
|
||||
}
|
||||
|
||||
echo '</select>
|
||||
<div class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-default" onclick="selectAll(\''.$v['name'].'\')">Select All</button>
|
||||
<button type="button" class="btn btn-default" onclick="deselectAll(\''.$v['name'].'\')">Deselect All</button>
|
||||
</div></div></div>';
|
||||
break;
|
||||
|
||||
case 'date':
|
||||
if (strlen($k_value) != 0)
|
||||
{
|
||||
$v['value'] = $k_value;
|
||||
}
|
||||
|
||||
$cls = in_array($k,$_SESSION['iserror']) ? ' isError ' : '';
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="'.$v['name'].'" class="col-sm-3 control-label">'.$v['name'].': '.$v['req'].'</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="datepicker form-control white-readonly '.$cls.'" placeholder="'.$v['name'].'" id="'.$v['name'].'" name="'.$k.'" size="40"
|
||||
maxlength="'.$v['maxlen'].'" value="'.$v['value'].'" readonly/>
|
||||
<span class="help-block">'.$hesklang['date_format'].'</span>
|
||||
</div>
|
||||
</div>';
|
||||
break;
|
||||
|
||||
/* Default text input */
|
||||
default:
|
||||
if (strlen($k_value) != 0)
|
||||
|
@ -5,7 +5,14 @@ require(HESK_PATH . 'install/install_functions.inc.php');
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
hesk_dbConnect();
|
||||
//-- Need to do this since we are no longer restricted on IDs and we want an INT for proper INNER JOINs
|
||||
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` CHANGE COLUMN `status` `status` INT NOT NULL DEFAULT '0'");
|
||||
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` ADD COLUMN `status_int` INT NOT NULL DEFAULT 0 AFTER `status`");
|
||||
$ticketsRS = hesk_dbQuery("SELECT `id`, `status` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets`");
|
||||
while ($currentResult = $ticketsRS->fetch_assoc())
|
||||
{
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `status_int` = ".$currentResult['status']." WHERE `id` = ".$currentResult['id']);
|
||||
}
|
||||
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` DROP COLUMN `status`");
|
||||
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` CHANGE COLUMN `status_int` `status` INT NOT NULL");
|
||||
|
||||
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (
|
||||
`ID` INT NOT NULL,
|
||||
|
@ -37,7 +37,7 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
|
||||
|
||||
// We will be installing this HESK version:
|
||||
define('HESK_NEW_VERSION','2.5.5');
|
||||
define('MODS_FOR_HESK_NEW_VERSION','1.6.0');
|
||||
define('MODS_FOR_HESK_NEW_VERSION','1.7.0');
|
||||
|
||||
// Other required files and settings
|
||||
define('INSTALL',1);
|
||||
@ -347,35 +347,7 @@ function hesk_iDatabase($problem=0)
|
||||
<p>Summary</p>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
if ($problem == 1)
|
||||
{
|
||||
echo '<br /><br />Double-check all the information below. Contact your hosting company for the correct information to use!<br /><br /><b>MySQL said:</b> '.$mysql_log.'</p>', 'Database connection failed';
|
||||
}
|
||||
elseif ($problem == 2)
|
||||
{
|
||||
echo '<b>Database tables already exist!</b><br /><br />
|
||||
HESK database tables with <b>'.$hesk_settings['db_pfix'].'</b> prefix already exist in this database!<br /><br />
|
||||
To upgrade an existing HESK installation select <a href="index.php">Update existing install</a> instead.<br /><br />
|
||||
To install a new copy of HESK in use a unique table prefix.';
|
||||
}
|
||||
elseif ($problem == 3)
|
||||
{
|
||||
echo '<b>Old database tables not found!</b><br /><br />
|
||||
HESK database tables have not been found in this database!<br /><br />
|
||||
To install HESK use the <a href="index.php">New install</a> option instead.';
|
||||
}
|
||||
elseif ($problem == 4)
|
||||
{
|
||||
echo '<b>Version '.HESK_NEW_VERSION.' tables already exist!</b><br /><br />
|
||||
Your database seems to be compatible with HESK version '.HESK_NEW_VERSION.'<br /><br />
|
||||
To install a new copy of HESK use the <a href="index.php">New install</a> option instead.';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<p style="padding: 10px;">To complete setup HESK needs to connect to your database. You can get this information from your hosting control panel.</p>';
|
||||
}
|
||||
?>
|
||||
<p style="padding: 10px;">To complete setup HESK needs to connect to your database. You can get this information from your hosting control panel.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -384,6 +356,39 @@ function hesk_iDatabase($problem=0)
|
||||
<form role="form" action="<?php echo INSTALL_PAGE; ?>" method="post">
|
||||
<div class="h3">Database Settings</div>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<?php
|
||||
if ($problem == 1)
|
||||
{
|
||||
echo '<div class="alert alert-danger">';
|
||||
echo '<br /><br />Double-check all the information below. Contact your hosting company for the correct information to use!<br /><br /><b>MySQL said:</b> '.$mysql_log.'</p>', 'Database connection failed';
|
||||
echo '</div>';
|
||||
}
|
||||
elseif ($problem == 2)
|
||||
{
|
||||
echo '<div class="alert alert-danger">';
|
||||
echo '<b>Database tables already exist!</b><br /><br />
|
||||
HESK database tables with <b>'.$hesk_settings['db_pfix'].'</b> prefix already exist in this database!<br /><br />
|
||||
To upgrade an existing HESK installation select <a href="index.php">Update existing install</a> instead.<br /><br />
|
||||
To install a new copy of HESK in use a unique table prefix.';
|
||||
echo '</div>';
|
||||
}
|
||||
elseif ($problem == 3)
|
||||
{
|
||||
echo '<div class="alert alert-danger">';
|
||||
echo '<b>Old database tables not found!</b><br /><br />
|
||||
HESK database tables have not been found in this database!<br /><br />
|
||||
To install HESK use the <a href="index.php">New install</a> option instead.';
|
||||
echo '</div>';
|
||||
}
|
||||
elseif ($problem == 4)
|
||||
{
|
||||
echo '<div class="alert alert-danger">';
|
||||
echo '<b>Version '.HESK_NEW_VERSION.' tables already exist!</b><br /><br />
|
||||
Your database seems to be compatible with HESK version '.HESK_NEW_VERSION.'<br /><br />
|
||||
To install a new copy of HESK use the <a href="index.php">New install</a> option instead.';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="host">Database Host</label>
|
||||
|
@ -6,12 +6,13 @@ require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Mods For HESK 1.6.0 Install / Upgrade</title>
|
||||
<title>Mods For HESK 1.7.0 Install / Upgrade</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Mods for HESK 1.6.0 Install / Upgrade</h1>
|
||||
<h1>Mods for HESK 1.7.0 Install / Upgrade</h1>
|
||||
<h3>Select your current Mods for HESK version number to upgrade.</h3>
|
||||
<ul style="list-style-type: none">
|
||||
<li><a href="updateTo1-7-0.php">v1.6.1</a></li>
|
||||
<li><a href="updateTo1-6-1.php">v1.6.0</a></li>
|
||||
<li><a href="updateTo1-6-0.php">v1.5.0</a></li>
|
||||
<li><a href="updateTo1-5-0.php">v1.4.1</a></li>
|
||||
@ -19,7 +20,7 @@ require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
<li><a href="updateTo1-4-1.php">v1.2.4 or v1.3.0</a></li>
|
||||
<li><a href="freshInstall.php">No previous version</a> (make sure you have installed/updated HESK first; otherwise installation will <b>fail</b>!)</li>
|
||||
</ul>
|
||||
<p>Please verify the database information below. Additionally, ensure that the database user has CREATE and ALTER permissions.</p>
|
||||
<p>Please verify the database information below. Additionally, ensure that the database user has <b>CREATE</b> and <b>ALTER</b> permissions.</p>
|
||||
<p><b>Database Host: </b> <?php echo $hesk_settings['db_host']; ?></p>
|
||||
<p><b>Database Name: </b><?php echo $hesk_settings['db_name']; ?></p>
|
||||
<p><b>Database User: </b><?php echo $hesk_settings['db_user']; ?></p>
|
||||
|
@ -13,4 +13,4 @@ hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."attachmen
|
||||
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` (`Key` NVARCHAR(200) NOT NULL, `Value` NVARCHAR(200) NOT NULL)");
|
||||
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` (`Key`, `Value`) VALUES ('modsForHeskVersion', '1.6.0')");
|
||||
|
||||
header('Location: update-to1-6-1.php');
|
||||
header('Location: updateTo1-6-1.php');
|
@ -5,7 +5,5 @@ require(HESK_PATH . 'install/install_functions.inc.php');
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
hesk_dbConnect();
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '1.6.1' WHERE `Key` = 'modsForHeskVersion'");
|
||||
?>
|
||||
|
||||
<h1>Installation / Update complete!</h1>
|
||||
<p>Please delete the <b>install</b> folder for security reasons, and then proceed back to the <a href="../">Help Desk</a></p>
|
||||
header('Location: updateTo1-7-0.php');
|
105
install/updateTo1-7-0.php
Normal file
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
define('IN_SCRIPT',1);
|
||||
define('HESK_PATH','../');
|
||||
require(HESK_PATH . 'install/install_functions.inc.php');
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
|
||||
$updateSuccess = true;
|
||||
|
||||
hesk_dbConnect();
|
||||
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."verified_emails` (`Email` VARCHAR(255) NOT NULL)");
|
||||
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails` (`Email` VARCHAR(255) NOT NULL, `ActivationKey` VARCHAR(500) NOT NULL)");
|
||||
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`trackid` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
||||
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
||||
`category` smallint(5) unsigned NOT NULL DEFAULT '1',
|
||||
`priority` enum('0','1','2','3') COLLATE utf8_unicode_ci NOT NULL DEFAULT '3',
|
||||
`subject` varchar(70) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
||||
`message` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`dt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`lastchange` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`ip` varchar(46) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
||||
`language` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`status` int(11) NOT NULL DEFAULT '0',
|
||||
`owner` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`time_worked` time NOT NULL DEFAULT '00:00:00',
|
||||
`lastreplier` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
|
||||
`replierid` smallint(5) unsigned DEFAULT NULL,
|
||||
`archive` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
|
||||
`locked` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
|
||||
`attachments` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`merged` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`history` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom1` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom2` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom3` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom4` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom5` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom6` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom7` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom8` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom9` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom10` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom11` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom12` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom13` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom14` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom15` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom16` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom17` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom18` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom19` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`custom20` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`parent` mediumint(8) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `trackid` (`trackid`),
|
||||
KEY `archive` (`archive`),
|
||||
KEY `categories` (`category`),
|
||||
KEY `statuses` (`status`),
|
||||
KEY `owner` (`owner`)
|
||||
)");
|
||||
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '1.7.0' WHERE `Key` = 'modsForHeskVersion'");
|
||||
|
||||
//-- Add the new custom field property to modsForHesk_settings.inc.php
|
||||
$file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
|
||||
//-- Only add the additional settings if they aren't already there.
|
||||
if (strpos($file, 'custom_field_setting') !== true)
|
||||
{
|
||||
$file .= '
|
||||
|
||||
//-- Set this to 1 to enable custom field names as keys
|
||||
$modsForHesk_settings[\'custom_field_setting\'] = 0;
|
||||
|
||||
//-- Set this to 1 to enable email verification for new customers
|
||||
$modsForHesk_settings[\'customer_email_verification_required\'] = 0;';
|
||||
}
|
||||
|
||||
if (!file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file))
|
||||
{
|
||||
$updateSuccess = false;
|
||||
echo '<h1>Failure!</h1>
|
||||
<p>An issue occurred when trying to update the modsForHesk_settings.inc.php file.</p>
|
||||
<br>
|
||||
<p>Add the following lines to your modsForHesk_settings.inc.php file:</p>
|
||||
<br>
|
||||
<code>//-- Set this to 1 to enable custom field names as keys
|
||||
$modsForHesk_settings[\'custom_field_setting\'] = 0;</code><br><br>
|
||||
|
||||
<code>//-- Set this to 1 to enable email verification for new customers
|
||||
$modsForHesk_settings[\'customer_email_verification_required\'] = 0;</code>
|
||||
|
||||
<br><br>
|
||||
<p>Now you can delete the <b>install</b> folder for security reasons, and then proceed back to the <a href="../">Help Desk</a></p>';
|
||||
|
||||
}
|
||||
|
||||
if ($updateSuccess) {
|
||||
?>
|
||||
|
||||
<h1>Installation / Update complete!</h1>
|
||||
<p>Please delete the <b>install</b> folder for security reasons, and then proceed back to the <a href="../">Help Desk</a></p>
|
||||
|
||||
<?php } ?>
|
1681
js/bootstrap-datepicker.js
vendored
Executable file
@ -4,12 +4,39 @@ var loadJquery = function()
|
||||
//-- Activate tooltips
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
//-- Active popovers
|
||||
//-- Activate popovers
|
||||
$('[data-toggle="popover"]').popover({
|
||||
trigger: 'hover'
|
||||
})
|
||||
trigger: 'hover',
|
||||
container: 'body'
|
||||
});
|
||||
|
||||
//-- Activate HTML popovers
|
||||
$('[data-toggle="htmlpopover"]').popover({
|
||||
trigger: 'hover',
|
||||
container: 'body',
|
||||
html: 'true'
|
||||
});
|
||||
|
||||
//-- Activate jQuery's date picker
|
||||
$(function() {
|
||||
$('.datepicker').datepicker({
|
||||
todayBtn: "linked",
|
||||
clearBtn: true,
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format: "yyyy-mm-dd"
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
function selectAll(id) {
|
||||
$('#' + id + ' option').prop('selected', true);
|
||||
}
|
||||
|
||||
function deselectAll(id) {
|
||||
$('#' + id + ' option').prop('selected', false);
|
||||
}
|
||||
|
||||
function toggleRow(id) {
|
||||
if ($('#' + id).hasClass('danger'))
|
||||
{
|
||||
|
16
language/en/emails/ticket_reopen_assigned.txt
Normal file
@ -0,0 +1,16 @@
|
||||
Hello,
|
||||
|
||||
A support ticket assigned to you has been re-opened.
|
||||
|
||||
%%NAME%% has just re-opened the ticket "%%SUBJECT%%".
|
||||
|
||||
Tracking ID: %%TRACK_ID%%
|
||||
|
||||
You can manage this ticket here:
|
||||
%%TRACK_URL%%
|
||||
|
||||
|
||||
Regards,
|
||||
|
||||
%%SITE_TITLE%%
|
||||
%%SITE_URL%%
|
10
language/en/emails/verify_email.txt
Normal file
@ -0,0 +1,10 @@
|
||||
Dear %%NAME%%,
|
||||
|
||||
Your email needs to be verified before your ticket can be submitted. Please click the link below to verify your email.
|
||||
|
||||
%%VERIFYURL%%
|
||||
|
||||
Sincerely,
|
||||
|
||||
%%SITE_TITLE%%
|
||||
%%SITE_URL%%
|
@ -21,6 +21,34 @@ $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 1.7.0
|
||||
$hesklang['date_custom_field'] = 'Date';
|
||||
$hesklang['date_custom_field_text'] = 'No options for this custom field type.';
|
||||
$hesklang['multiple_select_custom_field'] = 'Multiple Select box';
|
||||
$hesklang['multiple_select_custom_field_text'] = 'Options for this multi-select box, enter one option per line (each line will be a choice your customers can choose from). You need to enter at least two options!';
|
||||
$hesklang['date_format'] = 'Date must be in YYYY-MM-DD format.';
|
||||
$hesklang['custom_field_setting'] = 'Multilanguage support';
|
||||
$hesklang['custom_field_setting_help'] = 'Enabling this setting will use the name of the custom field as the language
|
||||
file\'s key, rather than the direct name itself. This allows the custom field to be translated into different languages.';
|
||||
$hesklang['enable_custom_field_language'] = 'Enable multilanguage support';
|
||||
$hesklang['custom_language_key'] = 'Field language file key';
|
||||
$hesklang['ticket_reopen_assigned'] = '[#%%TRACK_ID%%] Assigned ticket reopened';
|
||||
$hesklang['verify_email'] = 'Verify Email';
|
||||
$hesklang['email_verified'] = 'The email address <b>%s</b> has been verified. Additionally, the following tickets have been created:'; //%s: email address
|
||||
$hesklang['verify_no_records'] = 'No records were found for this activation key. Has this activation key already been used?';
|
||||
$hesklang['activation_key'] = 'Activation Key';
|
||||
$hesklang['no_tickets_created'] = 'No tickets created';
|
||||
$hesklang['customer_email_verification'] = 'Customer Email Verifications';
|
||||
$hesklang['customer_email_verification_help'] = 'Require customers to verify their email address via email. Once their
|
||||
address has been verified, it does not need to be re-verified in the future. <br><br> <b>NOTE:</b> Enabling this will disable the
|
||||
ability for the customer to provide multiple emails, as HESK will be unable to determine which email needs to be verified.';
|
||||
$hesklang['require_customer_validate_email'] = 'Require customers to verify email';
|
||||
$hesklang['multi_eml_disabled'] = 'This feature has been disabled because this help desk has been configured to require
|
||||
customers to verify their email address';
|
||||
$hesklang['feature_disabled'] = 'Feature Disabled';
|
||||
$hesklang['verify_your_email'] = 'Your ticket has been created; however your email needs to be verified before your ticket can be addressed. An email has been sent to the email provided for verification.';
|
||||
$hesklang['installation_information'] = 'Installation Information';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods For HESK 1.6.0
|
||||
$hesklang['ticket_closed'] = '[#%%TRACK_ID%%] Ticket closed/resolved';
|
||||
$hesklang['ticket_reopen'] = '[#%%TRACK_ID%%] Ticket reopened';
|
||||
|
@ -17,4 +17,10 @@ $modsForHesk_settings['questionMarkColor'] = '#000000';
|
||||
$modsForHesk_settings['rtl'] = 0;
|
||||
|
||||
//-- Set this to 1 to show icons next to navigation menu items
|
||||
$modsForHesk_settings['show_icons'] = 0;
|
||||
$modsForHesk_settings['show_icons'] = 0;
|
||||
|
||||
//-- Set this to 1 to enable custom field names as keys
|
||||
$modsForHesk_settings['custom_field_setting'] = 0;
|
||||
|
||||
//-- Set this to 1 to enable email verification for new customers
|
||||
$modsForHesk_settings['customer_email_verification_required'] = 0;$modsForHesk_settings['show_icons'] = 0;
|
@ -206,8 +206,13 @@ $num_cols = 0;
|
||||
echo '<tr>';
|
||||
foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||
{
|
||||
if ($v['use'])
|
||||
if ($v['use'])
|
||||
{
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
if ($num_cols == 3)
|
||||
{
|
||||
echo '</tr><tr>';
|
||||
|
@ -37,6 +37,7 @@ define('HESK_PATH','./');
|
||||
|
||||
// Get all the required files and functions
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
hesk_load_database_functions();
|
||||
require(HESK_PATH . 'inc/email_functions.inc.php');
|
||||
@ -207,7 +208,12 @@ foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||
{
|
||||
if ($v['use'])
|
||||
{
|
||||
if ($v['type'] == 'checkbox')
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
if ($v['type'] == 'checkbox' || $v['type'] == 'multiselect')
|
||||
{
|
||||
$tmpvar[$k]='';
|
||||
|
||||
@ -238,10 +244,21 @@ foreach ($hesk_settings['custom_fields'] as $k=>$v)
|
||||
{
|
||||
$hesk_error_buffer[$k]=$hesklang['fill_all'].': '.$v['name'];
|
||||
}
|
||||
|
||||
if ($v['type'] == 'date')
|
||||
{
|
||||
$tmpvar[$k] = strtotime($_POST[$k]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmpvar[$k]=hesk_makeURL(nl2br(hesk_input( hesk_POST($k) )));
|
||||
if ($v['type'] == 'date' && $_POST[$k] != '')
|
||||
{
|
||||
$tmpvar[$k] = strtotime($_POST[$k]);
|
||||
} else
|
||||
{
|
||||
$tmpvar[$k] = hesk_makeURL(nl2br(hesk_input(hesk_POST($k))));
|
||||
}
|
||||
}
|
||||
$_SESSION["c_$k"]=hesk_POST($k);
|
||||
}
|
||||
@ -344,22 +361,49 @@ if ($hesk_settings['attachments']['use'] && ! empty($attachments) )
|
||||
}
|
||||
}
|
||||
|
||||
// Insert ticket to database
|
||||
$ticket = hesk_newTicket($tmpvar);
|
||||
|
||||
// Notify the customer
|
||||
hesk_notifyCustomer();
|
||||
|
||||
// Need to notify staff?
|
||||
// --> From autoassign?
|
||||
if ($tmpvar['owner'] && $autoassign_owner['notify_assigned'])
|
||||
// Should the helpdesk validate emails?
|
||||
$createTicket = true;
|
||||
if ($modsForHesk_settings['customer_email_verification_required'])
|
||||
{
|
||||
hesk_notifyAssignedStaff($autoassign_owner, 'ticket_assigned_to_you');
|
||||
$verifiedEmailSql = "SELECT `Email` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."verified_emails` WHERE `Email` = '".hesk_dbEscape($tmpvar['email'])."'";
|
||||
$verifiedEmailRS = hesk_dbQuery($verifiedEmailSql);
|
||||
if ($verifiedEmailRS->num_rows == 0)
|
||||
{
|
||||
//-- email has not yet been verified.
|
||||
$ticket = hesk_newTicket($tmpvar, false);
|
||||
|
||||
//-- generate the activation key, which is a hash of their email address along with the current time.
|
||||
$unhashedKey = $tmpvar['email'].time();
|
||||
$key = hash('sha512', $unhashedKey);
|
||||
|
||||
$escapedEmail = hesk_dbEscape($tmpvar['email']);
|
||||
$escapedKey = hesk_dbEscape($key);
|
||||
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails` (`Email`, `ActivationKey`)
|
||||
VALUES ('".$escapedEmail."', '".$escapedKey."')");
|
||||
|
||||
hesk_notifyCustomerForVerifyEmail('verify_email', $key);
|
||||
$createTicket = false;
|
||||
}
|
||||
}
|
||||
// --> No autoassign, find and notify appropriate staff
|
||||
elseif ( ! $tmpvar['owner'] )
|
||||
if ($createTicket)
|
||||
{
|
||||
hesk_notifyStaff('new_ticket_staff', " `notify_new_unassigned` = '1' ");
|
||||
//-- email has been verified, and a ticket can be created
|
||||
$ticket = hesk_newTicket($tmpvar);
|
||||
|
||||
// Notify the customer
|
||||
hesk_notifyCustomer();
|
||||
|
||||
// Need to notify staff?
|
||||
// --> From autoassign?
|
||||
if ($tmpvar['owner'] && $autoassign_owner['notify_assigned'])
|
||||
{
|
||||
hesk_notifyAssignedStaff($autoassign_owner, 'ticket_assigned_to_you');
|
||||
}
|
||||
// --> No autoassign, find and notify appropriate staff
|
||||
elseif ( ! $tmpvar['owner'] )
|
||||
{
|
||||
hesk_notifyStaff('new_ticket_staff', " `notify_new_unassigned` = '1' ");
|
||||
}
|
||||
}
|
||||
|
||||
// Next ticket show suggested articles again
|
||||
@ -395,14 +439,19 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
||||
|
||||
<div style="width: 80%; margin-left: auto; margin-right: auto;">
|
||||
<?php
|
||||
// Show success message with link to ticket
|
||||
hesk_show_success(
|
||||
if ($createTicket) {
|
||||
// Show success message with link to ticket
|
||||
hesk_show_success(
|
||||
|
||||
$hesklang['ticket_submitted'] . '<br /><br />' .
|
||||
$hesklang['ticket_submitted_success'] . ': <b>' . $ticket['trackid'] . '</b><br /><br />
|
||||
$hesklang['ticket_submitted'] . '<br /><br />' .
|
||||
$hesklang['ticket_submitted_success'] . ': <b>' . $ticket['trackid'] . '</b><br /><br />
|
||||
<a href="' . $hesk_settings['hesk_url'] . '/ticket.php?track=' . $ticket['trackid'] . '">' . $hesklang['view_your_ticket'] . '</a>'
|
||||
|
||||
);
|
||||
);
|
||||
} else
|
||||
{
|
||||
hesk_show_notice($hesklang['verify_your_email'].'<br><br>'.$hesklang['check_spambox']);
|
||||
}
|
||||
|
||||
// Any other messages to display?
|
||||
hesk_handle_messages();
|
||||
|
44
ticket.php
@ -212,16 +212,6 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?php echo $hesklang['quick_help']; ?></div>
|
||||
<div class="panel-body">
|
||||
<?php if ($hesk_settings['can_sel_lang']) { ?>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<label class="control-label" style="margin-top:8px;"><?php echo $hesklang['changeLanguage']; ?></label>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<p><?php echo $hesklang['quick_help_ticket']; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -340,8 +330,21 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
||||
{
|
||||
if ($v['use'] && $v['place']==0)
|
||||
{
|
||||
echo '
|
||||
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
echo '<p>'.$v['name'].': ';
|
||||
if ($v['type'] == 'date' && !empty($ticket[$k]))
|
||||
{
|
||||
$dt = date('Y-m-d h:i:s', $ticket[$k]);
|
||||
echo hesk_dateToString($dt, 0);
|
||||
} else
|
||||
{
|
||||
echo $ticket[$k];
|
||||
}
|
||||
echo '</p>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -358,8 +361,21 @@ require_once(HESK_PATH . 'inc/header.inc.php');
|
||||
{
|
||||
if ($v['use'] && $v['place'])
|
||||
{
|
||||
echo '
|
||||
<p>'.$v['name'].': '.$ticket[$k].'</p>';
|
||||
if ($modsForHesk_settings['custom_field_setting'])
|
||||
{
|
||||
$v['name'] = $hesklang[$v['name']];
|
||||
}
|
||||
|
||||
echo '<p>'.$v['name'].': ';
|
||||
if ($v['type'] == 'date' && !empty($ticket[$k]))
|
||||
{
|
||||
$dt = date('Y-m-d h:i:s', $ticket[$k]);
|
||||
echo hesk_dateToString($dt, 0);
|
||||
} else
|
||||
{
|
||||
echo $ticket[$k];
|
||||
}
|
||||
echo '</p>';
|
||||
}
|
||||
}
|
||||
/* Attachments */
|
||||
|
128
verifyemail.php
Normal file
@ -0,0 +1,128 @@
|
||||
<?php
|
||||
define('IN_SCRIPT',1);
|
||||
define('HESK_PATH','./');
|
||||
|
||||
// Get all the required files and functions
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
hesk_load_database_functions();
|
||||
require(HESK_PATH . 'inc/posting_functions.inc.php');
|
||||
require(HESK_PATH . 'inc/email_functions.inc.php');
|
||||
require_once(HESK_PATH . 'inc/header.inc.php');
|
||||
?>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo $hesk_settings['site_url']; ?>"><?php echo $hesk_settings['site_title']; ?></a></li>
|
||||
<li><a href="<?php echo $hesk_settings['hesk_url']; ?>"><?php echo $hesk_settings['hesk_title']; ?></a></li>
|
||||
<li class="active"><?php echo $hesklang['verify_email']; ?></li>
|
||||
</ol>
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2 col-sm-12">
|
||||
<h3><?php echo $hesklang['verify_email']; ?></h3>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
|
||||
<?php
|
||||
$showForm = true;
|
||||
|
||||
if (isset($_GET['key']) || isset($_POST['key']))
|
||||
{
|
||||
|
||||
$key = isset($_GET['key'])
|
||||
? $_GET['key']
|
||||
: $_POST['key'];
|
||||
|
||||
$submittedTickets = array();
|
||||
$email = '';
|
||||
hesk_dbConnect();
|
||||
$getRs = hesk_dbQuery("SELECT `Email` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails`
|
||||
WHERE `ActivationKey` = '".hesk_dbEscape($key)."'");
|
||||
while ($result = $getRs->fetch_assoc())
|
||||
{
|
||||
$email = $result['Email'];
|
||||
$ticketRs = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets`
|
||||
WHERE `email` = '".hesk_dbEscape($result['Email'])."'");
|
||||
while ($innerResult = $ticketRs->fetch_assoc())
|
||||
{
|
||||
$ticket = hesk_newTicket($innerResult);
|
||||
// Notify the customer
|
||||
hesk_notifyCustomer();
|
||||
|
||||
// Need to notify staff?
|
||||
// --> From autoassign?
|
||||
$getOwnerRs = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE ID = ".hesk_dbEscape($ticket['owner']));
|
||||
$autoassign_owner = $getOwnerRs->fetch_assoc();
|
||||
if ($ticket['owner'] && $autoassign_owner['notify_assigned'])
|
||||
{
|
||||
hesk_notifyAssignedStaff($autoassign_owner, 'ticket_assigned_to_you');
|
||||
}
|
||||
// --> No autoassign, find and notify appropriate staff
|
||||
elseif ( ! $ticket['owner'] )
|
||||
{
|
||||
hesk_notifyStaff('new_ticket_staff', " `notify_new_unassigned` = '1' ");
|
||||
}
|
||||
|
||||
array_push($submittedTickets, $innerResult['trackid']);
|
||||
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."stage_tickets`
|
||||
WHERE `id` = ".$innerResult['id']);
|
||||
}
|
||||
|
||||
//Add email address to the verified emails table
|
||||
hesk_dbQuery('INSERT INTO `'.hesk_dbEscape($hesk_settings['db_pfix']).'verified_emails` (`Email`) VALUES (\''.hesk_dbEscape($email).'\')');
|
||||
}
|
||||
hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails`
|
||||
WHERE `ActivationKey` = '".hesk_dbEscape($key)."'");
|
||||
|
||||
//-- was there an email recorded for the key?
|
||||
if (!empty($email))
|
||||
{
|
||||
$showForm = false;
|
||||
?>
|
||||
<div class="alert alert-success">
|
||||
<p><i class="fa fa-check"></i> <?php echo sprintf($hesklang['email_verified'], $email) ?></p>
|
||||
<ul>
|
||||
<?php
|
||||
foreach ($submittedTickets as $ticket)
|
||||
{
|
||||
echo '<li><a href="'.$hesk_settings['hesk_url'].'/ticket.php?track='.$ticket.'">'.$ticket.'</a></li>';
|
||||
}
|
||||
if (count($submittedTickets) == 0)
|
||||
{
|
||||
echo '<li>'.$hesklang['no_tickets_created'].'</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
} else
|
||||
{
|
||||
//-- no tickets were activated. invalid key, or was email already activated??
|
||||
?>
|
||||
<div class="alert alert-warning">
|
||||
<p><i class="fa fa-exclamation-triangle"></i> <?php echo $hesklang['verify_no_records']; ?></p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if ($showForm) {
|
||||
?>
|
||||
<form class="form-horizontal" action="verifyemail.php" method="post">
|
||||
<div class="form-group">
|
||||
<label for="key" class="col-sm-3 control-label"><?php echo $hesklang['activation_key']; ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="key" name="key" placeholder="<?php echo $hesklang['activation_key']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-9 col-sm-offset-3">
|
||||
<input type="submit" class="btn btn-default" value="<?php echo $hesklang['verify_email']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
require_once(HESK_PATH . 'inc/footer.inc.php');
|
||||
?>
|