3v4l.org

run code in 300+ PHP versions simultaneously
<?php // set up DB $conn = mysql_connect("localhost", "root", "root"); mysql_select_db("catweb_database"); // set your db encoding -- for ascent chars (if required) mysql_query("SET NAMES 'utf8'"); // include and create object include("inc/jqgrid_dist.php"); session_start(); $id_user = $_SESSION['id_user']; $col = array(); $col["title"] = "Key"; $col["name"] = "id_cliente"; $col["sortable"] = false; $col["search"] = false; $col["editable"] = false; $col["hidden"] = true; $cols[] = $col; $col = array(); $col["title"] = "Id Utente"; $col["name"] = "IDUTENTE"; $col["sortable"] = false; // this column is not sortable $col["search"] = false; // this column is not searchable $col["editable"] = true; $col["editoptions"] = array("value"=>$id_user); $col["hidden"] = true; $cols[] = $col; $col = array(); $col["title"] = "Ragione Sociale"; $col["name"] = "ragione_sociale"; # $col["width"] = "300"; // not specifying width will expand to fill space $col["sortable"] = true; // this column is not sortable $col["search"] = true; // this column is not searchable $col["editrules"] = array("required"=>true); $col["editable"] = true; $cols[] = $col; $col = array(); $col["title"] = "Recapito"; $col["name"] = "recapito"; # $col["width"] = "300"; // not specifying width will expand to fill space $col["sortable"] = false; // this column is not sortable $col["search"] = false; // this column is not searchable $col["editrules"] = array("required"=>true); $col["editable"] = true; $cols[] = $col; $col = array(); $col["title"] = "e-Mail"; $col["name"] = "email"; # $col["width"] = "300"; // not specifying width will expand to fill space $col["sortable"] = false; // this column is not sortable $col["search"] = false; // this column is not searchable $col["editable"] = true; $cols[] = $col; $col = array(); $col["title"] = "Indirizzo"; $col["name"] = "indirizzo"; # $col["width"] = "300"; // not specifying width will expand to fill space $col["sortable"] = false; // this column is not sortable $col["search"] = false; // this column is not searchable $col["editable"] = true; $col["edittype"] = "textarea"; $cols[] = $col; $col = array(); $col["title"] = "Citta'"; $col["name"] = "citta"; # $col["width"] = "300"; // not specifying width will expand to fill space $col["sortable"] = false; // this column is not sortable $col["search"] = false; // this column is not searchable $col["editable"] = true; $cols[] = $col; $g = new jqgrid(); // set few params $grid["caption"] = "Elenco Clienti"; $grid["multiselect"] = false; $grid["autowidth"] = true; // expand grid to screen width $g->set_options($grid); $g->set_actions(array( "add"=>true, "edit"=>true, "delete"=>true, "rowactions"=>true, "export"=>false, "autofilter" => true, "search" => "simple", //"inlineadd" => true, "showhidecolumns" => false ) ); // set database table for CRUD operations $g->table = "clienti"; // subqueries are also supported now (v1.2) $g->select_command = "SELECT * FROM clienti WHERE idUtente = $id_user"; // pass the cooked columns to grid $g->set_columns($cols); // render grid $out = $g->render("Clienti"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <link rel="stylesheet" type="text/css" media="screen" href="js/themes/redmond/jquery-ui.custom.css"></link> <link rel="stylesheet" type="text/css" media="screen" href="js/jqgrid/css/ui.jqgrid.css"></link> <script src="js/jquery.min.js" type="text/javascript"></script> <script src="js/jqgrid/js/i18n/grid.locale-it.js" type="text/javascript"></script> <script src="js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script> <script src="js/themes/jquery-ui.custom.min.js" type="text/javascript"></script> </head> <body> <div style="margin:10px"> <center><input name="" type="image" src="images/elenco_clienti.png" /> </center> <hr /> <div id="code" align="left"><a href="startpage.php" style="text-decoration: none;"><input value="Home" type="button"></a> <id="code" align="left"><a href="riparazioni.php" style="text-decoration: none;"><input value="Schede in Lavorazione" type="button"></a> <id="code" align="left"><a href="schederivenditori.php" style="text-decoration: none;"><input value="Schede CAT" type="button"></a></div> <hr /> <?php echo $out?> </div> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vvenj
function name:  (null)
number of ops:  154
compiled vars:  !0 = $conn, !1 = $id_user, !2 = $col, !3 = $cols, !4 = $g, !5 = $grid, !6 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'mysql_connect'
          1        SEND_VAL_EX                                              'localhost'
          2        SEND_VAL_EX                                              'root'
          3        SEND_VAL_EX                                              'root'
          4        DO_FCALL                                      0  $7      
          5        ASSIGN                                                   !0, $7
    5     6        INIT_FCALL_BY_NAME                                       'mysql_select_db'
          7        SEND_VAL_EX                                              'catweb_database'
          8        DO_FCALL                                      0          
    8     9        INIT_FCALL_BY_NAME                                       'mysql_query'
         10        SEND_VAL_EX                                              'SET+NAMES+%27utf8%27'
         11        DO_FCALL                                      0          
   11    12        INCLUDE_OR_EVAL                                          'inc%2Fjqgrid_dist.php', INCLUDE
   13    13        INIT_FCALL                                               'session_start'
         14        DO_ICALL                                                 
   14    15        FETCH_R                      global              ~13     '_SESSION'
         16        FETCH_DIM_R                                      ~14     ~13, 'id_user'
         17        ASSIGN                                                   !1, ~14
   16    18        ASSIGN                                                   !2, <array>
   17    19        ASSIGN_DIM                                               !2, 'title'
         20        OP_DATA                                                  'Key'
   18    21        ASSIGN_DIM                                               !2, 'name'
         22        OP_DATA                                                  'id_cliente'
   19    23        ASSIGN_DIM                                               !2, 'sortable'
         24        OP_DATA                                                  <false>
   20    25        ASSIGN_DIM                                               !2, 'search'
         26        OP_DATA                                                  <false>
   21    27        ASSIGN_DIM                                               !2, 'editable'
         28        OP_DATA                                                  <false>
   22    29        ASSIGN_DIM                                               !2, 'hidden'
         30        OP_DATA                                                  <true>
   23    31        ASSIGN_DIM                                               !3
         32        OP_DATA                                                  !2
   25    33        ASSIGN                                                   !2, <array>
   26    34        ASSIGN_DIM                                               !2, 'title'
         35        OP_DATA                                                  'Id+Utente'
   27    36        ASSIGN_DIM                                               !2, 'name'
         37        OP_DATA                                                  'IDUTENTE'
   28    38        ASSIGN_DIM                                               !2, 'sortable'
         39        OP_DATA                                                  <false>
   29    40        ASSIGN_DIM                                               !2, 'search'
         41        OP_DATA                                                  <false>
   30    42        ASSIGN_DIM                                               !2, 'editable'
         43        OP_DATA                                                  <true>
   31    44        INIT_ARRAY                                       ~31     !1, 'value'
         45        ASSIGN_DIM                                               !2, 'editoptions'
         46        OP_DATA                                                  ~31
   32    47        ASSIGN_DIM                                               !2, 'hidden'
         48        OP_DATA                                                  <true>
   33    49        ASSIGN_DIM                                               !3
         50        OP_DATA                                                  !2
   35    51        ASSIGN                                                   !2, <array>
   36    52        ASSIGN_DIM                                               !2, 'title'
         53        OP_DATA                                                  'Ragione+Sociale'
   37    54        ASSIGN_DIM                                               !2, 'name'
         55        OP_DATA                                                  'ragione_sociale'
   39    56        ASSIGN_DIM                                               !2, 'sortable'
         57        OP_DATA                                                  <true>
   40    58        ASSIGN_DIM                                               !2, 'search'
         59        OP_DATA                                                  <true>
   41    60        ASSIGN_DIM                                               !2, 'editrules'
         61        OP_DATA                                                  <array>
   42    62        ASSIGN_DIM                                               !2, 'editable'
         63        OP_DATA                                                  <true>
   43    64        ASSIGN_DIM                                               !3
         65        OP_DATA                                                  !2
   45    66        ASSIGN                                                   !2, <array>
   46    67        ASSIGN_DIM                                               !2, 'title'
         68        OP_DATA                                                  'Recapito'
   47    69        ASSIGN_DIM                                               !2, 'name'
         70        OP_DATA                                                  'recapito'
   49    71        ASSIGN_DIM                                               !2, 'sortable'
         72        OP_DATA                                                  <false>
   50    73        ASSIGN_DIM                                               !2, 'search'
         74        OP_DATA                                                  <false>
   51    75        ASSIGN_DIM                                               !2, 'editrules'
         76        OP_DATA                                                  <array>
   52    77        ASSIGN_DIM                                               !2, 'editable'
         78        OP_DATA                                                  <true>
   53    79        ASSIGN_DIM                                               !3
         80        OP_DATA                                                  !2
   55    81        ASSIGN                                                   !2, <array>
   56    82        ASSIGN_DIM                                               !2, 'title'
         83        OP_DATA                                                  'e-Mail'
   57    84        ASSIGN_DIM                                               !2, 'name'
         85        OP_DATA                                                  'email'
   59    86        ASSIGN_DIM                                               !2, 'sortable'
         87        OP_DATA                                                  <false>
   60    88        ASSIGN_DIM                                               !2, 'search'
         89        OP_DATA                                                  <false>
   61    90        ASSIGN_DIM                                               !2, 'editable'
         91        OP_DATA                                                  <true>
   62    92        ASSIGN_DIM                                               !3
         93        OP_DATA                                                  !2
   64    94        ASSIGN                                                   !2, <array>
   65    95        ASSIGN_DIM                                               !2, 'title'
         96        OP_DATA                                                  'Indirizzo'
   66    97        ASSIGN_DIM                                               !2, 'name'
         98        OP_DATA                                                  'indirizzo'
   68    99        ASSIGN_DIM                                               !2, 'sortable'
        100        OP_DATA                                                  <false>
   69   101        ASSIGN_DIM                                               !2, 'search'
        102        OP_DATA                                                  <false>
   70   103        ASSIGN_DIM                                               !2, 'editable'
        104        OP_DATA                                                  <true>
   71   105        ASSIGN_DIM                                               !2, 'edittype'
        106        OP_DATA                                                  'textarea'
   72   107        ASSIGN_DIM                                               !3
        108        OP_DATA                                                  !2
   74   109        ASSIGN                                                   !2, <array>
   75   110        ASSIGN_DIM                                               !2, 'title'
        111        OP_DATA                                                  'Citta%27'
   76   112        ASSIGN_DIM                                               !2, 'name'
        113        OP_DATA                                                  'citta'
   78   114        ASSIGN_DIM                                               !2, 'sortable'
        115        OP_DATA                                                  <false>
   79   116        ASSIGN_DIM                                               !2, 'search'
        117        OP_DATA                                                  <false>
   80   118        ASSIGN_DIM                                               !2, 'editable'
        119        OP_DATA                                                  <true>
   81   120        ASSIGN_DIM                                               !3
        121        OP_DATA                                                  !2
   83   122        NEW                                              $72     'jqgrid'
        123        DO_FCALL                                      0          
        124        ASSIGN                                                   !4, $72
   86   125        ASSIGN_DIM                                               !5, 'caption'
        126        OP_DATA                                                  'Elenco+Clienti'
   87   127        ASSIGN_DIM                                               !5, 'multiselect'
        128        OP_DATA                                                  <false>
   88   129        ASSIGN_DIM                                               !5, 'autowidth'
        130        OP_DATA                                                  <true>
   89   131        INIT_METHOD_CALL                                         !4, 'set_options'
        132        SEND_VAR_EX                                              !5
        133        DO_FCALL                                      0          
   91   134        INIT_METHOD_CALL                                         !4, 'set_actions'
   92   135        SEND_VAL_EX                                              <array>
        136        DO_FCALL                                      0          
  106   137        ASSIGN_OBJ                                               !4, 'table'
        138        OP_DATA                                                  'clienti'
  109   139        NOP                                                      
        140        FAST_CONCAT                                      ~82     'SELECT+%2A+FROM+clienti+WHERE+idUtente+%3D+', !1
        141        ASSIGN_OBJ                                               !4, 'select_command'
        142        OP_DATA                                                  ~82
  112   143        INIT_METHOD_CALL                                         !4, 'set_columns'
        144        SEND_VAR_EX                                              !3
        145        DO_FCALL                                      0          
  115   146        INIT_METHOD_CALL                                         !4, 'render'
        147        SEND_VAL_EX                                              'Clienti'
        148        DO_FCALL                                      0  $84     
        149        ASSIGN                                                   !6, $84
  118   150        ECHO                                                     '%3C%21DOCTYPE+html+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+XHTML+1.1%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml11%2FDTD%2Fxhtml11.dtd%22%3E%0A%3Chtml%3E%0A%3Chead%3E%0A%09%3Clink+rel%3D%22stylesheet%22+type%3D%22text%2Fcss%22+media%3D%22screen%22+href%3D%22js%2Fthemes%2Fredmond%2Fjquery-ui.custom.css%22%3E%3C%2Flink%3E%09%0A%09%3Clink+rel%3D%22stylesheet%22+type%3D%22text%2Fcss%22+media%3D%22screen%22+href%3D%22js%2Fjqgrid%2Fcss%2Fui.jqgrid.css%22%3E%3C%2Flink%3E%09%0A%09%0A%09%3Cscript+src%3D%22js%2Fjquery.min.js%22+type%3D%22text%2Fjavascript%22%3E%3C%2Fscript%3E%0A%09%3Cscript+src%3D%22js%2Fjqgrid%2Fjs%2Fi18n%2Fgrid.locale-it.js%22+type%3D%22text%2Fjavascript%22%3E%3C%2Fscript%3E%0A%09%3Cscript+src%3D%22js%2Fjqgrid%2Fjs%2Fjquery.jqGrid.min.js%22+type%3D%22text%2Fjavascript%22%3E%3C%2Fscript%3E%09%0A%09%3Cscript+src%3D%22js%2Fthemes%2Fjquery-ui.custom.min.js%22+type%3D%22text%2Fjavascript%22%3E%3C%2Fscript%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%09%3Cdiv+style%3D%22margin%3A10px%22%3E%0A++++%3Ccenter%3E%3Cinput+name%3D%22%22+type%3D%22image%22+src%3D%22images%2Felenco_clienti.png%22+%2F%3E%0A++++%3C%2Fcenter%3E%0A%09%3Chr+%2F%3E%0A++++%3Cdiv+id%3D%22code%22+align%3D%22left%22%3E%3Ca+href%3D%22startpage.php%22+style%3D%22text-decoration%3A+none%3B%22%3E%3Cinput+value%3D%22Home%22+type%3D%22button%22%3E%3C%2Fa%3E%0A++++%3Cid%3D%22code%22+align%3D%22left%22%3E%3Ca+href%3D%22riparazioni.php%22+style%3D%22text-decoration%3A+none%3B%22%3E%3Cinput+value%3D%22Schede+in+Lavorazione%22+type%3D%22button%22%3E%3C%2Fa%3E%0A++++%3Cid%3D%22code%22+align%3D%22left%22%3E%3Ca+href%3D%22schederivenditori.php%22+style%3D%22text-decoration%3A+none%3B%22%3E%3Cinput+value%3D%22Schede+CAT%22+type%3D%22button%22%3E%3C%2Fa%3E%3C%2Fdiv%3E%0A++++%3Chr+%2F%3E%0A%09'
  138   151        ECHO                                                     !6
  139   152        ECHO                                                     '%09%3C%2Fdiv%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
  141   153      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.81 ms | 1408 KiB | 15 Q