3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Ticket { protected $db; protected $setting; public $tickets; public $anwsers; function __construct($db,$setting) { $this->db = $db; $this->setting = $setting; } public function checkTicket($ref, $email) { if($result = $this->db->query("SELECT id FROM verk_tick_tickets WHERE ref='".$this->db->real_escape_string($ref)."' AND email='".$this->db->real_escape_string($email)."'")) { if($result->num_rows == 1) { return true; } else { return false; } $result->free(); } else { return false; } } public function getTicketID($ref, $email) { if($result = $this->db->query("SELECT id FROM verk_tick_tickets WHERE ref='".$this->db->real_escape_string($ref)."' AND email='".$this->db->real_escape_string($email)."'")) { if($result->num_rows == 1) { $resp = $result->fetch_array(); return $resp['id']; } else { return false; } $result->free(); } else { return false; } } public function getTicketVar($id,$var) { if($result = $this->db->query("SELECT ".$this->db->real_escape_string($var)." FROM verk_tick_tickets WHERE id='".$this->db->real_escape_string($id)."'")) { if($result->num_rows == 1) { $resp = $result->fetch_array(); return $resp[$var]; } else { return false; } $result->free(); } else { return false; } } public function getTicket($ref,$email) { if($result = $this->db->query("SELECT * FROM verk_tick_tickets WHERE ref='".$this->db->real_escape_string($ref)."' AND email='".$this->db->real_escape_string($email)."'")) { if($result->num_rows == 1) { return $result->fetch_array(); } else { return false; } $result->free(); } else { return false; } } public function getOpenTickets() { if($result = $this->db->query("SELECT * FROM verk_tick_tickets WHERE status='open' OR status='client' OR status='admin'")) { if($result->num_rows > 0) { $return = array(); while($row = $result->fetch_assoc()) { $return[] = $row; } $this->tickets = $return; return true; } else { return false; } $result->free(); } else { return false; } } public function searchTickets($search) { if($result = $this->db->query("SELECT * FROM verk_tick_tickets WHERE ref LIKE '%".$this->db->real_escape_string($search)."%' OR name LIKE '%".$this->db->real_escape_string($search)."%' OR email LIKE '%".$this->db->real_escape_string($search)."%' OR subject LIKE '%".$this->db->real_escape_string($search)."%'")) { if($result->num_rows > 0) { $return = array(); while($a = $result->fetch_assoc()) { $return[] = $a; } $this->tickets = $return; return $result->num_rows; } else { return 0; } $result->free(); } else { return 0; } } public function getTicketAnwsers($ref,$email) { if($this->checkTicket($ref,$email)) { $id = $this->getTicketID($ref,$email); if($result = $this->db->query("SELECT * FROM verk_tick_tickets_anwsers WHERE ticket_id='".$this->db->real_escape_string($id)."'")) { if($result->num_rows > 0) { $return = array(); while($row = $result->fetch_assoc()) { $return[] = $row; } $this->anwsers = $return; return true; } else { return '<div class="alert alert-info">Nog geen berichten...</div>'; } $result->free(); } else { return 'Database error: ('.$this->db->errno.') '.$this->db->error; } } else { return '<div class="alert alert-error">Geen ticket gevonden!</div>'; } } public function closeTicket($ref,$email) { if($result = $this->db->query("SELECT * FROM verk_tick_tickets WHERE ref='".$this->db->real_escape_string($ref)."' AND email='".$this->db->real_escape_string($email)."'")) { if($result->num_rows == 1) { if($this->db->query("UPDATE verk_tick_tickets SET status='closed' WHERE ref='".$this->db->real_escape_string($ref)."' AND email='".$this->db->real_escape_string($email)."'")) { return true; } else { return 'Database error: ('.$this->db->errno.') '.$this->db->error; } } else { return 'Ticket error: Geent ticket gevonden.'; } $result->free(); } else { return 'Database error: ('.$this->db->errno.') '.$this->db->error; } } public function createTicket($sex,$name,$email,$subject,$message) { if(strlen($subject) == 0) { $subject = '(Geen onderwerp)'; } $ref = random(4).'-'.random(4).'-'.random(3); if($this->db->query("INSERT INTO verk_tick_tickets (ref,sex,name,email,subject,message,ip,time,updated) VALUES ( '".$this->db->real_escape_string($ref)."', '".$this->db->real_escape_string($sex)."', '".$this->db->real_escape_string($name)."', '".$this->db->real_escape_string($email)."', '".$this->db->real_escape_string($subject)."', '".$this->db->real_escape_string($message)."', '".$this->db->real_escape_string($_SERVER['REMOTE_ADDR'])."', '".$this->db->real_escape_string(time())."', '".$this->db->real_escape_string(time())."' )")) { $replaceVars = array( '{%REF%}' => htmlentities($ref,ENT_QUOTES,'UTF-8'), '{%NAME%}' => htmlentities($name,ENT_QUOTES,'UTF-8'), '{%EMAIL%}' => htmlentities($email,ENT_QUOTES,'UTF-8'), '{%SUBJECT%}' => htmlentities($subject,ENT_QUOTES,'UTF-8'), '{%TICKET_URL%}' => $this->setting['url'].'view-ticket?email='.$email.'&ref='.$ref, '{%TICKET_ADMIN_URL%}' => $this->setting['url'].'ticket-admin/view-ticket?email='.$email.'&ref='.$ref, '{%MESSAGE%}' => nl2br(htmlentities($message,ENT_QUOTES,'UTF-8')) ); if(emailX($name, $email, '[#'.$ref.'] '.$subject.' - '.$this->setting['name'], replaceVars(nl2br($this->setting['new_ticket_email']), $replaceVars)) && emailX($this->setting['name'], $this->setting['notification_email'], '[#'.$ref.'] '.$subject.' - '.$this->setting['name'], replaceVars(nl2br($this->setting['new_ticket_admin_email']), $replaceVars))) { return 'OK|'.$ref.'|'.$subject; } else { return 'ERROR|Er kon geen e-mail verstuurd worden.'; } } else { return 'ERROR|Database error: ('.$this->db->errno.') '.$this->db->error; } } public function addAnwser($ticket_id,$message,$admin_id=0) { if($result = $this->db->query("SELECT name,email,ref,subject FROM verk_tick_tickets WHERE id='".$this->db->real_escape_string($ticket_id)."' AND status <> 'closed'")) { if($result->num_rows == 1) { $ticket = $result->fetch_array(); if($admin_id == 0) { $status = 'admin'; } else { $status = 'client'; } if($this->db->query("INSERT INTO verk_tick_tickets_anwsers (ticket_id,admin_id,message,time,ip) VALUES ( '".$this->db->real_escape_string($ticket_id)."', '".$this->db->real_escape_string($admin_id)."', '".$this->db->real_escape_string($message)."', '".$this->db->real_escape_string(time())."', '".$this->db->real_escape_string($_SERVER['REMOTE_ADDR'])."' )")) { if($this->db->query("UPDATE verk_tick_tickets SET status='".$this->db->real_escape_string($status)."',updated='".$this->db->real_escape_string(time())."' WHERE id='".$this->db->real_escape_string($ticket_id)."'")) { if($admin_id == 0) { emailX($this->setting['name'], $this->setting['notification_email'], 'RE: [#'.$ticket['ref'].'] '.$ticket['subject'].' - '.$this->setting['name'], 'Antwoord hierop toegevoegd!'); } else { emailX($ticket['name'], $ticket['email'], 'RE: [#'.$ticket['ref'].'] '.$ticket['subject'].' - '.$this->setting['name'], 'Antwoord hierop toegevoegd!'); } return 'OK'; } else { return 'ERROR|Database error: ('.$this->db->errno.') '.$this->db->error; } } else { return 'ERROR|Database error: ('.$this->db->errno.') '.$this->db->error; } } else { return 'ERROR|Geen ticket gevonden of ticket is al gesloten'; } $result->free(); } else { return 'ERROR|Database error: ('.$this->db->errno.') '.$this->db->error; } } public function getStatusHTML($status) { switch($status) { case 'open': return '<div class="label label-success">Open</div>'; break; case 'admin': return '<div class="label label-warning">Wachtend op antwoord van support</div>'; break; case 'client': return '<div class="label label-warning">Wachtend op antwoord van client</div>'; break; case 'closed': return '<div class="label label-important">Gesloten</div>'; break; default: return '<div class="label">Onbekend</div>'; } } public function getStatusSex($sex) { switch($sex) { case 1: return 'Man'; break; case 2: return 'Vrouw'; break; case 3: return 'Bedrijf / Organisatie'; break; default: return 'Onbekend'; } } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ejs
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  260     0  E > > RETURN                                                   1

Class Ticket:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ejs
function name:  __construct
number of ops:  7
compiled vars:  !0 = $db, !1 = $setting
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        ASSIGN_OBJ                                               'db'
          3        OP_DATA                                                  !0
   11     4        ASSIGN_OBJ                                               'setting'
          5        OP_DATA                                                  !1
   12     6      > RETURN                                                   null

End of function __construct

Function checkticket:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 29
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ejs
function name:  checkTicket
number of ops:  31
compiled vars:  !0 = $ref, !1 = $email, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        FETCH_OBJ_R                                      ~3      'db'
          3        INIT_METHOD_CALL                                         ~3, 'query'
          4        FETCH_OBJ_R                                      ~4      'db'
          5        INIT_METHOD_CALL                                         ~4, 'real_escape_string'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $5      
          8        CONCAT                                           ~6      'SELECT+id+FROM+verk_tick_tickets+WHERE+ref%3D%27', $5
          9        CONCAT                                           ~7      ~6, '%27+AND+email%3D%27'
         10        FETCH_OBJ_R                                      ~8      'db'
         11        INIT_METHOD_CALL                                         ~8, 'real_escape_string'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $9      
         14        CONCAT                                           ~10     ~7, $9
         15        CONCAT                                           ~11     ~10, '%27'
         16        SEND_VAL_EX                                              ~11
         17        DO_FCALL                                      0  $12     
         18        ASSIGN                                           ~13     !2, $12
         19      > JMPZ                                                     ~13, ->29
   16    20    >   FETCH_OBJ_R                                      ~14     !2, 'num_rows'
         21        IS_EQUAL                                                 ~14, 1
         22      > JMPZ                                                     ~15, ->25
   17    23    > > RETURN                                                   <true>
         24*       JMP                                                      ->26
   19    25    > > RETURN                                                   <false>
   21    26*       INIT_METHOD_CALL                                         !2, 'free'
         27*       DO_FCALL                                      0          
         28*       JMP                                                      ->30
   23    29    > > RETURN                                                   <false>
   25    30*     > RETURN                                                   null

End of function checkticket

Function getticketid:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 33
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 29
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ejs
function name:  getTicketID
number of ops:  35
compiled vars:  !0 = $ref, !1 = $email, !2 = $result, !3 = $resp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   28     2        FETCH_OBJ_R                                      ~4      'db'
          3        INIT_METHOD_CALL                                         ~4, 'query'
          4        FETCH_OBJ_R                                      ~5      'db'
          5        INIT_METHOD_CALL                                         ~5, 'real_escape_string'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $6      
          8        CONCAT                                           ~7      'SELECT+id+FROM+verk_tick_tickets+WHERE+ref%3D%27', $6
          9        CONCAT                                           ~8      ~7, '%27+AND+email%3D%27'
         10        FETCH_OBJ_R                                      ~9      'db'
         11        INIT_METHOD_CALL                                         ~9, 'real_escape_string'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $10     
         14        CONCAT                                           ~11     ~8, $10
         15        CONCAT                                           ~12     ~11, '%27'
         16        SEND_VAL_EX                                              ~12
         17        DO_FCALL                                      0  $13     
         18        ASSIGN                                           ~14     !2, $13
         19      > JMPZ                                                     ~14, ->33
   29    20    >   FETCH_OBJ_R                                      ~15     !2, 'num_rows'
         21        IS_EQUAL                                                 ~15, 1
         22      > JMPZ                                                     ~16, ->29
   30    23    >   INIT_METHOD_CALL                                         !2, 'fetch_array'
         24        DO_FCALL                                      0  $17     
         25        ASSIGN                                                   !3, $17
   31    26        FETCH_DIM_R                                      ~19     !3, 'id'
         27      > RETURN                                                   ~19
         28*       JMP                                                      ->30
   33    29    > > RETURN                                                   <false>
   35    30*       INIT_METHOD_CALL                                         !2, 'free'
         31*       DO_FCALL                                      0          
         32*       JMP                                                      ->34
   37    33    > > RETURN                                                   <false>
   39    34*     > RETURN                                                   null

End of function getticketid

Function getticketvar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 33
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 29
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ejs
function name:  getTicketVar
number of ops:  35
compiled vars:  !0 = $id, !1 = $var, !2 = $result, !3 = $resp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   42     2        FETCH_OBJ_R                                      ~4      'db'
          3        INIT_METHOD_CALL                                         ~4, 'query'
          4        FETCH_OBJ_R                                      ~5      'db'
          5        INIT_METHOD_CALL                                         ~5, 'real_escape_string'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $6      
          8        CONCAT                                           ~7      'SELECT+', $6
          9        CONCAT                                           ~8      ~7, '+FROM+verk_tick_tickets+WHERE+id%3D%27'
         10        FETCH_OBJ_R                                      ~9      'db'
         11        INIT_METHOD_CALL                                         ~9, 'real_escape_string'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0  $10     
         14        CONCAT                                           ~11     ~8, $10
         15        CONCAT                                           ~12     ~11, '%27'
         16        SEND_VAL_EX                                              ~12
         17        DO_FCALL                                      0  $13     
         18        ASSIGN                                           ~14     !2, $13
         19      > JMPZ                                                     ~14, ->33
   43    20    >   FETCH_OBJ_R                                      ~15     !2, 'num_rows'
         21        IS_EQUAL                                                 ~15, 1
         22      > JMPZ                                                     ~16, ->29
   44    23    >   INIT_METHOD_CALL                                         !2, 'fetch_array'
         24        DO_FCALL                                      0  $17     
         25        ASSIGN                                                   !3, $17
   45    26        FETCH_DIM_R                                      ~19     !3, !1
         27      > RETURN                                                   ~19
         28*       JMP                                                      ->30
   47    29    > > RETURN                                                   <false>
   49    30*       INIT_METHOD_CALL                                         !2, 'free'
         31*       DO_FCALL                                      0          
         32*       JMP                                                      ->34
   51    33    > > RETURN                                                   <false>
   53    34*     > RETURN                                                   null

End of function getticketvar

Function getticket:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 31
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ejs
function name:  getTicket
number of ops:  33
compiled vars:  !0 = $ref, !1 = $email, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   55     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   56     2        FETCH_OBJ_R                                      ~3      'db'
          3        INIT_METHOD_CALL                                         ~3, 'query'
          4        FETCH_OBJ_R                                      ~4      'db'
          5        INIT_METHOD_CALL                                         ~4, 'real_escape_string'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $5      
          8        CONCAT                                           ~6      'SELECT+%2A+FROM+verk_tick_tickets+WHERE+ref%3D%27', $5
          9        CONCAT                                           ~7      ~6, '%27+AND+email%3D%27'
         10        FETCH_OBJ_R                                      ~8      'db'
         11        INIT_METHOD_CALL                                         ~8, 'real_escape_string'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $9      
         14        CONCAT                                           ~10     ~7, $9
         15        CONCAT                                           ~11     ~10, '%27'
         16        SEND_VAL_EX                                              ~11
         17        DO_FCALL                                      0  $12     
         18        ASSIGN                                           ~13     !2, $12
         19      > JMPZ                                                     ~13, ->31
   57    20    >   FETCH_OBJ_R                                      ~14     !2, 'num_rows'
         21        IS_EQUAL                                                 ~14, 1
         22      > JMPZ                                                     ~15, ->27
   58    23    >   INIT_METHOD_CALL                                         !2, 'fetch_array'
         24        DO_FCALL                                      0  $16     
         25      > RETURN                                                   $16
         26*       JMP                                                      ->28
   60    27    > > RETURN                                                   <false>
   62    28*       INIT_METHOD_CALL                                         !2, 'free'
         29*       DO_FCALL                                      0          
         30*       JMP                                                      ->32
   64    31    > > RETURN                                                   <false>
   66    32*     > RETURN                                                   null

End of function getticket

Function getopentickets:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 25
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 21
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 11
Branch analysis from position: 17
Branch analysis from position: 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ejs
function name:  getOpenTickets
number of ops:  27
compiled vars:  !0 = $result, !1 = $return, !2 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   69     0  E >   FETCH_OBJ_R                                      ~3      'db'
          1        INIT_METHOD_CALL                                         ~3, 'query'
          2        SEND_VAL_EX                                              'SELECT+%2A+FROM+verk_tick_tickets+WHERE+status%3D%27open%27+OR+status%3D%27client%27+OR+status%3D%27admin%27'
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                           ~5      !0, $4
          5      > JMPZ                                                     ~5, ->25
   70     6    >   FETCH_OBJ_R                                      ~6      !0, 'num_rows'
          7        IS_SMALLER                                               0, ~6
          8      > JMPZ                                                     ~7, ->21
   71     9    >   ASSIGN                                                   !1, <array>
   72    10      > JMP                                                      ->13
   73    11    >   ASSIGN_DIM                                               !1
         12        OP_DATA                                                  !2
   72    13    >   INIT_METHOD_CALL                                         !0, 'fetch_assoc'
         14        DO_FCALL                                      0  $10     
         15        ASSIGN                                           ~11     !2, $10
         16      > JMPNZ                                                    ~11, ->11
   75    17    >   ASSIGN_OBJ                                               'tickets'
         18        OP_DATA                                                  !1
   76    19      > RETURN                                                   <true>
         20*       JMP                                                      ->22
   78    21    > > RETURN                                                   <false>
   80    22*       INIT_METHOD_CALL                                         !0, 'free'
         23*       DO_FCALL                                      0          
         24*       JMP                                                      ->26
   82    25    > > RETURN                                                   <false>
   84    26*     > RETURN                                                   null

End of function getopentickets

Function searchtickets:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 51
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 47
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 36
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 36
Branch analysis from position: 42
Branch analysis from position: 36
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ejs
function name:  searchTickets
number of ops:  53
compiled vars:  !0 = $search, !1 = $result, !2 = $return, !3 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   86     0  E >   RECV                                             !0      
   87     1        FETCH_OBJ_R                                      ~4      'db'
          2        INIT_METHOD_CALL                                         ~4, 'query'
          3        FETCH_OBJ_R                                      ~5      'db'
          4        INIT_METHOD_CALL                                         ~5, 'real_escape_string'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $6      
          7        CONCAT                                           ~7      'SELECT+%2A+FROM+verk_tick_tickets+WHERE+ref+LIKE+%27%25', $6
          8        CONCAT                                           ~8      ~7, '%25%27+OR+name+LIKE+%27%25'
          9        FETCH_OBJ_R                                      ~9      'db'
         10        INIT_METHOD_CALL                                         ~9, 'real_escape_string'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $10     
         13        CONCAT                                           ~11     ~8, $10
         14        CONCAT                                           ~12     ~11, '%25%27+OR+email+LIKE+%27%25'
         15        FETCH_OBJ_R                                      ~13     'db'
         16        INIT_METHOD_CALL                                         ~13, 'real_escape_string'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $14     
         19        CONCAT                                           ~15     ~12, $14
         20        CONCAT                                           ~16     ~15, '%25%27+OR+subject+LIKE+%27%25'
         21        FETCH_OBJ_R                                      ~17     'db'
         22        INIT_METHOD_CALL                                         ~17, 'real_escape_string'
         23        SEND_VAR_EX                                              !0
         24        DO_FCALL                                      0  $18     
         25        CONCAT                                           ~19     ~16, $18
         26        CONCAT                                           ~20     ~19, '%25%27'
         27        SEND_VAL_EX                                              ~20
         28        DO_FCALL                                      0  $21     
         29        ASSIGN                                           ~22     !1, $21
         30      > JMPZ                                                     ~22, ->51
   88    31    >   FETCH_OBJ_R                                      ~23     !1, 'num_rows'
         32        IS_SMALLER                                               0, ~23
         33      > JMPZ                                                     ~24, ->47
   89    34    >   ASSIGN                                                   !2, <array>
   90    35      > JMP                                                      ->38
   91    36    >   ASSIGN_DIM                                               !2
         37        OP_DATA                                                  !3
   90    38    >   INIT_METHOD_CALL                                         !1, 'fetch_assoc'
         39        DO_FCALL                                      0  $27     
         40        ASSIGN                                           ~28     !3, $27
         41      > JMPNZ                                                    ~28, ->36
   93    42    >   ASSIGN_OBJ                                               'tickets'
         43        OP_DATA                                                  !2
   94    44        FETCH_OBJ_R                                      ~30     !1, 'num_rows'
         45      > RETURN                                                   ~30
         46*       JMP                                                      ->48
   96    47    > > RETURN                                                   0
   98    48*       INIT_METHOD_CALL                                         !1, 'free'
         49*       DO_FCALL                                      0          
         50*       JMP                                                      ->52
  100    51    > > RETURN                                                   0
  102    52*     > RETURN                                                   null

End of function searchtickets

Function getticketanwsers:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 52
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 43
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 39
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 29
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 29
Branch analysis from position: 35
Branch analysis from position: 29
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ejs
function name:  getTicketAnwsers
number of ops:  54
compiled vars:  !0 = $ref, !1 = $email, !2 = $id, !3 = $result, !4 = $return, !5 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  104     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  105     2        INIT_METHOD_CALL                                         'checkTicket'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $6      
          6      > JMPZ                                                     $6, ->52
  106     7    >   INIT_METHOD_CALL                                         'getTicketID'
          8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $7      
         11        ASSIGN                                                   !2, $7
  107    12        FETCH_OBJ_R                                      ~9      'db'
         13        INIT_METHOD_CALL                                         ~9, 'query'
         14        FETCH_OBJ_R                                      ~10     'db'
         15        INIT_METHOD_CALL                                         ~10, 'real_escape_string'
         16        SEND_VAR_EX                                              !2
         17        DO_FCALL                                      0  $11     
         18        CONCAT                                           ~12     'SELECT+%2A+FROM+verk_tick_tickets_anwsers+WHERE+ticket_id%3D%27', $11
         19        CONCAT                                           ~13     ~12, '%27'
         20        SEND_VAL_EX                                              ~13
         21        DO_FCALL                                      0  $14     
         22        ASSIGN                                           ~15     !3, $14
         23      > JMPZ                                                     ~15, ->43
  109    24    >   FETCH_OBJ_R                                      ~16     !3, 'num_rows'
         25        IS_SMALLER                                               0, ~16
         26      > JMPZ                                                     ~17, ->39
  111    27    >   ASSIGN                                                   !4, <array>
  112    28      > JMP                                                      ->31
  113    29    >   ASSIGN_DIM                                               !4
         30        OP_DATA                                                  !5
  112    31    >   INIT_METHOD_CALL                                         !3, 'fetch_assoc'
         32        DO_FCALL                                      0  $20     
         33        ASSIGN                                           ~21     !5, $20
         34      > JMPNZ                                                    ~21, ->29
  115    35    >   ASSIGN_OBJ                                               'anwsers'
         36        OP_DATA                                                  !4
  116    37      > RETURN                                                   <true>
         38*       JMP                                                      ->40
  119    39    > > RETURN                                                   '%3Cdiv+class%3D%22alert+alert-info%22%3ENog+geen+berichten...%3C%2Fdiv%3E'
  122    40*       INIT_METHOD_CALL                                         !3, 'free'
         41*       DO_FCALL                                      0          
         42*       JMP                                                      ->51
  125    43    >   FETCH_OBJ_R                                      ~24     'db'
         44        FETCH_OBJ_R                                      ~25     ~24, 'errno'
         45        CONCAT                                           ~26     'Database+error%3A+%28', ~25
         46        CONCAT                                           ~27     ~26, '%29+'
         47        FETCH_OBJ_R                                      ~28     'db'
         48        FETCH_OBJ_R                                      ~29     ~28, 'error'
         49        CONCAT                                           ~30     ~27, ~29
         50      > RETURN                                                   ~30
         51*       JMP                                                      ->53
  128    52    > > RETURN                                                   '%3Cdiv+class%3D%22alert+alert-error%22%3EGeen+ticket+gevonden%21%3C%2Fdiv%3E'
  130    53*     > RETURN                                                   null

End of function getticketanwsers

Function closeticket:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 55
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 51
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 42
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ejs
function name:  closeTicket
number of ops:  64
compiled vars:  !0 = $ref, !1 = $email, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  132     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  133     2        FETCH_OBJ_R                                      ~3      'db'
          3        INIT_METHOD_CALL                                         ~3, 'query'
          4        FETCH_OBJ_R                                      ~4      'db'
          5        INIT_METHOD_CALL                                         ~4, 'real_escape_string'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL            

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
261.08 ms | 1427 KiB | 14 Q