Tracking ID

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
shill58
Posts: 6
Joined: Thu Jun 17, 2010 6:30 pm

Tracking ID

Post by shill58 »

Script URL: http://www.hesk.com
Version of script:2.2


Write your message below: Is there a way to change the tracking ID to like $trackingID .= date('ymdGi'); in previous Version: 0.94.1 @ October 25, 2007 this is the code i modified the code but now it will not work with new version
/* Generate tracking ID */
/*
$useChars='AEUYBDGHJLMNPQRSTVWXZ123456789';
$trackingID = $useChars{mt_rand(0,29)};
for($i=1;$i<18;$i++)
*/
{
/* $trackingID .= $useChars{mt_rand(0,29)};*/
$trackingID= $trackingID .= date('ymdGi');
Klemen
Site Admin
Posts: 10143
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

If you change

Code: Select all

/* Generate tracking ID and make sure it's not a duplicate one */
$useChars = 'AEUYBDGHJLMNPQRSTVWXZ123456789';
$trackingID = $useChars{mt_rand(0,29)};
for($i=1;$i<10;$i++)
{
	$trackingID .= $useChars{mt_rand(0,29)};
}
to

Code: Select all

/* Generate tracking ID and make sure it's not a duplicate one */
$trackingID= date('ymdGi');
it should work.

But you do realize you will only be able to create ONE ticket per minute and it is easy for anyone to guess the ticket ID this way?
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
shill58
Posts: 6
Joined: Thu Jun 17, 2010 6:30 pm

Good Point

Post by shill58 »

your right were not that secure here, but i did not think about only a ticket a minute.

Thanks for such awesome work you do!
shill58
Posts: 6
Joined: Thu Jun 17, 2010 6:30 pm

Post by shill58 »

changed it to /* Generate tracking ID and make sure it's not a duplicate one */
$trackingID= date('ymdGii');

the extra i put in the second

Ticket subject: test
Tracking ID: 10062570505
Name: Shannon Hill
Klemen
Site Admin
Posts: 10143
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Note: ticket ID can be maximum 10 chars long, longer chars will be truncated to 10 unless you change the mySQL setup to accept longer strings for the tracking id.
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
shill58
Posts: 6
Joined: Thu Jun 17, 2010 6:30 pm

Post by shill58 »

I have it accepting 18 characters
Post Reply