Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Creating New Tickets: Name, E-Mail and Phone filled in automatically

I would like to use OST for a client who has about 180 employees. These users should not have to enter their name, email and phone every time they create a ticket - it should be stored in the database. when they click on "new ticket" the name, email and phone form field should be filled in with their data.

Another way (I prefer) would be to use the default new ticket (without the backend) and have a drop down menu or an ajax function where the user can enter his username (like initals) and then the rest is filled in automatically. We could make a database with all user info - but I need to get a programmer who is able to do this. Anybody here? Please contact me over Skype (nekket) or email [email]ne@k1337.de[/email]
«1

Comments

  • I've wrote a mod that should work for you. It would use the normal open page for osticket. I basically added a new tab in the admin page called clients. You can add, update, and delete client information in the tab. I have attached the two new files for the tab. Its not the prettiest code, but from the testing I did, it works.

    include/staff/client.inc.php (see attachments)
    include/staff/clients.inc.php (see attachments)


    in include/class.nav.php ~ line 35 ADD

    $tabs['clients']=array('desc'=>'Clients','href'=>'admin.php?t=clients','title'=>'Clients');


    in main.inc.php ~ line 107 AFTER

    define('TOPIC_TABLE',TABLE_PREFIX.'help_topic');
    define('GROUP_TABLE',TABLE_PREFIX.'groups');


    ADD

    define('CLIENT_TABLE',TABLE_PREFIX.'clients');



    in scp/admin.php ~ line 719 AFTER

    		break;            
    default:
    $errors['err']='Unknown Dept action';
    }
    break;


    ADD

    	case 'clients':
    $page2 = 'client.inc.php';
    $firstname = strip_tags($_POST['firstname']);
    $lastname = strip_tags($_POST['lastname']);
    $email = strip_tags($_POST['email']);
    $phone = eregi_replace(\"[^0-9]\",\"\",strip_tags($_POST['phone']));
    $phone_ext = strip_tags($_POST['phone_ext']);
    $mobile = eregi_replace(\"[^0-9]\",\"\",strip_tags($_POST['mobile']));
    $company = strip_tags($_POST['company']);
    $client_id = strip_tags($_POST['client_id']);
    $delete = $_POST['uids'];
    if(!$_POST['firstname']) $errors['firstname'] = \"First name required. \";
    if(!$_POST['lastname']) $errors['lastname'] = \" Last name required. \";
    $phone_length = strlen((string)$phone);
    $tmp = \"(\";
    for($j=0; $j<$phone_length; $j++) {
    if(ctype_digit($phone[$j])) $tmp .= $phone[$j];
    }
    if((int)strlen($tmp)>11||(int)strlen($tmp)<(int)11) $errors['phone'] = \"Phone# (xxx)xxx-xxxx \";
    else for($k=0; $k<11; $k++) {
    if($k==4) $phone .= \")\";
    if($k==7) $phone .= \"-\";
    if($k==0) $phone = $tmp[$k];
    else $phone .= $tmp[$k];
    }
    if($mobile) {
    $mobile_length = strlen((string)$mobile);
    $tmp = \"(\";
    for($j=0; $j<$mobile_length; $j++) {
    if(ctype_digit($mobile[$j])) $tmp .= $mobile[$j];
    }
    for($k=0; $k<11; $k++) {
    if($k==4) $mobile .= \")\";
    if($k==7) $mobile .= \"-\";
    if($k==0) $mobile = $tmp[$k];
    else $mobile .= $tmp[$k];
    }
    }
    if($_POST['a']==\"update\" && !$errors) {
    $query = \"UPDATE \".CLIENT_TABLE.\" SET firstname = '$firstname', lastname = '$lastname', email = '$email', phone = '$phone', phone_ext = '$phone_ext', mobile = '$mobile', company = '$company' WHERE client_id = '$client_id'\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Updated';
    }
    else $msg = \"Client update failed.\";

    }
    if($_POST['a']==\"new\" && !$errors) {
    $query = \"INSERT INTO \".CLIENT_TABLE.\" (firstname, lastname, email, phone, phone_ext, mobile, company) VALUES ('$firstname', '$lastname', '$email', '$phone', '$phone_ext', '$mobile', '$company')\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Created';
    }
    else $msg = \"Client creation failed.\";
    }
    if($_POST['do']==\"delete\") {
    $delete_count = count($delete);
    for($i=0; $i<$delete_count; $i++) {
    $client_id = strip_tags($delete[$i]);
    $query = \"DELETE FROM \".CLIENT_TABLE.\" WHERE '$client_id' LIKE client_id\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Deleted';
    }
    else $msg = \"Client deletion failed.\";
    }
    }
    break;


    If you don't want the phone number validation, us this instead

    	case 'clients':
    $page2 = 'client.inc.php';
    $firstname = strip_tags($_POST['firstname']);
    $lastname = strip_tags($_POST['lastname']);
    $email = strip_tags($_POST['email']);
    $phone = eregi_replace(\"[^0-9]\",\"\",strip_tags($_POST['phone']));
    $phone_ext = strip_tags($_POST['phone_ext']);
    $mobile = eregi_replace(\"[^0-9]\",\"\",strip_tags($_POST['mobile']));
    $company = strip_tags($_POST['company']);
    $client_id = strip_tags($_POST['client_id']);
    $delete = $_POST['uids'];
    if(!$_POST['firstname']) $errors['firstname'] = \"First name required. \";
    if(!$_POST['lastname']) $errors['lastname'] = \" Last name required. \";

    if($_POST['a']==\"update\" && !$errors) {
    $query = \"UPDATE \".CLIENT_TABLE.\" SET firstname = '$firstname', lastname = '$lastname', email = '$email', phone = '$phone', phone_ext = '$phone_ext', mobile = '$mobile', company = '$company' WHERE client_id = '$client_id'\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Updated';
    }
    else $msg = \"Client update failed.\";

    }
    if($_POST['a']==\"new\" && !$errors) {
    $query = \"INSERT INTO \".CLIENT_TABLE.\" (firstname, lastname, email, phone, phone_ext, mobile, company) VALUES ('$firstname', '$lastname', '$email', '$phone', '$phone_ext', '$mobile', '$company')\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Created';
    }
    else $msg = \"Client creation failed.\";
    }
    if($_POST['do']==\"delete\") {
    $delete_count = count($delete);
    for($i=0; $i<$delete_count; $i++) {
    $client_id = strip_tags($delete[$i]);
    $query = \"DELETE FROM \".CLIENT_TABLE.\" WHERE '$client_id' LIKE client_id\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Deleted';
    }
    else $msg = \"Client deletion failed.\";
    }
    }
    break;



    in scp/admin.php ~ line 916 AFTER

    	$page=($dept or ($_REQUEST['a']=='new' && !$deptID))?'dept.inc.php':'depts.inc.php';
    $nav->setTabActive('depts');
    $nav->addSubMenu(array('desc'=>'Departments','href'=>'admin.php?t=depts','iconclass'=>'departments'));
    $nav->addSubMenu(array('desc'=>'Add New Dept.','href'=>'admin.php?t=depts&a=new','iconclass'=>'newDepartment'));
    break;


    ADD

    case 'client':
    case 'clients':
    $clients = null;
    $nav->setTabActive('clients'); $nav->addSubMenu(array('desc'=>'Clients','href'=>'admin.php?t=clients','iconclass'=>'departments'));
    $nav->addSubMenu(array('desc'=>'Add New Client','href'=>'admin.php?t=clients&a=new','iconclass'=>'newDepartment'));
    $page = $page2;
    if($_GET['a']==\"update\" || $_GET['a']==\"new\") $page='client.inc.php';
    if(!$_GET['a']&&!$_POST['a']&&!$page) $page='clients.inc.php';

    break;


    That should do it for the backend side, now we just need to make it work for the open.php and open.inc.php

    I made a drop down when I first installed osticket that referenced the staff list (we use it internally) so I am not sure what the original code was.
    in include/client/open.inc.php ~ line 23 CHANGE

    [HTML]Full Name:



    Select One

    <? $services= db_query('SELECT firstname,lastname,company FROM '.CLIENT_TABLE.' ORDER BY firstname');

    while (list($firstname,$lastname,$company) = db_fetch_row($services)){?>

    <?=$lastname?>" <?
    if($_POST['name']==$company.'-'.$firstname." ".$lastname) echo 'selected="selected"';
    ?>><?=
    $company?>-<?=$firstname?> <?=$lastname?>
    <? } ?>

     * <?=$errors['name']?>

    [/HTML]

    I then deleted the rows for email, and phone number.

    In open.php ~ line 24 AFTER

    if($_POST):
    $_POST['deptId']=$_POST['emailId']=0; //Just Making sure we don't accept crap...only topicId is expected.
    //Ticket::create...checks for errors..


    ADD

    	
    $tmp_name = $_POST['name'];
    $services= mysql_query(\"SELECT email, phone FROM \".CLIENT_TABLE.\" WHERE concat(firstname,' ',lastname) LIKE '$tmp_name' ORDER BY firstname\") or die(\"the query returned an error: \" . mysql_error());
    list($email,$phone) = db_fetch_row($services);
    $_POST['email']=$email;
    $_POST['phone']=$phone;

    The above part adds in the variables after a name has been selected, but before errors are checked.
    client.inc.php.txt
    3K
    clients.inc.php.txt
    4K
  • I cant see attachments of include/staff/client.inc.php and include/staff/clients.inc.php
  • After applying the mod?
  • jpowers40828;4303 said:
    After applying the mod?
    I think he means he can't see the files you attached.
    jpowers40828;4278 said:

    include/staff/client.inc.php (see attachments)
    include/staff/clients.inc.php (see attachments)
  • Haha, that makes more sense to me. Apparently I never attached them, but I have edited the original now. The .txt extension needs to be removed after saving them. And I updated the line number of the second part of scp/admin.php to be the right line.
  • Error Message after applying mod and uploading files

    Thanks for such a great mod... I followed your directions and repeated them twice to make sure I have no mistakes. After I try to add clients in the admin area, I get an email with the following message:

    Subject: db error

    [SELECT firstname,lastname FROM ost_clients WHERE isactive=1 ORDER BY firstname] - Unknown column 'isactive' in 'where clause'

    Any pointers on what I am doing wrong?

    Any help is greatly appreciated!

    Mike
  • in client/open.inc.php ~ line 23, I was thinking about adding another column to the table to allow for active or inactive clients, as we use this internally at an accounting firm and some employees are only seasonal. Remove "WHERE isactive=1 ". Sorry about that, if you want that capability, I'll probably add that tomorrow, I can send you the updated files if you'd like.

    But that doesn't make sense, as that would only effect clients trying to create a ticket... Make sure what I was talking about, you modified the line 23 of include/client/open.inc.php and not client.inc.php

    I added the ability to have active and inactive clients. I've attached the new client and clients files which go in include/staff. Use this part in scp/admin.php instead of the above addition ~ line 719

    	case 'clients':
    $page2 = 'client.inc.php';
    $firstname = $_POST['firstname'];
    $lastname = $_POST['lastname'];
    $email = $_POST['email'];
    $phone = (string)$_POST['phone'];
    $phone_ext = $_POST['phone_ext'];
    $mobile = $_POST['mobile'];
    $company = $_POST['company'];
    $is_active = $_POST['is_active'];
    $client_id = $_POST['client_id'];
    $delete = $_POST['uids'];
    if(!$_POST['firstname']) $errors['firstname'] = \"First name required. \";
    if(!$_POST['lastname']) $errors['lastname'] = \" Last name required. \";
    $phone_length = strlen((string)$phone);
    $tmp = \"(\";
    for($j=0; $j<$phone_length; $j++) {
    if(ctype_digit($phone[$j])) $tmp .= $phone[$j];
    }
    if((int)strlen($tmp)>11||(int)strlen($tmp)<(int)11) $errors['phone'] = \"Phone# (xxx)xxx-xxxx \";
    else for($k=0; $k<11; $k++) {
    if($k==4) $phone .= \")\";
    if($k==7) $phone .= \"-\";
    if($k==0) $phone = $tmp[$k];
    else $phone .= $tmp[$k];
    }
    if($mobile) {
    $mobile_length = strlen((string)$mobile);
    $tmp = \"(\";
    for($j=0; $j<$mobile_length; $j++) {
    if(ctype_digit($mobile[$j])) $tmp .= $mobile[$j];
    }
    for($k=0; $k<11; $k++) {
    if($k==4) $mobile .= \")\";
    if($k==7) $mobile .= \"-\";
    if($k==0) $mobile = $tmp[$k];
    else $mobile .= $tmp[$k];
    }
    }
    if($_POST['a']==\"update\" && !$errors) {
    $query = \"UPDATE \".CLIENT_TABLE.\" SET firstname = '$firstname', lastname = '$lastname', email = '$email', phone = '$phone', phone_ext = '$phone_ext', mobile = '$mobile', company = '$company', is_active= '$is_active' WHERE client_id = '$client_id'\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Updated';
    }
    else $msg = \"Client update failed.\";

    }
    if($_POST['a']==\"new\" && !$errors) {
    $query = \"INSERT INTO \".CLIENT_TABLE.\" (firstname, lastname, email, phone, phone_ext, mobile, company, is_active) VALUES ('$firstname', '$lastname', '$email', '$phone', '$phone_ext', '$mobile', '$company', '$is_active')\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Created';
    }
    else $msg = \"Client creation failed.\";
    }
    if($_POST['do']==\"delete\") {
    $delete_count = count($delete);
    for($i=0; $i<$delete_count; $i++) {
    $client_id = $delete[$i];
    $query = \"DELETE FROM \".CLIENT_TABLE.\" WHERE '$client_id' LIKE client_id\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Deleted';
    }
    else $msg = \"Client deletion failed.\";
    }
    }
    break;


    if you dont want phone validation


    case 'clients':
    $page2 = 'client.inc.php';
    $firstname = strip_tags($_POST['firstname'];
    $lastname = strip_tags($_POST['lastname'];
    $email = strip_tags($_POST['email'];
    $phone = eregi_replace(\"[^0-9]\",\"\",strip_tags((string)$_POST['phone']));
    $phone_ext = strip_tags($_POST['phone_ext'];
    $mobile = eregi_replace(\"[^0-9]\",\"\",strip_tags($_POST['mobile']));
    $company = strip_tags($_POST['company'];
    $is_active = strip_tags($_POST['is_active'];
    $client_id = strip_tags($_POST['client_id'];
    $delete = strip_tags($_POST['uids'];
    if(!$_POST['firstname']) $errors['firstname'] = \"First name required. \";
    if(!$_POST['lastname']) $errors['lastname'] = \" Last name required. \";
    if($_POST['a']==\"update\" && !$errors) {
    $query = \"UPDATE \".CLIENT_TABLE.\" SET firstname = '$firstname', lastname = '$lastname', email = '$email', phone = '$phone', phone_ext = '$phone_ext', mobile = '$mobile', company = '$company', is_active= '$is_active' WHERE client_id = '$client_id'\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Updated';
    }
    else $msg = \"Client update failed.\";

    }
    if($_POST['a']==\"new\" && !$errors) {
    $query = \"INSERT INTO \".CLIENT_TABLE.\" (firstname, lastname, email, phone, phone_ext, mobile, company, is_active) VALUES ('$firstname', '$lastname', '$email', '$phone', '$phone_ext', '$mobile', '$company', '$is_active')\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Created';
    }
    else $msg = \"Client creation failed.\";
    }
    if($_POST['do']==\"delete\") {
    $delete_count = count($delete);
    for($i=0; $i<$delete_count; $i++) {
    $client_id = $delete[$i];
    $query = \"DELETE FROM \".CLIENT_TABLE.\" WHERE '$client_id' LIKE client_id\";
    if(mysql_query($query)) {
    $page2='clients.inc.php';
    $msg = 'Client Deleted';
    }
    else $msg = \"Client deletion failed.\";
    }
    }
    break;
    client.inc.php.txt
    3K
    clients.inc.php.txt
    4K
  • thanks for this mod and more power to ya!..sorry. :p
  • Login?

    Hi there, this script is extremely helpful,
    but are existing clients then able to log
    theirselves in to get rid of the longer
    ticketing procedure?
  • Sorry, never wanted a login, so never made one, not very far from it though.
  • GREAT mod :D thanks for publising this.

    I have one question, is there anyway we can add it to the admin page so that there is a drop box there too. That is where it would be helpful for me.

    thanks,
  • Here is my admin page newticket. It goes in include/staff/
    newticket.inc.php.txt
    7K
  • thank you, the mod is working great. Maybe this should be worked into the full release. :D

    spoke too soon,

    Actually just ran into a problem entering tickets with on the admin side. It says theres a problem with the information but all the info is there.

    Also is there anyway to put an order on the drop down menu?
  • Can you do a screenshot?

    The drop down menu is sorted by firstname. If you want to change that, line 25 of newticket.inc.php
  • here are screen shots of what im submitting and then what happens.imageimage
  • In scp/tickets.php ~ line 307 REPLACE

        }elseif(!strcasecmp($_POST['a'],'open')) { //Open ticket
    $ticket=null;
    $_POST['emailId']=$_POST['topicId']=0; //clean crap.
    $_POST['message']='Ticket created by staff';
    if(!$_POST['issue'])
    $errors['issue']='Summary of the issue required';
    if($_POST['source'] && !in_array($_POST['source'],array('email','phone','other')))
    $errors['source']='Invalid source';


    WITH

        }elseif(!strcasecmp($_POST['a'],'open')) { //Open ticket
    $ticket=null;
    $_POST['emailId']=$_POST['topicId']=0; //clean crap.
    $tmp_name = $_POST['name'];
    $services= mysql_query(\"SELECT email, phone FROM \".CLIENT_TABLE.\" WHERE concat(firstname,' ',lastname) LIKE '$tmp_name' ORDER BY firstname\") or die(\"the query returned an error: \" . mysql_error());
    list($email,$phone) = db_fetch_row($services);
    $_POST['email']=$email;
    $_POST['phone']=$phone;
    $_POST['message']='Ticket created by staff';
    if(!$_POST['issue'])
    $errors['issue']='Summary of the issue required';
    if($_POST['source'] && !in_array($_POST['source'],array('email','phone','other')))
    $errors['source']='Invalid source';
    $alert_close = false;
    $status = \"\";
    if($_POST['new_close']==\"on\")
    {
    $status = \"closed\";
    if($_POST['alertuser'])
    {
    unset($_POST['alertuser']);
    $alert_close = true;
    }
    }


    Then in scp/tickets.php ~ line 334 REPLACE

                if(($respId=$ticket->postResponse($msgId,$_POST['issue'],'none',null,false))) {


    WITH

                if(($respId=$ticket->postResponse($msgId,$_POST['issue'],'none',null,$status,$alert_close))) {
  • In my humble opinion, when we add a new ticket; whether from client-side or staff-side, the Help Topic selection is better to be shown on the form instead of Department selection. I know, there must be a simple question regarding to this... "Why?".

    The reason for this is because the Help Topic table related to the Department table in database. You can see that in the help_topic table, there is a field named "dept_id" which has the relationship to the "dept_id" field in department table itself. So, it is unnecessary to show the Department selection on the form. Help Topic selection is more suitable for this.

    In addition, client sometimes does not care which department the tickect should to be sent. Client only knows about the "topic" of the matter that he/she wants to send. Fortunately, in this osTicket system, the help topic table has a relationship with the department table as I describe above. So, we should not be worried about this. That is why, again, you should show the Help Topic selection in Open New Ticket form; both in client-side and staff-side.

    I have made a MOD to implement Help Topic in client-side and staff-side in osTicket version 1.6 RC4. Unfortunately, the Help Topic feature has not been implemented 100% in the original version of 1.6 RC4, because we don't see the topic field in ticket table. :rolleyes:

    Back to the MOD how to implement 100% Help Topic, you can see here:
    http://www.osticket.com/forums/showthread.php?t=2023

    Regarding to this topic and that MOD above, you can see also my MOD about how to fill-in the name, email, and phone textbox automatically while creating a new ticket. Please follow this link:
    http://www.osticket.com/forums/showthread.php?t=2021

    As a matter of fact, MOD in topic #2021 above is for adding new ticket in staff-side which is already filled-in automatically to the name and email textbox while staff entering some characters of client's email, but not with the phone textbox. Then I modified it in order the phone textbox also filled-in based on the item that selected by Staff.

    I think you can implement this feature also in client-side; as good as in the staff-side. Hope this is helpful for you.

    Best regards,
    Masino Sinaga
  • Clients Form

    Hi,

    I applied your code which do enhance the use experience. however, I noticed something. When adding a new ticket, no matter what the user enters in the e-mail address field, the confirmation message that follows the submission step shows the actual user e-mail.

    I believe it is better for the code to match the e-mail the user types against the one in the database entered by the admin. This will minimize the spam bots to send bogus tickets.

    What do you think?

    -Leez
  • Adding Client Address Fields

    First of all, THANK YOU for creating a post with such easy to follow instructions! I have never edited a web page before and was able to get the client changes made w/o a problem.

    Now if I needed address information for my client list, say a 2-row street, city, state and zip, can someone hold my hand through that mod?

    Thanks in advance!

    Capt Morgan
  • i dont have experience with php.
    ive got osticket running but when i apply the mod there is an error.

    [SELECT firstname,lastname FROM osticket_clients ORDER BY firstname]

    Table 'osticket.osticket_clients' doesn't exist

    ive looked on the database but it has :osticket_clients"

    i dont know what went wrong. thanks.
  • @djsensui:

    Hi, did you forget to add the attached files ?

    We had got the same problem, yesterday.... ;)

    @jpowers40828:
    Great hack, thank you !

    I like to check also the ticketstatus with the clientname in a drop-down box (only the clientname, no Ticket-ID).

    Could you make a hack for this please ?

    Greetings from Germany and sorry for my bad english ;)
  • I'm not quite understanding, but are you looking to be able to use a drop down menu in order to select a client which brings up their tickets?

    You need to make sure to add the attached files. Then through the admin panel go to the clients tab and setup clients.
  • jpowers40828;9084 said:
    I'm not quite understanding, but are you looking to be able to use a drop down menu in order to select a client which brings up their tickets?
    Yeah, right !

    But on the front-end.

    image


    I dont need any security measures because of the ticket system is for a local network.

    Thank you.
  • Are you using RC5?
  • yes, did you found a solution ?
    sorry for the late post
  • acitve inactive state

    I tried to use this great mod

    i got the next problem:

    If i create a new client, the status of the client keep "Inactive"

    what did i do wrong?

    can someone help me please?
  • What about client database

    Hi all,

    Is the any modifications in mysql we have to make?

    Regards
    Chandu!
  • Can't Find This Section of Code To Replace
    jpowers40828;7101 said:
    In scp/tickets.php ~ line 307 REPLACE

        }elseif(!strcasecmp($_POST['a'],'open')) { //Open ticket
    $ticket=null;
    $_POST['emailId']=$_POST['topicId']=0; //clean crap.
    $_POST['message']='Ticket created by staff';
    if(!$_POST['issue'])
    $errors['issue']='Summary of the issue required';
    if($_POST['source'] && !in_array($_POST['source'],array('email','phone','other')))
    $errors['source']='Invalid source';


    WITH

        }elseif(!strcasecmp($_POST['a'],'open')) { //Open ticket
    $ticket=null;
    $_POST['emailId']=$_POST['topicId']=0; //clean crap.
    $tmp_name = $_POST['name'];
    $services= mysql_query(\"SELECT email, phone FROM \".CLIENT_TABLE.\" WHERE concat(firstname,' ',lastname) LIKE '$tmp_name' ORDER BY firstname\") or die(\"the query returned an error: \" . mysql_error());
    list($email,$phone) = db_fetch_row($services);
    $_POST['email']=$email;
    $_POST['phone']=$phone;
    $_POST['message']='Ticket created by staff';
    if(!$_POST['issue'])
    $errors['issue']='Summary of the issue required';
    if($_POST['source'] && !in_array($_POST['source'],array('email','phone','other')))
    $errors['source']='Invalid source';
    $alert_close = false;
    $status = \"\";
    if($_POST['new_close']==\"on\")
    {
    $status = \"closed\";
    if($_POST['alertuser'])
    {
    unset($_POST['alertuser']);
    $alert_close = true;
    }
    }


    Then in scp/tickets.php ~ line 334 REPLACE

                if(($respId=$ticket->postResponse($msgId,$_POST['issue'],'none',null,false))) {


    WITH

                if(($respId=$ticket->postResponse($msgId,$_POST['issue'],'none',null,$status,$alert_close))) {
    I ran into the same problem with adding tickets from the admin side.
    I tried updating the code but I can not find the code to replace in the scp/tickets.php.
    What am I doing wrong.
    If you code post a working copy of the scp/tickets.php it would be most helpful.
    I attached a copy of my scp/tickets.php code
  • databse integration

    hi all..

    how do i integrate between two databases?

    which file should i change in order to make it works?

    could you guys list for me step by step procedure since i'm very green in php..

    tq so much..
  • Error

    Hi when trying to add new clent i'm getting an error:


    Problems loading requested admin page. (clients)
    Possibly access denied, if you believe this is in error please get technical support.
Sign In or Register to comment.