Thanks for the response, I have been through that thread many times reading all the problems and solutions and came up with nothing.
I added in a field called closed_on_ver into the Ost_Ticket table in the database.
Anyway here is the code.
Changes on Include/Class.ticket.php
First Part
class Ticket{
var $id;
var $extid;
var $email;
var $status;
var $created;
var $updated;
var $priority;
var $priority_id;
var $fullname;
var $staff_id;
var $dept_id;
var $dept_name;
var $subject;
var $overdue;
var $lastMsgId;
var $dept;
var $closed_on_ver;
Second Part
if(($res=db_query($sql)) && db_num_rows($res)):
$row=db_fetch_array($res);
$this->id =$row;
$this->extid =$row;
$this->email =$row;
$this->fullname =$row;
$this->status =$row;
$this->created =$row;
$this->updated =$row;
$this->lock_id =$row;
$this->priority_id=$row;
$this->priority=$row;
$this->staff_id =$row;
$this->dept_id =$row;
$this->dept_name =$row;
$this->subject =$row;
$this->overdue =$row;
$this->closed_on_ver =$row;
$this->row=$row;
Third Part
//GET
function getId(){
return $this->id;
}
function getExtId(){
return $this->extid;
}
function getEmail(){
return $this->email;
}
function getName(){
return $this->fullname;
}
function getSubject() {
return $this->subject;
}
function getCreateDate(){
return $this->created;
}
function getUpdateDate(){
return $this->updated;
}
function getStatus(){
return $this->status;
}
function getDeptId(){
return $this->dept_id;
}
function getDeptName(){
return $this->dept_name;
}
function getPriorityId() {
return $this->priority_id;
}
function getclosed_on_ver() {
return $this->closed_on_ver;
}
function getPriority() {
return $this->priority;
}
function getPhone() {
return $this->row;
}
function getSource() {
return $this->row;
}
function getIP() {
return $this->row;
}
Forth Part
$id=0;
$fields=array();
$fields = array('type'=>'string', 'required'=>1, 'error'=>'Name required');
$fields = array('type'=>'email', 'required'=>1, 'error'=>'Valid email required');
$fields = array('type'=>'string', 'required'=>1, 'error'=>'Subject required');
$fields = array('type'=>'string', 'required'=>0, 'error'=>'Closed on Version required');
$fields = array('type'=>'text', 'required'=>1, 'error'=>'Message required'); if(strcasecmp($origin,'web')==0) { //Help topic only applicable on web tickets.
$fields = array('type'=>'int', 'required'=>1, 'error'=>'Select help topic');
}elseif(strcasecmp($origin,'staff')==0){ //tickets created by staff...e.g on callins.
$fields = array('type'=>'int', 'required'=>1, 'error'=>'Dept. required');
$fields = array('type'=>'string', 'required'=>1, 'error'=>'Indicate source');
}else { //Incoming emails (PIPE or POP.
$fields = array('type'=>'int', 'required'=>1, 'error'=>'Email unknown');
}
$fields = array('type'=>'int', 'required'=>0, 'error'=>'Invalid Priority');
$fields = array('type'=>'phone', 'required'=>0, 'error'=>'Phone # required');
Final Edit on Class.Ticket.php
$extId=Ticket:();
$sql= 'INSERT INTO '.TICKET_TABLE.' SET created=NOW() '.
',ticketID='.db_input($extId).
',dept_id='.db_input($deptId).
',priority_id='.db_input($priorityId).
',email='.db_input($var).
',name='.db_input(Format:($var)).
',subject='.db_input(Format:($var)).
',phone='.db_input($var).
',ip_address='.db_input($ipaddress).
',closed_on_ver='.db_input(Format:($var)).
',source='.db_input($source);
Now when I insert the following code into include/client/open.inc.php and create a new ticket filling in the field it goes into the database, but if I put the code into the page include/staff/viewticket.inc.php it dosen't put the data into the database when I click sumbit.
<input type="text" name="closed_on_ver" size="25" value="<?=$info?>"> <font class="error"> <?=$errors?></font>
Like I've said before this field is only updated once and it will only be by staff so viewticket.inc.php is the only page it needs to appear on but just my luck its the page it dosen't work on.
If you need any other info just ask.
As for other Mods I do have a few mods on there but none that I can think of that would interfere as they all dealt with modifing the main tickets.inc.php page, but I will look back through the mods I have added and see what I had to change for them.