Beispiel #1
0
 public function admin_read($ticket)
 {
     $users = new users();
     if ($users->getuserinfo('user_group') == 1 && $this->ticket_info($ticket, 'user') != $_COOKIE['user']) {
         $_link = $this->getDBH();
         $query = $_link->prepare('UPDATE `tickets` SET `admin_read` = 1 WHERE `uniqid` = :uniqid');
         $query->bindParam(':uniqid', $ticket, PDO::PARAM_STR);
         $query->execute();
     }
 }
Beispiel #2
0
 public function close_ticket($ticket)
 {
     $tickets = new tickets();
     $users = new users();
     $_link = $this->getDBH();
     if ($tickets->is_ticket($ticket) && $users->getuserinfo('user_group') == 1) {
         $query = $_link->prepare('UPDATE `tickets` SET `resolved` = 1 WHERE `uniqid` = :ticket');
         $query->bindParam(':ticket', $ticket, PDO::PARAM_STR);
         $query->execute();
         echo 'success';
     }
 }