{include file="blocks/sidebar.html"} {* ============ Main column ============ *}
{if $flash_ok} {/if} {if $flash_error} {/if} {* ════════════════════════════════════════════════════════ *} {* VIEW: thread (single ticket + replies + reply box) *} {* ════════════════════════════════════════════════════════ *} {if $action eq 'view' && $ticket} {assign var=th_class value='open'} {if $ticket.status eq 'closed'}{assign var=th_class value='closed'} {elseif $ticket.status eq 'answered'}{assign var=th_class value='answered'} {/if}
T-{$ticket.id|string_format:'%05d'}

{$ticket.subject|escape:'html'}

Status: {$ticket.status|escape:'html'} {if $ticket.cat_name}Department: {$ticket.cat_name|escape:'html'}{/if} Opened: {$ticket.created_at|escape:'html'} {if $ticket.last_reply_at}Last reply: {$ticket.last_reply_at|escape:'html'}{/if}
{foreach $replies as $r} {assign var=is_staff value=($r.author_type eq 'staff')} {assign var=initials value='U'} {if $r.author_name}{assign var=initials value=$r.author_name|truncate:1:'':true|upper}{elseif $r.author_email}{assign var=initials value=$r.author_email|truncate:1:'':true|upper}{/if}
{$initials|escape:'html'}
{$r.author_name|default:$r.author_email|default:'User'|escape:'html'} {if $is_staff}Support staff{elseif $r.author_type eq 'user'}Customer{else}Guest{/if}
{$r.created_at|escape:'html'}
{$r.body|escape:'html'}
{foreachelse}
No replies yet.
{/foreach}
{if $ticket.status neq 'closed'}
Reply
{if $guest_token}{/if}
{else}
This ticket is closed. Open a new one if you need more help.
{/if} {* ════════════════════════════════════════════════════════ *} {* NEW: create-ticket form *} {* ════════════════════════════════════════════════════════ *} {elseif $action eq 'new'}

Open a new ticket

Tell us what's going on. Be as specific as you can — include server IDs, error messages, timestamps.

{if !$is_user}
{/if}
Tip: paste error logs in monospace and include the UTC timestamp.
Cancel
Before opening a ticket
  • Check our status page for known incidents
  • Browse the knowledge base for common questions
  • Bot & webhook issues — pick Telegram / Bots department
  • Include UTC timestamps + relevant server IDs
Response targets
Urgent< 15 min
High< 1 hour
Normal< 4 hours
Low< 24 hours
{* ════════════════════════════════════════════════════════ *} {* LIST: signed-in user → their tickets; guest → lookup form *} {* ════════════════════════════════════════════════════════ *} {else}

Support tickets

{if $is_user}

{$my_tickets|@count} ticket{if ($my_tickets|@count) neq 1}s{/if} — average first response under 12 minutes.

{else}

Open a new ticket or look up an existing one by email.

{/if}
{if $is_user}
{foreach $my_tickets as $t} {assign var=t_class value='open'} {if $t.status eq 'closed'}{assign var=t_class value='closed'} {elseif $t.status eq 'answered'}{assign var=t_class value='answered'} {/if}
T-{$t.id|string_format:'%05d'}
{$t.subject|escape:'html'}
{$t.cat_name|default:'Support'|escape:'html'} · {$t.reply_count|default:0} repl{if $t.reply_count eq 1}y{else}ies{/if}
{$t.last_reply_at|default:$t.created_at|escape:'html'}
{$t.status|escape:'html'}
{foreachelse}
No tickets yet. Open your first one →
{/foreach}
{else}
Open a new ticket

No account needed — just leave us your email so we can reply.

Create a ticket
Look up your tickets

Already opened one as a guest? Enter your email and we'll send you the links.

{/if}

Need urgent help?

For production outages, set ticket priority to Urgent — we page on-call within minutes.

{/if}
{* Vanilla JS filter/search for the ticket list. Wrapped in {literal} so Smarty doesn't try to parse the JS object braces. *} {literal} {/literal}