11

I have a custom and simple / based user system. I'm trying to build a way for members to send product support to our staff (put it in a database & viewed in admin area) and for them to manage these messages.

Does anyone know of a good existing script, or a better approach for a support area of my website?

davejal
  • 6,009
  • 10
  • 39
  • 82
Derek
  • 4,864
  • 5
  • 28
  • 38
  • 2
    Seriously, this is a good question that was useful to me. So +1 :) – Nathan Aug 26 '11 at 04:39
  • can't believe this one didn't get flagged, maybe the flag "Questions asking us to recommend or find a book, tool, software library.." wasn't available back then? Shouldn't this question be closed with a comment like this one http://stackoverflow.com/q/367711/3664960 got? – davejal Feb 24 '17 at 11:07

3 Answers3

24

Ticketing systems are a pretty easy build, have a database table:

tickets
id int(11)
user_id int(11)
message text
is_active tinyint(1)
created_at datetime
time_spent int(5) //unless your going to spend more than 99999 mins on a ticket

Now each time a user creates a ticket it goes into the db as VALUES(id,'$user_id','$message',0,NOW(),0)//remember to clean the vars

Admin can complete a ticket, update the field so that is_active = 1, then request time spent from the admin and update time_spent = '$time_spent'

You could add a commenting system simply

Database table: comments
id int(11)
ticket_id int(11)
user_id int(11)
comment text
created_at datetime

This way you can have unlimited(up to a total total of 99999999999) comments per ticket and you track the user id so you can put names next to each comment.

You can call the comments using

select * from comments where ticket_id = $id //the current tickets id

I hope this helps, its a nice easy build and means you know exactly how it works, its always nice to have done it yourself and its easily customisable.

Regards Luke

Luke
  • 3,333
  • 2
  • 28
  • 44
  • 1
    Basecamp is what most people use, but its way bigger than you need if you just want a ticket system, have a look here http://pm-sherpa.com/features/basecamp-alternatives/ I cant recomend one because I havent used any. Hope it helps Luke – Luke Jul 13 '10 at 07:03
  • Ended up using Basecamp... thanks. – Derek Oct 05 '11 at 15:45
6

You could use osTicket which is open source and free.

CoolBeans
  • 20,654
  • 10
  • 86
  • 101
Casey
  • 61
  • 1
  • 1
3

Or use Spiceworks. It's free.

Stephen C
  • 659
  • 6
  • 9