3v4l.org

run code in 300+ PHP versions simultaneously
<?php //////////////////////////////////////////////////////////////////*****///////////////////////////////////////////////////////////////////////////////////// // Feedback Pro v1 // // Faculty Evaluation System // // Developed By Shrenik Patel // // July 27, 2009 // // // // Tis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or (at your option) any later version. // // // // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. // // // //////////////////////////////////////////////////////////////////*****////////////////////////////////////////////////////////////////////////////////////// include('session_chk.php'); include("includes/config_db.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="includes/style.css" /> <title>Add Batch</title> </head> <body> <table width="57%" align="center" border="0" cellpadding="0" cellspacing="1"> <?php include('admin_panel_heading.php'); ?> <tr> <td width="22%" valign="top" bgcolor="#FFFFFF"> <?php include('left_side.php');?> </td> <td width="78%" align="center" valign="top" bgcolor="#FFFFFF"> <? if(isset($_POST['submit'])) { $title = $_POST['batch_name']; if(!$title) { echo "Error: Add Batch Name. Please fill it."; } $dup="select * from batch_master where batch_name='".$title."'"; $dup_res=mysql_query($dup) or die(mysql_error()); if(mysql_num_rows($dup_res)==1) { echo "Batch name is already available in database."; } else { $result = mysql_query("INSERT INTO batch_master (batch_name,feedback_no) VALUES ('$title','1')"); echo "<b>Batch is added Successfully!</b><br>You'll be redirected after (1) Seconds"; echo "<meta http-equiv=Refresh content=1;url=batch.php>"; } ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']?>"> <table width="283" border="0" cellpadding="3" cellspacing="1" align="center"> <tr> <td colspan="2" align="center" style="font-size:20px">Add Batch</td> </tr> <tr> <td width="92">Batch Name:</td> <td width="163"><label> <input type="text" name="batch_name" value=""/><!--onkeypress="return isCharOnly(event);"--> </label></td> </tr> <tr> <td>&nbsp;</td> <td><table border="0" width="100%"> <tr><td> <input type="submit" class="button" name="submit" value="Add"></td><td align="right"><input class="button" type="button" name="Back" value="Back" onclick="javascript: history.go(-1)" /></td></tr></table> </td> </tr> </table> </form> <? }//end of else ?> <p>&nbsp;</p></td> </tr> </table> </body> </html> <script language="javascript" type="text/javascript"> function isCharOnly(e) { var unicode=e.charCode? e.charCode : e.keyCode //if (unicode!=8 && unicode!=9) //{ //if the key isn't the backspace key (which we should allow) //disable key press if (unicode==45) return true; if (unicode>48 && unicode<57) //if not a number return false //} } </script>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 49
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
2 jumps found. (Code = 47) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 49
filename:       /in/ptTOT
function name:  (null)
number of ops:  51
compiled vars:  !0 = $title, !1 = $dup, !2 = $dup_res, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INCLUDE_OR_EVAL                                          'session_chk.php', INCLUDE
   16     1        INCLUDE_OR_EVAL                                          'includes%2Fconfig_db.php', INCLUDE
   17     2        ECHO                                                     '+%09%0A%3C%21DOCTYPE+html+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+XHTML+1.0+Transitional%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml1-transitional.dtd%22%3E%0A%3Chtml+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%0A%3Chead%3E%0A%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+charset%3Diso-8859-1%22+%2F%3E%0A%3Clink+rel%3D%22stylesheet%22+type%3D%22text%2Fcss%22+href%3D%22includes%2Fstyle.css%22+%2F%3E%0A%3Ctitle%3EAdd+Batch%3C%2Ftitle%3E%0A%3C%2Fhead%3E%0A%0A%3Cbody%3E%0A%3Ctable+width%3D%2257%25%22+align%3D%22center%22+border%3D%220%22+cellpadding%3D%220%22+cellspacing%3D%221%22%3E%0A%0A'
   29     3        INCLUDE_OR_EVAL                                          'admin_panel_heading.php', INCLUDE
   30     4        ECHO                                                     '%0A%3Ctr%3E%0A%3Ctd+width%3D%2222%25%22+valign%3D%22top%22+bgcolor%3D%22%23FFFFFF%22%3E%0A'
   33     5        INCLUDE_OR_EVAL                                          'left_side.php', INCLUDE
   34     6        ECHO                                                     '%3C%2Ftd%3E%0A%0A%3Ctd+width%3D%2278%25%22+align%3D%22center%22+valign%3D%22top%22+bgcolor%3D%22%23FFFFFF%22%3E%0A'
   38     7        FETCH_IS                                         ~8      '_POST'
          8        ISSET_ISEMPTY_DIM_OBJ                         0          ~8, 'submit'
          9      > JMPZ                                                     ~9, ->49
   40    10    >   FETCH_R                      global              ~10     '_POST'
         11        FETCH_DIM_R                                      ~11     ~10, 'batch_name'
         12        ASSIGN                                                   !0, ~11
   42    13        BOOL_NOT                                         ~13     !0
         14      > JMPZ                                                     ~13, ->16
   44    15    >   ECHO                                                     'Error%3A+Add+Batch+Name.+Please+fill+it.'
   48    16    >   CONCAT                                           ~14     'select+%2A+from+batch_master+where+batch_name%3D%27', !0
         17        CONCAT                                           ~15     ~14, '%27'
         18        ASSIGN                                                   !1, ~15
   49    19        INIT_FCALL_BY_NAME                                       'mysql_query'
         20        SEND_VAR_EX                                              !1
         21        DO_FCALL                                      0  $17     
         22        ASSIGN                                           ~18     !2, $17
         23      > JMPNZ_EX                                         ~18     ~18, ->28
         24    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         25        DO_FCALL                                      0  $19     
         26      > EXIT                                                     $19
         27*       BOOL                                             ~18     <true>
   50    28    >   INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         29        SEND_VAR_EX                                              !2
         30        DO_FCALL                                      0  $20     
         31        IS_EQUAL                                                 $20, 1
         32      > JMPZ                                                     ~21, ->35
   52    33    >   ECHO                                                     'Batch+name+is+already+available+in+database.'
         34      > JMP                                                      ->44
   57    35    >   INIT_FCALL_BY_NAME                                       'mysql_query'
         36        ROPE_INIT                                     3  ~23     'INSERT+INTO+batch_master+%28batch_name%2Cfeedback_no%29+VALUES+%28%27'
         37        ROPE_ADD                                      1  ~23     ~23, !0
         38        ROPE_END                                      2  ~22     ~23, '%27%2C%271%27%29'
         39        SEND_VAL_EX                                              ~22
         40        DO_FCALL                                      0  $25     
         41        ASSIGN                                                   !3, $25
   58    42        ECHO                                                     '%3Cb%3EBatch+is+added+Successfully%21%3C%2Fb%3E%3Cbr%3EYou%27ll+be+redirected+after+%281%29+Seconds'
   59    43        ECHO                                                     '%3Cmeta+http-equiv%3DRefresh+content%3D1%3Burl%3Dbatch.php%3E'
   63    44    >   ECHO                                                     '%3Cform+method%3D%22post%22+action%3D%22'
         45        FETCH_R                      global              ~27     '_SERVER'
         46        FETCH_DIM_R                                      ~28     ~27, 'PHP_SELF'
         47        ECHO                                                     ~28
         48        ECHO                                                     '%22%3E%0A%3Ctable+width%3D%22283%22+border%3D%220%22+cellpadding%3D%223%22+cellspacing%3D%221%22+align%3D%22center%22%3E%0A%3Ctr%3E%0A%3Ctd+colspan%3D%222%22+align%3D%22center%22+style%3D%22font-size%3A20px%22%3EAdd+Batch%3C%2Ftd%3E%0A%3C%2Ftr%3E%0A++%3Ctr%3E%0A++++%3Ctd+width%3D%2292%22%3EBatch+Name%3A%3C%2Ftd%3E%0A++++%3Ctd+width%3D%22163%22%3E%3Clabel%3E%0A++++++%3Cinput+type%3D%22text%22+name%3D%22batch_name%22+value%3D%22%22%2F%3E%3C%21--onkeypress%3D%22return+isCharOnly%28event%29%3B%22--%3E%0A++++%3C%2Flabel%3E%3C%2Ftd%3E%0A++%3C%2Ftr%3E%0A++%3Ctr%3E%0A++++%3Ctd%3E%26nbsp%3B%3C%2Ftd%3E%0A++++%3Ctd%3E%3Ctable+border%3D%220%22+width%3D%22100%25%22%3E%0A%09%3Ctr%3E%3Ctd%3E+%3Cinput+type%3D%22submit%22+class%3D%22button%22+name%3D%22submit%22+value%3D%22Add%22%3E%3C%2Ftd%3E%3Ctd+align%3D%22right%22%3E%3Cinput+class%3D%22button%22+type%3D%22button%22+name%3D%22Back%22+value%3D%22Back%22++onclick%3D%22javascript%3A+history.go%28-1%29%22+%2F%3E%3C%2Ftd%3E%3C%2Ftr%3E%3C%2Ftable%3E%0A++++%3C%2Ftd%3E%0A++%3C%2Ftr%3E%0A%3C%2Ftable%3E%0A%3C%2Fform%3E%0A+'
   85    49    >   ECHO                                                     '%3Cp%3E%26nbsp%3B%3C%2Fp%3E%3C%2Ftd%3E%0A%3C%2Ftr%3E%0A%3C%2Ftable%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A%3Cscript+language%3D%22javascript%22+type%3D%22text%2Fjavascript%22%3E%0Afunction+isCharOnly%28e%29%0A%7B%0A%09var+unicode%3De.charCode%3F+e.charCode+%3A+e.keyCode%0A%09%2F%2Fif+%28unicode%21%3D8+%26%26+unicode%21%3D9%29%0A%09%2F%2F%7B+%2F%2Fif+the+key+isn%27t+the+backspace+key+%28which+we+should+allow%29%0A%09%09+%2F%2Fdisable+key+press%0A%09%09if+%28unicode%3D%3D45%29%0A%09%09%09return+true%3B%0A%09%09if+%28unicode%3E48+%26%26+unicode%3C57%29+%2F%2Fif+not+a+number%0A%09%09%09return+false%0A%09%2F%2F%7D%0A%7D%0A%3C%2Fscript%3E'
  103    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.58 ms | 1403 KiB | 13 Q