This page lists files in the current directory. You can view content, get download/execute commands for Wget, Curl, or PowerShell, or filter the list using wildcards (e.g., `*.sh`).
wget 'https://lists2.roe3.org/hesk/theme/hesk3/customer/error.php'
<?php
global $hesk_settings, $hesklang;
/**
* @var string $error
* @var boolean $showDebugWarning
* @var string $breadcrumbLink
*/
// This guard is used to ensure that users can't hit this outside of actual HESK code
if (!defined('IN_SCRIPT')) {
die();
}
define('EXTRA_PAGE_CLASSES','page-error');
define('RENDER_COMMON_ELEMENTS',1);
define('IGNORE_NAVBAR_RENDER',1);
define('IGNORE_LOAD_JQUERY',1);
define('IGNORE_LOAD_HESK_FUNC',1);
define('IGNORE_LOAD_SVG4',1);
define('IGNORE_LOAD_SELECTIZE',1);
define('IGNORE_LOAD_APP',1);
global $BREADCRUMBS;
$BREADCRUMBS = array(
array('url' => $hesk_settings['site_url'], 'title' => $hesk_settings['site_title']),
array('url' => $breadcrumbLink, 'title' => $hesk_settings['hesk_title']),
array('title' => $hesklang['error'])
);
/* Print header */
require_once(TEMPLATE_PATH . 'customer/inc/header.inc.php');
?>
<div class="main__content">
<div class="contr">
<div class="main__content notice-flash">
<div role="alert" class="notification red">
<b><?php echo $hesklang['error']; ?>:</b> <?php echo $error; ?>
<?php if ($showDebugWarning): ?>
<p class="text-danger text-bold" style="margin-top:10px"> <br><?php echo $hesklang['warn']; ?></p>
<?php echo $hesklang['dmod']; ?>
<?php endif; ?>
<p class="text-center">
<br>
<a class="link" href="javascript:history.go(-1)"><?php echo $hesklang['back']; ?></a>
</p>
</div>
</div>
</div>
</div>
<?php
/* Print Footer */
require_once(TEMPLATE_PATH . 'customer/inc/footer.inc.php');
?>
wget 'https://lists2.roe3.org/hesk/theme/hesk3/customer/maintenance.php'
<?php
global $hesk_settings, $hesklang;
/**
* @var boolean $heskInstalled
*/
// This guard is used to ensure that users can't hit this outside of actual HESK code
if (!defined('IN_SCRIPT')) {
die();
}
define('EXTRA_PAGE_CLASSES','page-maintenance');
define('RENDER_COMMON_ELEMENTS',1);
define('IGNORE_NAVBAR_RENDER',1);
define('IGNORE_LOAD_JQUERY',1);
define('IGNORE_LOAD_HESK_FUNC',1);
define('IGNORE_LOAD_SVG4',1);
define('IGNORE_LOAD_SELECTIZE',1);
define('IGNORE_LOAD_APP',1);
/* Print header */
require_once(TEMPLATE_PATH . 'customer/inc/header.inc.php');
?>
<div class="main__content">
<div class="contr">
<div class="main__content notice-flash">
<div role="alert" class="notification orange">
<p><b><?php echo $heskInstalled ? $hesklang['hni1'] : $hesklang['mm1']; ?></b></p>
<p><?php echo $heskInstalled ? $hesklang['hni2'] : $hesklang['mm2']; ?></p>
<p><?php echo $heskInstalled ? $hesklang['hni3'] : $hesklang['mm3']; ?></p>
</div>
</div>
</div>
</div>
<?php
/* Print Footer */
require_once(TEMPLATE_PATH . 'customer/inc/footer.inc.php');
?>
wget 'https://lists2.roe3.org/hesk/theme/hesk3/customer/my-tickets.php'
<?php
global $hesk_settings, $hesklang;
/**
* @var array $customerUserContext - User info for the customer.
* @var array $tickets - Page of tickets to be displayed
* @var array $ticketCounts - Count of open and closed tickets. Array indices:
* open - Number of open tickets in search results
* closed - Number of closed tickets in search results
* @var array $admins - List of staff members
* @var string $searchCriteria - Search criteria the user entered. Empty string if no search was performed.
* @var string $searchType - Search type (trackid, subject, message) from the user. Empty string if no search was performed.
* @var string $status - Ticket status to filter down by. Either 'ALL' (open and closed), 'OPEN', or 'CLOSED'. Default: 'ALL'
* @var array $ordering - Column and direction ticket results are sorted by.
* orderBy - The column tickets are currently ordered by
* orderDirection - Direction results are ordered (asc or desc)
* @var array $paging - Array of paging-related details. Can be used to build a proper pager component.
* pageNumber - Current page number of results
* pageSize - The requested page size
*/
// This guard is used to ensure that users can't hit this outside of actual HESK code
if (!defined('IN_SCRIPT')) {
die();
}
define('EXTRA_PAGE_CLASSES','page-my-tickets');
define('ALERTS',1);
define('MY_TICKETS_SEARCH',1);
define('PAGER',1);
define('RENDER_COMMON_ELEMENTS',1);
define('OUTPUT_SEARCH_JAVASCRIPT',1);
$totalCount = $ticketCounts['open'] + $ticketCounts['closed'];
$totalNumberOfPages = intval($totalCount / $paging['pageSize']);
if ($totalCount % $paging['pageSize'] !== 0) {
$totalNumberOfPages++;
}
global $BREADCRUMBS;
$BREADCRUMBS = array(
array('url' => $hesk_settings['site_url'], 'title' => $hesk_settings['site_title']),
array('url' => $hesk_settings['hesk_url'], 'title' => $hesk_settings['hesk_title']),
array('title' => $hesklang['customer_my_tickets_heading'])
);
/* Print header */
require_once(TEMPLATE_PATH . 'customer/inc/header.inc.php');
?>
<div class="main__content">
<div class="contr">
<?php hesk3_show_messages($serviceMessages); ?>
<?php hesk3_show_messages($messages); ?>
<div class="help-search">
<h1 class="search__title"><?php echo $hesklang['customer_my_tickets_heading']; ?></h1>
<?php displayMyTicketsSearch($searchType, $searchCriteria); ?>
</div>
<div class="table-wrap">
<table id="default-table" class="table sindu-table">
<thead>
<tr>
<?php
foreach ($hesk_settings['customer_ticket_list'] as $id => $field):
if ( ! key_exists($field, $hesk_settings['possible_customer_ticket_list'])) {
unset($hesk_settings['customer_ticket_list'][$id]);
continue;
}
?>
<th class="sindu-handle <?php echo $ordering['orderBy'] === $field ? hesk_mb_strtolower($ordering['orderDirection']) : '' ?>">
<a href="<?php echo build_sort_url($field, $ordering, $searchType, $searchCriteria, $paging); ?>" aria-label="<?php echo ($hesklang['sort_by'] . ' ' . $field); ?>">
<div class="sort">
<span><?php echo $hesk_settings['possible_customer_ticket_list'][$field]; ?></span>
<i class="handle"></i>
</div>
</a>
</th>
<?php endforeach; ?>
<th class="sindu-handle <?php echo $ordering['orderBy'] === 'priority' ? hesk_mb_strtolower($ordering['orderDirection']) : '' ?>">
<a href="<?php echo build_sort_url('priority', $ordering, $searchType, $searchCriteria, $paging); ?>" aria-label="<?php echo ($hesklang['sort_by'] . ' ' . $hesklang['priority']); ?>">
<div class="sort">
<span><?php echo $hesklang['priority']; ?></span>
<i class="handle"></i>
</div>
</a>
</th>
</tr>
</thead>
<tbody>
<?php if (count($tickets) === 0): ?>
<td colspan="<?php echo count($hesk_settings['customer_ticket_list'])+1; ?> "><span role="alert"><?php echo $hesklang['no_results_found']; ?></span></td>
<?php endif; ?>
<?php foreach ($tickets as $ticket):
?>
<tr <?php if (intval($ticket['status_id']) === 2) { echo 'class="new"'; } ?>>
<?php
// Show Sequential ID and link it to the ticket page
if ( in_array('id', $hesk_settings['customer_ticket_list']) )
if ($hesk_settings['sequential']): ?>
<td><?php echo $ticket['id']; ?></td>
<?php endif; ?>
<?php
// Show Tracking ID and link it to the ticket page
if ( in_array('trackid', $hesk_settings['customer_ticket_list']) )
{
?>
<td>
<a href="ticket.php?track=<?php echo stripslashes($ticket['trackid']); ?>">
<?php echo $ticket['trackid']; ?>
</a>
</td>
<?php
}
?>
<?php
// Show date submitted
if ( in_array('dt', $hesk_settings['customer_ticket_list']) )
{
switch ($hesk_settings['submittedformat'])
{
case 1:
$ticket['dt'] = hesk_date($ticket['dt'], true, true, true, $hesk_settings['format_timestamp']);
break;
case 2:
$ticket['dt'] = hesk_time_lastchange($ticket['dt']);
break;
case 3:
$ticket['dt'] = hesk_date($ticket['dt'], true, true, true, $hesk_settings['format_date']);
break;
case 4:
$ticket['dt'] = hesk_date($ticket['dt'], true, true, true, $hesk_settings['format_submitted']);
break;
default:
$ticket['dt'] = hesk_time_since( strtotime($ticket['dt']) );
}
echo '<td>'.$ticket['dt'].'</td>';
}
?>
<?php
if ( in_array('lastchange', $hesk_settings['customer_ticket_list']) )
{
?>
<td><?php echo $ticket['lastchange']; ?></td>
<?php } ?>
<?php
if ( in_array('category', $hesk_settings['customer_ticket_list']) )
{
$ticket['category_name'] = isset($hesk_settings['categories'][$ticket['category']]) ? $hesk_settings['categories'][$ticket['category']] : $hesklang['catd'];
echo '<td class="category-'.intval($ticket['category']).'">'.$ticket['category_name'].'</td>';
}
?>
<?php
// Show customer name
if ( in_array('name', $hesk_settings['customer_ticket_list']) )
{
echo '<td>'.$ticket['u_name'];
if (intval($ticket['customer_count']) > 1) {
echo '<span class="customer-count">'.sprintf($hesklang['customer_count_x_more'], intval($ticket['customer_count']) - 1).'</span>';
}
echo '</td>';
}
// Show customer email
if ( in_array('email', $hesk_settings['customer_ticket_list']) )
{
echo '<td>' . (strlen($ticket['u_email']) ? '<a href="mailto:'.$ticket['u_email'].'" aria-label="Mail to">'.$hesklang['clickemail'].'</a>' : '');
if (intval($ticket['email_count']) > 1) {
$subtraction_amount = strlen($ticket['u_email']) ? 1 : 0;
echo '<span class="customer-count">'.sprintf($hesklang['customer_count_x_more'], intval($ticket['email_count']) - $subtraction_amount).'</span>';
}
echo '</td>';
}
?>
<?php
// Show Subject
if ( in_array('subject', $hesk_settings['customer_ticket_list']) )
{
?>
<td>
<a href="ticket.php?track=<?php echo stripslashes($ticket['trackid']); ?>">
<?php echo $ticket['subject']; ?>
</a>
</td>
<?php } ?>
<?php
// Show Status
if ( in_array('status', $hesk_settings['customer_ticket_list']) )
{
?>
<td><?php echo $ticket['status']; ?></td>
<?php } ?>
<?php
// Show ticket owner
if ( in_array('owner', $hesk_settings['customer_ticket_list']) )
{
if ($ticket['owner'])
{
$ticket['owner'] = isset($admins[$ticket['owner']]) ? $admins[$ticket['owner']] : $hesklang['unas'];
}
else
{
$ticket['owner'] = $hesklang['unas'];
}
echo '<td>'.$ticket['owner'].'</td>';
}
// Show number of all replies
if ( in_array('replies', $hesk_settings['customer_ticket_list']) )
{
echo '<td>'.$ticket['replies'].'</td>';
}
// Show number of staff replies
if ( in_array('staffreplies', $hesk_settings['customer_ticket_list']) )
{
echo '<td>'.$ticket['staffreplies'].'</td>';
}
// Show last replier
if ( in_array('lastreplier', $hesk_settings['customer_ticket_list']) )
{
if ($ticket['lastreplier'])
{
$ticket['repliername'] = isset($admins[$ticket['replierid']]) ? $admins[$ticket['replierid']] : $hesklang['staff'];
}
else
{
$customer_name = $ticket['lastreplier_customername'] === null ? $customerUserContext['name'] : $ticket['lastreplier_customername'];
$ticket['repliername'] = $customer_name;
}
echo '<td>'.$ticket['repliername'].'</td>';
}
// Show time worked
if ( in_array('time_worked', $hesk_settings['customer_ticket_list']) )
{
echo '<td>'.$ticket['time_worked'].'</td>';
}
// Show due date
if (in_array('due_date', $hesk_settings['customer_ticket_list'])) {
$due_date = $hesklang['none'];
if ($ticket['due_date'] != null) {
$due_date = hesk_date($ticket['due_date'], false, true, false);
$due_date = date($hesk_settings['format_date'], $due_date);
}
echo '<td>'.$due_date.'</td>';
}
// Print custom fields
foreach ($hesk_settings['custom_fields'] as $key => $value) {
if ($value['use'] && in_array($key, $hesk_settings['customer_ticket_list']) ) {
echo '<td>'.($value['type'] == 'date' ? hesk_custom_date_display_format($ticket[$key], $value['value']['date_format']) : $ticket[$key]).'</td>';
}
}
?>
<td class="has-flex-item">
<?php $data_style = 'border-top-color:'.$hesk_settings['priorities'][$ticket['priority']]['color'].';border-left-color:'.$hesk_settings['priorities'][$ticket['priority']]['color'].';border-bottom-color:'.$hesk_settings['priorities'][$ticket['priority']]['color'].';' ?>
<div class="value with-label priority" data-value="<?php echo $hesk_settings['priorities'][$ticket['priority']]['name']; ?>">
<div class="priority_img" style="<?php echo $data_style; ?>"></div>
<span class="ml5"><?php echo $hesk_settings['priorities'][$ticket['priority']]['name']; ?></span>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div class="pager">
<?php echo sprintf($hesklang['tickets_on_pages'], $totalCount, $totalNumberOfPages); ?>
<?php
output_pager($totalNumberOfPages, $paging['pageNumber'], "my_tickets.php?search-by={$searchType}&search={$searchCriteria}");
?>
</div>
</div>
</div>
</div>
<?php
/* Print Footer */
require_once(TEMPLATE_PATH . 'customer/inc/footer.inc.php');
?>
<?php
function build_sort_url($sortField, $ordering, $searchType, $searchCriteria, $paging) {
$originalUrl = "my_tickets.php?search-by={$searchType}&search={$searchCriteria}&page-number={$paging['pageNumber']}&page-size={$paging['pageSize']}&order-by={$ordering['orderBy']}&order-direction={$ordering['orderDirection']}";
$targetSortDirection = $ordering['orderDirection'] === 'asc' && $sortField === $ordering['orderBy'] ? 'desc' : 'asc';
$encodedField = urlencode($sortField);
$new_url = str_replace("order-by={$ordering['orderBy']}", "order-by={$encodedField}", $originalUrl);
$new_url = str_replace("order-direction={$ordering['orderDirection']}", "order-direction=", $new_url);
return str_replace("order-direction=", "order-direction={$targetSortDirection}", $new_url);
}
wget 'https://lists2.roe3.org/hesk/theme/hesk3/customer/readme.md'
## Instruction for usage & updating of theme files (Customer side only - Admin CSS has NOT yet been reworked)
## Theme files structure
```
| dist/ # contains production ready bundled & minified files
(created via Adminpanel->Settings->Misc->Rebuild production assets)
app.css
app.min.css
... (.js currently not bundled here, to be done in the future)
| css/ # contains css files
|__ core/ # contains non-bundled core files, that should *generally* only be used by Hesk staff,
# so that they are easy to update in future versions
# Note: files are prefixed with x_xx_ naming format,
# to ensure specific order of loading, to not break any dependencies
# General usage idea: To put any new CSS into the "most relevant" CSS file.
# I.e. if you're generally adding a component (input, button, navigation...)
# styling that should affect changes globally (in majority of places),
# you should put it in these relevant CSS files
# If you you're editing/overwriting a bunch of misc CSS for elements on a specific page (i.e. tickets, or knowledge base)
# then you should put the CSS in those more "page-specific" files, like kb.css or tickets.css.
# If you are unsure where to add some CSS, add it at the bottom of misc.css
default_theme_vars.css (contains all CSS variables that control the theme - i.e. reusage of colors that allows to easily be adjusted by users in their admin Look & Feel section)
variables.css
font_setup.css (loads up fonts...)
common.css (correction classes, like margin, not displayed..)
layout.css (layout related things, like flex, justify, columns, wrappers..)
layout_components.css (i.e. various wrappers, or holders for say forms or commonly used structures)
headers.css
footer.css
buttons.css
forms.css
input.css
icons.css
dropdowns.css
datepickers.css
modal.css
navigation.css
tooltips.css
responsive.css
tickets.css
kb.css
pages.css // one file, with all page-specific CSS, like for admin ticket, i.e. knowledge base... Ideally, they're all prefixed with the specific page_class, so it doesn't cause any conflicts
popups.css // one file, that has specific popup styling with special popup styling etc.
misc.css // leftover of any CSS that doesn't really fall into anything else
deprecated.css // just css leftover, that would have to be triple-checked that deleting it would not cause any isseues
core_overrides.css // General empty file to allow people to overwrite core code, without having to make a custom theme for it?
...
|__themes/ # contains theme files (default ones, UI generated, or custom theme files pasted by users)
|__ midnight_ocean.css
|__ theme_example1.css
theme_overrides.css # extra file to overwrite any theme files, that is not minimized specifically?
```
### How are assets bundled in app.css?
1) First order from /core (in some predefined order, or via number ordering)
2) Any core_overrides.css (part of 1 really), that allows users to adjust core, without it being affected by future versions
3) NOTE ( I think) -> theme files are NOT part of app.css, but are overwritten above, as otherwise, there would need ot be a bundle created after editing a theme, which might be hassle for some
4) You can see how css files are loaded on customer side in theme/hesk3/customer/inc/header.inc.php
- files in /core will be usable directly (without requiring rebundling), when hesk is in DEBUG MODE.
- Outside of DEBUG MODE, if any changes were made, you should make sure to rebuild production assets (via Adminpanel->Settings->Misc->Rebuild production assets)
### How are assets loaded into a project?
First load any <head> scripts obviously
If dev, load all separately from core, then theme, then theme_overrides.css (ideally programatically, based on naming order?)
If live, load dist/app.css.min, then theme, then theme_overrides.css
Finally, laod any custom after <body> stuff as well, which obviously additionally overwrites anything
* Triple check for any custom loaded CSS/JS admin urls etc., as they are currently loaded - make sure it's backwards compatible, or at least very simple for users to upgrade/move things to the new version.
### USAGE/ADDITION OF CSS (PARTICULARLY COLORS!)
*EXCEPTION: For Admin CSS, you can just use css/app.css and insert new CSS at will (for now), as admin css has NOT yet been reworked to a more modular system.*
**!!! IMPORTANT: For Customer side adjustments, make sure to adhere to below instructions!!!**
- CSS Colors should NEVER be added directly into any new specific CSS that is added.
- Get familiar with the basics of usage of CSS variables, i.e. : https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_cascading_variables/Using_CSS_custom_properties
- In some situations, the usage of color-mix can be super handy, i.e. when you need a slightly different shade of a color (say of primary), that does not exist yet: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix
- NEVER add unnecessary new colors, unless absolutely necessary from a UX perspective. If at all possible, try to use (or derive) any new colors from the "MAIN theme colors" section in default_theme_vars.css
- *ALL* CSS Colors (borders, background, color, fill...) should:
- only be defined (and added if needed-read below) in default_theme_vars.css
- Always first look for reuse of existing theme colors - Get familiar with them in either in default_theme_vars.css, or in admin side under Settings -> Look & Feel
- If a sensible color/variable already exists (i.e. you are adding a new HTML element, that should be colored in one of the primary Hesk colors, you should use var(--primary) in any CSS colors to refer to it.)
- If you're adding some new component/element (i.e. not something that already widely exists, like an input, button...), and it can't sensibly use one of the existing color variables, you can then add that new color variable into default_theme_vars.css:
- i.e. --my-new-element__bg: #somecolor; (where #somecolor is reading an existing variable color if possible, or if no sensible/matching color is defined yet, then add a new specific color here)
- Read the comments in default_theme_vars.css and variables.css for more specific on Hesk practices on color naming and usage.