function postAdd() { $hist = new TicketHistory($this->__masterserver, $this->__readserver, $this->nname . "___" . '0'); $rhis['text_reason'] = $this->descr_f; $rhis['state_from'] = ""; $rhis['ddate'] = time(); $rhis['parent_clname'] = $this->getClName(); $rhis['state'] = "open"; $rhis['made_by'] = $this->made_by; $hist->create($rhis); $this->addToList("tickethistory", $hist); $this->realpass = randomString(6); $this->password = crypt($this->realpass); $this->status = 'on'; $this->cpstatus = 'on'; $this->escalate = 'dull'; list($sec, $usec) = explode(" ", microtime()); $this->mail_messageid = "<{$sec}{$usec}.GA8614@lxlabs.com>"; ticketHistory::getObjectsTosend($this, $rhis, "ticketadd"); }
$pname = $matches[1]; if (cse($pname, ".vm")) { $pclass = "vps"; } /* if (!csa($matches[1], "-")) { $pclass = "client"; $pname = $matches[1]; } else { $pp = explode("-", $matches[1]); $pclass = $pp[0]; $pname = $pp[1]; } */ $pobject = new $pclass(null, null, $pname); $pobject->get(); $tick = new Ticket(null, null, $ticketid); $tick->get(); $param['state'] = 'open'; $param['text_reason'] = $message; $param['pobject'] = $pobject; $param['made_by'] = createClName($pclass, $pname); $param['from_ad'] = $email->from; $param = tickethistory::add($tick, 'tickethistory', $param); $newob = new TicketHistory(null, null, $param['nname']); $newob->ddate = time(); $tick->unread_flag = 'dull'; $newob->parent_clname = $tick->getClName(); $newob->create($param); $newob->write(); $tick->write();