3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once(WCF_DIR.'lib/system/event/EventListener.class.php'); /** * Loads thank'o'mat data for the Threadpage. * * @author Christian "Plunts" Grubert * @copyright 2010 Duetschi Kreativagentur * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> * @package de.wbb3mods.wbb.thankbot */ class ThreadPageThankBotListener implements EventListener { /** * @see EventListener::execute() * @param ThreadPage $eventObj */ public function execute($eventObj, $className, $eventName) { if (empty($eventObj->postList->postIDs)) return; $thankdata = array(); $thankedFor = array(); $sql = "SELECT * FROM wbb".WBB_N."_thank_guests WHERE postID IN (".$eventObj->postList->postIDs.")"; $result = WCF::getDB()->sendQuery($sql); while ($row = WCF::getDB()->fetchArray($result)) { if (isset($thankdata[$row['postID']]['guests'])) $thankdata[$row['postID']]['guests']++; else $thankdata[$row['postID']]['guests'] = 1; } //$canUseOnlineMarking = version_compare(PACKAGE_VERSION, '3.1.0') >= 0; $sql = "SELECT thank_user.*, user.username" . ($canUseOnlineMarking ? ", g.userOnlineMarking usernameStyle" : "") . " FROM wbb" . WBB_N . "_thank_user thank_user LEFT JOIN wcf" . WCF_N . "_user user USING (userID) " . ($canUseOnlineMarking ? "LEFT JOIN wcf" . WCF_N . "_group g ON (user.userOnlineGroupID = g.groupID)" : "") . " WHERE thank_user.postID IN (" . $eventObj->postList->postIDs . ") ORDER BY " . THANKS_SORT; $result = WCF::getDB()->sendQuery($sql); while ($row = WCF::getDB()->fetchArray($result)) { if ($row['username'] == null) { if (isset($thankdata[$row['postID']]['guests'])) $thankdata[$row['postID']]['guests']++; else $thankdata[$row['postID']]['guests'] = 1; } else { if ($canUseOnlineMarking && !empty($row['usernameStyle']) && $row['usernameStyle'] != '%s') { $styledUsername = sprintf($row['usernameStyle'], StringUtil::encodeHTML($row['username'])); } else { $styledUsername = StringUtil::encodeHTML($row['username']); } $thankdata[$row['postID']]['users'][$row['userID']] = array('userID' => $row['userID'], 'username' => $row['username'], 'styledUsername' => $styledUsername, 'time' => $row['time']); } } if ($eventObj->board->getPermission('canThank') && !WCF::getSession()->spiderID) { $sql = "SELECT post.postID, post.userID, GROUP_CONCAT(DISTINCT thank_user.userID) AS userIDs, GROUP_CONCAT(DISTINCT thank_guests.iphash) AS iphashes FROM wbb".WBB_N."_post post LEFT JOIN wbb".WBB_N."_thank_user thank_user ON (post.postID=thank_user.postID) LEFT JOIN wbb".WBB_N."_thank_guests thank_guests ON (post.postID=thank_guests.postID AND thank_guests.time > ".(TIME_NOW-86400).") WHERE post.postID IN (".$eventObj->postList->postIDs.") AND post.hasThank = 1 GROUP BY post.postID ORDER BY post.time"; $result = WCF::getDB()->sendQuery($sql); $additionalSmallButtons = WCF::getTPL()->get('additionalSmallButtons'); $showLargeThankLink = array(); while ($row = WCF::getDB()->fetchArray($result)) { $row['userIDs'] = explode(',', $row['userIDs']); if ($row['userIDs'][0] == '') $row['userIDs'] = array(); $row['iphashes'] = explode(',', $row['iphashes']); if ($row['iphashes'][0] == '') $row['iphashes'] = array(); if ($row['userID'] != WCF::getUser()->userID) { // @todo autor = gast und user = gast sollte auch gehen $hasThanked = (in_array(WCF::getUser()->userID, $row['userIDs']) || in_array(sha1(UserUtil::getIpAddress()), $row['iphashes'])); WCF::getTPL()->assign(array( 'postID' => $row['postID'], 'hasThanked' => $hasThanked )); if (THANKS_BIGBUTTON && $row['postID'] == $eventObj->thread->firstPostID) { WCF::getTPL()->append('additionalLargeButtons', WCF::getTPL()->fetch('threadThankButton')); } elseif (THANKS_LINKPOS == 1) { $thankedFor[$row['postID']] = $hasThanked; } else { if (!isset($additionalSmallButtons[$row['postID']])) $additionalSmallButtons[$row['postID']] = ''; $additionalSmallButtons[$row['postID']] .= WCF::getTPL()->fetch('postThankButton'); } } } WCF::getTPL()->assign('additionalSmallButtons', $additionalSmallButtons); } if (THANKS_SHOWCOUNT) { $additionalSidebarUserCredits = WCF::getTPL()->get('additionalSidebarUserCredits'); foreach ($eventObj->sidebarFactory->messageSidebars AS $sidebar) { if (!isset($additionalSidebarUserCredits[$sidebar->getMessageID()])) $additionalSidebarUserCredits[$sidebar->getMessageID()] = ''; WCF::getTPL()->assign(array( 'thanks_got' => $sidebar->getUser()->thanks_got, 'thanks_given' => $sidebar->getUser()->thanks_given, 'userID' => $sidebar->getUser()->userID, 'postID' => $sidebar->getMessageID() )); $additionalSidebarUserCredits[$sidebar->getMessageID()] .= WCF::getTPL()->fetch('postThankCredits'); } WCF::getTPL()->assign('additionalSidebarUserCredits', $additionalSidebarUserCredits); } $additionalMessageFooter = WCF::getTPL()->get('additionalMessageFooter'); foreach ($eventObj->postList->posts AS $key=>$post) { if ($post->hasThank) { WCF::getTPL()->assign(array( 'postID' => $post->postID, 'postThanks' => isset($thankdata[$post->postID]) ? $thankdata[$post->postID] : null, 'isAuthor' => $post->userID == WCF::getUser()->userID && $post->userID != 0, 'hasThanked' => isset($thankedFor[$post->postID]) ? $thankedFor[$post->postID] : false )); $template = WCF::getTPL()->fetch('postThankStats'); if (!isset($additionalMessageFooter[$post->postID])) { $additionalMessageFooter[$post->postID] = $template; } else { $additionalMessageFooter[$post->postID] .= $template; } } } WCF::getTPL()->assign('additionalMessageFooter', $additionalMessageFooter); WCF::getTPL()->append('specialStyles', "\n".'<script src="' . RELATIVE_WBB_DIR . 'js/ThankOmat.class.js" type="text/javascript"></script>'."\n"); } private function isAuthor(Post $post) { if (WCF::getUser()->userID == 0) { return (UserUtil::getIpAddress() == $post->ipAddress && $post->userID == 0 && $post->time > TIME_NOW-86400); } else { return (WCF::getUser()->userID == $post->userID); } } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bAK0j
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_CONSTANT                                   ~0      'WCF_DIR'
          1        CONCAT                                           ~1      ~0, 'lib%2Fsystem%2Fevent%2FEventListener.class.php'
          2        INCLUDE_OR_EVAL                                          ~1, REQUIRE_ONCE
   12     3        DECLARE_CLASS                                            'threadpagethankbotlistener'
  153     4      > RETURN                                                   1

Class ThreadPageThankBotListener:
Function execute:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 24
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 62
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 63
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 136
Branch analysis from position: 136
2 jumps found. (Code = 44) Position 1 = 143, Position 2 = 79
Branch analysis from position: 143
2 jumps found. (Code = 46) Position 1 = 148, Position 2 = 153
Branch analysis from position: 148
2 jumps found. (Code = 43) Position 1 = 154, Position 2 = 302
Branch analysis from position: 154
1 jumps found. (Code = 42) Position 1 = 289
Branch analysis from position: 289
2 jumps found. (Code = 44) Position 1 = 296, Position 2 = 186
Branch analysis from position: 296
2 jumps found. (Code = 43) Position 1 = 304, Position 2 = 360
Branch analysis from position: 304
2 jumps found. (Code = 77) Position 1 = 313, Position 2 = 353
Branch analysis from position: 313
2 jumps found. (Code = 78) Position 1 = 314, Position 2 = 353
Branch analysis from position: 314
2 jumps found. (Code = 43) Position 1 = 319, Position 2 = 323
Branch analysis from position: 319
1 jumps found. (Code = 42) Position 1 = 313
Branch analysis from position: 313
Branch analysis from position: 323
Branch analysis from position: 353
2 jumps found. (Code = 77) Position 1 = 369, Position 2 = 426
Branch analysis from position: 369
2 jumps found. (Code = 78) Position 1 = 370, Position 2 = 426
Branch analysis from position: 370
2 jumps found. (Code = 43) Position 1 = 373, Position 2 = 425
Branch analysis from position: 373
2 jumps found. (Code = 43) Position 1 = 381, Position 2 = 385
Branch analysis from position: 381
1 jumps found. (Code = 42) Position 1 = 386
Branch analysis from position: 386
2 jumps found. (Code = 46) Position 1 = 393, Position 2 = 396
Branch analysis from position: 393
2 jumps found. (Code = 43) Position 1 = 400, Position 2 = 404
Branch analysis from position: 400
1 jumps found. (Code = 42) Position 1 = 405
Branch analysis from position: 405
2 jumps found. (Code = 43) Position 1 = 418, Position 2 = 422
Branch analysis from position: 418
1 jumps found. (Code = 42) Position 1 = 425
Branch analysis from position: 425
1 jumps found. (Code = 42) Position 1 = 369
Branch analysis from position: 369
Branch analysis from position: 422
1 jumps found. (Code = 42) Position 1 = 369
Branch analysis from position: 369
Branch analysis from position: 404
2 jumps found. (Code = 43) Position 1 = 418, Position 2 = 422
Branch analysis from position: 418
Branch analysis from position: 422
Branch analysis from position: 396
Branch analysis from position: 385
2 jumps found. (Code = 46) Position 1 = 393, Position 2 = 396
Branch analysis from position: 393
Branch analysis from position: 396
Branch analysis from position: 425
Branch analysis from position: 426
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 426
Branch analysis from position: 353
Branch analysis from position: 360
Branch analysis from position: 186
2 jumps found. (Code = 43) Position 1 = 197, Position 2 = 199
Branch analysis from position: 197
2 jumps found. (Code = 43) Position 1 = 210, Position 2 = 212
Branch analysis from position: 210
2 jumps found. (Code = 43) Position 1 = 218, Position 2 = 289
Branch analysis from position: 218
2 jumps found. (Code = 47) Position 1 = 227, Position 2 = 238
Branch analysis from position: 227
2 jumps found. (Code = 46) Position 1 = 249, Position 2 = 254
Branch analysis from position: 249
2 jumps found. (Code = 43) Position 1 = 255, Position 2 = 267
Branch analysis from position: 255
1 jumps found. (Code = 42) Position 1 = 289
Branch analysis from position: 289
Branch analysis from position: 267
2 jumps found. (Code = 43) Position 1 = 270, Position 2 = 274
Branch analysis from position: 270
1 jumps found. (Code = 42) Position 1 = 289
Branch analysis from position: 289
Branch analysis from position: 274
2 jumps found. (Code = 43) Position 1 = 278, Position 2 = 281
Branch analysis from position: 278
2 jumps found. (Code = 44) Position 1 = 296, Position 2 = 186
Branch analysis from position: 296
Branch analysis from position: 186
Branch analysis from position: 281
Branch analysis from position: 254
Branch analysis from position: 238
Branch analysis from position: 289
Branch analysis from position: 212
Branch analysis from position: 199
Branch analysis from position: 302
Branch analysis from position: 153
Branch analysis from position: 79
2 jumps found. (Code = 43) Position 1 = 82, Position 2 = 96
Branch analysis from position: 82
2 jumps found. (Code = 43) Position 1 = 86, Position 2 = 91
Branch analysis from position: 86
1 jumps found. (Code = 42) Position 1 = 95
Branch analysis from position: 95
1 jumps found. (Code = 42) Position 1 = 136
Branch analysis from position: 136
Branch analysis from position: 91
1 jumps found. (Code = 42) Position 1 = 136
Branch analysis from position: 136
Branch analysis from position: 96
2 jumps found. (Code = 46) Position 1 = 97, Position 2 = 100
Branch analysis from position: 97
2 jumps found. (Code = 46) Position 1 = 101, Position 2 = 104
Branch analysis from position: 101
2 jumps found. (Code = 43) Position 1 = 105, Position 2 = 117
Branch analysis from position: 105
1 jumps found. (Code = 42) Position 1 = 123
Branch analysis from position: 123
2 jumps found. (Code = 44) Position 1 = 143, Position 2 = 79
Branch analysis from position: 143
Branch analysis from position: 79
Branch analysis from position: 117
2 jumps found. (Code = 44) Position 1 = 143, Position 2 = 79
Branch analysis from position: 143
Branch analysis from position: 79
Branch analysis from position: 104
Branch analysis from position: 100
Branch analysis from position: 62
1 jumps found. (Code = 42) Position 1 = 136
Branch analysis from position: 136
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 62
Branch analysis from position: 57
Branch analysis from position: 62
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 33
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 24
Branch analysis from position: 44
Branch analysis from position: 24
filename:       /in/bAK0j
function name:  execute
number of ops:  444
compiled vars:  !0 = $eventObj, !1 = $className, !2 = $eventName, !3 = $thankdata, !4 = $thankedFor, !5 = $sql, !6 = $result, !7 = $row, !8 = $canUseOnlineMarking, !9 = $styledUsername, !10 = $additionalSmallButtons, !11 = $showLargeThankLink, !12 = $hasThanked, !13 = $additionalSidebarUserCredits, !14 = $sidebar, !15 = $additionalMessageFooter, !16 = $post, !17 = $key, !18 = $template
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   19     3        FETCH_OBJ_IS                                     ~19     !0, 'postList'
          4        ISSET_ISEMPTY_PROP_OBJ                                   ~19, 'postIDs'
          5      > JMPZ                                                     ~20, ->7
          6    > > RETURN                                                   null
   21     7    >   ASSIGN                                                   !3, <array>
   22     8        ASSIGN                                                   !4, <array>
   24     9        FETCH_CONSTANT                                   ~23     'WBB_N'
         10        CONCAT                                           ~24     'SELECT%09%2A%0A%09%09%09%09FROM%09wbb', ~23
         11        CONCAT                                           ~25     ~24, '_thank_guests%0A%09%09%09%09WHERE%09postID+IN+%28'
   25    12        FETCH_OBJ_R                                      ~26     !0, 'postList'
         13        FETCH_OBJ_R                                      ~27     ~26, 'postIDs'
         14        CONCAT                                           ~28     ~25, ~27
         15        CONCAT                                           ~29     ~28, '%29'
   23    16        ASSIGN                                                   !5, ~29
   26    17        INIT_STATIC_METHOD_CALL                                  'WCF', 'getDB'
         18        DO_FCALL                                      0  $31     
         19        INIT_METHOD_CALL                                         $31, 'sendQuery'
         20        SEND_VAR_EX                                              !5
         21        DO_FCALL                                      0  $32     
         22        ASSIGN                                                   !6, $32
   27    23      > JMP                                                      ->37
   28    24    >   FETCH_DIM_R                                      ~34     !7, 'postID'
         25        FETCH_DIM_IS                                     ~35     !3, ~34
         26        ISSET_ISEMPTY_DIM_OBJ                         0          ~35, 'guests'
         27      > JMPZ                                                     ~36, ->33
   29    28    >   FETCH_DIM_R                                      ~37     !7, 'postID'
         29        FETCH_DIM_RW                                     $38     !3, ~37
         30        FETCH_DIM_RW                                     $39     $38, 'guests'
         31        PRE_INC                                                  $39
         32      > JMP                                                      ->37
   31    33    >   FETCH_DIM_R                                      ~41     !7, 'postID'
         34        FETCH_DIM_W                                      $42     !3, ~41
         35        ASSIGN_DIM                                               $42, 'guests'
         36        OP_DATA                                                  1
   27    37    >   INIT_STATIC_METHOD_CALL                                  'WCF', 'getDB'
         38        DO_FCALL                                      0  $44     
         39        INIT_METHOD_CALL                                         $44, 'fetchArray'
         40        SEND_VAR_EX                                              !6
         41        DO_FCALL                                      0  $45     
         42        ASSIGN                                           ~46     !7, $45
         43      > JMPNZ                                                    ~46, ->24
   35    44    > > JMPZ                                                     !8, ->47
         45    >   QM_ASSIGN                                        ~47     '%2C+g.userOnlineMarking+usernameStyle'
         46      > JMP                                                      ->48
         47    >   QM_ASSIGN                                        ~47     ''
         48    >   CONCAT                                           ~48     'SELECT%09%09thank_user.%2A%2C+user.username', ~47
         49        CONCAT                                           ~49     ~48, '%0A%09%09%09%09FROM%09%09wbb'
   36    50        FETCH_CONSTANT                                   ~50     'WBB_N'
         51        CONCAT                                           ~51     ~49, ~50
         52        CONCAT                                           ~52     ~51, '_thank_user%09thank_user%0A%09%09%09%09LEFT+JOIN%09wcf'
   37    53        FETCH_CONSTANT                                   ~53     'WCF_N'
         54        CONCAT                                           ~54     ~52, ~53
         55        CONCAT                                           ~55     ~54, '_user+user+USING+%28userID%29%0A%09%09%09%09'
   38    56      > JMPZ                                                     !8, ->62
         57    >   FETCH_CONSTANT                                   ~56     'WCF_N'
         58        CONCAT                                           ~57     'LEFT+JOIN+wcf', ~56
         59        CONCAT                                           ~58     ~57, '_group+g+ON+%28user.userOnlineGroupID+%3D+g.groupID%29'
         60        QM_ASSIGN                                        ~59     ~58
         61      > JMP                                                      ->63
         62    >   QM_ASSIGN                                        ~59     ''
         63    >   CONCAT                                           ~60     ~55, ~59
         64        CONCAT                                           ~61     ~60, '%0A%09%09%09%09WHERE+thank_user.postID+IN+%28'
   39    65        FETCH_OBJ_R                                      ~62     !0, 'postList'
         66        FETCH_OBJ_R                                      ~63     ~62, 'postIDs'
         67        CONCAT                                           ~64     ~61, ~63
         68        CONCAT                                           ~65     ~64, '%29%0A%09%09%09%09ORDER+BY%09'
   40    69        FETCH_CONSTANT                                   ~66     'THANKS_SORT'
         70        CONCAT                                           ~67     ~65, ~66
   35    71        ASSIGN                                                   !5, ~67
   41    72        INIT_STATIC_METHOD_CALL                                  'WCF', 'getDB'
         73        DO_FCALL                                      0  $69     
         74        INIT_METHOD_CALL                                         $69, 'sendQuery'
         75        SEND_VAR_EX                                              !5
         76        DO_FCALL                                      0  $70     
         77        ASSIGN                                                   !6, $70
   42    78      > JMP                                                      ->136
   43    79    >   FETCH_DIM_R                                      ~72     !7, 'username'
         80        IS_EQUAL                                                 ~72, null
         81      > JMPZ                                                     ~73, ->96
   44    82    >   FETCH_DIM_R                                      ~74     !7, 'postID'
         83        FETCH_DIM_IS                                     ~75     !3, ~74
         84        ISSET_ISEMPTY_DIM_OBJ                         0          ~75, 'guests'
         85      > JMPZ                                                     ~76, ->91
   45    86    >   FETCH_DIM_R                                      ~77     !7, 'postID'
         87        FETCH_DIM_RW                                     $78     !3, ~77
         88        FETCH_DIM_RW                                     $79     $78, 'guests'
         89        PRE_INC                                                  $79
         90      > JMP                                                      ->95
   47    91    >   FETCH_DIM_R                                      ~81     !7, 'postID'
         92        FETCH_DIM_W                                      $82     !3, ~81
         93        ASSIGN_DIM                                               $82, 'guests'
         94        OP_DATA                                                  1
         95    > > JMP                                                      ->136
   49    96    > > JMPZ_EX                                          ~84     !8, ->100
         97    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~85     !7, 'usernameStyle'
         98        BOOL_NOT                                         ~86     ~85
         99        BOOL                                             ~84     ~86
        100    > > JMPZ_EX                                          ~84     ~84, ->104
        101    >   FETCH_DIM_R                                      ~87     !7, 'usernameStyle'
        102        IS_NOT_EQUAL                                     ~88     ~87, '%25s'
        103        BOOL                                             ~84     ~88
        104    > > JMPZ                                                     ~84, ->117
   50   105    >   INIT_FCALL                                               'sprintf'
        106        FETCH_DIM_R                                      ~89     !7, 'usernameStyle'
        107        SEND_VAL                                                 ~89
        108        INIT_STATIC_METHOD_CALL                                  'StringUtil', 'encodeHTML'
        109        CHECK_FUNC_ARG                                           
        110        FETCH_DIM_FUNC_ARG                               $90     !7, 'username'
        111        SEND_FUNC_ARG                                            $90
        112        DO_FCALL                                      0  $91     
        113        SEND_VAR                                                 $91
        114        DO_ICALL                                         $92     
        115        ASSIGN                                                   !9, $92
        116      > JMP                                                      ->123
   52   117    >   INIT_STATIC_METHOD_CALL                                  'StringUtil', 'encodeHTML'
        118        CHECK_FUNC_ARG                                           
        119        FETCH_DIM_FUNC_ARG                               $94     !7, 'username'
        120        SEND_FUNC_ARG                                            $94
        121        DO_FCALL                                      0  $95     
        122        ASSIGN                                                   !9, $95
   54   123    >   FETCH_DIM_R                                      ~97     !7, 'postID'
        124        FETCH_DIM_R                                      ~100    !7, 'userID'
        125        FETCH_DIM_R                                      ~102    !7, 'userID'
        126        INIT_ARRAY                                       ~103    ~102, 'userID'
   55   127        FETCH_DIM_R                                      ~104    !7, 'username'
        128        ADD_ARRAY_ELEMENT                                ~103    ~104, 'username'
   56   129        ADD_ARRAY_ELEMENT                                ~103    !9, 'styledUsername'
   57   130        FETCH_DIM_R                                      ~105    !7, 'time'
        131        ADD_ARRAY_ELEMENT                                ~103    ~105, 'time'
   54   132        FETCH_DIM_W                                      $98     !3, ~97
        133        FETCH_DIM_W                                      $99     $98, 'users'
        134        ASSIGN_DIM                                               $99, ~100
   57   135        OP_DATA                                                  ~103
   42   136    >   INIT_STATIC_METHOD_CALL                                  'WCF', 'getDB'
        137        DO_FCALL                                      0  $106    
        138        INIT_METHOD_CALL                                         $106, 'fetchArray'
        139        SEND_VAR_EX                                              !6
        140        DO_FCALL                                      0  $107    
        141        ASSIGN                                           ~108    !7, $107
        142      > JMPNZ                                                    ~108, ->79
   61   143    >   FETCH_OBJ_R                                      ~109    !0, 'board'
        144        INIT_METHOD_CALL                                         ~109, 'getPermission'
        145        SEND_VAL_EX                                              'canThank'
        146        DO_FCALL                                      0  $110    
        147      > JMPZ_EX                                          ~111    $110, ->153
        148    >   INIT_STATIC_METHOD_CALL                                  'WCF', 'getSession'
        149        DO_FCALL                                      0  $112    
        150        FETCH_OBJ_R                                      ~113    $112, 'spiderID'
        151        BOOL_NOT                                         ~114    ~113
        152        BOOL                                             ~111    ~114
        153    > > JMPZ                                                     ~111, ->302
   66   154    >   FETCH_CONSTANT                                   ~115    'WBB_N'
        155        CONCAT                                           ~116    'SELECT%0A%09%09%09%09%09post.postID%2C++post.userID%2C%0A%09%09%09%09%09GROUP_CONCAT%28DISTINCT+thank_user.userID%29+AS+userIDs%2C%0A%09%09%09%09%09GROUP_CONCAT%28DISTINCT+thank_guests.iphash%29+AS+iphashes%0A%09%09%09%09FROM+wbb', ~115
        156        CONCAT                                           ~117    ~116, '_post+post%0A%09%09%09%09LEFT+JOIN%09wbb'
   67   157        FETCH_CONSTANT                                   ~118    'WBB_N'
        158        CONCAT                                           ~119    ~117, ~118
        159        CONCAT                                           ~120    ~119, '_thank_user+thank_user+ON+%28post.postID%3Dthank_user.postID%29%0A%09%09%09%09LEFT+JOIN%09wbb'
   68   160        FETCH_CONSTANT                                   ~121    'WBB_N'
        161        CONCAT                                           ~122    ~120, ~121
        162        CONCAT                                           ~123    ~122, '_thank_guests+thank_guests+ON+%28post.postID%3Dthank_guests.postID+AND+thank_guests.time+%3E+'
        163        FETCH_CONSTANT                                   ~124    'TIME_NOW'
        164        SUB                                              ~125    ~124, 86400
        165        CONCAT                                           ~126    ~123, ~125
        166        CONCAT                                           ~127    ~126, '%29%0A%09%09%09%09WHERE+post.postID+IN+%28'
   69   167        FETCH_OBJ_R                                      ~128    !0, 'postList'
        168        FETCH_OBJ_R                                      ~129    ~128, 'postIDs'
        169        CONCAT                                           ~130    ~127, ~129
        170        CONCAT                                           ~131    ~130, '%29+AND+post.hasThank+%3D+1%0A%09%09%09%09GROUP+BY+post.postID%0A%09%09%09%09ORDER+BY+post.time'
   62   171        ASSIGN                                                   !5, ~131
   72   172        INIT_STATIC_METHOD_CALL                                  'WCF', 'getDB'
        173        DO_FCALL                                      0  $133    
        174        INIT_METHOD_CALL                                         $133, 'sendQuery'
        175        SEND_VAR_EX                                              !5
        176        DO_FCALL                                      0  $134    
        177        ASSIGN                                                   !6, $134
   74   178        INIT_STATIC_METHOD_CALL                                  'WCF', 'getTPL'
        179        DO_FCALL                                      0  $136    
        180        INIT_METHOD_CALL                                         $136, 'get'
        181        SEND_VAL_EX                                              'additionalSmallButtons'
        182        DO_FCALL                                      0  $137    
        183        ASSIGN                                                   !10, $137
   75   184        ASSIGN                                                   !11, <array>
   76   185      > JMP                                                      ->289
   77   186    >   INIT_FCALL                                               'explode'
        187        SEND_VAL                                                 '%2C'
        188        FETCH_DIM_R                                      ~141    !7, 'userIDs'
        189        SEND_VAL                                                 ~141
        190        DO_ICALL                                         $142    
        191        ASSIGN_DIM                                               !7, 'userIDs'
        192        OP_DATA                                                  $142
   78   193        FETCH_DIM_R                                      ~143    !7, 'userIDs'
        194        FETCH_DIM_R                                      ~144    ~143, 0
        195        IS_EQUAL                                                 ~144, ''
        196      > JMPZ                                                     ~145, ->199
        197    >   ASSIGN_DIM                                               !7, 'userIDs'
        198        OP_DATA                                                  <array>
   80   199    >   INIT_FCALL                                               'explode'
        200        SEND_VAL                                                 '%2C'
        201        FETCH_DIM_R                                      ~148    !7, 'iphashes'
        202        SEND_VAL                                                 ~148
        203        DO_ICALL                                         $149    
        204        ASSIGN_DIM                                               !7, 'iphashes'
        205        OP_DATA                                                  $149
   81   206        FETCH_DIM_R                                      ~150    !7, 'iphashes'
        207        FETCH_DIM_R                                      ~151    ~150, 0
        208        IS_EQUAL                                                 ~151, ''
        209      > JMPZ                                                     ~152, ->212
        210    >   ASSIGN_DIM                                               !7, 'iphashes'
        211        OP_DATA                                                  <array>
   83   212    >   FETCH_DIM_R                                      ~154    !7, 'userID'
        213        INIT_STATIC_METHOD_CALL                                  'WCF', 'getUser'
        214        DO_FCALL                                      0  $155    
        215        FETCH_OBJ_R                                      ~156    $155, 'userID'
        216        IS_NOT_EQUAL                                             ~154, ~156
        217      > JMPZ                                                     ~157, ->289
   84   218    >   INIT_FCALL                                               'in_array'
        219        INIT_STATIC_METHOD_CALL                                  'WCF', 'getUser'
        220        DO_FCALL                                      0  $158    
        221        FETCH_OBJ_R                                      ~159    $158, 'userID'
        222        SEND_VAL                                                 ~159
        223        FETCH_DIM_R                                      ~160    !7, 'userIDs'
        224        SEND_VAL                                                 ~160
        225        DO_ICALL                                         $161    
        226      > JMPNZ_EX                                         ~162    $161, ->238
        227    >   INIT_FCALL                                               'in_array'
        228        INIT_FCALL                                               'sha1'
        229        INIT_STATIC_METHOD_CALL                                  'UserUtil', 'getIpAddress'
        230        DO_FCALL                                      0  $163    
        231        SEND_VAR                                                 $163
        232        DO_ICALL                                         $164    
        233        SEND_VAR                                                 $164
        234        FETCH_DIM_R                                      ~165    !7, 'iphashes'
        235        SEND_VAL                                                 ~165
        236        DO_ICALL                                         $166    
        237        BOOL                                             ~162    $166
        238    >   ASSIGN                                                   !12, ~162
   85   239        INIT_STATIC_METHOD_CALL                                  'WCF', 'getTPL'
        240        DO_FCALL                                      0  $168    
        241        INIT_METHOD_CALL                                         $168, 'assign'
   86   242        FETCH_DIM_R                                      ~169    !7, 'postID'
        243        INIT_ARRAY                                       ~170    ~169, 'postID'
   87   244        ADD_ARRAY_ELEMENT                                ~170    !12, 'hasThanked'
        245        SEND_VAL_EX                                              ~170
        246        DO_FCALL                                      0          
   90   247        FETCH_CONSTANT                                   ~172    'THANKS_BIGBUTTON'
        248      > JMPZ_EX                                          ~172    ~172, ->254
        249    >   FETCH_DIM_R                                      ~173    !7, 'postID'
        250        FETCH_OBJ_R                                      ~174    !0, 'thread'
        251        FETCH_OBJ_R                                      ~175    ~174, 'firstPostID'
        252        IS_EQUAL                                         ~176    ~173, ~175
        253        BOOL                                             ~172    ~176
        254    > > JMPZ                                                     ~172, ->267
   91   255    >   INIT_STATIC_METHOD_CALL                                  'WCF', 'getTPL'
        256        DO_FCALL                                      0  $177    
        257        INIT_METHOD_CALL                                         $177, 'append'
        258        SEND_VAL_EX                                              'additionalLargeButtons'
        259        INIT_STATIC_METHOD_CALL                                  'WCF', 'getTPL'
        260        DO_FCALL                                      0  $178    
        261        INIT_METHOD_CALL                                         $178, 'fetch'
        262        SEND_VAL_EX                                              'threadThankButton'
        263        DO_FCALL                                      0  $179    
        264        SEND_VAR_NO_REF_EX                                       $179
        265        DO_FCALL                                      0          
        266      > JMP                                                      ->289
   93   267    >   FETCH_CONSTANT                                   ~181    'THANKS_LINKPOS'
        268        IS_EQUAL                                                 ~181, 1
        269      > JMPZ                                                     ~182, ->274
   94   270    >   FETCH_DIM_R                                      ~183    !7, 'postID'
        271        ASSIGN_DIM                                               !4, ~183
        272        OP_DATA                                                  !12
        

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
251.79 ms | 1428 KiB | 22 Q