Page 1 of 1
keep ticket closed
Posted: Fri Apr 27, 2007 9:38 pm
by iceman
Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: closing ticket
Write your message below:
I asked this question last year but there has been an upgrade and now we are back to the same problem. How can i make it so when a ticket is closed the person submitting cannot reopen it. the same solution from last year doesn't work on the upgrade.
Thanks,
Iceman
Re: keep ticket closed
Posted: Fri Jun 22, 2007 10:38 pm
by Outpack
iceman wrote:the same solution from last year doesn't work on the upgrade
do you have a link? I cannot find
Posted: Tue Jul 03, 2007 9:07 am
by tsjaar
Posted: Tue Jul 03, 2007 3:14 pm
by Outpack
ok. The solution is (in ticket.php)
Before
Code: Select all
default:
echo '<font class="resolved">'.$hesklang['closed'].'</font> [<a
href="change_status.php?track='.$trackingID.'&s=1&Refresh='.$random.'">'.$hesklang['open_action'].'</a>]';
}
After
Code: Select all
default:
echo '<font class="resolved">'.$hesklang['closed'].'</font> <a
href="change_status.php?track='.$trackingID.'&s=1&Refresh='.$random.'"></a>';
}
Posted: Wed Jul 04, 2007 9:53 am
by 3cwired_com
Outpack wrote:ok. The solution is (in ticket.php)
Before
Code: Select all
default:
echo '<font class="resolved">'.$hesklang['closed'].'</font> [<a
href="change_status.php?track='.$trackingID.'&s=1&Refresh='.$random.'">'.$hesklang['open_action'].'</a>]';
}
After
Code: Select all
default:
echo '<font class="resolved">'.$hesklang['closed'].'</font> <a
href="change_status.php?track='.$trackingID.'&s=1&Refresh='.$random.'"></a>';
}
actually the proper code would be to remove the link tag all together. see below:
Code: Select all
default:
echo '<font class="resolved">'.$hesklang['closed'].'</font>';
}
Posted: Wed Jul 04, 2007 11:56 am
by Outpack
no, it`s wrong. Try it out

Posted: Wed Jul 04, 2007 12:40 pm
by Klemen
Actually what you need is a combination of two things:
1. what 3cwired_com said
2. disable the "Add reply" text box if the ticket is closed. Something like this:
Add this code
Code: Select all
<?php
if ($ticket['status']!=3)
{
?>
just above
Code: Select all
<h3 align="center"><?php echo $hesklang['add_reply']; ?></h3>
And this code
after the
tag.
Haven't tested it but should point you into the correct direction.
Posted: Wed Jul 04, 2007 2:12 pm
by Outpack
my code above work fine for me. I`ve tested much more.
Only the admin can reopen the ticket, not the user.
Edit: Sorry, my mistake.

A user can answer already
Edit2: @Klemen
In combination of my code and yours work now fine. Thanks.
Posted: Wed Jul 04, 2007 5:00 pm
by 3cwired_com
thanks klemen, after further testing, i didnt know that a msg would reopen a ticket, well I tried out your addition and it works great.
btw, outpack, the code i posted isn't wrong. neither is yours.
but for so called proper coding, one should eliminate unnecessary lines etc, functions, sub routines and so forth. This would speed up your programs executions, load times and so forth, i know one measly line won't save the world, but it's just good practice. btw, I am no programmer.
Posted: Sun Jul 08, 2007 10:51 am
by Klemen
3cwired_com wrote:but for so called proper coding, one should eliminate unnecessary lines etc,
I prefer keeping empty (or multiple) lines if that helps keeping the file better formatted and easier to read/follow the code. After all new lines don't have any significant effect on the script execution time at this level of usage. But hey, I'm no programmer neither

Posted: Sun Jul 08, 2007 11:09 am
by 3cwired_com
You are perfectly right, that is actually good programming, it is much easier on the eyes, but I meant unnecessary lines of code.
