keep ticket closed

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
iceman
Posts: 6
Joined: Sun Nov 26, 2006 8:32 pm

keep ticket closed

Post 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
Outpack
Posts: 23
Joined: Sat Jun 02, 2007 1:34 am

Re: keep ticket closed

Post by Outpack »

iceman wrote:the same solution from last year doesn't work on the upgrade
do you have a link? I cannot find
tsjaar
Posts: 14
Joined: Wed May 23, 2007 7:33 am

Post by tsjaar »

Search works perfect for me... ;-)
viewtopic.php?t=1197&highlight=closed
Outpack
Posts: 23
Joined: Sat Jun 02, 2007 1:34 am

Post 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>';
    }
3cwired_com
Posts: 20
Joined: Wed Jul 04, 2007 9:49 am

Post 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>';
    }
Behind every great fortune lies a crime.
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
Outpack
Posts: 23
Joined: Sat Jun 02, 2007 1:34 am

Post by Outpack »

no, it`s wrong. Try it out ;)
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post 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

Code: Select all

<?php
}
?>
after the

Code: Select all

</form>
tag.

Haven't tested it but should point you into the correct direction.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Outpack
Posts: 23
Joined: Sat Jun 02, 2007 1:34 am

Post 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.
3cwired_com
Posts: 20
Joined: Wed Jul 04, 2007 9:49 am

Post 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.
Behind every great fortune lies a crime.
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post 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 :wink:
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
3cwired_com
Posts: 20
Joined: Wed Jul 04, 2007 9:49 am

Post 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. 8)
Behind every great fortune lies a crime.
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
Post Reply