3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $Id: main.php,v 1.2 2015/09/13 07:23:44 IvoG Exp $ // The first page // HEADER //include ("header.php"); switch ($_GET["page"]) { // Sub Pages and main //******************************************************** // register as trainee //******************************************************** case "register": if (CheckReg($mysqli, $d->vid) == "1") { ?> <h3>Sorry, registration not avalaible, you have areally requested a registration (and still pending), or your subscription still in progress.</h3> <? include ("footer.php"); exit; } if (!$_POST['register']) { $requestnum = $d->ratingatc + 1; $requestname = RequestRating($requestnum); ?> <h3 class="page-title">Register</h3> <div class="gcontainer"> <form action="index.php?page=register" method="post" name="register"> <fieldset><legend>Registration to the school</legend> <label>[INSERT THE RULE'S HERE]: </label><span>bla bla bla</span> <label>You request school for: </label><span><? echo $requestname; ?></span> <label>I agree with the rule's</label> <span><input id="agree" type="checkbox" name="agree" value="agree"></span> </fieldset> <div class="color form-more"> <input name="register" class="submit" type="submit" value="Register"> </div> </form> </div> <? } else { if ($_POST["agree"] == "") { ?> <h3>Sorry, registration not avalaible, you don't have accepted the AUP. Return back and fullfill the rules, thank's</h3> <? include ("footer.php"); exit; } // 0 - registered, 1 - refused, 2 - accepted, 3 - in progress, 4 - end, 5 - expelled $request = $d->ratingatc + 1; $sql = "INSERT INTO application (id, vid, request, accepted, reason, class) VALUES ('', '$d->vid', '$request', '0', '', '')"; safecommit($mysqli, $sql, "<h4>Failed to register your application, please contact WM, thank's</h4>", "<h4>Registration done. You're been contacted back on your email for future info.</h4>"); } break; //******************************************************** // Default webpage //******************************************************** default: ?> <H4>Hi <? echo $d->firstname; ?> <? echo $d->lastname; ?> (<a href="https://www.ivao.aero/Member.aspx?Id=<? echo $d->vid; ?>"><? echo $d->vid; ?></a>)!<span class='notice'>Your rating ATC is <? echo RequestRating($d->ratingatc);?></span></H4> <span>Welcome to the school. You can request a subscription here.</span> <? /* print_r(CheckUser($d->vid)); print_r(CheckUser($d->vid)); echo '<pre>'; print_r($d); echo '</pre>'; */ // var_dump($d); break; // END switch }; // FOOTER //include ("footer.php"); ?>
Finding entry points
Branch analysis from position: 0
3 jumps found. (Code = 188) Position 1 = 6, Position 2 = 56, Position 3 = 3
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 32
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 39
Branch analysis from position: 36
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
Branch analysis from position: 6
filename:       /in/JfUYE
function name:  (null)
number of ops:  79
compiled vars:  !0 = $mysqli, !1 = $d, !2 = $requestnum, !3 = $requestname, !4 = $request, !5 = $sql
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_R                      global              ~6      '_GET'
          1        FETCH_DIM_R                                      ~7      ~6, 'page'
          2      > SWITCH_STRING                                            ~7, [ 'register':->6, ], ->56
   14     3    >   CASE                                                     ~7, 'register'
          4      > JMPNZ                                                    ~8, ->6
          5    > > JMP                                                      ->56
   15     6    >   INIT_FCALL_BY_NAME                                       'CheckReg'
          7        SEND_VAR_EX                                              !0
          8        CHECK_FUNC_ARG                                           
          9        FETCH_OBJ_FUNC_ARG                               $9      !1, 'vid'
         10        SEND_FUNC_ARG                                            $9
         11        DO_FCALL                                      0  $10     
         12        IS_EQUAL                                                 $10, '1'
         13      > JMPZ                                                     ~11, ->17
   16    14    >   ECHO                                                     '+%0A++++%3Ch3%3ESorry%2C+registration+not+avalaible%2C+you+have+areally+requested+a+registration+%28and+still+pending%29%2C+or+your+subscription+still+in+progress.%3C%2Fh3%3E%0A++++'
   19    15        INCLUDE_OR_EVAL                                          'footer.php', INCLUDE
   20    16      > EXIT                                                     
   22    17    >   FETCH_R                      global              ~13     '_POST'
         18        FETCH_DIM_R                                      ~14     ~13, 'register'
         19        BOOL_NOT                                         ~15     ~14
         20      > JMPZ                                                     ~15, ->32
   23    21    >   FETCH_OBJ_R                                      ~16     !1, 'ratingatc'
         22        ADD                                              ~17     ~16, 1
         23        ASSIGN                                                   !2, ~17
   24    24        INIT_FCALL_BY_NAME                                       'RequestRating'
         25        SEND_VAR_EX                                              !2
         26        DO_FCALL                                      0  $19     
         27        ASSIGN                                                   !3, $19
   26    28        ECHO                                                     '%3Ch3+class%3D%22page-title%22%3ERegister%3C%2Fh3%3E%0A%3Cdiv+class%3D%22gcontainer%22%3E%0A%3Cform+action%3D%22index.php%3Fpage%3Dregister%22+method%3D%22post%22+name%3D%22register%22%3E%0A%3Cfieldset%3E%3Clegend%3ERegistration+to+the+school%3C%2Flegend%3E%0A%09%09%3Clabel%3E%5BINSERT+THE+RULE%27S+HERE%5D%3A+%3C%2Flabel%3E%3Cspan%3Ebla+bla+bla%3C%2Fspan%3E%0A++++++++%3Clabel%3EYou+request+school+for%3A+%3C%2Flabel%3E%3Cspan%3E'
   31    29        ECHO                                                     !3
         30        ECHO                                                     '%3C%2Fspan%3E%0A%09%09%3Clabel%3EI+agree+with+the+rule%27s%3C%2Flabel%3E%0A%09%09%3Cspan%3E%3Cinput+id%3D%22agree%22+type%3D%22checkbox%22+name%3D%22agree%22+value%3D%22agree%22%3E%3C%2Fspan%3E%0A%3C%2Ffieldset%3E%0A%0A++++++++%3Cdiv+class%3D%22color+form-more%22%3E%0A++++++++++++%3Cinput+name%3D%22register%22+class%3D%22submit%22+type%3D%22submit%22+value%3D%22Register%22%3E%0A++++++++%3C%2Fdiv%3E%0A%3C%2Fform%3E%0A%3C%2Fdiv%3E%0A'
         31      > JMP                                                      ->55
   42    32    >   FETCH_R                      global              ~21     '_POST'
         33        FETCH_DIM_R                                      ~22     ~21, 'agree'
         34        IS_EQUAL                                                 ~22, ''
         35      > JMPZ                                                     ~23, ->39
   43    36    >   ECHO                                                     '+%0A++++%3Ch3%3ESorry%2C+registration+not+avalaible%2C+you+don%27t+have+accepted+the+AUP.+Return+back+and+fullfill+the+rules%2C+thank%27s%3C%2Fh3%3E%0A++++'
   46    37        INCLUDE_OR_EVAL                                          'footer.php', INCLUDE
   47    38      > EXIT                                                     
   50    39    >   FETCH_OBJ_R                                      ~25     !1, 'ratingatc'
         40        ADD                                              ~26     ~25, 1
         41        ASSIGN                                                   !4, ~26
   51    42        ROPE_INIT                                     5  ~30     'INSERT+INTO+application+%28id%2C+vid%2C+request%2C+accepted%2C+reason%2C+class%29+VALUES+%28%27%27%2C+%27'
         43        FETCH_OBJ_R                                      ~28     !1, 'vid'
         44        ROPE_ADD                                      1  ~30     ~30, ~28
         45        ROPE_ADD                                      2  ~30     ~30, '%27%2C+%27'
         46        ROPE_ADD                                      3  ~30     ~30, !4
         47        ROPE_END                                      4  ~29     ~30, '%27%2C+%270%27%2C+%27%27%2C+%27%27%29'
         48        ASSIGN                                                   !5, ~29
   52    49        INIT_FCALL_BY_NAME                                       'safecommit'
         50        SEND_VAR_EX                                              !0
         51        SEND_VAR_EX                                              !5
         52        SEND_VAL_EX                                              '%3Ch4%3EFailed+to+register+your+application%2C+please+contact+WM%2C+thank%27s%3C%2Fh4%3E'
         53        SEND_VAL_EX                                              '%3Ch4%3ERegistration+done.+You%27re+been+contacted+back+on+your+email+for+future+info.%3C%2Fh4%3E'
         54        DO_FCALL                                      0          
   55    55    > > JMP                                                      ->77
   62    56    >   ECHO                                                     '%3CH4%3EHi+'
         57        FETCH_OBJ_R                                      ~35     !1, 'firstname'
         58        ECHO                                                     ~35
         59        ECHO                                                     '+'
         60        FETCH_OBJ_R                                      ~36     !1, 'lastname'
         61        ECHO                                                     ~36
         62        ECHO                                                     '+%28%3Ca+href%3D%22https%3A%2F%2Fwww.ivao.aero%2FMember.aspx%3FId%3D'
         63        FETCH_OBJ_R                                      ~37     !1, 'vid'
         64        ECHO                                                     ~37
         65        ECHO                                                     '%22%3E'
         66        FETCH_OBJ_R                                      ~38     !1, 'vid'
         67        ECHO                                                     ~38
         68        ECHO                                                     '%3C%2Fa%3E%29%21%3Cspan+class%3D%27notice%27%3EYour+rating+ATC+is+'
         69        INIT_FCALL_BY_NAME                                       'RequestRating'
         70        CHECK_FUNC_ARG                                           
         71        FETCH_OBJ_FUNC_ARG                               $39     !1, 'ratingatc'
         72        SEND_FUNC_ARG                                            $39
         73        DO_FCALL                                      0  $40     
         74        ECHO                                                     $40
         75        ECHO                                                     '%3C%2Fspan%3E%3C%2FH4%3E+%0A%0A%3Cspan%3EWelcome+to+the+school.+You+can+request+a+subscription+here.%3C%2Fspan%3E%0A'
   71    76      > JMP                                                      ->77
         77    >   FREE                                                     ~7
   78    78      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.49 ms | 1403 KiB | 13 Q